GNOME Bugzilla – Bug 160807
Use GTK+ 2.5/2.6 features in Totem
Last modified: 2006-09-04 21:02:05 UTC
This is a checklist of what needs to be done to port Totem to GTK+ 2.6 and associated libraries: - Use gtk+ about box - Use new HIG dialogs - Skim out the DND code using gtk_drag_source_add_uri_targets - Use the GKeyFile .ini style parser for the .pls file parser - Use GOption for arguments parsing - Use GTK_STOCK_MEDIA_* stock icons Feel free to add more to this bug.
- Use GtkLabel's ellipsising instead of our own widget (gtk_label_set_ellipsize())
- Use focus stealing prevention: http://mail.gnome.org/archives/desktop-devel-list/2004-December/msg00306.html
2005-01-03 Bastien Nocera <hadess@hadess.net> * configure.in: * src/Makefile.am: * src/rb-ellipsizing-label.c: * src/rb-ellipsizing-label.h: * src/totem.c: (update_mrl_label), (on_about1_activate), (totem_callback_connect), (label_create): Require GTK+ 2.6, convert the about box, and the ellipsising labels (Helps: #160807)
Here is an item to add to your list. - Migrate from GtkOptionMenu to GtkComboBox
We won't be able to port the .pls parser to GKeyFile because of bug 63029 and bug 63030. We'll see whether they can be fixed.
2005-01-05 Bastien Nocera <hadess@hadess.net> * data/totem.glade: * src/totem-preferences.c: (totem_prefs_set_show_visuals), (connection_combobox_changed), (visual_menu_changed), (visual_quality_menu_changed), (audio_out_menu_changed), (totem_setup_preferences): Migrate the Option Menus in the preferences dialog to Combo Boxes (Helps: #160807) (CANT) - Skim out the DND code using gtk_drag_source_add_uri_targets (there's no special support for _NETSCAPE_URL which we support) (CANT) - Use the GKeyFile .ini style parser for the .pls file parser (the groups and keys are case-sensitive) (DONE) - Use GTK_STOCK_MEDIA_* stock icons (DONE) - Use GtkLabel's ellipsising instead of our own widget (gtk_label_set_ellipsize()) (DONE) - Use gtk+ about box (DONE) - Migrate from GtkOptionMenu to GtkComboBox (TODO) - Use new HIG dialogs (TODO) - Use GOption for arguments parsing
Created attachment 35521 [details] [review] Proposed patch. The recent change from Option Menus to Combo Boxes broke their mnemonics. This patch fixes the problem. Thanks!
Yeah, they were broken. Patch committed, thanks.
Danilo, are entries in combo boxes supposed to be marked for translation this way (all in one message)? I vaguely remember some problems with this in the past, where the contents of the combo boxes would end up untranslated if their contents had been marked for translation all in one message, but I'm not sure about it.
Christian, this is the way glade does it...
Bastien: Please use gtk_combo_box_append_text for each line in the construction code instead of putting this info directly into glade. If you aren't lazy enough (who isn't?), you could even use a custom tree model for the combo box and use gtk_combo_box_get_active_iter instead of gtk_combo_box_get_active for getting the current entry, comparing the value of a enum'ed column against some enum { FIRST_ENTRY, 2ND_ENTRY, ..., N_TH_ENTRY }; Christian: Please file a bug report against glade if it doesn't already exist. Probably they use something like g_strsplit (compound_string, "\n"), which really sucks translation-wise.
Ok, added bug 163292.
Created attachment 35803 [details] [review] HIG dialogs patch
I've looked at the focus stealing prevention, and it looks like Totem is a good citizen, with the error dialogs only shown following a user interaction. The only thing left is using GOption instead of popt. We're going to wait for GStreamer to use GOption before we switch all the apps to it.
gtk_list_store_insert_with_values() looks fast: http://developer.gnome.org/doc/API/2.0/gtk/GtkListStore.html#gtk-list-store-insert-with-values
We need to use gnome_vfs_read_entire_file instead of our own version in the totem-playlist-parser.
This bug depends on bug 338954 for the popt -> GOption migration part. I don't have rights to change the dependencies, though.
As there is only the GOption migration left, and bug 338954 already includes it, closing this.