forked from aniani/vim
patch 8.1.0412: cannot build with GTK 2.4
Problem: Cannot build with GTK 2.4. Solution: Add back a few #ifdefs. (Ken Takata, closes #3447) Also support older GTK. (Tom Christensen)
This commit is contained in:
@@ -3415,6 +3415,7 @@ on_select_tab(
|
|||||||
send_tabline_event(idx + 1);
|
send_tabline_event(idx + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# if GTK_CHECK_VERSION(2,10,0)
|
||||||
/*
|
/*
|
||||||
* Handle reordering the tabs (using D&D).
|
* Handle reordering the tabs (using D&D).
|
||||||
*/
|
*/
|
||||||
@@ -3433,6 +3434,7 @@ on_tab_reordered(
|
|||||||
tabpage_move(idx);
|
tabpage_move(idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show or hide the tabline.
|
* Show or hide the tabline.
|
||||||
@@ -3516,9 +3518,11 @@ gui_mch_update_tabline(void)
|
|||||||
page,
|
page,
|
||||||
event_box,
|
event_box,
|
||||||
nr++);
|
nr++);
|
||||||
|
# if GTK_CHECK_VERSION(2,10,0)
|
||||||
gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(gui.tabline),
|
gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(gui.tabline),
|
||||||
page,
|
page,
|
||||||
TRUE);
|
TRUE);
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
event_box = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gui.tabline), page);
|
event_box = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gui.tabline), page);
|
||||||
@@ -3914,13 +3918,17 @@ gui_mch_init(void)
|
|||||||
# endif
|
# endif
|
||||||
gtk_container_add(GTK_CONTAINER(event_box), label);
|
gtk_container_add(GTK_CONTAINER(event_box), label);
|
||||||
gtk_notebook_set_tab_label(GTK_NOTEBOOK(gui.tabline), page, event_box);
|
gtk_notebook_set_tab_label(GTK_NOTEBOOK(gui.tabline), page, event_box);
|
||||||
|
# if GTK_CHECK_VERSION(2,10,0)
|
||||||
gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(gui.tabline), page, TRUE);
|
gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(gui.tabline), page, TRUE);
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
g_signal_connect(G_OBJECT(gui.tabline), "switch-page",
|
g_signal_connect(G_OBJECT(gui.tabline), "switch-page",
|
||||||
G_CALLBACK(on_select_tab), NULL);
|
G_CALLBACK(on_select_tab), NULL);
|
||||||
|
# if GTK_CHECK_VERSION(2,10,0)
|
||||||
g_signal_connect(G_OBJECT(gui.tabline), "page-reordered",
|
g_signal_connect(G_OBJECT(gui.tabline), "page-reordered",
|
||||||
G_CALLBACK(on_tab_reordered), NULL);
|
G_CALLBACK(on_tab_reordered), NULL);
|
||||||
|
# endif
|
||||||
|
|
||||||
/* Create a popup menu for the tab line and connect it. */
|
/* Create a popup menu for the tab line and connect it. */
|
||||||
tabline_menu = create_tabline_menu();
|
tabline_menu = create_tabline_menu();
|
||||||
@@ -6395,7 +6403,11 @@ theend:
|
|||||||
gui_mch_flush(void)
|
gui_mch_flush(void)
|
||||||
{
|
{
|
||||||
if (gui.mainwin != NULL && gtk_widget_get_realized(gui.mainwin))
|
if (gui.mainwin != NULL && gtk_widget_get_realized(gui.mainwin))
|
||||||
|
#if GTK_CHECK_VERSION(2,4,0)
|
||||||
gdk_display_flush(gtk_widget_get_display(gui.mainwin));
|
gdk_display_flush(gtk_widget_get_display(gui.mainwin));
|
||||||
|
#else
|
||||||
|
gdk_display_sync(gtk_widget_get_display(gui.mainwin));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -794,6 +794,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
412,
|
||||||
/**/
|
/**/
|
||||||
411,
|
411,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user