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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 10 08:24:47 UTC 2020


 include/svtools/editbrowsebox.hxx     |    1 
 svtools/source/brwbox/ebbcontrols.cxx |    4 ++
 svtools/uiconfig/ui/datewindow.ui     |   67 ++++++++++++++++++++--------------
 3 files changed, 45 insertions(+), 27 deletions(-)

New commits:
commit dd0ee0ccf79918526cd1753e66a55f289a7b6ea3
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Aug 9 16:01:37 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 10 10:24:04 2020 +0200

    tdf#135529 today/none only used by DateControl
    
    Change-Id: Id8987e65ef3fae9c009af59d3a1f9d0e83726648
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100404
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index 130dae510486..725cc081d044 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -687,6 +687,7 @@ namespace svt
         std::unique_ptr<weld::Builder> m_xCalendarBuilder;
         std::unique_ptr<weld::Widget> m_xTopLevel;
         std::unique_ptr<weld::Calendar> m_xCalendar;
+        std::unique_ptr<weld::Widget> m_xExtras;
         std::unique_ptr<weld::Button> m_xTodayBtn;
         std::unique_ptr<weld::Button> m_xNoneBtn;
 
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 6958a1f63fab..b15927af9e58 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -429,6 +429,7 @@ namespace svt
         , m_xCalendarBuilder(Application::CreateBuilder(m_xMenuButton.get(), "svt/ui/datewindow.ui"))
         , m_xTopLevel(m_xCalendarBuilder->weld_widget("date_popup_window"))
         , m_xCalendar(m_xCalendarBuilder->weld_calendar("date"))
+        , m_xExtras(m_xCalendarBuilder->weld_widget("extras"))
         , m_xTodayBtn(m_xCalendarBuilder->weld_button("today"))
         , m_xNoneBtn(m_xCalendarBuilder->weld_button("none"))
     {
@@ -439,6 +440,8 @@ namespace svt
         m_xMenuButton->set_visible(bDropDown);
         m_xMenuButton->connect_toggled(LINK(this, DateControl, ToggleHdl));
 
+        m_xExtras->show();
+
         m_xTodayBtn->connect_clicked(LINK(this, DateControl, ImplClickHdl));
         m_xNoneBtn->connect_clicked(LINK(this, DateControl, ImplClickHdl));
 
@@ -484,6 +487,7 @@ namespace svt
     {
         m_xTodayBtn.reset();
         m_xNoneBtn.reset();
+        m_xExtras.reset();
         m_xCalendar.reset();
         m_xTopLevel.reset();
         m_xCalendarBuilder.reset();
diff --git a/svtools/uiconfig/ui/datewindow.ui b/svtools/uiconfig/ui/datewindow.ui
index 0e7729afe74e..b3c1b2d73085 100644
--- a/svtools/uiconfig/ui/datewindow.ui
+++ b/svtools/uiconfig/ui/datewindow.ui
@@ -27,46 +27,59 @@
           </packing>
         </child>
         <child>
-          <object class="GtkSeparator">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkButtonBox" id="buttonbox">
-            <property name="visible">True</property>
+          <object class="GtkBox" id="extras">
             <property name="can_focus">False</property>
+            <property name="no_show_all">True</property>
+            <property name="orientation">vertical</property>
             <property name="spacing">6</property>
-            <property name="layout_style">spread</property>
             <child>
-              <object class="GtkButton" id="today">
-                <property name="label" context="calendar|STR_SVT_CALENDAR_TODAY">Today</property>
+              <object class="GtkSeparator">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
+                <property name="can_focus">False</property>
               </object>
               <packing>
-                <property name="expand">True</property>
+                <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="none">
-                <property name="label" context="calendar|STR_SVT_CALENDAR_NONE">None</property>
+              <object class="GtkButtonBox" id="buttonbox">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <property name="layout_style">spread</property>
+                <child>
+                  <object class="GtkButton" id="today">
+                    <property name="label" context="calendar|STR_SVT_CALENDAR_TODAY">Today</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="none">
+                    <property name="label" context="calendar|STR_SVT_CALENDAR_NONE">None</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
               </object>
               <packing>
-                <property name="expand">True</property>
+                <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">1</property>
               </packing>
@@ -75,7 +88,7 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">2</property>
+            <property name="position">1</property>
           </packing>
         </child>
       </object>


More information about the Libreoffice-commits mailing list