X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=gtk%2Fsrc%2Fqueuehandler.c;h=7be812b708941c1b90b0bcf6c1f98f7cb65ec939;hb=0884cb45aeeb60a46effe1d1056a61fe68300ea7;hp=24eded5d69db80ce190d2a656a1a1106cb5c174b;hpb=52d2419a149fd0ccf4f0baddd2b17dbc1c516fb0;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index 24eded5d..7be812b7 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -94,7 +94,7 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) vqtype = ghb_settings_get_boolean(settings, "vquality_type_constant"); if (!vqtype) pass2 = ghb_settings_get_boolean(settings, "VideoTwoPass"); - const gchar *points; + const gchar *points = "Chapters"; if (ghb_settings_combo_int(settings, "PtoPType") == 0) points = "Chapters"; else if (ghb_settings_combo_int(settings, "PtoPType") == 1) @@ -1259,13 +1259,20 @@ ghb_reload_queue(signal_user_data_t *ud) GValue *queue; gint unfinished = 0; gint count, ii; + gint pid; gint status; GValue *settings; gchar *message; g_debug("ghb_reload_queue"); - queue = ghb_load_queue(); +find_pid: + pid = ghb_find_pid_file(); + if (pid < 0) + return FALSE; + + queue = ghb_load_old_queue(pid); + ghb_remove_old_queue_file(pid); // Look for unfinished entries count = ghb_array_len(queue); for (ii = 0; ii < count; ii++) @@ -1277,6 +1284,9 @@ ghb_reload_queue(signal_user_data_t *ud) unfinished++; } } + if (!unfinished) + goto find_pid; + if (unfinished) { message = g_strdup_printf( @@ -1314,11 +1324,11 @@ ghb_reload_queue(signal_user_data_t *ud) add_to_queue_list(ud, settings, NULL); } ghb_queue_buttons_grey(ud); + ghb_save_queue(ud->queue); } else { ghb_value_free(queue); - ghb_remove_queue_file(); } g_free(message); }