diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-16 17:15:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-16 19:09:52 +0000 |
commit | 627b0e8b095dc3a08c6716db0fa6a6376125468e (patch) | |
tree | 305a0e7d7536d21d5578f1ae0c6ef54b38823f2a /cui | |
parent | 0d35caf02d4744f55f123326e65441126b8a99bf (diff) |
convert gallery title dialog to .ui
Change-Id: I432b8c36e28576d016c58d972299aa804963829e
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 19 | ||||
-rw-r--r-- | cui/source/dialogs/gallery.src | 47 | ||||
-rw-r--r-- | cui/source/inc/cuigaldlg.hxx | 13 | ||||
-rw-r--r-- | cui/source/inc/gallery.hrc | 3 | ||||
-rw-r--r-- | cui/source/inc/helpid.hrc | 1 | ||||
-rw-r--r-- | cui/uiconfig/ui/gallerytitledialog.ui | 126 |
7 files changed, 135 insertions, 75 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 486ace413bcf..005c0ef96f6d 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -42,6 +42,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/dbregisterpage \ cui/uiconfig/ui/effectspage \ cui/uiconfig/ui/formatcellsdialog \ + cui/uiconfig/ui/gallerytitledialog \ cui/uiconfig/ui/hangulhanjaadddialog \ cui/uiconfig/ui/hatchpage \ cui/uiconfig/ui/hyphenate \ diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index ee03268f76a0..60bbe950246c 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -520,21 +520,12 @@ IMPL_LINK( ActualizeProgress, ActualizeHdl, INetURLObject*, pURL ) return 0; } -// --------------- -// - TitleDialog - -// --------------- - -TitleDialog::TitleDialog( Window* pParent, const OUString& rOldTitle ) : - ModalDialog ( pParent, CUI_RES( RID_SVXDLG_GALLERY_TITLE ) ), - maOk ( this, CUI_RES( BTN_OK ) ), - maCancel ( this, CUI_RES( BTN_CANCEL ) ), - maHelp ( this, CUI_RES( BTN_HELP ) ), - maFL ( this, CUI_RES( FL_TITLE ) ), - maEdit ( this, CUI_RES( EDT_TITLE ) ) +TitleDialog::TitleDialog(Window* pParent, const OUString& rOldTitle) + : ModalDialog (pParent, "GalleryTitleDialog", "cui/ui/gallerytitledialog.ui") { - FreeResource(); - maEdit.SetText( rOldTitle ); - maEdit.GrabFocus(); + get(m_pEdit, "entry"); + m_pEdit->SetText( rOldTitle ); + m_pEdit->GrabFocus(); } // ------------------- diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src index 93505da81006..f20bef189b7d 100644 --- a/cui/source/dialogs/gallery.src +++ b/cui/source/dialogs/gallery.src @@ -219,53 +219,6 @@ TabPage RID_SVXTABPAGE_GALLERYTHEME_FILES /******************************************************************************/ -ModalDialog RID_SVXDLG_GALLERY_TITLE -{ - HelpId = HID_GALLERY_TITLE; - OutputSize = TRUE ; - Border = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 168 , 63 ) ; - Text [ en-US ] = "Enter Title" ; - Moveable = TRUE ; - - OkButton BTN_OK - { - DefButton = TRUE ; - Pos = MAP_APPFONT ( 112 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 112 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 112 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - - FixedLine FL_TITLE - { - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Text [ en-US ] = "Title" ; - }; - Edit EDT_TITLE - { - HelpId = HID_GALLERY_TITLE_EDIT; - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 18 ) ; - Size = MAP_APPFONT ( 88, 12 ) ; - }; -}; - -/******************************************************************************/ - ModalDialog RID_SVXDLG_GALLERY_SEARCH_PROGRESS { HelpId = HID_GALLERY_SEARCH ; diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 10fe82d0684a..bb851d6a35b6 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -176,17 +176,10 @@ public: class TitleDialog : public ModalDialog { private: - - OKButton maOk; - CancelButton maCancel; - HelpButton maHelp; - FixedLine maFL; - Edit maEdit; - + Edit* m_pEdit; public: - - TitleDialog( Window* pParent, const OUString& rOldText ); - OUString GetTitle() const { return maEdit.GetText(); } + TitleDialog(Window* pParent, const OUString& rOldText); + OUString GetTitle() const { return m_pEdit->GetText(); } }; class GalleryIdDialog : public ModalDialog diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc index c9e8ed78bb56..823901de69b7 100644 --- a/cui/source/inc/gallery.hrc +++ b/cui/source/inc/gallery.hrc @@ -20,7 +20,6 @@ // Gallery TabDialogs/TabPages #define RID_SVXTABDLG_GALLERYTHEME (RID_CUI_GALLERY_START + 2) -#define RID_SVXDLG_GALLERY_TITLE (RID_CUI_GALLERY_START + 82) #define RID_SVXTABPAGE_GALLERY_GENERAL (RID_CUI_GALLERY_START + 1) #define RID_SVXTABPAGE_GALLERYTHEME_FILES (RID_CUI_GALLERY_START + 4) @@ -70,8 +69,6 @@ #define FT_ACTUALIZE_FILE 1 #define FL_ID 1 #define LB_RESNAME 1 -#define EDT_TITLE 20 -#define FL_TITLE 21 // Gallery-TabDialog #define FI_MS_IMAGE 1 diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index 77c3a14260c7..e0c5d2fa09b6 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -239,7 +239,6 @@ #define HID_GRFFILTER_EMBOSS_LIGHT "CUI_HID_GRFFILTER_EMBOSS_LIGHT" #define HID_LINKDLG_TABLB "CUI_HID_LINKDLG_TABLB" #define HID_MACRO_HEADERTABLISTBOX "CUI_HID_MACRO_HEADERTABLISTBOX" -#define HID_GALLERY_TITLE_EDIT "CUI_HID_GALLERY_TITLE_EDIT" #define HID_DLG_PASSWORD_TO_OPEN_MODIFY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY" #define HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN" diff --git a/cui/uiconfig/ui/gallerytitledialog.ui b/cui/uiconfig/ui/gallerytitledialog.ui new file mode 100644 index 000000000000..2e12c98f0e78 --- /dev/null +++ b/cui/uiconfig/ui/gallerytitledialog.ui @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkAdjustment" id="adjustment1"> + <property name="upper">500</property> + <property name="value">100</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkDialog" id="GalleryTitleDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Enter Title</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="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">Title</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> + <property name="width_chars">32</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">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="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="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="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">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> |