Merge branch 'animesh' of https://github.com/Lirusaito/SingularityViewer into animesh
This commit is contained in:
@@ -386,9 +386,15 @@ const std::string& LLTextEditor::getMenuSegmentUrl() const
|
||||
|
||||
static LLTextEditor* get_focused_text_editor()
|
||||
{
|
||||
auto* list = dynamic_cast<LLTextEditor*>(gFocusMgr.getKeyboardFocus());
|
||||
llassert(list); // This listener only applies to lists
|
||||
return list;
|
||||
auto* te =
|
||||
#ifdef SHOW_ASSERT
|
||||
dynamic_cast<LLTextEditor*>
|
||||
#else
|
||||
static_cast<LLTextEditor*>
|
||||
#endif
|
||||
(gFocusMgr.getKeyboardFocus());
|
||||
llassert(te); // This listener only applies to text editors
|
||||
return te;
|
||||
}
|
||||
|
||||
class ContextText : public LLMemberListener<LLView>
|
||||
|
||||
@@ -140,15 +140,19 @@ void setTimeDateFormats(const S8& tempTimeFormat, const S8& tempDateFormat)
|
||||
{
|
||||
short_time = "%R";
|
||||
long_time = "%T";
|
||||
timestamp += " %T";
|
||||
if (!timestamp.empty()) timestamp += " %T";
|
||||
}
|
||||
else
|
||||
{
|
||||
short_time = "%I:%M %p";
|
||||
long_time = "%I:%M:%S %p";
|
||||
timestamp += " %I:%M %p";
|
||||
if (!timestamp.empty()) timestamp += " %I:%M %p";
|
||||
}
|
||||
}
|
||||
else if (!timestamp.empty())
|
||||
{
|
||||
timestamp += ' ' + gSavedSettings.getString("ShortTimeFormat");
|
||||
}
|
||||
|
||||
if (!short_date.empty())
|
||||
{
|
||||
|
||||
@@ -9038,30 +9038,36 @@ class VisibleNotSecondLife : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
LLScrollListCtrl* get_focused_list()
|
||||
template<typename T> T* get_focused()
|
||||
{
|
||||
LLScrollListCtrl* list = dynamic_cast<LLScrollListCtrl*>(gFocusMgr.getKeyboardFocus());
|
||||
llassert(list); // This listener only applies to lists
|
||||
return list;
|
||||
T* t =
|
||||
#ifdef SHOW_ASSERT
|
||||
dynamic_cast<T*>
|
||||
#else
|
||||
static_cast<T*>
|
||||
#endif
|
||||
(gFocusMgr.getKeyboardFocus());
|
||||
llassert(t); // This listener only applies to T
|
||||
return t;
|
||||
}
|
||||
|
||||
S32 get_focused_list_num_selected()
|
||||
{
|
||||
if (LLScrollListCtrl* list = get_focused_list())
|
||||
if (auto list = get_focused<LLScrollListCtrl>())
|
||||
return list->getNumSelected();
|
||||
return 0;
|
||||
}
|
||||
|
||||
const LLUUID get_focused_list_id_selected()
|
||||
{
|
||||
if (LLScrollListCtrl* list = get_focused_list())
|
||||
if (auto list = get_focused<LLScrollListCtrl>())
|
||||
return list->getStringUUIDSelectedItem();
|
||||
return LLUUID::null;
|
||||
}
|
||||
|
||||
const uuid_vec_t get_focused_list_ids_selected()
|
||||
{
|
||||
if (LLScrollListCtrl* list = get_focused_list())
|
||||
if (auto list = get_focused<LLScrollListCtrl>())
|
||||
return list->getSelectedIDs();
|
||||
return uuid_vec_t();
|
||||
}
|
||||
@@ -9109,7 +9115,7 @@ class ListEnableCall : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLScrollListCtrl* list = get_focused_list();
|
||||
auto list = get_focused<LLScrollListCtrl>();
|
||||
if (!list) return false;
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAvatarActions::canCall());
|
||||
return true;
|
||||
@@ -9517,18 +9523,11 @@ struct MenuSLURLDict : public LLSingleton<MenuSLURLDict>
|
||||
}
|
||||
};
|
||||
|
||||
LLMediaCtrl* get_focused_media_ctrl()
|
||||
{
|
||||
auto media_ctrl = dynamic_cast<LLMediaCtrl*>(gFocusMgr.getKeyboardFocus());
|
||||
llassert(media_ctrl); // This listener only applies to media_ctrls
|
||||
return media_ctrl;
|
||||
}
|
||||
|
||||
class MediaCtrlCopyURL : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
get_focused_media_ctrl()->onCopyURL();
|
||||
get_focused<LLMediaCtrl>()->onCopyURL();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -9537,7 +9536,7 @@ class MediaCtrlWebInspector : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
get_focused_media_ctrl()->onOpenWebInspector();
|
||||
get_focused<LLMediaCtrl>()->onOpenWebInspector();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -9546,7 +9545,7 @@ class MediaCtrlViewSource : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
get_focused_media_ctrl()->onShowSource();
|
||||
get_focused<LLMediaCtrl>()->onShowSource();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<text bg_visible="false" border_drop_shadow_visible="false"
|
||||
border_visible="true" bottom_delta="0" drop_shadow_visible="true"
|
||||
follows="left|top" font="SansSerifSmall" height="48" left_delta="0"
|
||||
mouse_opaque="false" name="acct" width="136" />
|
||||
mouse_opaque="true" name="acct" width="136" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="0"
|
||||
|
||||
@@ -166,7 +166,7 @@ rápido
|
||||
Alto
|
||||
</radio_item>
|
||||
</radio_group>
|
||||
<button label="Configurações Recomendadas" name="Defaults" width="190" left="110"/>
|
||||
<button label="Configurações Recomendadas" name="Defaults" width="190"/>
|
||||
<button label="Opções de Hardware" label_selected="Opções de Hardware" name="GraphicsHardwareButton"/>
|
||||
<string name="resolution_format">
|
||||
[RES_X] x [RES_Y]
|
||||
|
||||
Reference in New Issue
Block a user