summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 11ab07f)
raw | patch | inline | side by side (parent: 11ab07f)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Sun, 28 Feb 2010 17:38:28 +0000 (18:38 +0100) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Sun, 28 Feb 2010 17:38:28 +0000 (18:38 +0100) |
diff --git a/src/display/curve.cpp b/src/display/curve.cpp
index 7c3c3d48074e6529228d66cd4badf1c5a82f5cb2..1b54c981c25c8277917bc8477283972d549e2485 100644 (file)
--- a/src/display/curve.cpp
+++ b/src/display/curve.cpp
Geom::Point p = rect.corner(0);
c->moveto(p);
- for (int i=3; i>=0; i--) {
+ for (int i=3; i>=1; i--) {
c->lineto(rect.corner(i));
}
- c->closepath_current();
+ c->closepath();
return c;
}
index 5f1bef8d1afe1013e6189b00df72a2114818aea2..7a558b6fcbe29fd57a91929e06d305c6dc3526c8 100644 (file)
char szExePath[MAX_PATH];
char szCurrentDir[MAX_PATH];
GetCurrentDirectory(sizeof(szCurrentDir), szCurrentDir);
- unsigned int ret = (unsigned int)FindExecutable(
+ HINSTANCE ret = (unsigned int)FindExecutable(
interpName.c_str(), szCurrentDir, szExePath);
if (ret > 32) {
interpName = szExePath;
diff --git a/src/io/sys.cpp b/src/io/sys.cpp
index 2841f0af8a7fd88f59b0b3cd687f7e829b6458fc..f25575c9c236728197dab6f011a74740a43fb588 100644 (file)
--- a/src/io/sys.cpp
+++ b/src/io/sys.cpp
#include <process.h> // declares spawn functions
#include <wchar.h> // declares _wspawn functions
-#ifdef __cplusplus
+
+#ifndef __MINGW32__
+# ifdef __cplusplus
extern "C" {
-#endif
+# endif
_CRTIMP int __cdecl __MINGW_NOTHROW _wspawnl (int, const wchar_t*, const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _wspawnle (int, const wchar_t*, const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _wspawnlp (int, const wchar_t*, const wchar_t*, ...);
_CRTIMP int __cdecl __MINGW_NOTHROW _wspawnve (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wspawnvp (int, const wchar_t*, const wchar_t* const*);
_CRTIMP int __cdecl __MINGW_NOTHROW _wspawnvpe (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
-#ifdef __cplusplus
+# ifdef __cplusplus
}
+# endif
#endif
#include <unistd.h>
#include <glibmm/i18n.h>
GetCurrentProcess (), &filehandle,
0, FALSE, DUPLICATE_SAME_ACCESS);
close (fd);
- return _open_osfhandle ((long) filehandle, mode | _O_NOINHERIT);
+ return _open_osfhandle ((LONG_PTR) filehandle, mode | _O_NOINHERIT);
}
index c3889a62d93e9dcfa44c70d5e36def7ee0d0e57c..3cdd61184c1caec0050998463ffd46f4f4311da9 100644 (file)
pImpl = (FileOpenDialogImplWin32*)ofn->lCustData;
// Subclass the parent
- pImpl->_base_window_proc = (WNDPROC)GetWindowLongPtr(hParentWnd, GWL_WNDPROC);
- SetWindowLongPtr(hParentWnd, GWL_WNDPROC, (LONG_PTR)file_dialog_subclass_proc);
+ pImpl->_base_window_proc = (WNDPROC)GetWindowLongPtr(hParentWnd, GWLP_WNDPROC);
+ SetWindowLongPtr(hParentWnd, GWLP_WNDPROC, (LONG_PTR)file_dialog_subclass_proc);
// Add a button to the toolbar
pImpl->_toolbar_wnd = FindWindowEx(hParentWnd, NULL, "ToolbarWindow32", NULL);
pImpl->_show_preview_button_bitmap = LoadBitmap(
hInstance, MAKEINTRESOURCE(IDC_SHOW_PREVIEW));
- TBADDBITMAP tbAddBitmap = {NULL, (UINT)pImpl->_show_preview_button_bitmap};
+ TBADDBITMAP tbAddBitmap = {NULL, (UINT_PTR)pImpl->_show_preview_button_bitmap};
const int iBitmapIndex = SendMessage(pImpl->_toolbar_wnd,
TB_ADDBITMAP, 1, (LPARAM)&tbAddBitmap);
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 421736b7f8dc0a9dcf758c3e3752d8f54e912e18..f9a544186e633051a665c69843a7cf2325043000 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
Gtk::Window *parent = desktop->getToplevel();
g_assert(parent != NULL);
- switch ((long) data) {
+ switch (reinterpret_cast<std::size_t>(data)) {
case SP_VERB_FILE_NEW:
sp_file_new_default();
break;
LayerVerb::perform(SPAction *action, void *data, void */*pdata*/)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
- unsigned int verb = reinterpret_cast<std::size_t>(data);
+ size_t verb = reinterpret_cast<std::size_t>(data);
if ( !dt || !dt->currentLayer() ) {
return;
gdouble zoom_inc =
prefs->getDoubleLimited( "/options/zoomincrement/value", 1.414213562, 1.01, 10 );
- switch (GPOINTER_TO_INT(data)) {
+ switch (reinterpret_cast<std::size_t>(data)) {
case SP_VERB_ZOOM_IN:
{
gint mul = 1 + gobble_key_events(
if (effect == NULL) return;
if (current_view == NULL) return;
- switch ((long) data) {
+ switch (reinterpret_cast<std::size_t>(data)) {
case SP_VERB_EFFECT_LAST_PREF:
effect->prefs(current_view);
break;
SPDocument *doc = sp_desktop_document(dt);
if (!doc) return;
- switch ((long) data) {
+ switch (reinterpret_cast<std::size_t>(data)) {
case SP_VERB_FIT_CANVAS_TO_SELECTION:
verb_fit_canvas_to_selection(dt);
break;
SPDocument *doc = sp_desktop_document(dt);
if (!doc) return;
- switch ((long) data) {
+ switch (reinterpret_cast<std::size_t>(data)) {
case SP_VERB_UNLOCK_ALL:
unlock_all(dt);
sp_document_done(doc, SP_VERB_UNLOCK_ALL, _("Unlock all objects in the current layer"));