[Pidgin] #4558: Code reduction in gtk{account, blist, prefs, privacy, roomlist, savedstatuses}.c

Pidgin trac at pidgin.im
Thu Jan 3 17:59:07 EST 2008


#4558: Code reduction in gtk{account,blist,prefs,privacy,roomlist,savedstatuses}.c
--------------------------+-------------------------------------------------
 Reporter:  nix_nix       |       Type:  patch
   Status:  new           |   Priority:  minor
Component:  pidgin (gtk)  |    Version:  2.3.1
 Keywords:                |    Pending:  0    
--------------------------+-------------------------------------------------
 Hi!

 Inspired by the code reductions in #3553, I have decided to create a
 gtkutils.c API for adding a labelled widget to a vbox. The reason for this
 is that the sequence of

 {{{
 hbox = gtk_hbox_new();

 gtk_box_pack_start(vbox, hbox);

 label = gtk_label_new();

 gtk_box_pack_start(hbox, label);

 widget = gtk_{entry,option_menu,spin_button}_new();

 gtk_box_pack_start(hbox, widget);

 make_label_mnemonics_work(label, widget);
 }}}

 was repeated way to often in all the files mentioned in the summary. In
 addition, there was a bug in gtkblist.c where the spin button from the
 "Exchange" setting that appears when adding/joining an ICQ chat was right-
 aligned.

 This code should help make these settings boxes look more consistent.

 A side effect of this patch is that I will have to change #3553 to depend
 on this patch. #3553 is still relevant, because there's a lot of cut-and-
 paste code in gtkblist.c aside from this widget creation process.

 This patch is also available as a monotone branch called
 org.maemo.garage.pidgin.pidgin.add-widget-util from the monotone server at
 idefix.go-nix.ca.

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


More information about the Tracker mailing list