summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-06-04 11:52:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-06-04 16:14:27 +0100
commit4097ce73b66bce586bef0c0f41bc59559c52be0f (patch)
tree7b0d3f53c4e0d697394fb26f249d6d18752fb772
parent19a2685ec04bd6ce882d4dd08d24c7248cf99a84 (diff)
convert some more queryboxes to new style MessageBox
Change-Id: I1775d1e169919a7bfb157faba5e18695568f7f78
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/source/ui/app/app.src6
-rw-r--r--sw/source/ui/app/docsh2.cxx4
-rw-r--r--sw/source/ui/inc/app.hrc1
-rw-r--r--sw/uiconfig/swriter/ui/saveashtmldialog.ui34
5 files changed, 38 insertions, 8 deletions
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index daf19a72a8f9..618394b17e04 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -106,6 +106,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/renameautotextdialog \
sw/uiconfig/swriter/ui/renameobjectdialog \
sw/uiconfig/swriter/ui/rowheight \
+ sw/uiconfig/swriter/ui/saveashtmldialog \
sw/uiconfig/swriter/ui/sortdialog \
sw/uiconfig/swriter/ui/splittable \
sw/uiconfig/swriter/ui/statisticsinfopage \
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index 134da77c9ee5..fdde472a3fe2 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -451,12 +451,6 @@ QueryBox MSG_SAVE_HTML_QUERY
DEFBUTTON = WB_DEF_YES ;
Message [ en-US ] = "Conversion into HTML format \nmay cause information loss. \nDo you want to save the document?" ;
};
-QueryBox MSG_SAVEAS_HTML_QUERY
-{
- BUTTONS = WB_YES_NO;
- DEFBUTTON = WB_DEF_NO ;
- Message [ en-US ] = "The source code can only be displayed if the document is saved in HTML format.\nWould you like to save the document as HTML?";
-};
String STR_ABSTRACT_TITLE
{
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 6ccf91da693f..07b85bd31979 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -872,7 +872,9 @@ void SwDocShell::Execute(SfxRequest& rReq)
const SfxFilter* pFlt = GetMedium()->GetFilter();
if(!pFlt || pFlt->GetUserData() != pHtmlFlt->GetUserData())
{
- QueryBox aQuery(&pViewFrm->GetWindow(), SW_RES(MSG_SAVEAS_HTML_QUERY));
+ MessageDialog aQuery(&pViewFrm->GetWindow(),
+ "SaveAsHTMLDialog", "modules/swriter/ui/saveashtmldialog.ui");
+
if(RET_YES == aQuery.Execute())
bLocalHasName = sal_False;
else
diff --git a/sw/source/ui/inc/app.hrc b/sw/source/ui/inc/app.hrc
index d9295e579556..a12e3b5bac0e 100644
--- a/sw/source/ui/inc/app.hrc
+++ b/sw/source/ui/inc/app.hrc
@@ -34,7 +34,6 @@
// For the interface because the RID_APP_BEGIN is now Desktop.
#define RID_SW_NAME ( RC_APP_BEGIN + 8)
-#define MSG_SAVEAS_HTML_QUERY ( RC_APP_BEGIN + 9)
#define STR_UNBENANNT (RC_APP_BEGIN + 13)
diff --git a/sw/uiconfig/swriter/ui/saveashtmldialog.ui b/sw/uiconfig/swriter/ui/saveashtmldialog.ui
new file mode 100644
index 000000000000..cd8f0d0f8536
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/saveashtmldialog.ui
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkMessageDialog" id="SaveAsHTMLDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">Save as HTML</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">Would you like to save the document as HTML?</property>
+ <property name="secondary_text" translatable="yes">The source code can only be displayed if the document is saved in HTML format.</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>