[Libreoffice-commits] core.git: sc/source sc/uiconfig

Kohei Yoshida kohei.yoshida at collabora.com
Tue May 27 08:29:17 PDT 2014


 sc/source/ui/dbgui/PivotLayoutDialog.cxx       |   13 +++++++------
 sc/source/ui/inc/PivotLayoutDialog.hxx         |    8 ++++----
 sc/uiconfig/scalc/ui/pivottablelayoutdialog.ui |    8 ++++----
 3 files changed, 15 insertions(+), 14 deletions(-)

New commits:
commit 345d6dd9d938a88722fb6d1f1963047a9761412d
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue May 27 11:25:16 2014 -0400

    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

diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 8c667dd..dd9ca8a 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 71c9666..ace1ed5 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 565e627..ad42d3f 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>


More information about the Libreoffice-commits mailing list