Merge lp:~dylanmccall/indicator-datetime/bug-748772 into lp:indicator-datetime/0.3

Proposed by Dylan McCall
Status: Merged
Merged at revision: 99
Proposed branch: lp:~dylanmccall/indicator-datetime/bug-748772
Merge into: lp:indicator-datetime/0.3
Diff against target: 45 lines (+14/-8)
1 file modified
src/datetime-service.c (+14/-8)
To merge this branch: bzr merge lp:~dylanmccall/indicator-datetime/bug-748772
Reviewer Review Type Date Requested Status
Karl Lattimer (community) Approve
Review via email: mp+56092@code.launchpad.net

Description of the change

This branch fixes bug #748772. An earlier change to check_for_calendar showed the calendar at all times whether Evolution was present or not. This branch ensures that the user's setting (show-calendar) takes precedence.

To post a comment you must log in.
Revision history for this message
Karl Lattimer (karl-qdh) wrote :

Looks good to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/datetime-service.c'
2--- src/datetime-service.c 2011-03-30 21:55:14 +0000
3+++ src/datetime-service.c 2011-04-03 23:51:28 +0000
4@@ -439,18 +439,16 @@
5 check_for_calendar (gpointer user_data)
6 {
7 g_return_val_if_fail (calendar != NULL, FALSE);
8- // Always enable the calendar even if it does nothing
9- dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
10- dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
11+
12+ dbusmenu_menuitem_property_set_bool(date, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
13
14 gchar *evo = g_find_program_in_path("evolution");
15 if (evo != NULL) {
16 g_debug("Found the calendar application: %s", evo);
17-
18- dbusmenu_menuitem_property_set_bool(date, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
19+
20 g_signal_connect (G_OBJECT(date), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
21- G_CALLBACK (activate_cb), "evolution -c calendar");
22-
23+ G_CALLBACK (activate_cb), "evolution -c calendar");
24+
25 events_separator = dbusmenu_menuitem_new();
26 dbusmenu_menuitem_property_set(events_separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
27 dbusmenu_menuitem_child_add_position(root, events_separator, 2);
28@@ -478,8 +476,16 @@
29 g_free(evo);
30 } else {
31 g_debug("Unable to find calendar app.");
32+ dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
33+ dbusmenu_menuitem_property_set_bool(events_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
34+ }
35+
36+ if (g_settings_get_boolean(conf, SETTINGS_SHOW_CALENDAR_S)) {
37+ dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
38+ dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
39+ } else {
40+ dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
41 dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
42- dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
43 }
44
45 return FALSE;

Subscribers

People subscribed via source and target branches