Skip to content

Commit

Permalink
Make Linux happy. And finish FIXME in tabcontainer to remove hardcode…
Browse files Browse the repository at this point in the history
…d strings.

Translators: Please translatetab_tooltip_prev and tab_tooltip_next in strings.xml
  • Loading branch information
LiruMouse committed Oct 5, 2015
1 parent bc0709b commit 3d46baa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
7 changes: 4 additions & 3 deletions indra/llui/llaccordionctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class LLAccordionCtrl: public LLPanel
virtual bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const = 0;
};

/* Singu TODO: LLPanel::Params, LLTextBox::Params
#if 0 // Singu TODO: LLPanel::Params, LLTextBox::Params
struct Params
: public LLInitParam::Block<Params, LLPanel::Params>
{
Expand All @@ -73,7 +73,7 @@ class LLAccordionCtrl: public LLPanel
accordion tabs are responsible for scrolling their content.
*NOTE fit_parent works best when combined with single_expansion.
Accordion view should implement getRequiredRect() and provide valid height*/
/*Optional<LLTextBox::Params> no_matched_tabs_text;
Optional<LLTextBox::Params> no_matched_tabs_text;
Optional<LLTextBox::Params> no_visible_tabs_text;

Params()
Expand All @@ -84,7 +84,8 @@ class LLAccordionCtrl: public LLPanel
{};
};

LLAccordionCtrl(const Params& params);*/
LLAccordionCtrl(const Params& params);
#endif

LLAccordionCtrl();
virtual ~LLAccordionCtrl();
Expand Down
14 changes: 11 additions & 3 deletions indra/llui/lltabcontainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "llresmgr.h"
#include "llresizehandle.h"
#include "lltextbox.h"
#include "lltrans.h"
#include "llcriticaldamp.h"
#include "lluictrlfactory.h"
#include "llrender.h"
Expand Down Expand Up @@ -873,9 +874,16 @@ void LLTabContainer::addTabPanel(LLPanel* child,
}
}
std::string tooltip = trimmed_label;
// FIXME: Tooltip can not be translated when hardcoded.
tooltip += "\nAlt-Left arrow for previous tab";
tooltip += "\nAlt-Right arrow for next tab";
LLStringUtil::format_map_t args;
args["[ALT]"] = LLTrans::getString(
#ifdef LL_DARWIN
"accel-mac-option"
#else
"accel-win-alt"
#endif
);
tooltip += '\n' + LLTrans::getString("tab_tooltip_prev", args);
tooltip += '\n' + LLTrans::getString("tab_tooltip_next", args);
btn->setToolTip( tooltip );
}

Expand Down

0 comments on commit 3d46baa

Please sign in to comment.