# HG changeset patch # User Sadrul Habib Chowdhury # Date 1177733326 0 # Node ID ac0d07c7fd90802152f9c9a4ab89139c988c833c # Parent dccdd9cbe095a7ab859f732882899f07a3d04cd5 Pref migration for finch. diff -r dccdd9cbe095 -r ac0d07c7fd90 finch/finch.c --- a/finch/finch.c Sat Apr 28 03:24:18 2007 +0000 +++ b/finch/finch.c Sat Apr 28 04:08:46 2007 +0000 @@ -328,8 +328,7 @@ /* TODO: Move prefs loading into purple_prefs_init() */ purple_prefs_load(); purple_prefs_update_old(); - purple_prefs_rename("/gaim/gnt", "/finch"); - purple_prefs_rename("/purple/gnt", "/finch"); + finch_prefs_update_old(); /* load plugins we had when we quit */ purple_plugins_load_saved("/finch/plugins/loaded"); diff -r dccdd9cbe095 -r ac0d07c7fd90 finch/gntprefs.c --- a/finch/gntprefs.c Sat Apr 28 03:24:18 2007 +0000 +++ b/finch/gntprefs.c Sat Apr 28 04:08:46 2007 +0000 @@ -42,9 +42,19 @@ purple_prefs_add_none("/finch/conversations"); purple_prefs_add_bool("/finch/conversations/timestamps", TRUE); - purple_prefs_add_bool("/finch/conversations/notify_typing", FALSE); /* XXX: Not functional yet */ + purple_prefs_add_bool("/finch/conversations/notify_typing", FALSE); +} + +void finch_prefs_update_old() +{ + const char *str = NULL; + purple_prefs_rename("/gaim/gnt", "/finch"); purple_prefs_rename("/purple/gnt", "/finch"); + + if ((str = purple_prefs_get_string("/purple/away/idle_reporting")) && + strcmp(str, "gaim") == 0) + purple_prefs_set_string("/purple/away/idle_reporting", "purple"); } typedef struct diff -r dccdd9cbe095 -r ac0d07c7fd90 finch/gntprefs.h --- a/finch/gntprefs.h Sat Apr 28 03:24:18 2007 +0000 +++ b/finch/gntprefs.h Sat Apr 28 04:08:46 2007 +0000 @@ -40,6 +40,10 @@ */ void finch_prefs_show_all(void); +/** + * You don't need to know about this. + */ +void finch_prefs_update_old(void); /*@}*/ #endif