mirror of https://gitlab.com/cppit/jucipp
4 changed files with 45 additions and 40 deletions
@ -1,32 +1,32 @@
|
||||
#include "dialogs.h" |
||||
|
||||
std::string Dialog::open_folder() { |
||||
return gtk_dialog("Open Folder", |
||||
std::string Dialog::open_folder(const boost::filesystem::path &path) { |
||||
return gtk_dialog(path, "Open Folder", |
||||
{std::make_pair("Cancel", Gtk::RESPONSE_CANCEL),std::make_pair("Open", Gtk::RESPONSE_OK)}, |
||||
Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); |
||||
} |
||||
|
||||
std::string Dialog::new_file() { |
||||
return gtk_dialog("New File", |
||||
std::string Dialog::new_file(const boost::filesystem::path &path) { |
||||
return gtk_dialog(path, "New File", |
||||
{std::make_pair("Cancel", Gtk::RESPONSE_CANCEL), std::make_pair("Save", Gtk::RESPONSE_OK)}, |
||||
Gtk::FILE_CHOOSER_ACTION_SAVE); |
||||
} |
||||
|
||||
std::string Dialog::new_folder() { |
||||
return gtk_dialog("New Folder", |
||||
std::string Dialog::new_folder(const boost::filesystem::path &path) { |
||||
return gtk_dialog(path, "New Folder", |
||||
{std::make_pair("Cancel", Gtk::RESPONSE_CANCEL),std::make_pair("Create", Gtk::RESPONSE_OK)}, |
||||
Gtk::FILE_CHOOSER_ACTION_CREATE_FOLDER); |
||||
} |
||||
|
||||
std::string Dialog::open_file() { |
||||
return gtk_dialog("Open File", |
||||
std::string Dialog::open_file(const boost::filesystem::path &path) { |
||||
return gtk_dialog(path, "Open File", |
||||
{std::make_pair("Cancel", Gtk::RESPONSE_CANCEL),std::make_pair("Select", Gtk::RESPONSE_OK)}, |
||||
Gtk::FILE_CHOOSER_ACTION_OPEN); |
||||
} |
||||
|
||||
std::string Dialog::save_file_as(const boost::filesystem::path &file_path) { |
||||
return gtk_dialog("Save File As", |
||||
std::string Dialog::save_file_as(const boost::filesystem::path &path) { |
||||
return gtk_dialog(path, "Save File As", |
||||
{std::make_pair("Cancel", Gtk::RESPONSE_CANCEL),std::make_pair("Save", Gtk::RESPONSE_OK)}, |
||||
Gtk::FILE_CHOOSER_ACTION_SAVE, file_path.string()); |
||||
Gtk::FILE_CHOOSER_ACTION_SAVE); |
||||
} |
||||
|
||||
|
||||
Loading…
Reference in new issue