[Libreoffice-commits] core.git: 2 commits - include/sfx2 sfx2/source sfx2/uiconfig

2018-04-13 Thread Caolán McNamara
 include/sfx2/templatedlg.hxx|   24 +++
 sfx2/source/dialog/dinfdlg.cxx  |  104 +++---
 sfx2/source/doc/templatedlg.cxx |  109 +---
 sfx2/uiconfig/ui/editdurationdialog.ui  |   71 ++--
 sfx2/uiconfig/ui/templatecategorydlg.ui |   60 +
 5 files changed, 208 insertions(+), 160 deletions(-)

New commits:
commit a27f1957e574f03734fd4b4419f0b0f0229549f1
Author: Caolán McNamara 
Date:   Fri Apr 13 11:54:50 2018 +0100

weld DurationDialog

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

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index d0f87eda0829..cda6becfc1ab 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1255,78 +1255,54 @@ void CustomPropertiesYesNoButton::dispose()
 Control::dispose();
 }
 
-class DurationDialog_Impl : public ModalDialog
+class DurationDialog_Impl : public weld::GenericDialogController
 {
-VclPtr   m_pNegativeCB;
-VclPtr   m_pYearNF;
-VclPtr   m_pMonthNF;
-VclPtr   m_pDayNF;
-VclPtr   m_pHourNF;
-VclPtr   m_pMinuteNF;
-VclPtr   m_pSecondNF;
-VclPtr   m_pMSecondNF;
+std::unique_ptr m_xNegativeCB;
+std::unique_ptr m_xYearNF;
+std::unique_ptr m_xMonthNF;
+std::unique_ptr m_xDayNF;
+std::unique_ptr m_xHourNF;
+std::unique_ptr m_xMinuteNF;
+std::unique_ptr m_xSecondNF;
+std::unique_ptr m_xMSecondNF;
 
 public:
-
-DurationDialog_Impl( vcl::Window* pParent, const util::Duration& rDuration 
);
-virtual ~DurationDialog_Impl() override;
-virtual void dispose() override;
+DurationDialog_Impl(weld::Window* pParent, const util::Duration& 
rDuration);
 util::Duration  GetDuration() const;
 };
 
-DurationDialog_Impl::DurationDialog_Impl(vcl::Window* pParent,
-const util::Duration& rDuration)
-: ModalDialog(pParent, "EditDurationDialog",
-"sfx/ui/editdurationdialog.ui")
-{
-get(m_pNegativeCB, "negative");
-get(m_pYearNF, "years");
-get(m_pMonthNF, "months");
-get(m_pDayNF, "days");
-get(m_pHourNF, "hours");
-get(m_pMinuteNF, "minutes");
-get(m_pSecondNF, "seconds");
-get(m_pMSecondNF, "milliseconds");
-
-m_pNegativeCB->Check(rDuration.Negative);
-m_pYearNF->SetValue(rDuration.Years);
-m_pMonthNF->SetValue(rDuration.Months);
-m_pDayNF->SetValue(rDuration.Days);
-m_pHourNF->SetValue(rDuration.Hours);
-m_pMinuteNF->SetValue(rDuration.Minutes);
-m_pSecondNF->SetValue(rDuration.Seconds);
-m_pMSecondNF->SetValue(rDuration.NanoSeconds);
-}
-
-DurationDialog_Impl::~DurationDialog_Impl()
-{
-disposeOnce();
-}
-
-void DurationDialog_Impl::dispose()
-{
-m_pNegativeCB.clear();
-m_pYearNF.clear();
-m_pMonthNF.clear();
-m_pDayNF.clear();
-m_pHourNF.clear();
-m_pMinuteNF.clear();
-m_pSecondNF.clear();
-m_pMSecondNF.clear();
-ModalDialog::dispose();
+DurationDialog_Impl::DurationDialog_Impl(weld::Window* pParent, const 
util::Duration& rDuration)
+: GenericDialogController(pParent, "sfx/ui/editdurationdialog.ui", 
"EditDurationDialog")
+, m_xNegativeCB(m_xBuilder->weld_check_button("negative"))
+, m_xYearNF(m_xBuilder->weld_spin_button("years"))
+, m_xMonthNF(m_xBuilder->weld_spin_button("months"))
+, m_xDayNF(m_xBuilder->weld_spin_button("days"))
+, m_xHourNF(m_xBuilder->weld_spin_button("hours"))
+, m_xMinuteNF(m_xBuilder->weld_spin_button("minutes"))
+, m_xSecondNF(m_xBuilder->weld_spin_button("seconds"))
+, m_xMSecondNF(m_xBuilder->weld_spin_button("milliseconds"))
+{
+m_xNegativeCB->set_active(rDuration.Negative);
+m_xYearNF->set_value(rDuration.Years);
+m_xMonthNF->set_value(rDuration.Months);
+m_xDayNF->set_value(rDuration.Days);
+m_xHourNF->set_value(rDuration.Hours);
+m_xMinuteNF->set_value(rDuration.Minutes);
+m_xSecondNF->set_value(rDuration.Seconds);
+m_xMSecondNF->set_value(rDuration.NanoSeconds);
 }
 
 util::Duration  DurationDialog_Impl::GetDuration() const
 {
 util::Duration  aRet;
-aRet.Negative = m_pNegativeCB->IsChecked();
-aRet.Years = m_pYearNF->GetValue();
-aRet.Months = m_pMonthNF->GetValue( );
-aRet.Days = m_pDayNF->GetValue(   );
-aRet.Hours  = m_pHourNF->GetValue( );
-aRet.Minutes = m_pMinuteNF->GetValue();
-aRet.Seconds = m_pSecondNF->GetValue();
-aRet.NanoSeconds = m_pMSecondNF->GetValue();
+aRet.Negative = m_xNegativeCB->get_active();
+aRet.Years = m_xYearNF->get_value();
+aRet.Months = m_xMonthNF->get_value();
+aRet.Days = m_xDayNF->get_value();
+aRet.Hours  = m_xHourNF->get_value();
+aRet.Minutes = m_xMinuteNF->get_value();
+

[Libreoffice-commits] core.git: 2 commits - include/sfx2 sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk

2014-08-15 Thread Caolán McNamara
 include/sfx2/tabdlg.hxx |6 
 sfx2/UIConfig_sfx.mk|1 
 sfx2/source/appl/app.hrc|2 
 sfx2/source/appl/newhelp.cxx|  284 
 sfx2/source/appl/newhelp.hrc|   15 --
 sfx2/source/appl/newhelp.hxx|   20 +-
 sfx2/source/appl/newhelp.src|   50 ---
 sfx2/source/dialog/tabdlg.cxx   |   69 +
 sfx2/source/inc/helpid.hrc  |2 
 sfx2/uiconfig/ui/helpcontrol.ui |  106 ++
 10 files changed, 249 insertions(+), 306 deletions(-)

New commits:
commit 9fbb4c6cf42857e80090e0b81ecde7ea2913e427
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Aug 15 12:02:37 2014 +0100

convert WIN_HELPINDEX sport to .ui

Change-Id: I80d1f3f3cb4e062bc19489205e325bc4ff17b3c6

diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index 0713047..5142f92 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/editdurationdialog \
sfx2/uiconfig/ui/errorfindemaildialog \
sfx2/uiconfig/ui/helpbookmarkpage \
+   sfx2/uiconfig/ui/helpcontrol \
sfx2/uiconfig/ui/helpcontentpage \
sfx2/uiconfig/ui/helpindexpage \
sfx2/uiconfig/ui/helpsearchpage \
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index d0fff73..1e7ea05 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -41,8 +41,6 @@
 
 #define CONFIG_PATH_START   (RID_SFX_APP_START+98)
 
-#define WIN_HELPINDEX   (RID_SFX_APP_START+99)
-
 #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)
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 37b1a46..b3dcc26 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -93,6 +93,7 @@
 #include svtools/miscopt.hxx
 #include svtools/imgdef.hxx
 #include vcl/builder.hxx
+#include vcl/layout.hxx
 #include vcl/unohelp.hxx
 #include vcl/i18nhelp.hxx
 #include vcl/settings.hxx
@@ -418,7 +419,6 @@ OUString ContentListBox_Impl::GetSelectEntry() const
 }
 
 // class HelpTabPage_Impl 
-
 HelpTabPage_Impl::HelpTabPage_Impl(Window* pParent, SfxHelpIndexWindow_Impl* 
_pIdxWin,
 const OString rID, const OUString rUIXMLDescription)
 : TabPage( pParent, rID, rUIXMLDescription)
@@ -427,7 +427,6 @@ HelpTabPage_Impl::HelpTabPage_Impl(Window* pParent, 
SfxHelpIndexWindow_Impl* _pI
 }
 
 // class ContentTabPage_Impl -
-
 ContentTabPage_Impl::ContentTabPage_Impl(Window* pParent, 
SfxHelpIndexWindow_Impl* _pIdxWin)
 : HelpTabPage_Impl(pParent, _pIdxWin, HelpContentPage,
 sfx/ui/helpcontentpage.ui)
@@ -917,11 +916,7 @@ bool SearchResultsBox_Impl::Notify( NotifyEvent rNEvt )
 SearchTabPage_Impl::SearchTabPage_Impl(Window* pParent, 
SfxHelpIndexWindow_Impl* _pIdxWin)
 : HelpTabPage_Impl(pParent, _pIdxWin, HelpSearchPage,
 sfx/ui/helpsearchpage.ui)
-
-,
-
-xBreakIterator  ( vcl::unohelper::CreateBreakIterator() )
-
+, xBreakIterator(vcl::unohelper::CreateBreakIterator())
 {
 get(m_pSearchED, search);
 get(m_pSearchBtn, find);
@@ -1397,45 +1392,39 @@ void SfxHelpWindow_Impl::loadHelpContent(const 
OUString sHelpURL, bool bAddToHi
 LeaveWait();
 }
 
-SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl( SfxHelpWindow_Impl* _pParent 
) :
-
-Window( _pParent, SfxResId( WIN_HELPINDEX ) ),
-
-aActiveLB   ( this, SfxResId( LB_ACTIVE ) ),
-aActiveLine ( this, SfxResId( FL_ACTIVE ) ),
-aTabCtrl( this, SfxResId( TC_INDEX ) ),
-
-aIndexKeywordLink   ( LINK( this, SfxHelpIndexWindow_Impl, KeywordHdl ) ),
-pParentWin  ( _pParent ),
-
-pCPage  ( NULL ),
-pIPage  ( NULL ),
-pSPage  ( NULL ),
-pBPage  ( NULL ),
-
-bWasCursorLeftOrRight( false ),
-bIsInitDone  ( false )
-
+SfxHelpIndexWindow_Impl::SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl* _pParent)
+: Window(_pParent, 0)
+, aIndexKeywordLink(LINK(this, SfxHelpIndexWindow_Impl, KeywordHdl))
+, pParentWin(_pParent)
+, pCPage(NULL)
+, pIPage(NULL)
+, pSPage(NULL)
+, pBPage(NULL)
+, bWasCursorLeftOrRight(false)
+, bIsInitDone(false)
 {
-FreeResource();
+m_pUIBuilder = new VclBuilder(this, getUIRootDir(), 
sfx/ui/helpcontrol.ui, HelpControl);
+get(m_pActiveLB, active);
+get(m_pTabCtrl, tabcontrol);
 
 sfx2::AddToTaskPaneList( this );
 
-aTabCtrl.SetActivatePageHdl( LINK( this, SfxHelpIndexWindow_Impl, 
ActivatePageHdl ) );
-aTabCtrl.Show();
+m_pTabCtrl-SetActivatePageHdl( LINK( this, SfxHelpIndexWindow_Impl, 
ActivatePageHdl ) );
 
-sal_Int32 

[Libreoffice-commits] core.git: 2 commits - include/sfx2 sfx2/source sfx2/uiconfig

2014-01-10 Thread Zolnai Tamás
 include/sfx2/recentdocsviewitem.hxx|3 +++
 sfx2/source/control/recentdocsviewitem.cxx |6 +++---
 sfx2/source/dialog/backingwindow.cxx   |3 ---
 sfx2/uiconfig/ui/startcenter.ui|3 ++-
 4 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 60c7ed80643a6c397feebdd1492d6c3ef4d810be
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Fri Jan 10 03:31:46 2014 +0100

fdo#72947 Startcenter: display more userfriendly file urls in tooltips

Use INetURLObject to get a readable url (it displayes special characters
too). It is a side effect that 'file:///' prefix disappear
which seems a good thing.
Plus some cleanup: remove second INetURLObject.

Change-Id: I4aab5e2546ae70e5a3d85b12e26e021bfa244999

diff --git a/include/sfx2/recentdocsviewitem.hxx 
b/include/sfx2/recentdocsviewitem.hxx
index be94b78..410e74b 100644
--- a/include/sfx2/recentdocsviewitem.hxx
+++ b/include/sfx2/recentdocsviewitem.hxx
@@ -23,6 +23,9 @@ public:
 virtual OUString getHelpText() const;
 
 OUString maURL;
+
+private:
+OUString m_sHelpText;
 };
 
 #endif // INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX
diff --git a/sfx2/source/control/recentdocsviewitem.cxx 
b/sfx2/source/control/recentdocsviewitem.cxx
index c35c16b..d741675 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -21,6 +21,7 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView rView, 
const OUString rUR
 {
 OUString aTitle(rTitle);
 INetURLObject aURLObj(rURL);
+m_sHelpText = aURLObj.GetURLPath();
 RecentDocsView rRecentView = dynamic_castRecentDocsView(rView);
 long nThumbnailSize = rRecentView.GetThumbnailSize();
 
@@ -38,10 +39,9 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView rView, 
const OUString rUR
 Size aExtSize(aExt.GetSizePixel());
 
 // attempt to make it appear as if it is on a piece of paper
-INetURLObject aUrl(rURL);
 long nPaperHeight;
 long nPaperWidth;
-if( RecentDocsView::typeMatchesExtension(TYPE_IMPRESS, 
aUrl.getExtension()) )
+if( RecentDocsView::typeMatchesExtension(TYPE_IMPRESS, 
aURLObj.getExtension()) )
 {
 // Swap width and height (PAPER_SCREEN_4_3 definition make it 
needed)
 PaperInfo aInfo(PAPER_SCREEN_4_3);
@@ -86,7 +86,7 @@ void RecentDocsViewItem::setEditTitle (bool edit, bool 
bChangeFocus)
 
 OUString RecentDocsViewItem::getHelpText() const
 {
-return maURL;
+return m_sHelpText;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit adf932c6569fe9b50883b54f8b959968188476d3
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Fri Jan 10 03:21:27 2014 +0100

fdo#72420 Startcenter: help button point to local/wiki help, ui part

Change-Id: I7ac4b51868d1a5828c810b1ac629d5a56ffb6f50

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index ea3dd21..60ce65f 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -230,7 +230,6 @@ void BackingWindow::initControls()
 setupButton( mpImpressAllButton );
 setupButton( mpMathAllButton );
 
-mpHelpButton-SetClickHdl(LINK(this, BackingWindow, ExtLinkClickHdl));
 mpExtensionsButton-SetClickHdl(LINK(this, BackingWindow, 
ExtLinkClickHdl));
 
 // setup nice colors
@@ -360,8 +359,6 @@ IMPL_LINK(BackingWindow, ExtLinkClickHdl, Button*, pButton)
 
 if (pButton == mpExtensionsButton)
 aNode = AddFeatureURL;
-else if (pButton == mpHelpButton)
-aNode = InfoURL;
 
 if (!aNode.isEmpty())
 {
diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui
index 831e1bf..4e0e04b 100644
--- a/sfx2/uiconfig/ui/startcenter.ui
+++ b/sfx2/uiconfig/ui/startcenter.ui
@@ -260,13 +260,14 @@
 property name=orientationvertical/property
 child
   object class=GtkButton id=help
-property name=label 
translatable=yes_Help/property
+property name=labelgtk-help/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
 property name=receives_defaultTrue/property
 property name=has_tooltipTrue/property
 property name=reliefnone/property
 property name=use_underlineTrue/property
+property name=use_stockTrue/property
   /object
   packing
 property name=expandFalse/property
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] core.git: 2 commits - include/sfx2 sfx2/source sfx2/uiconfig

2014-01-10 Thread Stephan Bergmann

On 01/10/2014 02:13 PM, Zolnai Tamás wrote:

commit 60c7ed80643a6c397feebdd1492d6c3ef4d810be
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Fri Jan 10 03:31:46 2014 +0100

 fdo#72947 Startcenter: display more userfriendly file urls in tooltips

 Use INetURLObject to get a readable url (it displayes special characters
 too). It is a side effect that 'file:///' prefix disappear
 which seems a good thing.
 Plus some cleanup: remove second INetURLObject.

 Change-Id: I4aab5e2546ae70e5a3d85b12e26e021bfa244999

diff --git a/include/sfx2/recentdocsviewitem.hxx 
b/include/sfx2/recentdocsviewitem.hxx
index be94b78..410e74b 100644
--- a/include/sfx2/recentdocsviewitem.hxx
+++ b/include/sfx2/recentdocsviewitem.hxx
@@ -23,6 +23,9 @@ public:
  virtual OUString getHelpText() const;

  OUString maURL;
+
+private:
+OUString m_sHelpText;
  };

  #endif // INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX
diff --git a/sfx2/source/control/recentdocsviewitem.cxx 
b/sfx2/source/control/recentdocsviewitem.cxx
index c35c16b..d741675 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -21,6 +21,7 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView rView, 
const OUString rUR
  {
  OUString aTitle(rTitle);
  INetURLObject aURLObj(rURL);
+m_sHelpText = aURLObj.GetURLPath();


If m_sHelpText is what gets displayed in the bubble help when hovering 
over a document in start center, I'd suggest against unconditionally 
displaying merely the URL's path component (which can be rather 
meaningless).  How about first trying 
INetURLObject::getFSysPath(INetURLObject::FSYS_DETECT) to get a pathname 
for file URLs and if that fails (i.e., returns an empty string) use 
INetURLObject::GetURLNoPass() to get the full (non-file) URL (where 
NoPass strips any password from the authority component, just in case).


Stephan


  RecentDocsView rRecentView = dynamic_castRecentDocsView(rView);
  long nThumbnailSize = rRecentView.GetThumbnailSize();

@@ -38,10 +39,9 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView rView, 
const OUString rUR
  Size aExtSize(aExt.GetSizePixel());

  // attempt to make it appear as if it is on a piece of paper
-INetURLObject aUrl(rURL);
  long nPaperHeight;
  long nPaperWidth;
-if( RecentDocsView::typeMatchesExtension(TYPE_IMPRESS, 
aUrl.getExtension()) )
+if( RecentDocsView::typeMatchesExtension(TYPE_IMPRESS, 
aURLObj.getExtension()) )
  {
  // Swap width and height (PAPER_SCREEN_4_3 definition make it 
needed)
  PaperInfo aInfo(PAPER_SCREEN_4_3);
@@ -86,7 +86,7 @@ void RecentDocsViewItem::setEditTitle (bool edit, bool 
bChangeFocus)

  OUString RecentDocsViewItem::getHelpText() const
  {
-return maURL;
+return m_sHelpText;
  }

  /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: 2 commits - include/sfx2 sfx2/source sfx2/uiconfig

2014-01-10 Thread Tamas Zolnai
2014 Január 10, Péntek 15:24 GMT dátummal, Stephan Bergmann 
sberg...@redhat.com ezt írta: 
 
 On 01/10/2014 02:13 PM, Zolnai Tamás wrote:
  commit 60c7ed80643a6c397feebdd1492d6c3ef4d810be
  Author: Zolnai Tamás tamas.zol...@collabora.com
  Date:   Fri Jan 10 03:31:46 2014 +0100
 
   fdo#72947 Startcenter: display more userfriendly file urls in tooltips
 
   Use INetURLObject to get a readable url (it displayes special 
  characters
   too). It is a side effect that 'file:///' prefix disappear
   which seems a good thing.
   Plus some cleanup: remove second INetURLObject.
 
   Change-Id: I4aab5e2546ae70e5a3d85b12e26e021bfa244999
 
  diff --git a/include/sfx2/recentdocsviewitem.hxx 
  b/include/sfx2/recentdocsviewitem.hxx
  index be94b78..410e74b 100644
  --- a/include/sfx2/recentdocsviewitem.hxx
  +++ b/include/sfx2/recentdocsviewitem.hxx
  @@ -23,6 +23,9 @@ public:
virtual OUString getHelpText() const;
 
OUString maURL;
  +
  +private:
  +OUString m_sHelpText;
};
 
#endif // INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX
  diff --git a/sfx2/source/control/recentdocsviewitem.cxx 
  b/sfx2/source/control/recentdocsviewitem.cxx
  index c35c16b..d741675 100644
  --- a/sfx2/source/control/recentdocsviewitem.cxx
  +++ b/sfx2/source/control/recentdocsviewitem.cxx
  @@ -21,6 +21,7 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView 
  rView, const OUString rUR
{
OUString aTitle(rTitle);
INetURLObject aURLObj(rURL);
  +m_sHelpText = aURLObj.GetURLPath();
 
 If m_sHelpText is what gets displayed in the bubble help when hovering 
 over a document in start center, I'd suggest against unconditionally  
 displaying merely the URL's path component (which can be rather 
 meaningless).  How about first trying 
 INetURLObject::getFSysPath(INetURLObject::FSYS_DETECT) to get a pathname 
 for file URLs and if that fails (i.e., returns an empty string) use  
 INetURLObject::GetURLNoPass() to get the full (non-file) URL (where  
 NoPass strips any password from the authority component, just in case).

You're right. I correct it using your idea.

Thanks!
Tamás 
 
 

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: 2 commits - include/sfx2 sfx2/source sfx2/uiconfig

2013-08-16 Thread Krisztian Pinter
 include/sfx2/recentdocsview.hxx|   27 
 sfx2/source/control/recentdocsview.cxx |   67 +++-
 sfx2/source/dialog/backingwindow.cxx   |  108 ++---
 sfx2/source/dialog/backingwindow.hxx   |   14 ++--
 sfx2/uiconfig/ui/startcenter.ui|   16 ++--
 5 files changed, 126 insertions(+), 106 deletions(-)

New commits:
commit 454ff1a48ed21a8bff8373a1aa7707e286629e9a
Author: Krisztian Pinter pin.termina...@gmail.com
Date:   Tue Aug 13 17:56:46 2013 +0200

startcenter: Disable tabs for modules not installed

Change-Id: I74dbd1dab44efa87a78ad3268658895f2d1542db

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index cda286e..2e8afdf 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -70,21 +70,22 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
   sfx/ui/startcenter.ui,
   StartCenter );
 
-get(mpOpenButton,  open);
-get(mpTemplateButton,  templates);
+get(mpOpenButton,   open);
+get(mpTemplateButton,   templates);
 
-get(mpWriterButton,writer);
-get(mpCalcButton,  calc);
-get(mpImpressButton,   impress);
-get(mpDrawButton,  draw);
-get(mpDBButton,database);
-get(mpMathButton,  math);
+get(mpModuleNotebook,   modules_notebook);
+
+get(mpWriterButton, writer);
+get(mpCalcButton,   calc);
+get(mpImpressButton,impress);
+get(mpDrawButton,   draw);
+get(mpDBButton, database);
+get(mpMathButton,   math);
 
 get(mpExtensionsButton, extension);
 get(mpInfoButton,   info);
 get(mpTplRepButton, add_temp);
 
-
 get( mpAllRecentThumbnails, all_recent);
 get( mpWriterRecentThumbnails,  writer_recent);
 get( mpCalcRecentThumbnails,calc_recent);
@@ -93,23 +94,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
 get( mpDatabaseRecentThumbnails,database_recent);
 get( mpMathRecentThumbnails,math_recent);
 
-mpAllRecentThumbnails   -addFileType(TYPE_WRITER | TYPE_CALC |
-TYPE_IMPRESS | TYPE_DRAW | TYPE_DATABASE | TYPE_MATH | TYPE_OTHER);
-mpWriterRecentThumbnails-addFileType(TYPE_WRITER);
-mpCalcRecentThumbnails  -addFileType(TYPE_CALC);
-mpImpressRecentThumbnails   -addFileType(TYPE_IMPRESS);
-mpDrawRecentThumbnails  -addFileType(TYPE_DRAW);
-mpDatabaseRecentThumbnails  -addFileType(TYPE_DATABASE);
-mpMathRecentThumbnails  -addFileType(TYPE_MATH);
-
-mpAllRecentThumbnails   -loadRecentDocs();
-mpWriterRecentThumbnails-loadRecentDocs();
-mpCalcRecentThumbnails  -loadRecentDocs();
-mpImpressRecentThumbnails   -loadRecentDocs();
-mpDrawRecentThumbnails  -loadRecentDocs();
-mpDatabaseRecentThumbnails  -loadRecentDocs();
-mpMathRecentThumbnails  -loadRecentDocs();
-
 try
 {
 mxContext.set( ::comphelper::getProcessComponentContext(), 
uno::UNO_SET_THROW );
@@ -211,23 +195,39 @@ void BackingWindow::initControls()
 aFileNewAppsAvailable.insert( sURL );
 }
 
-setupButton( mpWriterButton, WRITER_URL, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SWRITER );
-setupButton( mpDrawButton, DRAW_URL, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SDRAW );
-setupButton( mpCalcButton, CALC_URL, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SCALC );
-setupButton( mpDBButton, BASE_URL, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SDATABASE );
-setupButton( mpImpressButton, IMPRESS_WIZARD_URL, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SIMPRESS );
-setupButton( mpMathButton, MATH_URL, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SMATH );
-
-setupButton( mpOpenButton, , aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SWRITER );
-setupButton( mpTemplateButton, , aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SWRITER );
+setupModuleTab( tab_writer, mpWriterRecentThumbnails, TYPE_WRITER,
+WRITER_URL, aFileNewAppsAvailable, aModuleOptions,
+SvtModuleOptions::E_SWRITER );
+setupModuleTab( tab_calc, mpCalcRecentThumbnails, TYPE_CALC,
+DRAW_URL, aFileNewAppsAvailable, aModuleOptions,
+SvtModuleOptions::E_SDRAW );
+setupModuleTab( tab_impress, mpImpressRecentThumbnails, TYPE_IMPRESS,
+CALC_URL, aFileNewAppsAvailable, aModuleOptions,
+SvtModuleOptions::E_SCALC );
+setupModuleTab( tab_draw, mpDrawRecentThumbnails, TYPE_DRAW,
+BASE_URL, aFileNewAppsAvailable, aModuleOptions,
+SvtModuleOptions::E_SDATABASE );
+setupModuleTab( tab_database, mpDatabaseRecentThumbnails, TYPE_DATABASE,
+