mirror of https://gitlab.com/cppit/jucipp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.4 KiB
32 lines
1.4 KiB
|
6 years ago
|
#include "dialogs.hpp"
|
||
|
10 years ago
|
|
||
|
10 years ago
|
std::string Dialog::open_folder(const boost::filesystem::path &path) {
|
||
|
|
return gtk_dialog(path, "Open Folder",
|
||
|
8 years ago
|
{std::make_pair("Cancel", Gtk::RESPONSE_CANCEL), std::make_pair("Open", Gtk::RESPONSE_OK)},
|
||
|
|
Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||
|
10 years ago
|
}
|
||
|
|
|
||
|
10 years ago
|
std::string Dialog::new_file(const boost::filesystem::path &path) {
|
||
|
|
return gtk_dialog(path, "New File",
|
||
|
8 years ago
|
{std::make_pair("Cancel", Gtk::RESPONSE_CANCEL), std::make_pair("Save", Gtk::RESPONSE_OK)},
|
||
|
|
Gtk::FILE_CHOOSER_ACTION_SAVE);
|
||
|
10 years ago
|
}
|
||
|
|
|
||
|
10 years ago
|
std::string Dialog::new_folder(const boost::filesystem::path &path) {
|
||
|
|
return gtk_dialog(path, "New Folder",
|
||
|
8 years ago
|
{std::make_pair("Cancel", Gtk::RESPONSE_CANCEL), std::make_pair("Create", Gtk::RESPONSE_OK)},
|
||
|
|
Gtk::FILE_CHOOSER_ACTION_CREATE_FOLDER);
|
||
|
10 years ago
|
}
|
||
|
|
|
||
|
10 years ago
|
std::string Dialog::open_file(const boost::filesystem::path &path) {
|
||
|
|
return gtk_dialog(path, "Open File",
|
||
|
8 years ago
|
{std::make_pair("Cancel", Gtk::RESPONSE_CANCEL), std::make_pair("Select", Gtk::RESPONSE_OK)},
|
||
|
|
Gtk::FILE_CHOOSER_ACTION_OPEN);
|
||
|
10 years ago
|
}
|
||
|
|
|
||
|
10 years ago
|
std::string Dialog::save_file_as(const boost::filesystem::path &path) {
|
||
|
|
return gtk_dialog(path, "Save File As",
|
||
|
8 years ago
|
{std::make_pair("Cancel", Gtk::RESPONSE_CANCEL), std::make_pair("Save", Gtk::RESPONSE_OK)},
|
||
|
|
Gtk::FILE_CHOOSER_ACTION_SAVE);
|
||
|
10 years ago
|
}
|