summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-12-16 11:08:29 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-16 11:10:55 +0000
commit0136616a5a005cc2237f020d46718bdb78f33c2b (patch)
tree32f67b8068b88b7613818055f1c71f9b0ce0ca0b /sfx2
parente52f14efaa53b496599b51fb064a933183731fca (diff)
convert help bookmark dialog to .ui
Change-Id: I7831bc63f66ab7fe30f5648efc2f733c6bd90d0e
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/UIConfig_sfx.mk1
-rw-r--r--sfx2/source/appl/app.hrc2
-rw-r--r--sfx2/source/appl/newhelp.cxx29
-rw-r--r--sfx2/source/appl/newhelp.hrc8
-rw-r--r--sfx2/source/appl/newhelp.hxx12
-rw-r--r--sfx2/source/appl/newhelp.src52
-rw-r--r--sfx2/uiconfig/ui/bookmarkdialog.ui136
7 files changed, 148 insertions, 92 deletions
diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index a693f2da5cfc..c3896968c603 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_UIConfig_UIConfig,sfx))
$(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/alienwarndialog \
+ sfx2/uiconfig/ui/bookmarkdialog \
sfx2/uiconfig/ui/checkin \
sfx2/uiconfig/ui/custominfopage \
sfx2/uiconfig/ui/descriptioninfopage \
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index 6a5a97c58e62..84050c0b832a 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -46,7 +46,7 @@
#define TP_HELP_INDEX (RID_SFX_APP_START+101)
#define TP_HELP_SEARCH (RID_SFX_APP_START+102)
#define TP_HELP_BOOKMARKS (RID_SFX_APP_START+103)
-#define DLG_HELP_ADDBOOKMARK (RID_SFX_APP_START+104)
+
#define MENU_HELP_BOOKMARKS (RID_SFX_APP_START+105)
#define RID_INFO_NOSEARCHRESULTS (RID_SFX_APP_START+106)
#define RID_INFO_NOSEARCHTEXTFOUND (RID_SFX_APP_START+107)
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index bcef1d2c7a7f..8bd2f5ff9a3e 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -3388,35 +3388,20 @@ sal_Bool SfxHelpWindow_Impl::HasHistorySuccessor() const
// class SfxAddHelpBookmarkDialog_Impl -----------------------------------
-SfxAddHelpBookmarkDialog_Impl::SfxAddHelpBookmarkDialog_Impl( Window* pParent, sal_Bool bRename ) :
-
- ModalDialog( pParent, SfxResId( DLG_HELP_ADDBOOKMARK ) ),
-
- aTitleFT ( this, SfxResId( FT_BOOKMARK_TITLE ) ),
- aTitleED ( this, SfxResId( ED_BOOKMARK_TITLE ) ),
- aOKBtn ( this, SfxResId( PB_BOOKMARK_OK ) ),
- aEscBtn ( this, SfxResId( PB_BOOKMARK_CANCEL ) ),
- aHelpBtn ( this, SfxResId( PB_BOOKMARK_HELP ) )
-
-{
- if ( bRename )
- SetText( SfxResId(STR_BOOKMARK_RENAME).toString() );
-
- FreeResource();
-}
-
-// -----------------------------------------------------------------------
-
-SfxAddHelpBookmarkDialog_Impl::~SfxAddHelpBookmarkDialog_Impl()
+SfxAddHelpBookmarkDialog_Impl::SfxAddHelpBookmarkDialog_Impl(Window* pParent, sal_Bool bRename)
+ : ModalDialog( pParent, "BookmarkDialog", "sfx/ui/bookmarkdialog.ui")
{
+ get(m_pTitleED, "entry");
+ if (bRename)
+ SetText(get<FixedText>("alttitle")->GetText());
}
// -----------------------------------------------------------------------
void SfxAddHelpBookmarkDialog_Impl::SetTitle( const OUString& rTitle )
{
- aTitleED.SetText( rTitle );
- aTitleED.SetSelection( Selection( 0, rTitle.getLength() ) );
+ m_pTitleED->SetText( rTitle );
+ m_pTitleED->SetSelection( Selection( 0, rTitle.getLength() ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/newhelp.hrc b/sfx2/source/appl/newhelp.hrc
index 6f85a86e4679..bfaab51590dc 100644
--- a/sfx2/source/appl/newhelp.hrc
+++ b/sfx2/source/appl/newhelp.hrc
@@ -49,14 +49,6 @@
// Content TabPage
#define LB_CONTENTS 10
-// Add to bookmarks dialog
-#define FT_BOOKMARK_TITLE 10
-#define ED_BOOKMARK_TITLE 11
-#define PB_BOOKMARK_OK 12
-#define PB_BOOKMARK_CANCEL 13
-#define PB_BOOKMARK_HELP 14
-#define STR_BOOKMARK_RENAME 15
-
// Index Window: Id's of the tabpages
#define HELP_INDEX_PAGE_FIRST 1
#define HELP_INDEX_PAGE_CONTENTS HELP_INDEX_PAGE_FIRST
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index e62af43004f8..0ebbcf65d645 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -582,18 +582,12 @@ public:
class SfxAddHelpBookmarkDialog_Impl : public ModalDialog
{
private:
- FixedText aTitleFT;
- Edit aTitleED;
- OKButton aOKBtn;
- CancelButton aEscBtn;
- HelpButton aHelpBtn;
-
+ Edit* m_pTitleED;
public:
SfxAddHelpBookmarkDialog_Impl( Window* pParent, sal_Bool bRename = sal_True );
- ~SfxAddHelpBookmarkDialog_Impl();
- void SetTitle( const OUString& rTitle );
- inline OUString GetTitle() const { return aTitleED.GetText(); }
+ void SetTitle( const OUString& rTitle );
+ OUString GetTitle() const { return m_pTitleED->GetText(); }
};
/// Appends ?Language=xy&System=abc to the help URL in rURL
diff --git a/sfx2/source/appl/newhelp.src b/sfx2/source/appl/newhelp.src
index 6107be0ab201..9433d06ca02f 100644
--- a/sfx2/source/appl/newhelp.src
+++ b/sfx2/source/appl/newhelp.src
@@ -346,58 +346,6 @@ String STR_HELP_MENU_TEXT_COPY
Text [ en-US ] = "~Copy" ;
};
-ModalDialog DLG_HELP_ADDBOOKMARK
-{
- HelpID = "sfx2:ModalDialog:DLG_HELP_ADDBOOKMARK";
- Size = MAP_APPFONT ( 208 , 43 ) ;
- Text [ en-US ] = "Add to Bookmarks";
- MOVEABLE = TRUE ;
- CLOSEABLE = TRUE ;
- OUTPUTSIZE = TRUE ;
- SVLOOK = TRUE ;
- FixedText FT_BOOKMARK_TITLE
- {
- PosSize = MAP_APPFONT ( 6 , 6 , 140 , 10 ) ;
- Text [ en-US ] = "Bookmark:" ;
- TABSTOP = FALSE ;
- GROUP = TRUE ;
- LEFT = TRUE ;
- };
- Edit ED_BOOKMARK_TITLE
- {
- HelpID = "sfx2:Edit:DLG_HELP_ADDBOOKMARK:ED_BOOKMARK_TITLE";
- PosSize = MAP_APPFONT ( 6 , 19 , 140 , 12 ) ;
- TABSTOP = TRUE ;
- BORDER = TRUE ;
- };
- OKButton PB_BOOKMARK_OK
- {
- PosSize = MAP_APPFONT ( 152 , 6 , 50 , 14 ) ;
- HIDE = FALSE ;
- TABSTOP = TRUE ;
- GROUP = TRUE ;
- Disable = FALSE ;
- DefButton = TRUE ;
- };
- CancelButton PB_BOOKMARK_CANCEL
- {
- PosSize = MAP_APPFONT ( 152 , 23 , 50 , 14 ) ;
- TABSTOP = TRUE ;
- GROUP = TRUE ;
- };
- HelpButton PB_BOOKMARK_HELP
- {
- PosSize = MAP_APPFONT ( 152 , 43 , 50 , 14 ) ;
- TABSTOP = TRUE ;
- GROUP = TRUE ;
- Hide = TRUE;
- };
- String STR_BOOKMARK_RENAME
- {
- Text [ en-US ] = "Rename Bookmark";
- };
-};
-
Menu MENU_HELP_BOOKMARKS
{
ItemList =
diff --git a/sfx2/uiconfig/ui/bookmarkdialog.ui b/sfx2/uiconfig/ui/bookmarkdialog.ui
new file mode 100644
index 000000000000..3f83f865ac09
--- /dev/null
+++ b/sfx2/uiconfig/ui/bookmarkdialog.ui
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="BookmarkDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Add to Bookmarks</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="alttitle">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">Rename Bookmark</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</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_stock">True</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>
+ <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="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</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_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</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>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">start</property>
+ <property name="hexpand">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Bookmark:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">entry</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>