Status: | Rejected |
---|---|
Rejected by: | Robert Dyer |
Proposed branch: | lp:~cszikszoy/docky/mmv2 |
Merge into: | lp:docky |
Diff against target: |
509 lines 7 files modified
Docky/Docky/ConfigurationWindow.cs (+18/-27) Docky/Docky/DockController.cs (+63/-5) Docky/Docky/Interface/DockPreferences.cs (+33/-10) Docky/Docky/Interface/DockWindow.cs (+1/-1) Docky/Docky/Interface/IDockPreferences.cs (+2/-0) Docky/gtk-gui/Docky.ConfigurationWindow.cs (+12/-72) Docky/gtk-gui/gui.stetic (+3/-33) |
To merge this branch: | bzr merge lp:~cszikszoy/docky/mmv2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Dyer (community) | Needs Fixing | ||
Review via email: mp+14273@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Chris S. (cszikszoy) wrote : | # |
Revision history for this message
Robert Dyer (psybers) wrote : | # |
One problem I already see is that 'on closing prefs all empty docks are removed'. Good idea... *except* what if I want a dock with only launchers (and no plugins)??? I would have to add a plugin, close it and add a launcher, then reopen and remove the plugin! Tisk Tisk. :-)
review:
Needs Fixing
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Docky/Docky/ConfigurationWindow.cs' | |||
2 | --- Docky/Docky/ConfigurationWindow.cs 2009-10-31 06:57:19 +0000 | |||
3 | +++ Docky/Docky/ConfigurationWindow.cs 2009-11-01 01:20:25 +0000 | |||
4 | @@ -68,7 +68,7 @@ | |||
5 | 68 | theme_combo.Active = i; | 68 | theme_combo.Active = i; |
6 | 69 | } | 69 | } |
7 | 70 | i++; | 70 | i++; |
9 | 71 | } | 71 | } |
10 | 72 | 72 | ||
11 | 73 | SetupConfigAlignment (); | 73 | SetupConfigAlignment (); |
12 | 74 | 74 | ||
13 | @@ -108,16 +108,19 @@ | |||
14 | 108 | 108 | ||
15 | 109 | protected override void OnShown () | 109 | protected override void OnShown () |
16 | 110 | { | 110 | { |
17 | 111 | for (int mon = 0; mon < Screen.Default.NMonitors; mon++) { | ||
18 | 112 | Dock dock; | ||
19 | 113 | while ((dock = Docky.Controller.CreateDock (mon)) != null) { | ||
20 | 114 | dock.ConfigurationClick += HandleDockConfigurationClick; | ||
21 | 115 | dock.EnterConfigurationMode (); | ||
22 | 116 | } | ||
23 | 117 | } | ||
24 | 118 | |||
25 | 111 | foreach (Dock dock in Docky.Controller.Docks) { | 119 | foreach (Dock dock in Docky.Controller.Docks) { |
26 | 112 | dock.EnterConfigurationMode (); | 120 | dock.EnterConfigurationMode (); |
27 | 113 | dock.ConfigurationClick += HandleDockConfigurationClick; | 121 | dock.ConfigurationClick += HandleDockConfigurationClick; |
28 | 114 | } | 122 | } |
29 | 115 | 123 | ||
30 | 116 | if (Docky.Controller.Docks.Count () == 1) { | ||
31 | 117 | ActiveDock = Docky.Controller.Docks.First (); | ||
32 | 118 | SetupConfigAlignment (); | ||
33 | 119 | } | ||
34 | 120 | |||
35 | 121 | KeepAbove = true; | 124 | KeepAbove = true; |
36 | 122 | Stick (); | 125 | Stick (); |
37 | 123 | 126 | ||
38 | @@ -136,11 +139,20 @@ | |||
39 | 136 | 139 | ||
40 | 137 | protected override void OnHidden () | 140 | protected override void OnHidden () |
41 | 138 | { | 141 | { |
42 | 142 | // first delete the empty docks | ||
43 | 143 | Docky.Controller.Docks.ToList ().ForEach (dock => | ||
44 | 144 | { | ||
45 | 145 | if (!dock.Preferences.ItemProviders.Any (provider => provider.Items.Count () > 0)) | ||
46 | 146 | Docky.Controller.DeleteDock (dock); | ||
47 | 147 | }); | ||
48 | 148 | |||
49 | 149 | // for any remaining docks, exit configuration mode | ||
50 | 139 | foreach (Dock dock in Docky.Controller.Docks) { | 150 | foreach (Dock dock in Docky.Controller.Docks) { |
51 | 140 | dock.ConfigurationClick -= HandleDockConfigurationClick; | 151 | dock.ConfigurationClick -= HandleDockConfigurationClick; |
52 | 141 | dock.LeaveConfigurationMode (); | 152 | dock.LeaveConfigurationMode (); |
53 | 142 | dock.UnsetActiveGlow (); | 153 | dock.UnsetActiveGlow (); |
54 | 143 | } | 154 | } |
55 | 155 | |||
56 | 144 | base.OnHidden (); | 156 | base.OnHidden (); |
57 | 145 | } | 157 | } |
58 | 146 | 158 | ||
59 | @@ -148,27 +160,6 @@ | |||
60 | 148 | { | 160 | { |
61 | 149 | Docky.Controller.DockTheme = theme_combo.ActiveText; | 161 | Docky.Controller.DockTheme = theme_combo.ActiveText; |
62 | 150 | } | 162 | } |
63 | 151 | |||
64 | 152 | protected virtual void OnDeleteDockButtonClicked (object sender, System.EventArgs e) | ||
65 | 153 | { | ||
66 | 154 | if (ActiveDock != null) { | ||
67 | 155 | Docky.Controller.DeleteDock (ActiveDock); | ||
68 | 156 | ActiveDock = null; | ||
69 | 157 | SetupConfigAlignment (); | ||
70 | 158 | } | ||
71 | 159 | } | ||
72 | 160 | |||
73 | 161 | protected virtual void OnNewDockButtonClicked (object sender, System.EventArgs e) | ||
74 | 162 | { | ||
75 | 163 | Dock newDock = Docky.Controller.CreateDock (); | ||
76 | 164 | |||
77 | 165 | if (newDock != null) { | ||
78 | 166 | newDock.ConfigurationClick += HandleDockConfigurationClick; | ||
79 | 167 | newDock.EnterConfigurationMode (); | ||
80 | 168 | ActiveDock = newDock; | ||
81 | 169 | SetupConfigAlignment (); | ||
82 | 170 | } | ||
83 | 171 | } | ||
84 | 172 | 163 | ||
85 | 173 | string AutoStartDir { | 164 | string AutoStartDir { |
86 | 174 | get { return System.IO.Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "autostart"); } | 165 | get { return System.IO.Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "autostart"); } |
87 | 175 | 166 | ||
88 | === modified file 'Docky/Docky/DockController.cs' | |||
89 | --- Docky/Docky/DockController.cs 2009-10-31 16:05:10 +0000 | |||
90 | +++ Docky/Docky/DockController.cs 2009-11-01 01:20:25 +0000 | |||
91 | @@ -32,7 +32,13 @@ | |||
92 | 32 | namespace Docky | 32 | namespace Docky |
93 | 33 | { | 33 | { |
94 | 34 | 34 | ||
96 | 35 | 35 | class DockMonitor | |
97 | 36 | { | ||
98 | 37 | public Rectangle Geo { get; set; } | ||
99 | 38 | public int MonitorNumber { get; set; } | ||
100 | 39 | public IEnumerable<DockPosition> PossiblePositions { get; set; } | ||
101 | 40 | } | ||
102 | 41 | |||
103 | 36 | internal class DockController : IDisposable | 42 | internal class DockController : IDisposable |
104 | 37 | { | 43 | { |
105 | 38 | const string DefaultTheme = "Classic"; | 44 | const string DefaultTheme = "Classic"; |
106 | @@ -50,6 +56,23 @@ | |||
107 | 50 | get { return DockNames.Count (); } | 56 | get { return DockNames.Count (); } |
108 | 51 | } | 57 | } |
109 | 52 | 58 | ||
110 | 59 | List<DockMonitor> DockMonitors { get; set; } | ||
111 | 60 | |||
112 | 61 | // this represents the possible PHYSICALLY availabe positions | ||
113 | 62 | // it doesn't take into account whether or not a doc is already at a given position | ||
114 | 63 | public IEnumerable<DockPosition> PositionsAvailableForDock (int monitorNum) | ||
115 | 64 | { | ||
116 | 65 | foreach (DockPosition position in DockMonitors.Where (d => d.MonitorNumber == monitorNum).First ().PossiblePositions) { | ||
117 | 66 | if (!DocksForMonitor (monitorNum).Any (dock => dock.Preferences.Position == position)) | ||
118 | 67 | yield return position; | ||
119 | 68 | } | ||
120 | 69 | } | ||
121 | 70 | |||
122 | 71 | public IEnumerable<Dock> DocksForMonitor (int monitorNumber) | ||
123 | 72 | { | ||
124 | 73 | return docks.Where (d => d.Preferences.MonitorNumber == monitorNumber); | ||
125 | 74 | } | ||
126 | 75 | |||
127 | 53 | IEnumerable<string> ThemeContainerFolders { | 76 | IEnumerable<string> ThemeContainerFolders { |
128 | 54 | get { | 77 | get { |
129 | 55 | yield return Path.Combine (DockServices.System.SystemDataFolder, "themes"); | 78 | yield return Path.Combine (DockServices.System.SystemDataFolder, "themes"); |
130 | @@ -111,6 +134,7 @@ | |||
131 | 111 | { | 134 | { |
132 | 112 | docks = new List<Dock> (); | 135 | docks = new List<Dock> (); |
133 | 113 | prefs = DockServices.Preferences.Get<DockController> (); | 136 | prefs = DockServices.Preferences.Get<DockController> (); |
134 | 137 | DetectMonitors (); | ||
135 | 114 | CreateDocks (); | 138 | CreateDocks (); |
136 | 115 | 139 | ||
137 | 116 | GLib.Timeout.Add (500, delegate { | 140 | GLib.Timeout.Add (500, delegate { |
138 | @@ -119,6 +143,41 @@ | |||
139 | 119 | }); | 143 | }); |
140 | 120 | } | 144 | } |
141 | 121 | 145 | ||
142 | 146 | void DetectMonitors () | ||
143 | 147 | { | ||
144 | 148 | DockMonitors = new List<DockMonitor> (); | ||
145 | 149 | |||
146 | 150 | // first add all of the screens and their geometries | ||
147 | 151 | for (int i = 0; i < Screen.Default.NMonitors; i++) { | ||
148 | 152 | DockMonitor mon = new DockMonitor (); | ||
149 | 153 | mon.MonitorNumber = i; | ||
150 | 154 | mon.Geo = Screen.Default.GetMonitorGeometry (i); | ||
151 | 155 | DockMonitors.Add (mon); | ||
152 | 156 | } | ||
153 | 157 | |||
154 | 158 | int topDockVal = DockMonitors.OrderBy (d => d.Geo.Top).First ().Geo.Top; | ||
155 | 159 | int bottomDockVal = DockMonitors.OrderByDescending (d => d.Geo.Bottom).First ().Geo.Bottom; | ||
156 | 160 | int leftDockVal = DockMonitors.OrderBy (d => d.Geo.Left).First ().Geo.Left; | ||
157 | 161 | int rightDockVal = DockMonitors.OrderByDescending (d => d.Geo.Right).First ().Geo.Right; | ||
158 | 162 | |||
159 | 163 | // now build the list of available positions for a given screen. | ||
160 | 164 | for (int i = 0; i < DockMonitors.Count (); i++) { | ||
161 | 165 | List<DockPosition> positions = new List<DockPosition> (); | ||
162 | 166 | DockMonitor mon = DockMonitors.Where (d => d.MonitorNumber == i).First (); | ||
163 | 167 | |||
164 | 168 | if (mon.Geo.Left == leftDockVal) | ||
165 | 169 | positions.Add (DockPosition.Left); | ||
166 | 170 | if (mon.Geo.Right == rightDockVal) | ||
167 | 171 | positions.Add (DockPosition.Right); | ||
168 | 172 | if (mon.Geo.Top == topDockVal) | ||
169 | 173 | positions.Add (DockPosition.Top); | ||
170 | 174 | if (mon.Geo.Bottom == bottomDockVal) | ||
171 | 175 | positions.Add (DockPosition.Bottom); | ||
172 | 176 | |||
173 | 177 | mon.PossiblePositions = positions; | ||
174 | 178 | } | ||
175 | 179 | } | ||
176 | 180 | |||
177 | 122 | string FolderForTheme (string theme) | 181 | string FolderForTheme (string theme) |
178 | 123 | { | 182 | { |
179 | 124 | foreach (string dir in ThemeContainerFolders) { | 183 | foreach (string dir in ThemeContainerFolders) { |
180 | @@ -144,9 +203,9 @@ | |||
181 | 144 | return def + "@" + System.Reflection.Assembly.GetExecutingAssembly ().FullName; | 203 | return def + "@" + System.Reflection.Assembly.GetExecutingAssembly ().FullName; |
182 | 145 | } | 204 | } |
183 | 146 | 205 | ||
185 | 147 | public Dock CreateDock () | 206 | public Dock CreateDock (int monitorNum) |
186 | 148 | { | 207 | { |
188 | 149 | if (docks.Count >= 4) | 208 | if (!PositionsAvailableForDock (monitorNum).Any ()) |
189 | 150 | return null; | 209 | return null; |
190 | 151 | 210 | ||
191 | 152 | string name = "Dock" + 1; | 211 | string name = "Dock" + 1; |
192 | @@ -155,7 +214,7 @@ | |||
193 | 155 | 214 | ||
194 | 156 | DockNames = DockNames.Concat (new [] { name }); | 215 | DockNames = DockNames.Concat (new [] { name }); |
195 | 157 | 216 | ||
197 | 158 | DockPreferences dockPrefs = new DockPreferences (name); | 217 | DockPreferences dockPrefs = new DockPreferences (name, monitorNum); |
198 | 159 | Dock dock = new Dock (dockPrefs); | 218 | Dock dock = new Dock (dockPrefs); |
199 | 160 | docks.Add (dock); | 219 | docks.Add (dock); |
200 | 161 | 220 | ||
201 | @@ -172,7 +231,6 @@ | |||
202 | 172 | dock.Dispose (); | 231 | dock.Dispose (); |
203 | 173 | DockNames = DockNames.Where (s => s != dock.Preferences.GetName ()); | 232 | DockNames = DockNames.Where (s => s != dock.Preferences.GetName ()); |
204 | 174 | 233 | ||
205 | 175 | EnsurePluginState (); | ||
206 | 176 | return true; | 234 | return true; |
207 | 177 | } | 235 | } |
208 | 178 | 236 | ||
209 | 179 | 237 | ||
210 | === modified file 'Docky/Docky/Interface/DockPreferences.cs' | |||
211 | --- Docky/Docky/Interface/DockPreferences.cs 2009-10-31 16:05:10 +0000 | |||
212 | +++ Docky/Docky/Interface/DockPreferences.cs 2009-11-01 01:20:25 +0000 | |||
213 | @@ -126,15 +126,17 @@ | |||
214 | 126 | public DockPosition Position { | 126 | public DockPosition Position { |
215 | 127 | get { return position; } | 127 | get { return position; } |
216 | 128 | set { | 128 | set { |
217 | 129 | int monitor = 0; | ||
218 | 130 | if (monitor_number.HasValue) | ||
219 | 131 | monitor = MonitorNumber; | ||
220 | 132 | |||
221 | 129 | if (position == value) | 133 | if (position == value) |
222 | 130 | return; | 134 | return; |
223 | 131 | Dock other_dock = null; | ||
224 | 132 | if (Docky.Controller.Docks.Any (d => d.Preferences.Position == value)) | ||
225 | 133 | other_dock = Docky.Controller.Docks.Where (d => d.Preferences.Position == value).First(); | ||
226 | 134 | DockPosition old_position = position; | ||
227 | 135 | position = value; | 135 | position = value; |
230 | 136 | if (other_dock != null) | 136 | |
231 | 137 | other_dock.Preferences.Position = old_position; | 137 | if (!Docky.Controller.PositionsAvailableForDock (monitor).Contains (value)) |
232 | 138 | position = Docky.Controller.PositionsAvailableForDock (monitor).First (); | ||
233 | 139 | |||
234 | 138 | SetOption<string> ("Position", position.ToString ()); | 140 | SetOption<string> ("Position", position.ToString ()); |
235 | 139 | OnPositionChanged (); | 141 | OnPositionChanged (); |
236 | 140 | } | 142 | } |
237 | @@ -195,7 +197,7 @@ | |||
238 | 195 | get { | 197 | get { |
239 | 196 | if (!zoom_percent.HasValue) | 198 | if (!zoom_percent.HasValue) |
240 | 197 | zoom_percent = GetOption<double?> ("ZoomPercent", 2.0); | 199 | zoom_percent = GetOption<double?> ("ZoomPercent", 2.0); |
242 | 198 | return zoom_percent.Value; | 200 | return zoom_percent.Value; |
243 | 199 | } | 201 | } |
244 | 200 | set { | 202 | set { |
245 | 201 | value = Clamp (value, 4, 1); | 203 | value = Clamp (value, 4, 1); |
246 | @@ -207,6 +209,22 @@ | |||
247 | 207 | OnZoomPercentChanged (); | 209 | OnZoomPercentChanged (); |
248 | 208 | } | 210 | } |
249 | 209 | } | 211 | } |
250 | 212 | |||
251 | 213 | int? monitor_number; | ||
252 | 214 | public int MonitorNumber { | ||
253 | 215 | get { | ||
254 | 216 | if (!monitor_number.HasValue) | ||
255 | 217 | monitor_number = GetOption<int?> ("MonitorNumber", 0); | ||
256 | 218 | return monitor_number.Value; | ||
257 | 219 | } | ||
258 | 220 | set { | ||
259 | 221 | if (monitor_number == value) | ||
260 | 222 | return; | ||
261 | 223 | monitor_number = value; | ||
262 | 224 | SetOption<int?> ("MonitorNumber", monitor_number.Value); | ||
263 | 225 | //OnIndicatorSettingChanged (); | ||
264 | 226 | } | ||
265 | 227 | } | ||
266 | 210 | #endregion | 228 | #endregion |
267 | 211 | 229 | ||
268 | 212 | bool? window_manager; | 230 | bool? window_manager; |
269 | @@ -248,6 +266,11 @@ | |||
270 | 248 | set { prefs.Set<bool> ("FirstRun", value); } | 266 | set { prefs.Set<bool> ("FirstRun", value); } |
271 | 249 | } | 267 | } |
272 | 250 | 268 | ||
273 | 269 | public DockPreferences (string dockName, int monitorNumber) : this(dockName) | ||
274 | 270 | { | ||
275 | 271 | MonitorNumber = monitorNumber; | ||
276 | 272 | } | ||
277 | 273 | |||
278 | 251 | public DockPreferences (string dockName) | 274 | public DockPreferences (string dockName) |
279 | 252 | { | 275 | { |
280 | 253 | // ensures position actually gets set | 276 | // ensures position actually gets set |
281 | @@ -435,7 +458,7 @@ | |||
282 | 435 | DockPosition position = (DockPosition) Enum.Parse (typeof(DockPosition), | 458 | DockPosition position = (DockPosition) Enum.Parse (typeof(DockPosition), |
283 | 436 | GetOption ("Position", DockPosition.Bottom.ToString ())); | 459 | GetOption ("Position", DockPosition.Bottom.ToString ())); |
284 | 437 | 460 | ||
286 | 438 | while (Docky.Controller.Docks.Any ((Dock d) => d.Preferences.Position == position)) { | 461 | while (Docky.Controller.DocksForMonitor (MonitorNumber).Any ((Dock d) => d.Preferences.Position == position)) { |
287 | 439 | Log<DockPreferences>.Error ("Dock position already in use: " + position.ToString ()); | 462 | Log<DockPreferences>.Error ("Dock position already in use: " + position.ToString ()); |
288 | 440 | position = (DockPosition) ((((int) position) + 1) % 4); | 463 | position = (DockPosition) ((((int) position) + 1) % 4); |
289 | 441 | } | 464 | } |
290 | @@ -712,9 +735,9 @@ | |||
291 | 712 | { | 735 | { |
292 | 713 | OnItemProvidersChanged (null, item_providers); | 736 | OnItemProvidersChanged (null, item_providers); |
293 | 714 | 737 | ||
295 | 715 | foreach (AbstractDockItemProvider adip in item_providers.Where (adip => adip != DefaultProvider)) { | 738 | foreach (AbstractDockItemProvider adip in item_providers.Where (adip => adip != DefaultProvider)) |
296 | 716 | PluginManager.Disable (adip); | 739 | PluginManager.Disable (adip); |
298 | 717 | } | 740 | |
299 | 718 | item_providers = new List<AbstractDockItemProvider> (); | 741 | item_providers = new List<AbstractDockItemProvider> (); |
300 | 719 | 742 | ||
301 | 720 | SyncPlugins (); | 743 | SyncPlugins (); |
302 | 721 | 744 | ||
303 | === modified file 'Docky/Docky/Interface/DockWindow.cs' | |||
304 | --- Docky/Docky/Interface/DockWindow.cs 2009-10-31 09:39:54 +0000 | |||
305 | +++ Docky/Docky/Interface/DockWindow.cs 2009-11-01 01:20:25 +0000 | |||
306 | @@ -343,7 +343,7 @@ | |||
307 | 343 | 343 | ||
308 | 344 | //fixme | 344 | //fixme |
309 | 345 | int Monitor { | 345 | int Monitor { |
311 | 346 | get { return 0; } | 346 | get { return Preferences.MonitorNumber; } |
312 | 347 | } | 347 | } |
313 | 348 | 348 | ||
314 | 349 | internal DockPosition Position { | 349 | internal DockPosition Position { |
315 | 350 | 350 | ||
316 | === modified file 'Docky/Docky/Interface/IDockPreferences.cs' | |||
317 | --- Docky/Docky/Interface/IDockPreferences.cs 2009-10-31 03:57:40 +0000 | |||
318 | +++ Docky/Docky/Interface/IDockPreferences.cs 2009-11-01 01:20:25 +0000 | |||
319 | @@ -62,6 +62,8 @@ | |||
320 | 62 | 62 | ||
321 | 63 | double ZoomPercent { get; set; } | 63 | double ZoomPercent { get; set; } |
322 | 64 | 64 | ||
323 | 65 | int MonitorNumber { get; set; } | ||
324 | 66 | |||
325 | 65 | bool SetName (string name); | 67 | bool SetName (string name); |
326 | 66 | 68 | ||
327 | 67 | string GetName (); | 69 | string GetName (); |
328 | 68 | 70 | ||
329 | === modified file 'Docky/gtk-gui/Docky.ConfigurationWindow.cs' | |||
330 | --- Docky/gtk-gui/Docky.ConfigurationWindow.cs 2009-10-31 06:37:25 +0000 | |||
331 | +++ Docky/gtk-gui/Docky.ConfigurationWindow.cs 2009-11-01 01:20:25 +0000 | |||
332 | @@ -42,10 +42,6 @@ | |||
333 | 42 | 42 | ||
334 | 43 | private Gtk.HBox hbox3; | 43 | private Gtk.HBox hbox3; |
335 | 44 | 44 | ||
336 | 45 | private Gtk.Button new_dock_button; | ||
337 | 46 | |||
338 | 47 | private Gtk.Button delete_dock_button; | ||
339 | 48 | |||
340 | 49 | private Gtk.VBox vbox4; | 45 | private Gtk.VBox vbox4; |
341 | 50 | 46 | ||
342 | 51 | private Gtk.Button close_button; | 47 | private Gtk.Button close_button; |
343 | @@ -159,69 +155,15 @@ | |||
344 | 159 | this.hbox3.Name = "hbox3"; | 155 | this.hbox3.Name = "hbox3"; |
345 | 160 | this.hbox3.Spacing = 6; | 156 | this.hbox3.Spacing = 6; |
346 | 161 | // Container child hbox3.Gtk.Box+BoxChild | 157 | // Container child hbox3.Gtk.Box+BoxChild |
347 | 162 | this.new_dock_button = new Gtk.Button(); | ||
348 | 163 | this.new_dock_button.CanFocus = true; | ||
349 | 164 | this.new_dock_button.Name = "new_dock_button"; | ||
350 | 165 | this.new_dock_button.UseUnderline = true; | ||
351 | 166 | this.new_dock_button.BorderWidth = ((uint)(5)); | ||
352 | 167 | // Container child new_dock_button.Gtk.Container+ContainerChild | ||
353 | 168 | Gtk.Alignment w11 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); | ||
354 | 169 | // Container child GtkAlignment.Gtk.Container+ContainerChild | ||
355 | 170 | Gtk.HBox w12 = new Gtk.HBox(); | ||
356 | 171 | w12.Spacing = 2; | ||
357 | 172 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
358 | 173 | Gtk.Image w13 = new Gtk.Image(); | ||
359 | 174 | w13.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Menu, 16); | ||
360 | 175 | w12.Add(w13); | ||
361 | 176 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
362 | 177 | Gtk.Label w15 = new Gtk.Label(); | ||
363 | 178 | w15.LabelProp = Mono.Unix.Catalog.GetString("New Dock"); | ||
364 | 179 | w15.UseUnderline = true; | ||
365 | 180 | w12.Add(w15); | ||
366 | 181 | w11.Add(w12); | ||
367 | 182 | this.new_dock_button.Add(w11); | ||
368 | 183 | this.hbox3.Add(this.new_dock_button); | ||
369 | 184 | Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.hbox3[this.new_dock_button])); | ||
370 | 185 | w19.Position = 0; | ||
371 | 186 | w19.Expand = false; | ||
372 | 187 | w19.Fill = false; | ||
373 | 188 | // Container child hbox3.Gtk.Box+BoxChild | ||
374 | 189 | this.delete_dock_button = new Gtk.Button(); | ||
375 | 190 | this.delete_dock_button.CanFocus = true; | ||
376 | 191 | this.delete_dock_button.Name = "delete_dock_button"; | ||
377 | 192 | this.delete_dock_button.UseUnderline = true; | ||
378 | 193 | this.delete_dock_button.BorderWidth = ((uint)(5)); | ||
379 | 194 | // Container child delete_dock_button.Gtk.Container+ContainerChild | ||
380 | 195 | Gtk.Alignment w20 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); | ||
381 | 196 | // Container child GtkAlignment.Gtk.Container+ContainerChild | ||
382 | 197 | Gtk.HBox w21 = new Gtk.HBox(); | ||
383 | 198 | w21.Spacing = 2; | ||
384 | 199 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
385 | 200 | Gtk.Image w22 = new Gtk.Image(); | ||
386 | 201 | w22.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-delete", Gtk.IconSize.Menu, 16); | ||
387 | 202 | w21.Add(w22); | ||
388 | 203 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
389 | 204 | Gtk.Label w24 = new Gtk.Label(); | ||
390 | 205 | w24.LabelProp = Mono.Unix.Catalog.GetString("Delete Dock"); | ||
391 | 206 | w24.UseUnderline = true; | ||
392 | 207 | w21.Add(w24); | ||
393 | 208 | w20.Add(w21); | ||
394 | 209 | this.delete_dock_button.Add(w20); | ||
395 | 210 | this.hbox3.Add(this.delete_dock_button); | ||
396 | 211 | Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.hbox3[this.delete_dock_button])); | ||
397 | 212 | w28.Position = 1; | ||
398 | 213 | w28.Expand = false; | ||
399 | 214 | w28.Fill = false; | ||
400 | 215 | // Container child hbox3.Gtk.Box+BoxChild | ||
401 | 216 | this.vbox4 = new Gtk.VBox(); | 158 | this.vbox4 = new Gtk.VBox(); |
402 | 217 | this.vbox4.Name = "vbox4"; | 159 | this.vbox4.Name = "vbox4"; |
403 | 218 | this.vbox4.Spacing = 6; | 160 | this.vbox4.Spacing = 6; |
404 | 219 | this.hbox3.Add(this.vbox4); | 161 | this.hbox3.Add(this.vbox4); |
407 | 220 | Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.hbox3[this.vbox4])); | 162 | Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.hbox3[this.vbox4])); |
408 | 221 | w29.Position = 2; | 163 | w11.Position = 2; |
409 | 222 | this.hbox2.Add(this.hbox3); | 164 | this.hbox2.Add(this.hbox3); |
412 | 223 | Gtk.Box.BoxChild w30 = ((Gtk.Box.BoxChild)(this.hbox2[this.hbox3])); | 165 | Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.hbox2[this.hbox3])); |
413 | 224 | w30.Position = 0; | 166 | w12.Position = 0; |
414 | 225 | // Container child hbox2.Gtk.Box+BoxChild | 167 | // Container child hbox2.Gtk.Box+BoxChild |
415 | 226 | this.close_button = new Gtk.Button(); | 168 | this.close_button = new Gtk.Button(); |
416 | 227 | this.close_button.CanFocus = true; | 169 | this.close_button.CanFocus = true; |
417 | @@ -231,15 +173,15 @@ | |||
418 | 231 | this.close_button.BorderWidth = ((uint)(5)); | 173 | this.close_button.BorderWidth = ((uint)(5)); |
419 | 232 | this.close_button.Label = "gtk-close"; | 174 | this.close_button.Label = "gtk-close"; |
420 | 233 | this.hbox2.Add(this.close_button); | 175 | this.hbox2.Add(this.close_button); |
425 | 234 | Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(this.hbox2[this.close_button])); | 176 | Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox2[this.close_button])); |
426 | 235 | w31.Position = 1; | 177 | w13.Position = 1; |
427 | 236 | w31.Expand = false; | 178 | w13.Expand = false; |
428 | 237 | w31.Fill = false; | 179 | w13.Fill = false; |
429 | 238 | this.vbox1.Add(this.hbox2); | 180 | this.vbox1.Add(this.hbox2); |
434 | 239 | Gtk.Box.BoxChild w32 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox2])); | 181 | Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox2])); |
435 | 240 | w32.Position = 1; | 182 | w14.Position = 1; |
436 | 241 | w32.Expand = false; | 183 | w14.Expand = false; |
437 | 242 | w32.Fill = false; | 184 | w14.Fill = false; |
438 | 243 | this.Add(this.vbox1); | 185 | this.Add(this.vbox1); |
439 | 244 | if ((this.Child != null)) { | 186 | if ((this.Child != null)) { |
440 | 245 | this.Child.ShowAll(); | 187 | this.Child.ShowAll(); |
441 | @@ -249,8 +191,6 @@ | |||
442 | 249 | this.Show(); | 191 | this.Show(); |
443 | 250 | this.start_with_computer_checkbutton.Toggled += new System.EventHandler(this.OnStartWithComputerCheckbuttonToggled); | 192 | this.start_with_computer_checkbutton.Toggled += new System.EventHandler(this.OnStartWithComputerCheckbuttonToggled); |
444 | 251 | this.theme_combo.Changed += new System.EventHandler(this.OnThemeComboChanged); | 193 | this.theme_combo.Changed += new System.EventHandler(this.OnThemeComboChanged); |
445 | 252 | this.new_dock_button.Clicked += new System.EventHandler(this.OnNewDockButtonClicked); | ||
446 | 253 | this.delete_dock_button.Clicked += new System.EventHandler(this.OnDeleteDockButtonClicked); | ||
447 | 254 | this.close_button.Clicked += new System.EventHandler(this.OnCloseButtonClicked); | 194 | this.close_button.Clicked += new System.EventHandler(this.OnCloseButtonClicked); |
448 | 255 | } | 195 | } |
449 | 256 | } | 196 | } |
450 | 257 | 197 | ||
451 | === modified file 'Docky/gtk-gui/gui.stetic' | |||
452 | --- Docky/gtk-gui/gui.stetic 2009-10-31 06:37:25 +0000 | |||
453 | +++ Docky/gtk-gui/gui.stetic 2009-11-01 01:20:25 +0000 | |||
454 | @@ -7,11 +7,11 @@ | |||
455 | 7 | <import> | 7 | <import> |
456 | 8 | <widget-library name="Mono.Addins.Gui, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" /> | 8 | <widget-library name="Mono.Addins.Gui, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" /> |
457 | 9 | <widget-library name="wnck-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | 9 | <widget-library name="wnck-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> |
458 | 10 | <widget-library name="gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | ||
459 | 10 | <widget-library name="../../Docky.Services/bin/Debug/Docky.Services.dll" /> | 11 | <widget-library name="../../Docky.Services/bin/Debug/Docky.Services.dll" /> |
460 | 11 | <widget-library name="../../Docky.Items/bin/Debug/Docky.Items.dll" /> | 12 | <widget-library name="../../Docky.Items/bin/Debug/Docky.Items.dll" /> |
461 | 12 | <widget-library name="../../Docky.Windowing/bin/Debug/Docky.Windowing.dll" /> | 13 | <widget-library name="../../Docky.Windowing/bin/Debug/Docky.Windowing.dll" /> |
462 | 13 | <widget-library name="../bin/Debug/Docky.exe" internal="true" /> | 14 | <widget-library name="../bin/Debug/Docky.exe" internal="true" /> |
463 | 14 | <widget-library name="gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | ||
464 | 15 | </import> | 15 | </import> |
465 | 16 | <widget class="Gtk.Bin" id="Docky.Interface.DockPreferences" design-size="368 331"> | 16 | <widget class="Gtk.Bin" id="Docky.Interface.DockPreferences" design-size="368 331"> |
466 | 17 | <property name="MemberName" /> | 17 | <property name="MemberName" /> |
467 | @@ -632,40 +632,10 @@ | |||
468 | 632 | <property name="MemberName" /> | 632 | <property name="MemberName" /> |
469 | 633 | <property name="Spacing">6</property> | 633 | <property name="Spacing">6</property> |
470 | 634 | <child> | 634 | <child> |
487 | 635 | <widget class="Gtk.Button" id="new_dock_button"> | 635 | <placeholder /> |
472 | 636 | <property name="MemberName" /> | ||
473 | 637 | <property name="CanFocus">True</property> | ||
474 | 638 | <property name="Type">TextAndIcon</property> | ||
475 | 639 | <property name="Icon">stock:gtk-add Menu</property> | ||
476 | 640 | <property name="Label" translatable="yes">New Dock</property> | ||
477 | 641 | <property name="UseUnderline">True</property> | ||
478 | 642 | <property name="BorderWidth">5</property> | ||
479 | 643 | <signal name="Clicked" handler="OnNewDockButtonClicked" /> | ||
480 | 644 | </widget> | ||
481 | 645 | <packing> | ||
482 | 646 | <property name="Position">0</property> | ||
483 | 647 | <property name="AutoSize">True</property> | ||
484 | 648 | <property name="Expand">False</property> | ||
485 | 649 | <property name="Fill">False</property> | ||
486 | 650 | </packing> | ||
488 | 651 | </child> | 636 | </child> |
489 | 652 | <child> | 637 | <child> |
506 | 653 | <widget class="Gtk.Button" id="delete_dock_button"> | 638 | <placeholder /> |
491 | 654 | <property name="MemberName" /> | ||
492 | 655 | <property name="CanFocus">True</property> | ||
493 | 656 | <property name="Type">TextAndIcon</property> | ||
494 | 657 | <property name="Icon">stock:gtk-delete Menu</property> | ||
495 | 658 | <property name="Label" translatable="yes">Delete Dock</property> | ||
496 | 659 | <property name="UseUnderline">True</property> | ||
497 | 660 | <property name="BorderWidth">5</property> | ||
498 | 661 | <signal name="Clicked" handler="OnDeleteDockButtonClicked" /> | ||
499 | 662 | </widget> | ||
500 | 663 | <packing> | ||
501 | 664 | <property name="Position">1</property> | ||
502 | 665 | <property name="AutoSize">True</property> | ||
503 | 666 | <property name="Expand">False</property> | ||
504 | 667 | <property name="Fill">False</property> | ||
505 | 668 | </packing> | ||
507 | 669 | </child> | 639 | </child> |
508 | 670 | <child> | 640 | <child> |
509 | 671 | <widget class="Gtk.VBox" id="vbox4"> | 641 | <widget class="Gtk.VBox" id="vbox4"> |
This round, MultiMonitor V2 adds support for MultiMonitors again. Also, DanRabbit's awesome UI idea is fully implemented in this branch. There's no more "add dock" or "delete dock". Upon opening the preferences widget, all docks slide in (for me this is 6 docks, 3 on each screen, for others with 1 screen that would be 4 docks) allowing you to add addins to any dock. Upon closing the preferences, empty docks are removed.