[tracker] Fixes GB#618011: Don't show in status icon actions that haven't been compiled



commit 78f87d3d54cd70287e3147444904a82e4df11a30
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Fri May 14 16:33:12 2010 +0200

    Fixes GB#618011: Don't show in status icon actions that haven't been compiled

 src/tracker-status-icon/tracker-status-icon.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-status-icon/tracker-status-icon.c b/src/tracker-status-icon/tracker-status-icon.c
index 60fa157..0191aa7 100644
--- a/src/tracker-status-icon/tracker-status-icon.c
+++ b/src/tracker-status-icon/tracker-status-icon.c
@@ -709,6 +709,7 @@ context_menu_pause_cb (GtkMenuItem *item,
 	update_icon_status (icon);
 }
 
+#ifdef HAVE_TRACKER_SEARCH_TOOL
 static void
 context_menu_search_cb (GtkMenuItem *item,
                         gpointer     user_data)
@@ -716,7 +717,9 @@ context_menu_search_cb (GtkMenuItem *item,
 	launch_application_on_screen (gtk_widget_get_screen (GTK_WIDGET (item)),
 	                              "tracker-search-tool");
 }
+#endif
 
+#ifdef HAVE_TRACKER_PREFERENCES
 static void
 context_menu_preferences_cb (GtkMenuItem *item,
                              gpointer     user_data)
@@ -724,6 +727,7 @@ context_menu_preferences_cb (GtkMenuItem *item,
 	launch_application_on_screen (gtk_widget_get_screen (GTK_WIDGET (item)),
 	                              "tracker-preferences");
 }
+#endif
 
 static void
 context_menu_about_cb (GtkMenuItem *item,
@@ -835,6 +839,7 @@ status_icon_create_context_menu (TrackerStatusIcon *icon)
 	item = gtk_separator_menu_item_new ();
 	gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
 
+#ifdef HAVE_TRACKER_SEARCH_TOOL
 	item = gtk_image_menu_item_new_with_mnemonic (_("_Search"));
 	image = gtk_image_new_from_icon_name (GTK_STOCK_FIND,
 	                                      GTK_ICON_SIZE_MENU);
@@ -842,7 +847,9 @@ status_icon_create_context_menu (TrackerStatusIcon *icon)
 	gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
 	g_signal_connect (G_OBJECT (item), "activate",
 	                  G_CALLBACK (context_menu_search_cb), icon);
+#endif
 
+#ifdef HAVE_TRACKER_PREFERENCES
 	item = gtk_image_menu_item_new_with_mnemonic (_("_Preferences"));
 	image = gtk_image_new_from_icon_name (GTK_STOCK_PREFERENCES,
 	                                      GTK_ICON_SIZE_MENU);
@@ -851,6 +858,7 @@ status_icon_create_context_menu (TrackerStatusIcon *icon)
 	g_signal_connect (G_OBJECT (item), "activate",
 	                  G_CALLBACK (context_menu_preferences_cb),
 	                  icon);
+#endif
 
 	/*
 	  item = gtk_image_menu_item_new_with_mnemonic (_("_Indexer Preferences"));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]