| 2079 | GhbValue *ghb_queue_edit_settings = NULL; |
| 2080 | |
| 2081 | G_MODULE_EXPORT void |
| 2082 | queue_edit_action_cb (GSimpleAction *action, GVariant *param, |
| 2083 | signal_user_data_t *ud) |
| 2084 | { |
| 2085 | GtkListBox * lb; |
| 2086 | GtkListBoxRow * row; |
| 2087 | gint index, status; |
| 2088 | GhbValue * queueDict, *uiDict; |
| 2089 | |
| 2090 | lb = GTK_LIST_BOX(ghb_builder_widget("queue_list")); |
| 2091 | row = gtk_list_box_get_selected_row(lb); |
| 2092 | if (row != NULL) |
| 2093 | { |
| 2094 | index = gtk_list_box_row_get_index(row); |
| 2095 | if (index < 0 || index >= ghb_array_len(ud->queue)) |
| 2096 | return; |
| 2097 | |
| 2098 | queueDict = ghb_array_get(ud->queue, index); |
| 2099 | uiDict = ghb_dict_get(queueDict, "uiSettings"); |
| 2100 | ghb_queue_edit_settings = ghb_value_dup(uiDict); |
| 2101 | ghb_dict_set(ghb_queue_edit_settings, |
| 2102 | "Job", ghb_value_dup(ghb_dict_get(queueDict, "Job"))); |
| 2103 | ghb_dict_set(ghb_queue_edit_settings, |
| 2104 | "Title", ghb_value_dup(ghb_dict_get(queueDict, "Title"))); |
| 2105 | status = ghb_dict_get_int(uiDict, "job_status"); |
| 2106 | if (status == GHB_QUEUE_PENDING) |
| 2107 | { |
| 2108 | // Remove the selected item |
| 2109 | gtk_list_box_remove(lb, GTK_WIDGET(row)); |
| 2110 | // Remove the corresponding item from the queue list |
| 2111 | ghb_array_remove(ud->queue, index); |
| 2112 | ghb_update_pending(ud); |
| 2113 | } |
| 2114 | const gchar *source; |
| 2115 | source = ghb_dict_get_string(ghb_queue_edit_settings, "source"); |
| 2116 | ghb_do_scan(ud, source, 0, FALSE); |
| 2117 | |
| 2118 | GtkWidget *widget = ghb_builder_widget("hb_window"); |
| 2119 | gtk_window_present(GTK_WINDOW(widget)); |
| 2120 | } |
| 2121 | } |
| 2122 | |
| 2123 | G_MODULE_EXPORT void |
| 2124 | queue_export_action_cb (GSimpleAction *action, GVariant *param, |
nothing calls this directly
no test coverage detected