[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk/gtksalmenu.cxx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit fd95a92d600b751ad6a23f35db446bf063cb722b Author: Samuel Mehrbrodt AuthorDate: Tue Oct 8 15:45:45 2019 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Wed Oct 9 05:09:53 2019 +0200 tdf#124391 Fix doubled menu in global menu Regression from 3bedbfd9b3cee5a8d2da6ee0486859bd725979ba Change-Id: I56473a2b0620f90f23b1bcde3ae1290801021038 Reviewed-on: https://gerrit.libreoffice.org/80465 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx index 27ba8096bce8..39e1beab33e7 100644 --- a/vcl/unx/gtk/gtksalmenu.cxx +++ b/vcl/unx/gtk/gtksalmenu.cxx @@ -229,8 +229,12 @@ void GtkSalMenu::ImplUpdate(bool bRecurse, bool bRemoveDisabledEntries) if (mbMenuBar && maUpdateMenuBarIdle.IsActive()) { maUpdateMenuBarIdle.Stop(); -maUpdateMenuBarIdle.Invoke(); -return; +// tdf#124391 Prevent doubled menus in global menu +if (!bUnityMode) +{ +maUpdateMenuBarIdle.Invoke(); +return; +} } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde4/KDESalInstance.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit e84b9d0d5ac55a2f7a4936ca83a5eea5562f98a8 Author: Michael Weghorn AuthorDate: Wed Jul 10 20:34:56 2019 + Commit: Michael Stahl CommitDate: Thu Jul 11 10:55:27 2019 +0200 kde4: Add missing include to fix build Fixes this build failure as reported e.g. by tinderbox [1]: In file included from /usr/include/c++/7/bits/locale_conv.h:41:0, from /usr/include/c++/7/locale:43, from /usr/include/c++/7/iomanip:43, from include/com/sun/star/uno/Any.hxx:27, from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/XInterface.hpp:9, from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/Exception.hpp:8, from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hpp:8, from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/lang/XTypeProvider.hpp:8, from include/cppuhelper/compbase.hxx:25, from vcl/unx/kde4/KDE4FilePicker.hxx:22, from vcl/unx/kde4/KDESalInstance.cxx:20: /usr/include/c++/7/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = SalVirtualDevice]’: /usr/include/c++/7/bits/unique_ptr.h:268:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = SalVirtualDevice; _Dp = std::default_delete]’ .../vcl/unx/kde4/KDESalInstance.cxx:70:107: required from here /usr/include/c++/7/bits/unique_ptr.h:76:22: error: invalid application of ‘sizeof’ to incomplete type ‘SalVirtualDevice’ static_assert(sizeof(_Tp)>0, [1] https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=libreoffice-6-2=1562787602.2042 Change-Id: I1da444b80447ec8896ff9898684ee14fd3933b18 Reviewed-on: https://gerrit.libreoffice.org/75381 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/vcl/unx/kde4/KDESalInstance.cxx b/vcl/unx/kde4/KDESalInstance.cxx index e487bb00362b..47f3b2d8414f 100644 --- a/vcl/unx/kde4/KDESalInstance.cxx +++ b/vcl/unx/kde4/KDESalInstance.cxx @@ -26,6 +26,8 @@ #include "KDESalDisplay.hxx" #include "KDESalGraphics.hxx" +#include "salvd.hxx" + #include #include #include ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde4/KDESalInstance.cxx |7 +++ vcl/unx/kde4/KDESalInstance.hxx |3 +++ 2 files changed, 10 insertions(+) New commits: commit cd98258b659d98871787fa932698a290b20f56cf Author: Jan-Marek Glogowski AuthorDate: Tue Jul 9 03:15:28 2019 +0200 Commit: Katarina Behrens CommitDate: Tue Jul 9 22:21:18 2019 +0200 KDE4 create KDESalGraphics based X11VirtualDevice In the spirit of commit 5ee408eb4c9f ("tdf#125673 KDE5 implement a KDE5SalVirtualDevice"), this might help with KDE4 graphics problems, like the ones mentioned in tdf#126272. Change-Id: I50875b69e1c1494803f08746bfc3b99a57e36414 Reviewed-on: https://gerrit.libreoffice.org/75281 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/vcl/unx/kde4/KDESalInstance.cxx b/vcl/unx/kde4/KDESalInstance.cxx index c11d62689b52..e487bb00362b 100644 --- a/vcl/unx/kde4/KDESalInstance.cxx +++ b/vcl/unx/kde4/KDESalInstance.cxx @@ -24,6 +24,7 @@ #include "KDEXLib.hxx" #include "KDESalDisplay.hxx" +#include "KDESalGraphics.hxx" #include #include @@ -63,4 +64,10 @@ bool KDESalInstance::IsMainThread() const return qApp->thread() == QThread::currentThread(); } +std::unique_ptr KDESalInstance::CreateVirtualDevice(SalGraphics* pGraphics, +long , long , DeviceFormat eFormat, const SystemGraphicsData *pData) +{ +return CreateX11VirtualDevice(pGraphics, nDX, nDY, eFormat, pData, o3tl::make_unique()); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/kde4/KDESalInstance.hxx b/vcl/unx/kde4/KDESalInstance.hxx index 87328a88406e..589b485299d3 100644 --- a/vcl/unx/kde4/KDESalInstance.hxx +++ b/vcl/unx/kde4/KDESalInstance.hxx @@ -40,6 +40,9 @@ public: css::uno::XComponentContext >& ) override; virtual bool IsMainThread() const override; + +std::unique_ptr CreateVirtualDevice(SalGraphics* pGraphics, +long , long , DeviceFormat eFormat, const SystemGraphicsData *pData) override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkframe.cxx | 19 +++ 1 file changed, 19 insertions(+) New commits: commit 8eff9425897a42acb3f95750a4a2654e4f428444 Author: Caolán McNamara AuthorDate: Wed May 29 15:41:15 2019 +0100 Commit: Miklos Vajna CommitDate: Fri Jun 7 11:46:51 2019 +0200 tdf#124694 gtk3 GtkFixed takes the max size of all its children... as its preferred size, causing it to not clip its child, but grow instead to match Change-Id: I57f740177aae619d11966f5382a6cc5f7a964be3 Reviewed-on: https://gerrit.libreoffice.org/73170 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 2127a52d2c1e..adcde282e3b1 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -913,11 +913,30 @@ void GtkSalFrame::resizeWindow( long nWidth, long nHeight ) window_resize(nWidth, nHeight); } +// tdf#124694 GtkFixed takes the max size of all its children as its +// preferred size, causing it to not clip its child, but grow instead. + +static void +ooo_fixed_get_preferred_height(GtkWidget*, gint *minimum, gint *natural) +{ +*minimum = 0; +*natural = 0; +} + +static void +ooo_fixed_get_preferred_width(GtkWidget*, gint *minimum, gint *natural) +{ +*minimum = 0; +*natural = 0; +} + static void ooo_fixed_class_init(GtkFixedClass *klass) { GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); widget_class->get_accessible = ooo_fixed_get_accessible; +widget_class->get_preferred_height = ooo_fixed_get_preferred_height; +widget_class->get_preferred_width = ooo_fixed_get_preferred_width; } /* ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) New commits: commit c132889c2430afd007c71afd42d71420df4caa5a Author: Caolán McNamara AuthorDate: Fri Mar 29 15:23:28 2019 + Commit: Adolfo Jayme Barrientos CommitDate: Thu Jun 6 13:46:32 2019 +0200 Resolves: rhbz#1712823 prefer help strings to a11y strings when available Reviewed-on: https://gerrit.libreoffice.org/69934 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit b70053ba681a9b62afd6fa700ad94256d98d8dc7) Change-Id: I50b36f697b8dd9ff8108392d48a7050702edbfbe Reviewed-on: https://gerrit.libreoffice.org/72880 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index a69e4df05806..5123db7c9f2e 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -6514,6 +6514,13 @@ public: return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8); } +virtual OUString get_accessible_description() const override +{ +AtkObject* pAtkObject = default_drawing_area_get_accessible(m_pWidget); +const char* pStr = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr; +return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8); +} + virtual ~GtkInstanceDrawingArea() override { g_object_steal_data(G_OBJECT(m_pDrawingArea), "g-lo-GtkInstanceDrawingArea"); @@ -7579,16 +7586,7 @@ namespace const ImplSVData* pSVData = ImplGetSVData(); if (pSVData->maHelpData.mbBalloonHelp) { -/*This is how I would prefer things to be, only a few like this though*/ -AtkObject* pAtkObject = gtk_widget_get_accessible(pWidget); -const char* pDesc = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr; -if (pDesc) -{ -gtk_tooltip_set_text(tooltip, pDesc); -return true; -} - -/*So fallback to existing mechanism which needs help installed*/ +/*Current mechanism which needs help installed*/ OString sHelpId = ::get_help_id(pWidget); Help* pHelp = !sHelpId.isEmpty() ? Application::GetHelp() : nullptr; if (pHelp) @@ -7600,10 +7598,19 @@ namespace return true; } } + +/*This is how I would prefer things to be, only a few like this though*/ +AtkObject* pAtkObject = gtk_widget_get_accessible(pWidget); +const char* pDesc = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr; +if (pDesc && pDesc[0]) +{ +gtk_tooltip_set_text(tooltip, pDesc); +return true; +} } const char* pDesc = gtk_widget_get_tooltip_text(pWidget); -if (pDesc) +if (pDesc && pDesc[0]) { gtk_tooltip_set_text(tooltip, pDesc); return true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk/gtksalframe.cxx | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) New commits: commit 60504bffca213f6d5c66d1a2de596c20533b7d9c Author: Caolán McNamara AuthorDate: Wed May 29 15:42:28 2019 +0100 Commit: Xisco Faulí CommitDate: Wed Jun 5 11:42:15 2019 +0200 tdf#124694 gtk2 GtkFixed takes the max size of all its children... as its preferred size, causing it to not clip its child, but try and grow instead to match Change-Id: Ibea269d475a4b35a43b6cab2ab432a830d8ff1ff Reviewed-on: https://gerrit.libreoffice.org/73174 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index b162b5c67848..bf87ed3aba21 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -875,6 +875,23 @@ void GtkSalFrame::resizeWindow( long nWidth, long nHeight ) window_resize(nWidth, nHeight); } +// tdf#124694 GtkFixed takes the max size of all its children as its +// preferred size, causing it to not clip its child, but grow instead. + +static void +ooo_fixed_size_request(GtkWidget*, GtkRequisition* req) +{ +req->width = 0; +req->height = 0; +} + +static void +ooo_fixed_class_init(GtkFixedClass *klass) +{ +GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); +widget_class->size_request = ooo_fixed_size_request; +} + /* * Always use a sub-class of GtkFixed we can tag for a11y. This allows us to * utilize GAIL for the toplevel window and toolkit implementation incl. @@ -892,7 +909,7 @@ ooo_fixed_get_type() sizeof (GtkFixedClass), nullptr, /* base init */ nullptr, /* base finalize */ -nullptr, /* class init */ +reinterpret_cast(ooo_fixed_class_init), /* class init */ nullptr, /* class finalize */ nullptr, /* class data */ sizeof (GtkFixed), /* instance size */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/generic/desktopdetect/desktopdetector.cxx | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) New commits: commit 1124e98e935cec42c51f25f1fc713285b1044d07 Author: Michael Weghorn AuthorDate: Thu May 30 11:29:18 2019 +0200 Commit: Michael Weghorn CommitDate: Fri May 31 08:31:54 2019 +0200 Revert "tdf#123011 Detect kde5 desktop in Plasma Wayland session" kde5 plugin on Wayland still shows too many issues, like e.g. tdf#123654 and was barely tested, so don't use it by default in libreoffice-6-2 branch, but prefer gtk3. This does not affect the X11 case. This reverts commit 3e4478103ee1ba912d650ab447ed246f5f1cc196. Change-Id: I7f74a6b5f377f65b81cf5ae189e8672bdce82c95 Reviewed-on: https://gerrit.libreoffice.org/73193 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski Reviewed-by: Michael Weghorn diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx index 9f65b1624181..e7cb9b93e801 100644 --- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx +++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx @@ -191,13 +191,16 @@ static bool is_kde4_desktop( Display* pDisplay ) return false; } -static bool is_kde5_desktop() +static bool is_kde5_desktop( Display* pDisplay ) { static const char * pFullVersion = getenv( "KDE_FULL_SESSION" ); static const char * pSessionVersion = getenv( "KDE_SESSION_VERSION" ); if ( pFullVersion && pSessionVersion && strcmp(pSessionVersion, "5") == 0) return true; +if ( KDEVersion( pDisplay ) == 5 ) +return true; + return false; } @@ -277,9 +280,6 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment() ret = DESKTOP_LXQT; else { -if ( is_kde5_desktop() ) -return DESKTOP_KDE5; - // tdf#121275 if we still can't tell, and WAYLAND_DISPLAY // is set, default to gtk3 const char* pWaylandStr = getenv("WAYLAND_DISPLAY"); @@ -328,7 +328,9 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment() XErrorHandler pOldHdl = XSetErrorHandler( autodect_error_handler ); -if ( is_kde4_desktop( pDisplay ) ) +if ( is_kde5_desktop( pDisplay ) ) +ret = DESKTOP_KDE5; +else if ( is_kde4_desktop( pDisplay ) ) ret = DESKTOP_KDE4; else if ( is_gnome_desktop( pDisplay ) ) ret = DESKTOP_GNOME; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5FilePicker2.cxx |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) New commits: commit 5cd08cc0ab269556ff794ecc0de73d72b852c75a Author: Michael Weghorn AuthorDate: Thu Apr 25 18:14:38 2019 +0200 Commit: Thorsten Behrens CommitDate: Wed May 22 16:23:45 2019 +0200 tdf#123750 kde5: Show removable devices in file dialog As the Qt documentation for 'QFileDialog::supportedSchemes' says, setting supported schemes to a non-empty list restricts the available options: "Setting this property allows to restrict the type of URLs the user will be able to select. It is a way for the application to declare the protocols it will support to fetch the file content. An empty list means that no restriction is applied (the default)." The call to 'QFileDialog::setSupportedSchemes' was copied over from the gtk3_kde5 VCL plugin in commit 6196b7292fbb3168c558e64881601148c15653e4, where it had been added by commit f1b60bd62daff4aaf6465caadd4ad0c447521102 "Support opening of (some) remote URLs through the KDE file dialog". Since only either all schemes (if nothing explicitly set) or a whitelist of supported locations seems to be possible (s.a. the Phabricator changes referenced in the commit message of commit f1b60bd62daff4aaf6465caadd4ad0c447521102), add the "" scheme that makes removable devices shown -- while there doesn't seem to be an official documentation on the available schemes, at least not in KFileWidget's API documentation [1]. A quick test with all new available options after removing the call to 'QFileDialog::setSupportedSchemes' altogether indicated that opening and saving files there doesn't work reliably in all cases, so rather excplicitly add the "" scheme rather than claiming support for all schemes (including e.g. "timeline", "search", "remote", "trash"). [1] https://api.kde.org/frameworks/kio/html/classKFileWidget.html Change-Id: I89dc37d0f06d280e5dd599f90768c13e8edb915b Reviewed-on: https://gerrit.libreoffice.org/71320 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 2c69c93fdb871809825fe8b9aff40b7afb093be8) Reviewed-on: https://gerrit.libreoffice.org/72750 Reviewed-by: Thorsten Behrens diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 6bdc63de926a..ae8149aabfdf 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -98,13 +98,10 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) setCustomControlWidgetLayout(_layout); m_pFileDialog->setSupportedSchemes({ -QStringLiteral("file"), -QStringLiteral("ftp"), -QStringLiteral("http"), -QStringLiteral("https"), -QStringLiteral("webdav"), -QStringLiteral("webdavs"), +QStringLiteral("file"), QStringLiteral("ftp"), QStringLiteral("http"), +QStringLiteral("https"), QStringLiteral("webdav"), QStringLiteral("webdavs"), QStringLiteral("smb"), +QStringLiteral(""), // this makes removable devices shown }); // used to set the custom controls ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5FilePicker.hxx |4 vcl/unx/kde5/KDE5FilePicker2.cxx | 11 --- 2 files changed, 4 insertions(+), 11 deletions(-) New commits: commit 5fe230552f276b429178f1d183abc134452b0150 Author: Michael Weghorn AuthorDate: Wed Feb 6 17:12:32 2019 +0100 Commit: Katarina Behrens CommitDate: Tue May 21 21:42:53 2019 +0200 kde5 fpicker: Reuse parent class member to store custom widgets Directly access member 'm_pExtraControls' from parent class Qt5FilePicker for managing custom widgets, rather than maintaining an own one. This is meant as an intermediate step, further refactoring will follow. Change-Id: I0568d3db68dc24042e198d36f4b5e49608f93a0e Reviewed-on: https://gerrit.libreoffice.org/68055 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 2bd0400a49ad2dfeb1c3848a84f8e512433b5411) Reviewed-on: https://gerrit.libreoffice.org/72652 diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx index 3d3a428cd5a0..044a921eeb72 100644 --- a/vcl/unx/kde5/KDE5FilePicker.hxx +++ b/vcl/unx/kde5/KDE5FilePicker.hxx @@ -54,9 +54,6 @@ protected: QHash _customWidgets; QHash _customListboxes; -//widget to contain extra custom controls -QWidget* _extraControls; - //layout for extra custom controls QGridLayout* _layout; @@ -64,7 +61,6 @@ protected: public: explicit KDE5FilePicker(QFileDialog::FileMode); -virtual ~KDE5FilePicker() override; // XExecutableDialog functions virtual sal_Int16 SAL_CALL execute() override; diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 7e683a59884f..aabd344b1547 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -82,8 +82,7 @@ uno::Sequence FilePicker_getSupportedServiceNames() KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) // Native kde5 filepicker does not add file extension automatically : Qt5FilePicker(eMode, true) -, _extraControls(new QWidget) -, _layout(new QGridLayout(_extraControls)) +, _layout(new QGridLayout(m_pExtraControls)) , allowRemoteUrls(false) { // use native dialog @@ -118,8 +117,6 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) qApp->installEventFilter(this); } -KDE5FilePicker::~KDE5FilePicker() { delete _extraControls; } - sal_Int16 SAL_CALL KDE5FilePicker::execute() { if (qApp->thread() != QThread::currentThread()) @@ -326,7 +323,7 @@ void KDE5FilePicker::addCustomControl(sal_Int16 controlId) // code, but the checkbox is hidden and ignored bool hidden = controlId == CHECKBOX_AUTOEXTENSION; -auto widget = new QCheckBox(resString, _extraControls); +auto widget = new QCheckBox(resString, m_pExtraControls); widget->setHidden(hidden); if (!hidden) { @@ -349,7 +346,7 @@ void KDE5FilePicker::addCustomControl(sal_Int16 controlId) case LISTBOX_TEMPLATE: case LISTBOX_VERSION: { -auto widget = new QComboBox(_extraControls); +auto widget = new QComboBox(m_pExtraControls); QLabel* label = new QLabel(resString); label->setBuddy(widget); @@ -508,7 +505,7 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e) { if (auto* fileWidget = w->findChild({}, Qt::FindDirectChildrenOnly)) { -fileWidget->setCustomWidget(_extraControls); +fileWidget->setCustomWidget(m_pExtraControls); // remove event filter again; the only purpose was to set the custom widget here qApp->removeEventFilter(this); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5FilePicker.hxx |3 --- vcl/unx/kde5/KDE5FilePicker2.cxx |6 -- 2 files changed, 9 deletions(-) New commits: commit 2b122709b0c8258a7b825a3c4d71d1168741db21 Author: Michael Weghorn AuthorDate: Wed Feb 6 14:58:32 2019 +0100 Commit: Katarina Behrens CommitDate: Tue May 21 21:39:41 2019 +0200 Drop KDE5FilePicker::cancel Base class's 'Qt5FilePicker::cancel' already does nothing just the same way. Change-Id: Ie125d117f27849b29f082c72e320c1021e81163e Reviewed-on: https://gerrit.libreoffice.org/68053 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 424ffe2917cb3b0626af4f996aba149aa82a8e76) Reviewed-on: https://gerrit.libreoffice.org/72650 diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx index 37bb748eed83..65b67b37c7b1 100644 --- a/vcl/unx/kde5/KDE5FilePicker.hxx +++ b/vcl/unx/kde5/KDE5FilePicker.hxx @@ -92,9 +92,6 @@ public: // XInitialization virtual void SAL_CALL initialize(const css::uno::Sequence& rArguments) override; -// XCancellable -virtual void SAL_CALL cancel() override; - // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override; diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index ac43149437d8..6d39aeb23bdf 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -554,12 +554,6 @@ void SAL_CALL KDE5FilePicker::initialize(const uno::Sequence& args) setTitle(VclResId(saveDialog ? STR_FPICKER_SAVE : STR_FPICKER_OPEN)); } -// XCancellable -void SAL_CALL KDE5FilePicker::cancel() -{ -// TODO -} - // XServiceInfo OUString SAL_CALL KDE5FilePicker::getImplementationName() { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5FilePicker.hxx |3 --- vcl/unx/kde5/KDE5FilePicker2.cxx |2 -- 2 files changed, 5 deletions(-) New commits: commit e22b58f690e8a5aba77ab7f2d6152eea0e0b2de9 Author: Michael Weghorn AuthorDate: Wed Feb 6 13:28:54 2019 +0100 Commit: Katarina Behrens CommitDate: Tue May 21 21:37:35 2019 +0200 Drop KDE5FilePicker::setDescription Base class's 'Qt5FilePicker::setDescription' does the same, namely nothing. Change-Id: Ie89a1e1edaf20c49a1b16f43000a4a054b21f3b2 Reviewed-on: https://gerrit.libreoffice.org/68051 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 3035db41839f12642a02040099468695bf5ab335) Reviewed-on: https://gerrit.libreoffice.org/72648 diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx index 58a0c5d95c96..05a8f138350d 100644 --- a/vcl/unx/kde5/KDE5FilePicker.hxx +++ b/vcl/unx/kde5/KDE5FilePicker.hxx @@ -95,9 +95,6 @@ public: virtual void SAL_CALL setLabel(sal_Int16 nControlId, const OUString& rLabel) override; virtual OUString SAL_CALL getLabel(sal_Int16 nControlId) override; -// XFolderPicker stuff -virtual void SAL_CALL setDescription(const OUString& rDescription) override; - /* TODO XFilePreview virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedImageFormats( ); diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 072966c52e44..f146870a4713 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -335,8 +335,6 @@ OUString SAL_CALL KDE5FilePicker::getLabel(sal_Int16 controlId) return label; } -void SAL_CALL KDE5FilePicker::setDescription(const OUString&) {} - void KDE5FilePicker::addCustomControl(sal_Int16 controlId) { const char* resId = nullptr; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5FilePicker.hxx |4 vcl/unx/kde5/KDE5FilePicker2.cxx | 21 - 2 files changed, 25 deletions(-) New commits: commit ec1a6ee0bd8e0c9cd6df6f6f6cda96909234bc3f Author: Michael Weghorn AuthorDate: Wed Feb 6 12:37:39 2019 +0100 Commit: Katarina Behrens CommitDate: Tue May 21 21:37:15 2019 +0200 Drop KDE5FilePicker::getDirectory Use base class's 'Qt5FilePicker::getDirectory' instead to reduce duplication. Strictly speaking, the 'KDE5FilePicker::implGetDirectory' implementation used by 'KDE5FilePicker::getDirectory' suggests that the display directory is returned rather than the selected directory, and the same method 'implGetDirectory()' was actually previously used by the 'KDE5FilePicker::getDisplayDirectory()' method as well (removed in a previous commit). The code worked fine inside KDE5FilePicker (where the native Plasma/kde5 file dialog is used) but would lead to incorrect results when used inside Qt5FilePicker, e.g. for the following scenario * open folder picker displaying $HOME that contains a directory "bar" * do a single mouse click on the "bar" directory * click "OK" The call to 'toOUString(m_pFileDialog->directoryUrl().url())' inside 'getDirectory()' would return '$HOME/bar' for the native QFileDialog on KDE Plasma 5, but '$HOME' when used with the non-native QFileDialog Anyway, the implementation inside 'Qt5FilePicker::getDirectory' works fine for both cases, so just drop the KDE5FilePicker one. Reviewed-on: https://gerrit.libreoffice.org/68050 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit fa7387077bb708a2f3ec3e747463c9fd9f077f29) Change-Id: I86dcf98ed310636b899ad289d8a8a8fa263dd2e9 Reviewed-on: https://gerrit.libreoffice.org/72647 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx index 2b29c3515dde..58a0c5d95c96 100644 --- a/vcl/unx/kde5/KDE5FilePicker.hxx +++ b/vcl/unx/kde5/KDE5FilePicker.hxx @@ -96,7 +96,6 @@ public: virtual OUString SAL_CALL getLabel(sal_Int16 nControlId) override; // XFolderPicker stuff -virtual OUString SAL_CALL getDirectory() override; virtual void SAL_CALL setDescription(const OUString& rDescription) override; /* TODO XFilePreview @@ -126,14 +125,12 @@ private: void addCustomControl(sal_Int16 controlId); void handleSetListValue(QComboBox* pQComboBox, sal_Int16 nAction, const css::uno::Any& rValue); css::uno::Any handleGetListValue(QComboBox* pQComboBox, sal_Int16 nAction); -OUString implGetDirectory(); protected: bool eventFilter(QObject* watched, QEvent* event) override; Q_SIGNALS: sal_Int16 executeSignal(); -OUString getDirectorySignal(); void setValueSignal(sal_Int16 nControlId, sal_Int16 nControlAction, const css::uno::Any& rValue); css::uno::Any getValueSignal(sal_Int16 nControlId, sal_Int16 nControlAction); @@ -147,7 +144,6 @@ Q_SIGNALS: OUString getCurrentFilterSignal(); private Q_SLOTS: -OUString getDirectorySlot() { return implGetDirectory(); } void setValueSlot(sal_Int16 nControlId, sal_Int16 nControlAction, const css::uno::Any& rValue) { return setValue(nControlId, nControlAction, rValue); diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index fa99c9b7acad..072966c52e44 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -101,9 +101,6 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) connect(this, ::executeSignal, this, ::execute, Qt::BlockingQueuedConnection); -// XFolderPicker -connect(this, ::getDirectorySignal, this, ::getDirectorySlot, -Qt::BlockingQueuedConnection); // XFilterManager connect(this, ::appendFilterSignal, this, ::appendFilterSlot, Qt::BlockingQueuedConnection); @@ -338,18 +335,6 @@ OUString SAL_CALL KDE5FilePicker::getLabel(sal_Int16 controlId) return label; } -// XFolderPicker -OUString SAL_CALL KDE5FilePicker::getDirectory() -{ -if (qApp->thread() != QThread::currentThread()) -{ -SolarMutexReleaser aReleaser; -return Q_EMIT getDirectorySignal(); -} - -return implGetDirectory(); -} - void SAL_CALL KDE5FilePicker::setDescription(const OUString&) {} void KDE5FilePicker::addCustomControl(sal_Int16 controlId) @@ -531,12 +516,6 @@ uno::Any KDE5FilePicker::handleGetListValue(QComboBox* pQComboBox, sal_Int16 nAc return aAny; } -OUString KDE5FilePicker::implGetDirectory() -{ -OUString dir = toOUString(m_pFileDialog->directoryUrl().url()); -return dir; -} - // XInitialization void SAL_CALL KDE5FilePicker::initialize(const uno::Sequence& args) {
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5FilePicker.hxx |5 - vcl/unx/kde5/KDE5FilePicker2.cxx | 14 -- 2 files changed, 19 deletions(-) New commits: commit 98f8d1a1d91803ec00035f28c920790fb913c8e2 Author: Michael Weghorn AuthorDate: Wed Feb 6 12:30:56 2019 +0100 Commit: Katarina Behrens CommitDate: Tue May 21 21:35:43 2019 +0200 Drop KDE5Filepicker::getDisplayDirectory Base class's 'Qt5FilePicker::getDisplayDirectory' does the same. Change-Id: I835603848736a328d0cf63b0bdc87895761e229c Reviewed-on: https://gerrit.libreoffice.org/68049 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit d5ac5eb59dda2c1dc537f5a4baf13515af7a57aa) Reviewed-on: https://gerrit.libreoffice.org/72646 diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx index 4825a820ed9a..2b29c3515dde 100644 --- a/vcl/unx/kde5/KDE5FilePicker.hxx +++ b/vcl/unx/kde5/KDE5FilePicker.hxx @@ -76,9 +76,6 @@ public: // XExecutableDialog functions virtual sal_Int16 SAL_CALL execute() override; -// XFilePicker functions -virtual OUString SAL_CALL getDisplayDirectory() override; - // XFilterManager functions virtual void SAL_CALL appendFilter(const OUString& rTitle, const OUString& rFilter) override; virtual void SAL_CALL setCurrentFilter(const OUString& rTitle) override; @@ -136,7 +133,6 @@ protected: Q_SIGNALS: sal_Int16 executeSignal(); -OUString getDisplayDirectorySignal(); OUString getDirectorySignal(); void setValueSignal(sal_Int16 nControlId, sal_Int16 nControlAction, const css::uno::Any& rValue); @@ -151,7 +147,6 @@ Q_SIGNALS: OUString getCurrentFilterSignal(); private Q_SLOTS: -OUString getDisplayDirectorySlot() { return implGetDirectory(); } OUString getDirectorySlot() { return implGetDirectory(); } void setValueSlot(sal_Int16 nControlId, sal_Int16 nControlAction, const css::uno::Any& rValue) { diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 0a96aa0bda7f..fa99c9b7acad 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -101,9 +101,6 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) connect(this, ::executeSignal, this, ::execute, Qt::BlockingQueuedConnection); -// XFilePicker -connect(this, ::getDisplayDirectorySignal, this, -::getDisplayDirectorySlot, Qt::BlockingQueuedConnection); // XFolderPicker connect(this, ::getDirectorySignal, this, ::getDirectorySlot, Qt::BlockingQueuedConnection); @@ -153,17 +150,6 @@ sal_Int16 SAL_CALL KDE5FilePicker::execute() return m_pFileDialog->exec() == QFileDialog::Accepted ? 1 : 0; } -OUString SAL_CALL KDE5FilePicker::getDisplayDirectory() -{ -if (qApp->thread() != QThread::currentThread()) -{ -SolarMutexReleaser aReleaser; -return Q_EMIT getDisplayDirectorySignal(); -} - -return implGetDirectory(); -} - // XFilterManager void SAL_CALL KDE5FilePicker::appendFilter(const OUString& title, const OUString& filter) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5FilePicker.hxx | 12 vcl/unx/kde5/KDE5FilePicker2.cxx | 34 -- 2 files changed, 46 deletions(-) New commits: commit 74a013404dd7c2ccd805c1440cc611fef1afe46a Author: Michael Weghorn AuthorDate: Tue Feb 5 15:09:44 2019 +0100 Commit: Katarina Behrens CommitDate: Tue May 21 21:30:58 2019 +0200 KDE5FilePicker: Drop 'm_xListener' and related methods Drop the 'm_xListener' member and methods using it. The inherited Qt5FilePicker methods do the same thing. This also avoids that two methods are called when a file or filter is selected, since the 'QFileDialog::filterSelected' and 'QFileDialog::fileSelected' signals had been connected to slots in both, the qt5 and kde5 fpicker constructors. Change-Id: I60e3eda29e6497f51165e87d0c4ab2e17f209a1c Reviewed-on: https://gerrit.libreoffice.org/68043 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 1e9148f96341424d5403f2e5175937e289010701) Reviewed-on: https://gerrit.libreoffice.org/72640 diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx index dcc7367cebab..5e894571c219 100644 --- a/vcl/unx/kde5/KDE5FilePicker.hxx +++ b/vcl/unx/kde5/KDE5FilePicker.hxx @@ -51,7 +51,6 @@ class KDE5FilePicker : public Qt5FilePicker { Q_OBJECT protected: -css::uno::Reference m_xListener; osl::Mutex _helperMutex; //running filter string to add to dialog @@ -77,12 +76,6 @@ public: explicit KDE5FilePicker(QFileDialog::FileMode); virtual ~KDE5FilePicker() override; -// XFilePickerNotifier -virtual void SAL_CALL addFilePickerListener( -const css::uno::Reference& xListener) override; -virtual void SAL_CALL removeFilePickerListener( -const css::uno::Reference& xListener) override; - // XExecutableDialog functions virtual void SAL_CALL setTitle(const OUString& rTitle) override; virtual sal_Int16 SAL_CALL execute() override; @@ -152,11 +145,6 @@ private: css::uno::Any handleGetListValue(QComboBox* pQComboBox, sal_Int16 nAction); OUString implGetDirectory(); -// emit XFilePickerListener controlStateChanged event -void filterChanged(); -// emit XFilePickerListener fileSelectionChanged event -void selectionChanged(); - protected: bool eventFilter(QObject* watched, QEvent* event) override; diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index e8e86f0e5dcf..e8eb75346de4 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -99,10 +99,6 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) QStringLiteral("smb"), }); -connect(m_pFileDialog.get(), ::filterSelected, this, -::filterChanged); -connect(m_pFileDialog.get(), ::fileSelected, this, -::selectionChanged); connect(this, ::executeSignal, this, ::execute, Qt::BlockingQueuedConnection); @@ -152,19 +148,6 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) KDE5FilePicker::~KDE5FilePicker() { delete _extraControls; } -void SAL_CALL -KDE5FilePicker::addFilePickerListener(const uno::Reference& xListener) -{ -SolarMutexGuard aGuard; -m_xListener = xListener; -} - -void SAL_CALL KDE5FilePicker::removeFilePickerListener(const uno::Reference&) -{ -SolarMutexGuard aGuard; -m_xListener.clear(); -} - // XExecutableDialog void SAL_CALL KDE5FilePicker::setTitle(const OUString& title) { @@ -804,23 +787,6 @@ uno::Sequence SAL_CALL KDE5FilePicker::getSupportedServiceNames() return FilePicker_getSupportedServiceNames(); } -void KDE5FilePicker::filterChanged() -{ -FilePickerEvent aEvent; -aEvent.ElementId = LISTBOX_FILTER; -OSL_TRACE("filter changed"); -if (m_xListener.is()) -m_xListener->controlStateChanged(aEvent); -} - -void KDE5FilePicker::selectionChanged() -{ -FilePickerEvent aEvent; -OSL_TRACE("file selection changed"); -if (m_xListener.is()) -m_xListener->fileSelectionChanged(aEvent); -} - bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e) { if (e->type() == QEvent::Show && o->isWidgetType()) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/generic/printer/cupsmgr.cxx | 36 1 file changed, 36 insertions(+) New commits: commit 11fc802f001187ab5ba368832d7246c397b98682 Author: Julien Nabet AuthorDate: Wed Nov 28 20:39:43 2018 +0100 Commit: Caolán McNamara CommitDate: Tue May 7 12:30:45 2019 +0200 band-aid: deprecated-declarations related to cups Change-Id: I07438840fc1c3cc8e70559d44954be0c49531525 Reviewed-on: https://gerrit.libreoffice.org/64191 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit e9e49fceac43476d1233ee8106cba5f4831771b9) Reviewed-on: https://gerrit.libreoffice.org/71896 diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx index 630e39437119..dafe671f8b65 100644 --- a/vcl/unx/generic/printer/cupsmgr.cxx +++ b/vcl/unx/generic/printer/cupsmgr.cxx @@ -81,7 +81,14 @@ struct GetPPDAttribs { // This CUPS method is not at all thread-safe we need // to dup the pointer to a static buffer it returns ASAP +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif OString aResult = cupsGetPPD(m_aParameter.getStr()); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif MutexGuard aGuard( *m_pSyncMutex ); m_aResult = aResult; m_aCondition.set(); @@ -214,6 +221,10 @@ void CUPSManager::runDests() // n#722902 - do a fast-failing check for cups working *at all* first http_t* p_http; +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif if( (p_http=httpConnectEncrypt( cupsServer(), ippPort(), @@ -230,6 +241,9 @@ void CUPSManager::runDests() httpClose(p_http); } +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } void CUPSManager::initialize() @@ -439,7 +453,14 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter ) rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); OUString aFileName( OStringToOUString( aPPDFile, aEncoding ) ); // update the printer info with context information +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif ppd_file_t* pPPD = ppdOpenFile( aPPDFile.getStr() ); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif if( pPPD ) { // create the new parser @@ -447,7 +468,14 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter ) pCUPSParser->m_aFile = rPrinter; pNewParser = pCUPSParser; +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif /*int nConflicts =*/ cupsMarkOptions( pPPD, pDest->num_options, pDest->options ); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif SAL_INFO("vcl.unx.print", "processing the following options for printer " << pDest->name << " (instance " << (pDest->instance == nullptr ? "null" : pDest->instance) << "):"); for( int k = 0; k < pDest->num_options; k++ ) SAL_INFO("vcl.unx.print", @@ -468,7 +496,15 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter ) rInfo.m_aContext = rContext; // clean up the mess +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif ppdClose( pPPD ); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + } else SAL_INFO("vcl.unx.print", "ppdOpenFile failed, falling back to generic driver"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 14c5af0ef085eb1fa03bfdcc47f4bc9505b31bad Author: Caolán McNamara AuthorDate: Mon Apr 29 09:51:37 2019 +0100 Commit: Michael Stahl CommitDate: Mon Apr 29 18:48:28 2019 +0200 gtk_tree_model_iter_parent modifies the 1st arg, not 2nd Change-Id: I015022c4dd68f152ef5e56947031ccf4bfaf2b1c Reviewed-on: https://gerrit.libreoffice.org/71517 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index caec6ba5ac6c..a69e4df05806 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -5470,7 +5470,6 @@ public: } if (!gtk_tree_model_iter_parent(pModel, , )) return false; -tmp = iter; if (gtk_tree_model_iter_next(pModel, )) { rGtkIter.iter = tmp; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 8eb4ad0529c5efedf95c7220b6b8b9aad63e3ea4 Author: Caolán McNamara AuthorDate: Fri Apr 26 21:39:09 2019 +0100 Commit: Caolán McNamara CommitDate: Mon Apr 29 13:11:35 2019 +0200 Resolves: tdf#124980 drop dangling timer Change-Id: I05ec394ee83f0422ecccf3ae3377818af6feb1d1 Reviewed-on: https://gerrit.libreoffice.org/71398 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 9207516888e73398599a9890af78cd677ddd0992) Reviewed-on: https://gerrit.libreoffice.org/71411 Reviewed-by: Michael Stahl diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 18d897cbba4b..caec6ba5ac6c 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -7505,6 +7505,8 @@ public: virtual ~GtkInstanceEntryTreeView() override { +if (m_nAutoCompleteIdleId) +g_source_remove(m_nAutoCompleteIdleId); GtkWidget* pWidget = m_pEntry->getWidget(); g_signal_handler_disconnect(pWidget, m_nKeyPressSignalId); g_signal_handler_disconnect(pWidget, m_nEntryInsertTextSignalId); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3_kde5/kde5_filepicker.cxx |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) New commits: commit e67f8ea50e470a7f751a9d14d9bf0213c1edd047 Author: Michael Weghorn AuthorDate: Fri Apr 26 18:06:47 2019 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Sun Apr 28 22:58:45 2019 +0200 tdf#123750 gtk3_kde5: Show removable devices in file dialog Do the same for the gtk3_kde5 VCL plugin as commit 2c69c93fdb871809825fe8b9aff40b7afb093be8 does for the kde5 one. Change-Id: I6fc91d1dbe133bd905c033c9fce7d48c0b6464a0 Reviewed-on: https://gerrit.libreoffice.org/71384 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit c08f23b1470c0f49336c83c711d473584ce5c96f) Reviewed-on: https://gerrit.libreoffice.org/71410 Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx index d31d6f0aa9ec..f4cb305e239c 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx @@ -45,13 +45,10 @@ KDE5FilePicker::KDE5FilePicker(QObject* parent) , allowRemoteUrls(false) { _dialog->setSupportedSchemes({ -QStringLiteral("file"), -QStringLiteral("ftp"), -QStringLiteral("http"), -QStringLiteral("https"), -QStringLiteral("webdav"), -QStringLiteral("webdavs"), +QStringLiteral("file"), QStringLiteral("ftp"), QStringLiteral("http"), +QStringLiteral("https"), QStringLiteral("webdav"), QStringLiteral("webdavs"), QStringLiteral("smb"), +QStringLiteral(""), // this makes removable devices shown }); setMultiSelectionMode(false); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit 8f4af22c7afc2f4b62ea974f07aea1b6abac45f0 Author: Michael Weghorn AuthorDate: Wed Apr 24 11:31:06 2019 +0200 Commit: Katarina Behrens CommitDate: Fri Apr 26 10:25:10 2019 +0200 gtk3_kde5: Make folder selection more intuitive When 'QFileDialog::Directory' is set, the native Plasma QFileDialog does not consider the clicked directory to be selected, but rather the base directory shown in the dialog, s. https://bugs.kde.org/show_bug.cgi?id=406464 . Therefore don't set the option when in a KDE Plasma desktop environment (which the kde5 VCL plugin also doesn't do). This works around the above issue in the Plasma desktop integration. Change-Id: Ib3d0978ab56b6e50ee45f7ad997ec051b35faf54 Reviewed-on: https://gerrit.libreoffice.org/71223 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 9fc0dbcd797f074ddb8ba379c876dd233cb5836e) Reviewed-on: https://gerrit.libreoffice.org/71274 Reviewed-by: Katarina Behrens diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx index 991486903c62..d31d6f0aa9ec 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx @@ -65,7 +65,16 @@ KDE5FilePicker::KDE5FilePicker(QObject* parent) void KDE5FilePicker::enableFolderMode() { _dialog->setOption(QFileDialog::ShowDirsOnly, true); -_dialog->setFileMode(QFileDialog::Directory); +// Workaround for https://bugs.kde.org/show_bug.cgi?id=406464 : +// Don't set file mode to QFileDialog::Directory when native KDE Plasma 5 +// file dialog is used, since clicking on directory "bar" inside directory "foo" +// and then confirming would return "foo" rather than "foo/bar"; +// on the other hand, non-native file dialog needs 'QFileDialog::Directory' +// and doesn't allow folder selection otherwise +if (Application::GetDesktopEnvironment() != "KDE5") +{ +_dialog->setFileMode(QFileDialog::Directory); +} } KDE5FilePicker::~KDE5FilePicker() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 62d6082f5a7a87631a4316b2107f1d8fc7e8c820 Author: Michael Weghorn AuthorDate: Wed Apr 10 13:32:25 2019 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 11 07:22:25 2019 +0200 tdf#124652 Guard Gtk3KDE5FolderPicker::execute with SolarMutexGuard S.a. commit 8dbe0af729c9e054135a0f41706165033441f867 which already did the same for Gtk3KDE5FilePicker. Change-Id: I35f837b7b8fdaebc5625ff8ea5e20b3f48a3b4ec Reviewed-on: https://gerrit.libreoffice.org/70519 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 728ee3839ea94e3391c36a847bf6b28c12ad7647) Reviewed-on: https://gerrit.libreoffice.org/70529 Reviewed-by: Michael Stahl diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx b/vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx index ad89374b47c7..fcfe9f51d685 100644 --- a/vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx +++ b/vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx @@ -76,7 +76,11 @@ void SAL_CALL Gtk3KDE5FolderPicker::setTitle(const OUString& aTitle) m_ipc.sendCommand(Commands::SetTitle, aTitle); } -sal_Int16 SAL_CALL Gtk3KDE5FolderPicker::execute() { return m_ipc.execute(); } +sal_Int16 SAL_CALL Gtk3KDE5FolderPicker::execute() +{ +SolarMutexGuard g; +return m_ipc.execute(); +} // XCancellable ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkframe.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit eaaec2de4eef3fd283f387d2d5888a6d4f46c25b Author: Caolán McNamara AuthorDate: Mon Apr 1 13:49:12 2019 +0100 Commit: Xisco Faulí CommitDate: Thu Apr 4 11:27:03 2019 +0200 Resolves: tdf#124411 default dnd to MOVE for internal and COPY for external which what the macosx version appears to also do Change-Id: Icff9cada2c821544d0130e28cc3e3862154a57dc Reviewed-on: https://gerrit.libreoffice.org/70064 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index f8e629037820..184102e74b17 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -3665,10 +3665,16 @@ gboolean GtkSalFrame::signalDragMotion(GtkWidget *pWidget, GdkDragContext *conte GdkModifierType mask; gdk_window_get_pointer(widget_get_window(pWidget), nullptr, nullptr, ); +// tdf#124411 default to move if drag originates within LO itself, default +// to copy if it comes from outside, this is similar to srcAndDestEqual +// in macosx DropTarget::determineDropAction equivalent +sal_Int8 nNewDropAction = GtkDragSource::g_ActiveDragSource ? + css::datatransfer::dnd::DNDConstants::ACTION_MOVE : + css::datatransfer::dnd::DNDConstants::ACTION_COPY; + // tdf#109227 if a modifier is held down, default to the matching // action for that modifier combo, otherwise pick the preferred // default from the possible source actions -sal_Int8 nNewDropAction = css::datatransfer::dnd::DNDConstants::ACTION_MOVE; if ((mask & GDK_SHIFT_MASK) && !(mask & GDK_CONTROL_MASK)) nNewDropAction = css::datatransfer::dnd::DNDConstants::ACTION_MOVE; else if ((mask & GDK_CONTROL_MASK) && !(mask & GDK_SHIFT_MASK)) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) New commits: commit e019441cb0507fd533fe7114c6a1ea17e2c10aa6 Author: Caolán McNamara AuthorDate: Mon Mar 25 14:45:45 2019 + Commit: Christian Lohmaier CommitDate: Thu Mar 28 15:24:58 2019 +0100 Resolves: tdf#124234 page leave signal missing on move to overflow deck we were emitting page-entered but not emitting the page-leave signal Change-Id: I64131631016331cf102d08244982148ac8c3c69c Reviewed-on: https://gerrit.libreoffice.org/69686 Tested-by: Jenkins Tested-by: Xisco Faulí Reviewed-by: Christian Lohmaier diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 95f6ccfa4c48..622ce023a8bd 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3131,6 +3131,11 @@ private: return; } +// check if we are allowed leave before attempting to resplit the notebooks +bool bAllow = !m_aLeavePageHdl.IsSet() || m_aLeavePageHdl.Call(get_current_page_ident()); +if (!bAllow) +return; + disable_notify_events(); // take the overflow pages, and put them back at the end of the normal one @@ -3140,11 +3145,13 @@ private: std::swap(m_nStartTabCount, m_nEndTabCount); split_notebooks(); +gtk_notebook_set_current_page(m_pNotebook, nNewPage); + enable_notify_events(); -// we want to call this outside enable_notify_events so that the main -// notebook switch-page callback is triggered -gtk_notebook_set_current_page(m_pNotebook, nNewPage); +// trigger main notebook switch-page callback +OString sNewIdent(get_page_ident(m_pNotebook, nNewPage)); +m_aEnterPageHdl.Call(sNewIdent); } static OString get_page_ident(GtkNotebook *pNotebook, guint nPage) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde4/KDEXLib.cxx | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) New commits: commit ad313992da1cf89f5825a4d1eb020392b5e32c6d Author: Stephan Bergmann AuthorDate: Tue Mar 19 17:29:53 2019 +0100 Commit: Michael Weghorn CommitDate: Tue Mar 19 21:54:01 2019 +0100 rhbz#1687589: KDE4 gpoll_wrapper can be called with SolarMutex unlocked ...when called from MountOperation::Mount (ucb/source/ucp/gio/gio_content.cxx), which itself contains a SolarMutexReleaser since 2eb36dc4b846ab5886ae71fd2978b56b2a2d1d08 "Hack to not leave SolarMutex released after g_main_loop_run call". So calling SolarMutexReleaser ctor in gpoll_wrapper will then cause comphelper::GenericSolarMutex::doRelease (comphelper/source/misc/solarmutex.cxx) to call std::abort() because the SolarMutex is not locked. Change-Id: If893b427e404cf3d9e48430f84cff7d32b61bf87 Reviewed-on: https://gerrit.libreoffice.org/69436 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx index 0852c543a6d7..22274690842b 100644 --- a/vcl/unx/kde4/KDEXLib.cxx +++ b/vcl/unx/kde4/KDEXLib.cxx @@ -210,8 +210,15 @@ static GPollFunc old_gpoll = nullptr; static gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout ) { -SolarMutexReleaser aReleaser; -return old_gpoll( ufds, nfds, timeout ); +if (GetSalData()->m_pInstance->GetYieldMutex()->IsCurrentThread()) +{ +SolarMutexReleaser aReleaser; +return old_gpoll( ufds, nfds, timeout ); +} +else +{ +return old_gpoll( ufds, nfds, timeout ); +} } #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8e9041dfdab7f99f79fdc6d32d3e50e8b4114cdd Author: Tomáš Chvátal AuthorDate: Fri Mar 15 15:58:40 2019 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Mon Mar 18 06:01:13 2019 +0100 Fix build with older versions of Boost Change-Id: Ic5fa7c703821c23e704d2c58f9a04d0ac8ce8ef2 Reviewed-on: https://gerrit.libreoffice.org/69309 Reviewed-by: Tomáš Chvátal Tested-by: Tomáš Chvátal Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx index 3bf5ddcd29bc..044a92d06c86 100644 --- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx +++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx @@ -58,7 +58,7 @@ OUString applicationDirPath() const auto utf8Path = applicationSystemPath.toUtf8(); auto ret = boost::filesystem::path(utf8Path.getStr(), utf8Path.getStr() + utf8Path.getLength()); ret.remove_filename(); -return OUString::fromUtf8(OString(ret.c_str(), ret.size())); +return OUString::fromUtf8(OString(ret.c_str(), strlen(ret.c_str(; } OUString findPickerExecutable() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) New commits: commit 44238792b59e9931667d6e7303f86a75a88a8620 Author: Caolán McNamara AuthorDate: Thu Feb 21 17:19:18 2019 + Commit: Miklos Vajna CommitDate: Thu Mar 7 18:15:50 2019 +0100 wrong "to-page" reported in split notebooks and when switching decks we need that notification to occur too Change-Id: Ica3c83ad34e072faf044c6d4667f34756688de09 Reviewed-on: https://gerrit.libreoffice.org/68172 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index e81f451f7fa0..b130fe5d4747 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3068,6 +3068,13 @@ private: void signal_switch_page(int nNewPage) { +if (m_bOverFlowBoxIsStart) +{ +auto nOverFlowLen = m_bOverFlowBoxActive ? gtk_notebook_get_n_pages(m_pOverFlowNotebook) - 1 : 0; +// add count of overflow pages, minus the extra tab +nNewPage += nOverFlowLen; +} + bool bAllow = !m_aLeavePageHdl.IsSet() || m_aLeavePageHdl.Call(get_current_page_ident()); if (!bAllow) { @@ -3131,9 +3138,11 @@ private: std::swap(m_nStartTabCount, m_nEndTabCount); split_notebooks(); -gtk_notebook_set_current_page(m_pNotebook, nNewPage); - enable_notify_events(); + +// we want to call this outside enable_notify_events so that the main +// notebook switch-page callback is triggered +gtk_notebook_set_current_page(m_pNotebook, nNewPage); } static OString get_page_ident(GtkNotebook *pNotebook, guint nPage) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5FilePicker2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 75992180c5a88a6b1faaa4676e1b348944a0f361 Author: Michael Weghorn AuthorDate: Mon Feb 18 19:08:24 2019 +0100 Commit: Michael Stahl CommitDate: Tue Feb 19 10:38:51 2019 +0100 KDE5FilePicker: Fix build on 32 bit archs This fixes the following build error on 32 bit archs as reported by ricotz for LibreOffice 6.2.1.1 on #libreoffice-dev: [build CXX] vcl/unx/kde5/KDE5SalGraphics.cxx In file included from /<>/include/com/sun/star/uno/Any.h:29, from /<>/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/XInterface.hdl:6, from /<>/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/lang/XTypeProvider.hdl:6, from /<>/workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/lang/XTypeProvider.hpp:6, from /<>/include/cppuhelper/compbase.hxx:25, from /<>/vcl/unx/kde5/KDE5FilePicker.hxx:22, from /<>/vcl/unx/kde5/KDE5FilePicker2.cxx:20: /<>/include/cppu/unotype.hxx: In instantiation of ‘static const com::sun::star::uno::Type& cppu::UnoType< >::get() [with T = int]’: /<>/include/cppu/unotype.hxx:321:37: required from ‘const com::sun::star::uno::Type& cppu::getTypeFavourUnsigned(const T*) [with T = int]’ /<>/include/com/sun/star/uno/Any.hxx:268:55: required from ‘void com::sun::star::uno::operator<<=(com::sun::star::uno::Any&, const C&) [with C = int]’ /<>/vcl/unx/kde5/KDE5FilePicker2.cxx:664:22: required from here /<>/include/cppu/unotype.hxx:296:38: error: no matching function for call to ‘cppu_detail_getUnoType(T1*)’ return cppu_detail_getUnoType(static_cast< T1 * >(0)); ~~^~~~ Change-Id: I5b734160c4ce218a9a982ba4a595add13affa365 Reviewed-on: https://gerrit.libreoffice.org/67983 Reviewed-by: Michael Weghorn Tested-by: Michael Weghorn (cherry picked from commit 993b8a6667fb0ca58ec1145cc1f9529c34f3266c) Reviewed-on: https://gerrit.libreoffice.org/68002 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 5d40a7de39ab..d8d35b2f90b5 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -661,7 +661,7 @@ uno::Any KDE5FilePicker::handleGetListValue(QComboBox* pQComboBox, sal_Int16 nAc case ControlActions::GET_SELECTED_ITEM_INDEX: { int nCurrent = pQComboBox->currentIndex(); -aAny <<= nCurrent; +aAny <<= static_cast(nCurrent); } break; default: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkframe.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 089354cd5a85c458e55f63d398ff61f4925fe467 Author: Caolán McNamara AuthorDate: Tue Jan 29 11:28:35 2019 + Commit: Miklos Vajna CommitDate: Tue Feb 5 10:32:53 2019 +0100 tdf#117713 set a tiny default size-request for the fixed container otherwise we get a default one if SetMinClientSize is never called, which is the case for these spawned-from-basic dialogs Change-Id: I4f0389de6abcb1e99b32798969dca49bf8f0f760 Reviewed-on: https://gerrit.libreoffice.org/67073 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 14ec230787ce..e4cbc88472e3 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -1009,6 +1009,7 @@ void GtkSalFrame::InitCommon() // add the fixed container child, // fixed is needed since we have to position plugin windows m_pFixedContainer = GTK_FIXED(g_object_new( ooo_fixed_get_type(), nullptr )); +gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), 1, 1); gtk_container_add( GTK_CONTAINER(m_pEventBox), GTK_WIDGET(m_pFixedContainer) ); GtkWidget *pEventWidget = getMouseEventWidget(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3_kde5/kde5_filepicker.cxx |4 1 file changed, 4 insertions(+) New commits: commit 7b54f3db98e96231fc9f16429f325cdb1f37498c Author: Michael Weghorn AuthorDate: Thu Jan 31 09:52:51 2019 +0100 Commit: Katarina Behrens CommitDate: Thu Jan 31 20:59:36 2019 +0100 tdf#123077 gtk3_kde5: Set KFileWidget's custom widget only once Since the event filter is only used to set the custom widget in the KFileWidget, it can and needs to be removed again once this has been done; which also avoids crashes. (s. https://gerrit.libreoffice.org/#/c/67185/ for more infos, where the same thing is done for kde5) Change-Id: I5c719fb17510916b4730ed5c00bb638df2f183e3 Reviewed-on: https://gerrit.libreoffice.org/67184 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 30cc54a4532a732a0cf6dfe9943521978ff7292f) Reviewed-on: https://gerrit.libreoffice.org/67203 Reviewed-by: Katarina Behrens diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx index 33f64ad0aa18..991486903c62 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx @@ -265,7 +265,11 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e) { KWindowSystem::setMainWindow(w, _winId); if (auto* fileWidget = w->findChild({}, Qt::FindDirectChildrenOnly)) +{ fileWidget->setCustomWidget(_extraControls); +// remove event filter again; the only purpose was to set the custom widget here +qApp->removeEventFilter(this); +} } } return QObject::eventFilter(o, e); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5FilePicker2.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit c7b13a768d5185ba7e57c73062d97d4bdbcaa3e5 Author: Michael Weghorn AuthorDate: Thu Jan 31 09:43:56 2019 +0100 Commit: Katarina Behrens CommitDate: Thu Jan 31 17:24:27 2019 +0100 tdf#123077 kde5: Set KFileWidget's custom widget only once Since the event filter is only used to set the custom widget in the KFileWidget, it can be removed again once this has been done. Previously, events could cause 'fileWidget->setCustomWidget()' to be called multiple times, which resulted in a crash. (The fact that calling 'KfileWidget::setCustomWidget()' multiple times causes a crash could also be easily be reproduced by just duplicating the call.) Basically the same will be done for the gtk3_kde5 case, but in a separate commit to simplify backporting. Change-Id: Ic463c44d8a95f44ce09924893d682f402ad7ed3d Reviewed-on: https://gerrit.libreoffice.org/67185 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 68b15aee96abf5cd2179009424ab6a0229b67756) Reviewed-on: https://gerrit.libreoffice.org/67205 diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 9968d1b4316d..5d40a7de39ab 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -153,6 +153,7 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) connect(this, ::getFilesSignal, this, ::getFiles, Qt::BlockingQueuedConnection); +// used to set the custom controls qApp->installEventFilter(this); } @@ -854,7 +855,11 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e) if (!w->parentWidget() && w->isModal()) { if (auto* fileWidget = w->findChild({}, Qt::FindDirectChildrenOnly)) +{ fileWidget->setCustomWidget(_extraControls); +// remove event filter again; the only purpose was to set the custom widget here +qApp->removeEventFilter(this); +} } } return QObject::eventFilter(o, e); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 26 +- vcl/unx/gtk3_kde5/kde5_filepicker.hxx |2 ++ 2 files changed, 27 insertions(+), 1 deletion(-) New commits: commit 9455565fba299645372ddf432d25b679af51281f Author: Michael Weghorn AuthorDate: Wed Jan 30 10:11:35 2019 +0100 Commit: Thorsten Behrens CommitDate: Wed Jan 30 20:33:22 2019 +0100 tdf#122752 gtk3_kde5: Use non-native fpicker for non-Plasma desktops Adding the custom widgets to the native dialog currently depends on the native dialog using a KFileWidget, which is just the case for the native QFileDialog implementation on Plasma/KDE5. In order not to lose custom controls for non-Plasma desktops, fall back to using the non-native QFileDialog there and adding the custom controls to its layout. This was mostly taken over from Qt5FileDialog. (This is a similar approach as that taken for the kde5 VCL plugin in https://gerrit.libreoffice.org/#/c/67106/ ). Adding the controls to the layout returned by 'QFileDialog::layout()' cannot be used for the native dialog as well, since a nullptr is returned in this case. From QFileDialog doc: > By default, a platform-native file dialog will be used if the platform > has one. In that case, the widgets which would otherwise be used to > construct the dialog will not be instantiated, so related accessors such > as layout() and itemDelegate() will return null. You can set the > DontUseNativeDialog option to ensure that the widget-based > implementation will be used instead of the native dialog. Change-Id: I75fbe7731da28d0dc7df878f4c57e141d4d89902 Reviewed-on: https://gerrit.libreoffice.org/67111 Reviewed-by: Michael Weghorn Tested-by: Michael Weghorn (cherry picked from commit bf93bae6990b01ee726b59b0969b93585719671a) Reviewed-on: https://gerrit.libreoffice.org/67132 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx index 42e278aa3d0e..33f64ad0aa18 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include "kde5_filepicker.hxx" #include @@ -57,7 +59,7 @@ KDE5FilePicker::KDE5FilePicker(QObject* parent) connect(_dialog, ::filterSelected, this, ::filterChanged); connect(_dialog, ::fileSelected, this, ::selectionChanged); -qApp->installEventFilter(this); +setupCustomWidgets(); } void KDE5FilePicker::enableFolderMode() @@ -232,6 +234,28 @@ void KDE5FilePicker::initialize(bool saveDialog) void KDE5FilePicker::setWinId(sal_uIntPtr winId) { _winId = winId; } +void KDE5FilePicker::setupCustomWidgets() +{ +// When using the platform-native Plasma/KDE5 file picker, we currently rely on KFileWidget +// being present to add the custom controls visible (s. 'eventFilter' method). +// Since this doesn't work for other desktop environments, use a non-native +// dialog there in order not to lose the custom controls and insert the custom +// widget in the layout returned by QFileDialog::layout() +// (which returns nullptr for native file dialogs) +if (Application::GetDesktopEnvironment() == "KDE5") +{ +qApp->installEventFilter(this); +} +else +{ +_dialog->setOption(QFileDialog::DontUseNativeDialog); +QGridLayout* pLayout = static_cast(_dialog->layout()); +assert(pLayout); +const int row = pLayout->rowCount(); +pLayout->addWidget(_extraControls, row, 1); +} +} + bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e) { if (e->type() == QEvent::Show && o->isWidgetType()) diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx index d999f7bf7a09..c979a5ddcad9 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx @@ -98,6 +98,8 @@ public: private: Q_DISABLE_COPY(KDE5FilePicker) +// adds the custom controls to the dialog +void setupCustomWidgets(); protected: bool eventFilter(QObject* watched, QEvent* event) override; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5SalInstance.cxx | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) New commits: commit 71562327d4f4d9d46b129fbb41184f21116ba78d Author: Michael Weghorn AuthorDate: Wed Jan 30 08:53:19 2019 +0100 Commit: Thorsten Behrens CommitDate: Wed Jan 30 20:23:05 2019 +0100 tdf#122752 kde5: Use plain qt5 fpicker for non-Plasma desktops Since KDE5FilePicker relies on the Plasma-specific KFileWidget to be present for inserting custom controls, this doesn't work on non-Plasma desktops, resulting in missing controls. Therefore, use a plain (non-native) Qt5FilePicker for the non-Plasma case. Change-Id: I163af89ecd7eab800d55baa2ce057802caed262c Reviewed-on: https://gerrit.libreoffice.org/67106 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit c902b3a96dcfbc52e53164f108e605547e598bc7) Reviewed-on: https://gerrit.libreoffice.org/67131 Reviewed-by: Thorsten Behrens diff --git a/vcl/unx/kde5/KDE5SalInstance.cxx b/vcl/unx/kde5/KDE5SalInstance.cxx index 484920d01e97..401afbcfa2dd 100644 --- a/vcl/unx/kde5/KDE5SalInstance.cxx +++ b/vcl/unx/kde5/KDE5SalInstance.cxx @@ -71,7 +71,15 @@ KDE5SalInstance::createFilePicker(const uno::Reference& return Q_EMIT createFilePickerSignal(xMSF); } -return uno::Reference(new KDE5FilePicker(QFileDialog::ExistingFile)); +// In order to insert custom controls, KDE5FilePicker currently relies on KFileWidget +// being used in the native file picker, which is only the case for KDE Plasma. +// Therefore, return the plain qt5 one in order to not lose custom controls. +if (Application::GetDesktopEnvironment() == "KDE5") +{ +return uno::Reference( +new KDE5FilePicker(QFileDialog::ExistingFile)); +} +return Qt5Instance::createFilePicker(xMSF); } uno::Reference ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit e11fcd8141b359a88be59c17fa6900a684cd4b8e Author: Michael Stahl AuthorDate: Tue Jan 29 18:39:25 2019 +0100 Commit: Thorsten Behrens CommitDate: Wed Jan 30 20:22:10 2019 +0100 vcl: fix deadlock in VclGtkClipboard::setContents() Must not call getTransferDataFlavors with m_Mutex held; 6 TransferableHelper::getTransferDataFlavors() (this=0x567b980) at svtools/source/misc/transfer.cxx:392 7 VclGtkClipboard::setContents(com::sun::star::uno::Reference const&, com::sun::star::uno::Reference const&) (this=0x3199550, xTrans=uno::Reference to (SwTransferable *) 0x567b9a8, xClipboardOwner=uno::Reference to (SwTransferable *) 0x567b9b0) at vcl/unx/gtk3_kde5/../gtk3/gtk3gtkinst.cxx:618 8 TransferableHelper::CopyToSelection(vcl::Window*) const (this=0x567b980, pWindow=0x301b0c0) at svtools/source/misc/transfer.cxx:960 CopyToSelection() uses SolarMutexReleaser, then getTransferDataFlavors() has a SolarMutexGuard; this will deadlock against the main thread that holds SolarMutex and calls VclGtkClipboard::setContents() itself, from VclGtkClipboard::OwnerPossiblyChanged(). Change-Id: Ibda0b6bce6f3388c45cee8077dd977abb3dda366 Reviewed-on: https://gerrit.libreoffice.org/67121 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 9286cebdff378a19ec146183676c6da96aac77db) Reviewed-on: https://gerrit.libreoffice.org/67152 Reviewed-by: Thorsten Behrens diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 3c1c8ece9281..32da17be9fc5 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -614,6 +614,12 @@ void VclGtkClipboard::setContents( const Reference< css::datatransfer::XTransferable >& xTrans, const Reference< css::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner ) { +css::uno::Sequence aFormats; +if (xTrans.is()) +{ +aFormats = xTrans->getTransferDataFlavors(); +} + osl::ClearableMutexGuard aGuard( m_aMutex ); Reference< datatransfer::clipboard::XClipboardOwner > xOldOwner( m_aOwner ); Reference< datatransfer::XTransferable > xOldContents( m_aContents ); @@ -632,7 +638,6 @@ void VclGtkClipboard::setContents( assert(m_aGtkTargets.empty()); if (m_aContents.is()) { -css::uno::Sequence aFormats = xTrans->getTransferDataFlavors(); std::vector aGtkTargets(m_aConversionHelper.FormatsToGtk(aFormats)); if (!aGtkTargets.empty()) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 448785475db22b8fa32ab4af2b165bb4d26e737b Author: Caolán McNamara AuthorDate: Tue Jan 29 12:43:09 2019 + Commit: Xisco Faulí CommitDate: Wed Jan 30 11:36:02 2019 +0100 tdf#123031 allow natural cell width if the combobox contents are >= request which matters in at least gtk 3.19 Change-Id: I760e46d02f2678842a685aa077bd0129520a3263 Reviewed-on: https://gerrit.libreoffice.org/67074 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index ed29dc28be65..3c1c8ece9281 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -6943,7 +6943,7 @@ public: else { g_object_set(G_OBJECT(m_pTextRenderer), "ellipsize", PANGO_ELLIPSIZE_NONE, nullptr); -gtk_cell_renderer_set_fixed_size(cell, size.width, size.height); +gtk_cell_renderer_set_fixed_size(cell, -1, size.height); } g_list_free(cells); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5SalFrame.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 7cef089465c3e0038c3e5a5606ad9b9d7dfb5acd Author: Jan-Marek Glogowski AuthorDate: Tue Jan 29 11:35:55 2019 +0100 Commit: Katarina Behrens CommitDate: Tue Jan 29 16:47:37 2019 +0100 KDE5 map QFont::stretch() == 0 to WIDTH_DONTKNOW From the Qt5 documentation: "QFont::AnyStretch / 0: Accept any stretch matched using the other QFont properties (added in Qt 5.8)". So this maps 0 to LO's WIDTH_DONTKNOW, which fixes the too narrow font selection in the KDE5 backend, when applying the KDE5 font setting to LO. Change-Id: I5f1a62d6c314c0766b540869c49c72bc3f6821c3 Reviewed-on: https://gerrit.libreoffice.org/67059 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 7cafc7962f371d8f9bcc4d1a26c507a2536df383) Reviewed-on: https://gerrit.libreoffice.org/67067 Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/unx/kde5/KDE5SalFrame.cxx b/vcl/unx/kde5/KDE5SalFrame.cxx index 9c82f6ca53b1..c4b72f3afa89 100644 --- a/vcl/unx/kde5/KDE5SalFrame.cxx +++ b/vcl/unx/kde5/KDE5SalFrame.cxx @@ -85,7 +85,9 @@ static vcl::Font toFont(const QFont& rQFont, const css::lang::Locale& rLocale) // set width int nStretch = rQFont.stretch(); -if (nStretch <= QFont::UltraCondensed) +if (nStretch == 0) // QFont::AnyStretch since Qt 5.8 +aInfo.m_eWidth = WIDTH_DONTKNOW; +else if (nStretch <= QFont::UltraCondensed) aInfo.m_eWidth = WIDTH_ULTRA_CONDENSED; else if (nStretch <= QFont::ExtraCondensed) aInfo.m_eWidth = WIDTH_EXTRA_CONDENSED; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/generic/desktopdetect/desktopdetector.cxx | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) New commits: commit 3e4478103ee1ba912d650ab447ed246f5f1cc196 Author: Michael Weghorn AuthorDate: Tue Jan 29 08:18:15 2019 +0100 Commit: Michael Weghorn CommitDate: Tue Jan 29 12:27:12 2019 +0100 tdf#123011 Detect kde5 desktop in Plasma Wayland session Both env variables 'KDE_FULL_SESSION' and 'KDE_SESSION_VERSION' are set in both X11 and Wayland sessions for Plasma 5 (kde5), s.a. https://userbase.kde.org/KDE_System_Administration/Environment_Variables, so drop the alternative X-specific check. Move the check for a kde5 upward, so that kde5 is actually detected in a Plasma 5 Wayland session, rather than falling back to assuming GNOME. Change-Id: Ieb5b47272f375ceed4d44a2ccc5b517222ae86b9 Reviewed-on: https://gerrit.libreoffice.org/67044 Reviewed-by: Tomáš Chvátal Tested-by: Tomáš Chvátal Reviewed-by: Katarina Behrens (cherry picked from commit 7eccf0b3fe771a519dbdaaf536d64b5b193a723f) Reviewed-on: https://gerrit.libreoffice.org/67051 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx index e7cb9b93e801..9f65b1624181 100644 --- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx +++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx @@ -191,16 +191,13 @@ static bool is_kde4_desktop( Display* pDisplay ) return false; } -static bool is_kde5_desktop( Display* pDisplay ) +static bool is_kde5_desktop() { static const char * pFullVersion = getenv( "KDE_FULL_SESSION" ); static const char * pSessionVersion = getenv( "KDE_SESSION_VERSION" ); if ( pFullVersion && pSessionVersion && strcmp(pSessionVersion, "5") == 0) return true; -if ( KDEVersion( pDisplay ) == 5 ) -return true; - return false; } @@ -280,6 +277,9 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment() ret = DESKTOP_LXQT; else { +if ( is_kde5_desktop() ) +return DESKTOP_KDE5; + // tdf#121275 if we still can't tell, and WAYLAND_DISPLAY // is set, default to gtk3 const char* pWaylandStr = getenv("WAYLAND_DISPLAY"); @@ -328,9 +328,7 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment() XErrorHandler pOldHdl = XSetErrorHandler( autodect_error_handler ); -if ( is_kde5_desktop( pDisplay ) ) -ret = DESKTOP_KDE5; -else if ( is_kde4_desktop( pDisplay ) ) +if ( is_kde4_desktop( pDisplay ) ) ret = DESKTOP_KDE4; else if ( is_gnome_desktop( pDisplay ) ) ret = DESKTOP_GNOME; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 94 -- 1 file changed, 40 insertions(+), 54 deletions(-) New commits: commit 9c1c1e88abcec82443eb2ba8cce4db734d86352a Author: Caolán McNamara AuthorDate: Mon Jan 28 16:28:08 2019 + Commit: Caolán McNamara CommitDate: Tue Jan 29 10:41:52 2019 +0100 Resolves: tdf#122949 gtk_style_context_save doesn't work the way I want so write something that does Change-Id: I294b9288af0ddf49cbb5a8a69b4509e1ae03d9b8 Reviewed-on: https://gerrit.libreoffice.org/67019 Tested-by: Jenkins Tested-by: Xisco Faulí Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index e31f647ae471..64c0791bba98 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -387,47 +387,37 @@ static GtkWidget* gTreeViewWidget; namespace { -void parent_styles_context_set_state(GtkStyleContext* context, GtkStateFlags flags) +void style_context_set_state(GtkStyleContext* context, GtkStateFlags flags) { -while ((context = gtk_style_context_get_parent(context))) +do { gtk_style_context_set_state(context, flags); } +while ((context = gtk_style_context_get_parent(context))); } -void parent_styles_context_save(GtkStyleContext* context) +class StyleContextSave { -while ((context = gtk_style_context_get_parent(context))) +private: +std::vector> m_aStates; +public: +void save(GtkStyleContext* context) { -gtk_style_context_save(context); +do +{ +m_aStates.emplace_back(context, gtk_style_context_get_state(context)); +} +while ((context = gtk_style_context_get_parent(context))); } -} - -void parent_styles_context_restore(GtkStyleContext* context) -{ -while ((context = gtk_style_context_get_parent(context))) +void restore() { -gtk_style_context_restore(context); +for (auto a = m_aStates.rbegin(); a != m_aStates.rend(); ++a) +{ +gtk_style_context_set_state(a->first, a->second); +} +m_aStates.clear(); } -} - -void style_context_set_state(GtkStyleContext* context, GtkStateFlags flags) -{ -gtk_style_context_set_state(context, flags); -parent_styles_context_set_state(context, flags); -} - -void style_context_save(GtkStyleContext* context) -{ -gtk_style_context_save(context); -parent_styles_context_save(context); -} - -void style_context_restore(GtkStyleContext* context) -{ -gtk_style_context_restore(context); -parent_styles_context_restore(context); -} +}; tools::Rectangle render_common(GtkStyleContext *pContext, cairo_t *cr, const tools::Rectangle , GtkStateFlags flags) { @@ -2519,7 +2509,8 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co long nWidth = rControlRegion.GetWidth(); long nHeight = rControlRegion.GetHeight(); -style_context_save(context); +StyleContextSave aContextState; +aContextState.save(context); style_context_set_state(context, flags); if (styleClass) @@ -2654,7 +2645,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co { gtk_style_context_remove_class(context, styleClass); } -style_context_restore(context); +aContextState.restore(); cairo_destroy(cr); // unref @@ -2959,7 +2950,8 @@ void GtkSalGraphics::updateSettings(AllSettings& rSettings) } GtkStyleContext* pStyle = gtk_widget_get_style_context( mpWindow ); -style_context_save(pStyle); +StyleContextSave aContextState; +aContextState.save(pStyle); GtkSettings* pSettings = gtk_widget_get_settings( mpWindow ); StyleSettings aStyleSet = rSettings.GetStyleSettings(); GdkRGBA color; @@ -2999,12 +2991,12 @@ void GtkSalGraphics::updateSettings(AllSettings& rSettings) aTextColor = getColor( text_color ); aStyleSet.SetFieldRolloverTextColor( aTextColor ); -style_context_restore(pStyle); +aContextState.restore(); // button mouse over colors { GdkRGBA normal_button_rollover_text_color, pressed_button_rollover_text_color; -style_context_save(mpButtonStyle); +aContextState.save(mpButtonStyle); style_context_set_state(mpButtonStyle, GTK_STATE_FLAG_PRELIGHT); gtk_style_context_get_color(mpButtonStyle, gtk_style_context_get_state(mpButtonStyle), _button_rollover_text_color); aTextColor = getColor(normal_button_rollover_text_color); @@ -3014,7 +3006,7 @@ void GtkSalGraphics::updateSettings(AllSettings& rSettings)
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5FilePicker2.cxx | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-) New commits: commit 360844f902cdbcbe787659628892a5a28702c66d Author: Katarina Behrens AuthorDate: Tue Jan 22 13:43:06 2019 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Jan 28 16:05:24 2019 +0100 tdf#121129: more custom listboxes in kde5 fpicker the following additional fpicker templates are now fully supported: FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE FILESAVE_AUTOEXTENSION_TEMPLATE FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR FILEOPEN_READONLY_VERSION Listboxes now also have valid mnemonic labels Change-Id: Ib7f9dd234bf2cbd0eadc1a7675ef51abcea3c532 Reviewed-on: https://gerrit.libreoffice.org/66736 Tested-by: Jenkins Reviewed-by: Thorsten Behrens Reviewed-on: https://gerrit.libreoffice.org/66759 Reviewed-by: Samuel Mehrbrodt diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 81ed9d0a8e0b..9968d1b4316d 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -434,7 +435,7 @@ void SAL_CALL KDE5FilePicker::enableControl(sal_Int16 controlId, sal_Bool enable if (_customWidgets.contains(controlId)) _customWidgets.value(controlId)->setEnabled(enable); else -SAL_WARN("vcl.kde5", "enable on unknown control" << controlId); +SAL_WARN("vcl.kde5", "enable on unknown control " << controlId); } void SAL_CALL KDE5FilePicker::setLabel(sal_Int16 controlId, const OUString& label) @@ -452,7 +453,7 @@ void SAL_CALL KDE5FilePicker::setLabel(sal_Int16 controlId, const OUString& labe cb->setText(toQString(label)); } else -SAL_WARN("vcl.kde5", "set label on unknown control" << controlId); +SAL_WARN("vcl.kde5", "set label on unknown control " << controlId); } OUString SAL_CALL KDE5FilePicker::getLabel(sal_Int16 controlId) @@ -471,7 +472,7 @@ OUString SAL_CALL KDE5FilePicker::getLabel(sal_Int16 controlId) label = toOUString(cb->text()); } else -SAL_WARN("vcl.kde5", "get label on unknown control" << controlId); +SAL_WARN("vcl.kde5", "get label on unknown control " << controlId); return label; } @@ -543,6 +544,9 @@ void KDE5FilePicker::addCustomControl(sal_Int16 controlId) break; } +auto resString = toQString(VclResId(resId)); +resString.replace('~', '&'); + switch (controlId) { case CHECKBOX_AUTOEXTENSION: @@ -557,8 +561,6 @@ void KDE5FilePicker::addCustomControl(sal_Int16 controlId) // the checkbox is created even for CHECKBOX_AUTOEXTENSION to simplify // code, but the checkbox is hidden and ignored bool hidden = controlId == CHECKBOX_AUTOEXTENSION; -auto resString = toQString(VclResId(resId)); -resString.replace('~', '&'); auto widget = new QCheckBox(resString, _extraControls); widget->setHidden(hidden); @@ -571,9 +573,6 @@ void KDE5FilePicker::addCustomControl(sal_Int16 controlId) break; } case PUSHBUTTON_PLAY: -case LISTBOX_VERSION: -case LISTBOX_TEMPLATE: -case LISTBOX_IMAGE_ANCHOR: case LISTBOX_VERSION_LABEL: case LISTBOX_TEMPLATE_LABEL: case LISTBOX_IMAGE_TEMPLATE_LABEL: @@ -581,11 +580,22 @@ void KDE5FilePicker::addCustomControl(sal_Int16 controlId) case LISTBOX_FILTER_SELECTOR: break; +case LISTBOX_IMAGE_ANCHOR: case LISTBOX_IMAGE_TEMPLATE: +case LISTBOX_TEMPLATE: +case LISTBOX_VERSION: +{ auto widget = new QComboBox(_extraControls); -_layout->addWidget(widget); +QLabel* label = new QLabel(resString); +label->setBuddy(widget); + +QHBoxLayout* hBox = new QHBoxLayout; +hBox->addWidget(label); +hBox->addWidget(widget); +_layout->addLayout(hBox, _layout->rowCount(), 0, Qt::AlignLeft); _customListboxes.insert(controlId, widget); break; +} } } @@ -620,7 +630,7 @@ void KDE5FilePicker::handleSetListValue(QComboBox* pQComboBox, sal_Int16 nAction } break; default: -//FIXME: insert warning here +SAL_WARN("vcl.kde5", "unknown action on list control " << nAction); break; } } @@ -654,7 +664,7 @@ uno::Any KDE5FilePicker::handleGetListValue(QComboBox* pQComboBox, sal_Int16 nAc } break; default: -//FIXME: insert warning here +SAL_WARN("vcl.kde5", "unknown action on list control " << nAction); break; } return aAny; ___ Libreoffice-commits mailing list
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/kde5/KDE5FilePicker.hxx |4 + vcl/unx/kde5/KDE5FilePicker2.cxx | 91 ++- 2 files changed, 94 insertions(+), 1 deletion(-) New commits: commit c41adbca85969efd8442abf3b593118e1256efb6 Author: Katarina Behrens AuthorDate: Mon Jan 21 22:12:15 2019 +0100 Commit: Samuel Mehrbrodt CommitDate: Mon Jan 28 16:05:09 2019 +0100 tdf#121129: custom listboxes in kde5 fpicker, first stab for FILESAVE_AUTOEXTENSION_TEMPLATE only so far (e.g. menu Insert > Image) Change-Id: I5674025788ce9bab4094f717e2b940e7cd6891e3 Reviewed-on: https://gerrit.libreoffice.org/66705 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit 2d33c7cb4b4835de77194650124a1cf046920f66) Reviewed-on: https://gerrit.libreoffice.org/66758 Reviewed-by: Samuel Mehrbrodt diff --git a/vcl/unx/kde5/KDE5FilePicker.hxx b/vcl/unx/kde5/KDE5FilePicker.hxx index 8179170e831d..b3293b32a1b7 100644 --- a/vcl/unx/kde5/KDE5FilePicker.hxx +++ b/vcl/unx/kde5/KDE5FilePicker.hxx @@ -43,6 +43,7 @@ class QFileDialog; class QGridLayout; class QWidget; +class QComboBox; typedef ::cppu::WeakComponentImplHelper _customWidgets; +QHash _customListboxes; //widget to contain extra custom controls QWidget* _extraControls; @@ -157,6 +159,8 @@ public: private: //add a custom control widget to the file dialog void addCustomControl(sal_Int16 controlId); +void handleSetListValue(QComboBox* pQComboBox, sal_Int16 nAction, const css::uno::Any& rValue); +css::uno::Any handleGetListValue(QComboBox* pQComboBox, sal_Int16 nAction); OUString implGetDirectory(); // emit XFilePickerListener controlStateChanged event diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index 553ed8500c84..81ed9d0a8e0b 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -377,6 +378,12 @@ void SAL_CALL KDE5FilePicker::setValue(sal_Int16 controlId, sal_Int16 nControlAc if (cb) cb->setChecked(bChecked); } +else if (_customListboxes.contains(controlId)) +{ +QComboBox* cb = dynamic_cast(_customListboxes.value(controlId)); +if (cb) +handleSetListValue(cb, nControlAction, value); +} else SAL_WARN("vcl.kde5", "set value on unknown control " << controlId); } @@ -404,6 +411,12 @@ uno::Any SAL_CALL KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 nContr if (cb) value = cb->isChecked(); } +else if (_customListboxes.contains(controlId)) +{ +QComboBox* cb = dynamic_cast(_customListboxes.value(controlId)); +if (cb) +return handleGetListValue(cb, nControlAction); +} else SAL_WARN("vcl.kde5", "get value on unknown control" << controlId); @@ -560,7 +573,6 @@ void KDE5FilePicker::addCustomControl(sal_Int16 controlId) case PUSHBUTTON_PLAY: case LISTBOX_VERSION: case LISTBOX_TEMPLATE: -case LISTBOX_IMAGE_TEMPLATE: case LISTBOX_IMAGE_ANCHOR: case LISTBOX_VERSION_LABEL: case LISTBOX_TEMPLATE_LABEL: @@ -568,7 +580,84 @@ void KDE5FilePicker::addCustomControl(sal_Int16 controlId) case LISTBOX_IMAGE_ANCHOR_LABEL: case LISTBOX_FILTER_SELECTOR: break; + +case LISTBOX_IMAGE_TEMPLATE: +auto widget = new QComboBox(_extraControls); +_layout->addWidget(widget); +_customListboxes.insert(controlId, widget); +break; +} +} + +void KDE5FilePicker::handleSetListValue(QComboBox* pQComboBox, sal_Int16 nAction, +const css::uno::Any& rValue) +{ +switch (nAction) +{ +case ControlActions::ADD_ITEM: +{ +OUString sItem; +rValue >>= sItem; +pQComboBox->addItem(toQString(sItem)); +} +break; +case ControlActions::ADD_ITEMS: +{ +Sequence aStringList; +rValue >>= aStringList; +sal_Int32 nItemCount = aStringList.getLength(); +for (sal_Int32 i = 0; i < nItemCount; ++i) +{ +pQComboBox->addItem(toQString(aStringList[i])); +} +} +break; +case ControlActions::SET_SELECT_ITEM: +{ +sal_Int32 nPos = 0; +rValue >>= nPos; +pQComboBox->setCurrentIndex(nPos); +} +break; +default: +//FIXME: insert warning here +break; +} +} + +uno::Any KDE5FilePicker::handleGetListValue(QComboBox* pQComboBox, sal_Int16 nAction) +{ +uno::Any aAny; +switch (nAction) +{ +case ControlActions::GET_ITEMS: +{ +uno::Sequence aItemList; + +for (int i =
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk/gtksalmenu.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 1d64946c073f5a244fd115ec1dfb3dcb09c9313d Author: Julien Nabet AuthorDate: Sun Jan 27 15:37:43 2019 +0100 Commit: Caolán McNamara CommitDate: Mon Jan 28 09:53:04 2019 +0100 tdf#122990: return if no mpMenuBarContainerWidget in ApplyPersona Related to patches for tdf#122241 Change-Id: I0ce46a3a362855aaa6c11f375d20c2212f1cb20b Reviewed-on: https://gerrit.libreoffice.org/66976 Tested-by: Xisco Faulí Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx index 538cb0aa680d..27ba8096bce8 100644 --- a/vcl/unx/gtk/gtksalmenu.cxx +++ b/vcl/unx/gtk/gtksalmenu.cxx @@ -859,6 +859,8 @@ void GtkSalMenu::CreateMenuBarWidget() void GtkSalMenu::ApplyPersona() { #if GTK_CHECK_VERSION(3,0,0) +if (!mpMenuBarContainerWidget) +return; assert(mbMenuBar); // I'm dubious about the persona theming feature, but as it exists, lets try and support // it, apply the image to the mpMenuBarContainerWidget ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 20 1 file changed, 20 insertions(+) New commits: commit cf185ecb5a3cd2f71a5fdf9960a05c521e489521 Author: Caolán McNamara AuthorDate: Thu Jan 24 14:31:08 2019 + Commit: Miklos Vajna CommitDate: Fri Jan 25 09:32:57 2019 +0100 Resolves: tdf#122931 crash on closing b dialog after gallery menu activated Change-Id: I3284edc2ed64895642bd12ea479a1aba8023b2ba Reviewed-on: https://gerrit.libreoffice.org/66883 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index bdfee6ede884..ed29dc28be65 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1823,6 +1823,15 @@ public: g_signal_connect(pMenuItem, "activate", G_CALLBACK(signalActivate), this); } +void remove_from_map(GtkMenuItem* pMenuItem) +{ +const gchar* pStr = gtk_buildable_get_name(GTK_BUILDABLE(pMenuItem)); +OString id(pStr, pStr ? strlen(pStr) : 0); +auto iter = m_aMap.find(id); +g_signal_handlers_disconnect_by_data(iter->second, this); +m_aMap.erase(iter); +} + void disable_item_notify_events() { for (auto& a : m_aMap) @@ -4133,6 +4142,7 @@ public: class GtkInstanceMenu : public MenuHelper, public virtual weld::Menu { protected: +std::vector m_aExtraItems; OString m_sActivated; GtkInstanceMenuButton* m_pTopLevelMenuButton; @@ -4291,12 +4301,22 @@ public: gtk_menu_shell_append(GTK_MENU_SHELL(m_pMenu), pItem); gtk_widget_show(pItem); GtkMenuItem* pMenuItem = GTK_MENU_ITEM(pItem); +m_aExtraItems.push_back(pMenuItem); add_to_map(pMenuItem); if (m_pTopLevelMenuButton) m_pTopLevelMenuButton->add_to_map(pMenuItem); if (pos != -1) gtk_menu_reorder_child(m_pMenu, pItem, pos); } + +virtual ~GtkInstanceMenu() override +{ +if (m_pTopLevelMenuButton) +{ +for (auto a : m_aExtraItems) +m_pTopLevelMenuButton->remove_from_map(a); +} +} }; class GtkInstanceRadioButton : public GtkInstanceToggleButton, public virtual weld::RadioButton ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 55 ++ 1 file changed, 55 insertions(+) New commits: commit c7d36095c8e7205d9b9ef3e43728c36f027b457c Author: Caolán McNamara AuthorDate: Thu Jan 24 09:14:59 2019 + Commit: Miklos Vajna CommitDate: Fri Jan 25 09:30:24 2019 +0100 Resolves: tdf#122662 restore context after changing state otherwise we may change a context which get reused by gtk for rendering something we don't ourselves draw directly Change-Id: I814140cd63489f7e4fac47a7486a006a4aa1fac5 Reviewed-on: https://gerrit.libreoffice.org/66848 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 769cba86243d..e31f647ae471 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -395,12 +395,40 @@ namespace } } +void parent_styles_context_save(GtkStyleContext* context) +{ +while ((context = gtk_style_context_get_parent(context))) +{ +gtk_style_context_save(context); +} +} + +void parent_styles_context_restore(GtkStyleContext* context) +{ +while ((context = gtk_style_context_get_parent(context))) +{ +gtk_style_context_restore(context); +} +} + void style_context_set_state(GtkStyleContext* context, GtkStateFlags flags) { gtk_style_context_set_state(context, flags); parent_styles_context_set_state(context, flags); } +void style_context_save(GtkStyleContext* context) +{ +gtk_style_context_save(context); +parent_styles_context_save(context); +} + +void style_context_restore(GtkStyleContext* context) +{ +gtk_style_context_restore(context); +parent_styles_context_restore(context); +} + tools::Rectangle render_common(GtkStyleContext *pContext, cairo_t *cr, const tools::Rectangle , GtkStateFlags flags) { if (!pContext) @@ -2491,6 +2519,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co long nWidth = rControlRegion.GetWidth(); long nHeight = rControlRegion.GetHeight(); +style_context_save(context); style_context_set_state(context, flags); if (styleClass) @@ -2625,6 +2654,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co { gtk_style_context_remove_class(context, styleClass); } +style_context_restore(context); cairo_destroy(cr); // unref @@ -2929,6 +2959,7 @@ void GtkSalGraphics::updateSettings(AllSettings& rSettings) } GtkStyleContext* pStyle = gtk_widget_get_style_context( mpWindow ); +style_context_save(pStyle); GtkSettings* pSettings = gtk_widget_get_settings( mpWindow ); StyleSettings aStyleSet = rSettings.GetStyleSettings(); GdkRGBA color; @@ -2968,9 +2999,12 @@ void GtkSalGraphics::updateSettings(AllSettings& rSettings) aTextColor = getColor( text_color ); aStyleSet.SetFieldRolloverTextColor( aTextColor ); +style_context_restore(pStyle); + // button mouse over colors { GdkRGBA normal_button_rollover_text_color, pressed_button_rollover_text_color; +style_context_save(mpButtonStyle); style_context_set_state(mpButtonStyle, GTK_STATE_FLAG_PRELIGHT); gtk_style_context_get_color(mpButtonStyle, gtk_style_context_get_state(mpButtonStyle), _button_rollover_text_color); aTextColor = getColor(normal_button_rollover_text_color); @@ -2980,6 +3014,7 @@ void GtkSalGraphics::updateSettings(AllSettings& rSettings) aTextColor = getColor(pressed_button_rollover_text_color); style_context_set_state(mpButtonStyle, GTK_STATE_FLAG_NORMAL); aStyleSet.SetButtonPressedRolloverTextColor( aTextColor ); +style_context_restore(mpButtonStyle); } // tooltip colors @@ -3064,6 +3099,11 @@ void GtkSalGraphics::updateSettings(AllSettings& rSettings) aStyleSet.SetSkipDisabledInMenus( true ); aStyleSet.SetPreferredContextMenuShortcuts( false ); +style_context_save(mpMenuStyle); +style_context_save(mpMenuBarStyle); +style_context_save(mpMenuBarItemStyle); +style_context_save(mpMenuItemLabelStyle); + // menu colors style_context_set_state(mpMenuStyle, GTK_STATE_FLAG_NORMAL); gtk_style_context_get_background_color( mpMenuStyle, gtk_style_context_get_state(mpMenuStyle), _color ); @@ -3103,47 +3143,62 @@ void GtkSalGraphics::updateSettings(AllSettings& rSettings) ::Color aHighlightTextColor = getColor( color ); aStyleSet.SetMenuHighlightTextColor( aHighlightTextColor ); +style_context_restore(mpMenuItemLabelStyle); +style_context_restore(mpMenuBarItemStyle); +style_context_restore(mpMenuBarStyle); +style_context_restore(mpMenuStyle); + // hyperlink
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk/a11y/atklistener.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 58f375eba11ba0c49d7da5866fd6a818439903c9 Author: Caolán McNamara AuthorDate: Wed Jan 9 15:41:56 2019 + Commit: Miklos Vajna CommitDate: Fri Jan 25 09:29:25 2019 +0100 Resolves: tdf#122353 silence useless selection-changed event attempts Change-Id: Ie84fb12e6561d93832159779d233102a34b1c78c Reviewed-on: https://gerrit.libreoffice.org/66044 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx index bba1a3a09d53..61df38a27beb 100644 --- a/vcl/unx/gtk/a11y/atklistener.cxx +++ b/vcl/unx/gtk/a11y/atklistener.cxx @@ -701,7 +701,13 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven case accessibility::AccessibleEventId::SELECTION_CHANGED_ADD: case accessibility::AccessibleEventId::SELECTION_CHANGED_REMOVE: case accessibility::AccessibleEventId::SELECTION_CHANGED_WITHIN: -g_signal_emit_by_name( G_OBJECT( atk_obj ), "selection_changed"); +if (ATK_IS_SELECTION(atk_obj)) +g_signal_emit_by_name(G_OBJECT(atk_obj), "selection_changed"); +else +{ +// e.g. tdf#122353, when such dialogs become native the problem will go away anyway +SAL_INFO("vcl.gtk", "selection change from obj which doesn't support XAccessibleSelection"); +} break; case accessibility::AccessibleEventId::HYPERTEXT_CHANGED: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) New commits: commit a7037b4651a10a220eeae8d9e97dc6b97e506cc5 Author: Caolán McNamara AuthorDate: Thu Jan 17 17:31:16 2019 + Commit: Miklos Vajna CommitDate: Fri Jan 25 09:25:08 2019 +0100 Related: tdf#122786 update value when spinbutton text explicitly set Change-Id: Idb6fefe08dc7cbf4d0b73485e0b1471fe0494364 Reviewed-on: https://gerrit.libreoffice.org/66604 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 08fc49de25e5..bdfee6ede884 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -5710,6 +5710,8 @@ private: gulong m_nValueChangedSignalId; gulong m_nOutputSignalId; gulong m_nInputSignalId; +bool m_bFormatting; +bool m_bBlockOutput; static void signalValueChanged(GtkSpinButton*, gpointer widget) { @@ -5718,11 +5720,21 @@ private: pThis->signal_value_changed(); } +bool guarded_signal_output() +{ +if (m_bBlockOutput) +return true; +m_bFormatting = true; +bool bRet = signal_output(); +m_bFormatting = false; +return bRet; +} + static gboolean signalOutput(GtkSpinButton*, gpointer widget) { GtkInstanceSpinButton* pThis = static_cast(widget); SolarMutexGuard aGuard; -return pThis->signal_output(); +return pThis->guarded_signal_output(); } static gint signalInput(GtkSpinButton*, gdouble* new_value, gpointer widget) @@ -5758,6 +5770,8 @@ public: , m_nValueChangedSignalId(g_signal_connect(pButton, "value-changed", G_CALLBACK(signalValueChanged), this)) , m_nOutputSignalId(g_signal_connect(pButton, "output", G_CALLBACK(signalOutput), this)) , m_nInputSignalId(g_signal_connect(pButton, "input", G_CALLBACK(signalInput), this)) +, m_bFormatting(false) +, m_bBlockOutput(false) { } @@ -5773,6 +5787,22 @@ public: enable_notify_events(); } +virtual void set_text(const OUString& rText) override +{ +disable_notify_events(); +gtk_entry_set_text(GTK_ENTRY(m_pButton), OUStringToOString(rText, RTL_TEXTENCODING_UTF8).getStr()); +// tdf#122786 if we're just formatting a value, then we're done, +// however if set_text has been called directly we want to update our +// value from this new text, but don't want to reformat with that value +if (!m_bFormatting) +{ +m_bBlockOutput = true; +gtk_spin_button_update(m_pButton); +m_bBlockOutput = false; +} +enable_notify_events(); +} + virtual void set_range(int min, int max) override { disable_notify_events(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 59 +++ 1 file changed, 59 insertions(+) New commits: commit f929a7e9e854ede215a72d3d84ca74cae156e1aa Author: Caolán McNamara AuthorDate: Thu Jan 17 12:28:55 2019 + Commit: Miklos Vajna CommitDate: Fri Jan 25 09:22:38 2019 +0100 tdf#122393 move to overflow row on using left/right at end of other row and on ctrl+page_up/ctrl+page_down Change-Id: I3320abfb91655b7b4278886cc6fc4dceb637e4b1 Reviewed-on: https://gerrit.libreoffice.org/66527 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index fe74ae76bdb3..08fc49de25e5 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3002,6 +3002,8 @@ private: gulong m_nSwitchPageSignalId; gulong m_nOverFlowSwitchPageSignalId; gulong m_nSizeAllocateSignalId; +gulong m_nFocusSignalId; +gulong m_nChangeCurrentPageId; guint m_nLaunchSplitTimeoutId; bool m_bOverFlowBoxActive; bool m_bOverFlowBoxIsStart; @@ -3365,6 +3367,55 @@ private: pThis->signal_notebook_size_allocate(); } +bool signal_focus(GtkDirectionType direction) +{ +if (!m_bOverFlowBoxActive) +return false; + +int nPage = gtk_notebook_get_current_page(m_pNotebook); +if (direction == GTK_DIR_LEFT && nPage == 0) +{ +auto nOverFlowLen = gtk_notebook_get_n_pages(m_pOverFlowNotebook) - 1; +gtk_notebook_set_current_page(m_pOverFlowNotebook, nOverFlowLen - 1); +return true; +} +else if (direction == GTK_DIR_RIGHT && nPage == gtk_notebook_get_n_pages(m_pNotebook) - 1) +{ +gtk_notebook_set_current_page(m_pOverFlowNotebook, 0); +return true; +} + +return false; +} + +static gboolean signalFocus(GtkNotebook* notebook, GtkDirectionType direction, gpointer widget) +{ +// if the notebook widget itself has focus +if (gtk_widget_is_focus(GTK_WIDGET(notebook))) +{ +GtkInstanceNotebook* pThis = static_cast(widget); +return pThis->signal_focus(direction); +} +return false; +} + +// ctrl + page_up/ page_down +bool signal_change_current_page(gint arg1) +{ +bool bHandled = signal_focus(arg1 < 0 ? GTK_DIR_LEFT : GTK_DIR_RIGHT); +if (bHandled) +g_signal_stop_emission_by_name(m_pNotebook, "change-current-page"); +return false; +} + +static gboolean signalChangeCurrentPage(GtkNotebook*, gint arg1, gpointer widget) +{ +if (arg1 == 0) +return true; +GtkInstanceNotebook* pThis = static_cast(widget); +return pThis->signal_change_current_page(arg1); +} + public: GtkInstanceNotebook(GtkNotebook* pNotebook, bool bTakeOwnership) : GtkInstanceContainer(GTK_CONTAINER(pNotebook), bTakeOwnership) @@ -3373,6 +3424,8 @@ public: , m_pOverFlowNotebook(GTK_NOTEBOOK(gtk_notebook_new())) , m_nSwitchPageSignalId(g_signal_connect(pNotebook, "switch-page", G_CALLBACK(signalSwitchPage), this)) , m_nOverFlowSwitchPageSignalId(g_signal_connect(m_pOverFlowNotebook, "switch-page", G_CALLBACK(signalOverFlowSwitchPage), this)) +, m_nFocusSignalId(g_signal_connect(pNotebook, "focus", G_CALLBACK(signalFocus), this)) +, m_nChangeCurrentPageId(g_signal_connect(pNotebook, "change-current-page", G_CALLBACK(signalChangeCurrentPage), this)) , m_nLaunchSplitTimeoutId(0) , m_bOverFlowBoxActive(false) , m_bOverFlowBoxIsStart(false) @@ -3508,6 +3561,8 @@ public: virtual void disable_notify_events() override { g_signal_handler_block(m_pNotebook, m_nSwitchPageSignalId); +g_signal_handler_block(m_pNotebook, m_nFocusSignalId); +g_signal_handler_block(m_pNotebook, m_nChangeCurrentPageId); g_signal_handler_block(m_pOverFlowNotebook, m_nOverFlowSwitchPageSignalId); gtk_widget_freeze_child_notify(GTK_WIDGET(m_pOverFlowNotebook)); GtkInstanceContainer::disable_notify_events(); @@ -3519,6 +3574,8 @@ public: gtk_widget_thaw_child_notify(GTK_WIDGET(m_pOverFlowNotebook)); g_signal_handler_unblock(m_pOverFlowNotebook, m_nOverFlowSwitchPageSignalId); g_signal_handler_unblock(m_pNotebook, m_nSwitchPageSignalId); +g_signal_handler_unblock(m_pNotebook, m_nFocusSignalId); +g_signal_handler_unblock(m_pNotebook, m_nChangeCurrentPageId); } void reset_split_data() @@ -3560,6 +3617,8 @@ public: if (m_nSizeAllocateSignalId) g_signal_handler_disconnect(m_pNotebook, m_nSizeAllocateSignalId); g_signal_handler_disconnect(m_pNotebook, m_nSwitchPageSignalId); +g_signal_handler_disconnect(m_pNotebook, m_nFocusSignalId); +
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 564c0addb3594a2221228f616374f64d1822ab41 Author: Caolán McNamara AuthorDate: Mon Jan 14 15:55:12 2019 + Commit: Miklos Vajna CommitDate: Fri Jan 25 09:19:53 2019 +0100 SolarMutexGuard needed here assert seen in dbgutil Change-Id: I09cab9e4fa4ce81d71518d87c4a571a467ead52d Reviewed-on: https://gerrit.libreoffice.org/66327 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 167a10d1fe17..fe74ae76bdb3 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3018,6 +3018,7 @@ private: static gboolean launch_overflow_switch_page(GtkInstanceNotebook* pThis) { +SolarMutexGuard aGuard; pThis->signal_overflow_switch_page(); return false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) New commits: commit 2e0f991f2eb57c0c25f32f759853195f9764a529 Author: Caolán McNamara AuthorDate: Wed Jan 16 12:36:25 2019 + Commit: Caolán McNamara CommitDate: Thu Jan 17 13:41:22 2019 +0100 Resolves: tdf#122623 theme unwanted tab into invisibility its nigh impossible to have a GtkNotebook without an active tab, so try and theme it into invisibility with no width Change-Id: I312b81ae51abe9fdd222fb5d5c45cb41603b80cb Reviewed-on: https://gerrit.libreoffice.org/66471 Tested-by: Jenkins Tested-by: Xisco Faulí Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 4ea6de898734..83794ade2efd 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3153,7 +3153,7 @@ private: { disable_notify_events(); -GtkWidget *pTabWidget = gtk_image_new_from_icon_name("pan-down-symbolic", GTK_ICON_SIZE_BUTTON); +GtkWidget *pTabWidget = gtk_fixed_new(); gtk_buildable_set_name(GTK_BUILDABLE(pTabWidget), "useless"); GtkWidget *pChild = gtk_grid_new(); @@ -3383,6 +3383,16 @@ public: else m_nSizeAllocateSignalId = 0; gtk_notebook_set_show_border(m_pOverFlowNotebook, false); + +// tdf#122623 it's nigh impossible to have a GtkNotebook without an active (checked) tab, so try and theme +// the unwanted tab into invisibility +GtkStyleContext *pNotebookContext = gtk_widget_get_style_context(GTK_WIDGET(m_pOverFlowNotebook)); +GtkCssProvider *pProvider = gtk_css_provider_new(); +static const gchar data[] = "header.top > tabs > tab:checked { box-shadow: none; padding: 0 0 0 0; margin: 0 0 0 0; border-image: none; border-image-width: 0 0 0 0; background-image: none; background-color: transparent; border-radius: 0 0 0 0; border-width: 0 0 0 0; border-style: none; border-color: transparent; opacity: 0; min-height: 0; min-width: 0; }"; +static const gchar olddata[] = "tab.top:active { box-shadow: none; padding: 0 0 0 0; margin: 0 0 0 0; border-image: none; border-image-width: 0 0 0 0; background-image: none; background-color: transparent; border-radius: 0 0 0 0; border-width: 0 0 0 0; border-style: none; border-color: transparent; opacity: 0; }"; +gtk_css_provider_load_from_data(pProvider, gtk_check_version(3, 20, 0) == nullptr ? data : olddata, -1, nullptr); +gtk_style_context_add_provider(pNotebookContext, GTK_STYLE_PROVIDER(pProvider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); } virtual int get_current_page() const override ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 0adfe48768fd89f7e94836406a6fcb7f96e89967 Author: Caolán McNamara AuthorDate: Wed Jan 9 12:14:23 2019 + Commit: Caolán McNamara CommitDate: Thu Jan 10 09:55:42 2019 +0100 Resolves: crash in double-split when first timeout hadn't expired yet Change-Id: Ieba97589a3794cf5ed95839e20cc4028cfedae3a Reviewed-on: https://gerrit.libreoffice.org/66019 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index acac7e064fe1..0165b664 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3001,6 +3001,7 @@ private: gulong m_nSwitchPageSignalId; gulong m_nOverFlowSwitchPageSignalId; gulong m_nSizeAllocateSignalId; +guint m_nLaunchSplitTimeoutId; bool m_bOverFlowBoxActive; bool m_bOverFlowBoxIsStart; int m_nStartTabCount; @@ -3326,6 +3327,7 @@ private: int nCurrentPage = pThis->get_current_page(); pThis->split_notebooks(); pThis->set_current_page(nCurrentPage); +pThis->m_nLaunchSplitTimeoutId = 0; return false; } @@ -3336,7 +3338,7 @@ private: // tabs in a single row when they would fit void signal_notebook_size_allocate() { -if (m_bOverFlowBoxActive) +if (m_bOverFlowBoxActive || m_nLaunchSplitTimeoutId) return; disable_notify_events(); gint nPages = gtk_notebook_get_n_pages(m_pNotebook); @@ -3347,7 +3349,7 @@ private: GtkWidget* pTabWidget = gtk_notebook_get_tab_label(m_pNotebook, gtk_notebook_get_nth_page(m_pNotebook, i)); if (!gtk_widget_get_child_visible(pTabWidget)) { -g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast(launch_split_notebooks), this, nullptr); +m_nLaunchSplitTimeoutId = g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast(launch_split_notebooks), this, nullptr); break; } } @@ -3369,6 +3371,7 @@ public: , m_pOverFlowNotebook(GTK_NOTEBOOK(gtk_notebook_new())) , m_nSwitchPageSignalId(g_signal_connect(pNotebook, "switch-page", G_CALLBACK(signalSwitchPage), this)) , m_nOverFlowSwitchPageSignalId(g_signal_connect(m_pOverFlowNotebook, "switch-page", G_CALLBACK(signalOverFlowSwitchPage), this)) +, m_nLaunchSplitTimeoutId(0) , m_bOverFlowBoxActive(false) , m_bOverFlowBoxIsStart(false) , m_nStartTabCount(0) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 62 ++- 1 file changed, 38 insertions(+), 24 deletions(-) New commits: commit 1324a878d6821c380c39c311fcded5976174d5fd Author: Caolán McNamara AuthorDate: Wed Jan 9 11:34:45 2019 + Commit: Caolán McNamara CommitDate: Thu Jan 10 09:54:49 2019 +0100 Related: tdf#122527 gtk < 3.20 and gtk_image_new_from_surface seems to be a problem Change-Id: I2aac780a44ce392372af9f688cde594d67fea3df Reviewed-on: https://gerrit.libreoffice.org/66052 Tested-by: Xisco Faulí Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 763fd1efe368..acac7e064fe1 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1744,6 +1744,35 @@ namespace cairo_surface_get_device_scale(surface, _fXScale, _fYScale); return gdk_pixbuf_get_from_surface(surface, 0, 0, aSize.Width() * m_fXScale, aSize.Height() * m_fYScale); } + +GtkWidget* image_new_from_virtual_device(VirtualDevice& rImageSurface) +{ +GtkWidget* pImage = nullptr; +if (gtk_check_version(3, 20, 0) == nullptr) +{ +cairo_surface_t* surface = get_underlying_cairo_surface(rImageSurface); + +Size aSize(rImageSurface.GetOutputSizePixel()); +cairo_surface_t* target = cairo_surface_create_similar(surface, + cairo_surface_get_content(surface), + aSize.Width(), + aSize.Height()); + +cairo_t* cr = cairo_create(target); +cairo_set_source_surface(cr, surface, 0, 0); +cairo_paint(cr); +cairo_destroy(cr); +pImage = gtk_image_new_from_surface(target); +cairo_surface_destroy(target); +} +else +{ +GdkPixbuf* pixbuf = load_icon_from_surface(rImageSurface); +pImage = gtk_image_new_from_pixbuf(pixbuf); +g_object_unref(pixbuf); +} +return pImage; +} } class MenuHelper @@ -1806,7 +1835,7 @@ public: } void insert_item(int pos, const OUString& rId, const OUString& rStr, - const OUString* pIconName, VirtualDevice* pImageSufface, + const OUString* pIconName, VirtualDevice* pImageSurface, bool bCheck) { GtkWidget* pImage = nullptr; @@ -1819,8 +1848,8 @@ public: g_object_unref(pixbuf); } } -else if (pImageSufface) -pImage = gtk_image_new_from_surface(get_underlying_cairo_surface(*pImageSufface)); +else if (pImageSurface) +pImage = image_new_from_virtual_device(*pImageSurface); GtkWidget *pItem; if (pImage) @@ -3555,7 +3584,7 @@ public: gtk_button_set_always_show_image(m_pButton, true); gtk_button_set_image_position(m_pButton, GTK_POS_LEFT); if (pDevice) -gtk_button_set_image(m_pButton, gtk_image_new_from_surface(get_underlying_cairo_surface(*pDevice))); +gtk_button_set_image(m_pButton, image_new_from_virtual_device(*pDevice)); else gtk_button_set_image(m_pButton, nullptr); } @@ -3944,9 +3973,9 @@ public: } virtual void insert_item(int pos, const OUString& rId, const OUString& rStr, -const OUString* pIconName, VirtualDevice* pImageSufface, bool bCheck) override +const OUString* pIconName, VirtualDevice* pImageSurface, bool bCheck) override { -MenuHelper::insert_item(pos, rId, rStr, pIconName, pImageSufface, bCheck); +MenuHelper::insert_item(pos, rId, rStr, pIconName, pImageSurface, bCheck); } virtual void set_item_active(const OString& rIdent, bool bActive) override @@ -4150,7 +4179,7 @@ public: } virtual void insert(int pos, const OUString& rId, const OUString& rStr, -const OUString* pIconName, VirtualDevice* pImageSufface, +const OUString* pIconName, VirtualDevice* pImageSurface, bool bCheck) override { GtkWidget* pImage = nullptr; @@ -4163,24 +4192,9 @@ public: g_object_unref(pixbuf); } } -else if (pImageSufface) +else if (pImageSurface) { -cairo_surface_t* surface = get_underlying_cairo_surface(*pImageSufface); - -Size aSize(pImageSufface->GetOutputSizePixel()); -cairo_surface_t* target = cairo_surface_create_similar(surface, - cairo_surface_get_content(surface), -
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/generic/printer/cpdmgr.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 773e4896521ccf29ab040f977a3faaadd805c8d8 Author: Michael Weghorn AuthorDate: Sun Dec 23 00:59:55 2018 +0100 Commit: Michael Weghorn CommitDate: Thu Dec 27 23:29:30 2018 +0100 tdf#122116 Only create CPDManager if D-Bus descriptions present Since the XML files are required in the 'onNameAcquired()' method, check for their existence before returning a CPDManager pointer in 'tryLoadCPD()', to avoid returning a CPDManager that is unusable (and will even lead to a crash). Change-Id: I83c493ba8bd775ea398111971cbecb9352050194 Reviewed-on: https://gerrit.libreoffice.org/65576 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 87d90b6e60659e9c976daa9692ae99ec87a6978c) Reviewed-on: https://gerrit.libreoffice.org/65634 diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx index aedcd5b42543..c9908ae27204 100644 --- a/vcl/unx/generic/printer/cpdmgr.cxx +++ b/vcl/unx/generic/printer/cpdmgr.cxx @@ -250,6 +250,12 @@ CPDManager* CPDManager::tryLoadCPD() static const char* pEnv = getenv("SAL_DISABLE_CPD"); if (!pEnv || !*pEnv) { +// interface description XML files are needed in 'onNameAcquired()' +if (!g_file_test(FRONTEND_INTERFACE, G_FILE_TEST_IS_REGULAR) || +!g_file_test(BACKEND_INTERFACE, G_FILE_TEST_IS_REGULAR)) { +return nullptr; +} + GDir *dir; const gchar *filename; dir = g_dir_open(BACKEND_DIR, 0, nullptr); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk/gtksalmenu.cxx | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) New commits: commit ade817012f88f098ae633538697b9d14962d697c Author: Caolán McNamara AuthorDate: Wed Dec 19 16:23:06 2018 + Commit: Christian Lohmaier CommitDate: Thu Dec 20 00:12:56 2018 +0100 Resolves: tdf#121555 sometime crash on menu hierarchy change seems menubar gets set to dirty due to some menu activity that needs a refresh, but then the hierarchy changes and as its already dirty the maUpdateMenuBarIdle doesn't get launched the placement of the mbMenuBar test inside the loop through parents shows some confusion as to what which mbMenuBar might be met, the one belonging to this, or that of the parent being traversed, but it does seem to be the one belonging to this. Change-Id: I0b9dceadf64f7adf18eb1aa2dbda9bbfbcb66e0a Reviewed-on: https://gerrit.libreoffice.org/65462 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx index f6f45cf4acad..8329c376eda7 100644 --- a/vcl/unx/gtk/gtksalmenu.cxx +++ b/vcl/unx/gtk/gtksalmenu.cxx @@ -226,8 +226,12 @@ void GtkSalMenu::ImplUpdate(bool bRecurse, bool bRemoveDisabledEntries) if (mbNeedsUpdate) { mbNeedsUpdate = false; -if (mbMenuBar) +if (mbMenuBar && maUpdateMenuBarIdle.IsActive()) +{ maUpdateMenuBarIdle.Stop(); +maUpdateMenuBarIdle.Invoke(); +return; +} } Menu* pVCLMenu = mpVCLMenu; @@ -556,13 +560,17 @@ IMPL_LINK_NOARG(GtkSalMenu, MenuBarHierarchyChangeHandler, Timer *, void) void GtkSalMenu::SetNeedsUpdate() { GtkSalMenu* pMenu = this; +// start that the menu and its parents are in need of an update +// on the next activation while (pMenu && !pMenu->mbNeedsUpdate) { pMenu->mbNeedsUpdate = true; -if (mbMenuBar) -maUpdateMenuBarIdle.Start(); pMenu = pMenu->mpParentSalMenu; } +// only if a menubar is directly updated do we force in a full +// structure update +if (mbMenuBar && !maUpdateMenuBarIdle.IsActive()) +maUpdateMenuBarIdle.Start(); } void GtkSalMenu::SetMenuModel(GMenuModel* pMenuModel) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 56 --- 1 file changed, 56 deletions(-) New commits: commit 3efc0b2fe087fb8c5e0291efbda417b819a43f83 Author: Caolán McNamara AuthorDate: Fri Dec 14 16:17:26 2018 + Commit: Caolán McNamara CommitDate: Mon Dec 17 09:59:55 2018 +0100 drop scroll-wheel moves notebook page workaround now that the double-decker monstrosity is in place Change-Id: I8bc8f98d0cfd2bf4506bbc61632c1e7b0f9cd3f1 Reviewed-on: https://gerrit.libreoffice.org/65230 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index dffb42ced571..b9155e2da687 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3111,7 +3111,6 @@ private: gulong m_nSwitchPageSignalId; gulong m_nOverFlowSwitchPageSignalId; gulong m_nSizeAllocateSignalId; -gulong m_nScrollSignalId; bool m_bOverFlowBoxActive; bool m_bOverFlowBoxIsStart; int m_nStartTabCount; @@ -3206,59 +3205,6 @@ private: enable_notify_events(); } -static gboolean signalScroll(GtkWidget*, GdkEventScroll* event, gpointer widget) -{ -GtkInstanceNotebook* pThis = static_cast(widget); -return pThis->signal_scroll(event); -} - -bool signal_scroll(GdkEventScroll* event) -{ -GtkWidget* pEventWidget = gtk_get_event_widget(reinterpret_cast(event)); -if (!pEventWidget) -return false; - -/* ignore page content scroll events */ -GtkWidget* pPage = gtk_notebook_get_nth_page(m_pNotebook, gtk_notebook_get_current_page(m_pNotebook)); -if (gtk_widget_is_ancestor(pEventWidget, pPage) || pPage == pEventWidget) -return false; - -bool bNext(false), bPrev(false); -switch (event->direction) -{ -case GDK_SCROLL_RIGHT: -case GDK_SCROLL_DOWN: -bNext = true; -break; -case GDK_SCROLL_LEFT: -case GDK_SCROLL_UP: -bPrev = true; -break; -case GDK_SCROLL_SMOOTH: -{ -switch (gtk_notebook_get_tab_pos(m_pNotebook)) -{ -case GTK_POS_LEFT: -case GTK_POS_RIGHT: -bNext = event->delta_y > 0; -bPrev = event->delta_y < 0; -break; -case GTK_POS_TOP: -case GTK_POS_BOTTOM: -bNext = event->delta_x > 0; -bPrev = event->delta_x < 0; -break; -} -break; -} -} -if (bNext) -gtk_notebook_next_page(m_pNotebook); -else if (bPrev) -gtk_notebook_prev_page(m_pNotebook); -return true; -} - static OString get_page_ident(GtkNotebook *pNotebook, guint nPage) { const GtkWidget* pTabWidget = gtk_notebook_get_tab_label(pNotebook, gtk_notebook_get_nth_page(pNotebook, nPage)); @@ -3539,7 +3485,6 @@ public: , m_nEndTabCount(0) { gtk_widget_add_events(GTK_WIDGET(pNotebook), GDK_SCROLL_MASK); -m_nScrollSignalId = g_signal_connect(pNotebook, "scroll-event", G_CALLBACK(signalScroll), this); if (get_n_pages() > 6) m_nSizeAllocateSignalId = g_signal_connect_after(pNotebook, "size-allocate", G_CALLBACK(signalSizeAllocate), this); else @@ -3709,7 +3654,6 @@ public: { if (m_nSizeAllocateSignalId) g_signal_handler_disconnect(m_pNotebook, m_nSizeAllocateSignalId); -g_signal_handler_disconnect(m_pNotebook, m_nScrollSignalId); g_signal_handler_disconnect(m_pNotebook, m_nSwitchPageSignalId); g_signal_handler_disconnect(m_pOverFlowNotebook, m_nOverFlowSwitchPageSignalId); gtk_widget_destroy(GTK_WIDGET(m_pOverFlowNotebook)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 104 +- 1 file changed, 74 insertions(+), 30 deletions(-) New commits: commit d3e4c06ccb3aa4bb9078077a49dc2b2795835a5c Author: Caolán McNamara AuthorDate: Thu Dec 13 14:30:21 2018 + Commit: Heiko Tietze CommitDate: Sat Dec 15 14:17:13 2018 +0100 Resolves: tdf#121050 draw fixedlines like toolbar separators Change-Id: Ib91b3f204d847cbe96750b4c080e958597bb3b9b Reviewed-on: https://gerrit.libreoffice.org/65110 Tested-by: Jenkins Reviewed-by: Heiko Tietze Tested-by: Heiko Tietze (cherry picked from commit baa3c7389ec3f570be0486b3647ab424c7835ee1) Reviewed-on: https://gerrit.libreoffice.org/65196 diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 31c665e1af05..769cba86243d 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -2166,6 +2166,77 @@ static gfloat getArrowSize(GtkStyleContext* context) return arrow_size; } +namespace +{ +void draw_vertical_separator(GtkStyleContext *context, cairo_t *cr, const tools::Rectangle& rControlRegion) +{ +long nX = 0; +long nY = 0; + +const bool bNewStyle = gtk_check_version(3, 20, 0) == nullptr; + +gint nSeparatorWidth = 1; + +if (bNewStyle) +{ +gtk_style_context_get(context, +gtk_style_context_get_state(context), +"min-width", , nullptr); +} + +gint nHalfSeparatorWidth = nSeparatorWidth / 2; +gint nHalfRegionWidth = rControlRegion.GetWidth() / 2; + +nX = nX + nHalfRegionWidth - nHalfSeparatorWidth; +nY = rControlRegion.GetHeight() > 5 ? 1 : 0; +int nHeight = rControlRegion.GetHeight() - (2 * nY); + +if (bNewStyle) +{ +gtk_render_background(context, cr, nX, nY, nSeparatorWidth, nHeight); +gtk_render_frame(context, cr, nX, nY, nSeparatorWidth, nHeight); +} +else +{ +gtk_render_line(context, cr, nX, nY, nX, nY + nHeight); +} +} + +void draw_horizontal_separator(GtkStyleContext *context, cairo_t *cr, const tools::Rectangle& rControlRegion) +{ +long nX = 0; +long nY = 0; + +const bool bNewStyle = gtk_check_version(3, 20, 0) == nullptr; + +gint nSeparatorHeight = 1; + +if (bNewStyle) +{ +gtk_style_context_get(context, +gtk_style_context_get_state(context), +"min-height", , nullptr); +} + +gint nHalfSeparatorHeight = nSeparatorHeight / 2; +gint nHalfRegionHeight = rControlRegion.GetHeight() / 2; + +nY = nY + nHalfRegionHeight - nHalfSeparatorHeight; +nX = rControlRegion.GetWidth() > 5 ? 1 : 0; +int nWidth = rControlRegion.GetWidth() - (2 * nX); + +if (bNewStyle) +{ +gtk_render_background(context, cr, nX, nY, nWidth, nSeparatorHeight); +gtk_render_frame(context, cr, nX, nY, nWidth, nSeparatorHeight); +} +else +{ +gtk_render_line(context, cr, nX, nY, nX + nWidth, nY); +} +} +} + bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& rValue, const OUString& aCaptions) @@ -2454,41 +2525,14 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co break; case RenderType::ToolbarSeparator: { -const bool bNewStyle = gtk_check_version(3, 20, 0) == nullptr; - -gint nSeparatorWidth = 1; - -if (bNewStyle) -{ -gtk_style_context_get(context, -gtk_style_context_get_state(context), -"min-width", , nullptr); -} - -gint nHalfSeparatorWidth = nSeparatorWidth / 2; -gint nHalfRegionWidth = rControlRegion.GetWidth() / 2; - -nX = nX + nHalfRegionWidth - nHalfSeparatorWidth; -nWidth = nSeparatorWidth; -nY = rControlRegion.GetHeight() * 0.1; -nHeight = rControlRegion.GetHeight() - (2 * nY); - -if (bNewStyle) -{ -gtk_render_background(context, cr, nX, nY, nSeparatorWidth, nHeight); -gtk_render_frame(context, cr, nX, nY, nSeparatorWidth, nHeight); -} -else -{ -gtk_render_line(context, cr, nX, nY, nX, nY + nHeight); -} +draw_vertical_separator(context, cr, rControlRegion); break; } case RenderType::Separator: if (nPart == ControlPart::SeparatorHorz) -gtk_render_line(context, cr, 0, nHeight / 2, nWidth - 1, nHeight / 2); +draw_horizontal_separator(context, cr, rControlRegion);
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk/gtksalmenu.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 4107e1c4268811623a4620eb30264b210a2acdab Author: Caolán McNamara AuthorDate: Thu Dec 13 11:50:41 2018 + Commit: Caolán McNamara CommitDate: Thu Dec 13 17:48:14 2018 +0100 Resolves: tdf#122016 crash accessing deleted GtkSalMenu Change-Id: Ib6527e17110b55251fea9f0701d0e02f6fa5a9fe Reviewed-on: https://gerrit.libreoffice.org/65107 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx index e504e5d7aef0..f9053ce23f6f 100644 --- a/vcl/unx/gtk/gtksalmenu.cxx +++ b/vcl/unx/gtk/gtksalmenu.cxx @@ -506,6 +506,8 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl g_object_unref(mpActionGroup); ClearActionGroupAndMenuModel(); +mpFrame = nullptr; + return true; #else (void)pWin; @@ -581,6 +583,9 @@ GtkSalMenu::~GtkSalMenu() g_object_unref(mpMenuModel); maItems.clear(); + +if (mpFrame) +mpFrame->SetMenu(nullptr); } bool GtkSalMenu::VisibleMenuBar() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit be8fc29b4130e2bb3b8f1cdb50a5a6462d79723a Author: Caolán McNamara AuthorDate: Wed Dec 12 16:59:08 2018 + Commit: Caolán McNamara CommitDate: Thu Dec 13 09:51:55 2018 +0100 expand normal tabs if overflow is active Change-Id: I4033fcb2c34c70eff554998752f93865ee1c9230 Reviewed-on: https://gerrit.libreoffice.org/65047 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 6c1535ffc4f6..52a50ce0014b 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3452,6 +3452,13 @@ private: ++i; } +for (i = 0; i < m_nEndTabCount; ++i) +{ +GtkWidget* pTabWidget = gtk_notebook_get_tab_label(m_pNotebook, + gtk_notebook_get_nth_page(m_pNotebook, i)); +gtk_widget_set_hexpand(pTabWidget, true); +} + // have to have some tab as the active tab of the overflow notebook append_useless_page(m_pOverFlowNotebook); gtk_notebook_set_current_page(m_pOverFlowNotebook, gtk_notebook_get_n_pages(m_pOverFlowNotebook) - 1); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit cc3661c57ee18e66b39418598a11a90f2793067e Author: Caolán McNamara AuthorDate: Mon Dec 10 21:20:51 2018 + Commit: Caolán McNamara CommitDate: Tue Dec 11 14:29:08 2018 +0100 gtk takes care of the ordering itself Change-Id: I5d77a3dddeb5524bfef13a4871ffc5bb6be6cae0 Reviewed-on: https://gerrit.libreoffice.org/64902 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 22e553bc8991..346eb8d65562 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -4703,17 +4703,14 @@ namespace gchar* pName2; GtkTreeSortable* pSortable = GTK_TREE_SORTABLE(pModel); gint sort_column_id(0); -GtkSortType order(GTK_SORT_ASCENDING); -gtk_tree_sortable_get_sort_column_id(pSortable, _column_id, ); +gtk_tree_sortable_get_sort_column_id(pSortable, _column_id, nullptr); gtk_tree_model_get(pModel, a, sort_column_id, , -1); gtk_tree_model_get(pModel, b, sort_column_id, , -1); gint ret = pSorter->compare(OUString(pName1, strlen(pName1), RTL_TEXTENCODING_UTF8), OUString(pName2, strlen(pName2), RTL_TEXTENCODING_UTF8)); g_free(pName1); g_free(pName2); -if (ret == 0) -return ret; -return order == GTK_SORT_ASCENDING ? ret : -ret; +return ret; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 447 +++ 1 file changed, 406 insertions(+), 41 deletions(-) New commits: commit da6ec7f3274650dfdf047ba8d42291ddc5161858 Author: Caolán McNamara AuthorDate: Thu Dec 6 17:44:16 2018 + Commit: Caolán McNamara CommitDate: Mon Dec 10 12:18:40 2018 +0100 Related: tdf#120371 a scheme to provide multi-level notebook tabs Change-Id: Ib92b5e63aa6457f5df8e51fe5404d2341aae5ffb Reviewed-on: https://gerrit.libreoffice.org/64767 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit bf379a1054bdf84fc05550e5b9e600b50e04769e) Reviewed-on: https://gerrit.libreoffice.org/64848 diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 028462532918..22e553bc8991 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -41,6 +41,7 @@ #include #include #include +#include using namespace com::sun::star; using namespace com::sun::star::uno; @@ -3105,9 +3106,16 @@ class GtkInstanceNotebook : public GtkInstanceContainer, public virtual weld::No { private: GtkNotebook* m_pNotebook; +GtkBox* m_pOverFlowBox; +GtkNotebook* m_pOverFlowNotebook; gulong m_nSwitchPageSignalId; +gulong m_nOverFlowSwitchPageSignalId; gulong m_nSizeAllocateSignalId; gulong m_nScrollSignalId; +bool m_bOverFlowBoxActive; +bool m_bOverFlowBoxIsStart; +int m_nStartTabCount; +int m_nEndTabCount; mutable std::vector> m_aPages; static void signalSwitchPage(GtkNotebook*, GtkWidget*, guint nNewPage, gpointer widget) @@ -3117,7 +3125,18 @@ private: pThis->signal_switch_page(nNewPage); } -void signal_switch_page(guint nNewPage) +static gboolean launch_overflow_switch_page(GtkInstanceNotebook* pThis) +{ +pThis->signal_overflow_switch_page(); +return false; +} + +static void signalOverFlowSwitchPage(GtkNotebook*, GtkWidget*, guint, gpointer widget) +{ +g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast(launch_overflow_switch_page), widget, nullptr); +} + +void signal_switch_page(int nNewPage) { bool bAllow = !m_aLeavePageHdl.IsSet() || m_aLeavePageHdl.Call(get_current_page_ident()); if (!bAllow) @@ -3125,10 +3144,68 @@ private: g_signal_stop_emission_by_name(m_pNotebook, "switch-page"); return; } +if (m_bOverFlowBoxActive) +gtk_notebook_set_current_page(m_pOverFlowNotebook, gtk_notebook_get_n_pages(m_pOverFlowNotebook) - 1); OString sNewIdent(get_page_ident(nNewPage)); m_aEnterPageHdl.Call(sNewIdent); } +void unsplit_notebooks() +{ +int nOverFlowPages = gtk_notebook_get_n_pages(m_pOverFlowNotebook) - 1; +int nMainPages = gtk_notebook_get_n_pages(m_pNotebook); +int nPageIndex = 0; +if (!m_bOverFlowBoxIsStart) +nPageIndex += nMainPages; + +// take the overflow pages, and put them back at the end of the normal one +int i = nMainPages; +while (nOverFlowPages) +{ +OString sIdent(get_page_ident(m_pOverFlowNotebook, 0)); +OUString sLabel(get_tab_label_text(m_pOverFlowNotebook, 0)); +remove_page(m_pOverFlowNotebook, sIdent); + +GtkWidget* pPage = m_aPages[nPageIndex]->getWidget(); +append_page(m_pNotebook, sIdent, sLabel, pPage); + +GtkWidget* pTabWidget = gtk_notebook_get_tab_label(m_pNotebook, + gtk_notebook_get_nth_page(m_pNotebook, i)); +gtk_widget_set_hexpand(pTabWidget, true); +--nOverFlowPages; +++i; +++nPageIndex; +} + +// remove the dangling placeholder tab page +remove_page(m_pOverFlowNotebook, "useless"); +} + +// a tab has been selected on the overflow notebook +void signal_overflow_switch_page() +{ +int nNewPage = gtk_notebook_get_current_page(m_pOverFlowNotebook); +int nOverFlowPages = gtk_notebook_get_n_pages(m_pOverFlowNotebook) - 1; +if (nNewPage == nOverFlowPages) +{ +// the useless tab which is there because there has to be an active tab +return; +} + +disable_notify_events(); + +// take the overflow pages, and put them back at the end of the normal one +unsplit_notebooks(); + +// now redo the split, the pages will be split the other way around this time +std::swap(m_nStartTabCount, m_nEndTabCount); +split_notebooks(); + +gtk_notebook_set_current_page(m_pNotebook, nNewPage); + +enable_notify_events(); +} + static gboolean signalScroll(GtkWidget*, GdkEventScroll* event, gpointer widget) { GtkInstanceNotebook* pThis =
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 03f724a1ba9155a100f51954871f22f858859299 Author: Noel Grandin AuthorDate: Sat Dec 8 20:41:53 2018 +0200 Commit: Caolán McNamara CommitDate: Sun Dec 9 22:12:54 2018 +0100 missing g_signal_handler_disconnect in GtkInstanceWidget found by loplugin:unusedfields Change-Id: Iefd64e879b32f696456c51da595e462295e5c58e Reviewed-on: https://gerrit.libreoffice.org/64820 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 145280ffd1dabdc629c14c8162beef668741bcef) Reviewed-on: https://gerrit.libreoffice.org/64847 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index ebf175b3e0eb..028462532918 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1606,6 +1606,8 @@ public: { if (m_nKeyPressSignalId) g_signal_handler_disconnect(m_pWidget, m_nKeyPressSignalId); +if (m_nKeyReleaseSignalId) +g_signal_handler_disconnect(m_pWidget, m_nKeyReleaseSignalId); if (m_nFocusInSignalId) g_signal_handler_disconnect(m_pWidget, m_nFocusInSignalId); if (m_nFocusOutSignalId) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit ef36747c186e53702e9857fddc5ddfd31b1c842b Author: Michael Weghorn AuthorDate: Tue Dec 4 09:24:32 2018 +0100 Commit: Katarina Behrens CommitDate: Thu Dec 6 16:03:45 2018 +0100 tdf#121892 Guard Gtk3KDE5FilePicker::execute with SolarMutexGuard Adhere to what gtk3's file picker does as well. Threading is involved in Gtk3KDE5FilePickerIpc::execute(). Change-Id: I4fa0a12f46ed13ef04211cb8577e77d1db5e8eae Reviewed-on: https://gerrit.libreoffice.org/64502 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 8dbe0af729c9e054135a0f41706165033441f867) Reviewed-on: https://gerrit.libreoffice.org/64585 Reviewed-by: Katarina Behrens diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx index 919328dd9d6c..8006bc37c7dc 100644 --- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx @@ -94,7 +94,11 @@ void SAL_CALL Gtk3KDE5FilePicker::setTitle(const OUString& title) m_ipc.sendCommand(Commands::SetTitle, title); } -sal_Int16 SAL_CALL Gtk3KDE5FilePicker::execute() { return m_ipc.execute(); } +sal_Int16 SAL_CALL Gtk3KDE5FilePicker::execute() +{ +SolarMutexGuard g; +return m_ipc.execute(); +} void SAL_CALL Gtk3KDE5FilePicker::setMultiSelectionMode(sal_Bool multiSelect) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) New commits: commit 5b017b8ebede87c53ce94dc46be1c252c45705e6 Author: Michael Weghorn AuthorDate: Tue Dec 4 14:42:31 2018 +0100 Commit: Caolán McNamara CommitDate: Wed Dec 5 09:52:19 2018 +0100 tdf#121399 Join cmd reading thread in gtk3_kde5 Stop reading commands from the pipe on kde5 side once the "Quit" command has been sent, in order to have the thread that is reading commands from stdin finish properly. Join the thread in the 'FilePickerIpc' destructor, rather than just deleting it while it may still be running, which resulted in 'terminate()' being called. Change-Id: Ia184987e7994cc1de0208ff2757a3cf06c8b7194 Reviewed-on: https://gerrit.libreoffice.org/63835 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 93815c2b04f1905e43c695caf5cc2c594bb897ce) Reviewed-on: https://gerrit.libreoffice.org/64587 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx index 550e1d8bb2d4..a2ea6b7bbefd 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx @@ -192,6 +192,12 @@ static void readCommands(FilePickerIpc* ipc) readCommandArgs(command, args); emit ipc->commandReceived(messageId, command, args); + +// stop processing once 'Quit' command has been sent +if (command == Commands::Quit) +{ +return; +} } } @@ -211,7 +217,11 @@ FilePickerIpc::FilePickerIpc(KDE5FilePicker* filePicker, QObject* parent) m_ipcReaderThread = std::unique_ptr{ new std::thread(readCommands, this) }; } -FilePickerIpc::~FilePickerIpc() = default; +FilePickerIpc::~FilePickerIpc() +{ +// join thread that reads commands +m_ipcReaderThread->join(); +}; bool FilePickerIpc::handleCommand(uint64_t messageId, Commands command, QList args) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit a80fd148d8a9827c7aa424d8c5d7c04b48805af1 Author: Caolán McNamara AuthorDate: Tue Dec 4 17:31:22 2018 + Commit: Caolán McNamara CommitDate: Wed Dec 5 09:50:10 2018 +0100 only scroll if the event doesn't come from the page content Change-Id: I579cef26964aebc89bf6c4786725b4bf85fb4fe5 Reviewed-on: https://gerrit.libreoffice.org/64556 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 862987edfc77..ebf175b3e0eb 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3135,6 +3135,15 @@ private: bool signal_scroll(GdkEventScroll* event) { +GtkWidget* pEventWidget = gtk_get_event_widget(reinterpret_cast(event)); +if (!pEventWidget) +return false; + +/* ignore page content scroll events */ +GtkWidget* pPage = gtk_notebook_get_nth_page(m_pNotebook, gtk_notebook_get_current_page(m_pNotebook)); +if (gtk_widget_is_ancestor(pEventWidget, pPage) || pPage == pEventWidget) +return false; + bool bNext(false), bPrev(false); switch (event->direction) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 50 ++- 1 file changed, 49 insertions(+), 1 deletion(-) New commits: commit f761968bdd609267add6c968d62fffee1d9ee9e7 Author: Caolán McNamara AuthorDate: Wed Nov 28 11:50:19 2018 + Commit: Caolán McNamara CommitDate: Wed Nov 28 20:48:16 2018 +0100 Resolves: tdf#121752 let scroll wheel change active notebook tab Change-Id: If8437346a58ea14266f11293b94082740303e5a9 Reviewed-on: https://gerrit.libreoffice.org/64170 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 6eb623efe088..286206f7c4a5 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -3012,6 +3012,7 @@ private: GtkNotebook* m_pNotebook; gulong m_nSwitchPageSignalId; gulong m_nSizeAllocateSignalId; +gulong m_nScrollSignalId; mutable std::vector> m_aPages; static void signalSwitchPage(GtkNotebook*, GtkWidget*, guint nNewPage, gpointer widget) @@ -3033,6 +3034,50 @@ private: m_aEnterPageHdl.Call(sNewIdent); } +static gboolean signalScroll(GtkWidget*, GdkEventScroll* event, gpointer widget) +{ +GtkInstanceNotebook* pThis = static_cast(widget); +return pThis->signal_scroll(event); +} + +bool signal_scroll(GdkEventScroll* event) +{ +bool bNext(false), bPrev(false); +switch (event->direction) +{ +case GDK_SCROLL_RIGHT: +case GDK_SCROLL_DOWN: +bNext = true; +break; +case GDK_SCROLL_LEFT: +case GDK_SCROLL_UP: +bPrev = true; +break; +case GDK_SCROLL_SMOOTH: +{ +switch (gtk_notebook_get_tab_pos(m_pNotebook)) +{ +case GTK_POS_LEFT: +case GTK_POS_RIGHT: +bNext = event->delta_y > 0; +bPrev = event->delta_y < 0; +break; +case GTK_POS_TOP: +case GTK_POS_BOTTOM: +bNext = event->delta_x > 0; +bPrev = event->delta_x < 0; +break; +} +break; +} +} +if (bNext) +gtk_notebook_next_page(m_pNotebook); +else if (bPrev) +gtk_notebook_prev_page(m_pNotebook); +return true; +} + OString get_page_ident(guint nPage) const { const GtkWidget* pTabWidget = gtk_notebook_get_tab_label(m_pNotebook, gtk_notebook_get_nth_page(m_pNotebook, nPage)); @@ -3097,6 +3142,8 @@ public: , m_pNotebook(pNotebook) , m_nSwitchPageSignalId(g_signal_connect(pNotebook, "switch-page", G_CALLBACK(signalSwitchPage), this)) { +gtk_widget_add_events(GTK_WIDGET(pNotebook), GDK_SCROLL_MASK); +m_nScrollSignalId = g_signal_connect(pNotebook, "scroll-event", G_CALLBACK(signalScroll), this); if (get_n_pages() > 6) m_nSizeAllocateSignalId = g_signal_connect(pNotebook, "size-allocate", G_CALLBACK(signalSizeAllocate), this); else @@ -3188,9 +3235,10 @@ public: virtual ~GtkInstanceNotebook() override { -g_signal_handler_disconnect(m_pNotebook, m_nSwitchPageSignalId); if (m_nSizeAllocateSignalId) g_signal_handler_disconnect(m_pNotebook, m_nSizeAllocateSignalId); +g_signal_handler_disconnect(m_pNotebook, m_nScrollSignalId); +g_signal_handler_disconnect(m_pNotebook, m_nSwitchPageSignalId); } }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/generic/printer/ppdparser.cxx | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) New commits: commit 8f6af557890ae687592075099a02960155511bd5 Author: Caolán McNamara AuthorDate: Wed Nov 28 12:23:38 2018 + Commit: Caolán McNamara CommitDate: Wed Nov 28 16:10:38 2018 +0100 Resolves: tdf#112215 null deref on missing optional ppd value Change-Id: Iba45437332df963e1aa213c587071ab293f36390 Reviewed-on: https://gerrit.libreoffice.org/64164 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 105a350a27d6..7789459c200c 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -848,13 +848,22 @@ PPDParser::PPDParser( const OUString& rFile ) : } // fill in direct values -if( (pKey = getKey( OUString( "ColorDevice" ) )) ) -m_bColorDevice = pKey->getValue( 0 )->m_aValue.startsWithIgnoreAsciiCase( "true" ); +if ((pKey = getKey(OUString("ColorDevice" +{ +if (const PPDValue* pValue = pKey->getValue(0)) +m_bColorDevice = pValue->m_aValue.startsWithIgnoreAsciiCase("true"); +} -if( (pKey = getKey( OUString( "LanguageLevel" ) )) ) -m_nLanguageLevel = pKey->getValue( 0 )->m_aValue.toInt32(); -if( (pKey = getKey( OUString( "TTRasterizer" ) )) ) -m_bType42Capable = pKey->getValue( 0 )->m_aValue.equalsIgnoreAsciiCase( "Type42" ); +if ((pKey = getKey(OUString("LanguageLevel" +{ +if (const PPDValue* pValue = pKey->getValue(0)) +m_nLanguageLevel = pValue->m_aValue.toInt32(); +} +if ((pKey = getKey(OUString("TTRasterizer" +{ +if (const PPDValue* pValue = pKey->getValue(0)) +m_bType42Capable = pValue->m_aValue.equalsIgnoreAsciiCase( "Type42" ); +} } PPDParser::~PPDParser() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx | 148 ++- 1 file changed, 134 insertions(+), 14 deletions(-) New commits: commit 98b4920fdc57e6590e5e7bb29ab102f8e155fe87 Author: Caolán McNamara AuthorDate: Tue Nov 27 10:18:52 2018 + Commit: Caolán McNamara CommitDate: Tue Nov 27 21:09:38 2018 +0100 enable hiding gtk dialogs without ending their dialog loop we need this to support reshowing dialog after an intermediate range selection dialog executes Change-Id: Ib6575e5d852bd1d29cc1a791a5dc2c19949b67a0 Reviewed-on: https://gerrit.libreoffice.org/64101 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index e207e7793b68..0165998bb0ea 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -2277,10 +2277,117 @@ namespace } } +struct DialogRunner +{ +GtkDialog *m_pDialog; +gint m_nResponseId; +GMainLoop *m_pLoop; +VclPtr m_xFrameWindow; + +DialogRunner(GtkDialog* pDialog) + : m_pDialog(pDialog) + , m_nResponseId(GTK_RESPONSE_NONE) + , m_pLoop(nullptr) +{ +GtkWindow* pParent = gtk_window_get_transient_for(GTK_WINDOW(m_pDialog)); +GtkSalFrame* pFrame = GtkSalFrame::getFromWindow(pParent); +m_xFrameWindow = pFrame ? pFrame->GetWindow() : nullptr; +} + +bool loop_is_running() const +{ +return m_pLoop && g_main_loop_is_running(m_pLoop); +} + +void loop_quit() +{ +if (g_main_loop_is_running(m_pLoop)) +g_main_loop_quit(m_pLoop); +} + +static void signal_response(GtkDialog*, gint nResponseId, gpointer data) +{ +DialogRunner* pThis = static_cast(data); +pThis->m_nResponseId = nResponseId; +pThis->loop_quit(); +} + +static gboolean signal_delete(GtkDialog*, GdkEventAny*, gpointer data) +{ +DialogRunner* pThis = static_cast(data); +pThis->loop_quit(); +return true; /* Do not destroy */ +} + +static void signal_destroy(GtkDialog*, gpointer data) +{ +DialogRunner* pThis = static_cast(data); +pThis->loop_quit(); +} + +void inc_modal_count() +{ +if (m_xFrameWindow) +m_xFrameWindow->IncModalCount(); +} + +void dec_modal_count() +{ +if (m_xFrameWindow) +m_xFrameWindow->DecModalCount(); +} + +// same as gtk_dialog_run except that unmap doesn't auto-respond +// so we can hide the dialog and restore it without a response getting +// triggered +gint run() +{ +g_object_ref(m_pDialog); + +inc_modal_count(); + +bool bWasModal = gtk_window_get_modal(GTK_WINDOW(m_pDialog)); +if (!bWasModal) +gtk_window_set_modal(GTK_WINDOW(m_pDialog), true); + +if (!gtk_widget_get_visible(GTK_WIDGET(m_pDialog))) +gtk_widget_show(GTK_WIDGET(m_pDialog)); + +gulong nSignalResponseId = g_signal_connect(m_pDialog, "response", G_CALLBACK(signal_response), this); +gulong nSignalDeleteId = g_signal_connect(m_pDialog, "delete-event", G_CALLBACK(signal_delete), this); +gulong nSignalDestroyId = g_signal_connect(m_pDialog, "destroy", G_CALLBACK(signal_destroy), this); + +m_pLoop = g_main_loop_new(nullptr, false); +m_nResponseId = GTK_RESPONSE_NONE; + +gdk_threads_leave(); +g_main_loop_run(m_pLoop); +gdk_threads_enter(); + +g_main_loop_unref(m_pLoop); + +m_pLoop = nullptr; + +if (!bWasModal) +gtk_window_set_modal(GTK_WINDOW(m_pDialog), false); + +g_signal_handler_disconnect(m_pDialog, nSignalResponseId); +g_signal_handler_disconnect(m_pDialog, nSignalDeleteId); +g_signal_handler_disconnect(m_pDialog, nSignalDestroyId); + +dec_modal_count(); + +g_object_unref(m_pDialog); + +return m_nResponseId; +} +}; + class GtkInstanceDialog : public GtkInstanceWindow, public virtual weld::Dialog { private: GtkDialog* m_pDialog; +DialogRunner m_aDialogRun; std::shared_ptr m_xDialogController; std::function m_aFunc; gulong m_nCloseSignalId; @@ -2330,10 +2437,12 @@ private: m_aFunc = nullptr; m_xDialogController.reset(); } + public: GtkInstanceDialog(GtkDialog* pDialog, bool bTakeOwnership) : GtkInstanceWindow(GTK_WINDOW(pDialog), bTakeOwnership) , m_pDialog(pDialog) +, m_aDialogRun(pDialog) , m_nCloseSignalId(g_signal_connect(m_pDialog, "close", G_CALLBACK(signalClose), this)) , m_nResponseSignalId(0) { @@ -2359,16 +2468,9 @@ public: { sort_native_button_order(GTK_BOX(gtk_dialog_get_action_area(m_pDialog))); int ret; -GtkWindow* pParent = gtk_window_get_transient_for(GTK_WINDOW(m_pDialog)); -GtkSalFrame*
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx
vcl/unx/gtk3/gtk3gtkinst.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b3b42112a3b1821b369c68277ba9284d6c4a162b Author: Caolán McNamara AuthorDate: Fri Nov 23 09:00:56 2018 + Commit: Caolán McNamara CommitDate: Fri Nov 23 12:30:29 2018 +0100 check EnableLocalizedDecimalSep Change-Id: I77b6b28ddf50b6fc363f09bf4f7226d39504a571 Reviewed-on: https://gerrit.libreoffice.org/63866 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index c5b3d3e32489..c35088723a29 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1208,7 +1208,7 @@ private: static gboolean signalKeyPress(GtkWidget*, GdkEventKey* pEvent, gpointer) { // #i1820# use locale specific decimal separator -if (pEvent->keyval == GDK_KEY_KP_Decimal) +if (pEvent->keyval == GDK_KEY_KP_Decimal && Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep()) { OUString aSep(Application::GetSettings().GetLocaleDataWrapper().getNumDecimalSep()); pEvent->keyval = aSep[0]; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits