diff --git a/gui/audio.c b/gui/audio.c index 870df5c8..8ce5befd 100644 --- a/gui/audio.c +++ b/gui/audio.c @@ -8,14 +8,11 @@ #include -const gchar *TITLE_FMT = "%s"; -const gchar *ARTIST_FMT = "By: %s"; -const gchar *ALBUM_FMT = "From: %s"; - -static inline void __audio_set_label(const gchar *label, const gchar *fmt, - const gchar *text) +static inline void __audio_set_label(const gchar *label, const gchar *size, + const gchar *prefix, const gchar *text) { - gchar *markup = g_markup_printf_escaped(fmt, text); + gchar *markup = g_markup_printf_escaped("%s%s", + size, prefix, text); gtk_label_set_markup(GTK_LABEL(gui_builder_widget(label)), markup); g_free(markup); } @@ -23,20 +20,18 @@ static inline void __audio_set_label(const gchar *label, const gchar *fmt, static inline void __audio_set_time_label(const gchar *label, unsigned int time) { gchar *str = string_sec2str(time); - __audio_set_label(label, "%s", str); + __audio_set_label(label, "large", "", str); g_free(str); } static void __audio_load(struct track *track) { - __audio_set_label("o_title", TITLE_FMT, track->tr_title); - __audio_set_label("o_artist", ARTIST_FMT, track->tr_artist->ar_name); - __audio_set_label("o_album", ALBUM_FMT, track->tr_album->al_name); - - __audio_set_time_label("o_position", 0); + __audio_set_label("o_title", "xx-large", "", track->tr_title); + __audio_set_label("o_artist", "x-large", "By: ", track->tr_artist->ar_name); + __audio_set_label("o_album", "x-large", "From: ", track->tr_album->al_name); __audio_set_time_label("o_duration", track->tr_length); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gui_builder_widget("o_ban")), + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gui_builder_widget("o_hide")), playlist_has(PL_HIDDEN, track)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gui_builder_widget("o_favorite")), playlist_has(PL_FAVORITED, track)); diff --git a/gui/playlist.cpp b/gui/playlist.cpp index 98c5b331..da09edf9 100644 --- a/gui/playlist.cpp +++ b/gui/playlist.cpp @@ -189,7 +189,7 @@ void plist :: init() { p_tab = new PlaylistTab; - o_ban = Glib :: wrap(GTK_TOGGLE_BUTTON(gui_builder_widget("o_ban")), false); + o_ban = Glib :: wrap(GTK_TOGGLE_BUTTON(gui_builder_widget("o_hide")), false); o_fav = Glib :: wrap(GTK_TOGGLE_BUTTON(gui_builder_widget("o_favorite")), false); o_ban->signal_toggled().connect(sigc::ptr_fun(on_ban)); diff --git a/share/ocarina/ocarina6.glade b/share/ocarina/ocarina6.glade index 0468a714..525ba57d 100644 --- a/share/ocarina/ocarina6.glade +++ b/share/ocarina/ocarina6.glade @@ -1,7 +1,7 @@ - + 100 1 @@ -195,6 +195,23 @@ + + True + False + 0 + 5 + 5 + emblem-favorite + 3 + + + True + False + 0 + 5 + 5 + face-sad + 100000000000 1000000000 @@ -212,6 +229,274 @@ True False vertical + + + True + False + + + True + False + center + 5 + spread + + + True + False + True + center + False + + + + True + False + 5 + 5 + media-skip-backward + 3 + + + + + False + False + 0 + True + + + + + True + False + True + center + False + + + + True + False + 5 + 5 + media-playback-start + 6 + + + + + False + False + 1 + + + + + False + True + center + False + + + + True + False + 5 + 5 + media-playback-pause + 6 + + + + + False + False + 2 + + + + + True + False + True + center + False + + + + True + False + 5 + 5 + media-playback-stop + 3 + + + + + False + False + 3 + True + + + + + True + False + True + center + False + + + + True + False + 5 + 5 + media-skip-forward + 3 + + + + + False + False + 4 + True + + + + + False + True + 0 + + + + + True + True + never + + + True + False + + + True + False + vertical + + + True + False + center + <span size='xx-large'></span> + True + 0 + + + True + True + 0 + + + + + True + False + center + <span size='x-large'></span> + True + 0 + + + False + True + 1 + + + + + True + False + center + <span size='x-large'></span> + True + 0 + + + True + True + 2 + + + + + + + + + True + True + 1 + + + + + True + False + center + vertical + 5 + spread + + + Favorite + True + False + True + image6 + False + True + + + False + True + 0 + + + + + Hide + True + False + True + image7 + False + + + False + True + 1 + + + + + False + False + 2 + + + + + False + True + 0 + + True @@ -466,66 +751,85 @@ Manager True True - 0 + 1 - + True False - 5 - 5 - True - + True False - vertical - True + 5 + 5 + True - + True False - - - True - False - 0:00 - - - False - True - 0 - - - - - True - False - o_progress - 1 - False - left - - - - True - True - 1 - - - - - True - False - 0:00 - - - False - True - 2 - - + True + center + <span size='large'>0:00</span> + True + + + 0 + 0 + + + + + True + False + center + <span size='large'>0:00</span> + True + + + 5 + 0 + + + + + True + False + center + o_progress + 1 + False + left + + + + 1 + 0 + 4 + + + + + True + True + 0 + + + + + True + False + + + Pause after + True + False + False + False + 0.5 + True + False @@ -534,165 +838,13 @@ Manager - + True - False - True - - - True - False - True - False - - - - True - False - media-playback-start - - - - - False - True - 0 - - - - - False - True - False - - - - True - False - media-playback-pause - - - - - False - True - 1 - - - - - True - False - True - False - - - - True - False - media-playback-stop - - - - - False - True - 2 - - - - - True - False - True - False - - - - True - False - media-skip-backward - - - - - False - True - 3 - - - - - True - False - True - False - - - - True - False - media-skip-forward - - - - - False - True - 4 - - - - - True - False - - - False - True - 5 - - - - - True - False - True - False - - - True - False - emblem-favorite - - - - - False - True - 6 - - - - - True - False - True - False - - - True - False - face-sad - - - - - False - True - 7 - - + True + False + adjustment1 + True + False @@ -701,53 +853,10 @@ Manager - + True False - - - Pause after - True - False - False - False - 0.5 - True - - - - False - True - 0 - - - - - True - True - False - adjustment1 - True - - - - False - True - 1 - - - - - True - False - songs - - - False - True - 2 - - + songs False @@ -757,77 +866,9 @@ Manager - 2 - 0 - - - - - True - True - - - True - False - - - True - False - vertical - - - True - False - start - <span size='xx-large'></span> - True - 0 - - - True - True - 0 - - - - - True - False - start - <span size='x-large'></span> - True - 0 - - - False - True - 1 - - - - - True - False - start - <span size='x-large'></span> - True - 0 - - - True - True - 2 - - - - - - - - - 0 - 0 - 2 + False + True + 1