diff options
author | jstebbins <[email protected]> | 2015-04-22 21:01:20 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2015-04-22 21:01:20 +0000 |
commit | d839ca1690e89704f2b4a8e7d5ab40f8b7cb6a83 (patch) | |
tree | d8f1d57f568ce03c8f397700358225ec9917d1fc /gtk/src | |
parent | 81aecad6b76087e4118ec1809398e9f1a9685d4c (diff) |
LinGui: Add pending count to "Queue" toolbar button
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7118 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/callbacks.c | 13 | ||||
-rw-r--r-- | gtk/src/queuehandler.c | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 13216d828..c4824cf8a 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -2856,6 +2856,7 @@ void ghb_update_pending(signal_user_data_t *ud) { GtkLabel *label; + GtkToolButton *button; gint pending; gchar *str; @@ -2864,6 +2865,18 @@ ghb_update_pending(signal_user_data_t *ud) str = g_strdup_printf(_("%d encode(s) pending"), pending); gtk_label_set_text(label, str); g_free(str); + + button = GTK_TOOL_BUTTON(GHB_WIDGET(ud->builder, "show_queue")); + if (pending > 0) + { + str = g_strdup_printf(_("Queue (%d)"), pending); + } + else + { + str = g_strdup_printf(_("Queue")); + } + gtk_tool_button_set_label(button, str); + g_free(str); } GhbValue* diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index 7b90a1644..e298b78f2 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -1682,6 +1682,7 @@ queue_delete_all_clicked_cb(GtkWidget *widget, signal_user_data_t *ud) ghb_queue_remove_row_internal(ud, ii); } ghb_save_queue(ud->queue); + ghb_update_pending(ud); } G_MODULE_EXPORT void @@ -2175,6 +2176,7 @@ find_pid: } ghb_queue_buttons_grey(ud); ghb_save_queue(ud->queue); + ghb_update_pending(ud); } return FALSE; } |