diff options
author | David King <davidk@gnome.org> | 2014-04-07 12:57:31 +0100 |
---|---|---|
committer | David King <davidk@gnome.org> | 2014-04-07 12:57:31 +0100 |
commit | afc6f482818c71a1d65f7b84dfecb016adaa98a1 (patch) | |
tree | 56d9406f49af4519aee2c34821ac151061ef8d25 /src/gl-application.c | |
parent | 884d1bb2e31a30120e73d3e1c2fd285c730e104c (diff) | |
download | gnome-logs-afc6f482818c71a1d65f7b84dfecb016adaa98a1.tar.gz |
Avoid deprecated gtk_application_add_accelerator()
Use gtk_application_set_accels_for_action() instead.
Diffstat (limited to 'src/gl-application.c')
-rw-r--r-- | src/gl-application.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gl-application.c b/src/gl-application.c index 5c15cfd..0d3fcde 100644 --- a/src/gl-application.c +++ b/src/gl-application.c @@ -202,13 +202,15 @@ gl_application_activate (GApplication *application) { GtkWidget *window; GlApplicationPrivate *priv; + const gchar * const close_accel[] = { "<Primary>w", NULL }; + const gchar * const search_accel[] = { "<Primary>f", NULL }; window = gl_window_new (GTK_APPLICATION (application)); gtk_widget_show (window); - gtk_application_add_accelerator (GTK_APPLICATION (application), - "<Primary>w", "win.close", NULL); - gtk_application_add_accelerator (GTK_APPLICATION (application), - "<Primary>f", "win.search", NULL); + gtk_application_set_accels_for_action (GTK_APPLICATION (application), + "win.close", close_accel); + gtk_application_set_accels_for_action (GTK_APPLICATION (application), + "win.search", search_accel); priv = gl_application_get_instance_private (GL_APPLICATION (application)); |