|
|
|
@ -3,6 +3,9 @@ |
|
|
|
#include "singletons.h" |
|
|
|
#include "singletons.h" |
|
|
|
#include <cmath> |
|
|
|
#include <cmath> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <iostream> |
|
|
|
|
|
|
|
using namespace std; |
|
|
|
|
|
|
|
|
|
|
|
namespace sigc { |
|
|
|
namespace sigc { |
|
|
|
#ifndef SIGC_FUNCTORS_DEDUCE_RESULT_TYPE_WITH_DECLTYPE |
|
|
|
#ifndef SIGC_FUNCTORS_DEDUCE_RESULT_TYPE_WITH_DECLTYPE |
|
|
|
template <typename Functor> |
|
|
|
template <typename Functor> |
|
|
|
@ -42,9 +45,11 @@ std::string Dialog::gtk_dialog(const std::string &title, |
|
|
|
dialog.set_transient_for(*application->window); |
|
|
|
dialog.set_transient_for(*application->window); |
|
|
|
|
|
|
|
|
|
|
|
auto current_path=application->window->notebook.get_current_folder(); |
|
|
|
auto current_path=application->window->notebook.get_current_folder(); |
|
|
|
|
|
|
|
boost::system::error_code ec; |
|
|
|
if(current_path.empty()) |
|
|
|
if(current_path.empty()) |
|
|
|
current_path=boost::filesystem::current_path(); |
|
|
|
current_path=boost::filesystem::current_path(ec); |
|
|
|
gtk_file_chooser_set_current_folder((GtkFileChooser*)dialog.gobj(), current_path.string().c_str()); |
|
|
|
if(!ec) |
|
|
|
|
|
|
|
gtk_file_chooser_set_current_folder((GtkFileChooser*)dialog.gobj(), current_path.string().c_str()); |
|
|
|
|
|
|
|
|
|
|
|
if (!file_name.empty()) |
|
|
|
if (!file_name.empty()) |
|
|
|
gtk_file_chooser_set_filename((GtkFileChooser*)dialog.gobj(), file_name.c_str()); |
|
|
|
gtk_file_chooser_set_filename((GtkFileChooser*)dialog.gobj(), file_name.c_str()); |
|
|
|
|