diff options
| -rw-r--r-- | indra/llxuixml/llinitparam.h | 13 | ||||
| -rw-r--r-- | indra/newview/llagentwearables.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/llfilepicker.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llfloatertranslationsettings.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llfolderviewitem.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llgrouplist.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llgrouplist.h | 1 | ||||
| -rw-r--r-- | indra/newview/llnearbychatbar.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llnearbychatbar.h | 2 | ||||
| -rw-r--r-- | indra/newview/llviewermenufile.cpp | 18 | ||||
| -rwxr-xr-x | indra/newview/llviewermessage.cpp | 17 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_nearby_chat.xml | 84 | 
12 files changed, 128 insertions, 45 deletions
| diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index ab20957760..4ab1d891a3 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -1253,15 +1253,16 @@ namespace LLInitParam  			return mValues.back();  		} -		void add(const value_t& item) +		self_t& add(const value_t& item)  		{  			param_value_t param_value;  			param_value.setValue(item);  			mValues.push_back(param_value);  			setProvided(); +			return *this;  		} -		void add(const typename name_value_lookup_t::name_t& name) +		self_t& add(const typename name_value_lookup_t::name_t& name)  		{  			value_t value; @@ -1271,6 +1272,8 @@ namespace LLInitParam  				add(value);  				mValues.back().setValueName(name);  			} + +			return *this;  		}  		// implicit conversion @@ -1441,13 +1444,14 @@ namespace LLInitParam  			return mValues.back();  		} -		void add(const value_t& item) +		self_t& add(const value_t& item)  		{  			mValues.push_back(item);  			setProvided(); +			return *this;  		} -		void add(const typename name_value_lookup_t::name_t& name) +		self_t& add(const typename name_value_lookup_t::name_t& name)  		{  			value_t value; @@ -1457,6 +1461,7 @@ namespace LLInitParam  				add(value);  				mValues.back().setValueName(name);  			} +			return *this;  		}  		// implicit conversion diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 13b62cb019..dd7e509e8d 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -816,7 +816,10 @@ void LLAgentWearables::popWearable(const LLWearableType::EType type, U32 index)  	if (wearable)  	{  		mWearableDatas[type].erase(mWearableDatas[type].begin() + index); -		gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE); +		if (isAgentAvatarValid()) +		{ +			gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE); +		}  		wearable->setLabelUpdated();  	}  } diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 8024755e86..360e35f6d3 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -1073,8 +1073,11 @@ void LLFilePicker::chooser_responder(GtkWidget *widget, gint response, gpointer  	}  	// set the default path for this usage context. -	picker->mContextToPathMap[picker->mCurContextName] = -		gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(widget)); +	const char* cur_folder = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(widget)); +	if (cur_folder != NULL) +	{ +		picker->mContextToPathMap[picker->mCurContextName] = cur_folder; +	}  	gtk_widget_destroy(widget);  	gtk_main_quit(); diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp index 428a02e9f0..1a17183efd 100644 --- a/indra/newview/llfloatertranslationsettings.cpp +++ b/indra/newview/llfloatertranslationsettings.cpp @@ -293,6 +293,6 @@ void LLFloaterTranslationSettings::onBtnOK()  	gSavedSettings.setString("TranslationService", getSelectedService());  	gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey());  	gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey()); -	LLNearbyChatBar::getInstance()->enableTranslationCheckbox(LLTranslate::isTranslationConfigured()); +	LLNearbyChatBar::getInstance()->showTranslationCheckbox(LLTranslate::isTranslationConfigured());  	closeFloater(false);  } diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 8d6114c887..9944a9dd3d 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -423,7 +423,7 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation)  		: 0;  	if (mLabelWidthDirty)  	{ -		mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mSearchableLabel);  +		mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mLabel) + getLabelFontForStyle(mLabelStyle)->getWidth(mLabelSuffix);   		mLabelWidthDirty = false;  	} diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index bbf66ca750..129cddda45 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -123,6 +123,22 @@ BOOL LLGroupList::handleRightMouseDown(S32 x, S32 y, MASK mask)  	return handled;  } +// virtual +BOOL LLGroupList::handleDoubleClick(S32 x, S32 y, MASK mask) +{ +	BOOL handled = LLView::handleDoubleClick(x, y, mask); +	// Handle double click only for the selected item in the list, skip clicks on empty space. +	if (handled) +	{ +		if (mDoubleClickSignal) +		{ +			(*mDoubleClickSignal)(this, x, y, mask); +		} +	} + +	return handled; +} +  void LLGroupList::setNameFilter(const std::string& filter)  {  	std::string filter_upper = filter; diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index d7051db891..8abf14b3d0 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -51,6 +51,7 @@ public:  	virtual void draw(); // from LLView  	/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); // from LLView +	/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); // from LLView  	void setNameFilter(const std::string& filter);  	void toggleIcons(); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 4512c14b7a..b4224e30e6 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -124,7 +124,7 @@ BOOL LLNearbyChatBar::postBuild()  // virtual  void LLNearbyChatBar::onOpen(const LLSD& key)  { -	enableTranslationCheckbox(LLTranslate::isTranslationConfigured()); +	showTranslationCheckbox(LLTranslate::isTranslationConfigured());  }  bool LLNearbyChatBar::applyRectControl() @@ -170,9 +170,9 @@ void LLNearbyChatBar::showHistory()  	}  } -void LLNearbyChatBar::enableTranslationCheckbox(BOOL enable) +void LLNearbyChatBar::showTranslationCheckbox(BOOL show)  { -	getChild<LLUICtrl>("translate_chat_checkbox")->setEnabled(enable); +	getChild<LLUICtrl>("translate_chat_checkbox_lp")->setVisible(show);  }  void LLNearbyChatBar::draw() diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index baf12a06ea..8547cf0bce 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -61,7 +61,7 @@ public:  	static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);  	void showHistory(); -	void enableTranslationCheckbox(BOOL enable); +	void showTranslationCheckbox(BOOL show);  	/*virtual*/void setMinimized(BOOL b);  protected: diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 7e830e14bf..8ee514e7c2 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -527,8 +527,22 @@ class LLFileTakeSnapshotToDisk : public view_listener_t  									   FALSE))  		{  			gViewerWindow->playSnapshotAnimAndSound(); -			 -			LLPointer<LLImageFormatted> formatted = new LLImagePNG; +			LLPointer<LLImageFormatted> formatted; +			switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))) +			{ +			case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG: +				formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality")); +				break; +			case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: +				formatted = new LLImagePNG; +				break; +			case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP: +				formatted = new LLImageBMP; +				break; +			default: +				llwarns << "Unknown Local Snapshot format" << llendl; +				return true; +			}  			formatted->enableOverSize() ;  			formatted->encode(raw, 0);  			formatted->disableOverSize() ; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6bb13bb8d7..716f47150e 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -135,6 +135,7 @@ extern BOOL gDebugClicks;  // function prototypes  bool check_offer_throttle(const std::string& from_name, bool check_only); +bool check_asset_previewable(const LLAssetType::EType asset_type);  static void process_money_balance_reply_extended(LLMessageSystem* msg);  //inventory offer throttle globals @@ -1147,7 +1148,18 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)  		}  	}  } -  + +// Return "true" if we have a preview method for that asset type, "false" otherwise +bool check_asset_previewable(const LLAssetType::EType asset_type) +{ +	return	(asset_type == LLAssetType::AT_NOTECARD)  ||  +			(asset_type == LLAssetType::AT_LANDMARK)  || +			(asset_type == LLAssetType::AT_TEXTURE)   || +			(asset_type == LLAssetType::AT_ANIMATION) || +			(asset_type == LLAssetType::AT_SCRIPT)    || +			(asset_type == LLAssetType::AT_SOUND); +} +  void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name)  {  	for (uuid_vec_t::const_iterator obj_iter = objects.begin(); @@ -1171,7 +1183,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam  		// Either an inventory item or a category.  		const LLInventoryItem* item = dynamic_cast<const LLInventoryItem*>(obj); -		if (item) +		if (item && check_asset_previewable(asset_type))  		{  			////////////////////////////////////////////////////////////////////////////////  			// Special handling for various types. @@ -1246,6 +1258,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam  						LLFloaterReg::showInstance("preview_sound", LLSD(obj_id), take_focus);  						break;  					default: +						LL_DEBUGS("Messaging") << "No preview method for previewable asset type : " << LLAssetType::lookupHumanReadable(asset_type)  << LL_ENDL;  						break;  				}  			} diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml index d492f9bd68..6cfd929bc0 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat.xml @@ -1,35 +1,63 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?>  <panel - height="300"   follows="all" + height="300" + help_topic="nearby_chat"   layout="topleft"   name="nearby_chat" - help_topic="nearby_chat"   width="320"> -            <check_box -             bottom_delta="36" -             control_name="TranslateChat" -             enabled="true" -             height="16" -             label="Translate chat" -             layout="topleft" -             left="5" -             name="translate_chat_checkbox" -             width="230" /> -  <chat_history -    parse_urls="true" -    bg_readonly_color="ChatHistoryBgColor" -    bg_writeable_color="ChatHistoryBgColor" -    follows="all" -    left="5" -    top_delta="17" -    layout="topleft" -    height="260" -    name="chat_history" -    parse_highlights="true" -    text_color="ChatHistoryTextColor" -    text_readonly_color="ChatHistoryTextColor" -    right_widget_pad="5" -    left_widget_pad="0" -    width="315" /> +  <layout_stack +   follows="left|top|right" +   height="295" +   layout="topleft" +   left="0" +   name="stack" +   top="5" +   orientation="vertical" +   width="320"> +    <layout_panel +     auto_resize="false" +     height="26" +     layout="topleft" +     left_delta="0" +     name="translate_chat_checkbox_lp" +     top_delta="0" +     visible="true" +     width="313"> +      <check_box +       top="10" +       control_name="TranslateChat" +       enabled="true" +       height="16" +       label="Translate chat" +       layout="topleft" +       left="5" +       name="translate_chat_checkbox" +       width="300" /> +    </layout_panel> +    <layout_panel +     auto_resize="true" +     height="277" +     left_delta="0" +     layout="topleft" +     name="chat_history_lp" +     width="318"> +      <chat_history +       bg_readonly_color="ChatHistoryBgColor" +       bg_writeable_color="ChatHistoryBgColor" +       follows="all" +       layout="topleft" +       left="5" +       left_widget_pad="0" +       height="272" +       name="chat_history" +       parse_highlights="true" +       parse_urls="true" +       right_widget_pad="5" +       text_color="ChatHistoryTextColor" +       text_readonly_color="ChatHistoryTextColor" +       top="0" +       width="313" /> +    </layout_panel> +  </layout_stack>  </panel> | 
