Merge lp:~njpatel/unity/dash-fixes-2011-08-30 into lp:unity

Proposed by Neil J. Patel
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 1476
Proposed branch: lp:~njpatel/unity/dash-fixes-2011-08-30
Merge into: lp:unity
Diff against target: 503 lines (+156/-136)
6 files modified
plugins/unityshell/src/DashView.cpp (+78/-5)
plugins/unityshell/src/DashView.h (+5/-0)
plugins/unityshell/src/LensView.cpp (+7/-0)
plugins/unityshell/src/PlacesGroup.cpp (+13/-10)
plugins/unityshell/src/PlacesHomeView.cpp (+50/-107)
plugins/unityshell/src/PlacesHomeView.h (+3/-14)
To merge this branch: bzr merge lp:~njpatel/unity/dash-fixes-2011-08-30
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+73662@code.launchpad.net

Description of the change

Bugs attached.

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
=== modified file 'plugins/unityshell/src/DashView.cpp'
--- plugins/unityshell/src/DashView.cpp 2011-08-30 16:04:19 +0000
+++ plugins/unityshell/src/DashView.cpp 2011-09-01 12:59:25 +0000
@@ -24,6 +24,7 @@
2424
25#include <NuxCore/Logger.h>25#include <NuxCore/Logger.h>
26#include <UnityCore/GLibWrapper.h>26#include <UnityCore/GLibWrapper.h>
27#include <UnityCore/RadioOptionFilter.h>
2728
28#include "PlacesStyle.h"29#include "PlacesStyle.h"
29#include "DashSettings.h"30#include "DashSettings.h"
@@ -45,6 +46,7 @@
45 : nux::View(NUX_TRACKER_LOCATION)46 : nux::View(NUX_TRACKER_LOCATION)
46 , active_lens_view_(0)47 , active_lens_view_(0)
47 , last_activated_uri_("")48 , last_activated_uri_("")
49 , visible_(false)
4850
49{51{
50 SetupBackground();52 SetupBackground();
@@ -68,6 +70,7 @@
68void DashView::AboutToShow()70void DashView::AboutToShow()
69{71{
70 ubus_manager_.SendMessage(UBUS_BACKGROUND_REQUEST_COLOUR_EMIT);72 ubus_manager_.SendMessage(UBUS_BACKGROUND_REQUEST_COLOUR_EMIT);
73 visible_ = true;
71 bg_effect_helper_.enabled = true;74 bg_effect_helper_.enabled = true;
72 search_bar_->text_entry()->SelectAll();75 search_bar_->text_entry()->SelectAll();
73 search_bar_->text_entry()->SetFocused(true);76 search_bar_->text_entry()->SetFocused(true);
@@ -75,6 +78,7 @@
7578
76void DashView::AboutToHide()79void DashView::AboutToHide()
77{80{
81 visible_ = false;
78 bg_effect_helper_.enabled = false;82 bg_effect_helper_.enabled = false;
79}83}
8084
@@ -463,18 +467,87 @@
463467
464void DashView::OnActivateRequest(GVariant* args)468void DashView::OnActivateRequest(GVariant* args)
465{469{
466 glib::String id;470 glib::String uri;
467 glib::String search_string;471 glib::String search_string;
468472
469 g_variant_get(args, "(sus)", &id, NULL, &search_string);473 g_variant_get(args, "(sus)", &uri, NULL, &search_string);
470474
471 lens_bar_->Activate(id.Str());475 std::string id = AnalyseLensURI(uri.Str());
476
477 home_view_->search_string = "";
478 lens_bar_->Activate(id);
472479
473 // Reset focus480 // Reset focus
474 SetFocused(false);481 SetFocused(false);
475 SetFocused(true);482 SetFocused(true);
476483
477 ubus_manager_.SendMessage(UBUS_DASH_EXTERNAL_ACTIVATION);484 if (id == "home.lens" || !visible_)
485 ubus_manager_.SendMessage(UBUS_DASH_EXTERNAL_ACTIVATION);
486}
487
488std::string DashView::AnalyseLensURI(std::string uri)
489{
490 std::string id = uri;
491 std::size_t pos = uri.find("?");
492
493 // It is a real URI
494 if (pos)
495 {
496 id = uri.substr(0, pos);
497
498 std::string components = uri.substr(++pos);
499 gchar** tokens = g_strsplit(components.c_str(), "&", -1);
500
501 for (int i = 0; tokens[i]; ++i)
502 {
503 gchar** subs = g_strsplit(tokens[i], "=", 2);
504
505 if (g_str_has_prefix(subs[0], "filter_"))
506 {
507 UpdateLensFilter(id, subs[0] + 7, subs[1]);
508 lens_views_[id]->filters_expanded = true;
509 }
510
511 g_strfreev(subs);
512 }
513
514 g_strfreev(tokens);
515 }
516
517 return id;
518}
519
520void DashView::UpdateLensFilter(std::string lens_id, std::string filter_name, std::string value)
521{
522 if (lenses_.GetLens(lens_id))
523 {
524 Lens::Ptr lens = lenses_.GetLens(lens_id);
525
526 Filters::Ptr filters = lens->filters;
527
528 for (unsigned int i = 0; i < filters->count(); ++i)
529 {
530 Filter::Ptr filter = filters->FilterAtIndex(i);
531
532 if (filter->id() == filter_name)
533 {
534 UpdateLensFilterValue(filter, value);
535 }
536 }
537 }
538}
539
540void DashView::UpdateLensFilterValue(Filter::Ptr filter, std::string value)
541{
542 if (filter->renderer_name == "filter-radiooption")
543 {
544 RadioOptionFilter::Ptr radio = std::static_pointer_cast<RadioOptionFilter>(filter);
545 for (auto option: radio->options())
546 {
547 if (option->id == value)
548 option->active = true;
549 }
550 }
478}551}
479552
480void DashView::OnBackgroundColorChanged(GVariant* args)553void DashView::OnBackgroundColorChanged(GVariant* args)
481554
=== modified file 'plugins/unityshell/src/DashView.h'
--- plugins/unityshell/src/DashView.h 2011-08-25 10:18:58 +0000
+++ plugins/unityshell/src/DashView.h 2011-09-01 12:59:25 +0000
@@ -81,6 +81,9 @@
81 bool DoFallbackActivation(std::string const& uri);81 bool DoFallbackActivation(std::string const& uri);
82 bool LaunchApp(std::string const& appname);82 bool LaunchApp(std::string const& appname);
83 void OnEntryActivated();83 void OnEntryActivated();
84 std::string AnalyseLensURI(std::string uri);
85 void UpdateLensFilter(std::string lens, std::string filter, std::string value);
86 void UpdateLensFilterValue(Filter::Ptr filter, std::string value);
84 87
85 bool AcceptKeyNavFocus();88 bool AcceptKeyNavFocus();
86 bool InspectKeyEvent(unsigned int eventType, unsigned int key_sym, const char* character);89 bool InspectKeyEvent(unsigned int eventType, unsigned int key_sym, const char* character);
@@ -112,6 +115,8 @@
112 nux::ObjectPtr <nux::IOpenGLBaseTexture> bg_blur_texture_;115 nux::ObjectPtr <nux::IOpenGLBaseTexture> bg_blur_texture_;
113116
114 std::string last_activated_uri_;117 std::string last_activated_uri_;
118
119 bool visible_;
115};120};
116121
117122
118123
=== modified file 'plugins/unityshell/src/LensView.cpp'
--- plugins/unityshell/src/LensView.cpp 2011-08-31 16:52:32 +0000
+++ plugins/unityshell/src/LensView.cpp 2011-09-01 12:59:25 +0000
@@ -161,6 +161,13 @@
161 group->SetChildView(grid);161 group->SetChildView(grid);
162162
163 scroll_layout_->AddView(group, 0);163 scroll_layout_->AddView(group, 0);
164
165 Categories::Ptr categories = lens_->categories;
166 if (category.index + 1 == categories->count())
167 {
168 lens_->Search("---");
169 lens_->Search("");
170 }
164}171}
165172
166void LensView::OnResultAdded(Result const& result)173void LensView::OnResultAdded(Result const& result)
167174
=== modified file 'plugins/unityshell/src/PlacesGroup.cpp'
--- plugins/unityshell/src/PlacesGroup.cpp 2011-08-24 22:28:46 +0000
+++ plugins/unityshell/src/PlacesGroup.cpp 2011-09-01 12:59:25 +0000
@@ -266,17 +266,20 @@
266gboolean266gboolean
267PlacesGroup::OnIdleRelayout(PlacesGroup* self)267PlacesGroup::OnIdleRelayout(PlacesGroup* self)
268{268{
269 self->Refresh();269 if (self->GetChildView())
270 self->QueueDraw();
271 self->_group_layout->QueueDraw();
272 self->GetChildView()->QueueDraw();
273 self->ComputeChildLayout();
274 self->_idle_id = 0;
275
276 if (self->GetFocused())
277 {270 {
278 self->SetFocused(false); // unset focus on all children271 self->Refresh();
279 self->SetFocused(true); // set focus on first child272 self->QueueDraw();
273 self->_group_layout->QueueDraw();
274 self->GetChildView()->QueueDraw();
275 self->ComputeChildLayout();
276 self->_idle_id = 0;
277
278 if (self->GetFocused())
279 {
280 self->SetFocused(false); // unset focus on all children
281 self->SetFocused(true); // set focus on first child
282 }
280 }283 }
281284
282 return FALSE;285 return FALSE;
283286
=== modified file 'plugins/unityshell/src/PlacesHomeView.cpp'
--- plugins/unityshell/src/PlacesHomeView.cpp 2011-08-30 16:04:19 +0000
+++ plugins/unityshell/src/PlacesHomeView.cpp 2011-09-01 12:59:25 +0000
@@ -41,18 +41,16 @@
4141
42#include "PlacesSimpleTile.h"42#include "PlacesSimpleTile.h"
43#include "PlacesStyle.h"43#include "PlacesStyle.h"
44#include <UnityCore/GLibWrapper.h>
44#include <UnityCore/Variant.h>45#include <UnityCore/Variant.h>
4546
46#include <string>47#include <string>
47#include <vector>48#include <vector>
4849
49#define DESKTOP_DIR "/desktop/gnome/applications"
50#define BROWSER_DIR DESKTOP_DIR"/browser"
51#define MAIL_DIR "/desktop/gnome/url-handlers/mailto"
52#define MEDIA_DIR DESKTOP_DIR"/media"
53
54#define DELTA_DOUBLE_REQUEST 50000000050#define DELTA_DOUBLE_REQUEST 500000000
5551
52using namespace unity;
53
56enum54enum
57{55{
58 TYPE_PLACE = 0,56 TYPE_PLACE = 0,
@@ -101,47 +99,14 @@
101 _layout->SetChildrenSize(style->GetHomeTileWidth(), style->GetHomeTileHeight());99 _layout->SetChildrenSize(style->GetHomeTileWidth(), style->GetHomeTileHeight());
102 _layout->EnablePartialVisibility(false);100 _layout->EnablePartialVisibility(false);
103 _layout->SetHeightMatchContent(true);101 _layout->SetHeightMatchContent(true);
104 //_layout->SetVerticalExternalMargin(24);
105 _layout->SetHorizontalExternalMargin(32);102 _layout->SetHorizontalExternalMargin(32);
106 _layout->SetVerticalInternalMargin(32);103 _layout->SetVerticalInternalMargin(32);
107 _layout->SetHorizontalInternalMargin(32);104 _layout->SetHorizontalInternalMargin(32);
108 _layout->SetMinMaxSize((style->GetHomeTileWidth() * 4) + (32 * 5),105 _layout->SetMinMaxSize((style->GetHomeTileWidth() * 4) + (32 * 5),
109 (style->GetHomeTileHeight() * 2) + 32);106 (style->GetHomeTileHeight() * 2) + 32);
110107
111 _client = gconf_client_get_default();
112 gconf_client_add_dir(_client,
113 BROWSER_DIR,
114 GCONF_CLIENT_PRELOAD_NONE,
115 NULL);
116 gconf_client_add_dir(_client,
117 MAIL_DIR,
118 GCONF_CLIENT_PRELOAD_NONE,
119 NULL);
120 gconf_client_add_dir(_client,
121 MEDIA_DIR,
122 GCONF_CLIENT_PRELOAD_NONE,
123 NULL);
124 _browser_gconf_notify = gconf_client_notify_add(_client,
125 BROWSER_DIR"/exec",
126 (GConfClientNotifyFunc)OnKeyChanged,
127 this,
128 NULL, NULL);
129 _mail_gconf_notify = gconf_client_notify_add(_client,
130 MAIL_DIR"/command",
131 (GConfClientNotifyFunc)OnKeyChanged,
132 this,
133 NULL, NULL);
134 _media_gconf_notify = gconf_client_notify_add(_client,
135 MEDIA_DIR"/exec",
136 (GConfClientNotifyFunc)OnKeyChanged,
137 this,
138 NULL, NULL);
139
140 _last_activate_time.tv_sec = 0;
141 _last_activate_time.tv_nsec = 0;
142
143 _ubus_handle = ubus_server_register_interest(ubus_server_get_default(),108 _ubus_handle = ubus_server_register_interest(ubus_server_get_default(),
144 UBUS_DASH_EXTERNAL_ACTIVATION,109 UBUS_PLACE_VIEW_SHOWN,
145 (UBusCallback) &PlacesHomeView::DashVisible,110 (UBusCallback) &PlacesHomeView::DashVisible,
146 this);111 this);
147112
@@ -175,47 +140,14 @@
175140
176PlacesHomeView::~PlacesHomeView()141PlacesHomeView::~PlacesHomeView()
177{142{
178 g_object_unref(_client);
179
180 if (_ubus_handle != 0)143 if (_ubus_handle != 0)
181 ubus_server_unregister_interest(ubus_server_get_default(), _ubus_handle);144 ubus_server_unregister_interest(ubus_server_get_default(), _ubus_handle);
182
183 if (_browser_gconf_notify)
184 gconf_client_notify_remove(_client, _browser_gconf_notify);
185 if (_mail_gconf_notify)
186 gconf_client_notify_remove(_client, _mail_gconf_notify);
187 if (_media_gconf_notify)
188 gconf_client_notify_remove(_client, _media_gconf_notify);
189 gconf_client_remove_dir(_client, BROWSER_DIR, NULL);
190 gconf_client_remove_dir(_client, MAIL_DIR, NULL);
191 gconf_client_remove_dir(_client, MEDIA_DIR, NULL);
192}145}
193146
194void147void
195PlacesHomeView::DashVisible(GVariant* data, void* val)148PlacesHomeView::DashVisible(GVariant* data, void* val)
196{149{
197 PlacesHomeView* self = (PlacesHomeView*)val;150 PlacesHomeView* self = (PlacesHomeView*)val;
198
199 struct timespec event_time, delta;
200 clock_gettime(CLOCK_MONOTONIC, &event_time);
201 delta = self->time_diff(self->_last_activate_time, event_time);
202
203 self->_last_activate_time.tv_sec = event_time.tv_sec;
204 self->_last_activate_time.tv_nsec = event_time.tv_nsec;
205
206 // FIXME: this should be handled by ubus (not sending the request twice
207 // for some selected ones). Too intrusive for now.
208 if (!((delta.tv_sec == 0) && (delta.tv_nsec < DELTA_DOUBLE_REQUEST)))
209 self->Refresh();
210
211}
212
213void
214PlacesHomeView::OnKeyChanged(GConfClient* client,
215 guint cnxn_id,
216 GConfEntry* entry,
217 PlacesHomeView* self)
218{
219 self->Refresh();151 self->Refresh();
220}152}
221153
@@ -236,7 +168,7 @@
236 markup,168 markup,
237 icon_size);169 icon_size);
238 shortcut->_id = TYPE_PLACE;170 shortcut->_id = TYPE_PLACE;
239 shortcut->_place_id = g_strdup("/com/canonical/unity/applicationsplace/applications");171 shortcut->_place_id = g_strdup("applications.lens?filter_type=media");
240 shortcut->_place_section = 9;172 shortcut->_place_section = 9;
241 _layout->AddView(shortcut, 1, nux::eLeft, nux::eFull);173 _layout->AddView(shortcut, 1, nux::eLeft, nux::eFull);
242 shortcut->sigClick.connect(sigc::mem_fun(this, &PlacesHomeView::OnShortcutClicked));174 shortcut->sigClick.connect(sigc::mem_fun(this, &PlacesHomeView::OnShortcutClicked));
@@ -248,7 +180,7 @@
248 markup,180 markup,
249 icon_size);181 icon_size);
250 shortcut->_id = TYPE_PLACE;182 shortcut->_id = TYPE_PLACE;
251 shortcut->_place_id = g_strdup("/com/canonical/unity/applicationsplace/applications");183 shortcut->_place_id = g_strdup("applications.lens?filter_type=internet");
252 shortcut->_place_section = 8;184 shortcut->_place_section = 8;
253 _layout->AddView(shortcut, 1, nux::eLeft, nux::eFull);185 _layout->AddView(shortcut, 1, nux::eLeft, nux::eFull);
254 shortcut->sigClick.connect(sigc::mem_fun(this, &PlacesHomeView::OnShortcutClicked));186 shortcut->sigClick.connect(sigc::mem_fun(this, &PlacesHomeView::OnShortcutClicked));
@@ -260,7 +192,7 @@
260 markup,192 markup,
261 icon_size);193 icon_size);
262 shortcut->_id = TYPE_PLACE;194 shortcut->_id = TYPE_PLACE;
263 shortcut->_place_id = g_strdup("/com/canonical/unity/applicationsplace/applications");195 shortcut->_place_id = g_strdup("applications.lens");
264 shortcut->_place_section = 0;196 shortcut->_place_section = 0;
265 _layout->AddView(shortcut, 1, nux::eLeft, nux::eFull);197 _layout->AddView(shortcut, 1, nux::eLeft, nux::eFull);
266 shortcut->sigClick.connect(sigc::mem_fun(this, &PlacesHomeView::OnShortcutClicked));198 shortcut->sigClick.connect(sigc::mem_fun(this, &PlacesHomeView::OnShortcutClicked));
@@ -272,33 +204,25 @@
272 markup,204 markup,
273 icon_size);205 icon_size);
274 shortcut->_id = TYPE_PLACE;206 shortcut->_id = TYPE_PLACE;
275 shortcut->_place_id = g_strdup("/com/canonical/unity/filesplace/files");207 shortcut->_place_id = g_strdup("files.lens");
276 shortcut->_place_section = 0;208 shortcut->_place_section = 0;
277 _layout->AddView(shortcut, 1, nux::eLeft, nux::eFull);209 _layout->AddView(shortcut, 1, nux::eLeft, nux::eFull);
278 shortcut->sigClick.connect(sigc::mem_fun(this, &PlacesHomeView::OnShortcutClicked));210 shortcut->sigClick.connect(sigc::mem_fun(this, &PlacesHomeView::OnShortcutClicked));
279 g_free(markup);211 g_free(markup);
280212
281 // Browser213 // Browser
282 markup = gconf_client_get_string(_client, BROWSER_DIR"/exec", NULL);214 CreateShortcutFromMime("x-scheme-handler/http", _("Browse the Web"), _browser_alternatives);
283 CreateShortcutFromExec(markup, _("Browse the Web"), _browser_alternatives);
284 g_free(markup);
285215
286 // Photos216 // Photos
287 // FIXME: Need to figure out the default217 // FIXME: Need to figure out the default
288 CreateShortcutFromExec("shotwell", _("View Photos"), _photo_alternatives);218 CreateShortcutFromExec("shotwell", _("View Photos"), _photo_alternatives);
289219
290 // Email220 CreateShortcutFromMime("x-scheme-handler/mailto", _("Check Email"), _email_alternatives);
291 markup = gconf_client_get_string(_client, MAIL_DIR"/command", NULL);221
292 // get the first word on key (the executable name itself)222 CreateShortcutFromMime("audio/x-vorbis+ogg", _("Listen to Music"), _music_alternatives);
293 gchar** temp_array = g_strsplit(markup, " ", 0);223
294 g_free(markup);224 SetExpanded(true);
295 CreateShortcutFromExec(temp_array[0], _("Check Email"), _email_alternatives);225 SetCounts(8, 8);
296 g_strfreev(temp_array);
297
298 // Music
299 markup = gconf_client_get_string(_client, MEDIA_DIR"/exec", NULL);
300 CreateShortcutFromExec(markup, _("Listen to Music"), _music_alternatives);
301 g_free(markup);
302226
303 QueueDraw();227 QueueDraw();
304 _layout->QueueDraw();228 _layout->QueueDraw();
@@ -373,6 +297,41 @@
373 g_free(markup);297 g_free(markup);
374}298}
375299
300void PlacesHomeView::CreateShortcutFromMime(const char* mime,
301 const char* name,
302 std::vector<std::string>& alternatives)
303{
304 PlacesStyle* style = PlacesStyle::GetDefault();
305 GAppInfo* info = g_app_info_get_default_for_type(mime, FALSE);
306
307 // If it was invalid check alternatives for backup
308 if (!G_IS_DESKTOP_APP_INFO(info))
309 {
310 for (auto alt: alternatives)
311 {
312 std::string id = alt + ".desktop";
313 info = G_APP_INFO(g_desktop_app_info_new(id.c_str()));
314
315 if (G_IS_DESKTOP_APP_INFO(info))
316 break;
317 }
318 }
319
320 if (G_IS_DESKTOP_APP_INFO(info))
321 {
322 glib::String icon(g_icon_to_string(g_app_info_get_icon(G_APP_INFO(info))));
323 glib::String markup(g_strdup_printf("<big>%s</big>", name));
324
325 Shortcut* shortcut = new Shortcut(icon.Value(), markup.Value(), style->GetHomeTileIconSize());
326 shortcut->_id = TYPE_EXEC;
327 shortcut->_exec = g_strdup (g_app_info_get_executable(G_APP_INFO(info)));;
328 shortcut->sigClick.connect(sigc::mem_fun(this, &PlacesHomeView::OnShortcutClicked));
329 _layout->AddView(shortcut, 1, nux::eLeft, nux::eFull);
330
331 g_object_unref(info);
332 }
333}
334
376void335void
377PlacesHomeView::OnShortcutClicked(PlacesTile* tile)336PlacesHomeView::OnShortcutClicked(PlacesTile* tile)
378{337{
@@ -423,19 +382,3 @@
423 unity::variant::BuilderWrapper(builder).add(GetGeometry());382 unity::variant::BuilderWrapper(builder).add(GetGeometry());
424}383}
425384
426// TODO: put that in some "util" toolbox
427struct timespec PlacesHomeView::time_diff(struct timespec start, struct timespec end)
428{
429 struct timespec temp;
430 if ((end.tv_nsec - start.tv_nsec) < 0)
431 {
432 temp.tv_sec = end.tv_sec - start.tv_sec - 1;
433 temp.tv_nsec = 1000000000 + end.tv_nsec - start.tv_nsec;
434 }
435 else
436 {
437 temp.tv_sec = end.tv_sec - start.tv_sec;
438 temp.tv_nsec = end.tv_nsec - start.tv_nsec;
439 }
440 return temp;
441}
442385
=== modified file 'plugins/unityshell/src/PlacesHomeView.h'
--- plugins/unityshell/src/PlacesHomeView.h 2011-08-11 01:32:45 +0000
+++ plugins/unityshell/src/PlacesHomeView.h 2011-09-01 12:59:25 +0000
@@ -32,9 +32,6 @@
32#include "PlacesTile.h"32#include "PlacesTile.h"
33#include "PlacesGroup.h"33#include "PlacesGroup.h"
3434
35#include <gconf/gconf-client.h>
36#include <time.h>
37
38class PlacesHomeView : public unity::Introspectable, public PlacesGroup35class PlacesHomeView : public unity::Introspectable, public PlacesGroup
39{36{
40public:37public:
@@ -52,29 +49,21 @@
52private:49private:
53 static void DashVisible(GVariant* data, void* val);50 static void DashVisible(GVariant* data, void* val);
54 void OnShortcutClicked(PlacesTile* _tile);51 void OnShortcutClicked(PlacesTile* _tile);
55 static void OnKeyChanged(GConfClient* client,
56 guint cnxn_id,
57 GConfEntry* entry,
58 PlacesHomeView* self);
59 void CreateShortcutFromExec(const char* exec,52 void CreateShortcutFromExec(const char* exec,
60 const char* name,53 const char* name,
61 std::vector<std::string>& alternatives);54 std::vector<std::string>& alternatives);
55 void CreateShortcutFromMime(const char* mime,
56 const char* name,
57 std::vector<std::string>& alternatives);
6258
63private:59private:
64 nux::GridHLayout* _layout;60 nux::GridHLayout* _layout;
65 GConfClient* _client;
66 std::vector<std::string> _browser_alternatives;61 std::vector<std::string> _browser_alternatives;
67 std::vector<std::string> _photo_alternatives;62 std::vector<std::string> _photo_alternatives;
68 std::vector<std::string> _email_alternatives;63 std::vector<std::string> _email_alternatives;
69 std::vector<std::string> _music_alternatives;64 std::vector<std::string> _music_alternatives;
7065
71 struct timespec time_diff(struct timespec start, struct timespec end);
72 struct timespec _last_activate_time;
73
74 guint _ubus_handle;66 guint _ubus_handle;
75 guint _browser_gconf_notify;
76 guint _mail_gconf_notify;
77 guint _media_gconf_notify;
78};67};
7968
8069