//set the cursor to be X shape, indicating that the computer is busy in doing its job
new = gdk_cursor_new(GDK_X_CURSOR);
- widget = lookup_widget(mw_data->mwindow, "MToolbar2");
+ widget = lookup_widget(mw_data->mwindow, "MToolbar1");
win = gtk_widget_get_parent_window(widget);
gdk_window_set_cursor(win, new);
gdk_cursor_unref(new);
on_close_tab_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
+ GList * list;
int count = 0;
GtkWidget * notebook;
Tab * tmp;
}
gtk_notebook_remove_page((GtkNotebook*)notebook, count);
+ list = gtk_container_get_children(GTK_CONTAINER(notebook));
+ if(g_list_length(list)==1)
+ gtk_notebook_set_show_tabs((GtkNotebook*)notebook, FALSE);
}
tmp = g_hash_table_lookup(mw->hash_toolbar_item, g_strdup(toolbar_item->tooltip));
if(tmp)continue;
constructor = toolbar_item->con;
- tool_menu_title_menu = lookup_widget(mw->mwindow,"MToolbar2");
+ tool_menu_title_menu = lookup_widget(mw->mwindow,"MToolbar1");
pixbuf = gdk_pixbuf_new_from_xpm_data ((const char**)toolbar_item->pixmap);
pixmap = gtk_image_new_from_pixbuf(pixbuf);
insert_view = gtk_toolbar_append_element (GTK_TOOLBAR (tool_menu_title_menu),
gtk_notebook_append_page(notebook, (GtkWidget*)tmp_tab->multi_vpaned, tmp_tab->label);
list = gtk_container_get_children(GTK_CONTAINER(notebook));
gtk_notebook_set_current_page(notebook,g_list_length(list)-1);
+ if(g_list_length(list)>1)
+ gtk_notebook_set_show_tabs(notebook, TRUE);
}
GtkWidget * tool_menu_title_menu, *insert_view;
- tool_menu_title_menu = lookup_widget(mw->mwindow,"MToolbar2");
+ tool_menu_title_menu = lookup_widget(mw->mwindow,"MToolbar1");
insert_view = (GtkWidget*)g_hash_table_lookup(mw->hash_toolbar_item,
toolbar_item->tooltip);
if(insert_view){
MWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_set_size_request (MWindow, 100, 50);
- gtk_window_set_title (GTK_WINDOW (MWindow), "Main window");
+ gtk_window_set_title (GTK_WINDOW (MWindow), "LTT");
gtk_window_set_default_size (GTK_WINDOW (MWindow), 600, 400);
MVbox = gtk_vbox_new (FALSE, 0);
gtk_widget_show (tlbRemoveViewer);
gtk_container_set_border_width (GTK_CONTAINER (tlbRemoveViewer), 1);
- MToolbar2 = gtk_toolbar_new ();
- gtk_widget_show (MToolbar2);
- gtk_box_pack_start (GTK_BOX (MVbox), MToolbar2, FALSE, FALSE, 0);
- gtk_toolbar_set_style (GTK_TOOLBAR (MToolbar2), GTK_TOOLBAR_ICONS);
+ gtk_toolbar_append_space (GTK_TOOLBAR (MToolbar1));
+
+ // MToolbar2 = gtk_toolbar_new ();
+ // gtk_widget_show (MToolbar2);
+ // gtk_box_pack_start (GTK_BOX (MVbox), MToolbar2, FALSE, FALSE, 0);
+ // gtk_toolbar_set_style (GTK_TOOLBAR (MToolbar2), GTK_TOOLBAR_ICONS);
MNotebook = gtk_notebook_new ();
gtk_widget_show (MNotebook);
+ gtk_notebook_set_show_tabs((GtkNotebook*)MNotebook, FALSE);
gtk_box_pack_start (GTK_BOX (MVbox), MNotebook, TRUE, TRUE, 0);
/*
empty_notebook_page = gtk_vbox_new (FALSE, 0);