diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/window.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/window.c b/src/window.c index 6ec501a..9ba7f82 100644 --- a/src/window.c +++ b/src/window.c @@ -295,10 +295,15 @@ mq_window_class_init(MqWindowClass *klass) static gboolean accel_close_tab(G_GNUC_UNUSED GtkAccelGroup *accel_group, - G_GNUC_UNUSED GObject *acceleratable, G_GNUC_UNUSED guint keyval, - G_GNUC_UNUSED GdkModifierType modifier, MqNotebook *notebook) + GObject *acceleratable, G_GNUC_UNUSED guint keyval, + G_GNUC_UNUSED GdkModifierType modifier, + G_GNUC_UNUSED gpointer user_data) { - mq_notebook_remove_current_page(notebook); + MqWindow *window; + + window = MQ_WINDOW(acceleratable); + + mq_notebook_remove_current_page(MQ_NOTEBOOK(window->notebook)); return TRUE; } @@ -325,8 +330,7 @@ mq_window_init(MqWindow *window) accel_group = gtk_accel_group_new(); gtk_accel_group_connect(accel_group, GDK_KEY_W, GDK_CONTROL_MASK, 0, - g_cclosure_new(G_CALLBACK(accel_close_tab), window->notebook, - NULL)); + g_cclosure_new(G_CALLBACK(accel_close_tab), NULL, NULL)); gtk_window_add_accel_group(GTK_WINDOW(window), accel_group); } |