|
|
|
@ -258,7 +258,7 @@ KdeBoolToCCS (CCSSetting *setting,
|
|
|
|
|
{
|
|
|
|
|
TDEConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->twin;
|
|
|
|
|
|
|
|
|
|
Bool val = (cfg->readBoolEntry (specialOptions[num].kdeName))? TRUE : FALSE;
|
|
|
|
|
Bool val = cfg->readBoolEntry (specialOptions[num].kdeName);
|
|
|
|
|
|
|
|
|
|
ccsSetBool (setting, val);
|
|
|
|
|
}
|
|
|
|
@ -350,8 +350,7 @@ readIntegratedOption (CCSSetting *setting)
|
|
|
|
|
}
|
|
|
|
|
else if (specialOptions[option].settingName == "click_to_focus")
|
|
|
|
|
{
|
|
|
|
|
Bool val = (cFiles->twin->readEntry ("FocusPolicy") ==
|
|
|
|
|
"ClickToFocus") ? TRUE : FALSE;
|
|
|
|
|
Bool val = cFiles->twin->readEntry ("FocusPolicy") == "ClickToFocus";
|
|
|
|
|
ccsSetBool (setting, val);
|
|
|
|
|
}
|
|
|
|
|
else if (specialOptions[option].settingName == "number_of_desktops")
|
|
|
|
@ -395,7 +394,7 @@ readIntegratedOption (CCSSetting *setting)
|
|
|
|
|
CCSSettingValueList list = ccsGetValueListFromIntArray (intList, 2,
|
|
|
|
|
setting);
|
|
|
|
|
ccsSetList (setting, list);
|
|
|
|
|
ccsSettingValueListFree (list, TRUE);
|
|
|
|
|
ccsSettingValueListFree (list, true);
|
|
|
|
|
}
|
|
|
|
|
else if (specialOptions[option].settingName == "resistance_distance" ||
|
|
|
|
|
specialOptions[option].settingName == "attraction_distance")
|
|
|
|
@ -429,7 +428,7 @@ readIntegratedOption (CCSSetting *setting)
|
|
|
|
|
num,
|
|
|
|
|
setting);
|
|
|
|
|
ccsSetList (setting, list);
|
|
|
|
|
ccsSettingValueListFree (list, TRUE);
|
|
|
|
|
ccsSettingValueListFree (list, true);
|
|
|
|
|
}
|
|
|
|
|
else if (specialOptions[option].settingName == "next_key" ||
|
|
|
|
|
specialOptions[option].settingName == "prev_key")
|
|
|
|
@ -504,9 +503,9 @@ readIntegratedOption (CCSSetting *setting)
|
|
|
|
|
int val = cFiles->twin->readNumEntry ("ElectricBorders");
|
|
|
|
|
|
|
|
|
|
if (val > 0)
|
|
|
|
|
ccsSetBool (setting, TRUE);
|
|
|
|
|
ccsSetBool (setting, true);
|
|
|
|
|
else
|
|
|
|
|
ccsSetBool (setting, FALSE);
|
|
|
|
|
ccsSetBool (setting, false);
|
|
|
|
|
}
|
|
|
|
|
else if (specialOptions[option].settingName == "edge_flip_pointer" ||
|
|
|
|
|
specialOptions[option].settingName == "edgeflip_pointer")
|
|
|
|
@ -514,9 +513,9 @@ readIntegratedOption (CCSSetting *setting)
|
|
|
|
|
int val = cFiles->twin->readNumEntry ("ElectricBorders");
|
|
|
|
|
|
|
|
|
|
if (val > 1)
|
|
|
|
|
ccsSetBool (setting, TRUE);
|
|
|
|
|
ccsSetBool (setting, true);
|
|
|
|
|
else
|
|
|
|
|
ccsSetBool (setting, FALSE);
|
|
|
|
|
ccsSetBool (setting, false);
|
|
|
|
|
}
|
|
|
|
|
else if (specialOptions[option].settingName == "mode" &&
|
|
|
|
|
specialOptions[option].pluginName == "place")
|
|
|
|
@ -559,7 +558,7 @@ getSettingIsReadOnly (CCSSetting *setting)
|
|
|
|
|
{
|
|
|
|
|
if (!ccsGetIntegrationEnabled (setting->parent->context)
|
|
|
|
|
|| !isIntegratedOption (setting) )
|
|
|
|
|
return FALSE;
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
int option = 0;
|
|
|
|
|
|
|
|
|
@ -579,23 +578,23 @@ getSettingIsReadOnly (CCSSetting *setting)
|
|
|
|
|
case OptionSpecial:
|
|
|
|
|
if (specialOptions[option].settingName == "command11")
|
|
|
|
|
{
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else if (specialOptions[option].settingName == "map_on_shutdown")
|
|
|
|
|
{
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else if (specialOptions[option].settingName == "unmaximize_window_key"
|
|
|
|
|
|| specialOptions[option].settingName == "maximize_window_key"
|
|
|
|
|
|| specialOptions[option].settingName == "maximize_window_horizontally_key"
|
|
|
|
|
|| specialOptions[option].settingName == "maximize_window_vertically_key")
|
|
|
|
|
{
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else if (specialOptions[option].settingName == "snap_type" ||
|
|
|
|
|
specialOptions[option].settingName == "attraction_distance")
|
|
|
|
|
{
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -603,7 +602,7 @@ getSettingIsReadOnly (CCSSetting *setting)
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static CCSStringList
|
|
|
|
@ -690,7 +689,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
|
|
|
|
|
case TypeBool:
|
|
|
|
|
{
|
|
|
|
|
Bool val = (cfg->readBoolEntry (key) ) ? TRUE : FALSE;
|
|
|
|
|
Bool val = cfg->readBoolEntry (key);
|
|
|
|
|
ccsSetBool (setting, val);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
@ -730,7 +729,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
|
|
|
|
|
for (it = list.begin(); it != list.end(); it++)
|
|
|
|
|
{
|
|
|
|
|
array[i] = ( (*it) ) ? TRUE : FALSE;
|
|
|
|
|
array[i] = ( (*it) ) ? true : false;
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -738,7 +737,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
|
|
|
|
|
ccsGetValueListFromBoolArray (array, i, setting);
|
|
|
|
|
ccsSetList (setting, l);
|
|
|
|
|
ccsSettingValueListFree (l, TRUE);
|
|
|
|
|
ccsSettingValueListFree (l, true);
|
|
|
|
|
delete array;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
@ -762,7 +761,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
|
|
|
|
|
ccsGetValueListFromIntArray (array, i, setting);
|
|
|
|
|
ccsSetList (setting, l);
|
|
|
|
|
ccsSettingValueListFree (l, TRUE);
|
|
|
|
|
ccsSettingValueListFree (l, true);
|
|
|
|
|
delete array;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
@ -790,7 +789,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
|
|
|
|
|
ccsGetValueListFromStringArray (array, i, setting);
|
|
|
|
|
ccsSetList (setting, l);
|
|
|
|
|
ccsSettingValueListFree (l, TRUE);
|
|
|
|
|
ccsSettingValueListFree (l, true);
|
|
|
|
|
|
|
|
|
|
for (int j = 0; j < i; j++)
|
|
|
|
|
free (array[j]);
|
|
|
|
@ -823,7 +822,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
|
|
|
|
|
ccsGetValueListFromStringArray (array, i, setting);
|
|
|
|
|
ccsSetList (setting, l);
|
|
|
|
|
ccsSettingValueListFree (l, TRUE);
|
|
|
|
|
ccsSettingValueListFree (l, true);
|
|
|
|
|
|
|
|
|
|
for (int j = 0; j < i; j++)
|
|
|
|
|
free (array[j]);
|
|
|
|
@ -852,7 +851,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
|
|
|
|
|
ccsGetValueListFromFloatArray (array, i, setting);
|
|
|
|
|
ccsSetList (setting, l);
|
|
|
|
|
ccsSettingValueListFree (l, TRUE);
|
|
|
|
|
ccsSettingValueListFree (l, true);
|
|
|
|
|
delete array;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
@ -887,7 +886,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
|
|
|
|
|
ccsGetValueListFromColorArray (array, i, setting);
|
|
|
|
|
ccsSetList (setting, l);
|
|
|
|
|
ccsSettingValueListFree (l, TRUE);
|
|
|
|
|
ccsSettingValueListFree (l, true);
|
|
|
|
|
delete array;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
@ -914,7 +913,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ccsSetList (setting, l);
|
|
|
|
|
ccsSettingValueListFree (l, TRUE);
|
|
|
|
|
ccsSettingValueListFree (l, true);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case TypeButton:
|
|
|
|
@ -939,7 +938,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ccsSetList (setting, l);
|
|
|
|
|
ccsSettingValueListFree (l, TRUE);
|
|
|
|
|
ccsSettingValueListFree (l, true);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case TypeEdge:
|
|
|
|
@ -961,7 +960,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ccsSetList (setting, l);
|
|
|
|
|
ccsSettingValueListFree (l, TRUE);
|
|
|
|
|
ccsSettingValueListFree (l, true);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case TypeBell:
|
|
|
|
@ -976,12 +975,12 @@ readSetting (CCSContext *c,
|
|
|
|
|
for (it = list.begin(); it != list.end(); it++)
|
|
|
|
|
{
|
|
|
|
|
val = (CCSSettingValue*) malloc (sizeof (CCSSettingValue));
|
|
|
|
|
val->value.asBell = ((*it)) ? TRUE : FALSE;
|
|
|
|
|
val->value.asBell = ((*it)) ? true : false;
|
|
|
|
|
l = ccsSettingValueListAppend (l, val);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ccsSetList (setting, l);
|
|
|
|
|
ccsSettingValueListFree (l, TRUE);
|
|
|
|
|
ccsSettingValueListFree (l, true);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@ -1026,7 +1025,7 @@ readSetting (CCSContext *c,
|
|
|
|
|
break;
|
|
|
|
|
case TypeBell:
|
|
|
|
|
{
|
|
|
|
|
Bool val = (cfg->readBoolEntry (key)) ? TRUE : FALSE;
|
|
|
|
|
Bool val = cfg->readBoolEntry (key);
|
|
|
|
|
ccsSetBell (setting, val);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
@ -1781,11 +1780,11 @@ readInit (CCSContext *c)
|
|
|
|
|
|
|
|
|
|
cFiles->main = new KSimpleConfig (configName);
|
|
|
|
|
ccsRemoveFileWatch (cFiles->watch);
|
|
|
|
|
cFiles->watch = ccsAddFileWatch (wFile.ascii(), TRUE,
|
|
|
|
|
cFiles->watch = ccsAddFileWatch (wFile.ascii(), true,
|
|
|
|
|
reload, (void *) c);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
@ -1818,7 +1817,7 @@ writeInit (CCSContext *c)
|
|
|
|
|
|
|
|
|
|
cFiles->main = new KSimpleConfig (configName);
|
|
|
|
|
ccsRemoveFileWatch (cFiles->watch);
|
|
|
|
|
cFiles->watch = ccsAddFileWatch (wFile.ascii(), TRUE,
|
|
|
|
|
cFiles->watch = ccsAddFileWatch (wFile.ascii(), true,
|
|
|
|
|
reload, (void *) c);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1826,7 +1825,7 @@ writeInit (CCSContext *c)
|
|
|
|
|
ccsDisableFileWatch (cFiles->twinWatch);
|
|
|
|
|
ccsDisableFileWatch (cFiles->globalWatch);
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
@ -1878,18 +1877,18 @@ init (CCSContext *c)
|
|
|
|
|
cFiles->twin->setGroup ("Windows");
|
|
|
|
|
cFiles->global->setGroup ("Global Shortcuts");
|
|
|
|
|
|
|
|
|
|
cFiles->watch = ccsAddFileWatch (wFile.ascii(), TRUE, reload, (void *) c);
|
|
|
|
|
cFiles->watch = ccsAddFileWatch (wFile.ascii(), true, reload, (void *) c);
|
|
|
|
|
|
|
|
|
|
wFile = TDEGlobal::dirs()->saveLocation ("config",
|
|
|
|
|
TQString(), false) + "twinrc";
|
|
|
|
|
cFiles->twinWatch = ccsAddFileWatch (wFile.ascii(), TRUE, reload,
|
|
|
|
|
cFiles->twinWatch = ccsAddFileWatch (wFile.ascii(), true, reload,
|
|
|
|
|
(void *) c);
|
|
|
|
|
wFile = TDEGlobal::dirs()->saveLocation ("config",
|
|
|
|
|
TQString(), false) + "kdeglobals";
|
|
|
|
|
cFiles->globalWatch = ccsAddFileWatch (wFile.ascii(), TRUE, reload,
|
|
|
|
|
cFiles->globalWatch = ccsAddFileWatch (wFile.ascii(), true, reload,
|
|
|
|
|
(void *) c);
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Bool
|
|
|
|
@ -1915,7 +1914,7 @@ fini (CCSContext *)
|
|
|
|
|
|
|
|
|
|
cFiles = NULL;
|
|
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Bool
|
|
|
|
@ -1935,7 +1934,7 @@ deleteProfile (CCSContext *,
|
|
|
|
|
if (TQFile::exists (file) )
|
|
|
|
|
return TQFile::remove (file);
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static CCSBackendVTable tdeconfigVTable =
|
|
|
|
|