[Libreoffice-commits] core.git: cui/source cui/uiconfig cui/UIConfig_cui.mk

Manal Alhassoun malhassoun at kacst.edu.sa
Wed Nov 20 02:14:00 PST 2013


 cui/UIConfig_cui.mk                          |    2 +
 cui/source/inc/cuires.hrc                    |    2 -
 cui/source/tabpages/strings.src              |    8 ------
 cui/source/tabpages/tpcolor.cxx              |    3 --
 cui/source/tabpages/tpgradnt.cxx             |    3 --
 cui/uiconfig/ui/querydeletecolordialog.ui    |   34 +++++++++++++++++++++++++++
 cui/uiconfig/ui/querydeletegradientdialog.ui |   34 +++++++++++++++++++++++++++
 7 files changed, 72 insertions(+), 14 deletions(-)

New commits:
commit 7b069f4bc8138e03abf455998452dd0f6f8ed9ac
Author: Manal Alhassoun <malhassoun at kacst.edu.sa>
Date:   Wed Nov 20 09:55:06 2013 +0300

    convert delete gradient/color queryboxes to .ui
    
    Conflicts:
    	cui/UIConfig_cui.mk
    
    Change-Id: Ie45c1c0d549fc879043d7f108f33e67adc4721fd
    Reviewed-on: https://gerrit.libreoffice.org/6729
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 5973275..d985912 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -106,7 +106,9 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/querychangelineenddialog \
 	cui/uiconfig/ui/querydeletebitmapdialog \
 	cui/uiconfig/ui/querydeletechartcolordialog \
+	cui/uiconfig/ui/querydeletecolordialog \
 	cui/uiconfig/ui/querydeletedictionarydialog \
+	cui/uiconfig/ui/querydeletegradientdialog \
 	cui/uiconfig/ui/querydeletehatchdialog \
 	cui/uiconfig/ui/querydeletelineenddialog \
 	cui/uiconfig/ui/querydeletelinestyledialog \
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index c8507a6..f856a25 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -76,7 +76,6 @@
 #define RID_SVXSTR_EDIT_GRAPHIC             (RID_SVX_START + 509)
 
 #define RID_SVXSTR_DESC_GRADIENT            (RID_SVX_START + 163)
-#define RID_SVXSTR_ASK_DEL_GRADIENT         (RID_SVX_START + 165)
 #define RID_SVXSTR_ASK_CHANGE_GRADIENT      (RID_SVX_START + 166)
 #define RID_SVXSTR_ASK_CHANGE_BITMAP        (RID_SVX_START + 172)
 #define RID_SVXSTR_DESC_NEW_BITMAP          (RID_SVX_START + 168)
@@ -89,7 +88,6 @@
 #define RID_SVXSTR_CHANGE                   (RID_SVX_START + 181)
 #define RID_SVXSTR_ADD                      (RID_SVX_START + 182)
 #define RID_SVXSTR_DESC_COLOR               (RID_SVX_START + 215)
-#define RID_SVXSTR_ASK_DEL_COLOR            (RID_SVX_START + 217)
 #define RID_SVXSTR_ASK_CHANGE_COLOR         (RID_SVX_START + 218)
 #define RID_SVXSTR_TABLE                    (RID_SVX_START + 220)
 #define RID_SVXSTR_CONNECTOR                (RID_SVX_START + 221)
diff --git a/cui/source/tabpages/strings.src b/cui/source/tabpages/strings.src
index dee7e7e..7eefbe5 100644
--- a/cui/source/tabpages/strings.src
+++ b/cui/source/tabpages/strings.src
@@ -23,10 +23,6 @@ String RID_SVXSTR_DESC_GRADIENT
 {
     Text [ en-US ] = "Please enter a name for the gradient:" ;
 };
-String RID_SVXSTR_ASK_DEL_GRADIENT
-{
-    Text [ en-US ] = "Do you want to delete the gradient?" ;
-};
 String RID_SVXSTR_ASK_CHANGE_GRADIENT
 {
     Text [ en-US ] = "The gradient was modified without saving. \nModify the selected gradient or add a new gradient." ;
@@ -71,10 +67,6 @@ String RID_SVXSTR_DESC_COLOR
 {
     Text [ en-US ] = "Please enter a name for the new color:" ;
 };
-String RID_SVXSTR_ASK_DEL_COLOR
-{
-    Text [ en-US ] = "Do you want to delete the color?" ;
-};
 String RID_SVXSTR_ASK_CHANGE_COLOR
 {
     Text [ en-US ] = "The color was modified without saving.\nModify the selected color or add a new color." ;
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 379e3da..c677ee3 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -866,8 +866,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickDeleteHdl_Impl)
 
     if( nPos != LISTBOX_ENTRY_NOTFOUND )
     {
-        QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ),
-            OUString( CUI_RES( RID_SVXSTR_ASK_DEL_COLOR ) ) );
+        MessageDialog aQueryBox( GetParentDialog(),"AskDelColorDialog","cui/ui/querydeletecolordialog.ui");
 
         if( aQueryBox.Execute() == RET_YES )
         {
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 001c042..10d708e 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -583,8 +583,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickDeleteHdl_Impl)
 
     if( nPos != LISTBOX_ENTRY_NOTFOUND )
     {
-        QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ),
-            OUString( CUI_RES( RID_SVXSTR_ASK_DEL_GRADIENT ) ) );
+        MessageDialog aQueryBox( GetParentDialog(),"AskDelGradientDialog","cui/ui/querydeletegradientdialog.ui");
 
         if ( aQueryBox.Execute() == RET_YES )
         {
diff --git a/cui/uiconfig/ui/querydeletecolordialog.ui b/cui/uiconfig/ui/querydeletecolordialog.ui
new file mode 100644
index 0000000..0d68c60
--- /dev/null
+++ b/cui/uiconfig/ui/querydeletecolordialog.ui
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkMessageDialog" id="AskDelColorDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Delete color?</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 delete the color?</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">center</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/cui/uiconfig/ui/querydeletegradientdialog.ui b/cui/uiconfig/ui/querydeletegradientdialog.ui
new file mode 100644
index 0000000..3c682f6
--- /dev/null
+++ b/cui/uiconfig/ui/querydeletegradientdialog.ui
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkMessageDialog" id="AskDelGradientDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Delete gradient?</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 delete the gradient?</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">center</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