summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-08-17 16:52:04 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-08-17 16:52:04 +0000
commit3cc0ae605a10eb7f24bc6083e2388a7103a4aeb4 (patch)
treec97221243a374b99360cbbe4b16a02c6ac5de661 /tests
parent3a76d4848baabbd396fdc10358cab7b32ec23ebd (diff)
downloadgdk-pixbuf-3cc0ae605a10eb7f24bc6083e2388a7103a4aeb4.tar.gz
Use g_message() throughout, add RTL envar for rtl testing.
2004-08-17 Matthias Clasen <mclasen@redhat.com> * tests/testfilechooserbutton.c: Use g_message() throughout, add RTL envar for rtl testing. * gtk/gtkfilechooserbutton.c: Get rid of HAVE_CONFIG_H. (gtk_file_chooser_button_init): Use gtk_drag_dest_add_text_targets(). (gtk_file_chooser_button_drag_data_received): Use gtk_selection_data_get_text(). (gtk_file_chooser_button_set_dialog): _gtk_file_chooser_entry_set_base_folder() seems to expect a path, not an uri. (update_dialog): Handle g_filename_from_uri() returning NULL, don't free info if it is NULL. * gtk/gtkfilechooserbutton.h: Minor stylistic changes.
Diffstat (limited to 'tests')
-rw-r--r--tests/testfilechooserbutton.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/testfilechooserbutton.c b/tests/testfilechooserbutton.c
index 9635e04a1..21ae38dff 100644
--- a/tests/testfilechooserbutton.c
+++ b/tests/testfilechooserbutton.c
@@ -68,7 +68,7 @@ chooser_selection_changed_cb (GtkFileChooser *chooser, gpointer user_data)
{
GSList *selection;
- g_warning ("%s:%s:\n`%s` Selection:", G_STRFUNC, G_STRLOC, G_OBJECT_TYPE_NAME (chooser));
+ g_message ("%s:%s:\n`%s` Selection:", G_STRFUNC, G_STRLOC, G_OBJECT_TYPE_NAME (chooser));
for (selection = gtk_file_chooser_get_filenames (chooser); selection != NULL;
selection = g_slist_remove_link (selection, selection))
{
@@ -86,7 +86,7 @@ chooser_file_activated_cb (GtkFileChooser *chooser, gpointer user_data)
folder = gtk_file_chooser_get_current_folder (chooser);
filename = gtk_file_chooser_get_filename (chooser);
- g_warning ("%s:%s:\n`%s`\nFolder: `%s'\nFilename: `%s'", G_STRFUNC, G_STRLOC, G_OBJECT_TYPE_NAME (chooser), folder, filename);
+ g_message ("%s:%s:\n`%s`\nFolder: `%s'\nFilename: `%s'", G_STRFUNC, G_STRLOC, G_OBJECT_TYPE_NAME (chooser), folder, filename);
g_free (folder);
g_free (filename);
}
@@ -98,7 +98,7 @@ chooser_update_preview_cb (GtkFileChooser *chooser, gpointer user_data)
gchar *filename;
filename = gtk_file_chooser_get_preview_filename (chooser);
- g_warning ("%s:%s:\n`%s`\nPreview Filename: `%s'", G_STRFUNC, G_STRLOC, G_OBJECT_TYPE_NAME (chooser), filename);
+ g_message ("%s:%s:\n`%s`\nPreview Filename: `%s'", G_STRFUNC, G_STRLOC, G_OBJECT_TYPE_NAME (chooser), filename);
g_free (filename);
}
@@ -111,6 +111,10 @@ main (int argc, char *argv[])
gtk_init (&argc, &argv);
+ /* to test rtl layout, set RTL=1 in the environment */
+ if (g_getenv ("RTL"))
+ gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
+
win = gtk_dialog_new_with_buttons ("TestFileChooserButton", NULL, GTK_DIALOG_NO_SEPARATOR,
GTK_STOCK_QUIT, GTK_RESPONSE_CLOSE, NULL);
g_signal_connect (win, "style-set", G_CALLBACK (win_style_set_cb), NULL);