74 lines
1.6 KiB
Diff
74 lines
1.6 KiB
Diff
--- dia-0.95/app/app_procs.c
|
|
+++ dia-0.95/app/app_procs.c
|
|
@@ -111,6 +111,7 @@
|
|
char *show_layers);
|
|
|
|
static void create_user_dirs(void);
|
|
+static void create_user_files(void);
|
|
static PluginInitResult internal_plugin_init(PluginInfo *info);
|
|
static void process_opts(int argc, char **argv,
|
|
#if USE_GOPTION
|
|
@@ -557,6 +558,7 @@
|
|
DDisplay *ddisp = NULL;
|
|
Diagram *diagram = NULL;
|
|
gboolean made_conversions = FALSE;
|
|
+ gchar *rcf;
|
|
|
|
if (export_file_format) {
|
|
char *export_file_name = NULL;
|
|
@@ -662,6 +664,7 @@
|
|
static char *show_layers = NULL;
|
|
gboolean made_conversions = FALSE;
|
|
GSList *files = NULL;
|
|
+ gchar *rcf;
|
|
|
|
gchar *export_format_string =
|
|
/* Translators: The argument is a list of options, not to be translated */
|
|
@@ -862,8 +865,6 @@
|
|
|
|
gdk_rgb_init();
|
|
|
|
- gtk_rc_parse("diagtkrc");
|
|
-
|
|
if (!nosplash) {
|
|
app_splash_init("");
|
|
}
|
|
@@ -871,6 +872,11 @@
|
|
|
|
if (dia_is_interactive)
|
|
create_user_dirs();
|
|
+ create_user_files();
|
|
+
|
|
+ rcf = dia_config_filename("diagtkrc");
|
|
+ gtk_rc_parse(rcf);
|
|
+ g_free(rcf);
|
|
|
|
/* Init cursors: */
|
|
if (dia_is_interactive) {
|
|
@@ -1055,6 +1061,25 @@
|
|
return TRUE;
|
|
}
|
|
|
|
+static void create_user_files(void)
|
|
+{
|
|
+ gchar *rc = NULL;
|
|
+
|
|
+ rc = dia_config_filename("diagtkrc");
|
|
+
|
|
+ /* If the file does not exist, we put in our defaults */
|
|
+ if (!g_file_test(rc, G_FILE_TEST_EXISTS)) {
|
|
+ FILE *f;
|
|
+
|
|
+ /* Never mind if it fails */
|
|
+ if ((f = fopen(rc, "w"))!= NULL) {
|
|
+ fprintf(f, "gtk-can-change-accels = 1");
|
|
+ fclose(f);
|
|
+ }
|
|
+ }
|
|
+ g_free(rc);
|
|
+}
|
|
+
|
|
static void create_user_dirs(void)
|
|
{
|
|
gchar *dir, *subdir;
|