Hello community,

here is the log from the commit of package appmenu-qt for openSUSE:Factory 
checked in at 2013-01-17 09:35:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/appmenu-qt (Old)
 and      /work/SRC/openSUSE:Factory/.appmenu-qt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "appmenu-qt", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/appmenu-qt/appmenu-qt.changes    2012-11-28 
10:04:07.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.appmenu-qt.new/appmenu-qt.changes       
2013-01-17 09:35:16.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Jan 14 20:22:17 UTC 2013 - ctri...@opensuse.org
+
+- Added patch async-dbus-calls.diff which makes appmenu-qt use
+  async dbus-calls.
+
+-------------------------------------------------------------------

New:
----
  async-dbus-calls.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ appmenu-qt.spec ++++++
--- /var/tmp/diff_new_pack.sWhq7i/_old  2013-01-17 09:35:17.000000000 +0100
+++ /var/tmp/diff_new_pack.sWhq7i/_new  2013-01-17 09:35:17.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package appmenu-qt
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,14 +15,16 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 Name:           appmenu-qt
 Version:        0.2.6
 Release:        0
-License:        LGPL-3.0
 Summary:        Application Menu for Qt
-Url:            https://launchpad.net/appmenu-qt/
+License:        LGPL-3.0
 Group:          System/GUI/KDE
+Url:            https://launchpad.net/appmenu-qt/
 Source0:        
https://launchpad.net/appmenu-qt/trunk/%{version}/+download/%{name}-%{version}.tar.bz2
+Patch0:         async-dbus-calls.diff
 BuildRequires:  cmake >= 2.8.0
 BuildRequires:  libdbusmenu-qt-devel >= 0.9.0
 BuildRequires:  libqt4-devel >= 4.8.0
@@ -38,6 +40,7 @@
 
 %prep
 %setup -q
+%patch0
 
 %build
 export CFLAGS=$RPM_OPT_FLAGS

++++++ async-dbus-calls.diff ++++++
Subject: Make appmenu-qt use async dbus calls
From: Cédric Bellegarde
Bug: bnc#798334, https://bugs.launchpad.net/appmenu-qt/+bug/1096008
Patch-upstream: yes

=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt  2012-02-27 14:27:17 +0000
+++ src/CMakeLists.txt  2013-01-11 15:05:38 +0000
@@ -15,6 +15,10 @@
     ${QT_QTXML_INCLUDE_DIR}
     )
 
+qt4_add_dbus_interface(appmenu_qt_SRCS com.canonical.AppMenu.Registrar.xml
+                       registrar)
+
+
 qt4_automoc(${appmenu_qt_SRCS})
 
 link_directories(

=== modified file 'src/appmenuplatformmenubar.cpp'
--- src/appmenuplatformmenubar.cpp      2012-04-04 16:06:06 +0000
+++ src/appmenuplatformmenubar.cpp      2013-01-11 15:05:38 +0000
@@ -15,6 +15,7 @@
    along with appmenu-qt.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include "appmenuplatformmenubar.h"
+#include "registrar.h"
 
 // dbusmenu-qt
 #include <dbusmenuexporter.h>
@@ -393,6 +394,8 @@
 
 bool MenuBarAdapter::registerWindow()
 {
+    static com::canonical::AppMenu::Registrar *registrar = 0;
+
     if (!m_menuBar->window()) {
         WARN << "No parent for this menubar";
         return false;
@@ -403,9 +406,8 @@
         return true;
     }
 
-    QDBusInterface host(REGISTRAR_SERVICE, REGISTRAR_PATH, REGISTRAR_IFACE);
-    if (!host.isValid()) {
-        return false;
+    if (!registrar) {
+        registrar = new com::canonical::AppMenu::Registrar(REGISTRAR_SERVICE, 
REGISTRAR_PATH, QDBusConnection::sessionBus(), 0);
     }
 
     Q_FOREACH(QAction *action, m_menuBar->actions()) {
@@ -428,8 +430,9 @@
     }
 
     m_registeredWinId = winId;
-    QVariant path = 
QVariant::fromValue<QDBusObjectPath>(QDBusObjectPath(m_objectPath));
-    host.asyncCall(QLatin1String("RegisterWindow"), QVariant(winId), path);
+    if (registrar) {
+        registrar->RegisterWindow(winId, QDBusObjectPath(m_objectPath));
+    }
     return true;
 }
 

=== added file 'src/com.canonical.AppMenu.Registrar.xml'
--- src/com.canonical.AppMenu.Registrar.xml     1970-01-01 00:00:00 +0000
+++ src/com.canonical.AppMenu.Registrar.xml     2013-01-14 09:46:57 +0000
@@ -0,0 +1,56 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" 
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd";>
+<node xmlns:dox="http://www.ayatana.org/dbus/dox.dtd";>
+       <dox:d><![CDATA[
+         @mainpage
+        
+         An interface to register menus that are associated with a window in 
an application.  The
+         main interface is docuemented here: @ref 
com::canonical::AppMenu::Registrar.
+           
+         The actual menus are transported using the dbusmenu protocol which is 
available
+         here: @ref com::canonical::dbusmenu.
+       ]]></dox:d>
+       <interface name="com.canonical.AppMenu.Registrar" 
xmlns:dox="http://www.ayatana.org/dbus/dox.dtd";>
+               <dox:d>
+                 An interface to register a menu from an application's window 
to be displayed in another
+                 window.  This manages that association between XWindow Window 
IDs and the dbus
+                 address and object that provides the menu using the dbusmenu 
dbus interface.
+               </dox:d>
+               <method name="RegisterWindow">
+                       <dox:d><![CDATA[
+                         Associates a dbusmenu with a window
+            
+                         /note this method assumes that the connection from 
the caller is the DBus connection
+                           to use for the object.  Applications that use 
multiple DBus connections will need to
+                           ensure this method is called with the same 
connection that implmenets the object.
+                       ]]></dox:d>
+                       <arg name="windowId" type="u" direction="in">
+                               <dox:d>The XWindow ID of the window</dox:d>
+                       </arg>
+                       <arg name="menuObjectPath" type="o" direction="in">
+                               <dox:d>The object on the dbus interface 
implementing the dbusmenu interface</dox:d>
+                       </arg>
+               </method>
+               <method name="UnregisterWindow">
+                       <dox:d>
+                         A method to allow removing a window from the 
database.  Windows will also be removed
+                         when the client drops off DBus so this is not 
required.  It is polite though.  And
+                         important for testing.
+                       </dox:d>
+                       <arg name="windowId" type="u" direction="in">
+                               <dox:d>The XWindow ID of the window</dox:d>
+                       </arg>
+               </method>
+               <method name="GetMenuForWindow">
+                       <dox:d>Gets the registered menu for a given window 
ID.</dox:d>
+                       <arg name="windowId" type="u" direction="in">
+                               <dox:d>The XWindow ID of the window to 
get</dox:d>
+                       </arg>
+                       <arg name="service" type="s" direction="out">
+                               <dox:d>The address of the connection on DBus 
(e.g. :1.23 or org.example.service)</dox:d>
+                       </arg>
+                       <arg name="menuObjectPath" type="o" direction="out">
+                               <dox:d>The path to the object which implements 
the com.canonical.dbusmenu interface.</dox:d>
+                       </arg>
+               </method>
+       </interface>
+</node>

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to