sw/AllLangResTarget_sw.mk | 1 sw/inc/helpid.h | 1 sw/source/ui/inc/glosbib.hxx | 46 +++-- sw/source/ui/inc/misc.hrc | 3 sw/source/ui/misc/glosbib.cxx | 180 ++++++++++---------- sw/source/ui/misc/glosbib.hrc | 32 --- sw/source/ui/misc/glosbib.src | 137 --------------- sw/uiconfig/swriter/ui/editcategories.ui | 269 ++++++++++++++----------------- 8 files changed, 248 insertions(+), 421 deletions(-)
New commits: commit 1a162570d0050a7526a442f90f09c4bb0eb95d97 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jan 9 15:11:32 2013 +0000 adapt code to edit categories dialog .ui Change-Id: Ib03ec188ba30d122ff687937209b989d418fe7ac diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk index f554549..033d7c8 100644 --- a/sw/AllLangResTarget_sw.mk +++ b/sw/AllLangResTarget_sw.mk @@ -139,7 +139,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\ sw/source/ui/lingu/olmenu.src \ sw/source/ui/misc/autocorr.src \ sw/source/ui/misc/docfnote.src \ - sw/source/ui/misc/glosbib.src \ sw/source/ui/misc/glossary.src \ sw/source/ui/misc/numberingtypelistbox.src \ sw/source/ui/misc/outline.src \ diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index 145e6c4..8cef3ce 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -20,7 +20,6 @@ #include <svx/svxcommands.h> #include <sfx2/sfxcommands.h> -#define HID_BIB_BASE "SW_HID_BIB_BASE" #define HID_MERGE_PRINTMONITOR "SW_HID_MERGE_PRINTMONITOR" #define HID_FLD_INPUT "SW_HID_FLD_INPUT" #define HID_DOCINFO_EDT "SW_HID_DOCINFO_EDT" diff --git a/sw/source/ui/inc/glosbib.hxx b/sw/source/ui/inc/glosbib.hxx index 7d722b4..99673dc 100644 --- a/sw/source/ui/inc/glosbib.hxx +++ b/sw/source/ui/inc/glosbib.hxx @@ -35,9 +35,16 @@ class SwGlossaryHdl; class FEdit : public Edit { - public: - FEdit(Window * pParent, const ResId& rResId) : - Edit(pParent, rResId){} +public: + FEdit(Window* pParent, const ResId& rResId) + : Edit(pParent, rResId) + { + } + + FEdit(Window* pParent) + : Edit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK) + { + } virtual void KeyInput( const KeyEvent& rKEvent ); }; @@ -52,27 +59,28 @@ struct GlosBibUserData class SwGlossaryGroupTLB : public SvTabListBox { public: - SwGlossaryGroupTLB(Window* pParent, const ResId& rResId) : - SvTabListBox(pParent, rResId) {} + SwGlossaryGroupTLB(Window* pParent, const ResId& rResId) + : SvTabListBox(pParent, rResId) + { + } - virtual void RequestHelp( const HelpEvent& rHEvt ); + SwGlossaryGroupTLB(Window* pParent) + : SvTabListBox(pParent, WB_BORDER|WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT) + { + } + + virtual void RequestHelp( const HelpEvent& rHEvt ); }; class SwGlossaryGroupDlg : public SvxStandardDialog { - FixedText aBibFT; - FEdit aNameED; - FixedText aPathFT; - ListBox aPathLB; - FixedText aSelectFT; - SwGlossaryGroupTLB aGroupTLB; - - OKButton aOkPB; - CancelButton aCancelPB; - HelpButton aHelpPB; - PushButton aNewPB; - PushButton aDelPB; - PushButton aRenamePB; + FEdit* m_pNameED; + ListBox* m_pPathLB; + SwGlossaryGroupTLB* m_pGroupTLB; + + PushButton* m_pNewPB; + PushButton* m_pDelPB; + PushButton* m_pRenamePB; typedef std::vector< ::rtl::OUString> OUVector_t; OUVector_t m_RemovedArr; diff --git a/sw/source/ui/inc/misc.hrc b/sw/source/ui/inc/misc.hrc index dad483d..0944840 100644 --- a/sw/source/ui/inc/misc.hrc +++ b/sw/source/ui/inc/misc.hrc @@ -21,10 +21,7 @@ #include "rcid.hrc" -#define STR_GLOSSARY_BIB_DLG (RC_MISC_BEGIN + 5) - #define DLG_DOC_FOOTNOTE (RC_MISC_BEGIN + 13) -#define DLG_BIB_BASE (RC_MISC_BEGIN + 16) #define DLG_INSERT_BOOKMARK (RC_MISC_BEGIN + 17) #define DLG_NUM_NAMES (RC_MISC_BEGIN + 18) #define DLG_SORTING (RC_MISC_BEGIN + 19) diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 5e824dc..e0b4756 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -35,10 +35,7 @@ #include <glosdoc.hxx> #include <swunohelper.hxx> -#include <glosbib.hrc> #include <misc.hrc> -#include <helpid.h> - #define PATH_CASE_SENSITIVE 0x01 #define PATH_READONLY 0x02 @@ -46,49 +43,44 @@ #define RENAME_TOKEN_DELIM (sal_Unicode)1 SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, - std::vector<String> const& rPathArr, - SwGlossaryHdl *pHdl) : - SvxStandardDialog(pParent, SW_RES(DLG_BIB_BASE)), - aBibFT( this, SW_RES(FT_BIB)), - aNameED( this, SW_RES(ED_NAME)), - aPathFT( this, SW_RES(FT_PATH)), - aPathLB( this, SW_RES(LB_PATH)), - aSelectFT( this, SW_RES(FT_SELECT)), - aGroupTLB( this, SW_RES(TLB_GROUPS)), - - aOkPB( this, SW_RES(BT_OK)), - aCancelPB( this, SW_RES(BT_CANCEL)), - aHelpPB( this, SW_RES(BT_HELP)), - aNewPB( this, SW_RES(PB_NEW)), - aDelPB( this, SW_RES(PB_DELETE)), - aRenamePB( this, SW_RES(PB_RENAME)), - - pGlosHdl(pHdl) + std::vector<String> const& rPathArr, SwGlossaryHdl *pHdl) + : SvxStandardDialog(pParent, "EditCategoriesDialog", + "modules/swriter/ui/editcategories.ui") + , pGlosHdl(pHdl) { - FreeResource(); + get(m_pPathLB, "pathlb"); + get(m_pNewPB, "new"); + get(m_pDelPB, "delete"); + get(m_pRenamePB, "rename"); + get(m_pNameED, "name"); + get(m_pGroupTLB, "group"); + + const int nAppFontUnits = 130; + long nWidth = LogicToPixel(Size(nAppFontUnits, 0), MAP_APPFONT).Width(); + m_pPathLB->set_width_request(nWidth); + //just has to be something small, real size will be available space + m_pGroupTLB->set_width_request(nWidth); long nTabs[] = { 2, // Number of Tabs - 0, 160 + 0, nAppFontUnits }; - aGroupTLB.SetHelpId(HID_GLOS_GROUP_TREE); - aGroupTLB.SetTabs( &nTabs[0], MAP_APPFONT ); - aGroupTLB.SetStyle(aGroupTLB.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT); - aGroupTLB.SetSelectHdl(LINK(this, SwGlossaryGroupDlg, SelectHdl)); - aGroupTLB.GetModel()->SetSortMode(SortAscending); - aNewPB.SetClickHdl(LINK(this, SwGlossaryGroupDlg, NewHdl)); - aDelPB.SetClickHdl(LINK(this, SwGlossaryGroupDlg, DeleteHdl)); - aNameED.SetModifyHdl(LINK(this, SwGlossaryGroupDlg, ModifyHdl)); - aPathLB.SetSelectHdl(LINK(this, SwGlossaryGroupDlg, ModifyHdl)); - aRenamePB.SetClickHdl(LINK(this, SwGlossaryGroupDlg, RenameHdl)); + m_pGroupTLB->SetTabs( &nTabs[0], MAP_APPFONT ); + m_pGroupTLB->SetSelectHdl(LINK(this, SwGlossaryGroupDlg, SelectHdl)); + m_pGroupTLB->GetModel()->SetSortMode(SortAscending); + m_pNewPB->SetClickHdl(LINK(this, SwGlossaryGroupDlg, NewHdl)); + m_pDelPB->SetClickHdl(LINK(this, SwGlossaryGroupDlg, DeleteHdl)); + m_pNameED->SetModifyHdl(LINK(this, SwGlossaryGroupDlg, ModifyHdl)); + m_pPathLB->SetSelectHdl(LINK(this, SwGlossaryGroupDlg, ModifyHdl)); + m_pRenamePB->SetClickHdl(LINK(this, SwGlossaryGroupDlg, RenameHdl)); for (size_t i = 0; i < rPathArr.size(); ++i) { String sPath(rPathArr[i]); INetURLObject aTempURL(sPath); sPath = aTempURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET ); - aPathLB.InsertEntry(sPath); + m_pPathLB->InsertEntry(sPath); sal_uLong nCaseReadonly = 0; utl::TempFile aTempFile(&sPath); aTempFile.EnableKillingFile(); @@ -96,10 +88,10 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, nCaseReadonly |= PATH_READONLY; else if( SWUnoHelper::UCB_IsCaseSensitiveFileName( aTempFile.GetURL())) nCaseReadonly |= PATH_CASE_SENSITIVE; - aPathLB.SetEntryData(i, (void*)nCaseReadonly); + m_pPathLB->SetEntryData(i, (void*)nCaseReadonly); } - aPathLB.SelectEntryPos(0); - aPathLB.Enable(sal_True); + m_pPathLB->SelectEntryPos(0); + m_pPathLB->Enable(sal_True); const sal_uInt16 nCount = pHdl->GetGroupCnt(); for( sal_uInt16 i = 0; i < nCount; ++i) @@ -113,13 +105,13 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent, pData->sGroupTitle = sTitle; String sTemp(sTitle); sTemp += '\t'; - pData->sPath = aPathLB.GetEntry((sal_uInt16)sGroup.GetToken(1, GLOS_DELIM).ToInt32()); + pData->sPath = m_pPathLB->GetEntry((sal_uInt16)sGroup.GetToken(1, GLOS_DELIM).ToInt32()); sTemp += pData->sPath; - SvTreeListEntry* pEntry = aGroupTLB.InsertEntry(sTemp); + SvTreeListEntry* pEntry = m_pGroupTLB->InsertEntry(sTemp); pEntry->SetUserData(pData); } - aGroupTLB.GetModel()->Resort(); + m_pGroupTLB->GetModel()->Resort(); } SwGlossaryGroupDlg::~SwGlossaryGroupDlg() @@ -128,8 +120,8 @@ SwGlossaryGroupDlg::~SwGlossaryGroupDlg() void SwGlossaryGroupDlg::Apply() { - if(aNewPB.IsEnabled()) - NewHdl(&aNewPB); + if(m_pNewPB->IsEnabled()) + NewHdl(m_pNewPB); String aActGroup = SwGlossaryDlg::GetCurrGroup(); @@ -141,9 +133,9 @@ void SwGlossaryGroupDlg::Apply() if( sDelGroup == aActGroup ) { //when the current group is deleted, the current group has to be relocated - if(aGroupTLB.GetEntryCount()) + if(m_pGroupTLB->GetEntryCount()) { - SvTreeListEntry* pFirst = aGroupTLB.First(); + SvTreeListEntry* pFirst = m_pGroupTLB->First(); GlosBibUserData* pUserData = (GlosBibUserData*)pFirst->GetUserData(); pGlosHdl->SetCurGroup(pUserData->sGroupName); } @@ -192,55 +184,55 @@ void SwGlossaryGroupDlg::Apply() IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, EMPTYARG ) { - aNewPB.Enable(sal_False); - SvTreeListEntry* pFirstEntry = aGroupTLB.FirstSelected(); + m_pNewPB->Enable(sal_False); + SvTreeListEntry* pFirstEntry = m_pGroupTLB->FirstSelected(); if(pFirstEntry) { GlosBibUserData* pUserData = (GlosBibUserData*)pFirstEntry->GetUserData(); String sEntry(pUserData->sGroupName); - String sName(aNameED.GetText()); + String sName(m_pNameED->GetText()); sal_Bool bExists = sal_False; - sal_uLong nPos = aGroupTLB.GetEntryPos(sName, 0); + sal_uLong nPos = m_pGroupTLB->GetEntryPos(sName, 0); if( 0xffffffff > nPos) { - SvTreeListEntry* pEntry = aGroupTLB.GetEntry(nPos); + SvTreeListEntry* pEntry = m_pGroupTLB->GetEntry(nPos); GlosBibUserData* pFoundData = (GlosBibUserData*)pEntry->GetUserData(); String sGroup = pFoundData->sGroupName; bExists = sGroup == sEntry; } - aRenamePB.Enable(!bExists && sName.Len()); - aDelPB.Enable(IsDeleteAllowed(sEntry)); + m_pRenamePB->Enable(!bExists && sName.Len()); + m_pDelPB->Enable(IsDeleteAllowed(sEntry)); } return 0; } IMPL_LINK_NOARG(SwGlossaryGroupDlg, NewHdl) { - String sGroup(aNameED.GetText()); + String sGroup(m_pNameED->GetText()); sGroup += GLOS_DELIM; - sGroup += String::CreateFromInt32(aPathLB.GetSelectEntryPos()); + sGroup += String::CreateFromInt32(m_pPathLB->GetSelectEntryPos()); OSL_ENSURE(!pGlosHdl->FindGroupName(sGroup), "group already available!"); m_InsertedArr.push_back(sGroup); - String sTemp(aNameED.GetText()); + String sTemp(m_pNameED->GetText()); sTemp += '\t'; - sTemp += aPathLB.GetSelectEntry(); - SvTreeListEntry* pEntry = aGroupTLB.InsertEntry(sTemp); + sTemp += m_pPathLB->GetSelectEntry(); + SvTreeListEntry* pEntry = m_pGroupTLB->InsertEntry(sTemp); GlosBibUserData* pData = new GlosBibUserData; - pData->sPath = aPathLB.GetSelectEntry(); + pData->sPath = m_pPathLB->GetSelectEntry(); pData->sGroupName = sGroup; - pData->sGroupTitle = aNameED.GetText(); + pData->sGroupTitle = m_pNameED->GetText(); pEntry->SetUserData(pData); - aGroupTLB.Select(pEntry); - aGroupTLB.MakeVisible(pEntry); - aGroupTLB.GetModel()->Resort(); + m_pGroupTLB->Select(pEntry); + m_pGroupTLB->MakeVisible(pEntry); + m_pGroupTLB->GetModel()->Resort(); return 0; } IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton ) { - SvTreeListEntry* pEntry = aGroupTLB.FirstSelected(); + SvTreeListEntry* pEntry = m_pGroupTLB->FirstSelected(); if(!pEntry) { pButton->Enable(sal_False); @@ -284,25 +276,25 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton ) m_RemovedArr.push_back(sGroupEntry); } delete pUserData; - aGroupTLB.GetModel()->Remove(pEntry); - if(!aGroupTLB.First()) + m_pGroupTLB->GetModel()->Remove(pEntry); + if(!m_pGroupTLB->First()) pButton->Enable(sal_False); //the content must be deleted - otherwise the new handler would be called in Apply() - aNameED.SetText(aEmptyStr); + m_pNameED->SetText(aEmptyStr); return 0; } IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl) { - SvTreeListEntry* pEntry = aGroupTLB.FirstSelected(); + SvTreeListEntry* pEntry = m_pGroupTLB->FirstSelected(); GlosBibUserData* pUserData = (GlosBibUserData*)pEntry->GetUserData(); String sEntry(pUserData->sGroupName); - String sNewName(aNameED.GetText()); + String sNewName(m_pNameED->GetText()); String sNewTitle(sNewName); sNewName += GLOS_DELIM; - sNewName += String::CreateFromInt32(aPathLB.GetSelectEntryPos()); + sNewName += String::CreateFromInt32(m_pPathLB->GetSelectEntryPos()); OSL_ENSURE(!pGlosHdl->FindGroupName(sNewName), "group already available!"); // if the name to be renamed is among the new ones - replace @@ -327,45 +319,45 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl) m_RenamedArr.push_back(sEntry); } delete (GlosBibUserData*)pEntry->GetUserData(); - aGroupTLB.GetModel()->Remove(pEntry); - String sTemp(aNameED.GetText()); + m_pGroupTLB->GetModel()->Remove(pEntry); + String sTemp(m_pNameED->GetText()); sTemp += '\t'; - sTemp += aPathLB.GetSelectEntry(); - pEntry = aGroupTLB.InsertEntry(sTemp); + sTemp += m_pPathLB->GetSelectEntry(); + pEntry = m_pGroupTLB->InsertEntry(sTemp); GlosBibUserData* pData = new GlosBibUserData; - pData->sPath = aPathLB.GetSelectEntry(); + pData->sPath = m_pPathLB->GetSelectEntry(); pData->sGroupName = sNewName; pData->sGroupTitle = sNewTitle; pEntry->SetUserData(pData); - aGroupTLB.Select(pEntry); - aGroupTLB.MakeVisible(pEntry); - aGroupTLB.GetModel()->Resort(); + m_pGroupTLB->Select(pEntry); + m_pGroupTLB->MakeVisible(pEntry); + m_pGroupTLB->GetModel()->Resort(); return 0; } IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl) { - String sEntry(aNameED.GetText()); + String sEntry(m_pNameED->GetText()); sal_Bool bEnableNew = sal_True; sal_Bool bEnableDel = sal_False; sal_uLong nCaseReadonly = - (sal_uLong)aPathLB.GetEntryData(aPathLB.GetSelectEntryPos()); + (sal_uLong)m_pPathLB->GetEntryData(m_pPathLB->GetSelectEntryPos()); sal_Bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY); if(!sEntry.Len() || bDirReadonly) bEnableNew = sal_False; else if(sEntry.Len()) { - sal_uLong nPos = aGroupTLB.GetEntryPos(sEntry, 0); + sal_uLong nPos = m_pGroupTLB->GetEntryPos(sEntry, 0); //if it's not case sensitive you have to search for yourself if( 0xffffffff == nPos) { const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore(); - for(sal_uInt16 i = 0; i < aGroupTLB.GetEntryCount(); i++) + for(sal_uInt16 i = 0; i < m_pGroupTLB->GetEntryCount(); i++) { - String sTemp = aGroupTLB.GetEntryText( i, 0 ); - nCaseReadonly = (sal_uLong)aPathLB.GetEntryData( - aPathLB.GetEntryPos(aGroupTLB.GetEntryText(i,1))); + String sTemp = m_pGroupTLB->GetEntryText( i, 0 ); + nCaseReadonly = (sal_uLong)m_pPathLB->GetEntryData( + m_pPathLB->GetEntryPos(m_pGroupTLB->GetEntryText(i,1))); sal_Bool bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE); if( !bCase && rSCmp.isEqual( sTemp, sEntry )) @@ -378,20 +370,20 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl) if( 0xffffffff > nPos) { bEnableNew = sal_False; - aGroupTLB.Select(aGroupTLB.GetEntry( nPos )); - aGroupTLB.MakeVisible(aGroupTLB.GetEntry( nPos )); + m_pGroupTLB->Select(m_pGroupTLB->GetEntry( nPos )); + m_pGroupTLB->MakeVisible(m_pGroupTLB->GetEntry( nPos )); } } - SvTreeListEntry* pEntry = aGroupTLB.FirstSelected(); + SvTreeListEntry* pEntry = m_pGroupTLB->FirstSelected(); if(pEntry) { GlosBibUserData* pUserData = (GlosBibUserData*)pEntry->GetUserData(); bEnableDel = IsDeleteAllowed(pUserData->sGroupName); } - aDelPB.Enable(bEnableDel); - aNewPB.Enable(bEnableNew); - aRenamePB.Enable(bEnableNew && pEntry); + m_pDelPB->Enable(bEnableDel); + m_pNewPB->Enable(bEnableNew); + m_pRenamePB->Enable(bEnableNew && pEntry); return 0; } @@ -426,6 +418,11 @@ void FEdit::KeyInput( const KeyEvent& rKEvent ) Edit::KeyInput( rKEvent ); } +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeFEdit(Window *pParent, VclBuilder::stringmap &) +{ + return new FEdit(pParent); +} + void SwGlossaryGroupTLB::RequestHelp( const HelpEvent& rHEvt ) { Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() )); @@ -457,4 +454,9 @@ void SwGlossaryGroupTLB::RequestHelp( const HelpEvent& rHEvt ) } } +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwGlossaryGroupTLB(Window *pParent, VclBuilder::stringmap &) +{ + return new SwGlossaryGroupTLB(pParent); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/misc/glosbib.hrc b/sw/source/ui/misc/glosbib.hrc deleted file mode 100644 index c7f6535..0000000 --- a/sw/source/ui/misc/glosbib.hrc +++ /dev/null @@ -1,32 +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 . - */ - -#define FT_BIB 1 -#define FT_PATH 2 -#define FT_SELECT 3 -#define CO_NAME 2 -#define PB_NEW 3 -#define PB_DELETE 4 -#define BT_OK 5 -#define BT_CANCEL 6 -#define BT_HELP 7 -#define LB_PATH 8 -#define TLB_GROUPS 9 -#define ED_NAME 10 -#define PB_RENAME 11 - diff --git a/sw/source/ui/misc/glosbib.src b/sw/source/ui/misc/glosbib.src deleted file mode 100644 index 03a0222..0000000 --- a/sw/source/ui/misc/glosbib.src +++ /dev/null @@ -1,137 +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 "glosbib.hrc" -#include "misc.hrc" -#include "helpid.h" -ModalDialog DLG_BIB_BASE -{ - HelpID = HID_BIB_BASE ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 349 , 121 ) ; - Moveable = TRUE ; - Text [ en-US ] = "Edit Categories" ; - PushButton PB_NEW - { - HelpID = "sw:PushButton:DLG_BIB_BASE:PB_NEW"; - Disable = TRUE ; - Pos = MAP_APPFONT ( 293 , 66 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~New" ; - TabStop = TRUE ; - }; - PushButton PB_DELETE - { - HelpID = "sw:PushButton:DLG_BIB_BASE:PB_DELETE"; - Pos = MAP_APPFONT ( 293 , 83 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Delete" ; - TabStop = TRUE ; - Disable = TRUE ; - }; - PushButton PB_RENAME - { - HelpID = "sw:PushButton:DLG_BIB_BASE:PB_RENAME"; - Disable = TRUE ; - Pos = MAP_APPFONT ( 293 , 100 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Rename" ; - TabStop = TRUE ; - }; - FixedText FT_BIB - { - Pos = MAP_APPFONT ( 12 , 3 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Text [ en-US ] = "Category" ; - }; - OKButton BT_OK - { - Pos = MAP_APPFONT ( 293 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BT_CANCEL - { - Pos = MAP_APPFONT ( 293 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BT_HELP - { - Pos = MAP_APPFONT ( 293 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - Edit ED_NAME - { - HelpID = "sw:Edit:DLG_BIB_BASE:ED_NAME"; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 159 , 12 ) ; - TabStop = TRUE ; - Border = TRUE ; - MaxTextLength = 256 ; - }; - FixedText FT_PATH - { - Pos = MAP_APPFONT ( 174 , 3 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "Path"; - }; - ListBox LB_PATH - { - HelpID = "sw:ListBox:DLG_BIB_BASE:LB_PATH"; - Pos = MAP_APPFONT ( 174 , 14 ) ; - Size = MAP_APPFONT ( 107 , 50 ) ; - DropDown = TRUE ; - Border = TRUE ; - TabStop = TRUE ; - DDExtraWidth = TRUE ; - }; - FixedText FT_SELECT - { - Pos = MAP_APPFONT ( 12 , 30 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Text [ en-US ] = "Selection list"; - }; - Control TLB_GROUPS - { - Pos = MAP_APPFONT ( 12 , 41 ) ; - Size = MAP_APPFONT ( 269 , 73 ) ; - TabStop = TRUE ; - Border = TRUE ; - }; - /* ComboBox CO_NAME - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 89 , 76 ) ; - TabStop = TRUE ; -#ifdef WIN - MaxTextLength = 8 ; -#else - MaxTextLength = 32 ; -#endif - Sort = TRUE ; - };*/ -}; -/* -String STR_GLOSSARY_BIB_DLG -{ - Text [ en-US ] = "Edit Categories" ; -};*/ diff --git a/sw/uiconfig/swriter/ui/editcategories.ui b/sw/uiconfig/swriter/ui/editcategories.ui index 77bd0f3..122c43c 100644 --- a/sw/uiconfig/swriter/ui/editcategories.ui +++ b/sw/uiconfig/swriter/ui/editcategories.ui @@ -1,140 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 3.0 --> - <object class="GtkWindow" id="window1"> + <object class="GtkDialog" id="EditCategoriesDialog"> <property name="can_focus">False</property> - <child> - <object class="GtkBox" id="box1"> - <property name="visible">True</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Edit Categories</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> <property name="can_focus">False</property> - <child> - <object class="GtkGrid" id="grid1"> - <property name="visible">True</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> <property name="can_focus">False</property> - <property name="row_spacing">8</property> - <child> - <object class="GtkGrid" id="grid2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">5</property> - <property name="column_spacing">10</property> - <child> - <object class="GtkEntry" id="entry1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">â¢</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> - </packing> - </child> - <child> - <object class="GtkComboBoxText" id="comboboxtext1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="entry_text_column">0</property> - <property name="id_column">1</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Category</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="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="xalign">0.46000000834465027</property> - <property name="label" translatable="yes">Path</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="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="GtkScrolledWindow" id="scrolledwindow1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="shadow_type">in</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - <property name="width">1</property> - <property name="height">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Selection list</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkButtonBox" id="buttonbox1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="valign">start</property> <property name="orientation">vertical</property> - <property name="spacing">5</property> - <property name="homogeneous">True</property> <property name="layout_style">start</property> <child> - <object class="GtkButton" id="button1"> + <object class="GtkButton" id="ok"> <property name="label">gtk-ok</property> - <property name="use_action_appearance">False</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_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -144,13 +32,11 @@ </packing> </child> <child> - <object class="GtkButton" id="button2"> + <object class="GtkButton" id="cancel"> <property name="label">gtk-cancel</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -160,13 +46,11 @@ </packing> </child> <child> - <object class="GtkButton" id="button3"> + <object class="GtkButton" id="help"> <property name="label">gtk-help</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -176,13 +60,11 @@ </packing> </child> <child> - <object class="GtkButton" id="button4"> + <object class="GtkButton" id="new"> <property name="label">gtk-new</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -194,11 +76,9 @@ <child> <object class="GtkButton" id="delete"> <property name="label">gtk-delete</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <property name="use_stock">True</property> </object> <packing> @@ -208,13 +88,12 @@ </packing> </child> <child> - <object class="GtkButton" id="button6"> - <property name="label" translatable="yes">Rename</property> - <property name="use_action_appearance">False</property> + <object class="GtkButton" id="rename"> + <property name="label" translatable="yes">_Rename</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> </object> <packing> <property name="expand">False</property> @@ -226,10 +105,122 @@ <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="GtkGrid" id="grid1"> + <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="column_spacing">12</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Selection list</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="swuilo:SwGlossaryGroupTLB" id="group"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="label" translatable="yes">label</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="pathlb"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <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">Path</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> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Category</property> + <property name="use_underline">True</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="swuilo:FEdit" id="name"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="max_length">256</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">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-widget response="0">new</action-widget> + <action-widget response="0">delete</action-widget> + <action-widget response="0">rename</action-widget> + </action-widgets> </object> </interface>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits