Do

Merge lp:~mjs7231/do/force-classic-window into lp:do

Proposed by MShepanski
Status: Merged
Merged at revision: 1377
Proposed branch: lp:~mjs7231/do/force-classic-window
Merge into: lp:do
Diff against target: 64 lines (+20/-1)
3 files modified
Do/src/CorePreferences.cs (+7/-0)
Do/src/Do.Core/Controller.cs (+1/-1)
data/gnome-do.schemas.in (+12/-0)
To merge this branch: bzr merge lp:~mjs7231/do/force-classic-window
Reviewer Review Type Date Requested Status
Chris Halse Rogers Pending
Review via email: mp+93764@code.launchpad.net

Description of the change

Adds a boolean gconf option named ForceClassicWindow. This will force GnomeDo to use the ClassicWindow class when rendering the main UI. I found this is actually a better alternative to running compisited when in Virtualbox Seamless mode.

There is no UI option for this in the Gnome-Do preferences. I noticed the preference options change when running in ClassicWindow() mode, thus I thought this option is pretty too low level to be tinkering with in that area.

To post a comment you must log in.
lp:~mjs7231/do/force-classic-window updated
1373. By MShepanski

Add gconf option to force classic window

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Do/src/CorePreferences.cs'
--- Do/src/CorePreferences.cs 2010-12-04 09:56:11 +0000
+++ Do/src/CorePreferences.cs 2012-02-20 04:46:23 +0000
@@ -35,11 +35,13 @@
35 const string QuietStartKey = "QuietStart";35 const string QuietStartKey = "QuietStart";
36 const string StartAtLoginKey = "StartAtLogin";36 const string StartAtLoginKey = "StartAtLogin";
37 const string AlwaysShowResultsKey = "AlwaysShowResults";37 const string AlwaysShowResultsKey = "AlwaysShowResults";
38 const string ForceClassicWindowKey = "ForceClassicWindow";
3839
39 const string ThemeDefaultValue = "Classic";40 const string ThemeDefaultValue = "Classic";
40 const bool QuietStartDefaultValue = false;41 const bool QuietStartDefaultValue = false;
41 const bool StartAtLoginDefaultValue = false;42 const bool StartAtLoginDefaultValue = false;
42 const bool AlwaysShowResultsDefaultValue = false;43 const bool AlwaysShowResultsDefaultValue = false;
44 const bool ForceClassicWindowDefaultValue = false;
43 const string TextModeKeybindingDefaultValue = "period";45 const string TextModeKeybindingDefaultValue = "period";
44 const string SummonKeybindingDefaultValue = "<Super>space";46 const string SummonKeybindingDefaultValue = "<Super>space";
4547
@@ -91,6 +93,11 @@
91 set { if (AlwaysShowResults != value) Preferences.Set (AlwaysShowResultsKey, value); }93 set { if (AlwaysShowResults != value) Preferences.Set (AlwaysShowResultsKey, value); }
92 }94 }
93 95
96 public bool ForceClassicWindow {
97 get { return Preferences.Get (ForceClassicWindowKey, ForceClassicWindowDefaultValue); }
98 set { if (ForceClassicWindow != value) Preferences.Set (ForceClassicWindowKey, value); }
99 }
100
94 static bool HasOption (string option)101 static bool HasOption (string option)
95 {102 {
96 return Env.GetCommandLineArgs ().Contains (option);103 return Env.GetCommandLineArgs ().Contains (option);
97104
=== modified file 'Do/src/Do.Core/Controller.cs'
--- Do/src/Do.Core/Controller.cs 2012-02-05 10:43:22 +0000
+++ Do/src/Do.Core/Controller.cs 2012-02-20 04:46:23 +0000
@@ -218,7 +218,7 @@
218 218
219 Orientation = ControlOrientation.Vertical;219 Orientation = ControlOrientation.Vertical;
220220
221 if (Screen.Default.IsComposited) {221 if ((Screen.Default.IsComposited) && (!Do.Preferences.ForceClassicWindow)) {
222 window = InterfaceManager.MaybeGetInterfaceNamed (themeName) ?? new ClassicWindow ();222 window = InterfaceManager.MaybeGetInterfaceNamed (themeName) ?? new ClassicWindow ();
223 } else {223 } else {
224 window = new ClassicWindow ();224 window = new ClassicWindow ();
225225
=== modified file 'data/gnome-do.schemas.in'
--- data/gnome-do.schemas.in 2010-12-04 09:56:11 +0000
+++ data/gnome-do.schemas.in 2012-02-20 04:46:23 +0000
@@ -70,5 +70,17 @@
70 </locale>70 </locale>
71 </schema>71 </schema>
7272
73 <schema>
74 <key>/schemas/apps/gnome-do/preferences/Do/CorePreferences/ForceClassicWindow</key>
75 <applyto>/apps/gnome-do/preferences/Do/CorePreferences/ForceClassicWindow</applyto>
76 <owner>gnome-do</owner>
77 <type>bool</type>
78 <default>false</default>
79 <locale name="C">
80 <short>Force classic window</short>
81 <long>Force classic window rendering (disable composite rendering).</long>
82 </locale>
83 </schema>
84
73 </schemalist>85 </schemalist>
74</gconfschemafile>86</gconfschemafile>