After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 322567 - GtkOptionMenu should be replaced by GtkComboBox
GtkOptionMenu should be replaced by GtkComboBox
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File Properties Dialog
0.x.x [obsolete]
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks: 322539
 
 
Reported: 2005-11-27 15:28 UTC by Jaap A. Haitsma
Modified: 2005-12-12 09:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (17.93 KB, patch)
2005-11-27 15:41 UTC, Jaap A. Haitsma
needs-work Details | Review
Patch for last instance in nautilus where optionmenu was used (6.59 KB, patch)
2005-12-03 18:44 UTC, Jaap A. Haitsma
committed Details | Review
Patch updated according to Alex his comments (15.68 KB, patch)
2005-12-10 16:17 UTC, Jaap A. Haitsma
none Details | Review

Description Jaap A. Haitsma 2005-11-27 15:28:40 UTC
Patch coming up
Comment 1 Jaap A. Haitsma 2005-11-27 15:41:12 UTC
Created attachment 55279 [details] [review]
Patch

* Changes GtkOptionMenu to GtkComboBox
* Also gives GDK_WINDOW_TYPE_HINT_DIALOG to the dialog

There's one wacky thing in my patch. In synch_[group|user]_combo_box the
contents of the combo_box need to be cleared. 
<snip>
+	/* Clear the contents of ComboBox in a wacky way because there
+	 * is no function to clear all items and also no function to obtain
+	 * the number of items in a combobox.
+	 */
+	model = gtk_combo_box_get_model (combo_box);
+	g_return_if_fail (GTK_IS_LIST_STORE (model));
+	store = GTK_LIST_STORE (model);
+	gtk_list_store_clear (store);
</snip>

I don't see a better way to do this. Maybe somebody else does?

IMO a clear function and a function to get the number of elements in a combobox
are handy. Should I write a patch for GtkComboBox??

This patch also fixes bug 322539
Comment 2 Jaap A. Haitsma 2005-12-03 18:44:41 UTC
Created attachment 55586 [details] [review]
Patch for last instance in nautilus where optionmenu was used

This patch also changes the optionmenu used in the browser window
Comment 3 Alexander Larsson 2005-12-08 16:59:13 UTC
I started looking at the first patch. I think it needs to ref the file to make
sure it doesn't go away. This used to be done in the FileNamePair, but isn't
done now.
Comment 4 Alexander Larsson 2005-12-09 10:11:00 UTC
I commited the second patch. Review comments for first patch at:
http://mail.gnome.org/archives/nautilus-list/2005-December/msg00024.html
Comment 5 Jaap A. Haitsma 2005-12-10 16:17:12 UTC
Created attachment 55842 [details] [review]
Patch updated according to Alex his comments
Comment 6 Alexander Larsson 2005-12-12 09:28:24 UTC
Commited.