Mercurial > pidgin
changeset 16430:f8eb3e7c4fbd
Fix GTK Plugin prefs
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 26 Apr 2007 01:41:35 +0000 |
parents | f9597f375b07 |
children | 4f2df3170e21 |
files | libpurple/plugins/autoaccept.c libpurple/plugins/joinpart.c libpurple/plugins/log_reader.c libpurple/plugins/offlinemsg.c libpurple/plugins/pluginpref_example.c libpurple/plugins/psychic.c libpurple/plugins/statenotify.c libpurple/prefs.c |
diffstat | 8 files changed, 68 insertions(+), 68 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/plugins/autoaccept.c Thu Apr 26 00:45:29 2007 +0000 +++ b/libpurple/plugins/autoaccept.c Thu Apr 26 01:41:35 2007 +0000 @@ -47,7 +47,7 @@ #include <notify.h> #include <util.h> -#define PREF_PREFIX "/plugins/purple/" PLUGIN_ID +#define PREF_PREFIX "/plugins/core/" PLUGIN_ID #define PREF_PATH PREF_PREFIX "/path" #define PREF_STRANGER PREF_PREFIX "/reject_stranger" #define PREF_NOTIFY PREF_PREFIX "/notify"
--- a/libpurple/plugins/joinpart.c Thu Apr 26 00:45:29 2007 +0000 +++ b/libpurple/plugins/joinpart.c Thu Apr 26 01:41:35 2007 +0000 @@ -33,12 +33,12 @@ /* The number of minutes before a person is considered * to have stopped being part of active conversation. */ -#define DELAY_PREF "/plugins/purple/joinpart/delay" +#define DELAY_PREF "/plugins/core/joinpart/delay" #define DELAY_DEFAULT 10 /* The number of people that must be in a room for this * plugin to have any effect */ -#define THRESHOLD_PREF "/plugins/purple/joinpart/threshold" +#define THRESHOLD_PREF "/plugins/core/joinpart/threshold" #define THRESHOLD_DEFAULT 20 struct joinpart_key @@ -285,7 +285,7 @@ static void init_plugin(PurplePlugin *plugin) { - purple_prefs_add_none("/plugins/purple/joinpart"); + purple_prefs_add_none("/plugins/core/joinpart"); purple_prefs_add_int(DELAY_PREF, DELAY_DEFAULT); purple_prefs_add_int(THRESHOLD_PREF, THRESHOLD_DEFAULT);
--- a/libpurple/plugins/log_reader.c Thu Apr 26 00:45:29 2007 +0000 +++ b/libpurple/plugins/log_reader.c Thu Apr 26 01:41:35 2007 +0000 @@ -71,7 +71,7 @@ g_return_val_if_fail(sn != NULL, list); g_return_val_if_fail(account != NULL, list); - logdir = purple_prefs_get_string("/plugins/purple/log_reader/adium/log_directory"); + logdir = purple_prefs_get_string("/plugins/core/log_reader/adium/log_directory"); /* By clearing the log directory path, this logger can be (effectively) disabled. */ if (!*logdir) @@ -295,7 +295,7 @@ data = log->logger_data; - if (purple_prefs_get_bool("/plugins/purple/log_reader/fast_sizes")) { + if (purple_prefs_get_bool("/plugins/core/log_reader/fast_sizes")) { struct stat st; if (!data->path || stat(data->path, &st)) @@ -359,7 +359,7 @@ { g_return_val_if_fail(log != NULL, 0); - if (purple_prefs_get_bool("/plugins/purple/log_reader/fast_sizes")) + if (purple_prefs_get_bool("/plugins/core/log_reader/fast_sizes")) return 0; /* TODO: Do something here. */ @@ -411,7 +411,7 @@ { g_return_val_if_fail(log != NULL, 0); - if (purple_prefs_get_bool("/plugins/purple/log_reader/fast_sizes")) + if (purple_prefs_get_bool("/plugins/core/log_reader/fast_sizes")) return 0; /* TODO: Do something here. */ @@ -636,7 +636,7 @@ if (strcmp(account->protocol_id, "prpl-msn")) return list; - logdir = purple_prefs_get_string("/plugins/purple/log_reader/msn/log_directory"); + logdir = purple_prefs_get_string("/plugins/core/log_reader/msn/log_directory"); /* By clearing the log directory path, this logger can be (effectively) disabled. */ if (!*logdir) @@ -968,7 +968,7 @@ } their_name = from_name; - if (from_name && purple_prefs_get_bool("/plugins/purple/log_reader/use_name_heuristics")) { + if (from_name && purple_prefs_get_bool("/plugins/core/log_reader/use_name_heuristics")) { const char *friendly_name = purple_connection_get_display_name(log->account->gc); if (friendly_name != NULL) { @@ -1153,7 +1153,7 @@ g_return_val_if_fail(log != NULL, 0); - if (purple_prefs_get_bool("/plugins/purple/log_reader/fast_sizes")) + if (purple_prefs_get_bool("/plugins/core/log_reader/fast_sizes")) return 0; text = msn_logger_read(log, NULL); @@ -1216,7 +1216,7 @@ g_return_val_if_fail(sn != NULL, list); g_return_val_if_fail(account != NULL, list); - logdir = purple_prefs_get_string("/plugins/purple/log_reader/trillian/log_directory"); + logdir = purple_prefs_get_string("/plugins/core/log_reader/trillian/log_directory"); /* By clearing the log directory path, this logger can be (effectively) disabled. */ if (!*logdir) @@ -1687,7 +1687,7 @@ data = log->logger_data; - if (purple_prefs_get_bool("/plugins/purple/log_reader/fast_sizes")) { + if (purple_prefs_get_bool("/plugins/core/log_reader/fast_sizes")) { return data ? data->length : 0; } @@ -1727,17 +1727,17 @@ g_return_if_fail(plugin != NULL); - purple_prefs_add_none("/plugins/purple/log_reader"); + purple_prefs_add_none("/plugins/core/log_reader"); /* Add general preferences. */ - purple_prefs_add_bool("/plugins/purple/log_reader/fast_sizes", FALSE); - purple_prefs_add_bool("/plugins/purple/log_reader/use_name_heuristics", TRUE); + purple_prefs_add_bool("/plugins/core/log_reader/fast_sizes", FALSE); + purple_prefs_add_bool("/plugins/core/log_reader/use_name_heuristics", TRUE); /* Add Adium log directory preference. */ - purple_prefs_add_none("/plugins/purple/log_reader/adium"); + purple_prefs_add_none("/plugins/core/log_reader/adium"); /* Calculate default Adium log directory. */ #ifdef _WIN32 @@ -1747,7 +1747,7 @@ "Adium 2.0", "Users", "Default", "Logs", NULL); #endif - purple_prefs_add_string("/plugins/purple/log_reader/adium/log_directory", path); + purple_prefs_add_string("/plugins/core/log_reader/adium/log_directory", path); #ifndef _WIN32 g_free(path); @@ -1755,7 +1755,7 @@ /* Add Fire log directory preference. */ - purple_prefs_add_none("/plugins/purple/log_reader/fire"); + purple_prefs_add_none("/plugins/core/log_reader/fire"); /* Calculate default Fire log directory. */ #ifdef _WIN32 @@ -1765,7 +1765,7 @@ "Fire", "Sessions", NULL); #endif - purple_prefs_add_string("/plugins/purple/log_reader/fire/log_directory", path); + purple_prefs_add_string("/plugins/core/log_reader/fire/log_directory", path); #ifndef _WIN32 g_free(path); @@ -1773,7 +1773,7 @@ /* Add Messenger Plus! log directory preference. */ - purple_prefs_add_none("/plugins/purple/log_reader/messenger_plus"); + purple_prefs_add_none("/plugins/core/log_reader/messenger_plus"); /* Calculate default Messenger Plus! log directory. */ #ifdef _WIN32 @@ -1794,12 +1794,12 @@ path = g_strdup(""); #endif - purple_prefs_add_string("/plugins/purple/log_reader/messenger_plus/log_directory", path); + purple_prefs_add_string("/plugins/core/log_reader/messenger_plus/log_directory", path); g_free(path); /* Add MSN Messenger log directory preference. */ - purple_prefs_add_none("/plugins/purple/log_reader/msn"); + purple_prefs_add_none("/plugins/core/log_reader/msn"); /* Calculate default MSN message history directory. */ #ifdef _WIN32 @@ -1820,12 +1820,12 @@ path = g_strdup(""); #endif - purple_prefs_add_string("/plugins/purple/log_reader/msn/log_directory", path); + purple_prefs_add_string("/plugins/core/log_reader/msn/log_directory", path); g_free(path); /* Add Trillian log directory preference. */ - purple_prefs_add_none("/plugins/purple/log_reader/trillian"); + purple_prefs_add_none("/plugins/core/log_reader/trillian"); #ifdef _WIN32 /* XXX: While a major hack, this is the most reliable way I could @@ -1892,7 +1892,7 @@ if (logdir) { g_strchomp(logdir); purple_prefs_add_string( - "/plugins/purple/log_reader/trillian/log_directory", logdir); + "/plugins/core/log_reader/trillian/log_directory", logdir); found = TRUE; } @@ -1920,7 +1920,7 @@ line += (sizeof("Directory=") - 1); g_strchomp(line); purple_prefs_add_string( - "/plugins/purple/log_reader/trillian/log_directory", + "/plugins/core/log_reader/trillian/log_directory", line); found = TRUE; } @@ -1957,7 +1957,7 @@ path = g_strdup(""); #endif - purple_prefs_add_string("/plugins/purple/log_reader/trillian/log_directory", path); + purple_prefs_add_string("/plugins/core/log_reader/trillian/log_directory", path); g_free(path); #ifdef _WIN32 @@ -2068,11 +2068,11 @@ purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/log_reader/fast_sizes", _("Fast size calculations")); + "/plugins/core/log_reader/fast_sizes", _("Fast size calculations")); purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/log_reader/use_name_heuristics", _("Use name heuristics")); + "/plugins/core/log_reader/use_name_heuristics", _("Use name heuristics")); purple_plugin_pref_frame_add(frame, ppref); @@ -2082,25 +2082,25 @@ purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/log_reader/adium/log_directory", _("Adium")); + "/plugins/core/log_reader/adium/log_directory", _("Adium")); purple_plugin_pref_frame_add(frame, ppref); #if 0 ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/log_reader/fire/log_directory", _("Fire")); + "/plugins/core/log_reader/fire/log_directory", _("Fire")); purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/log_reader/messenger_plus/log_directory", _("Messenger Plus!")); + "/plugins/core/log_reader/messenger_plus/log_directory", _("Messenger Plus!")); purple_plugin_pref_frame_add(frame, ppref); #endif ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/log_reader/msn/log_directory", _("MSN Messenger")); + "/plugins/core/log_reader/msn/log_directory", _("MSN Messenger")); purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/log_reader/trillian/log_directory", _("Trillian")); + "/plugins/core/log_reader/trillian/log_directory", _("Trillian")); purple_plugin_pref_frame_add(frame, ppref); return frame;
--- a/libpurple/plugins/offlinemsg.c Thu Apr 26 00:45:29 2007 +0000 +++ b/libpurple/plugins/offlinemsg.c Thu Apr 26 01:41:35 2007 +0000 @@ -36,7 +36,7 @@ #include <pounce.h> #include <request.h> -#define PREF_PREFIX "/plugins/purple/" PLUGIN_ID +#define PREF_PREFIX "/plugins/core/" PLUGIN_ID #define PREF_ALWAYS PREF_PREFIX "/always" typedef struct _OfflineMsg OfflineMsg;
--- a/libpurple/plugins/pluginpref_example.c Thu Apr 26 00:45:29 2007 +0000 +++ b/libpurple/plugins/pluginpref_example.c Thu Apr 26 01:41:35 2007 +0000 @@ -45,7 +45,7 @@ purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/pluginpref_example/bool", + "/plugins/core/pluginpref_example/bool", "boolean pref"); purple_plugin_pref_frame_add(frame, ppref); @@ -53,13 +53,13 @@ purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/pluginpref_example/int", + "/plugins/core/pluginpref_example/int", "integer pref"); purple_plugin_pref_set_bounds(ppref, 0, 255); purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/pluginpref_example/int_choice", + "/plugins/core/pluginpref_example/int_choice", "integer choice"); purple_plugin_pref_set_type(ppref, PURPLE_PLUGIN_PREF_CHOICE); purple_plugin_pref_add_choice(ppref, "One", GINT_TO_POINTER(1)); @@ -76,24 +76,24 @@ purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/pluginpref_example/string", + "/plugins/core/pluginpref_example/string", "string pref"); purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/pluginpref_example/masked_string", + "/plugins/core/pluginpref_example/masked_string", "masked string"); purple_plugin_pref_set_masked(ppref, TRUE); purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/pluginpref_example/max_string", + "/plugins/core/pluginpref_example/max_string", "string pref\n(max length of 16)"); purple_plugin_pref_set_max_length(ppref, 16); purple_plugin_pref_frame_add(frame, ppref); ppref = purple_plugin_pref_new_with_name_and_label( - "/plugins/purple/pluginpref_example/string_choice", + "/plugins/core/pluginpref_example/string_choice", "string choice"); purple_plugin_pref_set_type(ppref, PURPLE_PLUGIN_PREF_CHOICE); purple_plugin_pref_add_choice(ppref, "red", "red"); @@ -147,16 +147,16 @@ static void init_plugin(PurplePlugin *plugin) { - purple_prefs_add_none("/plugins/purple/pluginpref_example"); - purple_prefs_add_bool("/plugins/purple/pluginpref_example/bool", TRUE); - purple_prefs_add_int("/plugins/purple/pluginpref_example/int", 0); - purple_prefs_add_int("/plugins/purple/pluginpref_example/int_choice", 1); - purple_prefs_add_string("/plugins/purple/pluginpref_example/string", + purple_prefs_add_none("/plugins/core/pluginpref_example"); + purple_prefs_add_bool("/plugins/core/pluginpref_example/bool", TRUE); + purple_prefs_add_int("/plugins/core/pluginpref_example/int", 0); + purple_prefs_add_int("/plugins/core/pluginpref_example/int_choice", 1); + purple_prefs_add_string("/plugins/core/pluginpref_example/string", "string"); - purple_prefs_add_string("/plugins/purple/pluginpref_example/max_string", + purple_prefs_add_string("/plugins/core/pluginpref_example/max_string", "max length string"); - purple_prefs_add_string("/plugins/purple/pluginpref_example/masked_string", "masked"); - purple_prefs_add_string("/plugins/purple/pluginpref_example/string_choice", "red"); + purple_prefs_add_string("/plugins/core/pluginpref_example/masked_string", "masked"); + purple_prefs_add_string("/plugins/core/pluginpref_example/string_choice", "red"); } PURPLE_INIT_PLUGIN(ppexample, init_plugin, info)
--- a/libpurple/plugins/psychic.c Thu Apr 26 00:45:29 2007 +0000 +++ b/libpurple/plugins/psychic.c Thu Apr 26 01:41:35 2007 +0000 @@ -24,7 +24,7 @@ #define PLUGIN_AUTHOR "Christopher O'Brien <siege@preoccupied.net>" -#define PREFS_BASE "/plugins/purple/psychic" +#define PREFS_BASE "/plugins/core/psychic" #define PREF_BUDDIES PREFS_BASE "/buddies_only" #define PREF_NOTICE PREFS_BASE "/show_notice" #define PREF_STATUS PREFS_BASE "/activate_online"
--- a/libpurple/plugins/statenotify.c Thu Apr 26 00:45:29 2007 +0000 +++ b/libpurple/plugins/statenotify.c Thu Apr 26 01:41:35 2007 +0000 @@ -45,7 +45,7 @@ available = purple_status_is_available(status); old_available = purple_status_is_available(old_status); - if (purple_prefs_get_bool("/plugins/purple/statenotify/notify_away")) { + if (purple_prefs_get_bool("/plugins/core/statenotify/notify_away")) { if (available && !old_available) write_status(buddy, _("%s is no longer away.")); else if (!available && old_available) @@ -57,7 +57,7 @@ buddy_idle_changed_cb(PurpleBuddy *buddy, gboolean old_idle, gboolean idle, void *data) { - if (purple_prefs_get_bool("/plugins/purple/statenotify/notify_idle")) { + if (purple_prefs_get_bool("/plugins/core/statenotify/notify_idle")) { if (idle) { write_status(buddy, _("%s has become idle.")); } else { @@ -69,14 +69,14 @@ static void buddy_signon_cb(PurpleBuddy *buddy, void *data) { - if (purple_prefs_get_bool("/plugins/purple/statenotify/notify_signon")) + if (purple_prefs_get_bool("/plugins/core/statenotify/notify_signon")) write_status(buddy, _("%s has signed on.")); } static void buddy_signoff_cb(PurpleBuddy *buddy, void *data) { - if (purple_prefs_get_bool("/plugins/purple/statenotify/notify_signon")) + if (purple_prefs_get_bool("/plugins/core/statenotify/notify_signon")) write_status(buddy, _("%s has signed off.")); } @@ -91,13 +91,13 @@ ppref = purple_plugin_pref_new_with_label(_("Notify When")); purple_plugin_pref_frame_add(frame, ppref); - ppref = purple_plugin_pref_new_with_name_and_label("/plugins/purple/statenotify/notify_away", _("Buddy Goes _Away")); + ppref = purple_plugin_pref_new_with_name_and_label("/plugins/core/statenotify/notify_away", _("Buddy Goes _Away")); purple_plugin_pref_frame_add(frame, ppref); - ppref = purple_plugin_pref_new_with_name_and_label("/plugins/purple/statenotify/notify_idle", _("Buddy Goes _Idle")); + ppref = purple_plugin_pref_new_with_name_and_label("/plugins/core/statenotify/notify_idle", _("Buddy Goes _Idle")); purple_plugin_pref_frame_add(frame, ppref); - ppref = purple_plugin_pref_new_with_name_and_label("/plugins/purple/statenotify/notify_signon", _("Buddy _Signs On/Off")); + ppref = purple_plugin_pref_new_with_name_and_label("/plugins/core/statenotify/notify_signon", _("Buddy _Signs On/Off")); purple_plugin_pref_frame_add(frame, ppref); return frame; @@ -163,10 +163,10 @@ static void init_plugin(PurplePlugin *plugin) { - purple_prefs_add_none("/plugins/purple/statenotify"); - purple_prefs_add_bool("/plugins/purple/statenotify/notify_away", TRUE); - purple_prefs_add_bool("/plugins/purple/statenotify/notify_idle", TRUE); - purple_prefs_add_bool("/plugins/purple/statenotify/notify_signon", TRUE); + purple_prefs_add_none("/plugins/core/statenotify"); + purple_prefs_add_bool("/plugins/core/statenotify/notify_away", TRUE); + purple_prefs_add_bool("/plugins/core/statenotify/notify_idle", TRUE); + purple_prefs_add_bool("/plugins/core/statenotify/notify_signon", TRUE); } PURPLE_INIT_PLUGIN(statenotify, init_plugin, info)
--- a/libpurple/prefs.c Thu Apr 26 00:45:29 2007 +0000 +++ b/libpurple/prefs.c Thu Apr 26 01:41:35 2007 +0000 @@ -1347,11 +1347,11 @@ purple_prefs_remove("/purple/logging/log_away_state"); purple_prefs_remove("/purple/logging/log_own_states"); purple_prefs_remove("/purple/status/scores/hidden"); - purple_prefs_remove("/plugins/purple/autorecon/hide_connected_error"); - purple_prefs_remove("/plugins/purple/autorecon/hide_connecting_error"); - purple_prefs_remove("/plugins/purple/autorecon/hide_reconnecting_dialog"); - purple_prefs_remove("/plugins/purple/autorecon/restore_state"); - purple_prefs_remove("/plugins/purple/autorecon"); + purple_prefs_remove("/plugins/core/autorecon/hide_connected_error"); + purple_prefs_remove("/plugins/core/autorecon/hide_connecting_error"); + purple_prefs_remove("/plugins/core/autorecon/hide_reconnecting_dialog"); + purple_prefs_remove("/plugins/core/autorecon/restore_state"); + purple_prefs_remove("/plugins/core/autorecon"); /* Convert old sounds while_away pref to new 3-way pref. */ if (purple_prefs_exists("/purple/sound/while_away") &&