summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2010-03-06 01:17:34 +0200
committerSergei Litovchuk <slitovchuk@productengine.com>2010-03-06 01:17:34 +0200
commitf499260782a0c94c4f164a743da9d2690240dad7 (patch)
tree85fdb59022619312090071dabe7f5d597ea3b669 /indra/newview
parentc4c3e6beddd1cbbe56d5654c455f8f0c73869634 (diff)
Implemented (EXT-4715) Add maturity icons to Classifieds - create and details.
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelclassified.cpp10
-rw-r--r--indra/newview/skins/default/xui/en/panel_classified_info.xml24
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_classified.xml48
3 files changed, 60 insertions, 22 deletions
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 5c6636676c..115c7a1aa5 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -1325,6 +1325,8 @@ void LLPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType t
bool mature = is_cf_mature(c_info->flags);
childSetValue("content_type", mature ? mature_str : pg_str);
+ getChild<LLIconCtrl>("content_type_moderate")->setVisible(mature);
+ getChild<LLIconCtrl>("content_type_general")->setVisible(!mature);
std::string auto_renew_str = is_cf_auto_renew(c_info->flags) ?
getString("auto_renew_on") : getString("auto_renew_off");
@@ -1369,6 +1371,8 @@ void LLPanelClassifiedInfo::resetData()
childSetText("auto_renew", LLStringUtil::null);
childSetText("creation_date", LLStringUtil::null);
childSetText("click_through_text", LLStringUtil::null);
+ getChild<LLIconCtrl>("content_type_moderate")->setVisible(FALSE);
+ getChild<LLIconCtrl>("content_type_general")->setVisible(FALSE);
}
void LLPanelClassifiedInfo::resetControls()
@@ -1787,7 +1791,7 @@ void LLPanelClassifiedEdit::processProperties(void* data, EAvatarProcessorType t
bool mature = is_cf_mature(c_info->flags);
bool auto_renew = is_cf_auto_renew(c_info->flags);
- getChild<LLComboBox>("content_type")->setCurrentByIndex(mature ? CB_ITEM_MATURE : CB_ITEM_PG);
+ getChild<LLIconsComboBox>("content_type")->setCurrentByIndex(mature ? CB_ITEM_MATURE : CB_ITEM_PG);
childSetValue("auto_renew", auto_renew);
childSetValue("price_for_listing", c_info->price_for_listing);
childSetEnabled("price_for_listing", isNew());
@@ -1846,7 +1850,7 @@ void LLPanelClassifiedEdit::resetControls()
LLPanelClassifiedInfo::resetControls();
getChild<LLComboBox>("category")->setCurrentByIndex(0);
- getChild<LLComboBox>("content_type")->setCurrentByIndex(0);
+ getChild<LLIconsComboBox>("content_type")->setCurrentByIndex(0);
childSetValue("auto_renew", false);
childSetValue("price_for_listing", MINIMUM_PRICE_FOR_LISTING);
childSetEnabled("price_for_listing", TRUE);
@@ -1910,7 +1914,7 @@ U8 LLPanelClassifiedEdit::getFlags()
{
bool auto_renew = childGetValue("auto_renew").asBoolean();
- LLComboBox* content_cb = getChild<LLComboBox>("content_type");
+ LLComboBox* content_cb = getChild<LLIconsComboBox>("content_type");
bool mature = content_cb->getCurrentIndex() == CB_ITEM_MATURE;
return pack_classified_flags_request(auto_renew, false, mature, false);
diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml
index e71498f2f8..e3b331799c 100644
--- a/indra/newview/skins/default/xui/en/panel_classified_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml
@@ -156,6 +156,24 @@
top_pad="10"
value="Content Type:"
width="140" />
+ <icon
+ follows="top|left"
+ height="16"
+ image_name="Parcel_M_Light"
+ layout="topleft"
+ left_pad="0"
+ name="content_type_moderate"
+ top_pad="-11"
+ width="18" />
+ <icon
+ follows="top|left"
+ height="16"
+ image_name="Parcel_PG_Light"
+ layout="topleft"
+ left_delta="0"
+ name="content_type_general"
+ top_delta="0"
+ width="18" />
<text_editor
allow_scroll="false"
bg_visible="false"
@@ -163,11 +181,11 @@
h_pad="0"
height="18"
layout="topleft"
- left_pad="0"
+ left_pad="2"
name="content_type"
read_only="true"
- width="150"
- top_pad="-10"
+ width="130"
+ top_delta="1"
v_pad="0"
value="[content type]" />
<text
diff --git a/indra/newview/skins/default/xui/en/panel_edit_classified.xml b/indra/newview/skins/default/xui/en/panel_edit_classified.xml
index c1b352031f..74d63ab328 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_classified.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_classified.xml
@@ -217,25 +217,41 @@
top_pad="15"
value="Content type:"
width="250" />
- <combo_box
- allow_text_entry="false"
- follows="left|top"
- height="23"
+ <icons_combo_box
+ follows="left|top"
+ height="23"
+ label="General Content"
+ layout="topleft"
left="10"
- name="content_type"
+ name="content_type"
top_pad="5"
width="156">
- <combo_item
- name="mature_ci"
- value="Mature">
- Moderate Content
- </combo_item>
- <combo_item
- name="pg_ci"
- value="PG">
- General Content
- </combo_item>
- </combo_box>
+ <icons_combo_box.drop_down_button
+ image_overlay="Parcel_PG_Light"
+ image_overlay_alignment="left"
+ imgoverlay_label_space="3"
+ pad_left="3"/>
+ <icons_combo_box.item
+ label="Moderate Content"
+ name="mature_ci"
+ value="Mature">
+ <item.columns
+ halign="center"
+ type="icon"
+ value="Parcel_M_Light"
+ width="20"/>
+ </icons_combo_box.item>
+ <icons_combo_box.item
+ label="General Content"
+ name="pg_ci"
+ value="PG">
+ <item.columns
+ halign="center"
+ type="icon"
+ value="Parcel_PG_Light"
+ width="20"/>
+ </icons_combo_box.item>
+ </icons_combo_box>
<text
follows="left|top"
font.style="BOLD"