Unified desktop notification preferences

This commit is contained in:
James Booth
2012-10-27 22:05:08 +01:00
parent 7ba66d7edb
commit c71259c322
6 changed files with 122 additions and 104 deletions

View File

@@ -236,28 +236,41 @@ prefs_set_beep(gboolean value)
}
gboolean
prefs_get_notify(void)
prefs_get_notify_typing(void)
{
return g_key_file_get_boolean(prefs, "ui", "notify", NULL);
return g_key_file_get_boolean(prefs, "notifications", "typing", NULL);
}
void
prefs_set_notify(gboolean value)
prefs_set_notify_typing(gboolean value)
{
g_key_file_set_boolean(prefs, "ui", "notify", value);
g_key_file_set_boolean(prefs, "notifications", "typing", value);
_save_prefs();
}
gboolean
prefs_get_typing(void)
prefs_get_notify_message(void)
{
return g_key_file_get_boolean(prefs, "ui", "typing", NULL);
return g_key_file_get_boolean(prefs, "notifications", "message", NULL);
}
void
prefs_set_typing(gboolean value)
prefs_set_notify_message(gboolean value)
{
g_key_file_set_boolean(prefs, "ui", "typing", value);
g_key_file_set_boolean(prefs, "notifications", "message", value);
_save_prefs();
}
gint
prefs_get_notify_remind(void)
{
return g_key_file_get_integer(prefs, "notifications", "remind", NULL);
}
void
prefs_set_notify_remind(gint value)
{
g_key_file_set_integer(prefs, "notifications", "remind", value);
_save_prefs();
}
@@ -313,19 +326,6 @@ prefs_set_history(gboolean value)
_save_prefs();
}
gint
prefs_get_remind(void)
{
return g_key_file_get_integer(prefs, "ui", "remind", NULL);
}
void
prefs_set_remind(gint value)
{
g_key_file_set_integer(prefs, "ui", "remind", value);
_save_prefs();
}
void
prefs_add_login(const char *jid)
{