aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-02-03 04:10:14 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-02-03 04:10:14 +0800
commit02ec04d37187384bca8d5e9d32a02b458e499cab (patch)
tree721bf2baa483f79216dbcf37ecac43f7b470b96d
parentba7fd51db505c502f721e1e116a31f23a4f5fae3 (diff)
downloadgsoc2013-empathy-02ec04d37187384bca8d5e9d32a02b458e499cab.tar
gsoc2013-empathy-02ec04d37187384bca8d5e9d32a02b458e499cab.tar.gz
gsoc2013-empathy-02ec04d37187384bca8d5e9d32a02b458e499cab.tar.bz2
gsoc2013-empathy-02ec04d37187384bca8d5e9d32a02b458e499cab.tar.lz
gsoc2013-empathy-02ec04d37187384bca8d5e9d32a02b458e499cab.tar.xz
gsoc2013-empathy-02ec04d37187384bca8d5e9d32a02b458e499cab.tar.zst
gsoc2013-empathy-02ec04d37187384bca8d5e9d32a02b458e499cab.zip
Update python binding
svn path=/trunk/; revision=2374
-rw-r--r--python/pyempathy.patch9
-rw-r--r--python/pyempathy/pyempathy.defs11
-rw-r--r--python/pyempathygtk/pyempathygtk.defs40
-rw-r--r--python/pyempathygtk/pyempathygtk.override1
-rwxr-xr-xpython/update-binding.sh5
5 files changed, 56 insertions, 10 deletions
diff --git a/python/pyempathy.patch b/python/pyempathy.patch
index f7de6a440..06c4692c8 100644
--- a/python/pyempathy.patch
+++ b/python/pyempathy.patch
@@ -1,14 +1,5 @@
--- /home/zdra/Desktop/pyempathy.defs 2008-04-02 11:08:02.000000000 +0200
+++ pyempathy/pyempathy.defs 2008-04-02 11:28:00.000000000 +0200
-@@ -35,7 +35,7 @@
- (gtype-id "EMPATHY_TYPE_CONTACT_FACTORY")
- )
-
--(define-object ContactList
-+(define-interface ContactList
- (in-module "Empathy")
- (c-name "EmpathyContactList")
- (gtype-id "EMPATHY_TYPE_CONTACT_LIST")
@@ -44,6 +44,7 @@
(define-object ContactManager
(in-module "Empathy")
diff --git a/python/pyempathy/pyempathy.defs b/python/pyempathy/pyempathy.defs
index c67567b4a..62c1d75a9 100644
--- a/python/pyempathy/pyempathy.defs
+++ b/python/pyempathy/pyempathy.defs
@@ -290,6 +290,12 @@
)
)
+(define-method get_count
+ (of-object "EmpathyAccountManager")
+ (c-name "empathy_account_manager_get_count")
+ (return-type "int")
+)
+
;; From empathy-chatroom.h
@@ -2695,6 +2701,11 @@
)
)
+(define-function check_available_state
+ (c-name "empathy_check_available_state")
+ (return-type "gboolean")
+)
+
(define-function start_call_with_contact
(c-name "empathy_start_call_with_contact")
(return-type "none")
diff --git a/python/pyempathygtk/pyempathygtk.defs b/python/pyempathygtk/pyempathygtk.defs
index 8aa5ad61d..fc168e113 100644
--- a/python/pyempathygtk/pyempathygtk.defs
+++ b/python/pyempathygtk/pyempathygtk.defs
@@ -83,6 +83,13 @@
(gtype-id "EMPATHY_TYPE_CONTACT_LIST_VIEW")
)
+(define-object ContactSelector
+ (in-module "Empathy")
+ (parent "GtkComboBox")
+ (c-name "EmpathyContactSelector")
+ (gtype-id "EMPATHY_TYPE_CONTACT_SELECTOR")
+)
+
(define-object PresenceChooser
(in-module "Empathy")
(parent "GtkToggleButton")
@@ -1164,6 +1171,30 @@
+;; From empathy-contact-selector.h
+
+(define-function contact_selector_get_type
+ (c-name "empathy_contact_selector_get_type")
+ (return-type "GType")
+)
+
+(define-function contact_selector_new
+ (c-name "empathy_contact_selector_new")
+ (is-constructor-of "EmpathyContactSelector")
+ (return-type "GtkWidget*")
+ (parameters
+ '("EmpathyContactList*" "contact_list")
+ )
+)
+
+(define-method dup_selected
+ (of-object "EmpathyContactSelector")
+ (c-name "empathy_contact_selector_dup_selected")
+ (return-type "EmpathyContact*")
+)
+
+
+
;; From empathy-contact-widget.h
(define-method widget_new
@@ -1654,6 +1685,15 @@
)
)
+(define-function pixbuf_from_icon_name_sized
+ (c-name "empathy_pixbuf_from_icon_name_sized")
+ (return-type "GdkPixbuf*")
+ (parameters
+ '("const-gchar*" "icon_name")
+ '("gint" "size")
+ )
+)
+
(define-function text_iter_forward_search
(c-name "empathy_text_iter_forward_search")
(return-type "gboolean")
diff --git a/python/pyempathygtk/pyempathygtk.override b/python/pyempathygtk/pyempathygtk.override
index 60edf7237..40d63848b 100644
--- a/python/pyempathygtk/pyempathygtk.override
+++ b/python/pyempathygtk/pyempathygtk.override
@@ -16,6 +16,7 @@ headers
#include "empathy-contact-dialogs.h"
#include "empathy-contact-list-store.h"
#include "empathy-contact-list-view.h"
+#include "empathy-contact-selector.h"
#include "empathy-contact-widget.h"
#include "empathy-geometry.h"
#include "empathy-gtk-enum-types.h"
diff --git a/python/update-binding.sh b/python/update-binding.sh
index 7941d6ac1..226dfa2e5 100755
--- a/python/update-binding.sh
+++ b/python/update-binding.sh
@@ -59,6 +59,7 @@ python /usr/share/pygobject/2.0/codegen/h2def.py \
empathy-contact-list-store.h \
empathy-contact-list-view.h \
empathy-contact-menu.h \
+ empathy-contact-selector.h \
empathy-contact-widget.h \
empathy-geometry.h \
empathy-images.h \
@@ -85,9 +86,11 @@ cp pyempathygtk/pyempathygtk.defs /tmp
patch -p0 < pyempathy.patch
patch -p0 < pyempathygtk.patch
-# Chatview is an interface not an object
+# Fix define of interfaces, they are not objects
sed -e 's/define-object \(ChatView$\)/define-interface \1/' \
-i pyempathygtk/pyempathygtk.defs
+sed -e 's/define-object \(ContactList$\)/define-interface \1/' \
+ -i pyempathy/pyempathy.defs
# Make modification then run that:
#diff -up /tmp/pyempathy.defs pyempathy/pyempathy.defs > pyempathy.patch