[gedit/wip/tabs] Remove menu



commit 5b0eb3de4cd8ec3fd03c55562140c96c15b81257
Author: Ignacio Casal Quinteiro <ignacio casal nice-software com>
Date:   Thu Jul 11 15:26:12 2013 +0200

    Remove menu

 gedit/gedit-notebook.c |   27 ---------------------------
 1 files changed, 0 insertions(+), 27 deletions(-)
---
diff --git a/gedit/gedit-notebook.c b/gedit/gedit-notebook.c
index 57e5efe..47e5ea1 100644
--- a/gedit/gedit-notebook.c
+++ b/gedit/gedit-notebook.c
@@ -431,19 +431,11 @@ gedit_notebook_page_removed (GtkNotebook *notebook,
 
        num_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (nb));
 
-       g_menu_remove (nb->priv->documents_menu, page_num);
-
        if (num_pages > 0)
        {
                /* If there is no tabs, calling this is pointless */
                update_tabs_visibility (nb, FALSE);
        }
-       else
-       {
-               /* Unset the menu model from the button to make it insensitive */
-               gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (nb->priv->documents_button),
-                                               NULL);
-       }
 }
 
 static void
@@ -453,9 +445,6 @@ gedit_notebook_page_added (GtkNotebook *notebook,
 {
        GeditNotebook *nb = GEDIT_NOTEBOOK (notebook);
        GtkWidget *tab_label;
-       GMenuItem *menuitem;
-       gchar *tab_name;
-       gchar *name;
 
        tab_label = get_tab_label (GEDIT_TAB (page));
 
@@ -470,22 +459,6 @@ gedit_notebook_page_added (GtkNotebook *notebook,
                          nb);
 
        update_tabs_visibility (GEDIT_NOTEBOOK (notebook), FALSE);
-
-       /* Add menuitem to documents menu */
-       tab_name = _gedit_tab_get_name (GEDIT_TAB (page));
-       name = gedit_utils_escape_underscores (tab_name, -1);
-       g_free (tab_name);
-
-       menuitem = g_menu_item_new (name, NULL);
-       g_free (name);
-
-       g_menu_insert_item (nb->priv->documents_menu, page_num, menuitem);
-
-       if (!gtk_menu_button_get_menu_model (GTK_MENU_BUTTON (nb->priv->documents_button)))
-       {
-               gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (nb->priv->documents_button),
-                                               G_MENU_MODEL (nb->priv->documents_menu));
-       }
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]