[Libreoffice-commits] core.git: 2 commits - cui/uiconfig extensions/source extensions/uiconfig

2019-02-16 Thread Libreoffice Gerrit user
 cui/uiconfig/ui/hangulhanjaconversiondialog.ui |2 
 extensions/source/bibliography/datman.cxx  |   61 
+++---
 extensions/source/bibliography/datman.hxx  |4 
 extensions/source/bibliography/framectr.cxx|2 
 extensions/source/bibliography/toolbar.cxx |3 
 extensions/uiconfig/sbibliography/ui/choosedatasourcedialog.ui |   49 +++-
 6 files changed, 72 insertions(+), 49 deletions(-)

New commits:
commit eef8c4952da288629f9aad23f75d6f894eba83b4
Author: Caolán McNamara 
AuthorDate: Sat Feb 16 17:10:32 2019 +
Commit: Caolán McNamara 
CommitDate: Sat Feb 16 20:58:10 2019 +0100

weld DBChangeDialog_Impl

Change-Id: I8d5330f07e4c76c6cdf51a878949bcac9ad3e92e
Reviewed-on: https://gerrit.libreoffice.org/67915
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/extensions/source/bibliography/datman.cxx 
b/extensions/source/bibliography/datman.cxx
index b2e8119cf257..5af530a355cc 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -448,41 +448,35 @@ IMPL_LINK_NOARG(MappingDialog_Impl, OkHdl, Button*, void)
 EndDialog(bModified ? RET_OK : RET_CANCEL);
 }
 
-class DBChangeDialog_Impl : public ModalDialog
+class DBChangeDialog_Impl : public weld::GenericDialogController
 {
-VclPtrm_pSelectionLB;
-DBChangeDialogConfig_Impl   aConfig;
-
+DBChangeDialogConfig_Impl aConfig;
 BibDataManager* pDatMan;
 
-DECL_LINK(DoubleClickHdl, ListBox&, void);
+std::unique_ptr m_xSelectionLB;
+
+DECL_LINK(DoubleClickHdl, weld::TreeView&, void);
 public:
-DBChangeDialog_Impl(vcl::Window* pParent, BibDataManager* pMan );
-virtual ~DBChangeDialog_Impl() override;
-virtual void dispose() override;
+DBChangeDialog_Impl(weld::Window* pParent, BibDataManager* pMan);
 
 OUString GetCurrentURL()const;
 };
 
-DBChangeDialog_Impl::DBChangeDialog_Impl(vcl::Window* pParent, BibDataManager* 
pMan )
-: ModalDialog(pParent, "ChooseDataSourceDialog",
-"modules/sbibliography/ui/choosedatasourcedialog.ui")
-,
-pDatMan(pMan)
+DBChangeDialog_Impl::DBChangeDialog_Impl(weld::Window* pParent, 
BibDataManager* pMan )
+: GenericDialogController(pParent, 
"modules/sbibliography/ui/choosedatasourcedialog.ui", "ChooseDataSourceDialog")
+, pDatMan(pMan)
+, m_xSelectionLB(m_xBuilder->weld_tree_view("treeview"))
 {
-get(m_pSelectionLB, "treeview");
-m_pSelectionLB->set_height_request(m_pSelectionLB->GetTextHeight() * 6);
-
-m_pSelectionLB->SetStyle(m_pSelectionLB->GetStyle() | WB_SORT);
-m_pSelectionLB->SetDoubleClickHdl( LINK(this, DBChangeDialog_Impl, 
DoubleClickHdl));
+m_xSelectionLB->set_size_request(-1, m_xSelectionLB->get_height_rows(6));
+m_xSelectionLB->connect_row_activated(LINK(this, DBChangeDialog_Impl, 
DoubleClickHdl));
+m_xSelectionLB->make_sorted();
 
 try
 {
 OUString sActiveSource = pDatMan->getActiveDataSource();
 for (const OUString& rSourceName : aConfig.GetDataSourceNames())
-m_pSelectionLB->InsertEntry(rSourceName);
-
-m_pSelectionLB->SelectEntry(sActiveSource);
+m_xSelectionLB->append_text(rSourceName);
+m_xSelectionLB->select_text(sActiveSource);
 }
 catch (const Exception& e)
 {
@@ -492,25 +486,14 @@ DBChangeDialog_Impl::DBChangeDialog_Impl(vcl::Window* 
pParent, BibDataManager* p
 }
 }
 
-IMPL_LINK_NOARG(DBChangeDialog_Impl, DoubleClickHdl, ListBox&, void)
-{
-EndDialog(RET_OK);
-}
-
-DBChangeDialog_Impl::~DBChangeDialog_Impl()
+IMPL_LINK_NOARG(DBChangeDialog_Impl, DoubleClickHdl, weld::TreeView&, void)
 {
-disposeOnce();
-}
-
-void DBChangeDialog_Impl::dispose()
-{
-m_pSelectionLB.clear();
-ModalDialog::dispose();
+m_xDialog->response(RET_OK);
 }
 
 OUString  DBChangeDialog_Impl::GetCurrentURL()const
 {
-return m_pSelectionLB->GetSelectedEntry();
+return m_xSelectionLB->get_selected_text();
 }
 
 // XDispatchProvider
@@ -1483,13 +1466,13 @@ void BibDataManager::CreateMappingDialog(vcl::Window* 
pParent)
 }
 }
 
-OUString BibDataManager::CreateDBChangeDialog(vcl::Window* pParent)
+OUString BibDataManager::CreateDBChangeDialog(weld::Window* pParent)
 {
 OUString uRet;
-VclPtrInstance< DBChangeDialog_Impl > pDlg(pParent, this );
-if(RET_OK == pDlg->Execute())
+DBChangeDialog_Impl aDlg(pParent, this);
+if (aDlg.run() == RET_OK)
 {
-OUString sNewURL = pDlg->GetCurrentURL();
+OUString sNewURL = aDlg.GetCurrentURL();
 if(sNewURL != getActiveDataSource())
 {
 uRet = sNewURL;
diff --git a/extensions/source/bibliography/datman.hxx 
b/extensions/source/bibliography/datman.hxx
index e405fd355842..e9aa2559f849 100644
--- a/extensions/source/bibliography/datman.hxx
+++ b/extensions/source/bibliography/datman.hxx
@@ 

[Libreoffice-commits] core.git: 2 commits - cui/uiconfig extensions/source

2014-11-23 Thread Stanislav Horacek
 cui/uiconfig/ui/hangulhanjaconversiondialog.ui |4 ++--
 extensions/source/bibliography/sections.src|2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8555f167417bfe3707ca0530f6d0a11cf02f043c
Author: Stanislav Horacek stanislav.hora...@gmail.com
Date:   Sun Nov 23 15:06:53 2014 +0100

add missing spaces

Change-Id: Idbe34849264f0686f1fb8fb39799f534660bf1c9
Reviewed-on: https://gerrit.libreoffice.org/13072
Reviewed-by: Andras Timar andras.ti...@collabora.com
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/cui/uiconfig/ui/hangulhanjaconversiondialog.ui 
b/cui/uiconfig/ui/hangulhanjaconversiondialog.ui
index 98da1d6..f84c986 100644
--- a/cui/uiconfig/ui/hangulhanjaconversiondialog.ui
+++ b/cui/uiconfig/ui/hangulhanjaconversiondialog.ui
@@ -245,7 +245,7 @@
 /child
 child
   object class=GtkRadioButton id=hangulbracket
-property name=label 
translatable=yesHanja(Han_gul)/property
+property name=label translatable=yesHanja 
(Han_gul)/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
 property name=receives_defaultFalse/property
@@ -262,7 +262,7 @@
 /child
 child
   object class=GtkRadioButton id=hanjabracket
-property name=label 
translatable=yesHang_ul(Hanja)/property
+property name=label translatable=yesHang_ul 
(Hanja)/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
 property name=receives_defaultFalse/property
commit 7f5776644918e2ed24a0762ce758b2d05335a4d2
Author: Stanislav Horacek stanislav.hora...@gmail.com
Date:   Sun Nov 23 15:40:40 2014 +0100

capitalize e-mail in list of types in bibliography

Change-Id: Ie72627e708f257e7272618d90abf7b54957112b9
Reviewed-on: https://gerrit.libreoffice.org/13076
Reviewed-by: Andras Timar andras.ti...@collabora.com
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/extensions/source/bibliography/sections.src 
b/extensions/source/bibliography/sections.src
index e15042b..ceec0d7 100644
--- a/extensions/source/bibliography/sections.src
+++ b/extensions/source/bibliography/sections.src
@@ -85,7 +85,7 @@ String ST_TYPE_UNPUBLISHED
 };
 String ST_TYPE_EMAIL
 {
-Text [ en-US ] = e-mail;
+Text [ en-US ] = E-mail;
 };
 String ST_TYPE_WWW
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits