+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "fullMaximization" << ends;
+ rclass << rscreen.str() << "FullMaximization" << ends;
+ if (config.getValue(rname.str(), rclass.str(), b))
+ resource.full_max = b;
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "focusNewWindows" << ends;
+ rclass << rscreen.str() << "FocusNewWindows" << ends;
+ if (config.getValue(rname.str(), rclass.str(), b))
+ resource.focus_new = b;
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "focusLastWindow" << ends;
+ rclass << rscreen.str() << "FocusLastWindow" << ends;
+ if (config.getValue(rname.str(), rclass.str(), b))
+ resource.focus_last = b;
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "rowPlacementDirection" << ends;
+ rclass << rscreen.str() << "RowPlacementDirection" << ends;
+ if (config.getValue(rname.str(), rclass.str(), s)) {
+ if (0 == strncasecmp(s.c_str(), "RightToLeft", s.length()))
+ resource.row_direction = RightLeft;
+ else if (0 == strncasecmp(s.c_str(), "LeftToRight", s.length()))
+ resource.row_direction = LeftRight;
+ }
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "colPlacementDirection" << ends;
+ rclass << rscreen.str() << "ColPlacementDirection" << ends;
+ if (config.getValue(rname.str(), rclass.str(), s)) {
+ if (0 == strncasecmp(s.c_str(), "BottomToTop", s.length()))
+ resource.col_direction = BottomTop;
+ else if (0 == strncasecmp(s.c_str(), "TopToBottom", s.length()))
+ resource.col_direction = TopBottom;
+ }
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "workspaces" << ends;
+ rclass << rscreen.str() << "Workspaces" << ends;
+ if (config.getValue(rname.str(), rclass.str(), l))
+ resource.workspaces = l;
+
+ removeWorkspaceNames();
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "workspaceNames" << ends;
+ rclass << rscreen.str() << "WorkspaceNames" << ends;
+ if (config.getValue(rname.str(), rclass.str(), s)) {
+ std::string::const_iterator it = s.begin(), end = s.end();
+ while(1) {
+ std::string::const_iterator tmp = it;// current string.begin()
+ it = std::find(tmp, end, ','); // look for comma between tmp and end
+ std::string name(tmp, it); // name = s[tmp:it]
+ addWorkspaceName(name.c_str());
+ if (it == end)
+ break;
+ ++it;
+ }
+ }
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "focusModel" << ends;
+ rclass << rscreen.str() << "FocusModel" << ends;
+ if (config.getValue(rname.str(), rclass.str(), s)) {
+ if (0 == strncasecmp(s.c_str(), "ClickToFocus", s.length())) {
+ resource.auto_raise = false;
+ resource.sloppy_focus = false;
+ } else if (0 == strncasecmp(s.c_str(), "AutoRaiseSloppyFocus",
+ s.length())) {
+ resource.sloppy_focus = true;
+ resource.auto_raise = true;
+ } else if (0 == strncasecmp(s.c_str(), "SloppyFocus", s.length())) {
+ resource.sloppy_focus = true;
+ resource.auto_raise = false;
+ }
+ }
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "windowZones" << ends;
+ rclass << rscreen.str() << "WindowZones" << ends;
+ if (config.getValue(rname.str(), rclass.str(), l))
+ resource.zones = (l == 1 || l == 2 || l == 4) ? l : 1;
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "windowPlacement" << ends;
+ rclass << rscreen.str() << "WindowPlacement" << ends;
+ if (config.getValue(rname.str(), rclass.str(), s)) {
+ if (0 == strncasecmp(s.c_str(), "RowSmartPlacement", s.length()))
+ resource.placement_policy = RowSmartPlacement;
+ else if (0 == strncasecmp(s.c_str(), "ColSmartPlacement", s.length()))
+ resource.placement_policy = ColSmartPlacement;
+ else if (0 == strncasecmp(s.c_str(), "BestFitPlacement", s.length()))
+ resource.placement_policy = BestFitPlacement;
+ else if (0 == strncasecmp(s.c_str(), "CascadePlacement", s.length()))
+ resource.placement_policy = CascadePlacement;
+ }
+
+#ifdef HAVE_STRFTIME
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "strftimeFormat" << ends;
+ rclass << rscreen.str() << "StrftimeFormat" << ends;
+ if (config.getValue(rname.str(), rclass.str(), s))
+ resource.strftime_format = bstrdup(s.c_str());
+#else // !HAVE_STRFTIME
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "dateFormat" << ends;
+ rclass << rscreen.str() << "DateFormat" << ends;
+ if (config.getValue(rname.str(), rclass.str(), s)) {
+ if (strncasecmp(s.c_str(), "European", s.length()))
+ resource.date_format = B_EuropeanDate;
+ else if (strncasecmp(s.c_str(), "American", s.length()))
+ resource.date_format = B_AmericanDate;
+ }
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "clockFormat" << ends;
+ rclass << rscreen.str() << "ClockFormat" << ends;
+ if (config.getValue(rname.str(), rclass.str(), l)) {
+ if (clock == 24)
+ resource.clock24hour = true;
+ else if (clock == 12)
+ resource.clock24hour = false;
+#endif // HAVE_STRFTIME
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "edgeSnapThreshold" << ends;
+ rclass << rscreen.str() << "EdgeSnapThreshold" << ends;
+ if (config.getValue(rname.str(), rclass.str(), l))
+ resource.edge_snap_threshold = l;
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "imageDither" << ends;
+ rclass << rscreen.str() << "ImageDither" << ends;
+ if (config.getValue(rname.str(), rclass.str(), b))
+ resource.image_dither = b;
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "rootCommand" << ends;
+ rclass << rscreen.str() << "RootCommand" << ends;
+ if (config.getValue(rname.str(), rclass.str(), s))
+ resource.root_command = bstrdup(s.c_str());
+
+ rname.seekp(0); rclass.seekp(0);
+ rname << rscreen.str() << "opaqueMove" << ends;
+ rclass << rscreen.str() << "OpaqueMove" << ends;
+ if (config.getValue(rname.str(), rclass.str(), b))
+ resource.opaque_move = b;