Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-11-08 10:30:02 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-11-08 10:30:02 +0400
commit80e398e7b2cfbdf0192b11734cb02b378b423d65 (patch)
tree69bda0498a17f6a3ad5acb47465e1eef8a5e1faa /intern/ghost
parent72cfdfec3083cbb756ff07c860293be9ca25f8b4 (diff)
parentf086201518b85f6dd2ae60ae37dc14f1d1406c01 (diff)
Merged changes in the trunk up to revision 41638.
Conflicts resolved: doc/python_api/sphinx_doc_gen.py source/blender/blenkernel/BKE_main.h source/blender/blenkernel/intern/library.c source/blender/blenloader/intern/readfile.c source/blender/blenloader/intern/writefile.c source/blender/editors/include/UI_resources.h source/blender/editors/interface/resources.c source/blender/makesdna/DNA_ID.h source/blender/makesdna/intern/makesdna.c source/blender/makesrna/intern/rna_internal.h source/blender/makesrna/intern/rna_main.c source/blender/makesrna/intern/rna_main_api.c source/blender/makesrna/intern/rna_scene.c
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/CMakeLists.txt4
-rw-r--r--intern/ghost/intern/GHOST_Buttons.h6
-rw-r--r--intern/ghost/intern/GHOST_DisplayManager.h2
-rw-r--r--intern/ghost/intern/GHOST_EventWheel.h2
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm4
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsX11.cpp25
6 files changed, 36 insertions, 7 deletions
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_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.
*/
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;
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 <stdio.h> // for fprintf only
#include <cstdlib> // for exit
+#ifdef WITH_XDG_USER_DIRS
+# include <pwd.h> // for get home without use getenv()
+# include <limits.h> // 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