| 76 | } |
| 77 | |
| 78 | static void |
| 79 | subtitle_refresh_list_row_ui( |
| 80 | GtkTreeModel *tm, |
| 81 | GtkTreeIter *ti, |
| 82 | GhbValue *settings, |
| 83 | GhbValue *subsettings) |
| 84 | { |
| 85 | GtkTreeIter cti; |
| 86 | gboolean forced, burned, def; |
| 87 | char *info_src, *info_src_2; |
| 88 | char *info_dst, *info_dst_2; |
| 89 | char *desc; |
| 90 | |
| 91 | |
| 92 | info_src_2 = NULL; |
| 93 | info_dst_2 = NULL; |
| 94 | |
| 95 | forced = ghb_dict_get_bool(subsettings, "Forced"); |
| 96 | burned = ghb_dict_get_bool(subsettings, "Burn"); |
| 97 | def = ghb_dict_get_bool(subsettings, "Default"); |
| 98 | desc = subtitle_get_track_description(settings, subsettings); |
| 99 | info_src = g_strdup_printf("<small>%s</small>", desc); |
| 100 | g_free(desc); |
| 101 | if (ghb_dict_get(subsettings, "Import") != NULL) |
| 102 | { |
| 103 | gint offset; |
| 104 | offset = ghb_dict_get_int(subsettings, "Offset"); |
| 105 | if (offset != 0) |
| 106 | { |
| 107 | info_dst_2 = g_strdup_printf(_("Offset: %dms"), offset); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | GString *str = g_string_new("<small>"); |
| 112 | g_string_append(str, burned ? _("Burned Into Video") : |
| 113 | _("Passthru")); |
| 114 | if (forced) |
| 115 | { |
| 116 | g_string_append_printf(str, " (%s)", _("Forced Subtitles Only")); |
| 117 | } |
| 118 | if (def) |
| 119 | { |
| 120 | g_string_append_printf(str, " (%s)", _("Default")); |
| 121 | } |
| 122 | g_string_append_printf(str, "</small>"); |
| 123 | |
| 124 | info_dst = g_string_free(str, FALSE); |
| 125 | |
| 126 | gtk_tree_store_set(GTK_TREE_STORE(tm), ti, |
| 127 | // These are displayed in list |
| 128 | 0, info_src, |
| 129 | 1, "-->", |
| 130 | 2, info_dst, |
| 131 | 3, "document-edit-symbolic", |
| 132 | 4, "edit-delete-symbolic", |
| 133 | 5, 0.5, |
| 134 | -1); |
| 135 |
no test coverage detected