From: yangxx Date: Tue, 10 Feb 2004 20:04:35 +0000 (+0000) Subject: git-svn-id: http://ltt.polymtl.ca/svn@489 04897980-b3bd-0310-b5e0-8ef037075253 X-Git-Tag: v0.12.20~3000 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=efde9138bd61f0ce9cabb3f2dcc0d0040eaf35ed;p=lttv.git git-svn-id: ltt.polymtl.ca/svn@489 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c index 240aab4c..8b537cc6 100644 --- a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c @@ -386,7 +386,7 @@ void redraw_viewer(MainWindow * mw_data, TimeWindow * time_window) //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); @@ -818,6 +818,7 @@ void on_close_tab_activate (GtkMenuItem *menuitem, gpointer user_data) { + GList * list; int count = 0; GtkWidget * notebook; Tab * tmp; @@ -842,6 +843,9 @@ on_close_tab_activate (GtkMenuItem *menuitem, } 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); } @@ -1736,7 +1740,7 @@ void insert_menu_toolbar_item(MainWindow * mw, gpointer user_data) 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), @@ -1963,6 +1967,8 @@ void * create_tab(MainWindow * parent, MainWindow* current_window, 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); } @@ -1992,7 +1998,7 @@ void remove_toolbar_item(gpointer main_win, gpointer user_data) 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){ diff --git a/ltt/branches/poly/lttv/modules/gui/main/src/interface.c b/ltt/branches/poly/lttv/modules/gui/main/src/interface.c index 0011cda7..9c2e3f5f 100644 --- a/ltt/branches/poly/lttv/modules/gui/main/src/interface.c +++ b/ltt/branches/poly/lttv/modules/gui/main/src/interface.c @@ -138,7 +138,7 @@ create_MWindow (void) 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); @@ -566,13 +566,16 @@ create_MWindow (void) 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);