[gtk+/merge-places-sidebar: 192/195] INCOMPLETE COMMIT: re-instate Tristan's patch to gtkfilechooserdefault



commit b7fbed8bc06806b497318e1f6e936fbeb690421f
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Apr 11 20:37:01 2013 -0500

    INCOMPLETE COMMIT: re-instate Tristan's patch to gtkfilechooserdefault

 gtk/Makefile.am       |    1 +
 gtk/gtk.gresource.xml |    1 +
 gtk/tests/templates.c |   10 ++++++++++
 3 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 6d621d3..9df87a0 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -1110,6 +1110,7 @@ COMPOSITE_TEMPLATES =                     \
        gtkcoloreditor.ui               \
        gtkdialog.ui                    \
        gtkfilechooserbutton.ui         \
+       gtkfilechooserdefault.ui        \
        gtkfilechooserdialog.ui         \
        gtkfontbutton.ui                \
        gtkfontchooserdialog.ui         \
diff --git a/gtk/gtk.gresource.xml b/gtk/gtk.gresource.xml
index 22b424a..b93d837 100644
--- a/gtk/gtk.gresource.xml
+++ b/gtk/gtk.gresource.xml
@@ -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>
diff --git a/gtk/tests/templates.c b/gtk/tests/templates.c
index 0e526c0..32c1e68 100644
--- a/gtk/tests/templates.c
+++ b/gtk/tests/templates.c
@@ -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);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]