| 77 | } |
| 78 | |
| 79 | static void queue_update_summary (GhbValue * queueDict, signal_user_data_t *ud) |
| 80 | { |
| 81 | GString * str; |
| 82 | char * text; |
| 83 | const char * ctext; |
| 84 | const char * sep; |
| 85 | GtkWidget * widget; |
| 86 | GhbValue * uiDict = NULL; |
| 87 | GhbValue * jobDict = NULL; |
| 88 | GhbValue * sourceDict = NULL; |
| 89 | GhbValue * rangeDict = NULL; |
| 90 | GhbValue * titleDict = NULL; |
| 91 | |
| 92 | if (queueDict != NULL) |
| 93 | { |
| 94 | uiDict = ghb_dict_get(queueDict, "uiSettings"); |
| 95 | jobDict = ghb_dict_get(queueDict, "Job"); |
| 96 | titleDict = ghb_dict_get(queueDict, "Title"); |
| 97 | } |
| 98 | if (titleDict == NULL) |
| 99 | { |
| 100 | // No title, clear summary |
| 101 | widget = ghb_builder_widget("queue_summary_preset"); |
| 102 | gtk_label_set_text(GTK_LABEL(widget), ""); |
| 103 | widget = ghb_builder_widget("queue_summary_source"); |
| 104 | gtk_label_set_text(GTK_LABEL(widget), ""); |
| 105 | widget = ghb_builder_widget("queue_summary_dest"); |
| 106 | gtk_label_set_text(GTK_LABEL(widget), ""); |
| 107 | widget = ghb_builder_widget("queue_summary_dimensions"); |
| 108 | gtk_label_set_text(GTK_LABEL(widget), ""); |
| 109 | widget = ghb_builder_widget("queue_summary_video"); |
| 110 | gtk_label_set_text(GTK_LABEL(widget), ""); |
| 111 | widget = ghb_builder_widget("queue_summary_audio"); |
| 112 | gtk_label_set_text(GTK_LABEL(widget), ""); |
| 113 | widget = ghb_builder_widget("queue_summary_subtitle"); |
| 114 | gtk_label_set_text(GTK_LABEL(widget), ""); |
| 115 | return; |
| 116 | } |
| 117 | |
| 118 | // Preset: PresetName |
| 119 | const char * name; |
| 120 | gboolean preset_modified; |
| 121 | |
| 122 | preset_modified = ghb_dict_get_bool(uiDict, "preset_modified"); |
| 123 | name = ghb_dict_get_string(uiDict, "PresetFullName"); |
| 124 | |
| 125 | str = g_string_new(""); |
| 126 | if (preset_modified) |
| 127 | { |
| 128 | g_string_append_printf(str, _("%s (Modified)"), name); |
| 129 | } |
| 130 | else |
| 131 | { |
| 132 | g_string_append_printf(str, "%s", name); |
| 133 | } |
| 134 | |
| 135 | widget = ghb_builder_widget("queue_summary_preset"); |
| 136 | text = g_string_free(str, FALSE); |
no test coverage detected