[Xfce4-commits] <parole:master> Audiobox black background, white text.
Sean Davis
noreply at xfce.org
Thu Nov 29 11:20:05 CET 2012
Updating branch refs/heads/master
to e11ff431848a619df268c21c52530fb543e3157e (commit)
from 1f038f0094329fcd96584f185968bfd10e03569d (commit)
commit e11ff431848a619df268c21c52530fb543e3157e
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Nov 28 14:13:38 2012 -0500
Audiobox black background, white text.
data/interfaces/parole.ui | 148 +++++++++++++++++++++++---------------------
src/parole-player.c | 16 +++--
2 files changed, 87 insertions(+), 77 deletions(-)
diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui
index 8b79613..5664825 100644
--- a/data/interfaces/parole.ui
+++ b/data/interfaces/parole.ui
@@ -463,9 +463,9 @@
<property name="use_underline">True</property>
<property name="image">image11</property>
<property name="use_stock">False</property>
- <accelerator key="plus" signal="activate"/>
- <accelerator key="equal" signal="activate"/>
<accelerator key="KP_Add" signal="activate"/>
+ <accelerator key="equal" signal="activate"/>
+ <accelerator key="plus" signal="activate"/>
<signal name="activate" handler="parole_player_volume_up" swapped="no"/>
</object>
</child>
@@ -478,8 +478,8 @@
<property name="use_underline">True</property>
<property name="image">image10</property>
<property name="use_stock">False</property>
- <accelerator key="KP_Subtract" signal="activate"/>
<accelerator key="minus" signal="activate"/>
+ <accelerator key="KP_Subtract" signal="activate"/>
<signal name="activate" handler="parole_player_volume_down" swapped="no"/>
</object>
</child>
@@ -684,29 +684,15 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="audiobox">
+ <object class="GtkEventBox" id="audiobox">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<child>
- <object class="GtkAlignment" id="alignment2">
+ <object class="GtkHBox" id="audiobox_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkAlignment" id="alignment3">
+ <object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -720,35 +706,34 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">12</property>
<child>
- <object class="GtkImage" id="audiobox_cover">
+ <object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="pixel_size">128</property>
- <property name="icon_name">audio-x-generic</property>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox3">
+ <object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="audiobox_title">
+ <object class="GtkImage" id="audiobox_cover">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b><big>Song Title</big></b></property>
- <property name="use_markup">True</property>
+ <property name="pixel_size">128</property>
+ <property name="icon_name">audio-x-generic</property>
</object>
<packing>
<property name="expand">False</property>
@@ -757,12 +742,52 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="audiobox_album">
+ <object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><big>Song Album</big></property>
- <property name="use_markup">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="audiobox_title">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b><big>Song Title</big></b></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="audiobox_album">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><big>Song Album</big></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="audiobox_artist">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><big>Song Artist</big></property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -770,20 +795,6 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="audiobox_artist">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><big>Song Artist</big></property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -791,15 +802,29 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkAlignment" id="alignment5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment5">
+ <object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -813,25 +838,6 @@
</packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
<packing>
diff --git a/src/parole-player.c b/src/parole-player.c
index 8c81b92..fa8c3a0 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -1578,32 +1578,32 @@ parole_player_media_tag_cb (ParoleGst *gst, const ParoleStream *stream, ParolePl
if ( title )
{
parole_media_list_set_row_name (player->priv->list, player->priv->row, title);
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_title), g_strdup_printf("<b><big>%s</big></b>", title));
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_title), g_strdup_printf("<span color=\"white\"><b><big>%s</big></b></span>", title));
g_free (title);
}
else
{
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_title), g_strdup_printf("<b><big>%s</big></b>", _("Unknown")));
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_title), g_strdup_printf("<span color=\"white\"><b><big>%s</big></b></span>", _("Unknown")));
}
if ( album )
{
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_strdup_printf("<big>%s</big>", album));
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_strdup_printf("<span color=\"white\"><big>%s</big></span>", album));
g_free (album);
}
else
{
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_strdup_printf("<big>%s</big>", _("Unknown")));
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_strdup_printf("<span color=\"white\"><big>%s</big></span>", _("Unknown")));
}
if ( artist )
{
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_artist), g_strdup_printf("<big>%s</big>", artist));
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_artist), g_strdup_printf("<span color=\"white\"><big>%s</big></span>", artist));
g_free (artist);
}
else
{
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_artist), g_strdup_printf("<big>%s</big>", _("Unknown")));
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_artist), g_strdup_printf("<span color=\"white\"><big>%s</big></span>", _("Unknown")));
}
image = parole_stream_get_image(G_OBJECT(stream));
@@ -2550,6 +2550,7 @@ parole_player_init (ParolePlayer *player)
GdkScreen *screen;
gint w, h;
gboolean showhide;
+ GdkColor background;
gboolean repeat, shuffle;
@@ -2677,7 +2678,10 @@ parole_player_init (ParolePlayer *player)
player->priv->eventbox_output = GTK_WIDGET (gtk_builder_get_object (builder, "eventbox_output"));
/* Audio box */
+ gdk_color_parse("black", &background);
player->priv->audiobox = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox"));
+ gtk_widget_modify_bg(GTK_WIDGET(player->priv->audiobox), GTK_STATE_NORMAL, &background);
+
player->priv->audiobox_cover = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox_cover"));
player->priv->audiobox_title = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox_title"));
player->priv->audiobox_album = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox_album"));
More information about the Xfce4-commits
mailing list