Kaydet (Commit) 345d6dd9 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Actually OK and Cancel is better here than Apply and Close.

Because the same dialog is used when creating a new pivot table, where
the Apply and Close semantic feels a bit weird.  Also, some features of
the dialog were designed with Ok / Cancel in mind (like the destination
location).

Change-Id: I9ac889bca9f967cb97b34ab45ea563547b58d422
üst 13975eb3
......@@ -93,8 +93,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
get(mpCheckTotalRows, "check-total-rows");
get(mpCheckDrillToDetail, "check-drill-to-details");
get(mpButtonApply, "apply");
get(mpButtonClose, "close");
get(mpBtnOK, "ok");
get(mpBtnCancel, "cancel");
get(mpSourceRadioNamedRange, "source-radio-named-range");
get(mpSourceRadioSelection, "source-radio-selection");
......@@ -146,8 +146,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
mpDestinationButton->SetLoseFocusHdl(aLink);
// Buttons
mpButtonClose->SetClickHdl(LINK(this, ScPivotLayoutDialog, CloseClicked));
mpButtonApply->SetClickHdl(LINK(this, ScPivotLayoutDialog, ApplyClicked));
mpBtnCancel->SetClickHdl(LINK(this, ScPivotLayoutDialog, CancelClicked));
mpBtnOK->SetClickHdl(LINK(this, ScPivotLayoutDialog, OKClicked));
// Initialize Data
maPivotTableObject.FillOldParam(maPivotParameters);
......@@ -606,13 +606,14 @@ void ScPivotLayoutDialog::PushDataFieldNames(std::vector<ScDPName>& rDataFieldNa
return mpListBoxData->PushDataFieldNames(rDataFieldNames);
}
IMPL_LINK( ScPivotLayoutDialog, ApplyClicked, PushButton*, /*pButton*/ )
IMPL_LINK( ScPivotLayoutDialog, OKClicked, PushButton*, /*pButton*/ )
{
ApplyChanges();
DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
return 0;
}
IMPL_LINK( ScPivotLayoutDialog, CloseClicked, PushButton*, /*pButton*/ )
IMPL_LINK( ScPivotLayoutDialog, CancelClicked, PushButton*, /*pButton*/ )
{
DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
return 0;
......
......@@ -81,15 +81,15 @@ private:
formula::RefEdit* mpDestinationEdit;
formula::RefButton* mpDestinationButton;
PushButton* mpButtonApply;
CloseButton* mpButtonClose;
PushButton* mpBtnOK;
CloseButton* mpBtnCancel;
formula::RefEdit* mpActiveEdit;
ScAddress::Details maAddressDetails;
bool mbDialogLostFocus;
DECL_LINK(CloseClicked, PushButton*);
DECL_LINK(ApplyClicked, PushButton*);
DECL_LINK(CancelClicked, PushButton*);
DECL_LINK(OKClicked, PushButton*);
DECL_LINK(GetFocusHandler, Control*);
DECL_LINK(LoseFocusHandler, void*);
DECL_LINK(ToggleSource, void*);
......
......@@ -18,8 +18,8 @@
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="apply">
<property name="label">gtk-apply</property>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -32,8 +32,8 @@
</packing>
</child>
<child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment