tracker r1178 - trunk/src/tracker-applet



Author: jamiemcc
Date: Fri Feb 29 00:38:46 2008
New Revision: 1178
URL: http://svn.gnome.org/viewvc/tracker?rev=1178&view=rev

Log:
made sure applet does not respawn trackerd by dbus activation when  attempting to unpause after trackerd has been killed

Modified:
   trunk/src/tracker-applet/tracker-applet.c

Modified: trunk/src/tracker-applet/tracker-applet.c
==============================================================================
--- trunk/src/tracker-applet/tracker-applet.c	(original)
+++ trunk/src/tracker-applet/tracker-applet.c	Fri Feb 29 00:38:46 2008
@@ -123,6 +123,7 @@
 	gboolean		animated_timer_active;
 	gboolean		is_watching_events;
 	gboolean		email_indexing;
+	gboolean		indexer_stopped;
 		
 	/* status hints */
 	int			folders_indexed;
@@ -312,7 +313,7 @@
 
 	TrayIconPrivate *priv = TRAY_ICON_GET_PRIVATE (icon);
 	
-	if (priv->user_pause || priv->pause_state == PAUSE_BATTERY) return FALSE;
+	if (priv->user_pause || priv->pause_state == PAUSE_BATTERY || priv->disabled || priv->indexer_stopped) return FALSE;
 	
 
 	switch (priv->auto_pause_setting) {
@@ -338,6 +339,8 @@
 	TrayIconPrivate *priv = TRAY_ICON_GET_PRIVATE (icon);
 		
 	time_t t = time (NULL);
+	
+	if (priv->indexer_stopped) return FALSE;
 			
 	if ((t >= (priv->auto_pause_last_time_event + 2))) {
 		set_auto_pause (icon, FALSE);
@@ -917,13 +920,15 @@
 index_state_changed (DBusGProxy *proxy, const gchar *state, gboolean initial_index, gboolean in_merge, gboolean is_manual_paused, gboolean is_battery_paused, gboolean is_io_paused, gboolean is_indexing_enabled, TrayIcon *icon)
 {
 
-	
-
 	if (!state) return;
 
+	
+
 	TrayIconPrivate *priv = TRAY_ICON_GET_PRIVATE (icon);
 	gboolean paused = FALSE;
 	
+	priv->indexer_stopped = FALSE;	
+	
 	if (!is_indexing_enabled) {
 		priv->disabled = TRUE;
 		gtk_status_icon_set_visible (priv->icon, FALSE);
@@ -1054,7 +1059,7 @@
 	priv->initial_index_msg_shown = FALSE;
 	priv->stat_window_active = FALSE;
 	priv->stat_request_pending = FALSE;
-	
+	priv->indexer_stopped = FALSE;
 	
 	set_tracker_icon (priv);
 }
@@ -1075,6 +1080,7 @@
 		index_state_changed (proxy, "Idle", FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, data);
 		init_settings (data);
 		gtk_status_icon_set_visible (priv->icon, FALSE);
+		priv->indexer_stopped = TRUE;
 		g_print ("tracker has exited (reindex = %d)\n", priv->reindex);
 
 		



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