forked from AuroraMiddleware/gtk
Load the file chooser's widgets from the .ui file
This is Tristan's *excellent* work, minus the old code for the shortcuts bar - that is all done in GtkPlacesSidebar now. The UI gets loaded from a Glade resource; most of the old code to create the UI by hand is gone. There is still code for save_widgets_create(); this needs to be moved into the UI file, but it is not a big deal. gtk_file_chooser_default_init() calls a new post_process_ui() that takes care of all the things that cannot be done directly in Glade.
This commit is contained in:
parent
1d946367d3
commit
a6f9ef0d3a
@ -1110,6 +1110,7 @@ COMPOSITE_TEMPLATES = \
|
||||
gtkcoloreditor.ui \
|
||||
gtkdialog.ui \
|
||||
gtkfilechooserbutton.ui \
|
||||
gtkfilechooserdefault.ui \
|
||||
gtkfilechooserdialog.ui \
|
||||
gtkfontbutton.ui \
|
||||
gtkfontchooserdialog.ui \
|
||||
|
@ -19,6 +19,7 @@
|
||||
<file compressed="true">gtkcoloreditor.ui</file>
|
||||
<file compressed="true">gtkdialog.ui</file>
|
||||
<file compressed="true">gtkfilechooserbutton.ui</file>
|
||||
<file compressed="true">gtkfilechooserdefault.ui</file>
|
||||
<file compressed="true">gtkfilechooserdialog.ui</file>
|
||||
<file compressed="true">gtkfontbutton.ui</file>
|
||||
<file compressed="true">gtkfontchooserdialog.ui</file>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -37,6 +37,9 @@ test_dialog_basic (void)
|
||||
|
||||
dialog = gtk_dialog_new();
|
||||
g_assert (GTK_IS_DIALOG (dialog));
|
||||
g_assert (gtk_dialog_get_action_area (GTK_DIALOG (dialog)) != NULL);
|
||||
g_assert (gtk_dialog_get_content_area (GTK_DIALOG (dialog)) != NULL);
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
@ -158,6 +161,13 @@ test_app_chooser_dialog_basic (void)
|
||||
|
||||
widget = gtk_app_chooser_dialog_new_for_content_type (NULL, 0, "text/plain");
|
||||
g_assert (GTK_IS_APP_CHOOSER_DIALOG (widget));
|
||||
|
||||
/* GtkAppChooserDialog bug, if destroyed before spinning
|
||||
* the main context then app_chooser_online_get_default_ready_cb()
|
||||
* will be eventually called and segfault.
|
||||
*/
|
||||
g_timeout_add (500, main_loop_quit_cb, NULL);
|
||||
gtk_main();
|
||||
gtk_widget_destroy (widget);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user