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
1=== modified file 'Do/src/CorePreferences.cs'
2--- Do/src/CorePreferences.cs 2010-12-04 09:56:11 +0000
3+++ Do/src/CorePreferences.cs 2012-02-20 04:46:23 +0000
4@@ -35,11 +35,13 @@
5 const string QuietStartKey = "QuietStart";
6 const string StartAtLoginKey = "StartAtLogin";
7 const string AlwaysShowResultsKey = "AlwaysShowResults";
8+ const string ForceClassicWindowKey = "ForceClassicWindow";
9
10 const string ThemeDefaultValue = "Classic";
11 const bool QuietStartDefaultValue = false;
12 const bool StartAtLoginDefaultValue = false;
13 const bool AlwaysShowResultsDefaultValue = false;
14+ const bool ForceClassicWindowDefaultValue = false;
15 const string TextModeKeybindingDefaultValue = "period";
16 const string SummonKeybindingDefaultValue = "<Super>space";
17
18@@ -91,6 +93,11 @@
19 set { if (AlwaysShowResults != value) Preferences.Set (AlwaysShowResultsKey, value); }
20 }
21
22+ public bool ForceClassicWindow {
23+ get { return Preferences.Get (ForceClassicWindowKey, ForceClassicWindowDefaultValue); }
24+ set { if (ForceClassicWindow != value) Preferences.Set (ForceClassicWindowKey, value); }
25+ }
26+
27 static bool HasOption (string option)
28 {
29 return Env.GetCommandLineArgs ().Contains (option);
30
31=== modified file 'Do/src/Do.Core/Controller.cs'
32--- Do/src/Do.Core/Controller.cs 2012-02-05 10:43:22 +0000
33+++ Do/src/Do.Core/Controller.cs 2012-02-20 04:46:23 +0000
34@@ -218,7 +218,7 @@
35
36 Orientation = ControlOrientation.Vertical;
37
38- if (Screen.Default.IsComposited) {
39+ if ((Screen.Default.IsComposited) && (!Do.Preferences.ForceClassicWindow)) {
40 window = InterfaceManager.MaybeGetInterfaceNamed (themeName) ?? new ClassicWindow ();
41 } else {
42 window = new ClassicWindow ();
43
44=== modified file 'data/gnome-do.schemas.in'
45--- data/gnome-do.schemas.in 2010-12-04 09:56:11 +0000
46+++ data/gnome-do.schemas.in 2012-02-20 04:46:23 +0000
47@@ -70,5 +70,17 @@
48 </locale>
49 </schema>
50
51+ <schema>
52+ <key>/schemas/apps/gnome-do/preferences/Do/CorePreferences/ForceClassicWindow</key>
53+ <applyto>/apps/gnome-do/preferences/Do/CorePreferences/ForceClassicWindow</applyto>
54+ <owner>gnome-do</owner>
55+ <type>bool</type>
56+ <default>false</default>
57+ <locale name="C">
58+ <short>Force classic window</short>
59+ <long>Force classic window rendering (disable composite rendering).</long>
60+ </locale>
61+ </schema>
62+
63 </schemalist>
64 </gconfschemafile>