From 529edfcb9a8feec59ed15707879cd28231cb53f1 Mon Sep 17 00:00:00 2001 From: vl Date: Wed, 8 Jun 2011 18:36:27 +0200 Subject: [PATCH 1/7] Fixed: must not be lowered or the tooltip in milkopad doesn't work --- code/ryzom/client/src/interface_v3/ctrl_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/ctrl_base.cpp b/code/ryzom/client/src/interface_v3/ctrl_base.cpp index 0e35d2eb8..151d2be6f 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_base.cpp +++ b/code/ryzom/client/src/interface_v3/ctrl_base.cpp @@ -92,7 +92,7 @@ bool CCtrlBase::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) prop = (char*) xmlGetProp( cur, (xmlChar*)"on_tooltip" ); if (prop) { - _OnContextHelp= NLMISC::toLower(std::string((const char*)prop)); + _OnContextHelp= (const char*)prop; } prop = (char*) xmlGetProp( cur, (xmlChar*)"on_tooltip_params" ); if (prop) From 0e3465b6a12500e5fcc5061ee0b86ebb29db64ed Mon Sep 17 00:00:00 2001 From: vl Date: Thu, 9 Jun 2011 00:36:58 +0200 Subject: [PATCH 2/7] Changed: chapter 5 --- code/ryzom/client/client_default.cfg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index ca6534931..c29ca9b93 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -385,21 +385,21 @@ SystemInfoColors = }; PrintfCommands = { - "52", "15", "55 55 0 255", "28", "uiChapterIV", "624", + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", "428", "0 0 0 255", "18", "", "624", "378", "0 0 0 255", "14", "", "644", "278", "0 0 0 255", "18", "", "52", "17", "255 255 255 255", "28", - "uiChapterIV", "622", "430", "255 255 255 255", "18", "", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", "622", "380", "255 255 255 255", "14", "", "642", "280", "255 255 255 255", "18", "" }; PrintfCommandsFreeTrial = { - "52", "15", "55 55 0 255", "28", "uiChapterIV", "624", + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", "428", "0 0 0 255", "18", "", "624", "378", "0 0 0 255", "14", "", "644", "278", "0 0 0 255", "18", "", "52", "17", "255 255 255 255", "28", - "uiChapterIV", "622", "430", "255 255 255 255", "18", "", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", "622", "380", "255 255 255 255", "14", "", "642", "280", "255 255 255 255", "18", "" }; From 5c47e96d79d373336b9d3819f5bf093d3fd96b18 Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Tue, 14 Jun 2011 13:29:16 +0300 Subject: [PATCH 3/7] Added: #1303 Added undo/redo command list. --- .../src/plugins/core/main_window.cpp | 18 ++++++++++++++++-- .../src/plugins/core/main_window.h | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.cpp index 21334f7ea..d54431a46 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.cpp @@ -30,6 +30,7 @@ // Qt includes #include +#include #include namespace Core @@ -382,8 +383,13 @@ void MainWindow::createMenus() m_fileMenu->addAction(m_exitAction); m_editMenu = m_menuBar->addMenu(tr("&Edit")); - m_editMenu->addAction(m_undoGroup->createUndoAction(this)); - m_editMenu->addAction(m_undoGroup->createRedoAction(this)); + QAction *undoAction = m_undoGroup->createUndoAction(this); + undoAction->setShortcut(QKeySequence::Undo); + QAction *redoAction = m_undoGroup->createRedoAction(this); + redoAction->setShortcut(QKeySequence::Redo); + m_editMenu->addAction(undoAction); + m_editMenu->addAction(redoAction); + m_editMenu->addSeparator(); m_editMenu->addAction(m_cutAction); m_editMenu->addAction(m_copyAction); @@ -398,6 +404,7 @@ void MainWindow::createMenus() m_viewMenu = m_menuBar->addMenu(tr("&View")); m_viewMenu->addAction(m_fullscreenAction); + m_viewMenu->addAction(m_dockWidget->toggleViewAction()); menuManager()->registerMenu(m_viewMenu, Constants::M_VIEW); m_toolsMenu = m_menuBar->addMenu(tr("&Tools")); @@ -427,6 +434,13 @@ void MainWindow::createStatusBar() void MainWindow::createDialogs() { m_pluginView = new ExtensionSystem::CPluginView(m_pluginManager, this); + + // Create undo/redo command list + m_dockWidget = new QDockWidget("Command List", this); + m_dockWidget->setObjectName(QString::fromUtf8("UndoRedoCommandDockWidget")); + QUndoView *undoView = new QUndoView(m_undoGroup, m_dockWidget); + m_dockWidget->setWidget(undoView); + addDockWidget(Qt::RightDockWidgetArea, m_dockWidget); } void MainWindow::readSettings() diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.h index ce439b885..d594692ee 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/main_window.h @@ -101,6 +101,7 @@ private: QPalette m_originalPalette; QString m_lastDir; + QDockWidget *m_dockWidget; QUndoGroup *m_undoGroup; QSettings *m_settings; From 7adc1ec62900fa6f6e03a71955b96cb5b6607c71 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 14 Jun 2011 19:31:59 +0200 Subject: [PATCH 4/7] Changed: #878 Fix typos in comments/code --- code/ryzom/client/src/character_cl.cpp | 3 ++- code/ryzom/client/src/interface_v3/group_html.cpp | 3 ++- code/ryzom/client/src/interface_v3/interface_manager.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index 6130f2b60..1d7c87c2a 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -4484,8 +4484,9 @@ bool CCharacterCL::isCurrentBehaviourAttackEnd() const case MBEHAV::AREA_ATTACK: return true; default: - return false; + break; } + return false; } diff --git a/code/ryzom/client/src/interface_v3/group_html.cpp b/code/ryzom/client/src/interface_v3/group_html.cpp index 30c089aae..487344508 100644 --- a/code/ryzom/client/src/interface_v3/group_html.cpp +++ b/code/ryzom/client/src/interface_v3/group_html.cpp @@ -3540,7 +3540,8 @@ int CGroupHTML::luaShowDiv(CLuaState &ls) CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING); CLuaIHM::checkArgType(ls, funcName, 2, LUA_TBOOLEAN); - if (!_Groups.empty()) { + if (!_Groups.empty()) + { for (uint i=0; i<_Groups.size(); i++) { CInterfaceGroup *group = _Groups[i]; diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index c4e238141..9762193d9 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -1390,7 +1390,7 @@ void CInterfaceManager::runActionHandler (const string &ahCmdLine, CCtrlBase *pC if(!ahUserParams.empty()) ahParams= ahUserParams; - // Execute the action hanlder + // Execute the action handler CActionHandlerFactoryManager *pAHFM = CActionHandlerFactoryManager::getInstance(); map::iterator it = pAHFM->FactoryMap.find (ahName); if (it == pAHFM->FactoryMap.end()) From d52dead6af965866b3a018fe39ff3f3b2db68259 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 14 Jun 2011 19:34:28 +0200 Subject: [PATCH 5/7] Changed: Merge changes from next patch --- .../src/interface_v3/action_handler_game.cpp | 6 ++++ .../client/src/interface_v3/dbview_number.cpp | 34 +++++++++++++++++-- .../client/src/interface_v3/dbview_number.h | 1 + .../client/src/interface_v3/guild_manager.cpp | 6 ---- 4 files changed, 39 insertions(+), 8 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index f358fa3fd..22d65d138 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -48,6 +48,7 @@ #include "view_bitmap.h" #include "action_handler_tools.h" #include "../connection.h" +#include "../client_chat_manager.h" // Game specific includes #include "../motion/user_controls.h" @@ -99,6 +100,8 @@ extern bool IsInRingSession; // Context help extern void contextHelp (const std::string &help); +extern CClientChatManager ChatMngr; + void beastOrder (const std::string &orderStr, const std::string &beastIndexStr, bool confirmFree = true); @@ -973,6 +976,9 @@ public: // Create the message for the server to execute a phrase. sendMsgToServer("GUILD:QUIT"); CGuildManager::getInstance()->closeAllInterfaces(); + + if (PeopleInterraction.TheUserChat.Filter.getTargetGroup() == CChatGroup::guild) + ChatMngr.updateChatModeAndButton(CChatGroup::say); } }; REGISTER_ACTION_HANDLER( CHandlerDoQuitGuild, "do_quit_guild"); diff --git a/code/ryzom/client/src/interface_v3/dbview_number.cpp b/code/ryzom/client/src/interface_v3/dbview_number.cpp index ebfda110e..8ca6e7c94 100644 --- a/code/ryzom/client/src/interface_v3/dbview_number.cpp +++ b/code/ryzom/client/src/interface_v3/dbview_number.cpp @@ -79,6 +79,10 @@ bool CDBViewNumber::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup) if (ptr) _Positive = convertBool(ptr); else _Positive = false; + ptr = xmlGetProp (cur, (xmlChar*)"format"); + if (ptr) _Format = convertBool(ptr); + else _Format = false; + ptr = xmlGetProp (cur, (xmlChar*)"divisor"); if (ptr) fromString((const char*)ptr, _Divisor); @@ -98,6 +102,30 @@ bool CDBViewNumber::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup) return true; } +// *************************************************************************** +// Helper function +ucstring formatThousands(const ucstring& s, const ucstring& separator) +{ + int j; + int k; + int topI = s.length() - 1; + + if (topI < 4) return s; + + ucstring ns; + do + { + for (j = topI, k = 0; j >= 0 && k < 3; --j, ++k ) + { + ns = s[j] + ns; // new char is added to front of ns + if( j > 0 && k == 2) ns = separator + ns; // j > 0 means still more digits + } + topI -= 3; + + } while(topI >= 0); + return ns; +} + // *************************************************************************** void CDBViewNumber::checkCoords() { @@ -106,8 +134,10 @@ void CDBViewNumber::checkCoords() if (_Cache != val) { _Cache= val; - if (_Positive) setText(val >= 0 ? ((string)_Prefix)+toString(val)+(string)_Suffix : "?"); - else setText( ((string)_Prefix)+toString(val)+(string)_Suffix ); + static ucstring separator = NLMISC::CI18N::get("uiThousandsSeparator"); + ucstring value = _Format ? formatThousands(toString(val), separator) : toString(val); + if (_Positive) setText(val >= 0 ? ( ucstring(_Prefix) + value + ucstring(_Suffix) ) : ucstring("?")); + else setText( ucstring(_Prefix) + value + ucstring(_Suffix) ); } } diff --git a/code/ryzom/client/src/interface_v3/dbview_number.h b/code/ryzom/client/src/interface_v3/dbview_number.h index 724209e73..1c7079f06 100644 --- a/code/ryzom/client/src/interface_v3/dbview_number.h +++ b/code/ryzom/client/src/interface_v3/dbview_number.h @@ -57,6 +57,7 @@ protected: CInterfaceProperty _Number; sint64 _Cache; bool _Positive; // only positive values are displayed + bool _Format; // the number will be formatted (like "1,000,000") if >= 10k sint64 _Divisor, _Modulo; // string to append to the value (eg: meters) CStringShared _Suffix; diff --git a/code/ryzom/client/src/interface_v3/guild_manager.cpp b/code/ryzom/client/src/interface_v3/guild_manager.cpp index 6abd0c029..c9bb4ec01 100644 --- a/code/ryzom/client/src/interface_v3/guild_manager.cpp +++ b/code/ryzom/client/src/interface_v3/guild_manager.cpp @@ -29,7 +29,6 @@ #include "group_html.h" #include "../init_main_loop.h" #include "inventory_manager.h" -#include "../client_chat_manager.h" #include "../connection.h" #include "../entity_cl.h" @@ -49,7 +48,6 @@ using namespace std; using namespace NLMISC; extern CPeopleInterraction PeopleInterraction; -extern CClientChatManager ChatMngr; NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupListAscensor, std::string, "list_sheet_guild"); @@ -541,10 +539,6 @@ void CGuildManager::closeAllInterfaces() CGroupContainer *pGuildChat = dynamic_cast(pIM->getElementFromId(WIN_GUILD_CHAT)); if (pGuildChat != NULL) pGuildChat->setActive(false); - - if (PeopleInterraction.TheUserChat.Filter.getTargetGroup() == CChatGroup::guild) - ChatMngr.updateChatModeAndButton(CChatGroup::say); - } // *************************************************************************** From 75ce27ad45e33f8348c3ab967583d0331ca8a22c Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 14 Jun 2011 20:11:17 +0200 Subject: [PATCH 6/7] Added: Option WITH_STATIC_EXTERNAL to force FIND_LIBRARY to find static libs --- code/CMakeModules/nel.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index fbd70c842..d2a5cb014 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -171,6 +171,7 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) OPTION(WITH_STATIC "With static libraries." OFF) ENDIF(WIN32) OPTION(WITH_STATIC_DRIVERS "With static drivers." OFF) + OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF) ### # GUI toolkits @@ -522,6 +523,14 @@ MACRO(SETUP_EXTERNAL) STRING(REGEX REPLACE "VC/bin/.+" "VC" VC_DIR ${CMAKE_CXX_COMPILER}) ENDIF(${CMAKE_MAKE_PROGRAM} MATCHES "Common7") ENDIF(MSVC10) + ELSE(WIN32) + IF(CMAKE_FIND_LIBRARY_SUFFIXES AND NOT APPLE) + IF(WITH_STATIC_EXTERNAL) + SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + ELSE(WITH_STATIC_EXTERNAL) + SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so") + ENDIF(WITH_STATIC_EXTERNAL AND NOT APPLE) + ENDIF(CMAKE_FIND_LIBRARY_SUFFIXES) ENDIF(WIN32) IF(WITH_STLPORT) From 68ab06f7c0750b1889b901e681c3c8ad9bc9f5d3 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 14 Jun 2011 20:11:44 +0200 Subject: [PATCH 7/7] Changed: Updated client_default.cfg.in from client_default.cfg --- code/ryzom/client/client_default.cfg.in | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/code/ryzom/client/client_default.cfg.in b/code/ryzom/client/client_default.cfg.in index dad9e3ccb..8ae0117a5 100644 --- a/code/ryzom/client/client_default.cfg.in +++ b/code/ryzom/client/client_default.cfg.in @@ -239,14 +239,14 @@ SkinNbMaxPoly_ps1 = 70000; SkinNbMaxPoly_ps2 = 100000; SkinNbMaxPoly_ps3 = 200000; -NbMaxSkeletonNotCLod = 50; +NbMaxSkeletonNotCLod = 125; NbMaxSkeletonNotCLod_min = 5; -NbMaxSkeletonNotCLod_max = 100; +NbMaxSkeletonNotCLod_max = 255; NbMaxSkeletonNotCLod_step = 5; NbMaxSkeletonNotCLod_ps0 = 10; -NbMaxSkeletonNotCLod_ps1 = 25; -NbMaxSkeletonNotCLod_ps2 = 50; -NbMaxSkeletonNotCLod_ps3 = 100; +NbMaxSkeletonNotCLod_ps1 = 50; +NbMaxSkeletonNotCLod_ps2 = 125; +NbMaxSkeletonNotCLod_ps3 = 255; CharacterFarClip = 200.0; CharacterFarClip_min = 50.0; @@ -386,21 +386,21 @@ SystemInfoColors = }; PrintfCommands = { - "52", "15", "55 55 0 255", "28", "uiChapterIV", "624", + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", "428", "0 0 0 255", "18", "", "624", "378", "0 0 0 255", "14", "", "644", "278", "0 0 0 255", "18", "", "52", "17", "255 255 255 255", "28", - "uiChapterIV", "622", "430", "255 255 255 255", "18", "", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", "622", "380", "255 255 255 255", "14", "", "642", "280", "255 255 255 255", "18", "" }; PrintfCommandsFreeTrial = { - "52", "15", "55 55 0 255", "28", "uiChapterIV", "624", + "52", "15", "55 55 0 255", "28", "uiChapterV", "624", "428", "0 0 0 255", "18", "", "624", "378", "0 0 0 255", "14", "", "644", "278", "0 0 0 255", "18", "", "52", "17", "255 255 255 255", "28", - "uiChapterIV", "622", "430", "255 255 255 255", "18", "", + "uiChapterV", "622", "430", "255 255 255 255", "18", "", "622", "380", "255 255 255 255", "14", "", "642", "280", "255 255 255 255", "18", "" };