OSDN Git Service

LinGui: several ui improvements
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 30 Jun 2009 22:54:18 +0000 (22:54 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 30 Jun 2009 22:54:18 +0000 (22:54 +0000)
- Add separate progress bar for source scan (similar to mac ui)
- When working replace start button with stop button on main window.
- Add status field that shows number of pending queue items on main window.
- add some white space and remove a couple more frames
- add subtitle scan pass information to progress bar

git-svn-id: svn://localhost/HandBrake/trunk@2651 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/callbacks.c
gtk/src/callbacks.h
gtk/src/ghb.ui
gtk/src/hb-backend.c
gtk/src/queuehandler.c

index 4d02add..59c29a3 100644 (file)
@@ -857,6 +857,20 @@ source_dialog_extra_widgets(
 extern GValue *ghb_queue_edit_settings;
 static gchar *last_scan_file = NULL;
 
+static void 
+show_scan_progress(signal_user_data_t *ud)
+{
+       GtkProgressBar *progress;
+       GtkLabel *label;
+
+       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, "source_title"));
+       gtk_label_set_text( label, "Scanning ..." );
+}
+
 void
 ghb_do_scan(
        signal_user_data_t *ud, 
@@ -892,14 +906,13 @@ ghb_do_scan(
                ghb_settings_set_string(ud->settings, "source", filename);
                if (update_source_label(ud, filename))
                {
-                       GtkProgressBar *progress;
-                       progress = GTK_PROGRESS_BAR(GHB_WIDGET(ud->builder, "progressbar"));
                        gchar *path;
+                       gint preview_count;
+
+                       show_scan_progress(ud);
                        path = ghb_settings_get_string( ud->settings, "source");
-                       gtk_progress_bar_set_fraction (progress, 0);
-                       gtk_progress_bar_set_text (progress, "Scanning ...");
                        prune_logs(ud);
-                       gint preview_count;
+
                        preview_count = ghb_settings_get_int(ud->settings, "preview_count");
                        ghb_backend_scan(path, titlenum, preview_count);
                        g_free(path);
@@ -2017,6 +2030,42 @@ queue_scan(signal_user_data_t *ud, GValue *js)
        g_free(path);
 }
 
+static gint
+queue_pending_count(GValue *queue)
+{
+       gint nn, ii, count;
+       GValue *js;
+       gint status;
+
+       nn = 0;
+       count = ghb_array_len(queue);
+       for (ii = 0; ii < count; ii++)
+       {
+
+               js = ghb_array_get_nth(queue, ii);
+               status = ghb_settings_get_int(js, "job_status");
+               if (status == GHB_QUEUE_PENDING)
+               {
+                       nn++;
+               }
+       }
+       return nn;
+}
+
+void
+ghb_update_pending(signal_user_data_t *ud)
+{
+       GtkLabel *label;
+       gint pending;
+       gchar *str;
+
+       label = GTK_LABEL(GHB_WIDGET(ud->builder, "pending_status"));
+       pending = queue_pending_count(ud->queue);
+       str = g_strdup_printf("%d encode(s) pending in the queue", pending);
+       gtk_label_set_text(label, str);
+       g_free(str);
+}
+
 GValue* 
 ghb_start_next_job(signal_user_data_t *ud, gboolean find_first)
 {
@@ -2024,8 +2073,12 @@ ghb_start_next_job(signal_user_data_t *ud, gboolean find_first)
        gint count, ii, jj;
        GValue *js;
        gint status;
+       GtkWidget *prog;
 
        g_debug("start_next_job");
+       prog = GHB_WIDGET(ud->builder, "progressbar");
+       gtk_widget_show(prog);
+
        count = ghb_array_len(ud->queue);
        if (find_first)
        {       // Start the first pending item in the queue
@@ -2040,6 +2093,7 @@ ghb_start_next_job(signal_user_data_t *ud, gboolean find_first)
                                current = ii;
                                ghb_inhibit_gpm();
                                queue_scan(ud, js);
+                               ghb_update_pending(ud);
                                return js;
                        }
                }
@@ -2064,6 +2118,7 @@ ghb_start_next_job(signal_user_data_t *ud, gboolean find_first)
                                        current = jj;
                                        ghb_inhibit_gpm();
                                        queue_scan(ud, js);
+                                       ghb_update_pending(ud);
                                        return js;
                                }
                        }
@@ -2080,12 +2135,15 @@ ghb_start_next_job(signal_user_data_t *ud, gboolean find_first)
                        current = ii;
                        ghb_inhibit_gpm();
                        queue_scan(ud, js);
+                       ghb_update_pending(ud);
                        return js;
                }
        }
        // Nothing found
        ghb_uninhibit_gpm();
        ghb_notify_done(ud);
+       ghb_update_pending(ud);
+       gtk_widget_hide(prog);
        return NULL;
 }
 
@@ -2119,26 +2177,36 @@ working_status_string(signal_user_data_t *ud, ghb_instance_status_t *status)
        gint qcount;
        gint index;
        GValue *js;
+       gboolean subtitle_scan = FALSE;
 
-       if (status->job_count > 1)
-       {
-               task_str = g_strdup_printf("pass %d of %d, ", 
-                       status->job_cur, status->job_count);
-       }
-       else
-       {
-               task_str = g_strdup("");
-       }
        qcount = ghb_array_len(ud->queue);
        if (qcount > 1)
        {
                index = find_queue_job(ud->queue, status->unique_id, &js);
                job_str = g_strdup_printf("job %d of %d, ", index+1, qcount);
+               subtitle_scan = ghb_settings_get_boolean(js, "subtitle_scan");
        }
        else
        {
                job_str = g_strdup("");
        }
+       if (status->job_count > 1)
+       {
+               if (status->job_cur == 1 && subtitle_scan)
+               {
+                       task_str = g_strdup_printf("pass %d (subtitle scan) of %d, ", 
+                               status->job_cur, status->job_count);
+               }
+               else
+               {
+                       task_str = g_strdup_printf("pass %d of %d, ", 
+                               status->job_cur, status->job_count);
+               }
+       }
+       else
+       {
+               task_str = g_strdup("");
+       }
        if(status->seconds > -1)
        {
                status_str= g_strdup_printf(
@@ -2167,6 +2235,7 @@ ghb_backend_events(signal_user_data_t *ud)
        ghb_status_t status;
        gchar *status_str;
        GtkProgressBar *progress;
+       GtkLabel       *work_status;
        gint titleindex;
        GValue *js;
        gint index;
@@ -2179,6 +2248,7 @@ ghb_backend_events(signal_user_data_t *ud)
        ghb_track_status();
        ghb_get_status(&status);
        progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "progressbar"));
+       work_status = GTK_LABEL(GHB_WIDGET (ud->builder, "work_status"));
        if (status.scan.state == GHB_STATE_IDLE && 
                status.queue.state == GHB_STATE_IDLE)
        {
@@ -2194,6 +2264,12 @@ ghb_backend_events(signal_user_data_t *ud)
        // Then handle the status of the queue
        if (status.scan.state & GHB_STATE_SCANNING)
        {
+               GtkProgressBar *scan_prog;
+               GtkLabel *label;
+
+               scan_prog = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "scan_prog"));
+               label = GTK_LABEL(GHB_WIDGET (ud->builder, "source_title"));
+
                if (status.scan.title_cur == 0)
                {
                        status_str = g_strdup ("Scanning...");
@@ -2203,20 +2279,26 @@ ghb_backend_events(signal_user_data_t *ud)
                        status_str = g_strdup_printf ("Scanning title %d of %d...", 
                                                          status.scan.title_cur, status.scan.title_count );
                }
-               gtk_progress_bar_set_text (progress, status_str);
+               gtk_label_set_text (label, status_str);
                g_free(status_str);
                if (status.scan.title_count > 0)
                {
-                       gtk_progress_bar_set_fraction (progress
+                       gtk_progress_bar_set_fraction (scan_prog
                                (gdouble)status.scan.title_cur / status.scan.title_count);
                }
        }
        else if (status.scan.state & GHB_STATE_SCANDONE)
        {
-               status_str = g_strdup_printf ("Scan done"); 
-               gtk_progress_bar_set_text (progress, status_str);
-               g_free(status_str);
-               gtk_progress_bar_set_fraction (progress, 1.0);
+               gchar *source;
+               GtkProgressBar *scan_prog;
+               GtkLabel *label;
+
+               source = ghb_settings_get_string(ud->settings, "source");
+               update_source_label(ud, source);
+
+               scan_prog = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "scan_prog"));
+               gtk_progress_bar_set_fraction (scan_prog, 1.0);
+               gtk_widget_hide(GTK_WIDGET(scan_prog));
 
                ghb_title_info_t tinfo;
                        
@@ -2224,13 +2306,11 @@ ghb_backend_events(signal_user_data_t *ud)
                titleindex = ghb_longest_title();
                ghb_ui_update(ud, "title", ghb_int64_value(titleindex));
 
+               label = GTK_LABEL(GHB_WIDGET (ud->builder, "source_title"));
                // Are there really any titles.
                if (!ghb_get_title_info(&tinfo, titleindex))
                {
-                       GtkProgressBar *progress;
-                       progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "progressbar"));
-                       gtk_progress_bar_set_fraction (progress, 0);
-                       gtk_progress_bar_set_text (progress, "No Source");
+                       gtk_label_set_text(label, "None");
                }
                ghb_clear_scan_state(GHB_STATE_SCANDONE);
                ghb_queue_buttons_grey(ud, work_started);
@@ -2249,11 +2329,17 @@ ghb_backend_events(signal_user_data_t *ud)
                        ghb_queue_edit_settings = NULL;
                }
        }
-       else if (status.queue.state & GHB_STATE_SCANNING)
+
+       if (status.queue.state & GHB_STATE_SCANNING)
        {
-               status_str = g_strdup_printf ("Scanning ...");
-               gtk_progress_bar_set_text (progress, status_str);
-               g_free(status_str);
+               // This needs to be in scanning and working since scanning
+               // happens fast enough that it can be missed
+               if (!work_started)
+               {
+                       work_started = TRUE;
+                       ghb_queue_buttons_grey(ud, TRUE);
+               }
+               gtk_label_set_text (work_status, "Scanning ...");
                gtk_progress_bar_set_fraction (progress, 0);
        }
        else if (status.queue.state & GHB_STATE_SCANDONE)
@@ -2261,17 +2347,50 @@ ghb_backend_events(signal_user_data_t *ud)
                ghb_clear_queue_state(GHB_STATE_SCANDONE);
                usleep(2000000);
                submit_job(ud->current_job);
+               ghb_update_pending(ud);
        }
        else if (status.queue.state & GHB_STATE_PAUSED)
        {
-               status_str = g_strdup_printf ("Paused"); 
-               gtk_progress_bar_set_text (progress, status_str);
-               g_free(status_str);
+               gtk_label_set_text (work_status, "Paused");
        }
        else if (status.queue.state & GHB_STATE_WORKING)
        {
+               // This needs to be in scanning and working since scanning
+               // happens fast enough that it can be missed
+               if (!work_started)
+               {
+                       work_started = TRUE;
+                       ghb_queue_buttons_grey(ud, TRUE);
+               }
+               index = find_queue_job(ud->queue, status.queue.unique_id, &js);
+               if (status.queue.unique_id != 0 && index >= 0)
+               {
+                       gchar working_icon[] = "hb-working0";
+                       working_icon[10] = '0' + working;
+                       working = (working+1) % 6;
+                       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
+                       store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
+                       gchar *path = g_strdup_printf ("%d", index);
+                       if (gtk_tree_model_get_iter_from_string(
+                                       GTK_TREE_MODEL(store), &iter, path))
+                       {
+                               gtk_tree_store_set(store, &iter, 0, working_icon, -1);
+                       }
+                       g_free(path);
+               }
+               GtkLabel *label;
+               gchar *status_str;
+
                status_str = working_status_string(ud, &status.queue);
-               gtk_progress_bar_set_text (progress, status_str);
+               label = GTK_LABEL(GHB_WIDGET(ud->builder, "queue_status"));
+               gtk_label_set_text (label, status_str);
+#if !GTK_CHECK_VERSION(2, 16, 0)
+               GtkStatusIcon *si;
+
+               si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
+               gtk_status_icon_set_tooltip(si, status_str);
+#endif
+               gtk_label_set_text (work_status, status_str);
                gtk_progress_bar_set_fraction (progress, status.queue.progress);
                g_free(status_str);
        }
@@ -2289,7 +2408,7 @@ ghb_backend_events(signal_user_data_t *ud)
                switch( status.queue.error )
                {
                        case GHB_ERROR_NONE:
-                               gtk_progress_bar_set_text( progress, "Rip done!" );
+                               gtk_label_set_text (work_status, "Rip Done!");
                                qstatus = GHB_QUEUE_DONE;
                                if (js != NULL)
                                {
@@ -2303,7 +2422,7 @@ ghb_backend_events(signal_user_data_t *ud)
                                }
                                break;
                        case GHB_ERROR_CANCELED:
-                               gtk_progress_bar_set_text( progress, "Rip canceled." );
+                               gtk_label_set_text (work_status, "Rip Canceled.");
                                qstatus = GHB_QUEUE_CANCELED;
                                if (js != NULL)
                                {
@@ -2317,7 +2436,7 @@ ghb_backend_events(signal_user_data_t *ud)
                                }
                                break;
                        default:
-                               gtk_progress_bar_set_text( progress, "Rip failed.");
+                               gtk_label_set_text (work_status, "Rip Failed.");
                                qstatus = GHB_QUEUE_CANCELED;
                                if (js != NULL)
                                {
@@ -2343,6 +2462,7 @@ ghb_backend_events(signal_user_data_t *ud)
                {
                        ghb_uninhibit_gpm();
                        ud->current_job = NULL;
+                       gtk_widget_hide(GTK_WIDGET(progress));
                }
                if (js)
                        ghb_settings_set_int(js, "job_status", qstatus);
@@ -2357,57 +2477,9 @@ ghb_backend_events(signal_user_data_t *ud)
        }
        else if (status.queue.state & GHB_STATE_MUXING)
        {
-               gtk_progress_bar_set_text(progress, "Muxing: this may take awhile...");
-       }
-       if (status.queue.state & GHB_STATE_SCANNING)
-       {
-               // This needs to be in scanning and working since scanning
-               // happens fast enough that it can be missed
-               if (!work_started)
-               {
-                       work_started = TRUE;
-                       ghb_queue_buttons_grey(ud, TRUE);
-               }
+               gtk_label_set_text (work_status, "Muxing: This may take a while...");
        }
-       if (status.queue.state & GHB_STATE_WORKING)
-       {
-               // This needs to be in scanning and working since scanning
-               // happens fast enough that it can be missed
-               if (!work_started)
-               {
-                       work_started = TRUE;
-                       ghb_queue_buttons_grey(ud, TRUE);
-               }
-               index = find_queue_job(ud->queue, status.queue.unique_id, &js);
-               if (status.queue.unique_id != 0 && index >= 0)
-               {
-                       gchar working_icon[] = "hb-working0";
-                       working_icon[10] = '0' + working;
-                       working = (working+1) % 6;
-                       treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "queue_list"));
-                       store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview));
-                       gchar *path = g_strdup_printf ("%d", index);
-                       if (gtk_tree_model_get_iter_from_string(
-                                       GTK_TREE_MODEL(store), &iter, path))
-                       {
-                               gtk_tree_store_set(store, &iter, 0, working_icon, -1);
-                       }
-                       g_free(path);
-               }
-               GtkLabel *label;
-               gchar *status_str;
 
-               status_str = working_status_string(ud, &status.queue);
-               label = GTK_LABEL(GHB_WIDGET(ud->builder, "queue_status"));
-               gtk_label_set_text (label, status_str);
-#if !GTK_CHECK_VERSION(2, 16, 0)
-               GtkStatusIcon *si;
-
-               si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status"));
-               gtk_status_icon_set_tooltip(si, status_str);
-#endif
-               g_free(status_str);
-       }
        if (status.scan.state & GHB_STATE_WORKING)
        {
                GtkProgressBar *live_progress;
@@ -3263,10 +3335,7 @@ handle_media_change(const gchar *device, gboolean insert, signal_user_data_t *ud
                        if (ud->current_dvd_device != NULL &&
                                strcmp(device, ud->current_dvd_device) == 0)
                        {
-                               GtkProgressBar *progress;
-                               progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "progressbar"));
-                               gtk_progress_bar_set_text (progress, "Scanning ...");
-                               gtk_progress_bar_set_fraction (progress, 0);
+                               show_scan_progress(ud);
                                update_source_label(ud, device);
                                gint preview_count;
                                preview_count = ghb_settings_get_int(ud->settings, "preview_count");
@@ -3366,10 +3435,7 @@ drive_changed_cb(GVolumeMonitor *gvm, GDrive *gd, signal_user_data_t *ud)
        }
        if (g_drive_has_media(gd))
        {
-               GtkProgressBar *progress;
-               progress = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "progressbar"));
-               gtk_progress_bar_set_text (progress, "Scanning ...");
-               gtk_progress_bar_set_fraction (progress, 0);
+               show_scan_progress(ud);
                update_source_label(ud, device);
                gint preview_count;
                preview_count = ghb_settings_get_int(ud->settings, "preview_count");
index ad0bf18..6134bef 100644 (file)
@@ -61,6 +61,7 @@ void wm_drive_changed(MSG *msg, signal_user_data_t *ud);
 gpointer ghb_cache_volnames(signal_user_data_t *ud);
 void ghb_volname_cache_init(void);
 void ghb_update_destination_extension(signal_user_data_t *ud);
+void ghb_update_pending(signal_user_data_t *ud);
 
 #endif // _CALLBACKS_H_
 
index 6e1e34d..874e2dd 100644 (file)
   </object>
   <object class="GtkWindow" id="hb_window">
     <property name="visible">True</property>
+    <property name="resizable">False</property>
     <property name="title" translatable="yes">HandBrake</property>
     <property name="default_width">500</property>
     <property name="default_height">400</property>
               </packing>
             </child>
             <child>
+              <object class="GtkToolButton" id="queue_stop1">
+                <property name="visible">False</property>
+                <property name="sensitive">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="tooltip-text" translatable="yes">Stop Encoding</property>
+                <property name="label" translatable="yes">Stop</property>
+                <property name="icon_name">hb-stop</property>
+                <signal handler="queue_stop_clicked_cb" name="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+              </packing>
+            </child>
+            <child>
               <object class="GtkToolButton" id="queue_pause1">
                 <property name="visible">True</property>
                 <property name="sensitive">False</property>
               <object class="GtkVBox" id="vbox15">
                 <property name="visible">True</property>
                 <child>
-                  <object class="GtkFrame" id="frame1">
+                  <object class="GtkAlignment" id="alignment1">
                     <property name="visible">True</property>
-                    <property name="label_xalign">0</property>
-                    <property name="shadow_type">GTK_SHADOW_NONE</property>
+                    <property name="left_padding">6</property>
+                    <property name="right_padding">12</property>
+                    <property name="top_padding">12</property>
+                    <property name="bottom_padding">6</property>
+                    <property name="xalign">0</property>
+                    <property name="xscale">1</property>
                     <child>
-                      <object class="GtkAlignment" id="alignment1">
+                      <object class="GtkVBox" id="vbox16">
                         <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <property name="top_padding">6</property>
-                        <property name="bottom_padding">6</property>
+                        <property name="spacing">6</property>
                         <child>
-                          <object class="GtkVBox" id="vbox16">
+                          <object class="GtkHBox" id="hbox54">
                             <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="spacing">6</property>
                             <child>
-                              <object class="GtkHBox" id="hbox54">
+                              <object class="GtkLabel" id="label7">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Source:&lt;/b&gt;</property>
+                                <property name="use_markup">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="source_title">
+                                <property name="width_request">240</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="spacing">5</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">None</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkAlignment" id="alignment68">
+                                <property name="visible">True</property>
+                                <property name="xscale">1</property>
+                                <property name="yscale">0</property>
                                 <child>
-                                  <object class="GtkLabel" id="source_title">
-                                    <property name="visible">True</property>
+                                  <object class="GtkProgressBar" id="scan_prog">
+                                    <property name="height_request">10</property>
+                                    <property name="visible">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="xalign">0</property>
-                                    <property name="label" translatable="yes"></property>
+                                    <property name="text" translatable="yes"/>
                                   </object>
                                 </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
                               </object>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
                             </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkAlignment" id="alignment65">
+                            <property name="visible">True</property>
+                            <property name="left_padding">6</property>
+                            <property name="bottom_padding">6</property>
                             <child>
                               <object class="GtkHBox" id="hbox5">
                                 <property name="visible">True</property>
                                   </packing>
                                 </child>
                               </object>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
                             </child>
                           </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
                         </child>
                       </object>
                     </child>
-                    <child type="label">
-                      <object class="GtkLabel" id="label7">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Source&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </object>
-                    </child>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">0</property>
-                  </packing>
                 </child>
                 <child>
                   <object class="GtkFrame" id="frame2">
               </packing>
             </child>
             <child>
+              <object class="GtkAlignment" id="alignment67">
+                <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="top_padding">0</property>
+                <property name="left_padding">12</property>
+                <property name="right_padding">12</property>
+
+            <child>
               <object class="GtkNotebook" id="settings_box">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -3316,27 +3365,72 @@ no-dct-decimate=0:cabac=1</property>
                   </packing>
                 </child>
               </object>
+            </child>
+
+              </object>
               <packing>
                 <property name="expand">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
+
             <child>
-              <object class="GtkLabel" id="label80">
-                <property name="height_request">1</property>
+              <object class="GtkAlignment" id="alignment66">
                 <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="top_padding">4</property>
+                <property name="bottom_padding">4</property>
+                <property name="left_padding">12</property>
+                <property name="right_padding">12</property>
+                <property name="xalign">0.0</property>
+                <property name="yalign">1.0</property>
+                <child>
+                  <object class="GtkHBox" id="hbox46">
+                    <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>
+                      <object class="GtkLabel" id="work_status">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</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="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="pending_status">
+                        <property name="visible">True</property>
+                        <property name="xalign">1</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">False</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
               </object>
               <packing>
                 <property name="position">2</property>
               </packing>
             </child>
             <child>
-              <object class="GtkProgressBar" id="progressbar">
-                <property name="height_request">20</property>
+              <object class="GtkAlignment" id="alignment66">
                 <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="text" translatable="yes"/>
+                <property name="left_padding">12</property>
+                <property name="right_padding">12</property>
+                <property name="bottom_padding">6</property>
+                <child>
+                  <object class="GtkProgressBar" id="progressbar">
+                    <property name="height_request">10</property>
+                    <property name="visible">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="text" translatable="yes"/>
+                  </object>
+                </child>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -3348,12 +3442,20 @@ no-dct-decimate=0:cabac=1</property>
             <property name="expand">False</property>
           </packing>
         </child>
+
+        <child>
+          <object class="GtkAlignment" id="alignment69">
+            <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="top_padding">6</property>
+            <property name="right_padding">6</property>
+
         <child>
           <object class="GtkFrame" id="presets_frame">
             <property name="visible">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="label_xalign">0</property>
-            <property name="shadow_type">out</property>
+            <property name="shadow_type">none</property>
             <signal handler="presets_frame_size_allocate_cb" name="size_allocate"/>
             <child>
               <object class="GtkAlignment" id="alignment21">
@@ -3371,6 +3473,7 @@ no-dct-decimate=0:cabac=1</property>
                         <property name="can_focus">True</property>
                         <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
                         <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                        <property name="shadow_type">etched-in</property>
                         <child>
                           <object class="GtkTreeView" id="presets_list">
                             <property name="width_request">206</property>
@@ -3503,10 +3606,14 @@ no-dct-decimate=0:cabac=1</property>
               </object>
             </child>
           </object>
+        </child>
+
+          </object>
           <packing>
             <property name="position">1</property>
           </packing>
         </child>
+
       </object>
       <packing>
         <property name="position">2</property>
index 1edabda..526a9cf 100644 (file)
@@ -4187,6 +4187,7 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
        gint subtitle;
        gboolean force, burned, def, one_burned = FALSE;
        
+       ghb_settings_set_boolean(js, "subtitle_scan", FALSE);
        subtitle_list = ghb_settings_get_value(js, "subtitle_list");
        count = ghb_array_len(subtitle_list);
        for (ii = 0; ii < count; ii++)
@@ -4251,6 +4252,7 @@ add_job(hb_handle_t *h, GValue *js, gint unique_id, gint titleindex)
                        job->select_subtitle_config.force = force;
                        job->select_subtitle_config.default_track = def;
                        job->indepth_scan = 1;
+                       ghb_settings_set_boolean(js, "subtitle_scan", TRUE);
                }
                else if (subtitle >= 0)
                {
index d32cbcf..6f6e0cb 100644 (file)
@@ -737,6 +737,7 @@ queue_add(signal_user_data_t *ud)
        ghb_array_append(ud->queue, settings);
        add_to_queue_list(ud, settings, NULL);
        ghb_save_queue(ud->queue);
+       ghb_update_pending(ud);
 
        return TRUE;
 }
@@ -801,6 +802,7 @@ queue_remove_clicked_cb(GtkWidget *widget, gchar *path, signal_user_data_t *ud)
        {       
                gtk_tree_path_free (treepath);
        }
+       ghb_update_pending(ud);
 }
 
 static gint
@@ -1029,6 +1031,19 @@ ghb_queue_buttons_grey(signal_user_data_t *ud, gboolean working)
 
        widget = GHB_WIDGET (ud->builder, "queue_start1");
        gtk_widget_set_sensitive (widget, !working && (title_ok || queue_count));
+       if (working)
+       {
+               gtk_widget_hide (widget);
+               widget = GHB_WIDGET (ud->builder, "queue_stop1");
+               gtk_widget_show (widget);
+       }
+       else
+       {
+               widget = GHB_WIDGET (ud->builder, "queue_stop1");
+               gtk_widget_hide (widget);
+               widget = GHB_WIDGET (ud->builder, "queue_start1");
+               gtk_widget_show (widget);
+       }
        widget = GHB_WIDGET (ud->builder, "queue_start2");
        gtk_widget_set_sensitive (widget, !working && (title_ok || queue_count));
        action = GHB_ACTION (ud->builder, "queue_start_menu");