Move notebook motion event setup to notebook_init

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@683 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2006-08-08 10:52:36 +00:00
parent 58af613d59
commit badd2b7fd7

View File

@ -75,6 +75,7 @@ void notebook_init()
if (gtk_check_version(2, 8, 0) != NULL) //null means version ok
{
// workaround GTK+2.6 drag start bug when over sci widget:
gtk_widget_add_events(app->notebook, GDK_POINTER_MOTION_MASK);
g_signal_connect(G_OBJECT(notebook), "motion-notify-event",
G_CALLBACK(notebook_motion_notify_event_cb), NULL);
}
@ -249,15 +250,6 @@ gint notebook_new_tab(gint doc_idx, gchar *title, GtkWidget *page)
// signal for clicking the tab-close button
g_signal_connect(G_OBJECT(but), "clicked",
G_CALLBACK(notebook_tab_close_clicked_cb), page);
// motion notify for GTK+2.6 (workaround child widgets don't pass on signal)
#if ! GTK_CHECK_VERSION(2, 8, 0)
if (gtk_check_version(2, 8, 0) != NULL) //null means version ok
{
gtk_widget_add_events(app->notebook, GDK_POINTER_MOTION_MASK);
g_signal_connect(G_OBJECT(app->notebook), "motion-notify-event",
G_CALLBACK(notebook_motion_notify_event_cb), NULL);
}
#endif
return tabnum;
}