| 1605 |
1605 |
| 1606 static void |
1606 static void |
| 1607 test_sound(GtkWidget *button, gpointer i_am_NULL) |
1607 test_sound(GtkWidget *button, gpointer i_am_NULL) |
| 1608 { |
1608 { |
| 1609 char *pref; |
1609 char *pref; |
| 1610 gboolean temp_value; |
1610 gboolean temp_enabled; |
| |
1611 gboolean temp_mute; |
| 1611 |
1612 |
| 1612 pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/enabled/%s", |
1613 pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/enabled/%s", |
| 1613 pidgin_sound_get_event_option(sound_row_sel)); |
1614 pidgin_sound_get_event_option(sound_row_sel)); |
| 1614 |
1615 |
| 1615 temp_value = purple_prefs_get_bool(pref); |
1616 temp_enabled = purple_prefs_get_bool(pref); |
| 1616 |
1617 temp_mute = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/sound/mute"); |
| 1617 if (!temp_value) purple_prefs_set_bool(pref, TRUE); |
1618 |
| |
1619 if (!temp_enabled) purple_prefs_set_bool(pref, TRUE); |
| |
1620 if (temp_mute) purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/mute", FALSE); |
| 1618 |
1621 |
| 1619 purple_sound_play_event(sound_row_sel, NULL); |
1622 purple_sound_play_event(sound_row_sel, NULL); |
| 1620 |
1623 |
| 1621 if (!temp_value) purple_prefs_set_bool(pref, FALSE); |
1624 if (!temp_enabled) purple_prefs_set_bool(pref, FALSE); |
| |
1625 if (temp_mute) purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/mute", TRUE); |
| 1622 |
1626 |
| 1623 g_free(pref); |
1627 g_free(pref); |
| 1624 } |
1628 } |
| 1625 |
1629 |
| 1626 /* |
1630 /* |