summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-05-05 18:01:40 +0200
committerBastien Nocera <hadess@hadess.net>2021-05-05 18:01:40 +0200
commit2970e93373b46482d1ddabe01f52a6c0fc2c2b16 (patch)
tree49a69884e4948872c360833b67c8f8727a659231
parentf005a9cc6a3025dff0b07c2e3b4d272805eab463 (diff)
downloadtotem-2970e93373b46482d1ddabe01f52a6c0fc2c2b16.tar.gz
backend: Remove _set_logo() call
And make the logo always be the application logo.
-rw-r--r--src/backend/bacon-video-widget.c49
-rw-r--r--src/backend/bacon-video-widget.h2
-rw-r--r--src/backend/bvw-test.c1
-rw-r--r--src/totem-object.c3
4 files changed, 18 insertions, 37 deletions
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 0759fdc65..2d9d96d8f 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -627,6 +627,22 @@ leave_notify_cb (GtkWidget *widget,
}
static void
+bvw_set_logo (BaconVideoWidget *bvw, const gchar *name)
+{
+ GtkIconTheme *theme;
+ GError *error = NULL;
+
+ theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (bvw)));
+ bvw->logo_pixbuf = gtk_icon_theme_load_icon (theme, name, LOGO_SIZE, 0, &error);
+
+ if (error) {
+ g_warning ("An error occurred trying to open logo %s: %s", name, error->message);
+ g_error_free (error);
+ return;
+ }
+}
+
+static void
bacon_video_widget_realize (GtkWidget * widget)
{
BaconVideoWidget *bvw = BACON_VIDEO_WIDGET (widget);
@@ -636,6 +652,8 @@ bacon_video_widget_realize (GtkWidget * widget)
gtk_widget_set_realized (widget, TRUE);
+ bvw_set_logo (bvw, APPLICATION_ID);
+
/* get screen size changes */
g_signal_connect (G_OBJECT (gtk_widget_get_screen (widget)),
"size-changed", G_CALLBACK (size_changed_cb), bvw);
@@ -4691,37 +4709,6 @@ bacon_video_widget_dvd_event (BaconVideoWidget * bvw,
}
}
-/**
- * bacon_video_widget_set_logo:
- * @bvw: a #BaconVideoWidget
- * @name: the icon name of the logo
- *
- * Sets the logo displayed on the video widget when no stream is loaded.
- **/
-void
-bacon_video_widget_set_logo (BaconVideoWidget *bvw, const gchar *name)
-{
- GtkIconTheme *theme;
- GError *error = NULL;
-
- g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw));
- g_return_if_fail (name != NULL);
-
- if (bvw->logo_pixbuf != NULL)
- g_object_unref (bvw->logo_pixbuf);
-
- theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (bvw)));
- bvw->logo_pixbuf = gtk_icon_theme_load_icon (theme, name, LOGO_SIZE, 0, &error);
-
- if (error) {
- g_warning ("An error occurred trying to open logo %s: %s", name, error->message);
- g_error_free (error);
- return;
- }
-
- set_current_actor (bvw);
-}
-
static gboolean
bvw_check_for_cover_pixbuf (BaconVideoWidget * bvw)
{
diff --git a/src/backend/bacon-video-widget.h b/src/backend/bacon-video-widget.h
index 8c80b97c2..ba8ed7d0e 100644
--- a/src/backend/bacon-video-widget.h
+++ b/src/backend/bacon-video-widget.h
@@ -129,8 +129,6 @@ double bacon_video_widget_get_volume (BaconVideoWidget *bvw);
/* Properties */
void bacon_video_widget_set_text_subtitle (BaconVideoWidget * bvw,
const gchar * subtitle_uri);
-void bacon_video_widget_set_logo (BaconVideoWidget *bvw,
- const char *name);
void bacon_video_widget_set_subtitle_font (BaconVideoWidget *bvw,
const char *font);
void bacon_video_widget_set_subtitle_encoding (BaconVideoWidget *bvw,
diff --git a/src/backend/bvw-test.c b/src/backend/bvw-test.c
index 40292d819..60c173234 100644
--- a/src/backend/bvw-test.c
+++ b/src/backend/bvw-test.c
@@ -117,7 +117,6 @@ int main
G_CALLBACK (gtk_main_quit), NULL);
bvw = bacon_video_widget_new (NULL);
- bacon_video_widget_set_logo (BACON_VIDEO_WIDGET (bvw), APPLICATION_ID);
g_signal_connect (G_OBJECT (bvw), "eos", G_CALLBACK (on_eos_event), NULL);
g_signal_connect (G_OBJECT (bvw), "got-metadata", G_CALLBACK (on_got_metadata), NULL);
diff --git a/src/totem-object.c b/src/totem-object.c
index 8270dc546..8ead77e35 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -251,9 +251,6 @@ totem_object_app_activate (GApplication *app)
totem_object_set_fullscreen (totem, TRUE);
}
- /* Set the logo at the last minute so we won't try to show it before a video */
- bacon_video_widget_set_logo (totem->bvw, APPLICATION_ID);
-
g_application_unmark_busy (G_APPLICATION (totem));
gtk_window_set_application (GTK_WINDOW (totem->win), GTK_APPLICATION (totem));