From b04ca1b069108292d79f47b5ce855028bb5394e0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 22 Jun 2010 10:49:22 +0100 Subject: fix java-esque build error in llstartup change. --- indra/newview/llstartup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index 5aa46686e8..cf3c030f08 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -93,7 +93,7 @@ public: // Load default fonts not already loaded at start screen static void fontInit(); - static void LLStartUp::copyLibraryGestures(const std::string& same_gender_gestures); + static void copyLibraryGestures(const std::string& same_gender_gestures); // outfit_folder_name can be a folder anywhere in your inventory, // but the name must be a case-sensitive exact match. -- cgit v1.2.3 From fefe6448d726b331b5fded435c3713afd388b220 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 22 Jun 2010 10:53:56 +0100 Subject: EXT-4919 WIP Fix build breakage on Linux. --- indra/newview/llstartup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index 5aa46686e8..cf3c030f08 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -93,7 +93,7 @@ public: // Load default fonts not already loaded at start screen static void fontInit(); - static void LLStartUp::copyLibraryGestures(const std::string& same_gender_gestures); + static void copyLibraryGestures(const std::string& same_gender_gestures); // outfit_folder_name can be a folder anywhere in your inventory, // but the name must be a case-sensitive exact match. -- cgit v1.2.3 From 7295e1ee034b3163b2f1c9f4aa11695beb7db8b0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 22 Jun 2010 11:07:35 +0100 Subject: EXT-7889 PARTIAL Linux fails to load splash screen and side panel home tab. Start to restore manual glib handling. Backed out changeset ff86a9f5b917 --- indra/llwindow/llwindowsdl.cpp | 2 +- indra/media_plugins/webkit/CMakeLists.txt | 11 +++++++++- indra/media_plugins/webkit/media_plugin_webkit.cpp | 24 ++++++++++++++++++---- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index bfdf1147a1..f9c3694459 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -1617,7 +1617,7 @@ void LLWindowSDL::processMiscNativeEvents() pump_timer.setTimerExpirySec(1.0f / 15.0f); do { // Always do at least one non-blocking pump - gtk_main_iteration_do(0); + gtk_main_iteration_do(FALSE); } while (gtk_events_pending() && !pump_timer.hasExpired()); diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt index 5bccd589d8..812760a116 100644 --- a/indra/media_plugins/webkit/CMakeLists.txt +++ b/indra/media_plugins/webkit/CMakeLists.txt @@ -9,6 +9,7 @@ include(LLPlugin) include(LLMath) include(LLRender) include(LLWindow) +include(UI) include(Linking) include(PluginAPI) include(MediaPluginBase) @@ -38,7 +39,7 @@ add_library(media_plugin_webkit ${media_plugin_webkit_SOURCE_FILES} ) -target_link_libraries(media_plugin_webkit +set(media_plugin_webkit_LINK_LIBRARIES ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} ${LLCOMMON_LIBRARIES} @@ -46,6 +47,14 @@ target_link_libraries(media_plugin_webkit ${PLUGIN_API_WINDOWS_LIBRARIES} ) +if (LINUX) + list(APPEND media_plugin_webkit_LINK_LIBRARIES + ${UI_LIBRARIES} # for glib/GTK + ) +endif (LINUX) + +target_link_libraries(media_plugin_webkit ${media_plugin_webkit_LINK_LIBRARIES}) + add_dependencies(media_plugin_webkit ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 3c24b4ed22..b607d2f66a 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -43,15 +43,21 @@ #include "llpluginmessageclasses.h" #include "media_plugin_base.h" +#if LL_LINUX +extern "C" { +# include +} +#endif // LL_LINUX + #if LL_WINDOWS -#include +# include #else -#include -#include +# include +# include #endif #if LL_WINDOWS - // *NOTE:Mani - This captures the module handle fo rthe dll. This is used below + // *NOTE:Mani - This captures the module handle for the dll. This is used below // to get the path to this dll for webkit initialization. // I don't know how/if this can be done with apr... namespace { HMODULE gModuleHandle;}; @@ -112,6 +118,16 @@ private: // void update(int milliseconds) { +#if LL_LINUX + // pump glib generously, as Linux browser plugins are on the + // glib main loop, even if the browser itself isn't - ugh + //*TODO: shouldn't this be transparent if Qt was compiled with + // glib mainloop integration? investigate. + GMainContext *mainc = g_main_context_default(); + while(g_main_context_iteration(mainc, FALSE)); +#endif // LL_LINUX + + // pump qt LLQtWebKit::getInstance()->pump( milliseconds ); checkEditState(); -- cgit v1.2.3 From 68c5a7f25cf92c896a6c6a3e431ab4917a14915d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 22 Jun 2010 12:20:45 +0100 Subject: EXT-7889 FIXED Linux fails to load splash screen and side panel home tab. --- indra/media_plugins/webkit/linux_volume_catcher.cpp | 5 +++++ indra/media_plugins/webkit/media_plugin_webkit.cpp | 17 +++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/indra/media_plugins/webkit/linux_volume_catcher.cpp b/indra/media_plugins/webkit/linux_volume_catcher.cpp index 2e7fda865e..5eaef0e1c3 100644 --- a/indra/media_plugins/webkit/linux_volume_catcher.cpp +++ b/indra/media_plugins/webkit/linux_volume_catcher.cpp @@ -47,6 +47,7 @@ extern "C" { #include +#include #include #include @@ -220,6 +221,10 @@ void VolumeCatcherImpl::init() mGotSyms = loadsyms("libpulse-mainloop-glib.so.0"); if (!mGotSyms) return; + // better make double-sure glib itself is initialized properly. + if (!g_thread_supported ()) g_thread_init (NULL); + g_type_init(); + mMainloop = llpa_glib_mainloop_new(g_main_context_default()); if (mMainloop) { diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index a9ff7bf752..3b00edec4e 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -48,6 +48,7 @@ # define LL_QTWEBKIT_USES_PIXMAPS 0 extern "C" { # include +# include } #else # define LL_QTWEBKIT_USES_PIXMAPS 0 @@ -132,14 +133,14 @@ private: // void update(int milliseconds) { -#if LL_LINUX +#if LL_QTLINUX_DOESNT_HAVE_GLIB // pump glib generously, as Linux browser plugins are on the // glib main loop, even if the browser itself isn't - ugh - //*TODO: shouldn't this be transparent if Qt was compiled with - // glib mainloop integration? investigate. + // This is NOT NEEDED if Qt itself was built with glib + // mainloop integration. GMainContext *mainc = g_main_context_default(); while(g_main_context_iteration(mainc, FALSE)); -#endif // LL_LINUX +#endif // LL_QTLINUX_DOESNT_HAVE_GLIB // pump qt LLQtWebKit::getInstance()->pump( milliseconds ); @@ -213,6 +214,14 @@ private: } std::string application_dir = std::string( cwd ); +#if LL_LINUX + // take care to initialize glib properly, because some + // versions of Qt don't, and we indirectly need it for (some + // versions of) Flash to not crash the browser. + if (!g_thread_supported ()) g_thread_init (NULL); + g_type_init(); +#endif + #if LL_DARWIN // When running under the Xcode debugger, there's a setting called "Break on Debugger()/DebugStr()" which defaults to being turned on. // This causes the environment variable USERBREAK to be set to 1, which causes these legacy calls to break into the debugger. -- cgit v1.2.3 From c19dd3d2c48c99f36ff2b6616e7e048ce30d81ad Mon Sep 17 00:00:00 2001 From: Vladimir Pchelko Date: Tue, 22 Jun 2010 18:41:40 +0300 Subject: EXT-7805 FIXED set tool_tip for "plus" button when body_part is selected in "Add more" panel (Edit Outfit) Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/626/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 70 ++++++++++++++-------- indra/newview/llpaneloutfitedit.h | 5 +- .../skins/default/xui/en/panel_outfit_edit.xml | 3 + 3 files changed, 50 insertions(+), 28 deletions(-) diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 6b5eb23a9b..aac020087b 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -252,7 +252,8 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() mInitialized(false), mAddWearablesPanel(NULL), mFolderViewFilterCmbBox(NULL), - mListViewFilterCmbBox(NULL) + mListViewFilterCmbBox(NULL), + mPlusBtn(NULL) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); @@ -343,9 +344,9 @@ BOOL LLPanelOutfitEdit::postBuild() mInventoryItemsPanel = getChild("folder_view"); mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK); mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); - mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); - + mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); + mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); + mCOFDragAndDropObserver = new LLCOFDragAndDropObserver(mInventoryItemsPanel->getModel()); mFolderViewFilterCmbBox = getChild("folder_view_filter_combobox"); @@ -371,7 +372,8 @@ BOOL LLPanelOutfitEdit::postBuild() childSetAction("show_add_wearables_btn", boost::bind(&LLPanelOutfitEdit::onAddMoreButtonClicked, this)); - childSetAction("plus_btn", boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this)); + mPlusBtn = getChild("plus_btn"); + mPlusBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this)); mEditWearableBtn = getChild("edit_wearable_btn"); mEditWearableBtn->setEnabled(FALSE); @@ -382,6 +384,8 @@ BOOL LLPanelOutfitEdit::postBuild() mWearablesListViewPanel = getChild("filtered_wearables_panel"); mWearableItemsList = getChild("list_view"); + mWearableItemsList->setCommitOnSelectionChange(true); + mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this)); return TRUE; @@ -559,21 +563,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) void LLPanelOutfitEdit::onPlusBtnClicked(void) { - LLUUID selected_id; - if (mInventoryItemsPanel->getVisible()) - { - LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); - if (!curr_item) return; - - LLFolderViewEventListener* listenerp = curr_item->getListener(); - if (!listenerp) return; - - selected_id = listenerp->getUUID(); - } - else if (mWearablesListViewPanel->getVisible()) - { - selected_id = mWearableItemsList->getSelectedUUID(); - } + LLUUID selected_id = getSelectedItemUUID(); if (selected_id.isNull()) return; @@ -658,22 +648,28 @@ void LLPanelOutfitEdit::onEditWearableClicked(void) } } -void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque &items, BOOL user_action) +void LLPanelOutfitEdit::onInventorySelectionChange() { - LLFolderViewItem* current_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); - if (!current_item) + LLUUID item_uuid = getSelectedItemUUID(); + if (item_uuid.isNull()) { return; } - LLViewerInventoryItem* item = current_item->getInventoryItem(); - if (!item) return; + LLViewerInventoryItem* item(gInventory.getItem(item_uuid)); + if (!item) + { + return; + } switch (item->getType()) { - case LLAssetType::AT_CLOTHING: case LLAssetType::AT_BODYPART: + mPlusBtn->setToolTip(getString("replace_body_part")); + break; + case LLAssetType::AT_CLOTHING: case LLAssetType::AT_OBJECT: + mPlusBtn->setToolTip(LLStringUtil::null); default: break; } @@ -934,4 +930,26 @@ void LLPanelOutfitEdit::onOutfitChanging(bool started) indicator->setVisible(started); } +LLUUID LLPanelOutfitEdit::getSelectedItemUUID() +{ + LLUUID selected_id; + if (mInventoryItemsPanel->getVisible()) + { + LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); + if (!curr_item) return selected_id; + + LLFolderViewEventListener* listenerp = curr_item->getListener(); + if (!listenerp) return selected_id; + + selected_id = listenerp->getUUID(); + } + else if (mWearablesListViewPanel->getVisible()) + { + selected_id = mWearableItemsList->getSelectedUUID(); + } + + return selected_id; +} + + // EOF diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index f449fbca27..aa5d00903a 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -145,7 +145,7 @@ public: void onFolderViewFilterCommitted(LLUICtrl* ctrl); void onListViewFilterCommitted(LLUICtrl* ctrl); void onSearchEdit(const std::string& string); - void onInventorySelectionChange(const std::deque &items, BOOL user_action); + void onInventorySelectionChange(); void onPlusBtnClicked(void); void applyFolderViewFilter(EFolderViewItemType type); @@ -192,7 +192,7 @@ private: void onAddMoreButtonClicked(); void showFilteredWearablesListView(LLWearableType::EType type); void onOutfitChanging(bool started); - + LLUUID getSelectedItemUUID(); LLTextBox* mCurrentOutfitName; LLTextBox* mStatus; @@ -203,6 +203,7 @@ private: LLButton* mEditWearableBtn; LLButton* mFolderViewBtn; LLButton* mListViewBtn; + LLButton* mPlusBtn; LLPanel* mAddWearablesPanel; LLComboBox* mFolderViewFilterCmbBox; diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index 819ba7f878..d6549adfef 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -54,6 +54,9 @@ +