summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5f49242)
raw | patch | inline | side by side (parent: 5f49242)
author | rwst <rwst@users.sourceforge.net> | |
Sat, 8 Jul 2006 17:23:28 +0000 (17:23 +0000) | ||
committer | rwst <rwst@users.sourceforge.net> | |
Sat, 8 Jul 2006 17:23:28 +0000 (17:23 +0000) |
src/dialogs/filedialog.cpp | patch | blob | history |
index fb6e599a8e25745e4a38a23a0ba8f2dbcab2205d..6bc56357d897b0169c29163dbf8ec7666bf211fd 100644 (file)
#include <gtk/gtkentry.h>
#include <gtk/gtkexpander.h>
+#include <unistd.h>
#include <sys/stat.h>
#include <glibmm/i18n.h>
#include <gtkmm/box.h>
-
/**
* Show this dialog modally. Return true if user hits [OK]
*/
bool
FileSaveDialogImpl::show()
{
- set_current_folder(get_current_folder()); //hack to force initial dir listing
+ Glib::ustring s = Glib::filename_to_utf8 (get_current_folder());
+ if (s.length() == 0)
+ s = getcwd (NULL, 0);
+ set_current_folder(Glib::filename_from_utf8(s)); //hack to force initial dir listing
set_modal (TRUE); //Window
sp_transientize((GtkWidget *)gobj()); //Make transient
gint b = run(); //Dialog