Patch 7.3.1289
Problem:    Get GLIB warning when removing a menu item.
Solution:   Reference menu-id and also call gtk_container_remove().  (Ivan
            Krasilnikov)
Files:      src/gui_gtk.c


*** ../vim-7.3.1288/src/gui_gtk.c       2012-10-18 05:18:27.000000000 +0200
--- src/gui_gtk.c       2013-07-03 11:49:42.000000000 +0200
***************
*** 613,618 ****
--- 613,629 ----
      void
  gui_mch_destroy_menu(vimmenu_T *menu)
  {
+     /* Don't let gtk_container_remove automatically destroy menu->id. */
+     if (menu->id != NULL)
+       g_object_ref(menu->id);
+ 
+     /* Workaround for a spurious gtk warning in Ubuntu: "Trying to remove
+      * a child that doesn't believe we're it's parent."
+      * Remove widget from gui.menubar before destroying it. */
+     if (menu->id != NULL && gui.menubar != NULL
+                           && gtk_widget_get_parent(menu->id) == gui.menubar)
+       gtk_container_remove(GTK_CONTAINER(gui.menubar), menu->id);
+ 
  # ifdef FEAT_TOOLBAR
      if (menu->parent != NULL && menu_is_toolbar(menu->parent->name))
      {
***************
*** 632,637 ****
--- 643,650 ----
            gtk_widget_destroy(menu->id);
      }
  
+     if (menu->id != NULL)
+       g_object_unref(menu->id);
      menu->submenu_id = NULL;
      menu->id = NULL;
  }
*** ../vim-7.3.1288/src/version.c       2013-07-03 12:45:25.000000000 +0200
--- src/version.c       2013-07-03 13:03:54.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
  {   /* Add new patch number below this line */
+ /**/
+     1289,
  /**/

-- 
   [SIR LAUNCELOT runs back up the stairs, grabs a rope
   of the wall and swings out over the heads of the CROWD in a
   swashbuckling manner towards a large window.  He stops just short
   of the window and is left swing pathetically back and forth.]
LAUNCELOT: Excuse me ... could somebody give me a push ...
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui