Kaydet (Commit) 0136616a authored tarafından Caolán McNamara's avatar Caolán McNamara

convert help bookmark dialog to .ui

Change-Id: I7831bc63f66ab7fe30f5648efc2f733c6bd90d0e
üst e52f14ef
......@@ -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 \
......
......@@ -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)
......
......@@ -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: */
......@@ -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
......
......@@ -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
......
......@@ -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 =
......
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment