Use tab reorder workaround only if GTK runtime <2.8

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@615 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2006-07-24 17:30:08 +00:00
parent c45b6c6b24
commit c67bd70d53
2 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,7 @@
2006-07-24 Nick Treleaven <nick.treleaven@btinternet.com>
* src/geany.h: Use generic font names & increase the default size.
* src/notebook.c: Use tab reorder workaround only if GTK runtime <2.8.
2006-07-23 Enrico Tröger <enrico.troeger@uvena.de>

View File

@ -71,9 +71,13 @@ void notebook_init()
G_CALLBACK(notebook_drag_motion_cb), NULL);
#if ! GTK_CHECK_VERSION(2, 8, 0)
// workaround GTK+2.6 drag start bug when over sci widget:
g_signal_connect(G_OBJECT(notebook), "motion-notify-event",
G_CALLBACK(notebook_motion_notify_event_cb), NULL);
// handle higher gtk+ runtime than build environment
if (gtk_check_version(2, 8, 0) != NULL) //null means version ok
{
// workaround GTK+2.6 drag start bug when over sci widget:
g_signal_connect(G_OBJECT(notebook), "motion-notify-event",
G_CALLBACK(notebook_motion_notify_event_cb), NULL);
}
#endif
// set up drag motion for moving notebook pages
@ -96,7 +100,6 @@ notebook_motion_notify_event_cb(GtkWidget *widget, GdkEventMotion *event,
GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(app->notebook),
gtk_notebook_get_current_page(GTK_NOTEBOOK(app->notebook)));
//g_print("%g, %g; %p (%p)\n", event->x, event->y, event->window, page->window);
if (page == NULL || event->x < 0 || event->y < 0) return FALSE;
if (event->window == page->window) //cursor over sci widget