Kaydet (Commit) 56ec79c8 authored tarafından Kohei Yoshida's avatar Kohei Yoshida Kaydeden (comit) Fridrich Štrba

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 46c9b225
...@@ -93,8 +93,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog( ...@@ -93,8 +93,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
get(mpCheckTotalRows, "check-total-rows"); get(mpCheckTotalRows, "check-total-rows");
get(mpCheckDrillToDetail, "check-drill-to-details"); get(mpCheckDrillToDetail, "check-drill-to-details");
get(mpButtonApply, "apply"); get(mpBtnOK, "ok");
get(mpButtonClose, "close"); get(mpBtnCancel, "cancel");
get(mpSourceRadioNamedRange, "source-radio-named-range"); get(mpSourceRadioNamedRange, "source-radio-named-range");
get(mpSourceRadioSelection, "source-radio-selection"); get(mpSourceRadioSelection, "source-radio-selection");
...@@ -146,8 +146,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog( ...@@ -146,8 +146,8 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
mpDestinationButton->SetLoseFocusHdl(aLink); mpDestinationButton->SetLoseFocusHdl(aLink);
// Buttons // Buttons
mpButtonClose->SetClickHdl(LINK(this, ScPivotLayoutDialog, CloseClicked)); mpBtnCancel->SetClickHdl(LINK(this, ScPivotLayoutDialog, CancelClicked));
mpButtonApply->SetClickHdl(LINK(this, ScPivotLayoutDialog, ApplyClicked)); mpBtnOK->SetClickHdl(LINK(this, ScPivotLayoutDialog, OKClicked));
// Initialize Data // Initialize Data
maPivotTableObject.FillOldParam(maPivotParameters); maPivotTableObject.FillOldParam(maPivotParameters);
...@@ -606,13 +606,14 @@ void ScPivotLayoutDialog::PushDataFieldNames(std::vector<ScDPName>& rDataFieldNa ...@@ -606,13 +606,14 @@ void ScPivotLayoutDialog::PushDataFieldNames(std::vector<ScDPName>& rDataFieldNa
return mpListBoxData->PushDataFieldNames(rDataFieldNames); return mpListBoxData->PushDataFieldNames(rDataFieldNames);
} }
IMPL_LINK( ScPivotLayoutDialog, ApplyClicked, PushButton*, /*pButton*/ ) IMPL_LINK( ScPivotLayoutDialog, OKClicked, PushButton*, /*pButton*/ )
{ {
ApplyChanges(); ApplyChanges();
DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
return 0; return 0;
} }
IMPL_LINK( ScPivotLayoutDialog, CloseClicked, PushButton*, /*pButton*/ ) IMPL_LINK( ScPivotLayoutDialog, CancelClicked, PushButton*, /*pButton*/ )
{ {
DoClose( ScPivotLayoutWrapper::GetChildWindowId() ); DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
return 0; return 0;
......
...@@ -81,15 +81,15 @@ private: ...@@ -81,15 +81,15 @@ private:
formula::RefEdit* mpDestinationEdit; formula::RefEdit* mpDestinationEdit;
formula::RefButton* mpDestinationButton; formula::RefButton* mpDestinationButton;
PushButton* mpButtonApply; PushButton* mpBtnOK;
CloseButton* mpButtonClose; CloseButton* mpBtnCancel;
formula::RefEdit* mpActiveEdit; formula::RefEdit* mpActiveEdit;
ScAddress::Details maAddressDetails; ScAddress::Details maAddressDetails;
bool mbDialogLostFocus; bool mbDialogLostFocus;
DECL_LINK(CloseClicked, PushButton*); DECL_LINK(CancelClicked, PushButton*);
DECL_LINK(ApplyClicked, PushButton*); DECL_LINK(OKClicked, PushButton*);
DECL_LINK(GetFocusHandler, Control*); DECL_LINK(GetFocusHandler, Control*);
DECL_LINK(LoseFocusHandler, void*); DECL_LINK(LoseFocusHandler, void*);
DECL_LINK(ToggleSource, void*); DECL_LINK(ToggleSource, void*);
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="layout_style">end</property> <property name="layout_style">end</property>
<child> <child>
<object class="GtkButton" id="apply"> <object class="GtkButton" id="ok">
<property name="label">gtk-apply</property> <property name="label">gtk-ok</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton" id="close"> <object class="GtkButton" id="cancel">
<property name="label">gtk-close</property> <property name="label">gtk-cancel</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">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