Reformatted the Now Playing display to look more like it used to.
This commit is contained in:
parent
b8a863a472
commit
3768ae6f6e
5 changed files with 181 additions and 107 deletions
|
@ -35,9 +35,6 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <unicode/msgfmt.h>
|
#include <unicode/msgfmt.h>
|
||||||
#include <gtkmm/label.h>
|
|
||||||
#include <gtkmm/main.h>
|
|
||||||
#include <gdkmm/pixbuf.h>
|
|
||||||
|
|
||||||
#include "LiveSupport/Core/TimeConversion.h"
|
#include "LiveSupport/Core/TimeConversion.h"
|
||||||
#include "LoginWindow.h"
|
#include "LoginWindow.h"
|
||||||
|
@ -592,7 +589,7 @@ MasterPanelWindow :: showLoggedInUI(void) throw ()
|
||||||
* Get the next item from the top of the Live Mode window.
|
* Get the next item from the top of the Live Mode window.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
Ptr<Playable>::Ref
|
Ptr<Playable>::Ref
|
||||||
MasterPanelWindow :: getNextItemToPlay() throw ()
|
MasterPanelWindow :: getNextItemToPlay (void) throw ()
|
||||||
{
|
{
|
||||||
if (liveModeWindow) {
|
if (liveModeWindow) {
|
||||||
return liveModeWindow->popTop();
|
return liveModeWindow->popTop();
|
||||||
|
|
|
@ -500,8 +500,8 @@ class MasterPanelWindow : public GuiWindow
|
||||||
* @param time the time to display in the scheduler window.
|
* @param time the time to display in the scheduler window.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
updateSchedulerWindow(Ptr<boost::posix_time::ptime>::Ref time =
|
updateSchedulerWindow (Ptr<boost::posix_time::ptime>::Ref time
|
||||||
Ptr<boost::posix_time::ptime>::Ref())
|
= Ptr<boost::posix_time::ptime>::Ref())
|
||||||
throw ();
|
throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -534,7 +534,7 @@ class MasterPanelWindow : public GuiWindow
|
||||||
* if there is no Live Mode window, or it is empty.
|
* if there is no Live Mode window, or it is empty.
|
||||||
*/
|
*/
|
||||||
Ptr<Playable>::Ref
|
Ptr<Playable>::Ref
|
||||||
getNextItemToPlay() throw ();
|
getNextItemToPlay (void) throw ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the "now playing" display.
|
* Set the "now playing" display.
|
||||||
|
|
|
@ -95,12 +95,19 @@ NowPlaying :: NowPlaying(GuiObject * parent)
|
||||||
glade->get_widget("titleLabel1", titleLabel);
|
glade->get_widget("titleLabel1", titleLabel);
|
||||||
glade->get_widget("creatorLabel1", creatorLabel);
|
glade->get_widget("creatorLabel1", creatorLabel);
|
||||||
glade->get_widget("elapsedTimeLabel1", elapsedTimeLabel);
|
glade->get_widget("elapsedTimeLabel1", elapsedTimeLabel);
|
||||||
glade->get_widget("remainsTimeBox1", remainsTimeBox);
|
glade->get_widget("remainsTimeEventBox1", remainsTimeBox);
|
||||||
glade->get_widget("remainsTimeLabel1", remainsTimeLabel);
|
glade->get_widget("remainsTimeLabel1", remainsTimeLabel);
|
||||||
glade->get_widget("playlistLabel1", playlistLabel);
|
glade->get_widget("playlistLabel1", playlistLabel);
|
||||||
|
setStyle(titleLabel, 14);
|
||||||
|
setStyle(creatorLabel, 8);
|
||||||
|
setStyle(elapsedTimeLabel, 16);
|
||||||
|
setStyle(remainsTimeLabel, 16);
|
||||||
|
setStyle(playlistLabel, 8);
|
||||||
|
|
||||||
glade->get_widget("elapsedTimeText1", elapsedTimeText);
|
glade->get_widget("elapsedTimeText1", elapsedTimeText);
|
||||||
glade->get_widget("remainsTimeText1", remainsTimeText);
|
glade->get_widget("remainsTimeText1", remainsTimeText);
|
||||||
|
setStyle(elapsedTimeText, 7);
|
||||||
|
setStyle(remainsTimeText, 7);
|
||||||
elapsedTimeText->set_text(*getResourceUstring("elapsedTimeLabel"));
|
elapsedTimeText->set_text(*getResourceUstring("elapsedTimeLabel"));
|
||||||
remainsTimeText->set_text(*getResourceUstring("remainingTimeLabel"));
|
remainsTimeText->set_text(*getResourceUstring("remainingTimeLabel"));
|
||||||
|
|
||||||
|
@ -109,6 +116,30 @@ NowPlaying :: NowPlaying(GuiObject * parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Set the font and size of a label.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
void
|
||||||
|
NowPlaying :: setStyle (Gtk::Label * label,
|
||||||
|
int fontSize) throw ()
|
||||||
|
{
|
||||||
|
Pango::FontDescription fontDescription;
|
||||||
|
fontDescription.set_family("Bitstream Vera Sans");
|
||||||
|
fontDescription.set_weight(Pango::WEIGHT_BOLD);
|
||||||
|
fontDescription.set_size(fontSize * Pango::SCALE);
|
||||||
|
|
||||||
|
Pango::Attribute fontDescriptionAttribute =
|
||||||
|
Pango::Attribute::create_attr_font_desc(
|
||||||
|
fontDescription);
|
||||||
|
fontDescriptionAttribute.set_start_index(0);
|
||||||
|
fontDescriptionAttribute.set_end_index(255);
|
||||||
|
|
||||||
|
Pango::AttrList attributeList;
|
||||||
|
attributeList.insert(fontDescriptionAttribute);
|
||||||
|
label->set_attributes(attributeList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------
|
/*------------------------------------------------------------------------------
|
||||||
* Set the title etc. of the playable shown in the widget.
|
* Set the title etc. of the playable shown in the widget.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -203,6 +203,17 @@ class NowPlaying : public GuiComponent
|
||||||
void inline
|
void inline
|
||||||
resetRemainsTimeState (void) throw ();
|
resetRemainsTimeState (void) throw ();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the font and size of the label.
|
||||||
|
*
|
||||||
|
* @param label the label the style of which we want to set.
|
||||||
|
* @param fontSize the font size for the label.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
setStyle (Gtk::Label * label,
|
||||||
|
int fontSize)
|
||||||
|
throw ();
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -281,7 +292,7 @@ class NowPlaying : public GuiComponent
|
||||||
* NowPlaying then updates its own bundle to match the parent's.
|
* NowPlaying then updates its own bundle to match the parent's.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
changeLanguage() throw ();
|
changeLanguage (void) throw ();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
||||||
<!--Generated with glade3 3.2.0 on Tue Jul 24 18:14:45 2007 by fgerlits@fgerlits-laptop-->
|
<!--Generated with glade3 3.2.0 on Tue Aug 14 14:08:34 2007 by fgerlits@desktop-->
|
||||||
<glade-interface>
|
<glade-interface>
|
||||||
<widget class="GtkWindow" id="mainWindow1">
|
<widget class="GtkWindow" id="mainWindow1">
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
@ -93,36 +93,47 @@
|
||||||
<widget class="GtkVBox" id="nowPlayingWidget.1">
|
<widget class="GtkVBox" id="nowPlayingWidget.1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="border_width">8</property>
|
||||||
|
<property name="spacing">3</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="titleLabel1">
|
<widget class="GtkLabel" id="titleLabel1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="ypad">3</property>
|
||||||
<property name="label" translatable="yes">title</property>
|
<property name="label" translatable="yes">title</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_END</property>
|
||||||
|
<property name="single_line_mode">True</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="creatorLabel1">
|
<widget class="GtkLabel" id="creatorLabel1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">creator</property>
|
<property name="label" translatable="yes">creator</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_END</property>
|
||||||
|
<property name="single_line_mode">True</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHBox" id="nowPlayingWidget.1.1">
|
<widget class="GtkHBox" id="nowPlayingTimeBox1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
<property name="spacing">10</property>
|
<property name="spacing">10</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkVBox" id="nowPlayingWidget.1.1.1">
|
<widget class="GtkVBox" id="elapsedTimeBox1">
|
||||||
|
<property name="width_request">200</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="elapsedTimeText1">
|
<widget class="GtkLabel" id="elapsedTimeText1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">elapsed:</property>
|
<property name="label" translatable="yes">elapsed:</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
@ -130,6 +141,7 @@
|
||||||
<widget class="GtkLabel" id="elapsedTimeLabel1">
|
<widget class="GtkLabel" id="elapsedTimeLabel1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">elapsed time</property>
|
<property name="label" translatable="yes">elapsed time</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -137,35 +149,53 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkVBox" id="nowPlayingWidget.1.1.2">
|
<widget class="GtkVBox" id="remainsTimeBox1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHBox" id="remainsTimeTextBox1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="remainsTimeText1">
|
<widget class="GtkLabel" id="remainsTimeText1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">remains:</property>
|
<property name="label" translatable="yes">remains:</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="padding">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHBox" id="nowPlayingWidget.1.1.2.1">
|
<widget class="GtkHBox" id="remainsTimeValueBox1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkEventBox" id="remainsTimeBox1">
|
<widget class="GtkEventBox" id="remainsTimeEventBox1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="remainsTimeLabel1">
|
<widget class="GtkLabel" id="remainsTimeLabel1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">remaining time</property>
|
<property name="label" translatable="yes">remaining time</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
<property name="fill">False</property>
|
<property name="fill">False</property>
|
||||||
<property name="padding">5</property>
|
<property name="padding">5</property>
|
||||||
</packing>
|
</packing>
|
||||||
|
@ -177,6 +207,8 @@
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -189,7 +221,10 @@
|
||||||
<widget class="GtkLabel" id="playlistLabel1">
|
<widget class="GtkLabel" id="playlistLabel1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">playlist</property>
|
<property name="label" translatable="yes">playlist</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_MIDDLE</property>
|
||||||
|
<property name="single_line_mode">True</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="position">3</property>
|
<property name="position">3</property>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue