Mercurial > vim
comparison src/gui_gtk_x11.c @ 782:d20041a02ee5
updated for version 7.0228
author | vimboss |
---|---|
date | Sat, 18 Mar 2006 21:40:56 +0000 |
parents | 0f9f4761ad9c |
children | 98a88a884610 |
comparison
equal
deleted
inserted
replaced
781:afa9ef8a18a1 | 782:d20041a02ee5 |
---|---|
2882 # endif | 2882 # endif |
2883 # ifdef FEAT_TOOLBAR | 2883 # ifdef FEAT_TOOLBAR |
2884 width += get_item_dimensions(gui.toolbar, GTK_ORIENTATION_VERTICAL); | 2884 width += get_item_dimensions(gui.toolbar, GTK_ORIENTATION_VERTICAL); |
2885 # endif | 2885 # endif |
2886 # ifdef FEAT_GUI_TABLINE | 2886 # ifdef FEAT_GUI_TABLINE |
2887 width += get_item_dimensions(gui.tabline, GTK_ORIENTATION_VERTICAL); | 2887 if (gui.tabline != NULL) |
2888 width += get_item_dimensions(gui.tabline, GTK_ORIENTATION_VERTICAL); | |
2888 # endif | 2889 # endif |
2889 #endif | 2890 #endif |
2890 | 2891 |
2891 return width; | 2892 return width; |
2892 } | 2893 } |
2901 #endif | 2902 #endif |
2902 #ifdef FEAT_TOOLBAR | 2903 #ifdef FEAT_TOOLBAR |
2903 height += get_item_dimensions(gui.toolbar, GTK_ORIENTATION_HORIZONTAL); | 2904 height += get_item_dimensions(gui.toolbar, GTK_ORIENTATION_HORIZONTAL); |
2904 #endif | 2905 #endif |
2905 #ifdef FEAT_GUI_TABLINE | 2906 #ifdef FEAT_GUI_TABLINE |
2906 height += get_item_dimensions(gui.tabline, GTK_ORIENTATION_HORIZONTAL); | 2907 if (gui.tabline != NULL) |
2908 height += get_item_dimensions(gui.tabline, GTK_ORIENTATION_HORIZONTAL); | |
2907 #endif | 2909 #endif |
2908 | 2910 |
2909 return height; | 2911 return height; |
2910 } | 2912 } |
2911 | 2913 |
3576 gtk_box_pack_start(GTK_BOX(vbox), gui.toolbar, FALSE, FALSE, 0); | 3578 gtk_box_pack_start(GTK_BOX(vbox), gui.toolbar, FALSE, FALSE, 0); |
3577 } | 3579 } |
3578 #endif /* FEAT_TOOLBAR */ | 3580 #endif /* FEAT_TOOLBAR */ |
3579 | 3581 |
3580 #ifdef FEAT_GUI_TABLINE | 3582 #ifdef FEAT_GUI_TABLINE |
3581 /* Use a Notebook for the tab pages labels. The labels are hidden by | 3583 /* |
3582 * default. */ | 3584 * Use a Notebook for the tab pages labels. The labels are hidden by |
3583 gui.tabline = gtk_notebook_new(); | 3585 * default. |
3584 gtk_widget_show(gui.tabline); | 3586 * TODO: currently doesn't work for Gnome. |
3585 gtk_box_pack_start(GTK_BOX(vbox), gui.tabline, FALSE, FALSE, 0); | 3587 */ |
3586 gtk_notebook_set_show_border(GTK_NOTEBOOK(gui.tabline), FALSE); | 3588 if (!using_gnome) |
3587 gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), FALSE); | 3589 { |
3588 | 3590 gui.tabline = gtk_notebook_new(); |
3589 { | 3591 gtk_widget_show(gui.tabline); |
3590 GtkWidget *page, *label; | 3592 gtk_box_pack_start(GTK_BOX(vbox), gui.tabline, FALSE, FALSE, 0); |
3591 | 3593 gtk_notebook_set_show_border(GTK_NOTEBOOK(gui.tabline), FALSE); |
3592 /* Add the first tab. */ | 3594 gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), FALSE); |
3593 page = gtk_vbox_new(FALSE, 0); | 3595 |
3594 gtk_widget_show(page); | 3596 { |
3595 gtk_container_add(GTK_CONTAINER(gui.tabline), page); | 3597 GtkWidget *page, *label; |
3596 label = gtk_label_new("-Empty-"); | 3598 |
3597 gtk_widget_show(label); | 3599 /* Add the first tab. */ |
3598 gtk_notebook_set_tab_label(GTK_NOTEBOOK(gui.tabline), page, label); | 3600 page = gtk_vbox_new(FALSE, 0); |
3599 } | 3601 gtk_widget_show(page); |
3600 gtk_signal_connect(GTK_OBJECT(gui.tabline), "switch_page", | 3602 gtk_container_add(GTK_CONTAINER(gui.tabline), page); |
3601 GTK_SIGNAL_FUNC(on_select_tab), NULL); | 3603 label = gtk_label_new("-Empty-"); |
3602 | 3604 gtk_widget_show(label); |
3603 /* Create a popup menu for the tab line and connect it. */ | 3605 gtk_notebook_set_tab_label(GTK_NOTEBOOK(gui.tabline), page, label); |
3604 tabline_menu = create_tabline_menu(); | 3606 } |
3605 gtk_signal_connect_object(GTK_OBJECT(gui.tabline), "button_press_event", | 3607 gtk_signal_connect(GTK_OBJECT(gui.tabline), "switch_page", |
3608 GTK_SIGNAL_FUNC(on_select_tab), NULL); | |
3609 | |
3610 /* Create a popup menu for the tab line and connect it. */ | |
3611 tabline_menu = create_tabline_menu(); | |
3612 gtk_signal_connect_object(GTK_OBJECT(gui.tabline), "button_press_event", | |
3606 GTK_SIGNAL_FUNC(on_tabline_menu), GTK_OBJECT(tabline_menu)); | 3613 GTK_SIGNAL_FUNC(on_tabline_menu), GTK_OBJECT(tabline_menu)); |
3614 } | |
3607 #endif | 3615 #endif |
3608 | 3616 |
3609 gui.formwin = gtk_form_new(); | 3617 gui.formwin = gtk_form_new(); |
3610 gtk_container_border_width(GTK_CONTAINER(gui.formwin), 0); | 3618 gtk_container_border_width(GTK_CONTAINER(gui.formwin), 0); |
3611 gtk_widget_set_events(gui.formwin, GDK_EXPOSURE_MASK); | 3619 gtk_widget_set_events(gui.formwin, GDK_EXPOSURE_MASK); |