| 2141 | } |
| 2142 | |
| 2143 | G_MODULE_EXPORT void |
| 2144 | queue_open_source_action_cb (GSimpleAction *action, GVariant *param, |
| 2145 | signal_user_data_t *ud) |
| 2146 | { |
| 2147 | GtkListBox * lb; |
| 2148 | GtkListBoxRow * row; |
| 2149 | gint index; |
| 2150 | GhbValue * queueDict, * titleDict; |
| 2151 | const char * path; |
| 2152 | |
| 2153 | lb = GTK_LIST_BOX(ghb_builder_widget("queue_list")); |
| 2154 | row = gtk_list_box_get_selected_row(lb); |
| 2155 | if (row != NULL) |
| 2156 | { |
| 2157 | index = gtk_list_box_row_get_index(row); |
| 2158 | if (index < 0 || index >= ghb_array_len(ud->queue)) |
| 2159 | { |
| 2160 | return; |
| 2161 | } |
| 2162 | queueDict = ghb_array_get(ud->queue, index); |
| 2163 | titleDict = ghb_dict_get(queueDict, "Title"); |
| 2164 | path = ghb_dict_get_string(titleDict, "Path"); |
| 2165 | g_autoptr(GFile) file = g_file_new_for_path(path); |
| 2166 | ghb_file_open_containing_folder(file); |
| 2167 | } |
| 2168 | } |
| 2169 | |
| 2170 | G_MODULE_EXPORT void |
| 2171 | queue_open_dest_action_cb (GSimpleAction *action, GVariant *param, |
nothing calls this directly
no test coverage detected