aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2011-06-08 19:37:29 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2011-06-09 00:24:22 +0800
commit769cf77926d58dc75e1f031b15433522ecd8d9a2 (patch)
tree9cde7134b351c7b04e2c8aacfa845e88a43290e8 /src
parent82088320c652f34543c82b790adf82019320d5a4 (diff)
downloadgsoc2013-epiphany-769cf77926d58dc75e1f031b15433522ecd8d9a2.tar
gsoc2013-epiphany-769cf77926d58dc75e1f031b15433522ecd8d9a2.tar.gz
gsoc2013-epiphany-769cf77926d58dc75e1f031b15433522ecd8d9a2.tar.bz2
gsoc2013-epiphany-769cf77926d58dc75e1f031b15433522ecd8d9a2.tar.lz
gsoc2013-epiphany-769cf77926d58dc75e1f031b15433522ecd8d9a2.tar.xz
gsoc2013-epiphany-769cf77926d58dc75e1f031b15433522ecd8d9a2.tar.zst
gsoc2013-epiphany-769cf77926d58dc75e1f031b15433522ecd8d9a2.zip
Move the save/load accelerators methods to the ephy file utilities
Second patch in an attempt to clean up ephy-main.c https://bugzilla.gnome.org/show_bug.cgi?id=652119
Diffstat (limited to 'src')
-rw-r--r--src/ephy-main.c41
1 files changed, 2 insertions, 39 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 5e1a8428b..850b2838d 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -383,43 +383,6 @@ show_error_message (GError **error)
gtk_dialog_run (GTK_DIALOG (dialog));
}
-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);
-}
-
-static void
-load_accels (void)
-{
- char *filename;
-
- filename = get_accels_filename ();
- if (!filename)
- return;
-
- gtk_accel_map_load (filename);
- g_free (filename);
-}
-
-static void
-save_accels (void)
-{
- char *filename;
-
- filename = get_accels_filename ();
- if (!filename)
- return;
-
- gtk_accel_map_save (filename);
- g_free (filename);
-}
-
static void
shell_quit_cb (EphyShell *shell, gpointer data)
{
@@ -689,7 +652,7 @@ main (int argc,
}
ephy_stock_icons_init ();
- load_accels ();
+ ephy_file_load_accels ();
/* Work-around Flash Player crash */
g_setenv ("XLIB_SKIP_ARGB_VISUALS", "1", FALSE);
@@ -705,7 +668,7 @@ main (int argc,
/* Shutdown */
g_object_unref (ephy_shell);
- save_accels ();
+ ephy_file_save_accels ();
ephy_state_save ();
ephy_settings_shutdown ();
ephy_file_helpers_shutdown ();