[Xfce4-commits] <parole:bluesabre/gtk3> Ship fancy fullscreen gtkrc
Sean Davis
noreply at xfce.org
Sun Aug 11 15:16:12 CEST 2013
Updating branch refs/heads/bluesabre/gtk3
to 13621798dfb0931f500aa5e5fec6ba5dfe4ced29 (commit)
from c9ad16ffedc102deb60547cf4e7e9fb0281a7f8e (commit)
commit 13621798dfb0931f500aa5e5fec6ba5dfe4ced29
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Feb 20 23:49:22 2013 -0500
Ship fancy fullscreen gtkrc
configure.ac.in | 14 ++++++++++++++
data/Makefile.am | 1 +
data/gtk-2.0/Makefile.am | 7 +++++++
data/gtk-2.0/parole.gtkrc | 18 ++++++++++++++++++
src/parole-player.c | 8 ++++++++
5 files changed, 48 insertions(+)
diff --git a/configure.ac.in b/configure.ac.in
index ae8daf4..76a32db 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -144,6 +144,19 @@ XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0])
XDT_CHECK_LIBX11()
+#=======================================================#
+# Gtkrc files #
+#=======================================================#
+if test "x${prefix}" = "xNONE"; then
+ AC_DEFINE_UNQUOTED(GTKRC_DIR, "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/gtk-2.0", [gtkrc directory])
+ gtkrcdir="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/gtk-2.0"
+else
+ AC_DEFINE_UNQUOTED(GTKRC_DIR, "${prefix}/${DATADIRNAME}/${PACKAGE}/gtk-2.0", [pixmaps directory])
+ gtkrcdir="${prefix}/${DATADIRNAME}/${PACKAGE}/gtk-2.0"
+fi
+
+AC_SUBST(gtkrcdir)
+
# Taken from Gnome system tools
#=======================================================#
# Pixmaps files #
@@ -241,6 +254,7 @@ GTK_DOC_CHECK(1.9)
AC_OUTPUT([
Makefile
data/Makefile
+data/gtk-2.0/Makefile
data/pixmaps/Makefile
data/interfaces/Makefile
data/icons/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 6b0d93e..4a0719d 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,4 +1,5 @@
SUBDIRS = \
+ gtk-2.0 \
interfaces \
pixmaps \
icons \
diff --git a/data/gtk-2.0/Makefile.am b/data/gtk-2.0/Makefile.am
new file mode 100644
index 0000000..ce7ad47
--- /dev/null
+++ b/data/gtk-2.0/Makefile.am
@@ -0,0 +1,7 @@
+EXTRA_DIST = \
+ $(gtkrc_DATA)
+
+gtkrcdir = $(datadir)/parole/gtk-2.0
+
+gtkrc_DATA = \
+ parole.gtkrc
diff --git a/data/gtk-2.0/parole.gtkrc b/data/gtk-2.0/parole.gtkrc
new file mode 100644
index 0000000..b227904
--- /dev/null
+++ b/data/gtk-2.0/parole.gtkrc
@@ -0,0 +1,18 @@
+style "parole-fullscreen"
+{
+ fg[NORMAL] = "#FFFFFF"
+
+ bg[NORMAL] = "#000000"
+ bg[ACTIVE] = "#6D6D6D"
+ bg[PRELIGHT] = "#505050"
+ bg[SELECTED] = "#398EE7"
+ bg[INSENSITIVE] = "#C4C4C4"
+}
+
+style "parole-scale" = "parole-fullscreen"
+{
+ bg[NORMAL] = "#CECECE"
+}
+
+widget "*ParoleFullscreen*" style "parole-fullscreen"
+widget "*ParoleFullscreen*ParoleScale*" style "parole-scale"
\ No newline at end of file
diff --git a/src/parole-player.c b/src/parole-player.c
index 95039e4..24fb62d 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -70,6 +70,12 @@
#include "common/parole-common.h"
+#define RC_STYLE \
+ "include \"" GTKRC_DIR "/parole.gtkrc\""
+
+#define RC_STYLE_FILE \
+ GTKRC_DIR "/parole.gtkrc"
+
int GTK_ICON_SIZE_ARTWORK_FALLBACK;
static void
@@ -2966,6 +2972,8 @@ parole_player_init (ParolePlayer *player)
player->priv->play_pause = GTK_WIDGET (gtk_builder_get_object (builder, "play-pause"));
player->priv->seekf = GTK_WIDGET (gtk_builder_get_object (builder, "forward"));
player->priv->seekb = GTK_WIDGET (gtk_builder_get_object (builder, "back"));
+
+ gtk_rc_parse( RC_STYLE_FILE );
player->priv->range = GTK_WIDGET (gtk_builder_get_object (builder, "scale"));
gtk_widget_set_name( player->priv->range, "ParoleScale" );
More information about the Xfce4-commits
mailing list