summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-03-02 21:55:01 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-03-02 21:55:01 +0000
commitce52e0776ee98cfed42e565ca2a006bff5a1ce88 (patch)
treefedcc596a27e68f90e7721858084b2ad52a96bee
parentd0f6b4819900f9af5e74cf7b55962d96e8645c2d (diff)
downloadgtk+-ce52e0776ee98cfed42e565ca2a006bff5a1ce88.tar.gz
Move the /nonexistant stuff out of the main window, keep the main window
Tue Mar 2 16:47:40 2004 Owen Taylor <otaylor@redhat.com> * tests/testfilechooser.c (set_filename_existing_nonexistent_cb): Move the /nonexistant stuff out of the main window, keep the main window somewhat normal looking.
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-46
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--tests/testfilechooser.c65
6 files changed, 58 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog
index 71d57be9bc..50de61757a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Mar 2 16:47:40 2004 Owen Taylor <otaylor@redhat.com>
+
+ * tests/testfilechooser.c (set_filename_existing_nonexistent_cb):
+ Move the /nonexistant stuff out of the main window,
+ keep the main window somewhat normal looking.
+
Tue Mar 2 16:18:43 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_reorder)
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 71d57be9bc..50de61757a 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+Tue Mar 2 16:47:40 2004 Owen Taylor <otaylor@redhat.com>
+
+ * tests/testfilechooser.c (set_filename_existing_nonexistent_cb):
+ Move the /nonexistant stuff out of the main window,
+ keep the main window somewhat normal looking.
+
Tue Mar 2 16:18:43 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_reorder)
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 71d57be9bc..50de61757a 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,9 @@
+Tue Mar 2 16:47:40 2004 Owen Taylor <otaylor@redhat.com>
+
+ * tests/testfilechooser.c (set_filename_existing_nonexistent_cb):
+ Move the /nonexistant stuff out of the main window,
+ keep the main window somewhat normal looking.
+
Tue Mar 2 16:18:43 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_reorder)
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 71d57be9bc..50de61757a 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,9 @@
+Tue Mar 2 16:47:40 2004 Owen Taylor <otaylor@redhat.com>
+
+ * tests/testfilechooser.c (set_filename_existing_nonexistent_cb):
+ Move the /nonexistant stuff out of the main window,
+ keep the main window somewhat normal looking.
+
Tue Mar 2 16:18:43 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_reorder)
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 71d57be9bc..50de61757a 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+Tue Mar 2 16:47:40 2004 Owen Taylor <otaylor@redhat.com>
+
+ * tests/testfilechooser.c (set_filename_existing_nonexistent_cb):
+ Move the /nonexistant stuff out of the main window,
+ keep the main window somewhat normal looking.
+
Tue Mar 2 16:18:43 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_reorder)
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c
index 3cccdc6779..d6f0a1cfb7 100644
--- a/tests/testfilechooser.c
+++ b/tests/testfilechooser.c
@@ -297,65 +297,33 @@ update_preview_cb (GtkFileChooser *chooser)
}
static void
-set_folder_nonexistent_cb (GtkButton *button,
+set_folder_nonexistent_cb (GtkButton *button,
GtkFileChooser *chooser)
{
gtk_file_chooser_set_current_folder (chooser, "/nonexistent");
}
static void
-set_folder_existing_nonexistent_cb (GtkButton *button,
+set_folder_existing_nonexistent_cb (GtkButton *button,
GtkFileChooser *chooser)
{
gtk_file_chooser_set_current_folder (chooser, "/usr/nonexistent");
}
static void
-set_filename_nonexistent_cb (GtkButton *button,
+set_filename_nonexistent_cb (GtkButton *button,
GtkFileChooser *chooser)
{
gtk_file_chooser_set_filename (chooser, "/nonexistent");
}
static void
-set_filename_existing_nonexistent_cb (GtkButton *button,
+set_filename_existing_nonexistent_cb (GtkButton *button,
GtkFileChooser *chooser)
{
gtk_file_chooser_set_filename (chooser, "/usr/nonexistent");
}
-static GtkWidget *
-extra_widget_create (GtkFileChooser *chooser)
-{
- GtkWidget *box;
- GtkWidget *widget;
-
- box = gtk_vbox_new (FALSE, 6);
-
- widget = gtk_button_new_with_label ("set_current_folder (\"/nonexistent\")");
- g_signal_connect (widget, "clicked",
- G_CALLBACK (set_folder_nonexistent_cb), chooser);
- gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
-
- widget = gtk_button_new_with_label ("set_current_folder (\"/usr/nonexistent\"");
- g_signal_connect (widget, "clicked",
- G_CALLBACK (set_folder_existing_nonexistent_cb), chooser);
- gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
-
- widget = gtk_button_new_with_label ("set_filename (\"/nonexistent\"");
- g_signal_connect (widget, "clicked",
- G_CALLBACK (set_filename_nonexistent_cb), chooser);
- gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
-
- widget = gtk_button_new_with_label ("set_filename (\"/usr/nonexistent\"");
- g_signal_connect (widget, "clicked",
- G_CALLBACK (set_filename_existing_nonexistent_cb), chooser);
- gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
-
- gtk_widget_show_all (box);
- return box;
-}
-
int
main (int argc, char **argv)
{
@@ -364,6 +332,7 @@ main (int argc, char **argv)
GtkWidget *button;
GtkWidget *dialog;
GtkWidget *prop_editor;
+ GtkWidget *extra;
GtkFileFilter *filter;
GtkWidget *preview_vbox;
int i;
@@ -457,7 +426,9 @@ main (int argc, char **argv)
/* Extra widget */
- gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), extra_widget_create (GTK_FILE_CHOOSER (dialog)));
+ extra = gtk_check_button_new_with_mnemonic ("Lar_t whoever asks about this button");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (extra), TRUE);
+ gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), extra);
/* Shortcuts */
@@ -487,6 +458,26 @@ main (int argc, char **argv)
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_file_chooser_unselect_all), dialog);
+ button = gtk_button_new_with_label ("set_current_folder (\"/nonexistent\")");
+ gtk_container_add (GTK_CONTAINER (vbbox), button);
+ g_signal_connect (button, "clicked",
+ G_CALLBACK (set_folder_nonexistent_cb), dialog);
+
+ button = gtk_button_new_with_label ("set_current_folder (\"/usr/nonexistent\"");
+ gtk_container_add (GTK_CONTAINER (vbbox), button);
+ g_signal_connect (button, "clicked",
+ G_CALLBACK (set_folder_existing_nonexistent_cb), dialog);
+
+ button = gtk_button_new_with_label ("set_filename (\"/nonexistent\"");
+ gtk_container_add (GTK_CONTAINER (vbbox), button);
+ g_signal_connect (button, "clicked",
+ G_CALLBACK (set_filename_nonexistent_cb), dialog);
+
+ button = gtk_button_new_with_label ("set_filename (\"/usr/nonexistent\"");
+ gtk_container_add (GTK_CONTAINER (vbbox), button);
+ g_signal_connect (button, "clicked",
+ G_CALLBACK (set_filename_existing_nonexistent_cb), dialog);
+
gtk_widget_show_all (control_window);
gtk_main ();