summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2003-01-23 22:03:44 +0000
committerBastien Nocera <hadess@src.gnome.org>2003-01-23 22:03:44 +0000
commit2ce6272d16b9d02fec6203004b047e5331dc0d5a (patch)
tree816b11996a049f2de6e8c7bb45c5f77fa573ea30
parent6d96e0a996753914499a0d3aa1bf493bfff198af (diff)
downloadtotem-2ce6272d16b9d02fec6203004b047e5331dc0d5a.tar.gz
remove the dependency on LOGO_PATH from gtk-xine.c
2003-01-23 Bastien Nocera <hadess@hadess.net> * src/gtk-xine.c: (gtk_xine_class_init), (frame_output_cb), (gtk_xine_set_property), (gtk_xine_get_property), (gtk_xine_set_logo_mode), (gtk_xine_get_logo_mode): * src/gtk-xine.h: * src/totem.c: (totem_action_set_mrl): remove the dependency on LOGO_PATH from gtk-xine.c
-rw-r--r--ChangeLog9
-rw-r--r--src/gtk-xine.c33
-rw-r--r--src/gtk-xine.h3
-rw-r--r--src/totem.c3
4 files changed, 47 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a0b5a140..ca83539dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2003-01-23 Bastien Nocera <hadess@hadess.net>
+ * src/gtk-xine.c: (gtk_xine_class_init), (frame_output_cb),
+ (gtk_xine_set_property), (gtk_xine_get_property),
+ (gtk_xine_set_logo_mode), (gtk_xine_get_logo_mode):
+ * src/gtk-xine.h:
+ * src/totem.c: (totem_action_set_mrl): remove the dependency on
+ LOGO_PATH from gtk-xine.c
+
+2003-01-23 Bastien Nocera <hadess@hadess.net>
+
* src/gtk-xine.c: (gtk_xine_open), (gtk_xine_close): fix the crash
when navigating to an unsupported file for the second time
diff --git a/src/gtk-xine.c b/src/gtk-xine.c
index 9e80499d5..4fc7b2228 100644
--- a/src/gtk-xine.c
+++ b/src/gtk-xine.c
@@ -82,6 +82,7 @@ enum {
/* Arguments */
enum {
PROP_0,
+ PROP_LOGO_MODE,
PROP_FULLSCREEN,
PROP_SPEED,
PROP_POSITION,
@@ -127,6 +128,7 @@ struct GtkXinePrivate {
int xpos, ypos;
gboolean init_finished;
gboolean can_dvd, can_vcd, can_cdda;
+ gboolean logo_mode;
GAsyncQueue *queue;
int video_width, video_height;
@@ -221,6 +223,9 @@ gtk_xine_class_init (GtkXineClass *klass)
object_class->finalize = gtk_xine_finalize;
/* Properties */
+ g_object_class_install_property (object_class, PROP_LOGO_MODE,
+ g_param_spec_boolean ("logo_mode", NULL, NULL,
+ FALSE, G_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_FULLSCREEN,
g_param_spec_boolean ("fullscreen", NULL, NULL,
FALSE, G_PARAM_READWRITE));
@@ -398,7 +403,7 @@ frame_output_cb (void *gtx_gen,
gc = gconf_client_get_default ();
if (gconf_client_get_bool (gc, GCONF_PREFIX"/auto_resize", NULL) == TRUE
- && strcmp (gtx->priv->mrl, LOGO_PATH) != 0)
+ && gtx->priv->logo_mode == FALSE)
{
GtkXineSignal *signal;
@@ -1317,6 +1322,9 @@ gtk_xine_set_property (GObject *object, guint property_id,
switch (property_id)
{
+ case PROP_LOGO_MODE:
+ gtk_xine_set_logo_mode (gtx, g_value_get_boolean (value));
+ break;
case PROP_FULLSCREEN:
gtk_xine_set_fullscreen (gtx, g_value_get_boolean (value));
break;
@@ -1346,6 +1354,9 @@ gtk_xine_get_property (GObject *object, guint property_id,
switch (property_id)
{
+ case PROP_LOGO_MODE:
+ g_value_set_boolean (value, gtk_xine_get_logo_mode (gtx));
+ break;
case PROP_FULLSCREEN:
g_value_set_boolean (value, gtk_xine_is_fullscreen (gtx));
break;
@@ -1376,6 +1387,26 @@ gtk_xine_get_property (GObject *object, guint property_id,
}
void
+gtk_xine_set_logo_mode (GtkXine *gtx, gboolean logo_mode)
+{
+ g_return_if_fail (gtx != NULL);
+ g_return_if_fail (GTK_IS_XINE (gtx));
+ g_return_if_fail (gtx->priv->xine != NULL);
+
+ gtx->priv->logo_mode = logo_mode;
+}
+
+gboolean
+gtk_xine_get_logo_mode (GtkXine *gtx)
+{
+ g_return_if_fail (gtx != NULL);
+ g_return_if_fail (GTK_IS_XINE (gtx));
+ g_return_if_fail (gtx->priv->xine != NULL);
+
+ return gtx->priv->logo_mode;
+}
+
+void
gtk_xine_set_speed (GtkXine *gtx, Speeds speed)
{
g_return_if_fail (gtx != NULL);
diff --git a/src/gtk-xine.h b/src/gtk-xine.h
index 6303bfeed..89fa7c887 100644
--- a/src/gtk-xine.h
+++ b/src/gtk-xine.h
@@ -120,6 +120,9 @@ void gtk_xine_close (GtkXine *gtx);
void gtk_xine_dvd_event (GtkXine *gtx, GtkXineDVDEvent type);
/* Properties */
+void gtk_xine_set_logo_mode (GtkXine *gtx, gboolean logo_mode);
+gboolean gtk_xine_get_logo_mode (GtkXine *gtx);
+
void gtk_xine_set_speed (GtkXine *gtx, Speeds speed);
gint gtk_xine_get_speed (GtkXine *gtx);
diff --git a/src/totem.c b/src/totem.c
index e87ea9cbc..1cbb842a8 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -470,6 +470,7 @@ totem_action_set_mrl (Totem *totem, const char *mrl)
/* Set the logo */
totem->mrl = g_strdup (LOGO_PATH);
+ gtk_xine_set_logo_mode (GTK_XINE (totem->gtx), TRUE);
if (gtk_xine_open (GTK_XINE (totem->gtx), totem->mrl) == TRUE)
gtk_xine_play (GTK_XINE (totem->gtx), 0 , 0);
@@ -482,6 +483,8 @@ totem_action_set_mrl (Totem *totem, const char *mrl)
int time;
gboolean caps;
+ gtk_xine_set_logo_mode (GTK_XINE (totem->gtx), FALSE);
+
retval = gtk_xine_open (GTK_XINE (totem->gtx), mrl);
totem->mrl = g_strdup (mrl);