diff options
Diffstat (limited to 'lib/ephy-file-helpers.c')
-rw-r--r-- | lib/ephy-file-helpers.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c index efd35cba4..64ea9179a 100644 --- a/lib/ephy-file-helpers.c +++ b/lib/ephy-file-helpers.c @@ -932,3 +932,40 @@ ephy_file_delete_uri (const char *uri) } g_object_unref (file); } + +static gchar * +get_accels_filename (void) +{ + const char *home; + + home = g_get_home_dir(); + if (!home) + return NULL; + return g_build_filename (home, GNOME_DOT_GNOME, "accels", PACKAGE, NULL); +} + +void +ephy_file_load_accels (void) +{ + char *filename; + + filename = get_accels_filename (); + if (!filename) + return; + + gtk_accel_map_load (filename); + g_free (filename); +} + +void +ephy_file_save_accels (void) +{ + char *filename; + + filename = get_accels_filename (); + if (!filename) + return; + + gtk_accel_map_save (filename); + g_free (filename); +} |