/pidgin/main: ce1a071ef316: Fix a crash when changing the volume.
Elliott Sales de Andrade
qulogic at pidgin.im
Mon Nov 5 20:38:38 EST 2012
Changeset: ce1a071ef316bc0fb024d8db26bfb020fac2facf
Author: Elliott Sales de Andrade <qulogic at pidgin.im>
Date: 2012-11-05 20:37 -0500
Branch: default
URL: http://hg.pidgin.im/pidgin/main/rev/ce1a071ef316
Description:
Fix a crash when changing the volume.
diffstat:
pidgin/gtkprefs.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (26 lines):
diff --git a/pidgin/gtkprefs.c b/pidgin/gtkprefs.c
--- a/pidgin/gtkprefs.c
+++ b/pidgin/gtkprefs.c
@@ -3364,10 +3364,9 @@ toggle_voice_test_cb(GtkToggleButton *te
}
static void
-scale_value_changed_cb(GtkScaleButton *button, gpointer data)
+volume_changed_cb(GtkScaleButton *button, gpointer data)
{
- const char *pref = data;
- purple_prefs_set_int(pref,
+ purple_prefs_set_int("/purple/media/audio/volume/input",
gtk_scale_button_get_value(GTK_SCALE_BUTTON(button)) * 100);
}
@@ -3409,8 +3408,7 @@ make_voice_test(GtkWidget *vbox)
gtk_scale_button_set_value(GTK_SCALE_BUTTON(volume),
purple_prefs_get_int("/purple/media/audio/volume/input") / 100.0);
g_signal_connect(volume, "value-changed",
- G_CALLBACK(scale_value_changed_cb),
- "/purple/media/audio/volume/input");
+ G_CALLBACK(volume_changed_cb), NULL);
tmp = g_strdup_printf(_("Silence threshold: %d%%"),
purple_prefs_get_int("/purple/media/audio/silence_threshold"));
More information about the Commits
mailing list