summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f0671c)
raw | patch | inline | side by side (parent: 2f0671c)
author | joelholdsworth <joelholdsworth@users.sourceforge.net> | |
Wed, 1 Aug 2007 19:39:05 +0000 (19:39 +0000) | ||
committer | joelholdsworth <joelholdsworth@users.sourceforge.net> | |
Wed, 1 Aug 2007 19:39:05 +0000 (19:39 +0000) |
FileDialogBase -> FileDialogBaseGtk
FileOpenDialogImpl -> FileOpenDialogImplGtk
FileSaveDialogImpl -> FileSaveDialogImplGtk
FileExportDialog -> FileExportDialogImpl
FileOpenDialogImpl -> FileOpenDialogImplGtk
FileSaveDialogImpl -> FileSaveDialogImplGtk
FileExportDialog -> FileExportDialogImpl
src/ui/dialog/filedialog.cpp | patch | blob | history | |
src/ui/dialog/filedialogimpl-gtkmm.cpp | patch | blob | history | |
src/ui/dialog/filedialogimpl-gtkmm.h | patch | blob | history |
index f8bbf94933b6ac9095097a9b601a70c6216f409c..2b4dc699b6760a2b4cac5156f884738562cd5f6b 100644 (file)
FileDialogType fileTypes,
const Glib::ustring &title)
{
- FileOpenDialog *dialog = new FileOpenDialogImpl(parentWindow, path, fileTypes, title);
+ FileOpenDialog *dialog = new FileOpenDialogImplGtk(parentWindow, path, fileTypes, title);
return dialog;
}
const Glib::ustring &title,
const Glib::ustring &default_key)
{
- FileSaveDialog *dialog = new FileSaveDialogImpl(parentWindow, path, fileTypes, title, default_key);
+ FileSaveDialog *dialog = new FileSaveDialogImplGtk(parentWindow, path, fileTypes, title, default_key);
return dialog;
}
index a78fda424a821a70de8e0dfa64d41e83ecfbfe58..3e8dd84a3a20a6c2e38d3ff86051d15a59ad4040 100644 (file)
### F I L E D I A L O G B A S E C L A S S\r
#########################################################################*/\r
\r
-void FileDialogBase::internalSetup()\r
+void FileDialogBaseGtk::internalSetup()\r
{\r
bool enablePreview = \r
(bool)prefs_get_int_attribute( preferenceBase.c_str(),\r
previewCheckbox.set_active( enablePreview );\r
\r
previewCheckbox.signal_toggled().connect(\r
- sigc::mem_fun(*this, &FileDialogBase::_previewEnabledCB) );\r
+ sigc::mem_fun(*this, &FileDialogBaseGtk::_previewEnabledCB) );\r
\r
//Catch selection-changed events, so we can adjust the text widget\r
signal_update_preview().connect(\r
- sigc::mem_fun(*this, &FileDialogBase::_updatePreviewCallback) );\r
+ sigc::mem_fun(*this, &FileDialogBaseGtk::_updatePreviewCallback) );\r
\r
//###### Add a preview widget\r
set_preview_widget(svgPreview);\r
}\r
\r
\r
-void FileDialogBase::cleanup( bool showConfirmed )\r
+void FileDialogBaseGtk::cleanup( bool showConfirmed )\r
{\r
if ( showConfirmed )\r
prefs_set_int_attribute( preferenceBase.c_str(),\r
}\r
\r
\r
-void FileDialogBase::_previewEnabledCB()\r
+void FileDialogBaseGtk::_previewEnabledCB()\r
{\r
bool enabled = previewCheckbox.get_active();\r
set_preview_widget_active(enabled);\r
/**\r
* Callback for checking if the preview needs to be redrawn\r
*/\r
-void FileDialogBase::_updatePreviewCallback()\r
+void FileDialogBaseGtk::_updatePreviewCallback()\r
{\r
Glib::ustring fileName = get_preview_filename();\r
\r
/**\r
* Constructor. Not called directly. Use the factory.\r
*/\r
-FileOpenDialogImpl::FileOpenDialogImpl(Gtk::Window& parentWindow, \r
+FileOpenDialogImplGtk::FileOpenDialogImplGtk(Gtk::Window& parentWindow, \r
const Glib::ustring &dir,\r
FileDialogType fileTypes,\r
const Glib::ustring &title) :\r
- FileDialogBase(parentWindow, title, fileTypes, "dialogs.open")\r
+ FileDialogBaseGtk(parentWindow, title, fileTypes, "dialogs.open")\r
{\r
\r
\r
/**\r
* Destructor\r
*/\r
-FileOpenDialogImpl::~FileOpenDialogImpl()\r
+FileOpenDialogImplGtk::~FileOpenDialogImplGtk()\r
{\r
\r
}\r
\r
-void FileOpenDialogImpl::createFilterMenu()\r
+void FileOpenDialogImplGtk::createFilterMenu()\r
{\r
Gtk::FileFilter allInkscapeFilter;\r
allInkscapeFilter.set_name(_("All Inkscape Files"));\r
* Show this dialog modally. Return true if user hits [OK]\r
*/\r
bool\r
-FileOpenDialogImpl::show()\r
+FileOpenDialogImplGtk::show()\r
{\r
Glib::ustring s = Glib::filename_to_utf8 (get_current_folder());\r
if (s.length() == 0) \r
* Get the file extension type that was selected by the user. Valid after an [OK]\r
*/\r
Inkscape::Extension::Extension *\r
-FileOpenDialogImpl::getSelectionType()\r
+FileOpenDialogImplGtk::getSelectionType()\r
{\r
return extension;\r
}\r
* Get the file name chosen by the user. Valid after an [OK]\r
*/\r
Glib::ustring\r
-FileOpenDialogImpl::getFilename (void)\r
+FileOpenDialogImplGtk::getFilename (void)\r
{\r
return g_strdup(myFilename.c_str());\r
}\r
/**\r
* To Get Multiple filenames selected at-once.\r
*/\r
-std::vector<Glib::ustring>FileOpenDialogImpl::getFilenames()\r
+std::vector<Glib::ustring>FileOpenDialogImplGtk::getFilenames()\r
{ \r
std::vector<Glib::ustring> result = get_filenames();\r
#ifdef WITH_GNOME_VFS\r
/**\r
* Constructor\r
*/\r
-FileSaveDialogImpl::FileSaveDialogImpl(Gtk::Window &parentWindow, \r
+FileSaveDialogImplGtk::FileSaveDialogImplGtk(Gtk::Window &parentWindow, \r
const Glib::ustring &dir,\r
FileDialogType fileTypes,\r
const Glib::ustring &title,\r
const Glib::ustring &default_key) :\r
- FileDialogBase(parentWindow, title, Gtk::FILE_CHOOSER_ACTION_SAVE, fileTypes, "dialogs.save_as")\r
+ FileDialogBaseGtk(parentWindow, title, Gtk::FILE_CHOOSER_ACTION_SAVE, fileTypes, "dialogs.save_as")\r
{\r
/* One file at a time */\r
set_select_multiple(false);\r
createFileTypeMenu();\r
fileTypeComboBox.set_size_request(200,40);\r
fileTypeComboBox.signal_changed().connect(\r
- sigc::mem_fun(*this, &FileSaveDialogImpl::fileTypeChangedCallback) );\r
+ sigc::mem_fun(*this, &FileSaveDialogImplGtk::fileTypeChangedCallback) );\r
\r
\r
childBox.pack_start( checksBox );\r
//Catch when user hits [return] on the text field\r
fileNameEntry = entries[0];\r
fileNameEntry->signal_activate().connect(\r
- sigc::mem_fun(*this, &FileSaveDialogImpl::fileNameEntryChangedCallback) );\r
+ sigc::mem_fun(*this, &FileSaveDialogImplGtk::fileNameEntryChangedCallback) );\r
}\r
\r
//Let's do more customization\r
/**\r
* Destructor\r
*/\r
-FileSaveDialogImpl::~FileSaveDialogImpl()\r
+FileSaveDialogImplGtk::~FileSaveDialogImplGtk()\r
{\r
}\r
\r
/**\r
* Callback for fileNameEntry widget\r
*/\r
-void FileSaveDialogImpl::fileNameEntryChangedCallback()\r
+void FileSaveDialogImplGtk::fileNameEntryChangedCallback()\r
{\r
if (!fileNameEntry)\r
return;\r
/**\r
* Callback for fileNameEntry widget\r
*/\r
-void FileSaveDialogImpl::fileTypeChangedCallback()\r
+void FileSaveDialogImplGtk::fileTypeChangedCallback()\r
{\r
int sel = fileTypeComboBox.get_active_row_number();\r
if (sel<0 || sel >= (int)fileTypes.size())\r
\r
\r
\r
-void FileSaveDialogImpl::createFileTypeMenu()\r
+void FileSaveDialogImplGtk::createFileTypeMenu()\r
{\r
Inkscape::Extension::DB::OutputList extension_list;\r
Inkscape::Extension::db.get_output_list(extension_list);\r
* Show this dialog modally. Return true if user hits [OK]\r
*/\r
bool\r
-FileSaveDialogImpl::show()\r
+FileSaveDialogImplGtk::show()\r
{\r
change_path(myFilename);\r
set_modal (TRUE); //Window\r
* Get the file extension type that was selected by the user. Valid after an [OK]\r
*/\r
Inkscape::Extension::Extension *\r
-FileSaveDialogImpl::getSelectionType()\r
+FileSaveDialogImplGtk::getSelectionType()\r
{\r
return extension;\r
}\r
\r
-void FileSaveDialogImpl::setSelectionType( Inkscape::Extension::Extension * key )\r
+void FileSaveDialogImplGtk::setSelectionType( Inkscape::Extension::Extension * key )\r
{\r
// If no pointer to extension is passed in, look up based on filename extension.\r
if ( !key ) {\r
@@ -1170,14 +1170,14 @@ void FileSaveDialogImpl::setSelectionType( Inkscape::Extension::Extension * key
* Get the file name chosen by the user. Valid after an [OK]\r
*/\r
Glib::ustring\r
-FileSaveDialogImpl::getFilename()\r
+FileSaveDialogImplGtk::getFilename()\r
{\r
return myFilename;\r
}\r
\r
\r
void \r
-FileSaveDialogImpl::change_title(const Glib::ustring& title)\r
+FileSaveDialogImplGtk::change_title(const Glib::ustring& title)\r
{\r
this->set_title(title);\r
}\r
* Change the default save path location.\r
*/\r
void \r
-FileSaveDialogImpl::change_path(const Glib::ustring& path)\r
+FileSaveDialogImplGtk::change_path(const Glib::ustring& path)\r
{\r
myFilename = path;\r
if (Glib::file_test(myFilename, Glib::FILE_TEST_IS_DIR)) {\r
}\r
}\r
\r
-void FileSaveDialogImpl::updateNameAndExtension()\r
+void FileSaveDialogImplGtk::updateNameAndExtension()\r
{\r
// Pick up any changes the user has typed in.\r
Glib::ustring tmp = get_filename();\r
FileDialogType fileTypes,\r
const Glib::ustring &title,\r
const Glib::ustring &default_key) :\r
- FileDialogBase(parentWindow, title, Gtk::FILE_CHOOSER_ACTION_SAVE, fileTypes, "dialogs.export"),\r
+ FileDialogBaseGtk(parentWindow, title, Gtk::FILE_CHOOSER_ACTION_SAVE, fileTypes, "dialogs.export"),\r
sourceX0Spinner("X0", _("Left edge of source")),\r
sourceY0Spinner("Y0", _("Top edge of source")),\r
sourceX1Spinner("X1", _("Right edge of source")),\r
index 620747b1a7b57231159229ec7a7a8c3bf7ed5d4e..cd9523036cf4190bdb4ef8649f9e8ce25175062f 100644 (file)
* This class is the base implementation for the others. This\r
* reduces redundancies and bugs.\r
*/\r
-class FileDialogBase : public Gtk::FileChooserDialog\r
+class FileDialogBaseGtk : public Gtk::FileChooserDialog\r
{\r
public:\r
\r
/**\r
*\r
*/\r
- FileDialogBase(Gtk::Window& parentWindow, const Glib::ustring &title,\r
+ FileDialogBaseGtk(Gtk::Window& parentWindow, const Glib::ustring &title,\r
FileDialogType type, gchar const* preferenceBase) :\r
Gtk::FileChooserDialog(parentWindow, title),\r
preferenceBase(preferenceBase ? preferenceBase : "unknown"),\r
/**\r
*\r
*/\r
- FileDialogBase(Gtk::Window& parentWindow, const Glib::ustring &title,\r
+ FileDialogBaseGtk(Gtk::Window& parentWindow, const Glib::ustring &title,\r
Gtk::FileChooserAction dialogType, FileDialogType type, gchar const* preferenceBase) :\r
Gtk::FileChooserDialog(parentWindow, title, dialogType),\r
preferenceBase(preferenceBase ? preferenceBase : "unknown"),\r
/**\r
*\r
*/\r
- virtual ~FileDialogBase()\r
+ virtual ~FileDialogBaseGtk()\r
{}\r
\r
protected:\r
/**\r
* Our implementation class for the FileOpenDialog interface..\r
*/\r
-class FileOpenDialogImpl : public FileOpenDialog, public FileDialogBase\r
+class FileOpenDialogImplGtk : public FileOpenDialog, public FileDialogBaseGtk\r
{\r
public:\r
\r
- FileOpenDialogImpl(Gtk::Window& parentWindow,\r
+ FileOpenDialogImplGtk(Gtk::Window& parentWindow,\r
const Glib::ustring &dir,\r
FileDialogType fileTypes,\r
const Glib::ustring &title);\r
\r
- virtual ~FileOpenDialogImpl();\r
+ virtual ~FileOpenDialogImplGtk();\r
\r
bool show();\r
\r
/**\r
* Our implementation of the FileSaveDialog interface.\r
*/\r
-class FileSaveDialogImpl : public FileSaveDialog, public FileDialogBase\r
+class FileSaveDialogImplGtk : public FileSaveDialog, public FileDialogBaseGtk\r
{\r
\r
public:\r
- FileSaveDialogImpl(Gtk::Window &parentWindow, \r
+ FileSaveDialogImplGtk(Gtk::Window &parentWindow, \r
const Glib::ustring &dir,\r
FileDialogType fileTypes,\r
const Glib::ustring &title,\r
const Glib::ustring &default_key);\r
\r
- virtual ~FileSaveDialogImpl();\r
+ virtual ~FileSaveDialogImplGtk();\r
\r
bool show();\r
\r
/**\r
* Our implementation of the FileExportDialog interface.\r
*/\r
-class FileExportDialogImpl : public FileExportDialog, public FileDialogBase\r
+class FileExportDialogImpl : public FileExportDialog, public FileDialogBaseGtk\r
{\r
\r
public:\r