summaryrefslogtreecommitdiffstats
path: root/src/gui_gtk_x11.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-02-27 00:11:10 +0000
committerBram Moolenaar <Bram@vim.org>2006-02-27 00:11:10 +0000
commiteddf53b02e2b007208b19c74fb616be2c0839b36 (patch)
treeb7b2bdc89dcd35bf68f4f7a5801152cc9424b8dd /src/gui_gtk_x11.c
parenta23ccb8ac6c470d72eb3d081625926965d3a9f52 (diff)
updated for version 7.0208v7.0208
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r--src/gui_gtk_x11.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 2bf3799825..8e66d33ee0 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -3087,25 +3087,6 @@ tabline_menu_handler(GtkMenuItem *item, gpointer user_data)
}
/*
- * Send the event for clicking to select tab page "nr".
- */
- static void
-send_tabline_event(int nr)
-{
- char_u string[3];
-
- string[0] = CSI;
- string[1] = KS_TABLINE;
- string[2] = KE_FILLER;
- add_to_input_buf(string, 3);
- string[0] = nr;
- add_to_input_buf_csi(string, 1);
-
- if (gtk_main_level() > 0)
- gtk_main_quit();
-}
-
-/*
* Create a menu for the tab line.
*/
static GtkWidget *
@@ -3178,8 +3159,11 @@ on_tabline_menu(GtkWidget *widget, GdkEvent *event)
return TRUE;
}
else if (bevent->button == 1 && clicked_page == 0)
+ {
/* Click after all tabs moves to next tab page. */
- send_tabline_event(0);
+ if (send_tabline_event(0) && gtk_main_level() > 0)
+ gtk_main_quit();
+ }
}
/* We didn't handle the event. */
return FALSE;
@@ -3197,7 +3181,10 @@ on_select_tab(
gpointer data)
{
if (!ignore_tabline_evt)
- send_tabline_event(index + 1);
+ {
+ if (send_tabline_event(index + 1) && gtk_main_level() > 0)
+ gtk_main_quit();
+ }
}
/*