[Libreoffice-commits] core.git: svx/source svx/uiconfig svx/UIConfig_svx.mk

Manal Alhassoun malhassoun at kacst.edu.sa
Wed Dec 4 03:26:18 PST 2013


 svx/UIConfig_svx.mk                           |    4 ++
 svx/source/dialog/_contdlg.cxx                |   10 ++---
 svx/source/dialog/contdlg.hrc                 |    4 --
 svx/source/dialog/contdlg.src                 |   21 ----------
 svx/uiconfig/ui/querydeletecontourdialog.ui   |   36 ++++++++++++++++++
 svx/uiconfig/ui/querynewcontourdialog.ui      |   34 +++++++++++++++++
 svx/uiconfig/ui/querysavecontchangesdialog.ui |   52 ++++++++++++++++++++++++++
 svx/uiconfig/ui/queryunlinkgraphicsdialog.ui  |   35 +++++++++++++++++
 8 files changed, 166 insertions(+), 30 deletions(-)

New commits:
commit 6931f431331d4cb5b5619c29d5f615f4245a66be
Author: Manal Alhassoun <malhassoun at kacst.edu.sa>
Date:   Wed Dec 4 13:40:46 2013 +0300

    convert Contour queryboxes to .ui
    
    Change-Id: Ie6dad2409a7d58a1c01973e8740f436cb597cb99
    Reviewed-on: https://gerrit.libreoffice.org/6923
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 1780983..fb29eb1 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -21,6 +21,10 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
 	svx/uiconfig/ui/linkwarndialog \
 	svx/uiconfig/ui/optgridpage \
 	svx/uiconfig/ui/passwd \
+	svx/uiconfig/ui/querydeletecontourdialog \
+	svx/uiconfig/ui/querynewcontourdialog \
+	svx/uiconfig/ui/querysavecontchangesdialog \
+	svx/uiconfig/ui/queryunlinkgraphicsdialog \
 	svx/uiconfig/ui/redlinecontrol \
 	svx/uiconfig/ui/redlinefilterpage \
 	svx/uiconfig/ui/redlineviewpage \
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index d0fcd9e..a3051b4 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -43,6 +43,7 @@
 #include <vcl/svapp.hxx>
 #include <vcl/virdev.hxx>
 #include "dlgunit.hxx"
+#include <vcl/layout.hxx>
 
 SFX_IMPL_FLOATINGWINDOW_WITHID( SvxContourDlgChildWindow, SID_CONTOUR_DLG );
 
@@ -303,8 +304,7 @@ sal_Bool SvxSuperContourDlg::Close()
 
     if ( aTbx1.IsItemEnabled( TBI_APPLY ) )
     {
-        QueryBox    aQBox( this, WB_YES_NO_CANCEL | WB_DEF_YES,
-                           CONT_RESID(STR_CONTOURDLG_MODIFY).toString() );
+        MessageDialog aQBox( this,"QuerySaveContourChangesDialog","svx/ui/querysavecontchangesdialog.ui");
         const long  nRet = aQBox.Execute();
 
         if ( nRet == RET_YES )
@@ -439,7 +439,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx )
         {
             if ( aTbx1.IsItemChecked( TBI_WORKPLACE ) )
             {
-                QueryBox aQBox( this, WB_YES_NO | WB_DEF_NO, CONT_RESID(STR_CONTOURDLG_WORKPLACE).toString() );
+                MessageDialog aQBox( this,"QueryDeleteContourDialog","svx/ui/querydeletecontourdialog.ui");
 
                 if ( !aContourWnd.IsContourChanged() || ( aQBox.Execute() == RET_YES ) )
                     aContourWnd.SetWorkplaceMode( sal_True );
@@ -535,7 +535,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx )
                 aStbStatus.Invalidate();
             else if ( bGraphicLinked )
             {
-                QueryBox aQBox( this, WB_YES_NO | WB_DEF_YES, CONT_RESID(STR_CONTOURDLG_LINKED).toString() );
+                MessageDialog aQBox( this,"QueryUnlinkGraphicsDialog","svx/ui/queryunlinkgraphicsdialog.ui");
 
                 if ( aQBox.Execute() != RET_YES )
                 {
@@ -733,7 +733,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow*, pWnd )
 
             if( !!aMask )
             {
-                QueryBox    aQBox( this, WB_YES_NO | WB_DEF_YES, CONT_RESID(STR_CONTOURDLG_NEWPIPETTE).toString() );
+                MessageDialog aQBox( this,"QueryNewContourDialog","svx/ui/querynewcontourdialog.ui");
                 sal_Bool        bNewContour;
 
                 aRedoGraphic = Graphic();
diff --git a/svx/source/dialog/contdlg.hrc b/svx/source/dialog/contdlg.hrc
index 07afc01..aec18aa 100644
--- a/svx/source/dialog/contdlg.hrc
+++ b/svx/source/dialog/contdlg.hrc
@@ -61,9 +61,5 @@
 
 /******************************************************************************/
 
-#define STR_CONTOURDLG_MODIFY       (RID_SVX_CONTOURDLG_START + 2)
-#define STR_CONTOURDLG_NEWPIPETTE   (RID_SVX_CONTOURDLG_START + 3)
-#define STR_CONTOURDLG_WORKPLACE    (RID_SVX_CONTOURDLG_START + 4)
-#define STR_CONTOURDLG_LINKED       (RID_SVX_CONTOURDLG_START + 5)
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/contdlg.src b/svx/source/dialog/contdlg.src
index 41bee84..519b73c 100644
--- a/svx/source/dialog/contdlg.src
+++ b/svx/source/dialog/contdlg.src
@@ -220,26 +220,5 @@ FloatingWindow RID_SVXDLG_CONTOUR
 };
 
 /******************************************************************************/
-String STR_CONTOURDLG_MODIFY
-{
-    Text [ en-US ] = "The contour has been modified.\nDo you want to save the changes?" ;
-};
-
-String STR_CONTOURDLG_NEWPIPETTE
-{
-    Text [ en-US ] = "Do you want to create a new contour?" ;
-};
-
-String STR_CONTOURDLG_WORKPLACE
-{
-    Text [ en-US ] = "Setting a new workspace will\ncause the contour to be deleted.\nAre you sure you want to continue?" ;
-};
-
-String STR_CONTOURDLG_LINKED
-{
-    Text [ en-US ] = "This graphic object is linked to the document. Do you want to unlink the graphics in order to edit it?" ;
-};
-
-/******************************************************************************/
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/uiconfig/ui/querydeletecontourdialog.ui b/svx/uiconfig/ui/querydeletecontourdialog.ui
new file mode 100644
index 0000000..95390e3
--- /dev/null
+++ b/svx/uiconfig/ui/querydeletecontourdialog.ui
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkMessageDialog" id="QueryDeleteContourDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Delete the contour?</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="message_type">question</property>
+    <property name="buttons">yes-no</property>
+    <property name="text" translatable="yes">Setting a new workspace will
+cause the contour to be deleted.</property>
+    <property name="secondary_text" translatable="yes">Are you sure you want to continue?</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="messagedialog-vbox">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">24</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="messagedialog-action_area">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/svx/uiconfig/ui/querynewcontourdialog.ui b/svx/uiconfig/ui/querynewcontourdialog.ui
new file mode 100644
index 0000000..9305f55
--- /dev/null
+++ b/svx/uiconfig/ui/querynewcontourdialog.ui
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkMessageDialog" id="QueryNewContourDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Create a new contour?</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="message_type">question</property>
+    <property name="buttons">yes-no</property>
+    <property name="text" translatable="yes">Do you want to create a new contour?</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="messagedialog-vbox">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">24</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="messagedialog-action_area">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/svx/uiconfig/ui/querysavecontchangesdialog.ui b/svx/uiconfig/ui/querysavecontchangesdialog.ui
new file mode 100644
index 0000000..df421ab
--- /dev/null
+++ b/svx/uiconfig/ui/querysavecontchangesdialog.ui
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkMessageDialog" id="QuerySaveContourChangesDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Save contour changes?</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="message_type">question</property>
+    <property name="buttons">yes-no</property>
+    <property name="text" translatable="yes">The contour has been modified.</property>
+    <property name="secondary_text" translatable="yes">Do you want to save the changes?</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="messagedialog-vbox">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">24</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="messagedialog-action_area">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <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>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">cancel</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/svx/uiconfig/ui/queryunlinkgraphicsdialog.ui b/svx/uiconfig/ui/queryunlinkgraphicsdialog.ui
new file mode 100644
index 0000000..0b88403
--- /dev/null
+++ b/svx/uiconfig/ui/queryunlinkgraphicsdialog.ui
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkMessageDialog" id="QueryUnlinkGraphicsDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Unlink the graphics?</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="message_type">question</property>
+    <property name="buttons">yes-no</property>
+    <property name="text" translatable="yes">This graphic object is linked to the document.</property>
+    <property name="secondary_text" translatable="yes">Do you want to unlink the graphics in order to edit it?</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="messagedialog-vbox">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">24</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="messagedialog-action_area">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list