Re: The Table menu patch; another try



On Sat, 2003-09-06 at 10:15, Kristian Rietveld wrote:

> Let me know when I can put this in HEAD. The sooner, the better of
> course, so I can work on getting the ComboBox in.

Noticed a few things in a quick glance - I think if we get these
fixed, it should be OK to go in.

Regards,
						Owen
===
@@ -198,7 +244,7 @@ gtk_menu_get_private (GtkMenu *menu)
       private->have_position = FALSE;
       
       g_object_set_qdata_full (G_OBJECT (menu), private_quark,
-			       private, g_free);
+			       private, gtk_menu_free_private);
     }
 
   return private;
===

OK, I guess we'll just switch this to IPD whenever we do a 
major pass over all of GTK+.

===
+  priv->columns = MAX (priv->columns, ai->right_attach);
+  priv->rows = MAX (priv->rows, ai->bottom_attach);
+
+  gtk_widget_queue_draw (GTK_WIDGET (menu));
+}
===

Needs to be queue_resize()

===
+  ai = g_object_get_data (G_OBJECT (widget), ATTACH_INFO_KEY);
+  if (ai)
+    {
+      g_free (ai);
+      g_object_set_data (G_OBJECT (widget), ATTACH_INFO_KEY, NULL);
+    }
===

Might be easier to use g_free() as the GDestroyNotify and just
set it to NULL unconditionally (avoids having to get it, check if 
it's not NULL, etc.)

===
 -  return FALSE;
+  /* this is not going to work if we didn't request size yet ... */
+  if (!priv->heights)
+    return FALSE;
===

Maybe I missed your response to the comment I made here
last time?

===
@@ -2978,6 +3250,7 @@ gtk_menu_scroll_item_visible (GtkMenuShe
 			      GtkWidget       *menu_item)
 {
   GtkMenu *menu;
+  GtkMenuPrivate *priv;
   gint child_offset, child_height;
   gint width, height;
   gint y;
@@ -2985,6 +3258,7 @@ gtk_menu_scroll_item_visible (GtkMenuShe
   gboolean last_child = 0;
   
   menu = GTK_MENU (menu_shell);
+  priv = gtk_menu_get_private (menu);
 
   /* We need to check if the selected item fully visible.
    * If not we need to scroll the menu so that it becomes fully
===

Looks like an unused addition.







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