Re: [Ayatana-commits] [Merge] lp:~dylanmccall/indicator-datetime/bug-748772 into lp:indicator-datetime

2011-04-04 Thread Karl Lattimer
Review: Approve
Looks good to me
-- 
https://code.launchpad.net/~dylanmccall/indicator-datetime/bug-748772/+merge/56092
Your team ayatana-commits is subscribed to branch lp:indicator-datetime.

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp


[Ayatana-commits] [Merge] lp:~dylanmccall/indicator-datetime/bug-748772 into lp:indicator-datetime

2011-04-03 Thread Dylan McCall
Dylan McCall has proposed merging lp:~dylanmccall/indicator-datetime/bug-748772 
into lp:indicator-datetime.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)
Related bugs:
  Bug #748772 in indicator-datetime (Ubuntu): show-calendar setting is ignored 
at start
  https://bugs.launchpad.net/ubuntu/+source/indicator-datetime/+bug/748772

For more details, see:
https://code.launchpad.net/~dylanmccall/indicator-datetime/bug-748772/+merge/56092
-- 
https://code.launchpad.net/~dylanmccall/indicator-datetime/bug-748772/+merge/56092
Your team ayatana-commits is subscribed to branch lp:indicator-datetime.
=== modified file 'src/datetime-service.c'
--- src/datetime-service.c	2011-03-30 21:55:14 +
+++ src/datetime-service.c	2011-04-03 23:51:28 +
@@ -439,18 +439,16 @@
 check_for_calendar (gpointer user_data)
 {
 	g_return_val_if_fail (calendar != NULL, FALSE);
-	// Always enable the calendar even if it does nothing
-	dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
-	dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
+	
+	dbusmenu_menuitem_property_set_bool(date, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
 	
 	gchar *evo = g_find_program_in_path(evolution);
 	if (evo != NULL) {
 		g_debug(Found the calendar application: %s, evo);
-
-		dbusmenu_menuitem_property_set_bool(date, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
+		
 		g_signal_connect (G_OBJECT(date), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
-		  G_CALLBACK (activate_cb), evolution -c calendar);
-		  
+		  G_CALLBACK (activate_cb), evolution -c calendar);
+		
 		events_separator = dbusmenu_menuitem_new();
 		dbusmenu_menuitem_property_set(events_separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
 		dbusmenu_menuitem_child_add_position(root, events_separator, 2);
@@ -478,8 +476,16 @@
 		g_free(evo);
 	} else {
 		g_debug(Unable to find calendar app.);
+		dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
+		dbusmenu_menuitem_property_set_bool(events_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
+	}
+	
+	if (g_settings_get_boolean(conf, SETTINGS_SHOW_CALENDAR_S)) {
+		dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
+		dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
+	} else {
+		dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
 		dbusmenu_menuitem_property_set_bool(calendar, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
-		dbusmenu_menuitem_property_set_bool(add_appointment, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
 	}
 
 	return FALSE;

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp


[Ayatana-commits] [Merge] lp:~dylanmccall/indicator-datetime/bug-748772 into lp:indicator-datetime

2011-04-03 Thread Dylan McCall
The proposal to merge lp:~dylanmccall/indicator-datetime/bug-748772 into 
lp:indicator-datetime has been updated.

Description changed to:

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.

For more details, see:
https://code.launchpad.net/~dylanmccall/indicator-datetime/bug-748772/+merge/56092
-- 
https://code.launchpad.net/~dylanmccall/indicator-datetime/bug-748772/+merge/56092
Your team ayatana-commits is subscribed to branch lp:indicator-datetime.

___
Mailing list: https://launchpad.net/~ayatana-commits
Post to : ayatana-commits@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ayatana-commits
More help   : https://help.launchpad.net/ListHelp