Improved consitstency.

This commit is contained in:
Marcus Wichelmann 2014-11-14 16:17:19 +01:00
parent 6580447866
commit bb65c2f92f
3 changed files with 12 additions and 12 deletions

View File

@ -14,10 +14,6 @@
<value nick='grid' value='0'/>
<value nick='natural' value='1'/>
</enum>
<enum id="GalaNotificationPriority">
<value nick='hide' value='0'/>
<value nick='show' value='1'/>
</enum>
<schema path="/org/pantheon/desktop/gala/behavior/" id="org.pantheon.desktop.gala.behavior" gettext-domain="gala">
<key enum="GalaActionType" name="hotcorner-topleft">
@ -223,11 +219,11 @@
<default>false</default>
<summary>Disable all notifications</summary>
</key>
<key enum="GalaNotificationPriority" name="default-priority">
<default>'show'</default>
<summary>The default priority that would be used for new apps</summary>
<key type="b" name="default-bubbles">
<default>true</default>
<summary>The default setting for the bubbles that would be used for new apps</summary>
</key>
<key type="b" name="default-sounds-enabled">
<key type="b" name="default-sounds">
<default>true</default>
<summary>The default setting for the sounds that would be used for new apps</summary>
</key>

View File

@ -187,9 +187,13 @@ namespace Gala.Plugins.Notify
apps_new[i] = options.apps[i];
}
parameters[0] = options.default_priority;
if (options.default_bubbles) {
parameters[0] = "show";
} else {
parameters[0] = "hide";
}
if (options.default_sounds_enabled) {
if (options.default_sounds) {
parameters[1] = "on";
} else {
parameters[1] = "off";

View File

@ -23,8 +23,8 @@ namespace Gala.Plugins.Notify
public class NotifySettings : Granite.Services.Settings
{
public bool do_not_disturb { get; set; }
public string default_priority { get; set; }
public bool default_sounds_enabled { get; set; }
public bool default_bubbles { get; set; }
public bool default_sounds { get; set; }
public string[] apps { get; set; }
static NotifySettings? instance = null;