Skip to content

Commit 84b2861

Browse files
Mac build fix and clean up
1 parent 8bcbb33 commit 84b2861

14 files changed

+30
-26
lines changed

indra/newview/llfloaterdirectory.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646

4747
LLFloaterDirectory::LLFloaterDirectory(const std::string& name)
4848
: LLFloater(name),
49-
mMinimizing(false),
5049
mPanelAvatarp(nullptr),
5150
mPanelGroupp(nullptr),
5251
mPanelPlacep(nullptr),

indra/newview/llfloaterdirectory.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ class LLFloaterDirectory : public LLFloater
7373
LLPanelClassifiedInfo* mPanelClassifiedp;
7474

7575
private:
76-
bool mMinimizing; // HACK: see reshape() for details
7776
static LLFloaterDirectory *sInstance;
7877
};
7978

indra/newview/llpaneldirbrowser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ LLPanelDirBrowser::LLPanelDirBrowser()
7070
mCurrentSortColumn("name"),
7171
mCurrentSortAscending(true),
7272
mSearchStart(0),
73-
mResultsPerPage(100),
73+
mResultsPerPage(RESULTS_PER_PAGE_DEFAULT),
7474
mResultsReceived(0),
7575
mMinSearchChars(1),
7676
mResultsContents(),

indra/newview/llpaneldirbrowser.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class LLPanelDirBrowser: public LLPanel
4545
void setFloaterDirectory(LLFloaterDirectory* floater) { mFloaterDirectory = floater; }
4646

4747
// Use to get periodic updates.
48-
virtual void draw();
48+
void draw() override;
4949

50-
virtual void onVisibilityChange(bool curVisibilityIn);
50+
void onVisibilityChange(bool curVisibilityIn) override;
5151

5252
// Redo your search for the prev/next page of results
5353
virtual void prevPage();
@@ -139,6 +139,9 @@ class LLPanelDirBrowser: public LLPanel
139139
LLButton* mNextPageBtn;
140140
};
141141

142+
constexpr S32 RESULTS_PER_PAGE_DEFAULT = 100;
143+
constexpr S32 RESULTS_PER_PAGE_EVENTS = 200;
144+
142145
// Codes used for sorting by type.
143146
const S32 INVALID_CODE = -1;
144147
const S32 EVENT_CODE = 0;

indra/newview/llpaneldirclassified.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ bool LLPanelDirClassified::postBuild()
6262
LLPanelDirBrowser::postBuild();
6363

6464
childSetAction("Search", onClickSearchCore, this);
65+
setDefaultBtn("Search");
6566
return true;
6667
}
6768

indra/newview/llpaneldirevents.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@
4545

4646
static LLPanelInjector<LLPanelDirEvents> t_panel_dir_events("panel_dir_events");
4747

48+
constexpr S32 DAY_TO_SEC = 24 * 60 * 60;
49+
4850
LLPanelDirEvents::LLPanelDirEvents()
4951
: LLPanelDirBrowser(),
5052
mDay(0)
5153
{
5254
// more results per page for this
53-
mResultsPerPage = 200;
55+
mResultsPerPage = RESULTS_PER_PAGE_EVENTS;
5456
}
5557

5658
bool LLPanelDirEvents::postBuild()
@@ -59,8 +61,8 @@ bool LLPanelDirEvents::postBuild()
5961

6062
childSetCommitCallback("date_mode", onDateModeCallback, this);
6163

62-
childSetAction("<<", onBackBtn, this);
63-
childSetAction(">>", onForwardBtn, this);
64+
childSetAction("back_btn", onBackBtn, this);
65+
childSetAction("forward_btn", onForwardBtn, this);
6466

6567
childSetCommitCallback("mature", onCommitMature, this);
6668

@@ -88,7 +90,7 @@ void LLPanelDirEvents::setDay(S32 day)
8890
time_t utc_time = time_corrected();
8991

9092
// Correct for offset
91-
utc_time += day * 24 * 60 * 60;
93+
utc_time += day * DAY_TO_SEC;
9294

9395
// There's only one internal tm buffer.
9496
struct tm* internal_time;
@@ -120,7 +122,7 @@ void LLPanelDirEvents::performQueryOrDelete(U32 event_id)
120122
time_t utc_time = time_corrected();
121123

122124
// Correct for offset
123-
utc_time += relative_day * 24 * 60 * 60;
125+
utc_time += relative_day * DAY_TO_SEC;
124126

125127
// There's only one internal tm buffer.
126128
struct tm* internal_time;
@@ -208,13 +210,13 @@ void LLPanelDirEvents::onDateModeCallback(LLUICtrl* ctrl, void *data)
208210
LLPanelDirEvents* self = (LLPanelDirEvents*)data;
209211
if (self->childGetValue("date_mode").asString() == "date")
210212
{
211-
self->childEnable(">>");
212-
self->childEnable("<<");
213+
self->childEnable("forward_btn");
214+
self->childEnable("back_btn");
213215
}
214216
else
215217
{
216-
self->childDisable(">>");
217-
self->childDisable("<<");
218+
self->childDisable("forward_btn");
219+
self->childDisable("back_btn");
218220
}
219221
}
220222

indra/newview/llpaneldirevents.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class LLPanelDirEvents : public LLPanelDirBrowser
4040

4141
bool postBuild() override;
4242

43-
/*virtual*/ void performQuery();
43+
/*virtual*/ void performQuery() override;
4444

4545
void performQueryOrDelete(U32 event_id);
4646

indra/newview/llpaneldirgroups.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ bool LLPanelDirGroups::postBuild()
4949
//getChild<LLLineEditor>("name")->setKeystrokeCallback(boost::bind(&LLPanelDirBrowser::onKeystrokeName, _1, _2), NULL);
5050

5151
childSetAction("Search", &LLPanelDirBrowser::onClickSearchCore, this);
52-
//childDisable("Search");
5352
setDefaultBtn( "Search" );
5453

5554
return true;

indra/newview/llpaneldirpeople.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ bool LLPanelDirPeople::postBuild()
4949
//getChild<LLLineEditor>("name")->setKeystrokeCallback(boost::bind(&LLPanelDirBrowser::onKeystrokeName, _1, _2), NULL);
5050

5151
childSetAction("Search", &LLPanelDirBrowser::onClickSearchCore, this);
52-
//childDisable("Search");
5352
setDefaultBtn( "Search" );
5453

5554
return true;

indra/newview/llpaneldirplaces.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ bool LLPanelDirPlaces::postBuild()
6060
//getChild<LLLineEditor>("name")->setKeystrokeCallback(boost::bind(&LLPanelDirBrowser::onKeystrokeName, _1, _2), NULL);
6161

6262
childSetAction("Search", &LLPanelDirBrowser::onClickSearchCore, this);
63-
//childDisable("Search");
63+
setDefaultBtn("Search");
6464

6565
mCurrentSortColumn = "dwell";
6666
mCurrentSortAscending = false;

0 commit comments

Comments
 (0)