[totem/introspection] Fix binding of TotemObject.action_error()



commit e5394da4d2b8025e4080eb35c170653a3c31051d
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Jun 27 23:20:45 2010 +0100

    Fix binding of TotemObject.action_error()

 src/plugins/screenshot/totem-screenshot-plugin.c |    4 +-
 src/totem-object.c                               |   34 +++++++++++-----------
 src/totem.h                                      |    6 ++--
 3 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/src/plugins/screenshot/totem-screenshot-plugin.c b/src/plugins/screenshot/totem-screenshot-plugin.c
index 3ee93a8..7d2e999 100644
--- a/src/plugins/screenshot/totem-screenshot-plugin.c
+++ b/src/plugins/screenshot/totem-screenshot-plugin.c
@@ -93,14 +93,14 @@ take_screenshot_action_cb (GtkAction *action, TotemScreenshotPlugin *self)
 		if (err == NULL)
 			return;
 
-		totem_action_error (_("Totem could not get a screenshot of the video."), err->message, priv->totem);
+		totem_action_error (priv->totem, _("Totem could not get a screenshot of the video."), err->message);
 		g_error_free (err);
 		return;
 	}
 
 	pixbuf = bacon_video_widget_get_current_frame (priv->bvw);
 	if (pixbuf == NULL) {
-		totem_action_error (_("Totem could not get a screenshot of the video."), _("This is not supposed to happen; please file a bug report."), priv->totem);
+		totem_action_error (priv->totem, _("Totem could not get a screenshot of the video."), _("This is not supposed to happen; please file a bug report."));
 		return;
 	}
 
diff --git a/src/totem-object.c b/src/totem-object.c
index 51528a8..71238d9 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -816,15 +816,15 @@ reset_seek_status (TotemObject *totem)
 
 /**
  * totem_object_action_error:
+ * @totem: a #TotemObject
  * @title: the error dialog title
  * @reason: the error dialog text
- * @totem: a #TotemObject
  *
  * Displays a non-blocking error dialog with the
  * given @title and @reason.
  **/
 void
-totem_object_action_error (const char *title, const char *reason, TotemObject *totem)
+totem_object_action_error (TotemObject *totem, const char *title, const char *reason)
 {
 	reset_seek_status (totem);
 	totem_interface_error (title, reason,
@@ -1099,7 +1099,7 @@ totem_object_action_play (TotemObject *totem)
 	msg = g_strdup_printf(_("Totem could not play '%s'."), disp);
 	g_free (disp);
 
-	totem_action_error (msg, err->message, totem);
+	totem_action_error (totem, msg, err->message);
 	totem_action_stop (totem);
 	g_free (msg);
 	g_error_free (err);
@@ -1128,7 +1128,7 @@ totem_action_seek (TotemObject *totem, double pos)
 
 		reset_seek_status (totem);
 
-		totem_action_error (msg, err->message, totem);
+		totem_action_error (totem, msg, err->message);
 		g_free (msg);
 		g_error_free (err);
 	}
@@ -1201,7 +1201,7 @@ totem_action_load_media (TotemObject *totem, TotemDiscMediaType type, const char
 		/* No errors? Weird */
 		if (error == NULL) {
 			msg = g_strdup_printf (_("Totem could not play this media (%s) although a plugin is present to handle it."), _(totem_cd_get_human_readable_name (type)));
-			totem_action_error (msg, _("You might want to check that a disc is present in the drive and that it is correctly configured."), totem);
+			totem_action_error (totem, msg, _("You might want to check that a disc is present in the drive and that it is correctly configured."));
 			g_free (msg);
 			return FALSE;
 		}
@@ -1218,7 +1218,7 @@ totem_action_load_media (TotemObject *totem, TotemDiscMediaType type, const char
 		/* Unsupported type (ie. CDDA) */
 		} else if (g_error_matches (error, BVW_ERROR, BVW_ERROR_INVALID_LOCATION) != FALSE) {
 			msg = g_strdup_printf(_("Totem cannot play this type of media (%s) because it is not supported."), _(totem_cd_get_human_readable_name (type)));
-			totem_action_error (msg, _("Please insert another disc to play back."), totem);
+			totem_action_error (totem, msg, _("Please insert another disc to play back."));
 			g_free (msg);
 			return FALSE;
 		} else {
@@ -1253,9 +1253,9 @@ totem_action_load_media_device (TotemObject *totem, const char *device)
 
 	switch (type) {
 		case MEDIA_TYPE_ERROR:
-			totem_action_error (_("Totem was not able to play this disc."),
-					    error ? error->message : _("No reason."),
-					    totem);
+			totem_action_error (totem,
+					    _("Totem was not able to play this disc."),
+					    error ? error->message : _("No reason."));
 			retval = FALSE;
 			break;
 		case MEDIA_TYPE_DATA:
@@ -1268,9 +1268,9 @@ totem_action_load_media_device (TotemObject *totem, const char *device)
 			retval = totem_action_load_media (totem, type, device_path);
 			break;
 		case MEDIA_TYPE_CDDA:
-			totem_action_error (_("Totem does not support playback of Audio CDs"),
-					    _("Please consider using a music player or a CD extractor to play this CD"),
-					    totem);
+			totem_action_error (totem,
+					    _("Totem does not support playback of Audio CDs"),
+					    _("Please consider using a music player or a CD extractor to play this CD"));
 			retval = FALSE;
 			break;
 		default:
@@ -1747,10 +1747,10 @@ totem_action_set_mrl_with_warning (TotemObject *totem,
 			msg = g_strdup_printf(_("Totem could not play '%s'."), disp);
 			g_free (disp);
 			if (err && err->message) {
-				totem_action_error (msg, err->message, totem);
+				totem_action_error (totem, msg, err->message);
 			}
 			else {
-				totem_action_error (msg, _("No error message"), totem);
+				totem_action_error (totem, msg, _("No error message"));
 			}
 			g_free (msg);
 		}
@@ -1911,7 +1911,7 @@ totem_seek_time_rel (TotemObject *totem, gint64 _time, gboolean relative, gboole
 		g_free (disp);
 
 		totem_action_stop (totem);
-		totem_action_error (msg, err->message, totem);
+		totem_action_error (totem, msg, err->message);
 		g_free (msg);
 		g_error_free (err);
 	}
@@ -2136,7 +2136,7 @@ totem_action_show_help (TotemObject *totem)
 	GError *error = NULL;
 
 	if (gtk_show_uri (gtk_widget_get_screen (totem->win), "ghelp:totem", gtk_get_current_event_time (), &error) == FALSE) {
-		totem_action_error (_("Totem could not display the help contents."), error->message, totem);
+		totem_action_error (totem, _("Totem could not display the help contents."), error->message);
 		g_error_free (error);
 	}
 }
@@ -2491,7 +2491,7 @@ on_error_event (BaconVideoWidget *bvw, char *message,
 		play_pause_set_label (totem, STATE_STOPPED);
 
 	if (fatal == FALSE) {
-		totem_action_error (_("An error occurred"), message, totem);
+		totem_action_error (totem, _("An error occurred"), message);
 	} else {
 		totem_action_error_and_exit (_("An error occurred"),
 				message, totem);
diff --git a/src/totem.h b/src/totem.h
index e9eef19..4674e68 100644
--- a/src/totem.h
+++ b/src/totem.h
@@ -235,9 +235,9 @@ void	totem_action_next_angle			(TotemObject *totem);
 
 void	totem_action_set_scale_ratio		(TotemObject *totem, gfloat ratio);
 #define totem_action_error totem_object_action_error
-void    totem_object_action_error               (const char *title,
-						 const char *reason,
-						 TotemObject *totem);
+void    totem_object_action_error               (TotemObject *totem,
+						 const char *title,
+						 const char *reason);
 void    totem_action_play_media_device		(TotemObject *totem,
 						 const char *device);
 



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