pidgin/purple-plugin-pack

39004acd6d4a
Parents c4dd4348b963
Children fd2ae88a9d14
According to the reporter of ticket 522, fixing these pref paths fixes the
mysterious autoprofile crash I couldn't figure out a few months back. So,
at long last, a real bug fix! References #522.
--- a/autoprofile/autoaway.c Mon Aug 25 20:55:31 2008 -0400
+++ b/autoprofile/autoaway.c Fri Sep 12 04:01:26 2008 -0400
@@ -39,7 +39,7 @@
ui_ops = purple_idle_get_ui_ops ();
- idle_reporting = purple_prefs_get_string ("/core/away/idle_reporting");
+ idle_reporting = purple_prefs_get_string ("/purple/away/idle_reporting");
if (!strcmp (idle_reporting, "system") &&
(ui_ops != NULL) && (ui_ops->get_time_idle != NULL)) {
time_idle = time (NULL) - last_active_time;
@@ -50,7 +50,7 @@
}
return (time_idle >
- (60 * purple_prefs_get_int("/core/away/mins_before_away")));
+ (60 * purple_prefs_get_int("/purple/away/mins_before_away")));
}
static gboolean ap_check_idleness (gpointer data)
@@ -98,7 +98,7 @@
static void auto_pref_cb (
const char *name, PurplePrefType type, gconstpointer val, gpointer data)
{
- if (!purple_prefs_get_bool ("/core/away/away_when_idle")) return;
+ if (!purple_prefs_get_bool ("/purple/away/away_when_idle")) return;
purple_notify_error (NULL, NULL,
N_("This preference is disabled"),
@@ -106,7 +106,7 @@
"use. To modify this behavior, use the AutoProfile configuration "
"menu."));
- purple_prefs_set_bool ("/core/away/away_when_idle", FALSE);
+ purple_prefs_set_bool ("/purple/away/away_when_idle", FALSE);
}
/*--------------------------------------------------------------------------*
@@ -114,7 +114,7 @@
*--------------------------------------------------------------------------*/
void ap_autoaway_start ()
{
- purple_prefs_set_bool ("/core/away/away_when_idle", FALSE);
+ purple_prefs_set_bool ("/purple/away/away_when_idle", FALSE);
check_timeout = purple_timeout_add (AP_IDLE_CHECK_INTERVAL * 1000,
ap_check_idleness, NULL);
@@ -123,7 +123,7 @@
ap_get_plugin_handle (), PURPLE_CALLBACK(writing_im_msg_cb), NULL);
pref_cb = purple_prefs_connect_callback (ap_get_plugin_handle (),
- "/core/away/away_when_idle", auto_pref_cb, NULL);
+ "/purple/away/away_when_idle", auto_pref_cb, NULL);
ap_autoaway_touch ();
}
@@ -138,7 +138,7 @@
if (check_timeout > 0) purple_timeout_remove (check_timeout);
check_timeout = 0;
- purple_prefs_set_bool ("/core/away/away_when_idle",
+ purple_prefs_set_bool ("/purple/away/away_when_idle",
purple_prefs_get_bool ("/plugins/gtk/autoprofile/away_when_idle"));
}
--- a/autoprofile/autoprofile.c Mon Aug 25 20:55:31 2008 -0400
+++ b/autoprofile/autoprofile.c Fri Sep 12 04:01:26 2008 -0400
@@ -77,7 +77,7 @@
ap_delete_legacy_prefs ();
/* The core autoprofile tracking system */
- purple_prefs_connect_callback (plugin_handle, "/core/savedstatus/current",
+ purple_prefs_connect_callback (plugin_handle, "/purple/savedstatus/current",
ap_status_changed, NULL);
purple_signal_connect (purple_connections_get_handle (),
"signed-on", plugin_handle,
@@ -825,11 +825,11 @@
purple_prefs_add_bool ("/plugins/gtk/autoprofile/queue_messages_when_away",
FALSE);
purple_prefs_add_bool ("/plugins/gtk/autoprofile/away_when_idle",
- purple_prefs_get_bool ("/core/away/away_when_idle"));
+ purple_prefs_get_bool ("/purple/away/away_when_idle"));
/* Auto-response settings */
purple_prefs_add_string ("/plugins/gtk/autoprofile/autorespond/auto_reply",
- purple_prefs_get_string ("/core/away/auto_reply"));
+ purple_prefs_get_string ("/purple/away/auto_reply"));
purple_prefs_add_string ("/plugins/gtk/autoprofile/autorespond/text",
_("Say the magic word if you want me to talk more!"));
purple_prefs_add_string ("/plugins/gtk/autoprofile/autorespond/trigger",
--- a/autoprofile/autoreply.c Mon Aug 25 20:55:31 2008 -0400
+++ b/autoprofile/autoreply.c Fri Sep 12 04:01:26 2008 -0400
@@ -274,7 +274,7 @@
static void auto_pref_cb (
const char *name, PurplePrefType type, gconstpointer val, gpointer data)
{
- if (!strcmp (purple_prefs_get_string ("/core/away/auto_reply"), "never"))
+ if (!strcmp (purple_prefs_get_string ("/purple/away/auto_reply"), "never"))
return;
purple_notify_error (NULL, NULL,
@@ -283,7 +283,7 @@
"use. To modify this behavior, use the AutoProfile configuration "
"menu."));
- purple_prefs_set_string ("/core/away/auto_reply", "never");
+ purple_prefs_set_string ("/purple/away/auto_reply", "never");
}
/*--------------------------------------------------------------------------*
@@ -291,7 +291,7 @@
*--------------------------------------------------------------------------*/
void ap_autoreply_start ()
{
- purple_prefs_set_string ("/core/away/auto_reply", "never");
+ purple_prefs_set_string ("/purple/away/auto_reply", "never");
purple_signal_connect (purple_conversations_get_handle (), "sent-im-msg",
ap_get_plugin_handle (), PURPLE_CALLBACK(sent_im_msg_cb), NULL);
@@ -299,7 +299,7 @@
ap_get_plugin_handle (), PURPLE_CALLBACK(received_im_msg_cb), NULL);
pref_cb = purple_prefs_connect_callback (ap_get_plugin_handle (),
- "/core/away/auto_reply", auto_pref_cb, NULL);
+ "/purple/away/auto_reply", auto_pref_cb, NULL);
}
void ap_autoreply_finish ()
@@ -311,7 +311,7 @@
purple_prefs_disconnect_callback (pref_cb);
pref_cb = 0;
- purple_prefs_set_string ("/core/away/auto_reply", purple_prefs_get_string (
+ purple_prefs_set_string ("/purple/away/auto_reply", purple_prefs_get_string (
"/plugins/gtk/autoprofile/autorespond/auto_reply"));
while (last_auto_responses) {
--- a/autoprofile/gtk_away_msgs.c Mon Aug 25 20:55:31 2008 -0400
+++ b/autoprofile/gtk_away_msgs.c Fri Sep 12 04:01:26 2008 -0400
@@ -66,7 +66,7 @@
gboolean value;
button = (GtkWidget *) data;
- value = purple_prefs_get_bool ("/core/sound/while_away");
+ value = purple_prefs_get_bool ("/purple/sound/while_away");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(button), value);
}
@@ -314,10 +314,10 @@
button = pidgin_prefs_checkbox (
_("Play sounds while away"),
- "/core/sound/while_away",
+ "/purple/sound/while_away",
config_vbox);
sound_pref_cb = purple_prefs_connect_callback (ap_get_plugin_handle (),
- "/core/sound/while_away", sound_cb, button);
+ "/purple/sound/while_away", sound_cb, button);
gtk_box_pack_start (GTK_BOX(hbox), gtk_vseparator_new (), FALSE, FALSE, 0);