summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4bf6cdf)
raw | patch | inline | side by side (parent: 4bf6cdf)
author | gorodish <gorodish@users.sourceforge.net> | |
Tue, 14 Aug 2007 20:18:09 +0000 (20:18 +0000) | ||
committer | gorodish <gorodish@users.sourceforge.net> | |
Tue, 14 Aug 2007 20:18:09 +0000 (20:18 +0000) |
src/ui/dialog/filedialogimpl-gtkmm.cpp | patch | blob | history |
index cb4dc67a75b801843bd3ac213ff5dc6aa0a002b9..61d37e918be3c1add85290124ff29f24f92023a2 100644 (file)
/**\r
* I don't know why passing false to keepalive is bad. But it\r
* prevents the display of an svg with a non-ascii filename\r
- */ \r
+ */\r
SPDocument *doc = sp_document_new (fileName.c_str(), true);\r
if (!doc) {\r
g_warning("SVGView: error loading document '%s'\n", fileName.c_str());\r
\r
/**\r
* Inform the user that the svg file is too large to be displayed.\r
- * This does not check for sizes of embedded images (yet) \r
- */ \r
+ * This does not check for sizes of embedded images (yet)\r
+ */\r
void SVGPreview::showTooLarge(long fileLength)\r
{\r
\r
\r
/**\r
* Return true if the string ends with the given suffix\r
- */ \r
+ */\r
static bool\r
hasSuffix(Glib::ustring &str, Glib::ustring &ext)\r
{\r
return FALSE;\r
}\r
}\r
- \r
+\r
Glib::ustring svg = ".svg";\r
Glib::ustring svgz = ".svgz";\r
\r
\r
void FileDialogBaseGtk::internalSetup()\r
{\r
- bool enablePreview = \r
+ bool enablePreview =\r
(bool)prefs_get_int_attribute( preferenceBase.c_str(),\r
"enable_preview", 1 );\r
\r
/**\r
* Constructor. Not called directly. Use the factory.\r
*/\r
-FileOpenDialogImplGtk::FileOpenDialogImplGtk(Gtk::Window& parentWindow, \r
- const Glib::ustring &dir,\r
+FileOpenDialogImplGtk::FileOpenDialogImplGtk(Gtk::Window& parentWindow,\r
+ const Glib::ustring &dir,\r
FileDialogType fileTypes,\r
const Glib::ustring &title) :\r
FileDialogBaseGtk(parentWindow, title, fileTypes, "dialogs.open")\r
FileOpenDialogImplGtk::show()\r
{\r
Glib::ustring s = Glib::filename_to_utf8 (get_current_folder());\r
- if (s.length() == 0) \r
+ if (s.length() == 0)\r
s = getcwd (NULL, 0);\r
set_current_folder(Glib::filename_from_utf8(s)); //hack to force initial dir listing\r
set_modal (TRUE); //Window\r
* To Get Multiple filenames selected at-once.\r
*/\r
std::vector<Glib::ustring>FileOpenDialogImplGtk::getFilenames()\r
-{ \r
+{\r
std::vector<Glib::ustring> result = get_filenames();\r
#ifdef WITH_GNOME_VFS\r
if (result.empty() && gnome_vfs_initialized())\r
/**\r
* Constructor\r
*/\r
-FileSaveDialogImplGtk::FileSaveDialogImplGtk(Gtk::Window &parentWindow, \r
- const Glib::ustring &dir,\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
sp_transientize((GtkWidget *)gobj()); //Make transient\r
gint b = run(); //Dialog\r
svgPreview.showNoPreview();\r
+ set_preview_widget_active(false);\r
hide();\r
\r
if (b == Gtk::RESPONSE_OK)\r
}\r
\r
\r
-void \r
+void\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
+void\r
FileSaveDialogImplGtk::change_path(const Glib::ustring& path)\r
{\r
myFilename = path;\r
if ( pos != Glib::ustring::npos ) {\r
Glib::ustring trail = utf8Name.substr( pos );\r
Glib::ustring foldedTrail = trail.casefold();\r
- if ( (trail == ".") \r
+ if ( (trail == ".")\r
| (foldedTrail != Glib::ustring( newOut->get_extension() ).casefold()\r
&& ( knownExtensions.find(foldedTrail) != knownExtensions.end() ) ) ) {\r
utf8Name = utf8Name.erase( pos );\r
* Constructor\r
*/\r
FileExportDialogImpl::FileExportDialogImpl(Gtk::Window& parentWindow,\r
- const Glib::ustring &dir,\r
+ const Glib::ustring &dir,\r
FileDialogType fileTypes,\r
const Glib::ustring &title,\r
const Glib::ustring &default_key) :\r
destFrame.add(destBox);\r
exportOptionsBox.pack_start(destFrame);\r
\r
- //##### Put the two boxes and their parent onto the dialog \r
+ //##### Put the two boxes and their parent onto the dialog\r
exportOptionsBox.pack_start(sourceFrame);\r
exportOptionsBox.pack_start(destFrame);\r
\r
FileExportDialogImpl::show()\r
{\r
Glib::ustring s = Glib::filename_to_utf8 (get_current_folder());\r
- if (s.length() == 0) \r
+ if (s.length() == 0)\r
s = getcwd (NULL, 0);\r
set_current_folder(Glib::filename_from_utf8(s)); //hack to force initial dir listing\r
set_modal (TRUE); //Window\r
@@ -1722,7 +1723,7 @@ FileExportToOCALDialogImpl::FileExportToOCALDialogImpl(Gtk::Window &parentWindow
//Gtk::HBox fileBox;\r
\r
Gtk::Label *fileLabel = new Gtk::Label(_("File"));\r
- \r
+\r
fileNameEntry = new Gtk::Entry();\r
fileNameEntry->set_text(myFilename);\r
fileNameEntry->set_max_length(252); // I am giving the extension approach.\r
@@ -1743,9 +1744,9 @@ FileExportToOCALDialogImpl::FileExportToOCALDialogImpl(Gtk::Window &parentWindow
\r
checksBox.pack_start( fileTypeCheckbox );\r
vbox->pack_start( checksBox );\r
- \r
+\r
vbox->pack_end( fileTypeComboBox );\r
- \r
+\r
//Let's do some customization\r
fileNameEntry = NULL;\r
Gtk::Container *cont = get_toplevel();\r
}\r
\r
\r
-void \r
+void\r
FileExportToOCALDialogImpl::change_title(const Glib::ustring& title)\r
{\r
this->set_title(title);\r
{\r
// Pick up any changes the user has typed in.\r
Glib::ustring tmp = myFilename; // get_filename();\r
- \r
+\r
Inkscape::Extension::Output* newOut = extension ? dynamic_cast<Inkscape::Extension::Output*>(extension) : 0;\r
if ( fileTypeCheckbox.get_active() && newOut ) {\r
try {\r
if ( pos != Glib::ustring::npos ) {\r
Glib::ustring trail = utf8Name.substr( pos );\r
Glib::ustring foldedTrail = trail.casefold();\r
- if ( (trail == ".") \r
+ if ( (trail == ".")\r
| (foldedTrail != Glib::ustring( newOut->get_extension() ).casefold()\r
&& ( knownExtensions.find(foldedTrail) != knownExtensions.end() ) ) ) {\r
utf8Name = utf8Name.erase( pos );\r