commit 0479540611c2f5971bf394e829cf232230b0f87b
Author: Jakub Bogusz <[email protected]>
Date:   Sat Jan 18 10:42:03 2014 +0100

    - for old MATE compatibility

 python-mate-desktop-atril.patch |  11 ++
 python-mate-desktop-panel.patch | 399 ++++++++++++++++++++++++++++++++++++++++
 python-mate-desktop.spec        | 277 ++++++++++++++++++++++++++++
 3 files changed, 687 insertions(+)
---
diff --git a/python-mate-desktop.spec b/python-mate-desktop.spec
new file mode 100644
index 0000000..cc5aad2
--- /dev/null
+++ b/python-mate-desktop.spec
@@ -0,0 +1,277 @@
+# NOTE: it's deprecated package, a binding for MATE <= 1.4 APIs;
+# when built with MATE 1.6 panel library, some applet APIs are no longer 
available
+#
+# Conditional build:
+%bcond_with    mate14  # build with pure MATE Desktop <= 1.4 libraries
+#
+Summary:       Python bindings for MATE Desktop libraries
+Summary(pl.UTF-8):     Wiązania Pythona do bibliotek środowiska MATE Desktop
+Name:          python-mate-desktop
+Version:       1.4.0
+Release:       1
+License:       LGPL v2.1+/GPL v2+ depending on module (see COPYING)
+Group:         Libraries/Python
+Source0:       
http://pub.mate-desktop.org/releases/1.4/%{name}-%{version}.tar.xz
+# Source0-md5: c6c2c168ecf532c31c38d4714cb09c7f
+Patch0:                %{name}-panel.patch
+Patch1:                %{name}-atril.patch
+URL:           http://mate-desktop.org/
+BuildRequires: autoconf >= 2.52
+BuildRequires: automake >= 1:1.9
+BuildRequires: glib2-devel >= 1:2.6.0
+BuildRequires: gtk+2-devel >= 2:2.4.0
+BuildRequires: libmate-devel >= 1.1.0
+BuildRequires: libmatekeyring-devel >= 1.1.0
+BuildRequires: libmateui-devel >= 1.1.0
+BuildRequires: libmatewnck-devel >= 1.3.0
+BuildRequires: libtool >= 1:1.4.3
+BuildRequires: mate-common
+BuildRequires: mate-conf-devel >= 1.1.0
+BuildRequires: mate-desktop-devel >= 1.1.0
+%{?with_mate14:BuildRequires:  mate-document-viewer-devel >= 1.1.0}
+%{?with_mate14:BuildRequires:  mate-document-viewer-devel < 1.5.0}
+%{!?with_mate14:BuildRequires: mate-document-viewer-devel >= 1.5.0}
+%{?with_mate14:BuildRequires:  mate-panel-devel >= 1.1.0}
+%{?with_mate14:BuildRequires:  mate-panel-devel < 1.5.0}
+%{!?with_mate14:BuildRequires: mate-panel-devel >= 1.5.0}
+BuildRequires: mate-window-manager-devel >= 1.1.0
+BuildRequires: python-devel >= 2.3
+BuildRequires: python-mate-devel >= 1.1.0
+BuildRequires: python-pygobject-devel >= 2.10.0
+BuildRequires: python-pygtk-devel >= 2:2.10.3
+BuildRequires: libmatecomponent-devel >= 1.1.0
+BuildRequires: libmatecomponentui-devel >= 1.1.0
+BuildRequires: libmatecanvas-devel >= 1.1.0
+BuildRequires: libtool >= 1:1.4.3
+BuildRequires: mate-common
+BuildRequires: mate-conf-devel >= 1.1.0
+BuildRequires: mate-vfs-devel >= 1.1.0
+BuildRequires: pkgconfig
+BuildRequires: popt-devel
+BuildRequires: python-devel >= 2.2
+BuildRequires: python-matecorba-devel >= 1.1.0
+BuildRequires: python-pygobject-devel >= 2.17.0
+BuildRequires: python-pygtk-devel >= 2:2.10.3
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.197
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+Requires:      libmate-libs >= 1.1.0
+Requires:      mate-desktop-libs >= 1.1.0
+Requires:      python-pygobject >= 2.10.0
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define pydefsdir %(pkg-config --variable=defsdir pygtk-2.0)
+
+%description
+Python bindings for MATE Desktop libraries.
+
+%description -l pl.UTF-8
+Wiązania Pythona do bibliotek środowiska MATE Desktop.
+
+%package -n python-atril
+Summary:       Python binding to Atril (MATE Document Viewer) library
+Summary(pl.UTF-8):     Wiązanie Pythona do biblioteki Atril (przeglądarki 
dokumentów MATE)
+Group:         Libraries/Python
+Requires:      mate-document-viewer-libs >= 1.5.0
+# atexit
+Requires:      python-modules
+Requires:      python-pygobject >= 2.10.0
+Requires:      python-pygtk-gtk >= 2:2.10.3
+
+%description -n python-atril
+Python binding to Atril (MATE Document Viewer) library.
+
+%description -n python-atril -l pl.UTF-8
+Wiązanie Pythona do biblioteki Atril (przeglądarki dokumentów MATE).
+
+%package -n python-marco
+Summary:       Python binding to Marco (MATE Window Manager) library
+Summary(pl.UTF-8):     Wiązanie Pythona do biblioteki Marco (zarządcy okien 
MATE)
+Group:         Libraries/Python
+Requires:      mate-window-manager-libs >= 1.1.0
+Requires:      python-pygobject >= 2.10.0
+Requires:      python-pygtk-gtk >= 2:2.10.3
+Requires:      python-pygtk-pango >= 2:2.10.3
+
+%description -n python-marco
+Python binding to Marco (MATE Window Manager) library.
+
+%description -n python-marco -l pl.UTF-8
+Wiązanie Pythona do biblioteki Marco (zarządcy okien MATE).
+
+%package -n python-mate-applet
+Summary:       Python binding to MATE Panel Applet library
+Summary(pl.UTF-8):     Wiązanie Pythona do biblioteki apletów panelu MATE
+Group:         Libraries/Python
+Requires:      libmate-libs >= 1.1.0
+Requires:      libmateui >= 1.1.0
+Requires:      mate-panel-libs >= 1.1.0
+Requires:      python-mate >= 1.1.0
+Requires:      python-mate-component-ui >= 1.1.0
+Requires:      python-pygobject >= 2.10.0
+Requires:      python-pygtk-gtk >= 2:2.10.3
+
+%description -n python-mate-applet
+Python binding to MATE Panel Applet library.
+
+%description -n python-mate-applet -l pl.UTF-8
+Wiązanie Pythona do biblioteki apletów panelu MATE.
+
+%package -n python-mate-keyring
+Summary:       Python binding to MATE Keyring library
+Summary(pl.UTF-8):     Wiązanie Pythona do biblioteki MATE Keyring
+Group:         Libraries/Python
+Requires:      libmatekeyring >= 1.1.0
+Requires:      python-pygobject >= 2.10.0
+
+%description -n python-mate-keyring
+Python binding to MATE Keyring library.
+
+%description -n python-mate-keyring -l pl.UTF-8
+Wiązanie Pythona do biblioteki MATE Keyring.
+
+%package -n python-mate-wnck
+Summary:       Python binding to MateWnck library
+Summary(pl.UTF-8):     Wiązanie Pythona do biblioteki MateWnck
+Group:         Libraries/Python
+Requires:      libmatewnck >= 1.3.0
+Requires:      python-pygobject >= 2.10.0
+Requires:      python-pygtk-gtk >= 2:2.10.3
+
+%description -n python-mate-wnck
+Python binding to MateWnck library.
+
+%description -n python-mate-wnck -l pl.UTF-8
+Wiązanie Pythona do biblioteki MateWnck.
+
+%package common
+Summary:       Common files for Python MATE Desktop bindings
+Summary(pl.UTF-8):     Pliki wspólne wiązań Pythona do biblioteka MATE Desktop
+Group:         Libraries/Python
+Requires:      python-mate-common >= 1.4
+
+%description common
+Common files for Python MATE Desktop bindings.
+
+%description common -l pl.UTF-8
+Pliki wspólne wiązań Pythona do bibliotek MATE Desktop.
+
+%package devel
+Summary:       Development files for Python MATE Desktop bindings
+Summary(pl.UTF-8):     Pliki programistyczne wiązań Pythona do bibliotek MATE 
Desktop
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      python-atril = %{version}-%{release}
+Requires:      python-marco = %{version}-%{release}
+Requires:      python-mate-applet = %{version}-%{release}
+Requires:      python-mate-keyring = %{version}-%{release}
+Requires:      python-mate-wnck = %{version}-%{release}
+Requires:      python-pygobject-devel >= 2.10.0
+Requires:      python-pygtk-devel >= 2:2.10.3
+
+%description devel
+Development files for Python MATE Desktop bindings.
+
+%description devel -l pl.UTF-8
+Pliki programistyczne wiązań Pythona do bibliotek MATE Desktop.
+
+%package apidocs
+Summary:       API documentation for Python MATE Desktop bindings
+Summary(pl.UTF-8):     Dokumentacja API wiązań Pythona do bibliotek MATE 
Desktop
+Group:         Documentation
+
+%description apidocs
+API documentation for Python MATE Desktop bindings.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API wiązań Pythona do bibliotek MATE Desktop.
+
+%prep
+%setup -q
+%{!?with_mate14:%patch0 -p1}
+%{!?with_mate14:%patch1 -p1}
+
+%build
+# NOTE: although configure.ac contains autotools build system deprecation note,
+# it's maintained in MATE unlike waf (and there won't be any "future version")
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+# fake broken condition (affects only printed summary)
+export have_pymatecorba=true
+# disable: bugbuddy, gtksourceview, gtop, mediaprofiles, rsvg, totem_plparser 
(these belong to python-gnome-desktop)
+# disable: mateprint, mateprintui (obsolete libraries, not released for MATE 
>= 1.1)
+%configure \
+       --disable-bugbuddy \
+       --enable-gtk-doc \
+       --disable-gtksourceview \
+       --disable-gtop \
+       --enable-marco \
+       --disable-mateprint \
+       --disable-mateprintui \
+       --disable-mediaprofiles \
+       --disable-rsvg \
+       --disable-totem_plparser \
+       --with-html-dir=%{_gtkdocdir}
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT \
+       HTML_DIR=%{_gtkdocdir}
+
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gtk-2.0{,/matedesktop}/*.la
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%dir %{py_sitedir}/gtk-2.0/matedesktop
+%attr(755,root,root) %{py_sitedir}/gtk-2.0/matedesktop/_matedesktop.so
+%{py_sitedir}/gtk-2.0/matedesktop/__init__.py[co]
+
+%files -n python-atril
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/gtk-2.0/atril.so
+
+%files -n python-marco
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/gtk-2.0/marco.so
+
+%files -n python-mate-applet
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/gtk-2.0/mateapplet.so
+%{py_sitedir}/gtk-2.0/mate/applet.py[co]
+
+%files -n python-mate-keyring
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/gtk-2.0/matekeyring.so
+
+%files -n python-mate-wnck
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/gtk-2.0/matewnck.so
+
+%files common
+%defattr(644,root,root,755)
+# note: COPYING specifies which license applies to particular modules
+%doc AUTHORS COPYING ChangeLog NEWS README
+
+%files devel
+%defattr(644,root,root,755)
+%{pydefsdir}/_matedesktop.defs
+%{pydefsdir}/applet.defs
+%{pydefsdir}/atril.defs
+%{pydefsdir}/marco.defs
+%{pydefsdir}/matekeyring.defs
+%{pydefsdir}/matewnck.defs
+%{_pkgconfigdir}/mate-python-desktop-2.0.pc
+
+#%files apidocs - only for mateprint and mateprintui, so not packaged
diff --git a/python-mate-desktop-atril.patch b/python-mate-desktop-atril.patch
new file mode 100644
index 0000000..42e06ae
--- /dev/null
+++ b/python-mate-desktop-atril.patch
@@ -0,0 +1,11 @@
+--- python-mate-desktop-1.4.0/configure.ac.orig        2014-01-13 
19:58:05.435088228 +0100
++++ python-mate-desktop-1.4.0/configure.ac     2014-01-15 21:37:44.460918920 
+0100
+@@ -367,7 +367,7 @@
+ dnl should we build the atril module
+ AC_ARG_BINDING([atril],[YES])
+ if $build_atril; then
+-    PKG_CHECK_MODULES(ATRIL, [atril-document-2.32 atril-view-2.32],
++    PKG_CHECK_MODULES(ATRIL, [atril-document-1.5.0 atril-view-1.5.0],
+       build_atril=true,
+       build_atril=false)
+     if test -n "$export_dynamic"; then
diff --git a/python-mate-desktop-panel.patch b/python-mate-desktop-panel.patch
new file mode 100644
index 0000000..ad92530
--- /dev/null
+++ b/python-mate-desktop-panel.patch
@@ -0,0 +1,399 @@
+--- python-mate-desktop-1.4.0/mateapplet/appletmodule.c.orig   2012-07-11 
19:05:07.000000000 +0200
++++ python-mate-desktop-1.4.0/mateapplet/appletmodule.c        2014-01-13 
16:55:49.312213846 +0100
+@@ -44,14 +44,6 @@
+     PyModule_AddIntConstant (m, "ORIENT_LEFT", MATE_PANEL_APPLET_ORIENT_LEFT);
+     PyModule_AddIntConstant (m, "ORIENT_RIGHT", 
MATE_PANEL_APPLET_ORIENT_RIGHT);
+ 
+-    PyModule_AddIntConstant (m, "SIZE_XX_SMALL", MATE_Vertigo_PANEL_XX_SMALL);
+-    PyModule_AddIntConstant (m, "SIZE_X_SMALL", MATE_Vertigo_PANEL_X_SMALL);
+-    PyModule_AddIntConstant (m, "SIZE_SMALL", MATE_Vertigo_PANEL_SMALL);
+-    PyModule_AddIntConstant (m, "SIZE_MEDIUM", MATE_Vertigo_PANEL_MEDIUM);
+-    PyModule_AddIntConstant (m, "SIZE_LARGE", MATE_Vertigo_PANEL_LARGE);
+-    PyModule_AddIntConstant (m, "SIZE_X_LARGE", MATE_Vertigo_PANEL_X_LARGE);
+-    PyModule_AddIntConstant (m, "SIZE_XX_LARGE", MATE_Vertigo_PANEL_XX_LARGE);
+-
+     PyModule_AddIntConstant (m, "EXPAND_MAJOR", 
MATE_PANEL_APPLET_EXPAND_MAJOR);
+     PyModule_AddIntConstant (m, "EXPAND_MINOR", 
MATE_PANEL_APPLET_EXPAND_MINOR);
+     PyModule_AddIntConstant (m, "HAS_HANDLE", MATE_PANEL_APPLET_HAS_HANDLE);
+--- python-mate-desktop-1.4.0/configure.ac.orig        2014-01-13 
16:56:17.322212665 +0100
++++ python-mate-desktop-1.4.0/configure.ac     2014-01-12 21:48:21.931769757 
+0100
+@@ -155,7 +155,7 @@
+ dnl should we build the mate.applet module?
+ AC_ARG_BINDING([applet],[YES],[mate.applet])
+ if $build_applet; then
+-      PKG_CHECK_MODULES(LIBPANELAPPLET, [libmatepanelapplet-2.0 >= 
libmatepanelapplet_required_version
++      PKG_CHECK_MODULES(LIBPANELAPPLET, [libmatepanelapplet-4.0 >= 
libmatepanelapplet_required_version
+                                          mate-python-2.0 >= 
mate_python_required_version
+                                            libmate-2.0 libmateui-2.0],
+         build_applet=true,
+--- python-mate-desktop-1.4.0/mateapplet/applet.defs.orig      2012-07-11 
19:05:07.000000000 +0200
++++ python-mate-desktop-1.4.0/mateapplet/applet.defs   2014-01-13 
19:55:31.348427942 +0100
+@@ -67,22 +67,6 @@
+   )
+ )
+ 
+-(define-method get_preferences_key
+-  (of-object "MatePanelApplet")
+-  (c-name "mate_panel_applet_get_preferences_key")
+-  (return-type "gchar*")
+-)
+-
+-(define-method add_preferences
+-  (of-object "MatePanelApplet")
+-  (c-name "mate_panel_applet_add_preferences")
+-  (return-type "none")
+-  (parameters
+-    '("const-gchar*" "schema_dir")
+-    '("GError**" "opt_error")
+-  )
+-)
+-
+ (define-method get_applet_flags
+   (of-object "MatePanelApplet")
+   (c-name "mate_panel_applet_get_flags")
+@@ -98,18 +82,6 @@
+   )
+ )
+ 
+-(define-method get_control
+-  (of-object "MatePanelApplet")
+-  (c-name "mate_panel_applet_get_control")
+-  (return-type "MateComponentControl*")
+-)
+-
+-(define-method get_popup_component
+-  (of-object "MatePanelApplet")
+-  (c-name "mate_panel_applet_get_popup_component")
+-  (return-type "MateComponentUIComponent*")
+-)
+-
+ (define-method request_focus
+   (of-object "MatePanelApplet")
+   (c-name "mate_panel_applet_request_focus")
+@@ -117,30 +89,6 @@
+   (parameters
+     '("guint32" "timestamp")))
+ 
+-(define-method setup_menu
+-  (of-object "MatePanelApplet")
+-  (c-name "mate_panel_applet_setup_menu")
+-  (return-type "none")
+-  (parameters
+-    '("const-gchar*" "xml")
+-    '("const-MateComponentUIVerb*" "verb_list")
+-    '("gpointer" "user_data")
+-  )
+-)
+-
+-(define-method setup_menu_from_file
+-  (of-object "MatePanelApplet")
+-  (c-name "mate_panel_applet_setup_menu_from_file")
+-  (return-type "none")
+-  (parameters
+-    '("const-gchar*" "opt_datadir")
+-    '("const-gchar*" "file")
+-    '("const-gchar*" "opt_app_name")
+-    '("const-MateComponentUIVerb*" "verb_list")
+-    '("gpointer" "user_data")
+-  )
+-)
+-
+ (define-method set_background_widget
+   (of-object "MatePanelApplet")
+   (c-name "mate_panel_applet_set_background_widget")
+@@ -150,74 +98,3 @@
+   )
+ )
+ 
+-(define-function factory_main
+-  (c-name "mate_panel_applet_factory_main")
+-  (return-type "int")
+-  (parameters
+-    '("const-gchar*" "iid")
+-    '("GType" "applet_type")
+-    '("MatePanelAppletFactoryCallback" "callback")
+-    '("gpointer" "data")
+-  )
+-)
+-
+-(define-function factory_main
+-  (c-name "mate_panel_applet_factory_main_closure")
+-  (return-type "int")
+-  (parameters
+-    '("const-gchar*" "iid")
+-    '("GType" "applet_type")
+-    '("GClosure*" "closure")
+-  )
+-)
+-
+-(define-function mate_panel_applet_shlib_factory
+-  (c-name "mate_panel_applet_shlib_factory")
+-  (return-type "MateComponent_Unknown")
+-  (parameters
+-    '("const-char*" "iid")
+-    '("GType" "applet_type")
+-    '("PortableServer_POA" "poa")
+-    '("gpointer" "impl_ptr")
+-    '("MatePanelAppletFactoryCallback" "callback")
+-    '("gpointer" "user_data")
+-    '("CORBA_Environment*" "ev")
+-  )
+-)
+-
+-(define-function mate_panel_applet_shlib_factory_closure
+-  (c-name "mate_panel_applet_shlib_factory_closure")
+-  (return-type "MateComponent_Unknown")
+-  (parameters
+-    '("const-char*" "iid")
+-    '("GType" "applet_type")
+-    '("PortableServer_POA" "poa")
+-    '("gpointer" "impl_ptr")
+-    '("GClosure*" "closure")
+-    '("CORBA_Environment*" "ev")
+-  )
+-)
+-
+-(define-function main
+-  (c-name "main")
+-  (return-type "int")
+-  (parameters
+-    '("int" "argc")
+-    '("char*-argv" "[]")
+-  )
+-)
+-
+-(define-function matecomponent_factory
+-  (c-name "panel__applet_matecomponent_factory")
+-  (return-type "none")
+-  (parameters
+-    '("char*" "iid")
+-    '("GType" "type")
+-    '("char*" "name")
+-    '("char*" "version")
+-    '("MatePanelAppletFactoryCallback" "callback")
+-    '("gpointer" "data")    
+-  )
+-)
+-
+-
+--- python-mate-desktop-1.4.0/mateapplet/applet.override.orig  2012-07-11 
19:05:07.000000000 +0200
++++ python-mate-desktop-1.4.0/mateapplet/applet.override       2014-01-13 
19:54:22.651764255 +0100
+@@ -26,218 +26,6 @@ import gtk.Widget as PyGtkWidget_Type
+ ignore-glob
+   *_get_type
+ %%
+-override mate_panel_applet_factory_main_closure kwargs
+-static PyObject*
+-_wrap_mate_panel_applet_factory_main_closure (PyGObject * self,
+-                                       PyObject *  args,
+-                                       PyObject * kwargs)
+-{
+-    static char *kwlist[] = { "iid", "applet_type", "func", "extra_data", 
NULL };
+-    gchar *iid;
+-    PyObject *pytype;
+-    PyObject *callback;
+-    PyObject *params = NULL;
+-    GType type;
+-    int retval;
+-    
+-    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+-                                   "sOO|O:MatePanelAppletFactory.__init__",
+-                                   kwlist, &iid, &pytype, &callback, 
&params)) {
+-        return NULL;
+-    }
+-
+-    if (!PyCallable_Check (callback)) {
+-        PyErr_SetString (PyExc_TypeError, "second arg not callable");
+-      return NULL;
+-    }
+-    
+-    type = pyg_type_from_object (pytype);
+-    
+-    pyg_begin_allow_threads;
+-    retval = mate_panel_applet_factory_main_closure (iid,
+-                                              type,
+-                                                pyg_closure_new (callback, 
params, NULL));
+-    pyg_end_allow_threads;
+-    return PyInt_FromLong (retval);
+-}
+-%%
+-override panel__applet_matecomponent_factory kwargs
+-static PyObject *
+-_wrap_panel__applet_matecomponent_factory (PyGObject * self,
+-                                  PyObject *  args,
+-                                  PyObject * kwargs)
+-{
+-      static char *kwlist[] = { "iid", "type", "name", "version", "func", 
"extra_data", NULL };
+-      gchar *iid;
+-      PyObject *pytype;
+-      gchar *name;
+-      gchar *version;
+-      PyObject *callback;
+-      PyObject *params = NULL;
+-      GType type;
+-      PyObject *av;
+-      int argc;
+-      char **argv;
+-      int i;
+-      
+-      if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+-                                       
"sOssO|O:mate.applet.matecomponent_factory",
+-                                       kwlist, &iid, &pytype, &name, 
&version, &callback, &params)) {
+-              return NULL;
+-      }
+-      
+-      if (!PyCallable_Check (callback)) {
+-              PyErr_SetString (PyExc_TypeError, "second arg not callable");
+-              return NULL;
+-      }
+-      
+-      type = pyg_type_from_object (pytype);
+-      
+-      /* get argc and argv */
+-      av = PySys_GetObject ("argv");
+-      argc = PyList_Size (av);
+-      argv = g_new (char *, argc);
+-      for (i = 0; i < argc; i++) {
+-              argv[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i)));
+-      }
+-      
+-      mate_program_init (name, version,     
+-                          LIBMATEUI_MODULE,             
+-                          argc, argv,                                         
+-                          MATE_PARAM_NONE,
+-                            MATE_CLIENT_PARAM_SM_CONNECT, FALSE,
+-                          NULL);            
+-
+-        pyg_begin_allow_threads;
+-        mate_panel_applet_factory_main_closure (iid,
+-                                         type,
+-                                         pyg_closure_new (callback, params, 
NULL));
+-        pyg_end_allow_threads;
+-      
+-      /* TODO: Check if it's really neccessary to set argc and argv here */
+-      PySys_SetArgv (argc, argv);
+-      if (argv != NULL) {
+-              for (i = 0; i < argc; i++)
+-                      g_free (argv[i]);
+-              g_free (argv);
+-      }
+-      
+-      Py_INCREF (Py_None);
+-      return Py_None;
+-}
+-%%
+-override mate_panel_applet_setup_menu kwargs
+-static PyObject *
+-_wrap_mate_panel_applet_setup_menu (PyGObject * self,
+-                             PyObject *  args,
+-                             PyObject *  kwargs)
+-{
+-    static char *kwlist[] = { "xml", "list", "extra_data", NULL };
+-    gchar *             xml;
+-    PyObject *          list;
+-    PyObject *          params = NULL;
+-    MateComponentUIComponent * popup_component;
+-    int                 len, i;
+-    PyObject *          item;
+-    char *              cname;
+-    PyObject *          callback;
+-    
+-    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+-                                    "sO|O:MatePanelApplet.setup_menu", 
+-                                    kwlist, &xml, &list, &params)) {
+-      return NULL;
+-    }
+-
+-    if (!PySequence_Check (list)) {
+-      PyErr_SetString (PyExc_TypeError, "entries must be a sequence");
+-      return NULL;
+-    }
+-    
+-    /* Copied from mate-panel-applet.c */
+-    popup_component = mate_panel_applet_get_popup_component 
(MATE_PANEL_APPLET (self->obj));
+-          
+-    matecomponent_ui_component_set (popup_component, "/", "<popups/>", NULL);
+- 
+-    matecomponent_ui_component_set_translate (popup_component, "/popups", 
xml, NULL);
+-    /* end copy */
+-    
+-    len = PySequence_Size (list);
+-    for (i = 0; i < len; i++) {
+-      item = PySequence_GetItem (list, i);
+-      Py_DECREF (item);
+-      
+-      if (!PyArg_ParseTuple (item, "sO", &cname, &callback)) {
+-          return NULL;
+-      }
+-
+-      matecomponent_ui_component_add_verb_full (popup_component, cname,
+-                                         pyg_closure_new (callback, params, 
NULL));
+-    }
+-
+-    Py_INCREF(Py_None);
+-    return Py_None;
+-}
+-%%
+-override mate_panel_applet_setup_menu_from_file kwargs
+-static PyObject *
+-_wrap_mate_panel_applet_setup_menu_from_file (PyGObject * self,
+-                                       PyObject *  args,
+-                                       PyObject *  kwargs)
+-{
+-    static char *kwlist[] = { "opt_datadir", "file", "opt_app_name", "list", 
"extra_data", NULL };
+-    gchar *             opt_datadir;
+-    gchar *             file;
+-    gchar *             opt_app_name;
+-    PyObject *          list;
+-    PyObject *          params = NULL;
+-    MateComponentUIComponent * popup_component;
+-    gchar *             app_name = NULL;
+-    int                 len, i;
+-    PyObject *          item;
+-    char *              cname;
+-    PyObject *          callback;
+-    
+-    if (!PyArg_ParseTupleAndKeywords (args, kwargs,
+-                                    
"zszO|O:MatePanelApplet.setup_menu_from_file", 
+-                                    kwlist, &opt_datadir, &file, 
&opt_app_name, &list, &params)) {
+-      return NULL;
+-    }
+-
+-    if (!PySequence_Check (list)) {
+-      PyErr_SetString (PyExc_TypeError, "entries must be a sequence");
+-      return NULL;
+-    }
+-    
+-    /* Copied from mate-panel-applet.c */
+-    if (!opt_app_name)
+-      opt_app_name = app_name = g_strdup_printf ("%d", getpid ());
+-
+-    popup_component = mate_panel_applet_get_popup_component 
(MATE_PANEL_APPLET (self->obj));
+-
+-    matecomponent_ui_util_set_ui (popup_component, opt_datadir, file, 
opt_app_name, NULL);
+-    /* end copy */
+-    
+-    len = PySequence_Size (list);
+-    for (i = 0; i < len; i++) {
+-      item = PySequence_GetItem (list, i);
+-      Py_DECREF (item);
+-      
+-      if (!PyArg_ParseTuple (item, "sO", &cname, &callback)) {
+-          return NULL;
+-      }
+-
+-      matecomponent_ui_component_add_verb_full (popup_component, cname,
+-                                         pyg_closure_new (callback, params, 
NULL));
+-    }
+-    
+-    if (app_name) {
+-      g_free (app_name);
+-    }
+-    
+-    Py_INCREF(Py_None);
+-    return Py_None;
+-}
+-%%
+ override mate_panel_applet_new noargs
+ static int
+ _wrap_mate_panel_applet_new(PyGObject *self, PyObject *args, PyObject *kwargs)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-mate-desktop.git/commitdiff/0479540611c2f5971bf394e829cf232230b0f87b

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to