Commit f291474c authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson
Browse files

Allow absolute filenames in filename entry. Patch from Yevgen Muntyan

2006-05-23  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkprinteroptionwidget.c (filesave_changed_cb):
	Allow absolute filenames in filename entry.
	Patch from Yevgen Muntyan (#341679)
parent 07d2dd17
2006-05-23 Alexander Larsson <alexl@redhat.com>
* gtk/gtkprinteroptionwidget.c (filesave_changed_cb):
Allow absolute filenames in filename entry.
Patch from Yevgen Muntyan (#341679)
2006-05-23 Alexander Larsson <alexl@redhat.com>
* gtk/gtk.symbols:
......
2006-05-23 Alexander Larsson <alexl@redhat.com>
* gtk/gtkprinteroptionwidget.c (filesave_changed_cb):
Allow absolute filenames in filename entry.
Patch from Yevgen Muntyan (#341679)
2006-05-23 Alexander Larsson <alexl@redhat.com>
* gtk/gtk.symbols:
......
......@@ -420,7 +420,14 @@ filesave_changed_cb (GtkWidget *w,
directory = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (priv->combo));
file = gtk_entry_get_text (GTK_ENTRY (priv->entry));
value = g_build_filename (directory, file, NULL);
if (g_path_is_absolute (file))
value = g_strdup (file);
#ifdef G_OS_UNIX
else if (file[0] == '~' && file[1] == '/')
value = g_build_filename (g_get_home_dir (), file + 2, NULL);
#endif
else
value = g_build_filename (directory, file, NULL);
if (value)
gtk_printer_option_set (priv->source, value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment