summaryrefslogtreecommitdiff
path: root/settings-backend
diff options
context:
space:
mode:
authoronestone <onestone>2007-01-23 02:47:33 +0000
committeronestone <onestone>2007-01-23 02:47:33 +0000
commitef998940e6dbb5b98273486d28f251dbac5c06e1 (patch)
tree515336118a0e95ea632f351d745502e9c761fecf /settings-backend
parentd75be745b6353d8bd0ac68b5b1315300b504bd32 (diff)
downloadaquamarine-ef998940e6dbb5b98273486d28f251dbac5c06e1.tar.gz
aquamarine-ef998940e6dbb5b98273486d28f251dbac5c06e1.tar.bz2
aquamarine: settings backend: added support for map_on_shutdown option
Diffstat (limited to 'settings-backend')
-rw-r--r--settings-backend/kconfig_backend.cpp37
1 files changed, 24 insertions, 13 deletions
diff --git a/settings-backend/kconfig_backend.cpp b/settings-backend/kconfig_backend.cpp
index 044f61c..371dfd7 100644
--- a/settings-backend/kconfig_backend.cpp
+++ b/settings-backend/kconfig_backend.cpp
@@ -165,6 +165,7 @@ struct _SpecialOption {
{"fsp_level", NULL, NULL, false, OptionSpecial},
{"number_of_desktops", NULL, "Number", false, OptionSpecial},
{"resize_mode", "resize", NULL, true, OptionSpecial},
+ {"map_on_shutdown", NULL, NULL, true, OptionSpecial},
};
#define N_SOPTIONS (sizeof (specialOptions) / sizeof (struct _SpecialOption))
@@ -277,17 +278,22 @@ static void readIntegratedOption(ConfigFiles *cFiles, BerylSetting * setting)
setting->value.value.as_string =
g_strdup("ksnapshot");
}
- if (specialOptions[option].berylName == "command_window_screenshot")
+ else if (specialOptions[option].berylName == "command_window_screenshot")
{
setting->value.value.as_string =
g_strdup("ksnapshot -c");
}
- if (specialOptions[option].berylName == "command11")
+ else if (specialOptions[option].berylName == "command11")
{
setting->value.value.as_string =
g_strdup("xkill");
}
- if (specialOptions[option].berylName == "unmaximize_window"
+ else if (specialOptions[option].berylName == "map_on_shutdown")
+ {
+ int val = TRUE;
+ beryl_setting_value_set_bool(&setting->value,&val);
+ }
+ else if (specialOptions[option].berylName == "unmaximize_window"
|| specialOptions[option].berylName == "maximize_window"
|| specialOptions[option].berylName == "maximize_window_horizontally"
|| specialOptions[option].berylName == "maximize_window_vertically")
@@ -297,24 +303,24 @@ static void readIntegratedOption(ConfigFiles *cFiles, BerylSetting * setting)
beryl_setting_value_set_keymods(&setting->value,&val);
beryl_setting_value_set_key_enabled(&setting->value,&val);
}
- if (specialOptions[option].berylName == "click_to_focus")
+ else if (specialOptions[option].berylName == "click_to_focus")
{
Bool val = (cFiles->kwin->readEntry("FocusPolicy") == "ClickToFocus")?TRUE:FALSE;
beryl_setting_value_set_bool(&setting->value,&val);
}
- if (specialOptions[option].berylName == "fsp_level")
+ else if (specialOptions[option].berylName == "fsp_level")
{
int level = cFiles->kwin->readNumEntry("FocusStealingPreventionLevel");
level = MAX(0,MIN(4,level));
setting->value.value.as_string = g_strdup(fspLevel[level]);
}
- if (specialOptions[option].berylName == "number_of_desktops")
+ else if (specialOptions[option].berylName == "number_of_desktops")
{
cFiles->kwin->setGroup("Desktops");
KdeIntToBeryl (cFiles, setting, option);
cFiles->kwin->setGroup("Windows");
}
- if (specialOptions[option].berylName == "resize_mode")
+ else if (specialOptions[option].berylName == "resize_mode")
{
QString mode = cFiles->kwin->readEntry("ResizeMode");
QString imode;
@@ -372,14 +378,18 @@ gboolean get_setting_is_read_only(BerylSetting * setting)
{
return TRUE;
}
- if (specialOptions[option].berylName == "command_window_screenshot")
+ else if (specialOptions[option].berylName == "command_window_screenshot")
{
return TRUE; }
- if (specialOptions[option].berylName == "command11")
+ else if (specialOptions[option].berylName == "command11")
+ {
+ return TRUE;
+ }
+ else if (specialOptions[option].berylName == "map_on_shutdown")
{
return TRUE;
}
- if (specialOptions[option].berylName == "unmaximize_window"
+ else if (specialOptions[option].berylName == "unmaximize_window"
|| specialOptions[option].berylName == "maximize_window"
|| specialOptions[option].berylName == "maximize_window_horizontally"
|| specialOptions[option].berylName == "maximize_window_vertically")
@@ -847,7 +857,8 @@ static void writeIntegratedOption(ConfigFiles *cFiles, BerylSetting * setting)
||specialOptions[option].berylName == "unmaximize_window"
|| specialOptions[option].berylName == "maximize_window"
|| specialOptions[option].berylName == "maximize_window_horizontally"
- || specialOptions[option].berylName == "maximize_window_vertically")
+ || specialOptions[option].berylName == "maximize_window_vertically"
+ || specialOptions[option].berylName == "map_on_shutdown")
break;
if (specialOptions[option].berylName == "click_to_focus")
@@ -1157,12 +1168,12 @@ void write_done(BerylSettingsContext * c)
c->backend_private_ptr=NULL;
}
-gboolean backend_init (BerylSettingsContext * context)
+gboolean backend_init (BerylSettingsContext *)
{
return TRUE;
}
-gboolean backend_fini (BerylSettingsContext * context)
+gboolean backend_fini (BerylSettingsContext *)
{
return TRUE;
}