Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions xed/xed-app.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,20 @@ setup_theme_extensions (void)
theme_changed (settings, NULL, NULL);
}

static void
load_accels (void)
{
gchar *filename;

filename = g_build_filename (xed_dirs_get_user_config_dir (), "accels", NULL);
if (filename != NULL)
{
xed_debug_message (DEBUG_APP, "Loading keybindings from %s\n", filename);
gtk_accel_map_load (filename);
g_free (filename);
}
}

static void
xed_app_startup (GApplication *application)
{
Expand All @@ -282,6 +296,7 @@ xed_app_startup (GApplication *application)
GtkCssProvider *provider;

G_APPLICATION_CLASS (xed_app_parent_class)->startup (application);
load_accels ();

/* Setup debugging */
xed_debug_init ();
Expand Down Expand Up @@ -893,20 +908,6 @@ xed_app_class_init (XedAppClass *klass)
app_class->shutdown = xed_app_shutdown;
}

static void
load_accels (void)
{
gchar *filename;

filename = g_build_filename (xed_dirs_get_user_config_dir (), "accels", NULL);
if (filename != NULL)
{
xed_debug_message (DEBUG_APP, "Loading keybindings from %s\n", filename);
gtk_accel_map_load (filename);
g_free (filename);
}
}

static void
load_page_setup (XedApp *app)
{
Expand Down Expand Up @@ -994,8 +995,6 @@ xed_app_init (XedApp *app)
g_application_add_option_group (G_APPLICATION (app), g_irepository_get_option_group ());
#endif

load_accels ();

setup_actions (app);
}

Expand Down