X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=gtk%2Fsrc%2Fqueuehandler.c;h=d47a2aa66b64240d656ed50d234a01d8847eb4de;hb=722be02e829ad969250d1604e57ec8b9846dc060;hp=1ac36ca899a9c45622612458ddaa7f8f21a7f144;hpb=e2cd98f3e71232b518b7165705d25d965ab9d9f3;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index 1ac36ca8..d47a2aa6 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -406,15 +406,61 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) } track = ghb_settings_get_string(asettings, "AudioTrackDescription"); mix = ghb_settings_combo_option(asettings, "AudioMixdown"); + if (count == 1) + g_string_append_printf(str, "Audio:"); + else if (ii == 0) + g_string_append_printf(str, "Audio:\n"); + if (count != 1) + g_string_append_printf(str, "\t"); + g_string_append_printf(str, - "Audio: %s, Encoder: %s, Mixdown: %s, SampleRate: %s, Bitrate: %s", + " %s, Encoder: %s, Mixdown: %s, SampleRate: %s, Bitrate: %s\n", track, acodec, mix, samplerate, bitrate); - if (ii < count-1) - g_string_append_printf(str, "\n"); g_free(track); g_free(bitrate); g_free(samplerate); } + + // Add the audios + const GValue *sub_list; + + sub_list = ghb_settings_get_value(settings, "subtitle_list"); + count = ghb_array_len(sub_list); + for (ii = 0; ii < count; ii++) + { + GValue *settings; + gchar *track; + gboolean force, burn, def; + gint source; + + settings = ghb_array_get_nth(sub_list, ii); + track = ghb_settings_get_string(settings, "SubtitleTrackDescription"); + source = ghb_settings_get_int(settings, "SubtitleSource"); + force = ghb_settings_get_boolean(settings, "SubtitleForced"); + burn = ghb_settings_get_boolean(settings, "SubtitleBurned"); + def = ghb_settings_get_boolean(settings, "SubtitleDefaultTrack"); + if (count == 1) + g_string_append_printf(str, "Subtitle:"); + else if (ii == 0) + g_string_append_printf(str, "Subtitles:\n"); + if (count != 1) + g_string_append_printf(str, "\t"); + + if (source != SRTSUB) + { + g_string_append_printf(str, + " %s%s%s%s", + track, + force ? " (Force)":"", + burn ? " (Burn)":"", + def ? " (Default)":"" + ); + } + if (ii < count-1) + g_string_append_printf(str, "\n"); + g_free(track); + } + info = g_string_free(str, FALSE); gtk_tree_store_append(store, &citer, &iter); gtk_tree_store_set(store, &citer, 1, info, -1); @@ -465,7 +511,7 @@ audio_list_refresh(signal_user_data_t *ud) s_sr = ghb_settings_get_string(asettings, "AudioSamplerate"); s_mix = ghb_settings_get_string(asettings, "AudioMixdown"); s_drc = ghb_settings_get_double(asettings, "AudioTrackDRCSlider"); - if (s_drc < 0.1) + if (s_drc < 1.0) drc = g_strdup("Off"); else drc = g_strdup_printf("%.1f", s_drc); @@ -550,6 +596,8 @@ validate_settings(signal_user_data_t *ud) g_free(destdir); return FALSE; } +#if !defined(_WIN32) + // This doesn't work properly on windows if (g_access(destdir, R_OK|W_OK) != 0) { message = g_strdup_printf( @@ -562,6 +610,7 @@ validate_settings(signal_user_data_t *ud) g_free(destdir); return FALSE; } +#endif GFile *gfile; GFileInfo *info; guint64 size; @@ -625,6 +674,11 @@ validate_settings(signal_user_data_t *ud) { return FALSE; } + // Validate audio settings + if (!ghb_validate_subtitles(ud)) + { + return FALSE; + } // Validate video settings if (!ghb_validate_video(ud)) { @@ -653,11 +707,6 @@ queue_add(signal_user_data_t *ud) return FALSE; } - GtkStatusIcon *si; - - si = GTK_STATUS_ICON(GHB_OBJECT(ud->builder, "hb_status")); - gtk_status_icon_set_from_icon_name(si, "hb-status"); - if (ud->queue == NULL) ud->queue = ghb_array_value_new(32); // Make a copy of current settings to be used for the new job