From a664e779ac8be0f926221d4c064394f9b3b6a801 Mon Sep 17 00:00:00 2001 From: Jens Verwiebe Date: Mon, 31 Oct 2011 12:31:48 +0000 Subject: OSX: make ZOOM-gesture on trackpads half the speed, added comment for experimental all-time-trackpad assumption --- intern/ghost/intern/GHOST_SystemCocoa.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'intern/ghost') diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 7a6c0a02043..9dc3dd3f30b 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -578,7 +578,7 @@ GHOST_SystemCocoa::GHOST_SystemCocoa() if (strstr(rstring,"MacBookAir") || (strstr(rstring,"MacBook") && (rstring[strlen(rstring)-3]>='5') && (rstring[strlen(rstring)-3]<='9'))) m_hasMultiTouchTrackpad = true; - else m_hasMultiTouchTrackpad = true; + else m_hasMultiTouchTrackpad = true; // experimental, changes only MagicMouse behaviour (zoom->pan) but enables MagicTrackpad for all Macs free( rstring ); rstring = NULL; @@ -1610,7 +1610,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr) GHOST_TInt32 x, y; window->clientToScreenIntern(mousePos.x, mousePos.y, x, y); pushEvent(new GHOST_EventTrackpad([event timestamp]*1000, window, GHOST_kTrackpadEventMagnify, x, y, - [event magnification]*250.0 + 0.1, 0)); + [event magnification]*125.0 + 0.1, 0)); } break; -- cgit v1.2.3 From 4293f4738ce0ea1bb81260b12a6b64f98b6a3468 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 2 Nov 2011 22:00:22 +0000 Subject: patch [#28947] Patches for #28943 (Support for XDG Base Directory Specification) from Cosme --- intern/ghost/CMakeLists.txt | 4 ++++ intern/ghost/intern/GHOST_SystemPathsX11.cpp | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) (limited to 'intern/ghost') diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 4446426098a..a84ff5825a9 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -108,6 +108,10 @@ if(WITH_INPUT_NDOF) ) endif() +if(WITH_XDG_USER_DIRS) + add_definitions(-DWITH_XDG_USER_DIRS) +endif() + if(WITH_HEADLESS OR WITH_GHOST_SDL) if(WITH_HEADLESS) list(APPEND SRC diff --git a/intern/ghost/intern/GHOST_SystemPathsX11.cpp b/intern/ghost/intern/GHOST_SystemPathsX11.cpp index 1456bdef543..726149138ed 100644 --- a/intern/ghost/intern/GHOST_SystemPathsX11.cpp +++ b/intern/ghost/intern/GHOST_SystemPathsX11.cpp @@ -41,6 +41,11 @@ #include // for fprintf only #include // for exit +#ifdef WITH_XDG_USER_DIRS +# include // for get home without use getenv() +# include // for PATH_MAX +#endif + #ifdef PREFIX static const char *static_path= PREFIX "/share" ; #else @@ -63,7 +68,27 @@ const GHOST_TUns8* GHOST_SystemPathsX11::getSystemDir() const const GHOST_TUns8* GHOST_SystemPathsX11::getUserDir() const { +#ifndef WITH_XDG_USER_DIRS return (const GHOST_TUns8 *)getenv("HOME"); +#else /* WITH_XDG_USER_DIRS */ + const char *home= getenv("XDG_CONFIG_HOME"); + + if (home) { + return (const GHOST_TUns8 *)home; + } + else { + static char user_path[PATH_MAX]; + + home= getenv("HOME"); + + if (home == NULL) { + home= getpwuid(getuid())->pw_dir; + } + + snprintf(user_path, sizeof(user_path), "%s/.config", home); + return (const GHOST_TUns8 *)user_path; + } +#endif /* WITH_XDG_USER_DIRS */ } const GHOST_TUns8* GHOST_SystemPathsX11::getBinaryDir() const -- cgit v1.2.3 From 057bf2a02bd453ac8dd5048baa298de39f213560 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 5 Nov 2011 01:48:10 +0000 Subject: misc doc edits - remove recently added sphinx reference workaround. - tested doxygen, correct some warnings, set tab width and added pymathutils group. - added convenience target 'make doc_doxy' --- intern/ghost/intern/GHOST_Buttons.h | 6 +++--- intern/ghost/intern/GHOST_DisplayManager.h | 2 +- intern/ghost/intern/GHOST_EventWheel.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'intern/ghost') diff --git a/intern/ghost/intern/GHOST_Buttons.h b/intern/ghost/intern/GHOST_Buttons.h index 7a3d8b6ae71..0209dc304e4 100644 --- a/intern/ghost/intern/GHOST_Buttons.h +++ b/intern/ghost/intern/GHOST_Buttons.h @@ -52,15 +52,15 @@ struct GHOST_Buttons { /** * Returns the state of a single button. - * @param mask. Key button to return. + * @param mask Key button to return. * @return The state of the button (pressed == true). */ virtual bool get(GHOST_TButtonMask mask) const; /** * Updates the state of a single button. - * @param mask. Button state to update. - * @param down. The new state of the button. + * @param mask Button state to update. + * @param down The new state of the button. */ virtual void set(GHOST_TButtonMask mask, bool down); diff --git a/intern/ghost/intern/GHOST_DisplayManager.h b/intern/ghost/intern/GHOST_DisplayManager.h index 8329d7be94e..d7a9b151d14 100644 --- a/intern/ghost/intern/GHOST_DisplayManager.h +++ b/intern/ghost/intern/GHOST_DisplayManager.h @@ -72,7 +72,7 @@ public: /** * Returns the number of display settings for this display device. * @param display The index of the display to query with 0 <= display < getNumDisplays(). - * @param setting The number of settings of the display device with this index. + * @param numSettings The number of settings of the display device with this index. * @return Indication of success. */ virtual GHOST_TSuccess getNumDisplaySettings(GHOST_TUns8 display, GHOST_TInt32& numSettings) const; diff --git a/intern/ghost/intern/GHOST_EventWheel.h b/intern/ghost/intern/GHOST_EventWheel.h index 0036fa60275..2a82ab8a630 100644 --- a/intern/ghost/intern/GHOST_EventWheel.h +++ b/intern/ghost/intern/GHOST_EventWheel.h @@ -26,7 +26,7 @@ */ /** \file ghost/intern/GHOST_EventWheel.h - * \ingroup GHOSTeel.h + * \ingroup GHOST * Declaration of GHOST_EventWheel class. */ -- cgit v1.2.3