diff options
author | Timothy Pearson <[email protected]> | 2011-11-07 20:14:35 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-11-07 20:14:35 -0600 |
commit | 84b69f71b5a53d20dac1732a5efaa841e44824ad (patch) | |
tree | 0fb96ea6c0eb87003b02908d3d8487fa72d8a0d3 /settings-backend | |
parent | 0ba9b712b383efd6a67cd7135be117409b501a19 (diff) | |
download | compizconfig-backend-tdeconfig-84b69f71b5a53d20dac1732a5efaa841e44824ad.tar.gz compizconfig-backend-tdeconfig-84b69f71b5a53d20dac1732a5efaa841e44824ad.zip |
Rename kwin to twin (part 1 of 2)
Diffstat (limited to 'settings-backend')
-rw-r--r-- | settings-backend/kconfig_backend.cpp | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/settings-backend/kconfig_backend.cpp b/settings-backend/kconfig_backend.cpp index 50be63b..a60ca15 100644 --- a/settings-backend/kconfig_backend.cpp +++ b/settings-backend/kconfig_backend.cpp @@ -58,11 +58,11 @@ typedef struct _ConfigFiles { KSimpleConfig *main; TQString profile; - KConfig *kwin; + KConfig *twin; KConfig *global; Bool modified; unsigned int watch; - unsigned int kwinWatch; + unsigned int twinWatch; unsigned int globalWatch; } @@ -216,14 +216,14 @@ reload (unsigned int, CCSContext *context = (CCSContext *) closure; ccsDisableFileWatch (cFiles->watch); - ccsDisableFileWatch (cFiles->kwinWatch); + ccsDisableFileWatch (cFiles->twinWatch); ccsDisableFileWatch (cFiles->globalWatch); cFiles->main->reparseConfiguration(); - cFiles->kwin->reparseConfiguration(); + cFiles->twin->reparseConfiguration(); cFiles->global->reparseConfiguration(); ccsReadSettings (context); ccsEnableFileWatch (cFiles->watch); - ccsEnableFileWatch (cFiles->kwinWatch); + ccsEnableFileWatch (cFiles->twinWatch); ccsEnableFileWatch (cFiles->globalWatch); } @@ -245,7 +245,7 @@ static void KdeIntToCCS (CCSSetting *setting, int num) { - KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->kwin; + KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->twin; int val = cfg->readNumEntry (specialOptions[num].kdeName); @@ -256,7 +256,7 @@ static void KdeBoolToCCS (CCSSetting *setting, int num) { - KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->kwin; + KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->twin; Bool val = (cfg->readBoolEntry (specialOptions[num].kdeName))? TRUE : FALSE; @@ -267,7 +267,7 @@ static void KdeKeyToCCS (CCSSetting *setting, int num) { - KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->kwin; + KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->twin; KKey key (cfg->readEntry (specialOptions[num].kdeName) ); @@ -350,20 +350,20 @@ readIntegratedOption (CCSSetting *setting) } else if (specialOptions[option].settingName == "click_to_focus") { - Bool val = (cFiles->kwin->readEntry ("FocusPolicy") == + Bool val = (cFiles->twin->readEntry ("FocusPolicy") == "ClickToFocus") ? TRUE : FALSE; ccsSetBool (setting, val); } else if (specialOptions[option].settingName == "number_of_desktops") { - cFiles->kwin->setGroup ("Desktops"); + cFiles->twin->setGroup ("Desktops"); KdeIntToCCS (setting, option); - cFiles->kwin->setGroup ("Windows"); + cFiles->twin->setGroup ("Windows"); } else if (specialOptions[option].settingName == "mode" && specialOptions[option].pluginName == "resize") { - TQString mode = cFiles->kwin->readEntry ("ResizeMode"); + TQString mode = cFiles->twin->readEntry ("ResizeMode"); int imode = -1; int result = 0; @@ -400,8 +400,8 @@ readIntegratedOption (CCSSetting *setting) else if (specialOptions[option].settingName == "resistance_distance" || specialOptions[option].settingName == "attraction_distance") { - int val1 = cFiles->kwin->readNumEntry ("WindowSnapZone"); - int val2 = cFiles->kwin->readNumEntry ("BorderSnapZone"); + int val1 = cFiles->twin->readNumEntry ("WindowSnapZone"); + int val2 = cFiles->twin->readNumEntry ("BorderSnapZone"); int result = KMAX (val1, val2); if (result == 0) @@ -412,8 +412,8 @@ readIntegratedOption (CCSSetting *setting) } else if (specialOptions[option].settingName == "edges_categories") { - int val1 = cFiles->kwin->readNumEntry ("WindowSnapZone"); - int val2 = cFiles->kwin->readNumEntry ("BorderSnapZone"); + int val1 = cFiles->twin->readNumEntry ("WindowSnapZone"); + int val2 = cFiles->twin->readNumEntry ("BorderSnapZone"); int intList[2] = {0, 0}; int num = 0; @@ -435,11 +435,11 @@ readIntegratedOption (CCSSetting *setting) specialOptions[option].settingName == "prev_key") { bool val1; - bool val2 = (cFiles->kwin->readEntry ("AltTabStyle") == "KDE"); + bool val2 = (cFiles->twin->readEntry ("AltTabStyle") == "KDE"); - cFiles->kwin->setGroup ("TabBox"); - val1 = cFiles->kwin->readBoolEntry ("TraverseAll"); - cFiles->kwin->setGroup ("Windows"); + cFiles->twin->setGroup ("TabBox"); + val1 = cFiles->twin->readBoolEntry ("TraverseAll"); + cFiles->twin->setGroup ("Windows"); if (val2 && !val1) KdeKeyToCCS (setting, option); @@ -459,11 +459,11 @@ readIntegratedOption (CCSSetting *setting) specialOptions[option].settingName == "prev_all_key") { bool val1; - bool val2 = (cFiles->kwin->readEntry ("AltTabStyle") == "KDE"); + bool val2 = (cFiles->twin->readEntry ("AltTabStyle") == "KDE"); - cFiles->kwin->setGroup ("TabBox"); - val1 = cFiles->kwin->readBoolEntry ("TraverseAll"); - cFiles->kwin->setGroup ("Windows"); + cFiles->twin->setGroup ("TabBox"); + val1 = cFiles->twin->readBoolEntry ("TraverseAll"); + cFiles->twin->setGroup ("Windows"); if (val2 && val1) KdeKeyToCCS (setting, option); @@ -482,7 +482,7 @@ readIntegratedOption (CCSSetting *setting) else if (specialOptions[option].settingName == "next_no_popup_key" || specialOptions[option].settingName == "prev_no_popup_key") { - bool val2 = (cFiles->kwin->readEntry ("AltTabStyle") == "KDE"); + bool val2 = (cFiles->twin->readEntry ("AltTabStyle") == "KDE"); if (!val2) KdeKeyToCCS (setting, option); @@ -501,7 +501,7 @@ readIntegratedOption (CCSSetting *setting) else if (specialOptions[option].settingName == "edge_flip_window" || specialOptions[option].settingName == "edgeflip_move") { - int val = cFiles->kwin->readNumEntry ("ElectricBorders"); + int val = cFiles->twin->readNumEntry ("ElectricBorders"); if (val > 0) ccsSetBool (setting, TRUE); @@ -511,7 +511,7 @@ readIntegratedOption (CCSSetting *setting) else if (specialOptions[option].settingName == "edge_flip_pointer" || specialOptions[option].settingName == "edgeflip_pointer") { - int val = cFiles->kwin->readNumEntry ("ElectricBorders"); + int val = cFiles->twin->readNumEntry ("ElectricBorders"); if (val > 1) ccsSetBool (setting, TRUE); @@ -521,7 +521,7 @@ readIntegratedOption (CCSSetting *setting) else if (specialOptions[option].settingName == "mode" && specialOptions[option].pluginName == "place") { - TQString mode = cFiles->kwin->readEntry ("Placement"); + TQString mode = cFiles->twin->readEntry ("Placement"); int result = 0; @@ -1041,7 +1041,7 @@ static void CCSIntToKde (CCSSetting *setting, int num) { - KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->kwin; + KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->twin; int val; @@ -1059,7 +1059,7 @@ static void CCSBoolToKde (CCSSetting *setting, int num) { - KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->kwin; + KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->twin; Bool val; @@ -1077,7 +1077,7 @@ static void CCSKeyToKde (CCSSetting *setting, int num) { - KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->kwin; + KConfig *cfg = (specialOptions[num].global) ? cFiles->global : cFiles->twin; CCSSettingKeyValue keyVal; @@ -1150,7 +1150,7 @@ writeIntegratedOption (CCSSetting *setting) if (specialOptions[option].settingName == "click_to_focus") { - TQString mode = cFiles->kwin->readEntry ("FocusPolicy"); + TQString mode = cFiles->twin->readEntry ("FocusPolicy"); TQString val = "ClickToFocus"; Bool bVal; @@ -1165,20 +1165,20 @@ writeIntegratedOption (CCSSetting *setting) if (mode != val) { cFiles->modified = true; - cFiles->kwin->writeEntry ("FocusPolicy", val); + cFiles->twin->writeEntry ("FocusPolicy", val); } } if (specialOptions[option].settingName == "number_of_desktops") { - cFiles->kwin->setGroup ("Desktops"); + cFiles->twin->setGroup ("Desktops"); CCSIntToKde (setting, option); - cFiles->kwin->setGroup ("Windows"); + cFiles->twin->setGroup ("Windows"); } if (specialOptions[option].settingName == "mode" && specialOptions[option].pluginName == "resize") { - TQString mode = cFiles->kwin->readEntry("ResizeMode"); + TQString mode = cFiles->twin->readEntry("ResizeMode"); TQString val = "Opaque"; int iVal; if (ccsGetInt(setting, &iVal) && (iVal == 1 || iVal == 2)) @@ -1188,7 +1188,7 @@ writeIntegratedOption (CCSSetting *setting) if (mode != val) { cFiles->modified = true; - cFiles->kwin->writeEntry("ResizeMode",val); + cFiles->twin->writeEntry("ResizeMode",val); } cFiles->main->writeEntry(specialOptions[option].settingName + " (Integrated)",iVal); } @@ -1232,14 +1232,14 @@ writeIntegratedOption (CCSSetting *setting) free (values); if (edge) - cFiles->kwin->writeEntry ("BorderSnapZone", iVal); + cFiles->twin->writeEntry ("BorderSnapZone", iVal); else - cFiles->kwin->writeEntry ("BorderSnapZone", 0); + cFiles->twin->writeEntry ("BorderSnapZone", 0); if (window) - cFiles->kwin->writeEntry ("WindowSnapZone", iVal); + cFiles->twin->writeEntry ("WindowSnapZone", iVal); else - cFiles->kwin->writeEntry ("WindowSnapZone", 0); + cFiles->twin->writeEntry ("WindowSnapZone", 0); if (window | edge) cFiles->modified = true; cFiles->main->writeEntry ("snap_distance (Integrated)",iVal); @@ -1257,11 +1257,11 @@ writeIntegratedOption (CCSSetting *setting) CCSKeyToKde (setting, option); - cFiles->kwin->setGroup ("TabBox"); - cFiles->kwin->writeEntry ("TraverseAll", false); - cFiles->kwin->setGroup ("Windows"); + cFiles->twin->setGroup ("TabBox"); + cFiles->twin->writeEntry ("TraverseAll", false); + cFiles->twin->setGroup ("Windows"); - cFiles->kwin->writeEntry ("AltTabStyle", "KDE"); + cFiles->twin->writeEntry ("AltTabStyle", "KDE"); cFiles->modified = true; } @@ -1278,11 +1278,11 @@ writeIntegratedOption (CCSSetting *setting) CCSKeyToKde (setting, option); - cFiles->kwin->setGroup ("TabBox"); - cFiles->kwin->writeEntry ("TraverseAll", true); - cFiles->kwin->setGroup ("Windows"); + cFiles->twin->setGroup ("TabBox"); + cFiles->twin->writeEntry ("TraverseAll", true); + cFiles->twin->setGroup ("Windows"); - cFiles->kwin->writeEntry ("AltTabStyle", "KDE"); + cFiles->twin->writeEntry ("AltTabStyle", "KDE"); cFiles->modified = true; } @@ -1299,23 +1299,23 @@ writeIntegratedOption (CCSSetting *setting) CCSKeyToKde (setting, option); - cFiles->kwin->writeEntry ("AltTabStyle", "CDE"); + cFiles->twin->writeEntry ("AltTabStyle", "CDE"); cFiles->modified = true; } else if (specialOptions[option].settingName == "edge_flip_window" || specialOptions[option].settingName == "edgeflip_move") { - int oVal = cFiles->kwin->readNumEntry ("ElectricBorders"); + int oVal = cFiles->twin->readNumEntry ("ElectricBorders"); Bool val; if (!ccsGetBool (setting, &val)) break; if (val) - cFiles->kwin->writeEntry ("ElectricBorders", KMAX (1, oVal)); + cFiles->twin->writeEntry ("ElectricBorders", KMAX (1, oVal)); else - cFiles->kwin->writeEntry ("ElectricBorders", 0); + cFiles->twin->writeEntry ("ElectricBorders", 0); cFiles->modified = true; } else if (specialOptions[option].settingName == "edge_flip_pointer" || @@ -1347,9 +1347,9 @@ writeIntegratedOption (CCSSetting *setting) if (val) - cFiles->kwin->writeEntry ("ElectricBorders", 2); + cFiles->twin->writeEntry ("ElectricBorders", 2); else - cFiles->kwin->writeEntry ("ElectricBorders", oVal); + cFiles->twin->writeEntry ("ElectricBorders", oVal); cFiles->modified = true; } else if (specialOptions[option].settingName == "mode" && @@ -1362,19 +1362,19 @@ writeIntegratedOption (CCSSetting *setting) switch (val) { case 0: - cFiles->kwin->writeEntry ("Placement", "Cascade"); + cFiles->twin->writeEntry ("Placement", "Cascade"); break; case 1: - cFiles->kwin->writeEntry ("Placement", "Centered"); + cFiles->twin->writeEntry ("Placement", "Centered"); break; case 2: - cFiles->kwin->writeEntry ("Placement", "Smart"); + cFiles->twin->writeEntry ("Placement", "Smart"); break; case 3: - cFiles->kwin->writeEntry ("Placement", "Maximizing"); + cFiles->twin->writeEntry ("Placement", "Maximizing"); break; case 4: - cFiles->kwin->writeEntry ("Placement", "Random"); + cFiles->twin->writeEntry ("Placement", "Random"); break; default: break; @@ -1823,7 +1823,7 @@ writeInit (CCSContext *c) } ccsDisableFileWatch (cFiles->watch); - ccsDisableFileWatch (cFiles->kwinWatch); + ccsDisableFileWatch (cFiles->twinWatch); ccsDisableFileWatch (cFiles->globalWatch); return TRUE; @@ -1835,16 +1835,16 @@ writeDone (CCSContext *) cFiles->main->sync(); if (cFiles->modified) { - cFiles->kwin->sync(); + cFiles->twin->sync(); cFiles->global->sync(); DCOPClient *client = kapp->dcopClient(); if (!client->isAttached()) client->attach(); - client->send("kwin", "KWinInterface", "reconfigure()", TQString("")); + client->send("twin", "KWinInterface", "reconfigure()", TQString("")); cFiles->modified = false; } ccsEnableFileWatch (cFiles->watch); - ccsEnableFileWatch (cFiles->kwinWatch); + ccsEnableFileWatch (cFiles->twinWatch); ccsEnableFileWatch (cFiles->globalWatch); } @@ -1872,17 +1872,17 @@ init (CCSContext *c) createFile (wFile); cFiles->main = new KSimpleConfig (configName); - cFiles->kwin = new KConfig ("kwinrc"); + cFiles->twin = new KConfig ("twinrc"); cFiles->global = new KConfig ("kdeglobals"); - cFiles->kwin->setGroup ("Windows"); + cFiles->twin->setGroup ("Windows"); cFiles->global->setGroup ("Global Shortcuts"); cFiles->watch = ccsAddFileWatch (wFile.ascii(), TRUE, reload, (void *) c); wFile = KGlobal::dirs()->saveLocation ("config", - TQString(), false) + "kwinrc"; - cFiles->kwinWatch = ccsAddFileWatch (wFile.ascii(), TRUE, reload, + TQString(), false) + "twinrc"; + cFiles->twinWatch = ccsAddFileWatch (wFile.ascii(), TRUE, reload, (void *) c); wFile = KGlobal::dirs()->saveLocation ("config", TQString(), false) + "kdeglobals"; @@ -1898,14 +1898,14 @@ fini (CCSContext *) if (cFiles) { ccsRemoveFileWatch (cFiles->watch); - ccsRemoveFileWatch (cFiles->kwinWatch); + ccsRemoveFileWatch (cFiles->twinWatch); ccsRemoveFileWatch (cFiles->globalWatch); if (cFiles->main) delete cFiles->main; - if (cFiles->kwin) - delete cFiles->kwin; + if (cFiles->twin) + delete cFiles->twin; if (cFiles->global) delete cFiles->global; |