diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-09 14:31:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-09 14:34:17 +0100 |
commit | a96941702a1454afa8ff8f340277cbccb4787a7c (patch) | |
tree | 458d94403b5a50ca1458bdd3e448ab7edddbf026 /sw | |
parent | 351b631dd510f30cb84a4273554569022bab2e41 (diff) |
convert info not found to .ui
Change-Id: I553e6f696ad10e847d845c263fbfbab5d2279345
Diffstat (limited to 'sw')
-rw-r--r-- | sw/UIConfig_swriter.mk | 1 | ||||
-rw-r--r-- | sw/source/ui/uiview/srcview.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/uiview/view.hrc | 1 | ||||
-rw-r--r-- | sw/source/ui/uiview/view.src | 4 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewsrch.cxx | 11 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/infonotfounddialog.ui | 33 |
6 files changed, 40 insertions, 13 deletions
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index d080e9d9ecdc..50166448ebcf 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -117,6 +117,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/indexentry \ sw/uiconfig/swriter/ui/inputfielddialog \ sw/uiconfig/swriter/ui/indentpage \ + sw/uiconfig/swriter/ui/infonotfounddialog \ sw/uiconfig/swriter/ui/inforeadonlydialog \ sw/uiconfig/swriter/ui/insertautotextdialog \ sw/uiconfig/swriter/ui/insertbookmark \ diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index c3ceef353d87..02762d5d98f2 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -631,7 +631,8 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, { if(bNotFoundMessage) { - InfoBox( 0, SW_RES(MSG_NOT_FOUND)).Execute(); + MessageDialog(0, "InfoNotFoundDialog", + "modules/swriter/ui/infonotfounddialog.ui").Execute(); } else if(!bRecursive) { diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc index 439f77d50811..692c45fadc4f 100644 --- a/sw/source/ui/uiview/view.hrc +++ b/sw/source/ui/uiview/view.hrc @@ -35,7 +35,6 @@ #define STR_EDIT_FOOTNOTE (RC_VIEW_BEGIN + 14) -#define MSG_NOT_FOUND (RC_VIEW_BEGIN + 16) #define MSG_SEARCH_START (RC_VIEW_BEGIN + 17) #define MSG_SEARCH_END (RC_VIEW_BEGIN + 18) #define STR_NB_REPLACED (RC_VIEW_BEGIN + 20) diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src index 1a08b818314b..23f2f1314527 100644 --- a/sw/source/ui/uiview/view.src +++ b/sw/source/ui/uiview/view.src @@ -71,10 +71,6 @@ String STR_TEXTOPTIONS { Text [ en-US ] = "Text document"; }; -InfoBox MSG_NOT_FOUND -{ - Message [ en-US ] = "Search key not found." ; -}; InfoBox MSG_SCAN_NOSOURCE { Message [ en-US ] = "Source not specified." ; diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index 2df0a383be7d..69230859b121 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -76,7 +76,7 @@ struct SwSearchOptions SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward ); }; -inline Window* GetParentWindow( SvxSearchDialog* m_pSrchDlg ) +static Window* GetParentWindow( SvxSearchDialog* m_pSrchDlg ) { Window* pWin; if( m_pSrchDlg && m_pSrchDlg->IsVisible() ) @@ -86,18 +86,15 @@ inline Window* GetParentWindow( SvxSearchDialog* m_pSrchDlg ) return pWin; } -inline void ShowNotFoundInfoBox( SvxSearchDialog* m_pSrchDlg ) +static void ShowNotFoundInfoBox( SvxSearchDialog* m_pSrchDlg ) { Window* pParentWindow = GetParentWindow( m_pSrchDlg ); - InfoBox aBox( pParentWindow, SW_RES(MSG_NOT_FOUND)); + MessageDialog aBox(pParentWindow, "InfoNotFoundDialog", + "modules/swriter/ui/infonotfounddialog.ui"); if (pParentWindow) { aBox.SetText(pParentWindow->GetText()); } - else - { - aBox.SetText(SVX_RESSTR(RID_SVXSTR_FINDBAR_FIND)); - } aBox.Execute(); } diff --git a/sw/uiconfig/swriter/ui/infonotfounddialog.ui b/sw/uiconfig/swriter/ui/infonotfounddialog.ui new file mode 100644 index 000000000000..cfb72d2be383 --- /dev/null +++ b/sw/uiconfig/swriter/ui/infonotfounddialog.ui @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkMessageDialog" id="InfoNotFoundDialog"> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="title" translatable="yes">Find</property> + <property name="resizable">False</property> + <property name="type_hint">dialog</property> + <property name="skip_taskbar_hint">True</property> + <property name="buttons">ok</property> + <property name="text" translatable="yes">Search key not found.</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> |