-bool
-App::dialog_saveas_file(const std::string &title, std::string &filename)
-{
-#if USE_WIN32_FILE_DIALOGS
- static TCHAR szFilter[] = TEXT ("All Files (*.*)\0*.*\0\0") ;
-
- GdkWindow *gdkWinPtr=toolbox->get_window()->gobj();
- HINSTANCE hInstance=static_cast<HINSTANCE>(GetModuleHandle(NULL));
- HWND hWnd=static_cast<HWND>(GDK_WINDOW_HWND(gdkWinPtr));
-
- ofn.lStructSize=sizeof(OPENFILENAME);
- ofn.hwndOwner = hWnd;
- ofn.hInstance = hInstance;
- ofn.lpstrFilter = szFilter;
-// ofn.lpstrCustomFilter=NULL;
-// ofn.nMaxCustFilter=0;
-// ofn.nFilterIndex=0;
-// ofn.lpstrFile=NULL;
- ofn.nMaxFile=MAX_PATH;
-// ofn.lpstrFileTitle=NULL;
-// ofn.lpstrInitialDir=NULL;
-// ofn.lpstrTitle=NULL;
- ofn.Flags=OFN_OVERWRITEPROMPT;
-// ofn.nFileOffset=0;
-// ofn.nFileExtension=0;
- ofn.lpstrDefExt=TEXT("sif");
-// ofn.lCustData = 0l;
- ofn.lpfnHook=NULL;
-// ofn.lpTemplateName=NULL;
-
- CHAR szFilename[MAX_PATH];
- CHAR szTitle[500];
- strcpy(szFilename,filename.c_str());
- strcpy(szTitle,title.c_str());
-
- ofn.lpstrFile=szFilename;
- ofn.lpstrFileTitle=szTitle;
-
- if(GetSaveFileName(&ofn))
+ Gtk::FileChooserDialog *dialog=new Gtk::FileChooserDialog(title,Gtk::FILE_CHOOSER_ACTION_SAVE);
+ dialog->set_current_folder(prev_path);
+ dialog->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
+ dialog->add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
+ if(!filename.empty())