[Pidgin] #9630: Abstract Blist Saving

Pidgin trac at pidgin.im
Sat Jul 25 19:36:46 EDT 2009


#9630: Abstract Blist Saving
-----------------------------------------+----------------------------------
 Reporter:  hanzz                        |        Owner:           
     Type:  patch                        |       Status:  new      
Milestone:  Patches Needing Improvement  |    Component:  libpurple
  Version:  2.5.8                        |   Resolution:           
 Keywords:                               |  
-----------------------------------------+----------------------------------
Changes (by darkrain42):

  * milestone:  Patches Needing Review => Patches Needing Improvement


Comment:

 This patch breaks compatibility with UIs, as they need to work with
 absolutely no changes; they can't be relied upon to call
 `purple_blist_schedule_save`.  The test for this is that both Pidgin and
 Finch need to work with no changes in `pidgin/` and `finch/`.

 A possible solution to this is to keep `purple_blist_schedule_save` in
 every place where you commented the UI needs to call it and add a new UI
 op (which `purple_blist_schedule_save` calls) that saves everything about
 an account (passed as a parameter), including the privacy data, and if
 `account == NULL`, it saves the entire file.

 I envision the function in blistsaving.c looking something like this:
 {{{
 static void
 foo_bar(PurpleAccount *account)
 {
 #if 0
         /* TODO: Optimization for other UIs, save data only for this
 account */
         if (account != NULL) {
                 /* Save it somewhere, yay! */
         } else
 #endif
                 purple_blist_sync();
 }
 }}}

 You need not actually write that optimization for the blist.xml format.

   * You added pidgin_blist_load() and pidgin_blist_schedule_save(), but
 they don't seem to be defined or used anywhere.
   * Rename 'delete_node' to 'remove_node' (since it's called when removing
 a node from the buddylist, not deleting/destorying the !PurpleBlistNode)

-- 
Ticket URL: <http://developer.pidgin.im/ticket/9630#comment:2>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list