[Pidgin] #1332: Convert gtkprefs option menus, as well as protocol and account option menus to combo boxes

Pidgin trac at pidgin.im
Sun May 27 17:27:35 EDT 2007


#1332: Convert gtkprefs option menus, as well as protocol and account option menus
to combo boxes
--------------------------+-------------------------------------------------
 Reporter:  nix_nix       |       Type:  patch
   Status:  new           |   Priority:  minor
Component:  pidgin (gtk)  |    Version:  2.0.1
 Keywords:                |    Pending:  0    
--------------------------+-------------------------------------------------
 In addtion, it also improves the behaviour of the new/edit account dialog.
 Currently, when switching from XMPP to Google Talk, it doesn't add
 "talk.google.com" and "gmail.com" when selecting "Google Talk" and it
 doesn't remove them when selecting "XMPP", because the protocol ID is the
 same, and the dialog does not react to the "changed" event. Some "Google
 Talk default domain hackery" was present already, and copied to 2 places.
 This patch formalizes it as a function call.

 A subtle change is inevitable when moving from GtkOptionMenu to
 GtkComboBox:
 The account and protocol combo boxes have a callback of the form
 void (*) (GtkWidget *, gpointer, gpointer)
 where GtkWidget * is the menu item currently selected. This has no meaning
 in the GtkComboBox context. Now, aside from the above-mentioned (and
 fixed) Google talk hackery, no callback in Pidgin makes use of this value.
 Still, I didn't want to change the prototype for the callback because that
 would probably constitute an ABI change. With this patch, the value of the
 first parameter will always be NULL. There's no good reason to want the
 particular menu item currently selected, since the combo box (or option
 menu) provide the currently selected ''data'' anyway.

 I have lightly tested this patch in the following environment:
   - glib 2.0.7
   - atk 1.0.0
   - pango 1.0.0
   - gtk+ 2.0.0

-- 
Ticket URL: <http://developer.pidgin.im/ticket/1332>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list