- Update to 0.6.4.
- Add some external contributions rejected by Canonical because of copyright issues. [1] Approved by: tabthorpe (mentor) Obtained from: http://bazaar.launchpad.net/~kubuntu-members/libdbusmenu-qt/ubuntu/files/head:/debian/patches/ [1]
This commit is contained in:
parent
1f44173907
commit
9c2cb2ba79
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=264639
8 changed files with 141 additions and 17 deletions
|
@ -6,9 +6,10 @@
|
|||
#
|
||||
|
||||
PORTNAME= libdbusmenu-qt
|
||||
PORTVERSION= 0.6.0
|
||||
PORTVERSION= 0.6.4
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://launchpadlibrarian.net/53980131/
|
||||
MASTER_SITES= ${MASTER_SITE_LOCAL}
|
||||
MASTER_SITE_SUBDIR= avilla
|
||||
|
||||
MAINTAINER= kde@FreeBSD.org
|
||||
COMMENT= Qt4 implementation of the DBusMenu protocol
|
||||
|
@ -25,6 +26,7 @@ MAKE_JOBS_SAFE= yes
|
|||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e '/pkgconfig/ s/$${LIB_SUFFIX}/data/' \
|
||||
${WRKSRC}/CMakeLists.txt
|
||||
-e '/tests/ d' -e '/tools/ d' \
|
||||
${WRKSRC}/CMakeLists.txt
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
MD5 (libdbusmenu-qt-0.6.0.tar.bz2) = 327d2b401f06b41f92250278cdb1b4e8
|
||||
SHA256 (libdbusmenu-qt-0.6.0.tar.bz2) = 881866db3db08ba1dc62a716d11f108554148d2fe90d4521d4da1f4a49fc7f15
|
||||
SIZE (libdbusmenu-qt-0.6.0.tar.bz2) = 30491
|
||||
SHA256 (libdbusmenu-qt-0.6.4.tar.bz2) = 67220a495039132e405f4c5ef380554275681fdd6fe0a6e82d9e4a718530a924
|
||||
SIZE (libdbusmenu-qt-0.6.4.tar.bz2) = 30620
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
--- ./CMakeLists.txt.orig 2010-08-19 12:55:12.000000000 +0400
|
||||
+++ ./CMakeLists.txt 2010-09-01 23:35:53.634132670 +0400
|
||||
@@ -56,7 +56,3 @@
|
||||
option(BUILD_TESTS "Build tests" ON)
|
||||
|
||||
add_subdirectory(src)
|
||||
-if (BUILD_TESTS)
|
||||
- add_subdirectory(tests)
|
||||
-endif (BUILD_TESTS)
|
||||
-add_subdirectory(tools)
|
10
devel/libdbusmenu-qt/files/patch-dbusmenu-qt.pc.in
Normal file
10
devel/libdbusmenu-qt/files/patch-dbusmenu-qt.pc.in
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- ./dbusmenu-qt.pc.in.orig 2010-09-23 10:08:35.000000000 +0000
|
||||
+++ ./dbusmenu-qt.pc.in 2010-11-12 14:49:39.000000000 +0000
|
||||
@@ -1,6 +1,6 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=@CMAKE_INSTALL_PREFIX@
|
||||
-libdir=@CMAKE_INSTALL_PREFIX@/lib
|
||||
+libdir=@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@
|
||||
includedir=@CMAKE_INSTALL_PREFIX@/include/dbusmenu-qt
|
||||
|
||||
Name: libdbusmenu-qt
|
33
devel/libdbusmenu-qt/files/patch-src__CMakeLists.txt
Normal file
33
devel/libdbusmenu-qt/files/patch-src__CMakeLists.txt
Normal file
|
@ -0,0 +1,33 @@
|
|||
--- ./src/CMakeLists.txt.orig 2010-09-23 10:08:35.000000000 +0000
|
||||
+++ ./src/CMakeLists.txt 2010-11-12 14:49:39.000000000 +0000
|
||||
@@ -17,6 +17,10 @@
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
endif (__DBUSMENU_HAVE_W_ALL)
|
||||
|
||||
+if (MSVC)
|
||||
+ add_definitions(-D__PRETTY_FUNCTION__=__FUNCTION__)
|
||||
+endif (MSVC)
|
||||
+
|
||||
# Check whether QIcon::name() exists. It was added in late Qt 4.7 cycle, and is
|
||||
# not present in betas.
|
||||
set(CMAKE_REQUIRED_INCLUDES "${QT_INCLUDE_DIR}")
|
||||
@@ -34,6 +38,7 @@
|
||||
endif()
|
||||
configure_file(dbusmenu_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/dbusmenu_config.h @ONLY)
|
||||
|
||||
+
|
||||
set(dbusmenu_qt_SRCS
|
||||
dbusmenu_p.cpp
|
||||
dbusmenuexporter.cpp
|
||||
@@ -74,7 +79,10 @@
|
||||
)
|
||||
|
||||
install(TARGETS dbusmenu-qt
|
||||
- LIBRARY DESTINATION lib${LIB_SUFFIX})
|
||||
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ RUNTIME DESTINATION bin
|
||||
+)
|
||||
|
||||
install(DIRECTORY .
|
||||
DESTINATION include/dbusmenu-qt
|
10
devel/libdbusmenu-qt/files/patch-src__dbusmenuexporter.cpp
Normal file
10
devel/libdbusmenu-qt/files/patch-src__dbusmenuexporter.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- ./src/dbusmenuexporter.cpp.orig 2010-09-23 10:08:35.000000000 +0000
|
||||
+++ ./src/dbusmenuexporter.cpp 2010-11-12 14:49:39.000000000 +0000
|
||||
@@ -79,6 +79,7 @@
|
||||
{
|
||||
QVariantMap map;
|
||||
map.insert("enabled", false);
|
||||
+ map.insert("x-kde-title", true);
|
||||
|
||||
const QWidgetAction *widgetAction = qobject_cast<const QWidgetAction *>(action_);
|
||||
DMRETURN_VALUE_IF_FAIL(widgetAction, map);
|
80
devel/libdbusmenu-qt/files/patch-src__dbusmenuimporter.cpp
Normal file
80
devel/libdbusmenu-qt/files/patch-src__dbusmenuimporter.cpp
Normal file
|
@ -0,0 +1,80 @@
|
|||
--- ./src/dbusmenuimporter.cpp.orig 2010-09-23 10:08:35.000000000 +0000
|
||||
+++ ./src/dbusmenuimporter.cpp 2010-11-12 14:49:39.000000000 +0000
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <QSignalMapper>
|
||||
#include <QTime>
|
||||
#include <QTimer>
|
||||
+#include <QToolButton>
|
||||
+#include <QWidgetAction>
|
||||
|
||||
// Local
|
||||
#include "dbusmenuitem_p.h"
|
||||
@@ -41,7 +43,6 @@
|
||||
|
||||
//#define BENCHMARK
|
||||
#ifdef BENCHMARK
|
||||
-#include <QTime>
|
||||
static QTime sChrono;
|
||||
#endif
|
||||
|
||||
@@ -66,6 +67,29 @@
|
||||
DBusMenuImporterMethod m_method;
|
||||
};
|
||||
|
||||
+class EventSniffer : public QObject
|
||||
+{
|
||||
+public:
|
||||
+ EventSniffer(QObject *parent = 0)
|
||||
+ : QObject(parent) { }
|
||||
+
|
||||
+ ~EventSniffer() { }
|
||||
+
|
||||
+ bool eventFilter(QObject *object, QEvent *event)
|
||||
+ {
|
||||
+ Q_UNUSED(object);
|
||||
+
|
||||
+ if (event->type() == QEvent::Paint ||
|
||||
+ event->type() == QEvent::KeyPress ||
|
||||
+ event->type() == QEvent::KeyRelease) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ event->accept();
|
||||
+ return true;
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
class DBusMenuImporterPrivate
|
||||
{
|
||||
public:
|
||||
@@ -143,8 +167,30 @@
|
||||
group->addAction(action);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ bool isMenuTitle = map.take("x-kde-title").toBool();
|
||||
+
|
||||
updateAction(action, map, map.keys());
|
||||
|
||||
+ if (isMenuTitle) {
|
||||
+ QAction *buttonAction = action;
|
||||
+ QFont font = buttonAction->font();
|
||||
+ font.setBold(true);
|
||||
+ buttonAction->setFont(font);
|
||||
+ buttonAction->setEnabled(true);
|
||||
+
|
||||
+ QWidgetAction *action = new QWidgetAction(parent);
|
||||
+ action->setObjectName("kmenu_title");
|
||||
+ QToolButton *titleButton = new QToolButton(0);
|
||||
+ EventSniffer *eventSniffer = new EventSniffer(titleButton);
|
||||
+ titleButton->installEventFilter(eventSniffer); // prevent clicks on the title of the menu
|
||||
+ titleButton->setDefaultAction(buttonAction);
|
||||
+ titleButton->setDown(true); // prevent hover style changes in some styles
|
||||
+ titleButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
+ action->setDefaultWidget(titleButton);
|
||||
+ return action;
|
||||
+ }
|
||||
+
|
||||
return action;
|
||||
}
|
||||
|
|
@ -4,6 +4,6 @@ include/dbusmenu-qt/dbusmenuexporter.h
|
|||
include/dbusmenu-qt/dbusmenuimporter.h
|
||||
lib/libdbusmenu-qt.so
|
||||
lib/libdbusmenu-qt.so.2
|
||||
lib/libdbusmenu-qt.so.2.3.0
|
||||
lib/libdbusmenu-qt.so.2.3.4
|
||||
libdata/pkgconfig/dbusmenu-qt.pc
|
||||
@dirrm include/dbusmenu-qt
|
||||
|
|
Loading…
Reference in a new issue