| 1643 { |
1643 { |
| 1644 GtkWidget * button = data; |
1644 GtkWidget * button = data; |
| 1645 PurpleKeyring * keyring; |
1645 PurpleKeyring * keyring; |
| 1646 |
1646 |
| 1647 g_return_if_fail(type == PURPLE_PREF_STRING); |
1647 g_return_if_fail(type == PURPLE_PREF_STRING); |
| 1648 g_return_if_fail(g_strcmp0(val,"/purple/keyring/active") == 0); |
1648 g_return_if_fail(g_strcmp0(name,"/purple/keyring/active") == 0); |
| 1649 |
1649 |
| 1650 /** |
1650 /** |
| 1651 * This part is annoying. |
1651 * This part is annoying. |
| 1652 * Since we do not know if purple_keyring_inuse was changed yet, |
1652 * Since we do not know if purple_keyring_inuse was changed yet, |
| 1653 * as we do not know the order the callbacks are called in, we |
1653 * as we do not know the order the callbacks are called in, we |
| 1654 * have to rely on the prefs system, and find the keyring that |
1654 * have to rely on the prefs system, and find the keyring that |
| 1655 * is (or will be) used, from there. |
1655 * is (or will be) used, from there. |
| 1656 */ |
1656 */ |
| |
1657 |
| 1657 keyring = purple_keyring_get_keyring_by_id(val); |
1658 keyring = purple_keyring_get_keyring_by_id(val); |
| 1658 |
1659 |
| 1659 if (purple_keyring_get_change_master(keyring)) |
1660 if (purple_keyring_get_change_master(keyring)) |
| 1660 gtk_widget_set_sensitive(button,TRUE); |
1661 gtk_widget_set_sensitive(button,TRUE); |
| 1661 else |
1662 else |