Bug 135824

Summary: new libbonoboui breaks pack-end for toolbars (throbber in nautilus)
Product: [Fedora] Fedora Reporter: Alexander Larsson <alexl>
Component: libbonobouiAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: barryn, mclasen, mpg
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-11 21:32:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexander Larsson 2004-10-15 09:43:22 UTC
The latest version of libbonoboui breaks the behaviour of pack-end in
toolbars. This makes the throbber in nautilus not be on the end of the
toolbar.

It seems this change:
2004-09-25  Federico Mena Quintero  <federico>

	* Merged the fixes from the toolbar-rework branch.

Is causing this breakage.

Looking at the diff is a bit scary. It contains this part:

@@ -89,13 +87,20 @@ impl_bonobo_ui_sync_toolbar_state (Bonob
 		behavior_array = g_strsplit (behavior, ",", -1);
 		bonobo_ui_node_free_string (behavior);
 
-		bonobo_ui_toolbar_item_set_expandable (
-			BONOBO_UI_TOOLBAR_ITEM (widget),
-			string_array_contains (behavior_array, "expandable"));
-
-		bonobo_ui_toolbar_item_set_pack_end (
-			BONOBO_UI_TOOLBAR_ITEM (widget),
-			string_array_contains (behavior_array, "pack-end"));
+		if (GTK_IS_TOOL_ITEM (widget)) {
+			gtk_tool_item_set_expand
+				(GTK_TOOL_ITEM (widget),
+				 string_array_contains (behavior_array, "expandable"));
+#warning 'Pack End' behavior !?
+		} else {
+			bonobo_ui_toolbar_item_set_expandable
+				(BONOBO_UI_TOOLBAR_ITEM (widget),
+				 string_array_contains (behavior_array, "expandable"));
+
+			bonobo_ui_toolbar_item_set_pack_end
+				(BONOBO_UI_TOOLBAR_ITEM (widget),
+				 string_array_contains (behavior_array, "pack-end"));
+		}
 
 		g_strfreev (behavior_array);
 	}


Check out that #warning.

Comment 1 Marco Pesenti Gritti 2004-10-15 18:47:37 UTC
The only clean, 100% working way I could find to fix this is to add a
type="hidden" attribute for separators in libbonoboui.

if (type && !strcmp (type, "hidden"))
{
  gtk_separator_tool_item_set_draw
           (GTK_SEPARATOR_TOOL_ITEM (tool_item), FALSE);
}

Then we can add this to nautilus, before the throbber:

<separator type="hidden" behavior="expandable"/>

This would mirror the semantic of the gtk API. I guess pack-end could
then be deprecated in libbonoboui.

There are other two solutions that does not involve libbonoboui
changes but they both dont work 100% well.

1 Add a "" label before the spinner and set_expand this. The issue is
that you will get an empty item in the toolbar drop down menu.

2 Expand the spinner itself and modify expose to draw it aligned on
the right. The issue here is that for some reason I dont understand
sometimes I get a black flash in the expanded widget when it's
displayed for the first time. Unfortunately it doesnt seem like
spinner widget fault because putting a button in the spinner control
give the same result. I guess bonobo control is to blame here...


Comment 2 Marco Pesenti Gritti 2004-10-15 19:44:59 UTC
I did put together a quick patch to debonobize the throbber and I cant
indeed reproduce anymore the issue with approach 2. So it seem like a
bonobo out-of-process controls issue.

Comment 3 Marco Pesenti Gritti 2004-10-15 23:55:03 UTC
Another possibility would be to put an expanded separator before
pack_end widgets. That would work for nautilus but screw pack_end
semantic.

Anyway, I'll try to get feedback from Michael and Federico on how the
issue could be fixed at libbonoboui level in the weekend. Then it will
be easier to make a call.

Comment 4 Ray Strode [halfline] 2005-05-11 21:32:29 UTC
Hi,

This bug is being closed because it has been in the NEEDINFO state for a long
time now.  Feel free to reopen the bug report if the problem still happens for
you and you can provide any information that was requested.