gui: Rename position and duration widgets

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-01-14 19:57:06 -05:00
parent ed88bb08bd
commit 6fec8876a9
3 changed files with 8 additions and 8 deletions

View File

@ -21,7 +21,7 @@ static Gtk::Scale *o_seek;
static Gtk::Button *o_stop; static Gtk::Button *o_stop;
static Gtk::Label *o_position; static Gtk::Label *o_position;
static Glib::RefPtr<Gtk::Adjustment> o_pos_bar; static Glib::RefPtr<Gtk::Adjustment> o_progress;
static bool gst_change_state(GstState state) static bool gst_change_state(GstState state)
@ -156,8 +156,8 @@ static bool on_seek(Gtk::ScrollType type, double value)
static bool on_timeout() static bool on_timeout()
{ {
o_position->set_text(audio :: position_str()); o_position->set_text(audio :: position_str());
o_pos_bar->set_upper(audio :: duration()); o_progress->set_upper(audio :: duration());
o_pos_bar->set_value(audio :: position()); o_progress->set_value(audio :: position());
return true; return true;
} }
@ -185,8 +185,8 @@ void init_gst(int *argc, char ***argv)
o_seek = lib :: get_widget<Gtk::Scale>("o_seek"); o_seek = lib :: get_widget<Gtk::Scale>("o_seek");
o_stop = lib :: get_widget<Gtk::Button>("o_stop"); o_stop = lib :: get_widget<Gtk::Button>("o_stop");
o_position = lib :: get_widget<Gtk::Label>("o_cur_position"); o_position = lib :: get_widget<Gtk::Label>("o_position");
o_pos_bar = lib :: get_object<Gtk::Adjustment>("o_progress"); o_progress = lib :: get_object<Gtk::Adjustment>("o_progress");
o_next->signal_clicked().connect(sigc::ptr_fun(on_next)); o_next->signal_clicked().connect(sigc::ptr_fun(on_next));
o_pause->signal_clicked().connect(sigc::ptr_fun(audio :: pause)); o_pause->signal_clicked().connect(sigc::ptr_fun(audio :: pause));

View File

@ -45,7 +45,7 @@ void on_track_loaded(Track *track)
Gtk::Label *title = lib :: get_widget<Gtk::Label>("o_title"); Gtk::Label *title = lib :: get_widget<Gtk::Label>("o_title");
Gtk::Label *artist = lib :: get_widget<Gtk::Label>("o_artist"); Gtk::Label *artist = lib :: get_widget<Gtk::Label>("o_artist");
Gtk::Label *album = lib :: get_widget<Gtk::Label>("o_album"); Gtk::Label *album = lib :: get_widget<Gtk::Label>("o_album");
Gtk::Label *duration = lib :: get_widget<Gtk::Label>("o_total_time"); Gtk::Label *duration = lib :: get_widget<Gtk::Label>("o_duration");
set_label_text(title, "xx-large", track->name()); set_label_text(title, "xx-large", track->name());
set_label_text(artist, "x-large", "By: " + track->artist()->name()); set_label_text(artist, "x-large", "By: " + track->artist()->name());

View File

@ -1338,7 +1338,7 @@ Manager</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<child> <child>
<object class="GtkLabel" id="o_cur_position"> <object class="GtkLabel" id="o_position">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">0:00</property> <property name="label" translatable="yes">0:00</property>
@ -1365,7 +1365,7 @@ Manager</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="o_total_time"> <object class="GtkLabel" id="o_duration">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">0:00</property> <property name="label" translatable="yes">0:00</property>