summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2018-10-05 08:17:44 (EDT)
committer P. J. McDermott <pj@pehjota.net>2018-10-05 08:17:44 (EDT)
commit8bc4f1fcfda2f7fd767d7e321025b62b5e9817af (patch)
tree71f0e41a8e55629cb9f61cd7a45d35ec1e4acc75 /src
parentf2fca78034485e9d52ebd9df64657a78c8470d22 (diff)
downloadmarquee-8bc4f1fcfda2f7fd767d7e321025b62b5e9817af.zip
marquee-8bc4f1fcfda2f7fd767d7e321025b62b5e9817af.tar.gz
marquee-8bc4f1fcfda2f7fd767d7e321025b62b5e9817af.tar.bz2
MqWindow: Use acceleratable, not user data, in accel closure
Diffstat (limited to 'src')
-rw-r--r--src/window.c14
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);
}