]> Pileus Git - ~andy/gtk/blobdiff - tests/testappchooserbutton.c
stylecontext: Do invalidation on first resize container
[~andy/gtk] / tests / testappchooserbutton.c
index 751604bd352f3c4994d85135c146bb9d52003a87..c4b2872a97eaf06e7ea1976459c46f86d0194db6 100644 (file)
  * Library General Public License for more details.
  *
  * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
+#include "config.h"
 
+#include <stdlib.h>
 #include <gtk/gtk.h>
 
 #define CUSTOM_ITEM "custom-item"
@@ -69,7 +68,6 @@ main (int argc,
 {
   GtkWidget *w;
 
-  g_type_init ();
   gtk_init (&argc, &argv);
 
   toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -96,6 +94,7 @@ main (int argc,
   sel_name = gtk_label_new (NULL);
   gtk_box_pack_start (GTK_BOX (w), sel_name, TRUE, TRUE, 0);
 
+  gtk_app_chooser_button_set_heading (GTK_APP_CHOOSER_BUTTON (combobox), "Choose one, <i>not</i> two");
   gtk_app_chooser_button_append_separator (GTK_APP_CHOOSER_BUTTON (combobox));
   gtk_app_chooser_button_append_custom_item (GTK_APP_CHOOSER_BUTTON (combobox),
                                              CUSTOM_ITEM,
@@ -110,6 +109,8 @@ main (int argc,
 
   gtk_app_chooser_button_set_show_dialog_item (GTK_APP_CHOOSER_BUTTON (combobox),
                                                TRUE);
+  gtk_app_chooser_button_set_show_default_item (GTK_APP_CHOOSER_BUTTON (combobox),
+                                                TRUE);
 
   /* connect to the detailed signal */
   g_signal_connect (combobox, "custom-item-activated::" CUSTOM_ITEM,
@@ -122,6 +123,10 @@ main (int argc,
   /* test refresh on a combo */
   gtk_app_chooser_refresh (GTK_APP_CHOOSER (combobox));
 
+#if 0
+  gtk_app_chooser_button_set_active_custom_item (GTK_APP_CHOOSER_BUTTON (combobox),
+                                                 CUSTOM_ITEM);
+#endif
   gtk_widget_show_all (toplevel);
 
   g_signal_connect (toplevel, "delete-event",