brasero r1601 - in trunk: . src



Author: philippr
Date: Wed Dec  3 17:10:42 2008
New Revision: 1601
URL: http://svn.gnome.org/viewvc/brasero?rev=1601&view=rev

Log:
	Try to fix #562879 â Multi session disk - Progress meter in systray

	* src/brasero-tray.c (brasero_tray_icon_init),
	(brasero_tray_icon_set_action), (brasero_tray_icon_set_progress):
	* src/burn-task.c (brasero_task_start):
	* src/burn.c (brasero_burn_progress_changed):


Modified:
   trunk/ChangeLog
   trunk/src/brasero-tray.c
   trunk/src/burn-task.c
   trunk/src/burn.c

Modified: trunk/src/brasero-tray.c
==============================================================================
--- trunk/src/brasero-tray.c	(original)
+++ trunk/src/brasero-tray.c	Wed Dec  3 17:10:42 2008
@@ -60,11 +60,8 @@
 	BraseroBurnAction action;
 	GtkUIManager *manager;
 
-	int first_burning_percent;
 	int rounded_percent;
 	int percent;
-
-	int show_disc:1;
 };
 
 typedef enum {
@@ -209,7 +206,6 @@
 			  NULL);
 
 	gtk_status_icon_set_from_icon_name (GTK_STATUS_ICON (obj), "brasero-disc-00");
-	obj->priv->first_burning_percent = -1;
 }
 
 static void
@@ -267,10 +263,6 @@
 brasero_tray_icon_set_action (BraseroTrayIcon *tray,
 			      BraseroBurnAction action)
 {
-	if (action == BRASERO_BURN_ACTION_DRIVE_COPY
-	||  action == BRASERO_BURN_ACTION_RECORDING)
-		tray->priv->show_disc = TRUE;
-
 	tray->priv->action = action;
 	brasero_tray_icon_set_tooltip (tray, -1);
 }
@@ -290,19 +282,6 @@
 	/* set the tooltip */
 	brasero_tray_icon_set_tooltip (tray, remaining);
 
-	if (!tray->priv->show_disc)
-		return;
-
-	if (tray->priv->first_burning_percent == -1)
-		tray->priv->first_burning_percent = percent;
-
-	if (tray->priv->first_burning_percent != 0) {
-		percent -= tray->priv->first_burning_percent;
-		percent = (100 - tray->priv->first_burning_percent) != 0 ?
-			   percent * 100 / (100 - tray->priv->first_burning_percent) :
-			   0;
-	}
-
 	/* change image if need be */
 	remains = percent % 5;
 	if (remains > 3)

Modified: trunk/src/burn-task.c
==============================================================================
--- trunk/src/burn-task.c	(original)
+++ trunk/src/burn-task.c	Wed Dec  3 17:10:42 2008
@@ -541,7 +541,7 @@
 	/* Activate all items that can be. If no item can be then skip */
 	result = brasero_task_activate_items (self, error);
 	if (result == BRASERO_BURN_NOT_RUNNING) {
-		BRASERO_BURN_LOG ("task skipped");
+		BRASERO_BURN_LOG ("Task skipped");
 		return BRASERO_BURN_OK;
 	}
 

Modified: trunk/src/burn.c
==============================================================================
--- trunk/src/burn.c	(original)
+++ trunk/src/burn.c	Wed Dec  3 17:10:42 2008
@@ -1177,11 +1177,13 @@
 	/* get the task current progress */
 	if (brasero_task_ctx_get_progress (task, &task_progress) == BRASERO_BURN_OK) {
 		brasero_task_ctx_get_remaining_time (task, &time_remaining);
+		g_print ("%d %d\n", priv->tasks_done, priv->task_nb);
 		overall_progress = (task_progress + (gdouble) priv->tasks_done) /
 				   (gdouble) priv->task_nb;
 	}
 	else
-		overall_progress =  (gdouble) priv->tasks_done / (gdouble) priv->task_nb;
+		overall_progress =  (gdouble) priv->tasks_done /
+				    (gdouble) priv->task_nb;
 
 	g_signal_emit (burn,
 		       brasero_burn_signals [PROGRESS_CHANGED_SIGNAL],



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