Merge lp:~unity-team/unity/fixes-2011-04-11 into lp:unity
- fixes-2011-04-11
- Merge into trunk
Proposed by
Neil J. Patel
Status: | Merged | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 1105 | ||||||||||||||||||||
Proposed branch: | lp:~unity-team/unity/fixes-2011-04-11 | ||||||||||||||||||||
Merge into: | lp:unity | ||||||||||||||||||||
Diff against target: |
1011 lines (+315/-196) 18 files modified
services/panel-service.c (+39/-35) src/IndicatorObjectFactoryRemote.cpp (+46/-17) src/IndicatorObjectFactoryRemote.h (+26/-1) src/PanelMenuView.cpp (+8/-5) src/PanelMenuView.h (+3/-0) src/PlacesGroupController.cpp (+2/-1) src/PlacesSearchBar.cpp (+1/-1) src/PlacesSearchBarSpinner.cpp (+72/-42) src/PlacesSearchBarSpinner.h (+5/-4) src/PlacesSimpleTile.cpp (+2/-7) src/PlacesStyle.cpp (+50/-41) src/PlacesStyle.h (+10/-8) src/PlacesView.cpp (+10/-2) src/PlacesView.h (+2/-0) src/QuicklistView.cpp (+9/-4) src/StaticCairoText.cpp (+1/-1) src/UScreen.cpp (+7/-0) tests/TestPlacesBackend.cpp (+22/-27) |
||||||||||||||||||||
To merge this branch: | bzr merge lp:~unity-team/unity/fixes-2011-04-11 | ||||||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jason Smith (community) | Approve | ||
Review via email: mp+57092@code.launchpad.net |
Commit message
Description of the change
Bugs attached, there are some other changes too, largest being the spinner (which isn't really a large change)
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed file 'resources/search_clear_alone.png' |
2 | Binary files resources/search_clear_alone.png 2011-03-23 22:33:25 +0000 and resources/search_clear_alone.png 1970-01-01 00:00:00 +0000 differ |
3 | === removed file 'resources/search_clear_icon.png' |
4 | Binary files resources/search_clear_icon.png 2011-02-28 11:24:48 +0000 and resources/search_clear_icon.png 1970-01-01 00:00:00 +0000 differ |
5 | === removed file 'resources/search_clear_spinner.png' |
6 | Binary files resources/search_clear_spinner.png 2011-03-23 23:18:03 +0000 and resources/search_clear_spinner.png 1970-01-01 00:00:00 +0000 differ |
7 | === added file 'resources/search_close.png' |
8 | Binary files resources/search_close.png 1970-01-01 00:00:00 +0000 and resources/search_close.png 2011-04-10 23:52:24 +0000 differ |
9 | === added file 'resources/search_close_glow.png' |
10 | Binary files resources/search_close_glow.png 1970-01-01 00:00:00 +0000 and resources/search_close_glow.png 2011-04-10 23:52:24 +0000 differ |
11 | === added file 'resources/search_magnify.png' |
12 | Binary files resources/search_magnify.png 1970-01-01 00:00:00 +0000 and resources/search_magnify.png 2011-04-10 23:52:24 +0000 differ |
13 | === removed file 'resources/search_ready_icon.png' |
14 | Binary files resources/search_ready_icon.png 2011-02-28 11:24:48 +0000 and resources/search_ready_icon.png 1970-01-01 00:00:00 +0000 differ |
15 | === added file 'resources/search_spin.png' |
16 | Binary files resources/search_spin.png 1970-01-01 00:00:00 +0000 and resources/search_spin.png 2011-04-10 23:52:24 +0000 differ |
17 | === added file 'resources/search_spin_glow.png' |
18 | Binary files resources/search_spin_glow.png 1970-01-01 00:00:00 +0000 and resources/search_spin_glow.png 2011-04-10 23:52:24 +0000 differ |
19 | === modified file 'services/panel-service.c' |
20 | --- services/panel-service.c 2011-04-05 14:09:03 +0000 |
21 | +++ services/panel-service.c 2011-04-10 23:52:24 +0000 |
22 | @@ -1,4 +1,4 @@ |
23 | -/* |
24 | + /* |
25 | * Copyright (C) 2010 Canonical Ltd |
26 | * |
27 | * This program is free software: you can redistribute it and/or modify |
28 | @@ -186,14 +186,14 @@ |
29 | G_TYPE_NONE, 1, G_TYPE_STRING); |
30 | _service_signals[GEOMETRIES_CHANGED] = |
31 | g_signal_new ("geometries-changed", |
32 | - G_OBJECT_CLASS_TYPE (obj_class), |
33 | - G_SIGNAL_RUN_LAST, |
34 | - 0, |
35 | - NULL, NULL, |
36 | - panel_marshal_VOID__OBJECT_POINTER_INT_INT_INT_INT, |
37 | - G_TYPE_NONE, 6, |
38 | - G_TYPE_OBJECT, G_TYPE_POINTER, |
39 | - G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT); |
40 | + G_OBJECT_CLASS_TYPE (obj_class), |
41 | + G_SIGNAL_RUN_LAST, |
42 | + 0, |
43 | + NULL, NULL, |
44 | + panel_marshal_VOID__OBJECT_POINTER_INT_INT_INT_INT, |
45 | + G_TYPE_NONE, 6, |
46 | + G_TYPE_OBJECT, G_TYPE_POINTER, |
47 | + G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT); |
48 | |
49 | _service_signals[ENTRY_SHOW_NOW_CHANGED] = |
50 | g_signal_new ("entry-show-now-changed", |
51 | @@ -569,10 +569,10 @@ |
52 | } |
53 | |
54 | static const gchar * indicator_environment[] = { |
55 | - "unity", |
56 | - "unity-3d", |
57 | - "unity-panel-service", |
58 | - NULL |
59 | + "unity", |
60 | + "unity-3d", |
61 | + "unity-panel-service", |
62 | + NULL |
63 | }; |
64 | |
65 | static void |
66 | @@ -657,16 +657,16 @@ |
67 | static gint |
68 | name2order (const gchar * name) |
69 | { |
70 | - int i; |
71 | + int i; |
72 | |
73 | - for (i = 0; indicator_order[i] != NULL; i++) |
74 | + for (i = 0; indicator_order[i] != NULL; i++) |
75 | { |
76 | - if (g_strcmp0(name, indicator_order[i]) == 0) |
77 | + if (g_strcmp0(name, indicator_order[i]) == 0) |
78 | { |
79 | - return i; |
80 | - } |
81 | - } |
82 | - return -1; |
83 | + return i; |
84 | + } |
85 | + } |
86 | + return -1; |
87 | } |
88 | |
89 | static int |
90 | @@ -915,12 +915,12 @@ |
91 | |
92 | void |
93 | panel_service_sync_geometry (PanelService *self, |
94 | - const gchar *indicator_id, |
95 | - const gchar *entry_id, |
96 | - gint x, |
97 | - gint y, |
98 | - gint width, |
99 | - gint height) |
100 | + const gchar *indicator_id, |
101 | + const gchar *entry_id, |
102 | + gint x, |
103 | + gint y, |
104 | + gint width, |
105 | + gint height) |
106 | { |
107 | PanelServicePrivate *priv = self->priv; |
108 | IndicatorObjectEntry *entry = g_hash_table_lookup (priv->id2entry_hash, entry_id); |
109 | @@ -940,13 +940,13 @@ |
110 | if (GTK_IS_LABEL (entry->label)) |
111 | { |
112 | label_ok = gtk_widget_get_visible (GTK_WIDGET (entry->label)) |
113 | - && gtk_widget_is_sensitive (GTK_WIDGET (entry->label)); |
114 | + && gtk_widget_is_sensitive (GTK_WIDGET (entry->label)); |
115 | } |
116 | |
117 | if (GTK_IS_IMAGE (entry->image)) |
118 | { |
119 | image_ok = gtk_widget_get_visible (GTK_WIDGET (entry->image)) |
120 | - && gtk_widget_is_sensitive (GTK_WIDGET (entry->image)); |
121 | + && gtk_widget_is_sensitive (GTK_WIDGET (entry->image)); |
122 | } |
123 | |
124 | return !label_ok && !image_ok; |
125 | @@ -996,6 +996,8 @@ |
126 | new_object = g_slist_nth_data (indicators, new_object_index); |
127 | } |
128 | |
129 | + if (!INDICATOR_IS_OBJECT (new_object)) |
130 | + return; |
131 | new_entries = indicator_object_get_entries (new_object); |
132 | // if the indicator has no entries, move to the next/prev one until we find one with entries |
133 | while (new_entries == NULL) |
134 | @@ -1003,8 +1005,10 @@ |
135 | gint cur_object_index = g_slist_index (indicators, new_object); |
136 | gint new_object_index = cur_object_index + (direction == GTK_MENU_DIR_CHILD ? 1 : -1); |
137 | new_object = g_slist_nth_data (indicators, new_object_index); |
138 | + if (!INDICATOR_IS_OBJECT (new_object)) |
139 | + return; |
140 | new_entries = indicator_object_get_entries (new_object); |
141 | - } |
142 | + } |
143 | |
144 | new_entry = g_list_nth_data (new_entries, direction == GTK_MENU_DIR_PARENT ? g_list_length (new_entries) - 1 : 0); |
145 | |
146 | @@ -1013,9 +1017,9 @@ |
147 | |
148 | if (should_skip_menu (new_entry)) |
149 | { |
150 | - activate_next_prev_menu (self, new_object, new_entry, direction); |
151 | - return; |
152 | - } |
153 | + activate_next_prev_menu (self, new_object, new_entry, direction); |
154 | + return; |
155 | + } |
156 | } |
157 | // changing within a group of indicators (for example, entries within appmenu) |
158 | else |
159 | @@ -1025,9 +1029,9 @@ |
160 | |
161 | if (should_skip_menu (new_entry)) |
162 | { |
163 | - activate_next_prev_menu (self, object, new_entry, direction); |
164 | - return; |
165 | - } |
166 | + activate_next_prev_menu (self, object, new_entry, direction); |
167 | + return; |
168 | + } |
169 | } |
170 | |
171 | id = g_strdup_printf ("%p", new_entry); |
172 | |
173 | === modified file 'src/IndicatorObjectFactoryRemote.cpp' |
174 | --- src/IndicatorObjectFactoryRemote.cpp 2011-04-08 07:53:45 +0000 |
175 | +++ src/IndicatorObjectFactoryRemote.cpp 2011-04-10 23:52:24 +0000 |
176 | @@ -29,6 +29,7 @@ |
177 | #include "Nux/WindowThread.h" |
178 | #include "NuxGraphics/GLWindowManager.h" |
179 | #include <X11/Xlib.h> |
180 | +#include <algorithm> |
181 | |
182 | #define S_NAME "com.canonical.Unity.Panel.Service" |
183 | #define S_PATH "/com/canonical/Unity/Panel/Service" |
184 | @@ -78,18 +79,33 @@ |
185 | IndicatorObjectFactoryRemote::~IndicatorObjectFactoryRemote () |
186 | { |
187 | if (G_IS_OBJECT (_proxy)) |
188 | + { |
189 | + g_signal_handler_disconnect (_proxy, _proxy_signal_id); |
190 | + g_signal_handler_disconnect (_proxy, _proxy_name_id); |
191 | g_object_unref (_proxy); |
192 | + } |
193 | _proxy = NULL; |
194 | |
195 | - std::vector<IndicatorObjectProxy*>::iterator it; |
196 | - |
197 | - for (it = _indicators.begin(); it != _indicators.end(); it++) |
198 | { |
199 | - IndicatorObjectProxyRemote *remote = static_cast<IndicatorObjectProxyRemote *> (*it); |
200 | - delete remote; |
201 | + std::vector<IndicatorObjectProxy*>::iterator it; |
202 | + for (it = _indicators.begin(); it != _indicators.end(); it++) |
203 | + { |
204 | + IndicatorObjectProxyRemote *remote = static_cast<IndicatorObjectProxyRemote *> (*it); |
205 | + delete remote; |
206 | + } |
207 | + _indicators.erase (_indicators.begin (), _indicators.end ()); |
208 | } |
209 | |
210 | - _indicators.erase (_indicators.begin (), _indicators.end ()); |
211 | + { // We cancel all our async callbacks from pending Sync() calls |
212 | + std::vector<SyncData *>::iterator it, eit = _sync_cancellables.end (); |
213 | + for (it = _sync_cancellables.begin (); it != eit; ++it) |
214 | + { |
215 | + SyncData *data = (*it); |
216 | + g_cancellable_cancel (data->_cancel); |
217 | + delete data; |
218 | + } |
219 | + _sync_cancellables.erase (_sync_cancellables.begin (), _sync_cancellables.end ()); |
220 | + } |
221 | } |
222 | |
223 | std::vector<IndicatorObjectProxy *>& |
224 | @@ -134,20 +150,22 @@ |
225 | _proxy = proxy; |
226 | |
227 | // Connect to interesting signals |
228 | - g_signal_connect (_proxy, "g-signal", |
229 | - G_CALLBACK (on_proxy_signal_received), this); |
230 | - g_signal_connect (_proxy, "notify::g-name-owner", |
231 | - G_CALLBACK (on_proxy_name_owner_changed), this); |
232 | + _proxy_signal_id = g_signal_connect (_proxy, "g-signal", |
233 | + G_CALLBACK (on_proxy_signal_received), this); |
234 | + _proxy_name_id = g_signal_connect (_proxy, "notify::g-name-owner", |
235 | + G_CALLBACK (on_proxy_name_owner_changed), this); |
236 | } |
237 | |
238 | + SyncData * data = new SyncData (this); |
239 | + _sync_cancellables.push_back (data); |
240 | g_dbus_proxy_call (_proxy, |
241 | "Sync", |
242 | NULL, |
243 | G_DBUS_CALL_FLAGS_NONE, |
244 | -1, |
245 | - NULL, |
246 | + data->_cancel, |
247 | on_sync_ready_cb, |
248 | - this); |
249 | + data); |
250 | } |
251 | |
252 | static gboolean |
253 | @@ -518,17 +536,20 @@ |
254 | } |
255 | else if (g_strcmp0 (signal_name, "ReSync") == 0) |
256 | { |
257 | - const gchar *id = g_variant_get_string (g_variant_get_child_value (parameters, 0), NULL); |
258 | - bool sync_one = !g_strcmp0 (id, "") == 0; |
259 | + const gchar *id = g_variant_get_string (g_variant_get_child_value (parameters, 0), NULL); |
260 | + bool sync_one = !g_strcmp0 (id, "") == 0; |
261 | |
262 | + SyncData *data = new SyncData (remote); |
263 | + remote->_sync_cancellables.push_back (data); |
264 | + |
265 | g_dbus_proxy_call (proxy, |
266 | sync_one ? "SyncOne" : "Sync", |
267 | sync_one ? g_variant_new ("(s)", id) : NULL, |
268 | G_DBUS_CALL_FLAGS_NONE, |
269 | -1, |
270 | - NULL, |
271 | + data->_cancel, |
272 | on_sync_ready_cb, |
273 | - remote); |
274 | + data); |
275 | } |
276 | else if (g_strcmp0 (signal_name, "ActiveMenuPointerMotion") == 0) |
277 | { |
278 | @@ -575,7 +596,8 @@ |
279 | GAsyncResult *res, |
280 | gpointer data) |
281 | { |
282 | - IndicatorObjectFactoryRemote *remote = static_cast<IndicatorObjectFactoryRemote *> (data); |
283 | + SyncData *sync_data = (SyncData *)data; |
284 | + IndicatorObjectFactoryRemote *remote = (IndicatorObjectFactoryRemote*)sync_data->_self; |
285 | GVariant *args; |
286 | GError *error = NULL; |
287 | |
288 | @@ -590,5 +612,12 @@ |
289 | |
290 | remote->Sync (args); |
291 | |
292 | + std::vector<SyncData *>::iterator it = std::find (remote->_sync_cancellables.begin (), |
293 | + remote->_sync_cancellables.end (), |
294 | + sync_data); |
295 | + if (it != remote->_sync_cancellables.end ()) |
296 | + remote->_sync_cancellables.erase (it); |
297 | + |
298 | g_variant_unref (args); |
299 | + delete sync_data; |
300 | } |
301 | |
302 | === modified file 'src/IndicatorObjectFactoryRemote.h' |
303 | --- src/IndicatorObjectFactoryRemote.h 2011-03-31 17:04:36 +0000 |
304 | +++ src/IndicatorObjectFactoryRemote.h 2011-04-10 23:52:24 +0000 |
305 | @@ -27,6 +27,27 @@ |
306 | #include "IndicatorObjectFactory.h" |
307 | #include "IndicatorObjectProxyRemote.h" |
308 | |
309 | +class SyncData |
310 | +{ |
311 | +public: |
312 | + SyncData (IndicatorObjectFactory *self) |
313 | + : _self (self), |
314 | + _cancel (g_cancellable_new ()) |
315 | + { |
316 | + } |
317 | + |
318 | + ~SyncData () |
319 | + { |
320 | + g_object_unref (_cancel); |
321 | + _cancel = NULL; |
322 | + _self = NULL; |
323 | + } |
324 | + |
325 | + IndicatorObjectFactory *_self; |
326 | + GCancellable *_cancel; |
327 | +}; |
328 | + |
329 | + |
330 | // Connects to the remote panel service (unity-panel-service) and translates |
331 | // that into something that the panel can show |
332 | class IndicatorObjectFactoryRemote : public IndicatorObjectFactory |
333 | @@ -52,10 +73,14 @@ |
334 | |
335 | GDBusProxy * GetRemoteProxy (); |
336 | |
337 | + std::vector<SyncData*> _sync_cancellables; |
338 | + |
339 | private: |
340 | IndicatorObjectProxyRemote* IndicatorForID (const char *id); |
341 | private: |
342 | - GDBusProxy *_proxy; |
343 | + GDBusProxy *_proxy; |
344 | + guint32 _proxy_signal_id; |
345 | + guint32 _proxy_name_id; |
346 | }; |
347 | |
348 | #endif // INDICATOR_OBJECT_FACTORY_REMOTE_H |
349 | |
350 | === modified file 'src/PanelMenuView.cpp' |
351 | --- src/PanelMenuView.cpp 2011-04-07 10:22:48 +0000 |
352 | +++ src/PanelMenuView.cpp 2011-04-10 23:52:24 +0000 |
353 | @@ -121,10 +121,10 @@ |
354 | |
355 | // Register for all the interesting events |
356 | UBusServer *ubus = ubus_server_get_default (); |
357 | - ubus_server_register_interest (ubus, UBUS_PLACE_VIEW_SHOWN, |
358 | + _place_shown_interest = ubus_server_register_interest (ubus, UBUS_PLACE_VIEW_SHOWN, |
359 | (UBusCallback)PanelMenuView::OnPlaceViewShown, |
360 | this); |
361 | - ubus_server_register_interest (ubus, UBUS_PLACE_VIEW_HIDDEN, |
362 | + _place_hidden_interest = ubus_server_register_interest (ubus, UBUS_PLACE_VIEW_HIDDEN, |
363 | (UBusCallback)PanelMenuView::OnPlaceViewHidden, |
364 | this); |
365 | |
366 | @@ -169,6 +169,8 @@ |
367 | _window_buttons->UnReference (); |
368 | _panel_titlebar_grab_area->UnReference (); |
369 | |
370 | + ubus_server_unregister_interest (ubus_server_get_default (), _place_shown_interest); |
371 | + ubus_server_unregister_interest (ubus_server_get_default (), _place_hidden_interest); |
372 | } |
373 | |
374 | void |
375 | @@ -372,9 +374,10 @@ |
376 | } |
377 | else |
378 | { |
379 | - gPainter.PushDrawLayer (GfxContext, |
380 | - geo, |
381 | - _title_layer); |
382 | + if (_title_layer) |
383 | + gPainter.PushDrawLayer (GfxContext, |
384 | + geo, |
385 | + _title_layer); |
386 | } |
387 | } |
388 | |
389 | |
390 | === modified file 'src/PanelMenuView.h' |
391 | --- src/PanelMenuView.h 2011-03-29 17:51:28 +0000 |
392 | +++ src/PanelMenuView.h 2011-04-10 23:52:24 +0000 |
393 | @@ -161,5 +161,8 @@ |
394 | sigc::connection _on_panelstyle_changed_connection; |
395 | |
396 | gulong _activate_window_changed_id; |
397 | + |
398 | + guint32 _place_shown_interest; |
399 | + guint32 _place_hidden_interest; |
400 | }; |
401 | #endif |
402 | |
403 | === modified file 'src/PlacesGroupController.cpp' |
404 | --- src/PlacesGroupController.cpp 2011-03-31 21:38:40 +0000 |
405 | +++ src/PlacesGroupController.cpp 2011-04-10 23:52:24 +0000 |
406 | @@ -214,7 +214,8 @@ |
407 | void |
408 | PlacesGroupController::Clear () |
409 | { |
410 | - |
411 | + if (_group->GetChildLayout ()) |
412 | + _group->GetChildLayout ()->Clear (); |
413 | } |
414 | |
415 | void |
416 | |
417 | === modified file 'src/PlacesSearchBar.cpp' |
418 | --- src/PlacesSearchBar.cpp 2011-04-06 17:53:41 +0000 |
419 | +++ src/PlacesSearchBar.cpp 2011-04-10 23:52:24 +0000 |
420 | @@ -53,7 +53,7 @@ |
421 | _live_search_timeout (0) |
422 | { |
423 | PlacesStyle *style = PlacesStyle::GetDefault (); |
424 | - nux::BaseTexture *icon = style->GetSearchReadyIcon (); |
425 | + nux::BaseTexture *icon = style->GetSearchMagnifyIcon (); |
426 | |
427 | _bg_layer = new nux::ColorLayer (nux::Color (0xff595853), true); |
428 | |
429 | |
430 | === modified file 'src/PlacesSearchBarSpinner.cpp' |
431 | --- src/PlacesSearchBarSpinner.cpp 2011-04-06 17:53:41 +0000 |
432 | +++ src/PlacesSearchBarSpinner.cpp 2011-04-10 23:52:24 +0000 |
433 | @@ -33,10 +33,11 @@ |
434 | { |
435 | PlacesStyle *style = PlacesStyle::GetDefault (); |
436 | |
437 | - _search_ready = style->GetSearchReadyIcon (); |
438 | - _clear_full = style->GetSearchClearIcon (); |
439 | - _clear_alone = style->GetSearchClearAloneIcon (); |
440 | - _clear_spinner = style->GetSearchClearSpinnerIcon (); |
441 | + _magnify = style->GetSearchMagnifyIcon (); |
442 | + _close = style->GetSearchCloseIcon (); |
443 | + _close_glow = style->GetSearchCloseGlowIcon (); |
444 | + _spin = style->GetSearchSpinIcon (); |
445 | + _spin_glow = style->GetSearchSpinGlowIcon (); |
446 | |
447 | _2d_rotate.Identity (); |
448 | _2d_rotate.Rotate_z (0.0); |
449 | @@ -69,56 +70,85 @@ |
450 | texxform.min_filter = nux::TEXFILTER_LINEAR; |
451 | texxform.mag_filter = nux::TEXFILTER_LINEAR; |
452 | |
453 | + GfxContext.QRP_1Tex (geo.x + ((geo.width - _spin_glow->GetWidth ())/2), |
454 | + geo.y + ((geo.height - _spin_glow->GetHeight ())/2), |
455 | + _spin_glow->GetWidth (), |
456 | + _spin_glow->GetHeight (), |
457 | + _spin_glow->GetDeviceTexture (), |
458 | + texxform, |
459 | + nux::Colors::White); |
460 | + |
461 | if (_state == STATE_READY) |
462 | { |
463 | - GfxContext.QRP_1Tex (geo.x + ((geo.width - _search_ready->GetWidth ())/2), |
464 | - geo.y + ((geo.height - _search_ready->GetHeight ())/2), |
465 | - _search_ready->GetWidth (), |
466 | - _search_ready->GetHeight (), |
467 | - _search_ready->GetDeviceTexture (), |
468 | + GfxContext.QRP_1Tex (geo.x + ((geo.width - _magnify->GetWidth ())/2), |
469 | + geo.y + ((geo.height - _magnify->GetHeight ())/2), |
470 | + _magnify->GetWidth (), |
471 | + _magnify->GetHeight (), |
472 | + _magnify->GetDeviceTexture (), |
473 | texxform, |
474 | nux::Colors::White); |
475 | } |
476 | else if (_state == STATE_SEARCHING) |
477 | { |
478 | - nux::Geometry clear_geo (geo.x + ((geo.width - _clear_spinner->GetWidth ())/2), |
479 | - geo.y + ((geo.height - _clear_spinner->GetHeight ())/2), |
480 | - _clear_spinner->GetWidth (), |
481 | - _clear_spinner->GetHeight ()); |
482 | + nux::Geometry spin_geo (geo.x + ((geo.width - _spin->GetWidth ())/2), |
483 | + geo.y + ((geo.height - _spin->GetHeight ())/2), |
484 | + _spin->GetWidth (), |
485 | + _spin->GetHeight ()); |
486 | + int spin_offset_w = (geo.width % 2) ? 0 : 1; |
487 | + int spin_offset_h = (geo.height % 2) ? 0 : 1; |
488 | |
489 | - GfxContext.PushModelViewMatrix (nux::Matrix4::TRANSLATE(-clear_geo.x - clear_geo.width / 2, |
490 | - -clear_geo.y - clear_geo.height / 2, 0)); |
491 | + GfxContext.PushModelViewMatrix (nux::Matrix4::TRANSLATE(-spin_geo.x - (spin_geo.width + spin_offset_w) / 2.0f, |
492 | + -spin_geo.y - (spin_geo.height + spin_offset_h) / 2.0f, 0)); |
493 | GfxContext.PushModelViewMatrix (_2d_rotate); |
494 | - GfxContext.PushModelViewMatrix (nux::Matrix4::TRANSLATE(clear_geo.x + clear_geo.width/ 2, |
495 | - clear_geo.y + clear_geo.height / 2, 0)); |
496 | - |
497 | - GfxContext.QRP_1Tex (clear_geo.x, |
498 | - clear_geo.y, |
499 | - clear_geo.width, |
500 | - clear_geo.height, |
501 | - _clear_spinner->GetDeviceTexture (), |
502 | - texxform, |
503 | - nux::Colors::White); |
504 | - |
505 | - GfxContext.PopModelViewMatrix (); |
506 | - GfxContext.PopModelViewMatrix (); |
507 | - GfxContext.PopModelViewMatrix (); |
508 | - |
509 | - GfxContext.QRP_1Tex (geo.x + ((geo.width - _clear_alone->GetWidth ())/2), |
510 | - geo.y + ((geo.height - _clear_alone->GetHeight ())/2), |
511 | - _clear_alone->GetWidth (), |
512 | - _clear_alone->GetHeight (), |
513 | - _clear_alone->GetDeviceTexture (), |
514 | - texxform, |
515 | - nux::Colors::White); |
516 | + GfxContext.PushModelViewMatrix (nux::Matrix4::TRANSLATE(spin_geo.x + (spin_geo.width + spin_offset_w)/ 2.0f, |
517 | + spin_geo.y + (spin_geo.height + spin_offset_h) / 2.0f, 0)); |
518 | + |
519 | + GfxContext.QRP_1Tex (spin_geo.x, |
520 | + spin_geo.y, |
521 | + spin_geo.width, |
522 | + spin_geo.height, |
523 | + _spin->GetDeviceTexture (), |
524 | + texxform, |
525 | + nux::Colors::White); |
526 | + |
527 | + GfxContext.PopModelViewMatrix (); |
528 | + GfxContext.PopModelViewMatrix (); |
529 | + GfxContext.PopModelViewMatrix (); |
530 | } |
531 | else |
532 | { |
533 | - GfxContext.QRP_1Tex (geo.x + ((geo.width - _clear_full->GetWidth ())/2), |
534 | - geo.y + ((geo.height - _clear_full->GetHeight ())/2), |
535 | - _clear_full->GetWidth (), |
536 | - _clear_full->GetHeight (), |
537 | - _clear_full->GetDeviceTexture (), |
538 | + texxform.FlipVCoord (true); |
539 | + GfxContext.QRP_1Tex (geo.x + ((geo.width - _spin->GetWidth ())/2), |
540 | + geo.y + ((geo.height - _spin->GetHeight ())/2), |
541 | + _spin->GetWidth (), |
542 | + _spin->GetHeight (), |
543 | + _spin->GetDeviceTexture (), |
544 | + texxform, |
545 | + nux::Colors::White); |
546 | + texxform.FlipVCoord (false); |
547 | + |
548 | + GfxContext.QRP_1Tex (geo.x + ((geo.width - _spin->GetWidth ())/2), |
549 | + geo.y + ((geo.height - _spin->GetHeight ())/2), |
550 | + _spin->GetWidth (), |
551 | + _spin->GetHeight (), |
552 | + _spin->GetDeviceTexture (), |
553 | + texxform, |
554 | + nux::Colors::White); |
555 | + |
556 | + |
557 | + GfxContext.QRP_1Tex (geo.x + ((geo.width - _close_glow->GetWidth ())/2), |
558 | + geo.y + ((geo.height - _close_glow->GetHeight ())/2), |
559 | + _close_glow->GetWidth (), |
560 | + _close_glow->GetHeight (), |
561 | + _close_glow->GetDeviceTexture (), |
562 | + texxform, |
563 | + nux::Colors::White); |
564 | + |
565 | + GfxContext.QRP_1Tex (geo.x + ((geo.width - _close->GetWidth ())/2), |
566 | + geo.y + ((geo.height - _close->GetHeight ())/2), |
567 | + _close->GetWidth (), |
568 | + _close->GetHeight (), |
569 | + _close->GetDeviceTexture (), |
570 | texxform, |
571 | nux::Colors::White); |
572 | } |
573 | |
574 | === modified file 'src/PlacesSearchBarSpinner.h' |
575 | --- src/PlacesSearchBarSpinner.h 2011-03-23 23:18:03 +0000 |
576 | +++ src/PlacesSearchBarSpinner.h 2011-04-10 23:52:24 +0000 |
577 | @@ -58,10 +58,11 @@ |
578 | private: |
579 | SpinnerState _state; |
580 | |
581 | - nux::BaseTexture *_search_ready; |
582 | - nux::BaseTexture *_clear_full; |
583 | - nux::BaseTexture *_clear_alone; |
584 | - nux::BaseTexture *_clear_spinner; |
585 | + nux::BaseTexture *_magnify; |
586 | + nux::BaseTexture *_close; |
587 | + nux::BaseTexture *_close_glow; |
588 | + nux::BaseTexture *_spin; |
589 | + nux::BaseTexture *_spin_glow; |
590 | |
591 | nux::Matrix4 _2d_rotate; |
592 | float _rotation; |
593 | |
594 | === modified file 'src/PlacesSimpleTile.cpp' |
595 | --- src/PlacesSimpleTile.cpp 2011-04-07 12:36:20 +0000 |
596 | +++ src/PlacesSimpleTile.cpp 2011-04-10 23:52:24 +0000 |
597 | @@ -48,16 +48,16 @@ |
598 | |
599 | _icontex = new IconTexture (_icon, icon_size, defer_icon_loading); |
600 | _icontex->SetMinMaxSize (style->GetTileWidth (), icon_size); |
601 | - _icontex->SinkReference (); |
602 | AddChild (_icontex); |
603 | |
604 | + |
605 | _cairotext = new nux::StaticCairoText (""); |
606 | _cairotext->SetMaximumWidth (style->GetTileWidth ()); |
607 | _cairotext->SinkReference (); |
608 | _cairotext->SetTextEllipsize (nux::StaticCairoText::NUX_ELLIPSIZE_START); |
609 | _cairotext->SetTextAlignment (nux::StaticCairoText::NUX_ALIGN_CENTRE); |
610 | _cairotext->SetText (_label); |
611 | - |
612 | + |
613 | layout->AddLayout (new nux::SpaceLayout (0, 0, 12, 12)); |
614 | layout->AddView (_icontex, 0, nux::eCenter, nux::eFull); |
615 | layout->AddLayout (new nux::SpaceLayout (0, 0, 12, 12)); |
616 | @@ -73,11 +73,6 @@ |
617 | |
618 | PlacesSimpleTile::~PlacesSimpleTile () |
619 | { |
620 | - _icontex->UnReference (); |
621 | - _icontex = NULL; |
622 | - _cairotext->UnReference (); |
623 | - _cairotext = NULL; |
624 | - |
625 | g_free (_label); |
626 | g_free (_icon); |
627 | g_free (_uri); |
628 | |
629 | === modified file 'src/PlacesStyle.cpp' |
630 | --- src/PlacesStyle.cpp 2011-04-10 15:08:29 +0000 |
631 | +++ src/PlacesStyle.cpp 2011-04-10 23:52:24 +0000 |
632 | @@ -38,10 +38,11 @@ |
633 | _dash_right_texture (NULL), |
634 | _dash_corner_texture (NULL), |
635 | _dash_fullscreen_icon (NULL), |
636 | - _search_ready_texture (NULL), |
637 | - _search_clear_texture (NULL), |
638 | - _search_clear_alone_texture (NULL), |
639 | - _search_clear_spinner_texture (NULL), |
640 | + _search_magnify_texture (NULL), |
641 | + _search_close_texture (NULL), |
642 | + _search_close_glow_texture (NULL), |
643 | + _search_spin_texture (NULL), |
644 | + _search_spin_glow_texture (NULL), |
645 | _group_unexpand_texture (NULL), |
646 | _group_expand_texture (NULL) |
647 | { |
648 | @@ -63,14 +64,14 @@ |
649 | _dash_corner_texture->UnReference (); |
650 | if (_dash_fullscreen_icon) |
651 | _dash_fullscreen_icon->UnReference (); |
652 | - if (_search_ready_texture) |
653 | - _search_ready_texture->UnReference (); |
654 | - if (_search_clear_texture) |
655 | - _search_clear_texture->UnReference (); |
656 | - if (_search_clear_alone_texture) |
657 | - _search_clear_alone_texture->UnReference (); |
658 | - if (_search_clear_spinner_texture) |
659 | - _search_clear_spinner_texture->UnReference (); |
660 | + if (_search_magnify_texture) |
661 | + _search_magnify_texture->UnReference (); |
662 | + if (_search_close_texture) |
663 | + _search_close_texture->UnReference (); |
664 | + if (_search_close_glow_texture) |
665 | + _search_close_glow_texture->UnReference (); |
666 | + if (_search_spin_texture) |
667 | + _search_spin_texture->UnReference (); |
668 | if (_group_unexpand_texture) |
669 | _group_unexpand_texture->UnReference (); |
670 | if (_group_expand_texture) |
671 | @@ -176,35 +177,43 @@ |
672 | } |
673 | |
674 | nux::BaseTexture * |
675 | -PlacesStyle::GetSearchReadyIcon () |
676 | -{ |
677 | - if (!_search_ready_texture) |
678 | - _search_ready_texture = TextureFromFilename (PKGDATADIR"/search_ready_icon.png"); |
679 | - return _search_ready_texture; |
680 | -} |
681 | - |
682 | -nux::BaseTexture * |
683 | -PlacesStyle::GetSearchClearIcon () |
684 | -{ |
685 | - if (!_search_clear_texture) |
686 | - _search_clear_texture = TextureFromFilename (PKGDATADIR"/search_clear_icon.png"); |
687 | - return _search_clear_texture; |
688 | -} |
689 | - |
690 | -nux::BaseTexture * |
691 | -PlacesStyle::GetSearchClearAloneIcon () |
692 | -{ |
693 | - if (!_search_clear_alone_texture) |
694 | - _search_clear_alone_texture = TextureFromFilename (PKGDATADIR"/search_clear_alone.png"); |
695 | - return _search_clear_alone_texture; |
696 | -} |
697 | - |
698 | -nux::BaseTexture * |
699 | -PlacesStyle::GetSearchClearSpinnerIcon () |
700 | -{ |
701 | - if (!_search_clear_spinner_texture) |
702 | - _search_clear_spinner_texture = TextureFromFilename (PKGDATADIR"/search_clear_spinner.png"); |
703 | - return _search_clear_spinner_texture; |
704 | +PlacesStyle::GetSearchMagnifyIcon () |
705 | +{ |
706 | + if (!_search_magnify_texture) |
707 | + _search_magnify_texture = TextureFromFilename (PKGDATADIR"/search_magnify.png"); |
708 | + return _search_magnify_texture; |
709 | +} |
710 | + |
711 | +nux::BaseTexture * |
712 | +PlacesStyle::GetSearchCloseIcon () |
713 | +{ |
714 | + if (!_search_close_texture) |
715 | + _search_close_texture = TextureFromFilename (PKGDATADIR"/search_close.png"); |
716 | + return _search_close_texture; |
717 | +} |
718 | + |
719 | +nux::BaseTexture * |
720 | +PlacesStyle::GetSearchCloseGlowIcon () |
721 | +{ |
722 | + if (!_search_close_glow_texture) |
723 | + _search_close_glow_texture = TextureFromFilename (PKGDATADIR"/search_close_glow.png"); |
724 | + return _search_close_glow_texture; |
725 | +} |
726 | + |
727 | +nux::BaseTexture * |
728 | +PlacesStyle::GetSearchSpinIcon () |
729 | +{ |
730 | + if (!_search_spin_texture) |
731 | + _search_spin_texture = TextureFromFilename (PKGDATADIR"/search_spin.png"); |
732 | + return _search_spin_texture; |
733 | +} |
734 | + |
735 | +nux::BaseTexture * |
736 | +PlacesStyle::GetSearchSpinGlowIcon () |
737 | +{ |
738 | + if (!_search_spin_glow_texture) |
739 | + _search_spin_glow_texture = TextureFromFilename (PKGDATADIR"/search_spin_glow.png"); |
740 | + return _search_spin_glow_texture; |
741 | } |
742 | |
743 | nux::BaseTexture * |
744 | |
745 | === modified file 'src/PlacesStyle.h' |
746 | --- src/PlacesStyle.h 2011-03-23 22:33:25 +0000 |
747 | +++ src/PlacesStyle.h 2011-04-10 23:52:24 +0000 |
748 | @@ -50,10 +50,11 @@ |
749 | nux::BaseTexture * GetDashCorner (); |
750 | nux::BaseTexture * GetDashFullscreenIcon (); |
751 | |
752 | - nux::BaseTexture * GetSearchReadyIcon (); |
753 | - nux::BaseTexture * GetSearchClearIcon (); |
754 | - nux::BaseTexture * GetSearchClearAloneIcon (); |
755 | - nux::BaseTexture * GetSearchClearSpinnerIcon (); |
756 | + nux::BaseTexture * GetSearchMagnifyIcon (); |
757 | + nux::BaseTexture * GetSearchCloseIcon (); |
758 | + nux::BaseTexture * GetSearchCloseGlowIcon (); |
759 | + nux::BaseTexture * GetSearchSpinIcon (); |
760 | + nux::BaseTexture * GetSearchSpinGlowIcon (); |
761 | |
762 | nux::BaseTexture * GetGroupUnexpandIcon (); |
763 | nux::BaseTexture * GetGroupExpandIcon (); |
764 | @@ -80,10 +81,11 @@ |
765 | nux::BaseTexture *_dash_corner_texture; |
766 | nux::BaseTexture *_dash_fullscreen_icon; |
767 | |
768 | - nux::BaseTexture *_search_ready_texture; |
769 | - nux::BaseTexture *_search_clear_texture; |
770 | - nux::BaseTexture *_search_clear_alone_texture; |
771 | - nux::BaseTexture *_search_clear_spinner_texture; |
772 | + nux::BaseTexture *_search_magnify_texture; |
773 | + nux::BaseTexture *_search_close_texture; |
774 | + nux::BaseTexture *_search_close_glow_texture; |
775 | + nux::BaseTexture *_search_spin_texture; |
776 | + nux::BaseTexture *_search_spin_glow_texture; |
777 | |
778 | nux::BaseTexture *_group_unexpand_texture; |
779 | nux::BaseTexture *_group_expand_texture; |
780 | |
781 | === modified file 'src/PlacesView.cpp' |
782 | --- src/PlacesView.cpp 2011-04-06 17:53:41 +0000 |
783 | +++ src/PlacesView.cpp 2011-04-10 23:52:24 +0000 |
784 | @@ -51,7 +51,8 @@ |
785 | _resize_id (0), |
786 | _alt_f2_entry (NULL), |
787 | _searching_timeout (0), |
788 | - _pending_activation (false) |
789 | + _pending_activation (false), |
790 | + _search_empty (false) |
791 | { |
792 | LoadPlaces (); |
793 | _factory->place_added.connect (sigc::mem_fun (this, &PlacesView::OnPlaceAdded)); |
794 | @@ -424,7 +425,6 @@ |
795 | void |
796 | PlacesView::SetActiveEntry (PlaceEntry *entry, guint section_id, const char *search_string, bool signal) |
797 | { |
798 | - |
799 | if (signal) |
800 | entry_changed.emit (entry); |
801 | |
802 | @@ -452,6 +452,7 @@ |
803 | |
804 | _entry->SetActive (true); |
805 | _search_bar->SetActiveEntry (_entry, section_id, search_string); |
806 | + _search_empty = (g_strcmp0 (search_string, "") == 0 && _entry == _home_entry); |
807 | |
808 | _entry->ForeachGroup (sigc::mem_fun (this, &PlacesView::OnGroupAdded)); |
809 | _entry->ForeachResult (sigc::mem_fun (this, &PlacesView::OnResultAdded)); |
810 | @@ -619,6 +620,10 @@ |
811 | void |
812 | PlacesView::OnResultAdded (PlaceEntry *entry, PlaceEntryGroup& group, PlaceEntryResult& result) |
813 | { |
814 | + // We never show these so ignore them |
815 | + if (_search_empty) |
816 | + return; |
817 | + |
818 | _n_results++; |
819 | |
820 | if (_n_results <= 2 |
821 | @@ -729,12 +734,15 @@ |
822 | void |
823 | PlacesView::OnSearchChanged (const char *search_string) |
824 | { |
825 | + _search_empty = false; |
826 | + |
827 | if (_entry == _home_entry) |
828 | { |
829 | if (g_strcmp0 (search_string, "") == 0) |
830 | { |
831 | _layered_layout->SetActiveLayer (_home_view); |
832 | _home_view->QueueDraw (); |
833 | + _search_empty = true; |
834 | } |
835 | else |
836 | { |
837 | |
838 | === modified file 'src/PlacesView.h' |
839 | --- src/PlacesView.h 2011-03-31 14:26:00 +0000 |
840 | +++ src/PlacesView.h 2011-04-10 23:52:24 +0000 |
841 | @@ -170,6 +170,8 @@ |
842 | guint _n_results; |
843 | guint _searching_timeout; |
844 | bool _pending_activation; |
845 | + |
846 | + bool _search_empty; |
847 | }; |
848 | |
849 | #endif // PANEL_HOME_BUTTON_H |
850 | |
851 | === modified file 'src/QuicklistView.cpp' |
852 | --- src/QuicklistView.cpp 2011-04-06 17:53:41 +0000 |
853 | +++ src/QuicklistView.cpp 2011-04-10 23:52:24 +0000 |
854 | @@ -126,14 +126,19 @@ |
855 | bool |
856 | QuicklistView::IsMenuItemSeperator (int index) |
857 | { |
858 | - DbusmenuMenuitem* item = NULL; |
859 | - const gchar* label = NULL; |
860 | - bool result = false; |
861 | + QuicklistMenuItem* menu_item = NULL; |
862 | + DbusmenuMenuitem* item = NULL; |
863 | + const gchar* label = NULL; |
864 | + bool result = false; |
865 | |
866 | if (index < 0) |
867 | return false; |
868 | |
869 | - item = GetNthItems (index)->_menuItem; |
870 | + menu_item = GetNthItems (index); |
871 | + if (!menu_item) |
872 | + return false; |
873 | + |
874 | + item = menu_item->_menuItem; |
875 | if (!item) |
876 | return false; |
877 | |
878 | |
879 | === modified file 'src/StaticCairoText.cpp' |
880 | --- src/StaticCairoText.cpp 2011-04-10 22:12:26 +0000 |
881 | +++ src/StaticCairoText.cpp 2011-04-10 23:52:24 +0000 |
882 | @@ -490,7 +490,7 @@ |
883 | |
884 | _texture2D = GetThreadGLDeviceFactory()->CreateSystemCapableTexture (); |
885 | _texture2D->Update (bitmap); |
886 | - |
887 | + |
888 | delete bitmap; |
889 | |
890 | cairo_destroy (cr); |
891 | |
892 | === modified file 'src/UScreen.cpp' |
893 | --- src/UScreen.cpp 2011-03-22 16:44:47 +0000 |
894 | +++ src/UScreen.cpp 2011-04-10 23:52:24 +0000 |
895 | @@ -94,6 +94,7 @@ |
896 | { |
897 | GdkScreen *screen; |
898 | int primary; |
899 | + nux::Geometry last_geo (0, 0, 1, 1); |
900 | |
901 | screen = gdk_screen_get_default (); |
902 | primary = GetPrimaryMonitor (); |
903 | @@ -109,6 +110,12 @@ |
904 | gdk_screen_get_monitor_geometry (screen, i, &rect); |
905 | |
906 | nux::Geometry geo (rect.x, rect.y, rect.width, rect.height); |
907 | + |
908 | + // Check for mirrored displays |
909 | + if (geo == last_geo) |
910 | + continue; |
911 | + last_geo = geo; |
912 | + |
913 | _monitors.push_back (geo); |
914 | |
915 | g_print (" Monitor %d%s\n", i, i == primary ? "(primary)" : ""); |
916 | |
917 | === modified file 'tests/TestPlacesBackend.cpp' |
918 | --- tests/TestPlacesBackend.cpp 2011-02-26 16:48:18 +0000 |
919 | +++ tests/TestPlacesBackend.cpp 2011-04-10 23:52:24 +0000 |
920 | @@ -36,6 +36,10 @@ |
921 | |
922 | _vbox = gtk_vbox_new (FALSE, 12); |
923 | gtk_container_add (GTK_CONTAINER (_window), _vbox); |
924 | + |
925 | + _entry = gtk_entry_new (); |
926 | + gtk_box_pack_start (GTK_BOX (_vbox), _entry, FALSE, FALSE, 0); |
927 | + g_signal_connect (_entry, "changed", G_CALLBACK (OnEntryChanged), this); |
928 | |
929 | _combo = gtk_combo_box_text_new (); |
930 | gtk_box_pack_start (GTK_BOX (_vbox), _combo, FALSE, FALSE, 0); |
931 | @@ -48,6 +52,8 @@ |
932 | PopulateEntries (); |
933 | _factory->place_added.connect (sigc::mem_fun (this, &TestApp::OnPlaceAdded)); |
934 | |
935 | + gtk_combo_box_set_active (GTK_COMBO_BOX (_combo), 0); |
936 | + |
937 | gtk_widget_show_all (_window); |
938 | } |
939 | |
940 | @@ -66,6 +72,8 @@ |
941 | PlaceEntry *entry = static_cast<PlaceEntry *> (*i); |
942 | gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (_combo), entry->GetName ()); |
943 | } |
944 | + |
945 | + gtk_combo_box_set_active (GTK_COMBO_BOX (_combo), 0); |
946 | } |
947 | |
948 | void PopulateEntries () |
949 | @@ -87,6 +95,16 @@ |
950 | } |
951 | } |
952 | |
953 | + static void OnEntryChanged (GtkEditable *editable, TestApp *self) |
954 | + { |
955 | + if (self->_active) |
956 | + { |
957 | + std::map<gchar*, gchar*> hints; |
958 | + self->_active->SetSearch (gtk_entry_get_text (GTK_ENTRY (self->_entry)), |
959 | + hints); |
960 | + } |
961 | + } |
962 | + |
963 | static void OnComboChanged (GtkWidget *combo, TestApp *self) |
964 | { |
965 | self->OnComboChangedFoRealz (); |
966 | @@ -110,33 +128,7 @@ |
967 | for (i = entries.begin (); i != entries.end (); ++i) |
968 | { |
969 | PlaceEntry *entry = static_cast<PlaceEntry *> (*i); |
970 | - |
971 | - if (g_strcmp0 (txt, entry->GetName ()) == 0) |
972 | - { |
973 | - //FIXME : Update when we have sections support |
974 | -#if 0 |
975 | - DeeModel *sections = entry->GetSectionsModel (); |
976 | - DeeModelIter *iter; |
977 | - |
978 | - // Update the sections |
979 | - |
980 | - for (gint i = 0; i < _n_secs; i++) |
981 | - { |
982 | - gtk_combo_box_remove_text (GTK_COMBO_BOX (_seccombo), 0); |
983 | - } |
984 | - |
985 | - iter = dee_model_get_first_iter (sections); |
986 | - while (!dee_model_is_last(sections, iter)) |
987 | - { |
988 | - gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (_seccombo), dee_model_get_string (sections, iter, 0)); |
989 | - _n_secs++; |
990 | - |
991 | - iter = dee_model_next (sections, iter); |
992 | - } |
993 | - |
994 | - gtk_combo_box_set_active (GTK_COMBO_BOX (_seccombo), 0); |
995 | -#endif |
996 | - } |
997 | + _active = entry; |
998 | } |
999 | } |
1000 | |
1001 | @@ -147,9 +139,12 @@ |
1002 | |
1003 | GtkWidget *_window; |
1004 | GtkWidget *_vbox; |
1005 | + GtkWidget *_entry; |
1006 | GtkWidget *_combo; |
1007 | GtkWidget *_seccombo; |
1008 | gint _n_secs; |
1009 | + |
1010 | + PlaceEntry *_active; |
1011 | }; |
1012 | |
1013 |
+1 looks good