brasero r1646 - in trunk: . src



Author: philippr
Date: Wed Dec 17 20:23:15 2008
New Revision: 1646
URL: http://svn.gnome.org/viewvc/brasero?rev=1646&view=rev

Log:
	Make sure the text of the tooltip for the tray icon is the same as
	the one in the burn dialog.

	* src/brasero-burn-dialog.c
	(brasero_burn_dialog_action_changed_real),
	(brasero_burn_dialog_setup_session):
	* src/brasero-tray.c (brasero_tray_icon_finalize),
	(brasero_tray_icon_set_tooltip), (brasero_tray_icon_set_action):
	* src/brasero-tray.h:


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

Modified: trunk/src/brasero-burn-dialog.c
==============================================================================
--- trunk/src/brasero-burn-dialog.c	(original)
+++ trunk/src/brasero-burn-dialog.c	Wed Dec 17 20:23:15 2008
@@ -1109,7 +1109,8 @@
 					  action,
 					  string);
 	brasero_tray_icon_set_action (BRASERO_TRAYICON (dialog->priv->tray),
-				      action);
+				      action,
+				      string);
 }
 
 static void
@@ -1485,7 +1486,8 @@
 					  NULL);
 
 	brasero_tray_icon_set_action (BRASERO_TRAYICON (dialog->priv->tray),
-				      BRASERO_BURN_ACTION_NONE);
+				      BRASERO_BURN_ACTION_NONE,
+				      NULL);
 
 	if (dialog->priv->total_time)
 		g_timer_destroy (dialog->priv->total_time);

Modified: trunk/src/brasero-tray.c
==============================================================================
--- trunk/src/brasero-tray.c	(original)
+++ trunk/src/brasero-tray.c	Wed Dec 17 20:23:15 2008
@@ -58,6 +58,8 @@
 
 struct BraseroTrayIconPrivate {
 	BraseroBurnAction action;
+	gchar *action_string;
+
 	GtkUIManager *manager;
 
 	int rounded_percent;
@@ -215,6 +217,11 @@
 
 	cobj = BRASERO_TRAYICON (object);
 
+	if (cobj->priv->action_string) {
+		g_free (cobj->priv->action_string);
+		cobj->priv->action_string = NULL;
+	}
+
 	g_free (cobj->priv);
 	G_OBJECT_CLASS (parent_class)->finalize (object);
 }
@@ -236,7 +243,10 @@
 	gchar *text;
 	const gchar *action_string;
 
-	action_string = brasero_burn_action_to_string (tray->priv->action);
+	if (!tray->priv->action_string)
+		action_string = brasero_burn_action_to_string (tray->priv->action);
+	else
+		action_string = tray->priv->action_string;
 
 	if (remaining > 0) {
 		gchar *remaining_string;
@@ -261,9 +271,18 @@
 
 void
 brasero_tray_icon_set_action (BraseroTrayIcon *tray,
-			      BraseroBurnAction action)
+			      BraseroBurnAction action,
+			      const gchar *string)
 {
 	tray->priv->action = action;
+	if (tray->priv->action_string)
+		g_free (tray->priv->action_string);
+
+	if (string)
+		tray->priv->action_string = g_strdup (string);
+	else
+		tray->priv->action_string = NULL;
+
 	brasero_tray_icon_set_tooltip (tray, -1);
 }
 

Modified: trunk/src/brasero-tray.h
==============================================================================
--- trunk/src/brasero-tray.h	(original)
+++ trunk/src/brasero-tray.h	Wed Dec 17 20:23:15 2008
@@ -66,8 +66,14 @@
 brasero_tray_icon_set_progress (BraseroTrayIcon *tray,
 				gdouble fraction,
 				long remaining);
+
 void
-brasero_tray_icon_set_action (BraseroTrayIcon *tray, BraseroBurnAction action);
+brasero_tray_icon_set_action (BraseroTrayIcon *tray,
+			      BraseroBurnAction action,
+			      const gchar *string);
+
 void
-brasero_tray_icon_set_show_dialog (BraseroTrayIcon *tray, gboolean show);
+brasero_tray_icon_set_show_dialog (BraseroTrayIcon *tray,
+				   gboolean show);
+
 #endif /* TRAY_H */



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