diff options
| author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-27 11:25:16 -0400 |
|---|---|---|
| committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-27 11:29:25 -0400 |
| commit | 345d6dd9d938a88722fb6d1f1963047a9761412d (patch) | |
| tree | ccf48ee2ade21af7fe863d9658ca2ded8199b163 | |
| parent | 13975eb35917c0152eab9ce05c4e7a9c9657b6a3 (diff) | |
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
| -rw-r--r-- | sc/source/ui/dbgui/PivotLayoutDialog.cxx | 13 | ||||
| -rw-r--r-- | sc/source/ui/inc/PivotLayoutDialog.hxx | 8 | ||||
| -rw-r--r-- | sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui | 8 |
3 files changed, 15 insertions, 14 deletions
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index 8c667dd0319b..dd9ca8a1d5b1 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -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; diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx index 71c96667e692..ace1ed5ffdb9 100644 --- a/sc/source/ui/inc/PivotLayoutDialog.hxx +++ b/sc/source/ui/inc/PivotLayoutDialog.hxx @@ -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*); diff --git a/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui b/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui index 565e6271e82e..ad42d3ff97a2 100644 --- a/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui +++ b/sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui @@ -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> |
