diff options
author | John Stebbins <[email protected]> | 2017-09-29 08:22:06 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2017-11-06 08:19:49 -0800 |
commit | d2486faa36b5e000d995a1eaeda94f6965611e6a (patch) | |
tree | c91441d27efa7ecbab09b74294bfe466e258c57d | |
parent | 95c3125f0fbb7c709d67eb82923a1d7e32a4529a (diff) |
LinGui: fix scan progress display
Lost the text during one of the UI shuffles
-rw-r--r-- | gtk/src/callbacks.c | 29 | ||||
-rw-r--r-- | gtk/src/ghb.m4 | 43 |
2 files changed, 55 insertions, 17 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index db31cd2e1..b7597e545 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -1240,33 +1240,38 @@ ghb_load_post_settings(signal_user_data_t * ud) static void show_scan_progress(signal_user_data_t *ud) { - GtkWidget * source_info; + GtkWidget * widget; GtkProgressBar * progress; GtkLabel * label; + widget = GHB_WIDGET(ud->builder, "SourceInfoBox"); + gtk_widget_hide(widget); + + widget = GHB_WIDGET(ud->builder, "SourceScanBox"); + gtk_widget_show(widget); + progress = GTK_PROGRESS_BAR(GHB_WIDGET(ud->builder, "scan_prog")); gtk_progress_bar_set_fraction(progress, 0); - gtk_widget_show(GTK_WIDGET(progress)); - label = GTK_LABEL(GHB_WIDGET(ud->builder, "volume_label")); + label = GTK_LABEL(GHB_WIDGET(ud->builder, "source_scan_label")); gtk_label_set_text( label, _("Scanning ...") ); - source_info = GHB_WIDGET(ud->builder, "SourceInfoBox"); - gtk_widget_hide(source_info); } static void hide_scan_progress(signal_user_data_t *ud) { - GtkWidget * source_info; + GtkWidget * widget; GtkProgressBar * progress; progress = GTK_PROGRESS_BAR(GHB_WIDGET(ud->builder, "scan_prog")); gtk_progress_bar_set_fraction(progress, 1.0); - gtk_widget_hide(GTK_WIDGET(progress)); - source_info = GHB_WIDGET(ud->builder, "SourceInfoBox"); - gtk_widget_show(source_info); + widget = GHB_WIDGET(ud->builder, "SourceScanBox"); + gtk_widget_hide(widget); + + widget = GHB_WIDGET(ud->builder, "SourceInfoBox"); + gtk_widget_show(widget); } static void @@ -3626,7 +3631,7 @@ ghb_backend_events(signal_user_data_t *ud) GtkLabel *label; scan_prog = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "scan_prog")); - label = GTK_LABEL(GHB_WIDGET (ud->builder, "volume_label")); + label = GTK_LABEL(GHB_WIDGET(ud->builder, "source_scan_label")); if (status.scan.title_cur == 0) { @@ -3644,7 +3649,7 @@ ghb_backend_events(signal_user_data_t *ud) status.scan.preview_cur); } - gtk_label_set_text (label, status_str); + gtk_label_set_text(label, status_str); g_free(status_str); if (status.scan.title_count > 0) { @@ -3750,7 +3755,7 @@ ghb_backend_events(signal_user_data_t *ud) { // This needs to be in scanning and working since scanning // happens fast enough that it can be missed - gtk_label_set_text (work_status, _("Scanning ...")); + gtk_label_set_text(work_status, _("Scanning ...")); gtk_progress_bar_set_fraction (progress, 0); } else if (status.queue.state & GHB_STATE_SCANDONE) diff --git a/gtk/src/ghb.m4 b/gtk/src/ghb.m4 index c4c2f04fe..8dd772da9 100644 --- a/gtk/src/ghb.m4 +++ b/gtk/src/ghb.m4 @@ -1176,6 +1176,7 @@ Activity</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="margin-start">12</property> <property name="margin-end">12</property> + <property name="margin-bottom">6</property> <child> <object class="GtkBox" id="SourceInfoBox"> <property name="orientation">horizontal</property> @@ -1235,11 +1236,43 @@ Activity</property> </packing> </child> <child> - <object class="GtkProgressBar" id="scan_prog"> - <property name="height_request">10</property> + <object class="GtkBox" id="SourceScanBox"> + <property name="orientation">horizontal</property> + <property name="visible">False</property> <property name="can_focus">False</property> - <property name="valign">center</property> + <property name="spacing">6</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <child> + <object class="GtkLabel" id="source_scan_label"> + <property name="visible">True</property> + <property name="width-chars">40</property> + <property name="can_focus">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <property name="margin-end">12</property> + <property name="label" translatable="yes">Scanning...</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkProgressBar" id="scan_prog"> + <property name="visible">True</property> + <property name="height_request">10</property> + <property name="can_focus">False</property> + <property name="valign">center</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> </object> <packing> <property name="expand">True</property> @@ -1506,7 +1539,7 @@ This is often the feature title of a DVD.</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="margin-start">12</property> <property name="margin-end">12</property> - <property name="margin-top">12</property> + <property name="margin-top">6</property> <property name="spacing">5</property> <child> <object class="GtkLabel" id="preset_selection_label"> @@ -1619,7 +1652,7 @@ Modifications will be discarded.</property> <property name="transition-duration">400</property> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="margin-top">12</property> + <property name="margin-top">6</property> <child> <object class="GtkBox" id="settings_tab"> <property name="orientation">vertical</property> |