summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/filedialogimpl-win32.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-06-19 10:00:24 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-06-19 10:00:24 +0000
commit06dfaa02d7a80bcdff717d579a48f81643f53f31 (patch)
tree49b8e67ad9051f1507b0959cac986383ab4001e2 /src/ui/dialog/filedialogimpl-win32.cpp
parentFix rendering of control points (diff)
parentfix bug 796451: Measure tools should support rotation constraint (diff)
downloadinkscape-06dfaa02d7a80bcdff717d579a48f81643f53f31.tar.gz
inkscape-06dfaa02d7a80bcdff717d579a48f81643f53f31.zip
Merge from trunk
(bzr r9508.1.89)
Diffstat (limited to 'src/ui/dialog/filedialogimpl-win32.cpp')
-rw-r--r--src/ui/dialog/filedialogimpl-win32.cpp37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp
index b3c71e8c8..e83aeccad 100644
--- a/src/ui/dialog/filedialogimpl-win32.cpp
+++ b/src/ui/dialog/filedialogimpl-win32.cpp
@@ -41,6 +41,7 @@
#include "filedialog.h"
#include "filedialogimpl-win32.h"
+#include "sp-root.h"
#include <zlib.h>
#include <cairomm/win32_surface.h>
@@ -407,7 +408,7 @@ void FileOpenDialogImplWin32::createFilterMenu()
*(filterptr++) = L'\0';
_filter_count = extension_index;
- _filter_index = 2; // Select the 2nd filter in the list - 2 is NOT the 3rd
+ _filter_index = 2; // Select the 2nd filter in the list - 2 is NOT the 3rd
}
void FileOpenDialogImplWin32::GetOpenFileName_thread()
@@ -419,7 +420,7 @@ void FileOpenDialogImplWin32::GetOpenFileName_thread()
WCHAR* current_directory_string = (WCHAR*)g_utf8_to_utf16(
_current_directory.data(), _current_directory.length(),
- NULL, NULL, NULL);
+ NULL, NULL, NULL);
memset(&ofn, 0, sizeof(ofn));
@@ -964,8 +965,10 @@ bool FileOpenDialogImplWin32::set_svg_preview()
g_free(utf8string);
// Check the document loaded properly
- if(svgDoc == NULL) return false;
- if(svgDoc->root == NULL)
+ if (svgDoc == NULL) {
+ return false;
+ }
+ if (svgDoc->getRoot() == NULL)
{
svgDoc->doUnref();
return false;
@@ -991,14 +994,14 @@ bool FileOpenDialogImplWin32::set_svg_preview()
// write object bbox to area
Geom::OptRect maybeArea(area);
svgDoc->ensureUpToDate();
- static_cast<SPItem *>(svgDoc->root)->invoke_bbox( maybeArea,
- static_cast<SPItem *>(svgDoc->root)->i2d_affine(), TRUE);
+ svgDoc->getRoot()->invoke_bbox( maybeArea,
+ svgDoc->getRoot()->i2d_affine(), TRUE);
NRArena *const arena = NRArena::create();
unsigned const key = SPItem::display_key_new(1);
- NRArenaItem *root = static_cast<SPItem*>(svgDoc->root)->invoke_show(
+ NRArenaItem *root = svgDoc->getRoot()->invoke_show(
arena, key, SP_ITEM_SHOW_DISPLAY);
NRGC gc(NULL);
@@ -1035,7 +1038,7 @@ bool FileOpenDialogImplWin32::set_svg_preview()
// Tidy up
svgDoc->doUnref();
- static_cast<SPItem*>(svgDoc->root)->invoke_hide(key);
+ svgDoc->getRoot()->invoke_hide(key);
nr_object_unref((NRObject *) arena);
// Create the GDK pixbuf
@@ -1669,7 +1672,7 @@ void FileSaveDialogImplWin32::createFilterMenu()
*(filterptr++) = 0;
_filter_count = extension_index;
- _filter_index = 1; // A value of 1 selects the 1st filter - NOT the 2nd
+ _filter_index = 1; // A value of 1 selects the 1st filter - NOT the 2nd
}
void FileSaveDialogImplWin32::GetSaveFileName_thread()
@@ -1681,7 +1684,7 @@ void FileSaveDialogImplWin32::GetSaveFileName_thread()
WCHAR* current_directory_string = (WCHAR*)g_utf8_to_utf16(
_current_directory.data(), _current_directory.length(),
- NULL, NULL, NULL);
+ NULL, NULL, NULL);
// Copy the selected file name, converting from UTF-8 to UTF-16
memset(_path_string, 0, sizeof(_path_string));
@@ -1733,14 +1736,14 @@ FileSaveDialogImplWin32::show()
_result = false;
_main_loop = g_main_loop_new(g_main_context_default(), FALSE);
- if(_main_loop != NULL)
- {
- if(Glib::Thread::create(sigc::mem_fun(*this, &FileSaveDialogImplWin32::GetSaveFileName_thread), true))
- g_main_loop_run(_main_loop);
+ if(_main_loop != NULL)
+ {
+ if(Glib::Thread::create(sigc::mem_fun(*this, &FileSaveDialogImplWin32::GetSaveFileName_thread), true))
+ g_main_loop_run(_main_loop);
- if(_result)
- appendExtension(myFilename, (Inkscape::Extension::Output*)_extension);
- }
+ if(_result)
+ appendExtension(myFilename, (Inkscape::Extension::Output*)_extension);
+ }
return _result;
}