61
61
const std::string SETTINGS_NAME = "org.gnome.desktop.wm.preferences";
62
62
const std::string FONT_KEY = "titlebar-font";
63
63
const std::string USE_SYSTEM_FONT_KEY = "titlebar-uses-system-font";
64
const std::string ACTION_DOUBLE_CLICK = "action-double-click-titlebar";
65
const std::string ACTION_MIDDLE_CLICK = "action-middle-click-titlebar";
66
const std::string ACTION_RIGHT_CLICK = "action-right-click-titlebar";
65
68
const std::string UNITY_SETTINGS_NAME = "com.canonical.Unity.Decorations";
66
69
const std::string GRAB_WAIT_KEY = "grab-wait";
305
WMAction WMActionFromString(std::string const& action) const
307
if (action == "toggle-shade")
308
return WMAction::TOGGLE_SHADE;
309
else if (action == "toggle-maximize")
310
return WMAction::TOGGLE_MAXIMIZE;
311
else if (action == "toggle-maximize-horizontally")
312
return WMAction::TOGGLE_MAXIMIZE_HORIZONTALLY;
313
else if (action == "toggle-maximize-vertically")
314
return WMAction::TOGGLE_MAXIMIZE_VERTICALLY;
315
else if (action == "minimize")
316
return WMAction::MINIMIZE;
317
else if (action == "shade")
318
return WMAction::SHADE;
319
else if (action == "menu")
320
return WMAction::MENU;
321
else if (action == "lower")
322
return WMAction::LOWER;
324
return WMAction::NONE;
327
WMAction WindowManagerAction(WMEvent event) const
329
std::string action_setting;
333
case WMEvent::DOUBLE_CLICK:
334
action_setting = ACTION_DOUBLE_CLICK;
336
case WMEvent::MIDDLE_CLICK:
337
action_setting = ACTION_MIDDLE_CLICK;
339
case WMEvent::RIGHT_CLICK:
340
action_setting = ACTION_RIGHT_CLICK;
344
glib::String action_string(g_settings_get_string(settings_, action_setting.c_str()));
345
return WMActionFromString(action_string.Str());
302
348
inline GtkStateFlags GtkStateFromWidgetState(WidgetState ws)
776
822
return impl_->glow_color_;
825
WMAction Style::WindowManagerAction(WMEvent event) const
827
return impl_->WindowManagerAction(event);
779
830
int Style::DoubleClickMaxDistance() const
781
832
return impl_->GetSettingValue<int>("gtk-double-click-distance");