summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-25 14:14:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-25 16:45:28 +0100
commitf50a3677380f611b4cc5f86258ca4dc543c8dc3e (patch)
tree076752cc5525b28e4dadebc8b5d0133f0f70aeb8
parent9a11491731541232d8e184b0b25442cdb790cf9f (diff)
convert MSG_COMCORE_ASKSEARCH with custom buttons to .ui
Change-Id: I5066c850a22a9dcf0778878a160bbedee6fba81d
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/inc/comcore.hrc1
-rw-r--r--sw/source/core/crsr/viscrs.cxx5
-rw-r--r--sw/source/ui/app/app.src7
-rw-r--r--sw/uiconfig/swriter/ui/asksearchdialog.ui84
5 files changed, 88 insertions, 10 deletions
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 6af4be8260fa..25fa197b0f1a 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -65,6 +65,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/addressblockdialog \
sw/uiconfig/swriter/ui/alreadyexistsdialog \
sw/uiconfig/swriter/ui/asciifilterdialog \
+ sw/uiconfig/swriter/ui/asksearchdialog \
sw/uiconfig/swriter/ui/assignfieldsdialog \
sw/uiconfig/swriter/ui/assignstylesdialog \
sw/uiconfig/swriter/ui/attachnamedialog \
diff --git a/sw/inc/comcore.hrc b/sw/inc/comcore.hrc
index 5affd93b6ff9..5b26debe70f0 100644
--- a/sw/inc/comcore.hrc
+++ b/sw/inc/comcore.hrc
@@ -24,7 +24,6 @@
// Strings
#define STR_COMCORE_READERROR (RC_COMCORE_BEGIN + 0)
-#define MSG_COMCORE_ASKSEARCH (RC_COMCORE_BEGIN + 1)
#define STR_TABLE_DEFNAME (RC_COMCORE_BEGIN + 2)
#define STR_GRAPHIC_DEFNAME (RC_COMCORE_BEGIN + 3)
#define STR_OBJECT_DEFNAME (RC_COMCORE_BEGIN + 4)
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index b76702822ab0..f53ac0b27d4d 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -20,7 +20,7 @@
#include <config_features.h>
#include <vcl/dialog.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/settings.hxx>
#include <viewopt.hxx>
@@ -601,7 +601,8 @@ short SwShellCrsr::MaxReplaceArived()
} while( pShell != ( pSh = (SwViewShell*)pSh->GetNext() ) );
{
- nRet = QueryBox( pDlg, SW_RES( MSG_COMCORE_ASKSEARCH )).Execute();
+ nRet = MessageDialog(pDlg, "AskSearchDialog",
+ "modules/swriter/ui/asksearchdialog.ui").Execute();
}
for( sal_uInt16 n = 0; n < aArr.size(); ++n )
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index e8f7b7129bb5..4da399beeb7d 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -371,13 +371,6 @@ String STR_STATSTR_SWGPRTOLENOTIFY
Text [ en-US ] = "Adapt Objects...";
};
-QueryBox MSG_COMCORE_ASKSEARCH
-{
- Buttons = WB_YES_NO_CANCEL ;
- DefButton = WB_DEF_YES ;
- Message [ en-US ] = "To proceed with this action, you must first turn off the \"undo\" function. Do you want to turn off the \"undo\" function?" ;
-};
-
Bitmap RID_GRAPHIC_REPLACEBMP
{
File = "grafikei.bmp" ;
diff --git a/sw/uiconfig/swriter/ui/asksearchdialog.ui b/sw/uiconfig/swriter/ui/asksearchdialog.ui
new file mode 100644
index 000000000000..32b568eeed93
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/asksearchdialog.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="AskSearchDialog">
+ <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">To proceed with this action, you must first turn off the "undo" function. Do you want to turn off the "undo" function?</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>