[Xfce4-commits] r30379 - terminal/trunk/terminal

Nick Schermer nick at xfce.org
Wed Jul 22 21:52:06 CEST 2009


Author: nick
Date: 2009-07-22 19:52:06 +0000 (Wed, 22 Jul 2009)
New Revision: 30379

Modified:
   terminal/trunk/terminal/terminal-window.c
Log:
Remove needed check, n_pages can never be 0 here.


Modified: terminal/trunk/terminal/terminal-window.c
===================================================================
--- terminal/trunk/terminal/terminal-window.c	2009-07-22 15:58:17 UTC (rev 30378)
+++ terminal/trunk/terminal/terminal-window.c	2009-07-22 19:52:06 UTC (rev 30379)
@@ -761,9 +761,8 @@
     {
       /* remove merge id */
       gtk_ui_manager_remove_ui (window->ui_manager, window->gomenu_merge_id);
-      window->gomenu_merge_id = 0;
 
-      /* drop all the previous actions from the action group */
+      /* drop all the old accels from the action group */
       for (n = 1; n < 100 /* arbitrary */; n++)
         {
           g_snprintf (name, sizeof (name), "accel-switch-to-tab%d", n);
@@ -775,13 +774,11 @@
         }
     }
 
-  npages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->notebook));
-
   /* create a new merge id */
-  if (G_LIKELY (npages > 0))
-    window->gomenu_merge_id = gtk_ui_manager_new_merge_id (window->ui_manager);
+  window->gomenu_merge_id = gtk_ui_manager_new_merge_id (window->ui_manager);
 
   /* walk the tabs */
+  npages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->notebook));
   for (n = 0; n < npages; n++)
     {
       page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (window->notebook), n);




More information about the Xfce4-commits mailing list