[totem] backend: Use helper to remove shadow from the volume popup
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Use helper to remove shadow from the volume popup
- Date: Thu, 20 Feb 2014 15:46:20 +0000 (UTC)
commit 605d32be0a3fcd36c03dbd6532c1ffe4c00dcf27
Author: Bastien Nocera <hadess hadess net>
Date: Thu Feb 20 15:58:17 2014 +0100
backend: Use helper to remove shadow from the volume popup
src/backend/Makefile.am | 10 ++++++----
src/backend/bacon-video-controls-actor.c | 25 ++-----------------------
2 files changed, 8 insertions(+), 27 deletions(-)
---
diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am
index 1bbe313..ae08274 100644
--- a/src/backend/Makefile.am
+++ b/src/backend/Makefile.am
@@ -15,10 +15,11 @@ bvw_test_CFLAGS = \
$(BACKEND_CFLAGS) \
$(AM_CFLAGS)
-bvw_test_LDADD = \
- libbaconvideowidget.la \
- $(BACKEND_LIBS) \
- $(top_builddir)/src/gst/libtotemtimehelpers.la
+bvw_test_LDADD = \
+ libbaconvideowidget.la \
+ $(BACKEND_LIBS) \
+ $(top_builddir)/src/gst/libtotemtimehelpers.la \
+ $(top_builddir)/src/gst/libtotemstylehelpers.la
# Enums
BVW_ENUM_FILES = bacon-video-widget-enums.c bacon-video-widget-enums.h
@@ -72,6 +73,7 @@ libbaconvideowidget_la_CFLAGS = \
libbaconvideowidget_la_LIBADD = \
$(top_builddir)/src/gst/libtotemgsthelpers.la \
$(top_builddir)/src/gst/libtotemgstpixbufhelpers.la \
+ $(top_builddir)/src/gst/libtotemstylehelpers.la \
$(BACKEND_LIBS) \
-lm
diff --git a/src/backend/bacon-video-controls-actor.c b/src/backend/bacon-video-controls-actor.c
index efbd1d4..f107c26 100644
--- a/src/backend/bacon-video-controls-actor.c
+++ b/src/backend/bacon-video-controls-actor.c
@@ -23,6 +23,7 @@
#include "bacon-video-controls-actor.h"
#include "bacon-time-label.h"
+#include "totem-style-helpers.h"
#define BACON_VIDEO_CONTROLS_ACTOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o),
BACON_TYPE_VIDEO_CONTROLS_ACTOR, BaconVideoControlsActorPrivate))
@@ -89,28 +90,6 @@ setup_object (BaconVideoControlsActor *controls,
}
static void
-setup_popover (BaconVideoControlsActor *controls)
-{
- GtkWidget *volume_button;
- GtkStyleContext *context;
- GtkCssProvider *provider;
- const gchar volume_control_css[] =
- "GtkPopover {\n"
- " border-radius: 0px;\n"
- " margin: 0px;\n"
- " padding: 0px;\n"
- "}";
-
- volume_button = GTK_WIDGET (g_object_get_data (G_OBJECT (controls), "volume_button"));
- context = gtk_widget_get_style_context (gtk_scale_button_get_popup (GTK_SCALE_BUTTON
(volume_button)));
- provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (provider, volume_control_css, -1, NULL);
- gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- g_object_unref (provider);
-}
-
-static void
bacon_video_controls_actor_init (BaconVideoControlsActor *controls)
{
const char *objects[] = { "toolbar", NULL };
@@ -130,7 +109,7 @@ bacon_video_controls_actor_init (BaconVideoControlsActor *controls)
setup_object (controls, "time_label");
setup_object (controls, "time_rem_label");
- setup_popover (controls);
+ totem_set_popover_no_shadow (g_object_get_data (G_OBJECT (controls), "volume_button"));
}
ClutterActor *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]