summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-25 14:17:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-25 16:45:28 +0100
commit6cf795539604a96d712ecbef579863c699419641 (patch)
tree76e86f0e015dc0f4041132d59e7fbfc2d9cc47f6 /sw
parentf50a3677380f611b4cc5f86258ca4dc543c8dc3e (diff)
convert MSG_PRINT_AS_MERGE with custom buttons to .ui
Change-Id: I42296f8cde4e03214b29f35fd3c42a63c4317f79
Diffstat (limited to 'sw')
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/inc/helpid.h1
-rw-r--r--sw/source/ui/app/app.src8
-rw-r--r--sw/source/uibase/inc/app.hrc1
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx4
-rw-r--r--sw/uiconfig/swriter/ui/printmergedialog.ui84
6 files changed, 87 insertions, 12 deletions
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 25fa197b0f1a..4a2a44820a55 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -183,6 +183,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/picturepage \
sw/uiconfig/swriter/ui/previewzoomdialog \
sw/uiconfig/swriter/ui/printeroptions \
+ sw/uiconfig/swriter/ui/printmergedialog \
sw/uiconfig/swriter/ui/printmonitordialog \
sw/uiconfig/swriter/ui/printoptionspage \
sw/uiconfig/swriter/ui/privateuserpage \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index f6dfdbcd6e2b..1e4a640564d9 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -361,7 +361,6 @@
#define HID_PVIEW_ZOOM_LB "SW_HID_PVIEW_ZOOM_LB"
#define HID_MAIL_MERGE_SELECT "SW_HID_MAIL_MERGE_SELECT"
-#define HID_PRINT_AS_MERGE "SW_HID_PRINT_AS_MERGE"
#define HID_MODULE_TOOLBOX "SW_HID_MODULE_TOOLBOX"
#define HID_MM_SELECTDBTABLEDDIALOG "SW_HID_MM_SELECTDBTABLEDDIALOG"
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index 4da399beeb7d..8f19774c51a7 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -466,14 +466,6 @@ String STR_REDLINE_UNKNOWN_AUTHOR
Text [ en-US ] = "Unknown Author";
};
-QueryBox MSG_PRINT_AS_MERGE
-{
- HelpId = HID_PRINT_AS_MERGE;
- Buttons = WB_YES_NO ;
- DefButton = WB_DEF_YES ;
- Message [ en-US ] = "Your document contains address database fields. Do you want to print a form letter?";
-};
-
String RID_MODULE_TOOLBOX
{
Text [ en-US ] = "Function Bar (viewing mode)" ;
diff --git a/sw/source/uibase/inc/app.hrc b/sw/source/uibase/inc/app.hrc
index 5ffc2dc7fd44..623995584032 100644
--- a/sw/source/uibase/inc/app.hrc
+++ b/sw/source/uibase/inc/app.hrc
@@ -42,7 +42,6 @@
#define STR_REDLINE_UNKNOWN_AUTHOR (RC_APP_BEGIN + 76)
#define STR_WESTERN_FONT (RC_APP_BEGIN + 77)
#define STR_CJK_FONT (RC_APP_BEGIN + 78)
-#define MSG_PRINT_AS_MERGE (RC_APP_BEGIN + 80)
#define STR_ENV_TITLE (RC_APP_BEGIN + 91)
#define STR_LAB_TITLE (RC_APP_BEGIN + 92)
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 39af799fa453..f136f3331d72 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -24,7 +24,6 @@
#include <sfx2/progress.hxx>
#include <sfx2/app.hxx>
#include <vcl/layout.hxx>
-#include <vcl/msgbox.hxx>
#include <vcl/oldprintadaptor.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/prnmon.hxx>
@@ -202,7 +201,8 @@ void SwView::ExecutePrint(SfxRequest& rReq)
if(!bSilent && !bFromMerge &&
SW_MOD()->GetModuleConfig()->IsAskForMailMerge() && pSh->IsAnyDatabaseFieldInDoc())
{
- QueryBox aBox( &GetEditWin(), SW_RES( MSG_PRINT_AS_MERGE ));
+ MessageDialog aBox(&GetEditWin(), "PrintMergeDialog",
+ "modules/swriter/ui/printmergedialog.ui");
short nRet = aBox.Execute();
if(RET_YES == nRet)
{
diff --git a/sw/uiconfig/swriter/ui/printmergedialog.ui b/sw/uiconfig/swriter/ui/printmergedialog.ui
new file mode 100644
index 000000000000..b1d541b04785
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/printmergedialog.ui
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkMessageDialog" id="PrintMergeDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</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="text" translatable="yes">Your document contains address database fields. Do you want to print a form letter?</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="no">
+ <property name="label">gtk-no</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="yes">
+ <property name="label">gtk-yes</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <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="3">no</action-widget>
+ <action-widget response="2">yes</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+</interface>