diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-02-26 00:05:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-26 10:02:05 +0000 |
commit | 58ba8835bcf615cb6d3563c24b3d4d69b32f1b4f (patch) | |
tree | 99741c3fb37494fed71b0dd67b08c6716352b6c1 /cui | |
parent | 67f6b20eccc39d94118e81cdc45fcf40bd7bc9d8 (diff) |
adapt code to comment .ui conversion
Change-Id: I93f98f50443ab3b2fb0ce9f3126b03c8a3281ad2
Diffstat (limited to 'cui')
-rw-r--r-- | cui/AllLangResTarget_cui.mk | 1 | ||||
-rw-r--r-- | cui/UI_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/dialogs/postdlg.cxx | 110 | ||||
-rw-r--r-- | cui/source/dialogs/postdlg.hrc | 41 | ||||
-rw-r--r-- | cui/source/dialogs/postdlg.src | 123 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 13 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 2 | ||||
-rw-r--r-- | cui/source/inc/helpid.hrc | 1 | ||||
-rw-r--r-- | cui/source/inc/postdlg.hxx | 68 | ||||
-rw-r--r-- | cui/uiconfig/ui/comment.ui | 203 |
10 files changed, 235 insertions, 328 deletions
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk index 13aead550bbc..bcf726edea4d 100644 --- a/cui/AllLangResTarget_cui.mk +++ b/cui/AllLangResTarget_cui.mk @@ -67,7 +67,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ cui/source/dialogs/iconcdlg.src \ cui/source/dialogs/multipat.src \ cui/source/dialogs/passwdomdlg.src \ - cui/source/dialogs/postdlg.src \ cui/source/dialogs/scriptdlg.src \ cui/source/dialogs/sdrcelldlg.src \ cui/source/dialogs/showcols.src \ diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk index 9e3a3962ee55..7f34a875d016 100644 --- a/cui/UI_cui.mk +++ b/cui/UI_cui.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\ cui/uiconfig/ui/borderpage \ cui/uiconfig/ui/charnamepage \ cui/uiconfig/ui/colorpage \ + cui/uiconfig/ui/comment \ cui/uiconfig/ui/gradientpage \ cui/uiconfig/ui/colorconfigwin \ cui/uiconfig/ui/effectspage \ diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 7a944e29019a..7fbf2e7d079a 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -28,77 +28,56 @@ #include <unotools/localedatawrapper.hxx> #include <comphelper/processfactory.hxx> #include <svx/svxids.hrc> // SID_ATTR_... -#include <svx/dialogs.hrc> // RID_SVXDLG_POSTIT #define _SVX_POSTDLG_CXX #include <cuires.hrc> -#include "postdlg.hrc" #include <svx/postattr.hxx> #include "postdlg.hxx" #include <dialmgr.hxx> #include "helpid.hrc" -// static ---------------------------------------------------------------- - -static sal_uInt16 pRanges[] = -{ - SID_ATTR_POSTIT_AUTHOR, - SID_ATTR_POSTIT_TEXT, - 0 -}; - // class SvxPostItDialog ------------------------------------------------- -SvxPostItDialog::SvxPostItDialog( Window* pParent, - const SfxItemSet& rCoreSet, - sal_Bool bPrevNext, - sal_Bool bRedline ) : - - SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_POSTIT ) ), - - aPostItFL ( this, CUI_RES( FL_POSTIT ) ), - aLastEditLabelFT( this, CUI_RES( FT_LASTEDITLABEL ) ), - aLastEditFT ( this, CUI_RES( FT_LASTEDIT ) ), - aEditFT ( this, CUI_RES( FT_EDIT ) ), - aEditED ( this, CUI_RES( ED_EDIT ) ), - aAuthorFT ( this, CUI_RES( FT_AUTHOR) ), - aAuthorBtn ( this, CUI_RES( BTN_AUTHOR ) ), - aOKBtn ( this, CUI_RES( BTN_POST_OK ) ), - aCancelBtn ( this, CUI_RES( BTN_POST_CANCEL ) ), - aHelpBtn ( this, CUI_RES( BTN_POST_HELP ) ), - aPrevBtn ( this, CUI_RES( BTN_PREV ) ), - aNextBtn ( this, CUI_RES( BTN_NEXT ) ), - - rSet ( rCoreSet ), - pOutSet ( 0 ) - +SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet, + bool bPrevNext, bool bRedline) + : SfxModalDialog(pParent, "CommentDialog", "cui/ui/comment.ui") + , rSet(rCoreSet) + , pOutSet(0) { + get(m_pLastEditFT, "lastedit"); + get(m_pInsertAuthor, "insertauthor"); + get(m_pAuthorBtn, "author"); + get(m_pOKBtn, "ok"); + get(m_pPrevBtn, "previous"); + get(m_pNextBtn, "next"); + get(m_pEditED, "edit"); + if (bRedline) // HelpIDs for redlining { SetHelpId(HID_REDLINING_DLG); - aEditED.SetHelpId(HID_REDLINING_EDIT); - aPrevBtn.SetHelpId(HID_REDLINING_PREV); - aNextBtn.SetHelpId(HID_REDLINING_NEXT); + m_pEditED->SetHelpId(HID_REDLINING_EDIT); + m_pPrevBtn->SetHelpId(HID_REDLINING_PREV); + m_pNextBtn->SetHelpId(HID_REDLINING_NEXT); } - aPrevBtn.SetClickHdl( LINK( this, SvxPostItDialog, PrevHdl ) ); - aNextBtn.SetClickHdl( LINK( this, SvxPostItDialog, NextHdl ) ); - aAuthorBtn.SetClickHdl( LINK( this, SvxPostItDialog, Stamp ) ); - aOKBtn.SetClickHdl( LINK( this, SvxPostItDialog, OKHdl ) ); + m_pPrevBtn->SetClickHdl( LINK( this, SvxPostItDialog, PrevHdl ) ); + m_pNextBtn->SetClickHdl( LINK( this, SvxPostItDialog, NextHdl ) ); + m_pAuthorBtn->SetClickHdl( LINK( this, SvxPostItDialog, Stamp ) ); + m_pOKBtn->SetClickHdl( LINK( this, SvxPostItDialog, OKHdl ) ); - Font aFont( aEditED.GetFont() ); + Font aFont( m_pEditED->GetFont() ); aFont.SetWeight( WEIGHT_LIGHT ); - aEditED.SetFont( aFont ); + m_pEditED->SetFont( aFont ); sal_Bool bNew = sal_True; - sal_uInt16 nWhich = 0; + sal_uInt16 nWhich = 0; if ( !bPrevNext ) { - aPrevBtn.Hide(); - aNextBtn.Hide(); + m_pPrevBtn->Hide(); + m_pNextBtn->Hide(); } nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ); @@ -139,19 +118,16 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, } ShowLastAuthor(aAuthorStr, aDateStr); - aEditED.SetText(convertLineEnd(aTextStr, GetSystemLineEnd())); - if ( !bNew ) - SetText( CUI_RESSTR( STR_NOTIZ_EDIT ) ); - else - // create newly - SetText( CUI_RESSTR( STR_NOTIZ_INSERT ) ); + //lock to initial .ui placeholder size before replacing contents + Size aSize(m_pEditED->get_preferred_size()); + m_pEditED->set_width_request(aSize.Width()); + m_pEditED->set_height_request(aSize.Height()); - FreeResource(); + m_pEditED->SetText(convertLineEnd(aTextStr, GetSystemLineEnd())); - aEditED.SetAccessibleRelationLabeledBy(&aEditFT); - aEditED.SetAccessibleRelationMemberOf(&aPostItFL); - aAuthorBtn.SetAccessibleRelationMemberOf(&aPostItFL); + if (!bNew) + SetText( get<FixedText>("alttitle")->GetText() ); } // ----------------------------------------------------------------------- @@ -169,13 +145,19 @@ void SvxPostItDialog::ShowLastAuthor(const String& rAuthor, const String& rDate) String sTxt( rAuthor ); sTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " ) ); sTxt += rDate; - aLastEditFT.SetText( sTxt ); + m_pLastEditFT->SetText( sTxt ); } // ----------------------------------------------------------------------- sal_uInt16* SvxPostItDialog::GetRanges() { + static sal_uInt16 pRanges[] = + { + SID_ATTR_POSTIT_AUTHOR, + SID_ATTR_POSTIT_TEXT, + 0 + }; return pRanges; } @@ -183,8 +165,8 @@ sal_uInt16* SvxPostItDialog::GetRanges() void SvxPostItDialog::EnableTravel(sal_Bool bNext, sal_Bool bPrev) { - aPrevBtn.Enable(bPrev); - aNextBtn.Enable(bNext); + m_pPrevBtn->Enable(bPrev); + m_pNextBtn->Enable(bNext); } // ----------------------------------------------------------------------- @@ -213,7 +195,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp) Time aTime( Time::SYSTEM ); String aTmp( SvtUserOptions().GetID() ); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); - String aStr( aEditED.GetText() ); + String aStr( m_pEditED->GetText() ); aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n---- " ) ); if ( aTmp.Len() > 0 ) @@ -228,10 +210,10 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp) aStr = convertLineEnd(aStr, GetSystemLineEnd()); - aEditED.SetText(aStr); + m_pEditED->SetText(aStr); xub_StrLen nLen = aStr.Len(); - aEditED.GrabFocus(); - aEditED.SetSelection( Selection( nLen, nLen ) ); + m_pEditED->GrabFocus(); + m_pEditED->SetSelection( Selection( nLen, nLen ) ); return 0; } @@ -245,7 +227,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, OKHdl) rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) ); pOutSet->Put( SvxPostItDateItem( rLocaleWrapper.getDate( Date( Date::SYSTEM ) ), rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ) ) ); - pOutSet->Put( SvxPostItTextItem( aEditED.GetText(), + pOutSet->Put( SvxPostItTextItem( m_pEditED->GetText(), rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ) ) ); EndDialog( RET_OK ); return 0; diff --git a/cui/source/dialogs/postdlg.hrc b/cui/source/dialogs/postdlg.hrc deleted file mode 100644 index 63cbd680fa59..000000000000 --- a/cui/source/dialogs/postdlg.hrc +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef _SVX_POSTDLG_HRC -#define _SVX_POSTDLG_HRC - -// defines ------------------------------------------------------------------ - -#define FT_LASTEDITLABEL 10 -#define FT_LASTEDIT 11 -#define FT_EDIT 12 -#define ED_EDIT 13 -#define FL_POSTIT 14 -#define BTN_PREV 15 -#define BTN_NEXT 16 -#define BTN_AUTHOR 17 -#define FT_AUTHOR 18 - -#define STR_NOTIZ_EDIT 20 -#define STR_NOTIZ_INSERT 21 - -#define BTN_POST_OK 30 -#define BTN_POST_CANCEL 31 -#define BTN_POST_HELP 32 - - -#endif diff --git a/cui/source/dialogs/postdlg.src b/cui/source/dialogs/postdlg.src deleted file mode 100644 index a4589a16e39f..000000000000 --- a/cui/source/dialogs/postdlg.src +++ /dev/null @@ -1,123 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <cuires.hrc> -#include "postdlg.hrc" -#include "helpid.hrc" -#include <svx/dialogs.hrc> // for RID_SVXDLG_POSTIT - - // RID_SVXDLG_POSTIT ----------------------------------------------------- -ModalDialog RID_SVXDLG_POSTIT -{ - HelpId = HID_POSTIT_DIALOG ; - OutputSize = TRUE ; - SvLook = TRUE ; - Size = MAP_APPFONT ( 198 , 134 ) ; - Text [ en-US ] = "Comment" ; - Moveable = TRUE ; - FixedText FT_LASTEDITLABEL - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 34 , 8 ) ; - Text [ en-US ] = "Author" ; - Left = TRUE ; - }; - FixedText FT_LASTEDIT - { - Pos = MAP_APPFONT ( 48 , 14 ) ; - Size = MAP_APPFONT ( 83 , 8 ) ; - Left = TRUE ; - }; - FixedText FT_EDIT - { - Pos = MAP_APPFONT ( 12 , 27 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Text [ en-US ] = "~Text" ; - Left = TRUE ; - }; - MultiLineEdit ED_EDIT - { - HelpID = "cui:MultiLineEdit:RID_SVXDLG_POSTIT:ED_EDIT"; - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 38 ) ; - Size = MAP_APPFONT ( 123 , 72 ) ; - Left = TRUE ; - VScroll = TRUE ; - HScroll = TRUE ; - IgnoreTab = TRUE ; - }; - FixedLine FL_POSTIT - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 129 , 8 ) ; - Text [ en-US ] = "Contents" ; - }; - OKButton BTN_POST_OK - { - Pos = MAP_APPFONT ( 141 , 6 ) ; - Size = MAP_APPFONT ( 50 , 15 ) ; - DefButton = TRUE ; - }; - CancelButton BTN_POST_CANCEL - { - Pos = MAP_APPFONT ( 141 , 23 ) ; - Size = MAP_APPFONT ( 50 , 15 ) ; - }; - HelpButton BTN_POST_HELP - { - Pos = MAP_APPFONT ( 141 , 40 ) ; - Size = MAP_APPFONT ( 50 , 15 ) ; - }; - ImageButton BTN_PREV - { - HelpID = "cui:ImageButton:RID_SVXDLG_POSTIT:BTN_PREV"; - Pos = MAP_APPFONT ( 141 , 60 ) ; - Size = MAP_APPFONT ( 24 , 14 ) ; - Symbol = IMAGEBUTTON_ARROW_LEFT ; - }; - ImageButton BTN_NEXT - { - HelpID = "cui:ImageButton:RID_SVXDLG_POSTIT:BTN_NEXT"; - Pos = MAP_APPFONT ( 167 , 60 ) ; - Size = MAP_APPFONT ( 24 , 14 ) ; - Symbol = IMAGEBUTTON_ARROW_RIGHT ; - }; - FixedText FT_AUTHOR - { - Pos = MAP_APPFONT ( 12 , 116 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "~Insert"; - }; - PushButton BTN_AUTHOR - { - HelpID = "cui:PushButton:RID_SVXDLG_POSTIT:BTN_AUTHOR"; - Pos = MAP_APPFONT ( 75 , 114 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "Author" ; - }; - // lokale Strings - String STR_NOTIZ_EDIT - { - Text [ en-US ] = "Edit Comment" ; - }; - String STR_NOTIZ_INSERT - { - Text [ en-US ] = "Insert Comment" ; - }; -}; - // ********************************************************************** EOF diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 26532efea2ce..e63292ec9a71 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1793,18 +1793,11 @@ CreateSvxDistributePage AbstractDialogFactory_Impl::GetSvxDistributePageCreatorF return SvxDistributePage::Create; } -DialogGetRanges AbstractDialogFactory_Impl::GetDialogGetRangesFunc( sal_uInt16 nId ) +DialogGetRanges AbstractDialogFactory_Impl::GetDialogGetRangesFunc() { - switch ( nId ) - { - case RID_SVXDLG_POSTIT: - return SvxPostItDialog::GetRanges; //add for SvxPostItDialog - default: - break; - } - - return 0; + return SvxPostItDialog::GetRanges; //add for SvxPostItDialog } + GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId ) { switch ( nId ) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index dd4c37a4802e..539dfe105e73 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -749,7 +749,7 @@ public: virtual CreateSvxDistributePage GetSvxDistributePageCreatorFunc(); virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ); - virtual DialogGetRanges GetDialogGetRangesFunc( sal_uInt16 nId ); //add for SvxPostItDialog + virtual DialogGetRanges GetDialogGetRangesFunc(); //add for SvxPostItDialog virtual VclAbstractDialog* CreateSvxScriptOrgDialog( Window* pParent, const String& rLanguage ); virtual AbstractScriptSelectorDialog* diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index 8f14929c48ba..c62a3353dad9 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -305,7 +305,6 @@ #define HID_GALLERY_TITLE_EDIT "CUI_HID_GALLERY_TITLE_EDIT" #define HID_OFAPAGE_QUOTE_SW_CLB "CUI_HID_OFAPAGE_QUOTE_SW_CLB" #define HID_OFAPAGE_QUOTE_CLB "CUI_HID_OFAPAGE_QUOTE_CLB" -#define HID_POSTIT_DIALOG "CUI_HID_POSTIT_DIALOG" #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/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx index 4918714a3545..21b49a9303b5 100644 --- a/cui/source/inc/postdlg.hxx +++ b/cui/source/inc/postdlg.hxx @@ -19,9 +19,10 @@ #ifndef _SVX_POSTDLG_HXX #define _SVX_POSTDLG_HXX -#include <vcl/group.hxx> #include <vcl/button.hxx> #include <vcl/edit.hxx> +#include <vcl/group.hxx> +#include <vcl/layout.hxx> #include <svtools/stdctrl.hxx> #include <sfx2/basedlgs.hxx> #include <svtools/svmedit.hxx> @@ -44,8 +45,8 @@ class SvxPostItDialog : public SfxModalDialog { public: - SvxPostItDialog( Window* pParent, const SfxItemSet& rCoreSet, - sal_Bool bPrevNext = sal_False, sal_Bool bRedline = sal_False ); + SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet, + bool bPrevNext = false, bool bRedline = false); ~SvxPostItDialog(); static sal_uInt16* GetRanges(); @@ -58,38 +59,47 @@ public: void SetNextHdl( const Link& rLink ) { aNextHdlLink = rLink; } - void EnableTravel(sal_Bool bNext, sal_Bool bPrev); - inline String GetNote() { return aEditED.GetText(); } - inline void SetNote(const String& rTxt) { aEditED.SetText(rTxt); } - - void ShowLastAuthor(const String& rAuthor, const String& rDate); - inline void DontChangeAuthor() { aAuthorBtn.Enable(sal_False); } - inline void HideAuthor() { aAuthorFT.Hide(); aAuthorBtn.Hide(); } - inline void SetReadonlyPostIt(sal_Bool bDisable) - { - aOKBtn.Enable( !bDisable ); - aEditED.SetReadOnly( bDisable ); - aAuthorBtn.Enable( !bDisable ); - } - inline sal_Bool IsOkEnabled() const { return aOKBtn.IsEnabled(); } + void EnableTravel(sal_Bool bNext, sal_Bool bPrev); + String GetNote() + { + return m_pEditED->GetText(); + } + void SetNote(const OUString& rTxt) + { + m_pEditED->SetText(rTxt); + } + void ShowLastAuthor(const String& rAuthor, const String& rDate); + void DontChangeAuthor() + { + m_pAuthorBtn->Enable(false); + } + void HideAuthor() + { + m_pInsertAuthor->Hide(); + } + void SetReadonlyPostIt(bool bDisable) + { + m_pOKBtn->Enable( !bDisable ); + m_pEditED->SetReadOnly( bDisable ); + m_pAuthorBtn->Enable( !bDisable ); + } + bool IsOkEnabled() const + { + return m_pOKBtn->IsEnabled(); + } private: - FixedLine aPostItFL; - FixedText aLastEditLabelFT; - FixedInfo aLastEditFT; + FixedText* m_pLastEditFT; - FixedText aEditFT; - MultiLineEdit aEditED; + MultiLineEdit* m_pEditED; - FixedText aAuthorFT; - PushButton aAuthorBtn; + VclContainer* m_pInsertAuthor; + PushButton* m_pAuthorBtn; - OKButton aOKBtn; - CancelButton aCancelBtn; - HelpButton aHelpBtn; + OKButton* m_pOKBtn; - ImageButton aPrevBtn; - ImageButton aNextBtn; + PushButton* m_pPrevBtn; + PushButton* m_pNextBtn; const SfxItemSet& rSet; SfxItemSet* pOutSet; diff --git a/cui/uiconfig/ui/comment.ui b/cui/uiconfig/ui/comment.ui index 26d55b89e149..12137d23f041 100644 --- a/cui/uiconfig/ui/comment.ui +++ b/cui/uiconfig/ui/comment.ui @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 3.0 --> - <object class="GtkAction" id="action1"/> - <object class="GtkDialog" id="Comment: Insertion"> + <object class="GtkDialog" id="CommentDialog"> <property name="can_focus">False</property> - <property name="border_width">5</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Insert Comment</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="spacing">2</property> + <property name="spacing">12</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> <property name="can_focus">False</property> @@ -20,6 +20,8 @@ <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> <property name="yalign">0.50999999046325684</property> @@ -59,6 +61,55 @@ <property name="position">2</property> </packing> </child> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row_spacing">6</property> + <property name="row_homogeneous">True</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkButton" id="previous"> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="no_show_all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="image">image2</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="next"> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="no_show_all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="image">image3</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + <property name="secondary">True</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -71,28 +122,34 @@ <object class="GtkFrame" id="frame1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> <property name="label_xalign">0</property> <property name="shadow_type">none</property> <child> <object class="GtkAlignment" id="alignment1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="top_padding">6</property> <property name="left_padding">12</property> <child> <object class="GtkBox" id="box1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkBox" id="box2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="spacing">10</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="xalign">0</property> <property name="label" translatable="yes">Author</property> </object> <packing> @@ -102,55 +159,10 @@ </packing> </child> <child> - <object class="GtkBox" id="box3"> + <object class="GtkLabel" id="lastedit"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="spacing">1</property> - <child> - <object class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">,</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label8"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> + <property name="xalign">0</property> </object> <packing> <property name="expand">False</property> @@ -172,6 +184,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">_Text</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">edit</property> </object> <packing> <property name="expand">False</property> @@ -183,9 +196,20 @@ <object class="GtkScrolledWindow" id="scrolledwindow1"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="hscrollbar_policy">always</property> + <property name="vscrollbar_policy">always</property> <property name="shadow_type">in</property> <child> - <placeholder/> + <object class="GtkTextView" id="edit"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="wrap_mode">char</property> + <property name="buffer">textbuffer1</property> + </object> </child> </object> <packing> @@ -195,12 +219,40 @@ </packing> </child> <child> - <object class="GtkLabel" id="label5"> + <object class="GtkGrid" id="insertauthor"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Insert</property> - <property name="use_underline">True</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Insert</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">author</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="author"> + <property name="label" translatable="yes">Author</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -208,6 +260,18 @@ <property name="position">3</property> </packing> </child> + <child> + <object class="GtkLabel" id="alttitle"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="label" translatable="yes">Edit Comment</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> </object> </child> </object> @@ -217,11 +281,14 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Contents</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> </child> </object> <packing> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> <property name="position">1</property> </packing> @@ -234,4 +301,24 @@ <action-widget response="0">help</action-widget> </action-widgets> </object> + <object class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-go-back</property> + </object> + <object class="GtkImage" id="image3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-go-forward</property> + </object> + <object class="GtkTextBuffer" id="textbuffer1"> + <property name="text">12345678901234567890123456789012345 +2 +3 +4 +5 +6 +7 +8</property> + </object> </interface> |