]> git.0d.be Git - empathy.git/commitdiff
Update python binding
authorXavier Claessens <xclaesse@src.gnome.org>
Mon, 2 Feb 2009 20:10:14 +0000 (20:10 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Mon, 2 Feb 2009 20:10:14 +0000 (20:10 +0000)
svn path=/trunk/; revision=2374

python/pyempathy.patch
python/pyempathy/pyempathy.defs
python/pyempathygtk/pyempathygtk.defs
python/pyempathygtk/pyempathygtk.override
python/update-binding.sh

index f7de6a4403f45b15af807982947efc96fe64df24..06c4692c8d5c607d070f67b9bb90de35b8d7ea87 100644 (file)
@@ -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")
index c67567b4ab3bc1e52c6e4ac67b3b6a0aa1aacd13..62c1d75a90fb9cd907940788ee87848fb22c7130 100644 (file)
   )
 )
 
+(define-method get_count
+  (of-object "EmpathyAccountManager")
+  (c-name "empathy_account_manager_get_count")
+  (return-type "int")
+)
+
 
 
 ;; From empathy-chatroom.h
   )
 )
 
+(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")
index 8aa5ad61d999cf5f5602ee39ea9d3ac5eb8a4ba9..fc168e1137df42773aaa4471b3ecd31eff96f418 100644 (file)
   (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")
 
 
 
+;; 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
   )
 )
 
+(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")
index 60edf72379af035aa1399efba516309f95b91942..40d63848b856d05c70019fa3bc5ae36b4cac2f07 100644 (file)
@@ -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"
index 7941d6ac1f301735fb03fa2a9a92aee71ec12f5c..226dfa2e5d5bfa2be70fcbc1804f6a674cd14f8b 100755 (executable)
@@ -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