[gtranslator] Use the right accels file.



commit 717da15826f6a820d641bcd5fb8a9b92e527127e
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Wed Feb 10 20:43:33 2010 +0100

    Use the right accels file.

 src/gtr-application.c |   44 +++++++++++++++-----------------------------
 1 files changed, 15 insertions(+), 29 deletions(-)
---
diff --git a/src/gtr-application.c b/src/gtr-application.c
index ddfd5e4..bf624b8 100644
--- a/src/gtr-application.c
+++ b/src/gtr-application.c
@@ -48,47 +48,33 @@
 					 GtrApplicationPrivate))
 
 G_DEFINE_TYPE (GtrApplication, gtr_application, G_TYPE_OBJECT)
-     struct _GtrApplicationPrivate
-     {
-       GList *windows;
-       GtrWindow *active_window;
 
-       GList *profiles;
-       GtrProfile *active_profile;
-
-       gchar *toolbars_file;
-       EggToolbarsModel *toolbars_model;
-
-       GtkIconFactory *icon_factory;
-
-       gchar *last_dir;
+struct _GtrApplicationPrivate
+{
+  GList *windows;
+  GtrWindow *active_window;
 
-       GtrTranslationMemory *tm;
+  GList *profiles;
+  GtrProfile *active_profile;
 
-       gboolean first_run;
-     };
+  gchar *toolbars_file;
+  EggToolbarsModel *toolbars_model;
 
-     static gchar *get_accel_file (void)
-{
-  gchar *config;
+  GtkIconFactory *icon_factory;
 
-  config = gtr_dirs_get_user_config_dir ();
+  gchar *last_dir;
 
-  if (config != NULL)
-    {
-      return g_build_filename (config, "gtr-accels", NULL);
-      g_free (config);
-    }
+  GtrTranslationMemory *tm;
 
-  return NULL;
-}
+  gboolean first_run;
+};
 
 static void
 load_accels (void)
 {
   gchar *filename;
 
-  filename = get_accel_file ();
+  filename = gtr_dirs_get_user_accels_file ();
   if (filename != NULL)
     {
       gtk_accel_map_load (filename);
@@ -101,7 +87,7 @@ save_accels (void)
 {
   gchar *filename;
 
-  filename = get_accel_file ();
+  filename = gtr_dirs_get_user_accels_file ();
   if (filename != NULL)
     {
       gtk_accel_map_save (filename);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]