MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / ghb_file_button_clicked

Function ghb_file_button_clicked

gtk/src/ghb-file-button.c:342–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342static void
343ghb_file_button_clicked (GtkButton *button)
344{
345 GtkWindow *window;
346 GtkFileChooser *chooser;
347 GhbFileButton *self = GHB_FILE_BUTTON(button);
348
349 g_return_if_fail(GHB_IS_FILE_BUTTON(self));
350
351 window = GTK_WINDOW(gtk_widget_get_root(GTK_WIDGET(self)));
352 chooser = ghb_file_chooser_new(ghb_file_button_get_title(self), window,
353 ghb_file_button_get_action(self),
354 ghb_file_button_get_accept_label(self),
355 _("_Cancel"));
356 g_autofree char *selected_name = ghb_file_button_get_filename(self);
357 ghb_file_chooser_set_initial_file(chooser, selected_name);
358
359 g_signal_connect(chooser, "response", G_CALLBACK(chooser_response_cb), self);
360
361 ghb_file_chooser_set_modal(chooser, GTK_IS_WINDOW(window));
362 ghb_file_chooser_show(chooser);
363}

Callers

nothing calls this directly

Tested by

no test coverage detected