Enable Multiselect in groups, and enable EditMenuHandler when a scrollable list is focused!
Allows Ctrl-A to select all in a list (Like for selecting all groups and unticking chat with a single click) Ctrl-E to deselect Ctrl-X/Ctrl-C to copy a list (useful for saving ban lists and such!)
This commit is contained in:
@@ -3214,6 +3214,11 @@ void LLScrollListCtrl::setFocus(BOOL b)
|
|||||||
selectFirstItem();
|
selectFirstItem();
|
||||||
//onCommit(); // SJB: selectFirstItem() will call onCommit() if appropriate
|
//onCommit(); // SJB: selectFirstItem() will call onCommit() if appropriate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Singu Note: Edit menu handler, y'know for Ctrl-A and such!
|
||||||
|
if (b) gEditMenuHandler = this;
|
||||||
|
else if (gEditMenuHandler == this) gEditMenuHandler = NULL;
|
||||||
|
|
||||||
LLUICtrl::setFocus(b);
|
LLUICtrl::setFocus(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -231,21 +231,20 @@ BOOL LLPanelGroups::postBuild()
|
|||||||
|
|
||||||
void LLPanelGroups::enableButtons()
|
void LLPanelGroups::enableButtons()
|
||||||
{
|
{
|
||||||
LLCtrlListInterface *group_list = childGetListInterface("group list");
|
getChildView("Create")->setEnabled(gAgent.mGroups.count() < gHippoLimits->getMaxAgentGroups());
|
||||||
|
LLScrollListCtrl* group_list = getChild<LLScrollListCtrl>("group list");
|
||||||
|
if (!group_list) return;
|
||||||
LLUUID group_id;
|
LLUUID group_id;
|
||||||
if (group_list)
|
if (group_list->getNumSelected() == 1)
|
||||||
{
|
{
|
||||||
group_id = group_list->getCurrentID();
|
group_id = group_list->getCurrentID();
|
||||||
}
|
getChildView("Activate")->setEnabled(group_id != gAgent.getGroupID());
|
||||||
|
|
||||||
if(group_id != gAgent.getGroupID())
|
|
||||||
{
|
|
||||||
getChildView("Activate")->setEnabled(TRUE);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
getChildView("Activate")->setEnabled(FALSE);
|
getChildView("Activate")->setEnabled(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (group_id.notNull())
|
if (group_id.notNull())
|
||||||
{
|
{
|
||||||
getChildView("Info")->setEnabled(TRUE);
|
getChildView("Info")->setEnabled(TRUE);
|
||||||
@@ -258,7 +257,6 @@ void LLPanelGroups::enableButtons()
|
|||||||
getChildView("IM")->setEnabled(FALSE);
|
getChildView("IM")->setEnabled(FALSE);
|
||||||
getChildView("Leave")->setEnabled(FALSE);
|
getChildView("Leave")->setEnabled(FALSE);
|
||||||
}
|
}
|
||||||
getChildView("Create")->setEnabled(gAgent.mGroups.count() < gHippoLimits->getMaxAgentGroups());
|
|
||||||
getChildView("Invite...")->setEnabled(group_id.notNull() && gAgent.hasPowerInGroup(group_id, GP_MEMBER_INVITE));
|
getChildView("Invite...")->setEnabled(group_id.notNull() && gAgent.hasPowerInGroup(group_id, GP_MEMBER_INVITE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<scroll_list background_visible="true" bottom="45" column_padding="0" draw_border="true"
|
<scroll_list background_visible="true" bottom="45" column_padding="0" draw_border="true"
|
||||||
draw_heading="true" draw_stripes="true" enabled="true"
|
draw_heading="true" draw_stripes="true" enabled="true"
|
||||||
follows="left|top|right|bottom" left="10" mouse_opaque="true"
|
follows="left|top|right|bottom" left="10" mouse_opaque="true"
|
||||||
multi_select="false" name="group list" tab_stop="true" top="-10"
|
multi_select="true" name="group list" tab_stop="true" top="-10"
|
||||||
width="240">
|
width="240">
|
||||||
<column dynamicwidth="true" label="Name" name="name" tool_tip="Name" />
|
<column dynamicwidth="true" label="Name" name="name" tool_tip="Name" />
|
||||||
<!--<column label="Active" name="is_active_group"
|
<!--<column label="Active" name="is_active_group"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<scroll_list background_visible="true" bottom="109" column_padding="0" draw_border="true"
|
<scroll_list background_visible="true" bottom="109" column_padding="0" draw_border="true"
|
||||||
draw_heading="true" draw_stripes="true" enabled="true"
|
draw_heading="true" draw_stripes="true" enabled="true"
|
||||||
follows="left|top|right|bottom" left="5" mouse_opaque="true"
|
follows="left|top|right|bottom" left="5" mouse_opaque="true"
|
||||||
multi_select="false" name="group list" tab_stop="true" top="-10"
|
multi_select="true" name="group list" tab_stop="true" top="-10"
|
||||||
width="340">
|
width="340">
|
||||||
<column dynamicwidth="true" label="Name" name="name" tool_tip="Name" />
|
<column dynamicwidth="true" label="Name" name="name" tool_tip="Name" />
|
||||||
<!--<column label="Active" name="is_active_group"
|
<!--<column label="Active" name="is_active_group"
|
||||||
|
|||||||
Reference in New Issue
Block a user