forked from AuroraMiddleware/gtk
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)
This commit is contained in:
parent
07d2dd1700
commit
f291474c50
@ -1,3 +1,9 @@
|
||||
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:
|
||||
|
@ -1,3 +1,9 @@
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user