diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-01-25 00:33:33 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-01-25 00:33:33 +0800 |
commit | a687b7c513d3bb967781f17dc5d247161bcffd8c (patch) | |
tree | 116b335b3c4fe96ddd09c64e9aa382516168af03 /python | |
parent | ff21a5f6bfedae8ca32ac871ccad5c106e831b28 (diff) | |
download | gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar.gz gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar.bz2 gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar.lz gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar.xz gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.tar.zst gsoc2013-empathy-a687b7c513d3bb967781f17dc5d247161bcffd8c.zip |
Remove EmpathyPresence object and have "presence" and "presence-message" properties directly in EmpathyContact
svn path=/trunk/; revision=601
Diffstat (limited to 'python')
-rw-r--r-- | python/README | 2 | ||||
-rw-r--r-- | python/pyempathy.patch | 35 | ||||
-rw-r--r-- | python/pyempathy/pyempathy.defs | 137 | ||||
-rw-r--r-- | python/pyempathy/pyempathy.override | 1 | ||||
-rw-r--r-- | python/pyempathygtk/pyempathygtk.defs | 19 |
5 files changed, 88 insertions, 106 deletions
diff --git a/python/README b/python/README index f9c121b5f..127254381 100644 --- a/python/README +++ b/python/README @@ -15,5 +15,7 @@ Manually modify pyempathy.defs, ContactList is not an object but an interface: ContactManager, TpChatroom and TpContactList implements ContactList interface: (implements "EmpathyContactList") +That can be done by applying pyempathy.patch + 3) Manually update headers in pyempathy.override and pyempathygtk.override. diff --git a/python/pyempathy.patch b/python/pyempathy.patch new file mode 100644 index 000000000..497ec4fe7 --- /dev/null +++ b/python/pyempathy.patch @@ -0,0 +1,35 @@ +--- pyempathy.defs 2008-01-24 16:03:39.000000000 +0100 ++++ pyempathy/pyempathy.defs 2008-01-24 16:04:34.000000000 +0100 +@@ -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") + (parent "GObject") ++ (implements "EmpathyContactList") + (c-name "EmpathyContactManager") + (gtype-id "EMPATHY_TYPE_CONTACT_MANAGER") + ) +@@ -93,6 +94,7 @@ + (define-object TpChatroom + (in-module "Empathy") + (parent "EmpathyTpChat") ++ (implements "EmpathyContactList") + (c-name "EmpathyTpChatroom") + (gtype-id "EMPATHY_TYPE_TP_CHATROOM") + ) +@@ -107,6 +109,7 @@ + (define-object TpContactList + (in-module "Empathy") + (parent "GObject") ++ (implements "EmpathyContactList") + (c-name "EmpathyTpContactList") + (gtype-id "EMPATHY_TYPE_TP_CONTACT_LIST") + ) diff --git a/python/pyempathy/pyempathy.defs b/python/pyempathy/pyempathy.defs index f6c7e0b80..7f7381fa7 100644 --- a/python/pyempathy/pyempathy.defs +++ b/python/pyempathy/pyempathy.defs @@ -77,13 +77,6 @@ (gtype-id "EMPATHY_TYPE_MESSAGE") ) -(define-object Presence - (in-module "Empathy") - (parent "GObject") - (c-name "EmpathyPresence") - (gtype-id "EMPATHY_TYPE_PRESENCE") -) - (define-object TpCall (in-module "Empathy") (parent "GObject") @@ -602,7 +595,7 @@ (define-method get_presence (of-object "EmpathyContact") (c-name "empathy_contact_get_presence") - (return-type "EmpathyPresence*") + (return-type "McPresence") ) (define-method set_presence @@ -610,7 +603,22 @@ (c-name "empathy_contact_set_presence") (return-type "none") (parameters - '("EmpathyPresence*" "presence") + '("McPresence" "presence") + ) +) + +(define-method get_presence_message + (of-object "EmpathyContact") + (c-name "empathy_contact_get_presence_message") + (return-type "const-gchar*") +) + +(define-method set_presence_message + (of-object "EmpathyContact") + (c-name "empathy_contact_set_presence_message") + (return-type "none") + (parameters + '("const-gchar*" "message") ) ) @@ -1205,93 +1213,6 @@ -;; From empathy-presence.h - -(define-function empathy_presence_get_type - (c-name "empathy_presence_get_type") - (return-type "GType") -) - -(define-function empathy_presence_new - (c-name "empathy_presence_new") - (is-constructor-of "EmpathyPresence") - (return-type "EmpathyPresence*") -) - -(define-function empathy_presence_new_full - (c-name "empathy_presence_new_full") - (return-type "EmpathyPresence*") - (parameters - '("McPresence" "state") - '("const-gchar*" "status") - ) -) - -(define-method get_state - (of-object "EmpathyPresence") - (c-name "empathy_presence_get_state") - (return-type "McPresence") -) - -(define-method get_status - (of-object "EmpathyPresence") - (c-name "empathy_presence_get_status") - (return-type "const-gchar*") -) - -(define-method set_state - (of-object "EmpathyPresence") - (c-name "empathy_presence_set_state") - (return-type "none") - (parameters - '("McPresence" "state") - ) -) - -(define-method set_status - (of-object "EmpathyPresence") - (c-name "empathy_presence_set_status") - (return-type "none") - (parameters - '("const-gchar*" "status") - ) -) - -(define-function empathy_presence_sort_func - (c-name "empathy_presence_sort_func") - (return-type "gint") - (parameters - '("gconstpointer" "a") - '("gconstpointer" "b") - ) -) - -(define-function empathy_presence_state_get_default_status - (c-name "empathy_presence_state_get_default_status") - (return-type "const-gchar*") - (parameters - '("McPresence" "state") - ) -) - -(define-function empathy_presence_state_to_str - (c-name "empathy_presence_state_to_str") - (return-type "const-gchar*") - (parameters - '("McPresence" "state") - ) -) - -(define-function empathy_presence_state_from_str - (c-name "empathy_presence_state_from_str") - (return-type "McPresence") - (parameters - '("const-gchar*" "str") - ) -) - - - ;; From empathy-status-presets.h (define-function empathy_status_presets_get_all @@ -2058,6 +1979,30 @@ ) ) +(define-function empathy_presence_get_default_message + (c-name "empathy_presence_get_default_message") + (return-type "const-gchar*") + (parameters + '("McPresence" "presence") + ) +) + +(define-function empathy_presence_to_str + (c-name "empathy_presence_to_str") + (return-type "const-gchar*") + (parameters + '("McPresence" "presence") + ) +) + +(define-function empathy_presence_from_str + (c-name "empathy_presence_from_str") + (return-type "McPresence") + (parameters + '("const-gchar*" "str") + ) +) + ;; From tp-stream-engine-gen.h diff --git a/python/pyempathy/pyempathy.override b/python/pyempathy/pyempathy.override index a21700fca..7425972ea 100644 --- a/python/pyempathy/pyempathy.override +++ b/python/pyempathy/pyempathy.override @@ -15,7 +15,6 @@ headers #include "empathy-idle.h" #include "empathy-log-manager.h" #include "empathy-message.h" -#include "empathy-presence.h" #include "empathy-status-presets.h" #include "empathy-time.h" #include "empathy-tp-chat.h" diff --git a/python/pyempathygtk/pyempathygtk.defs b/python/pyempathygtk/pyempathygtk.defs index a8412437f..2a375786a 100644 --- a/python/pyempathygtk/pyempathygtk.defs +++ b/python/pyempathygtk/pyempathygtk.defs @@ -1349,6 +1349,15 @@ ) ) +(define-function empathy_contact_widget_set_contact + (c-name "empathy_contact_widget_set_contact") + (return-type "none") + (parameters + '("GtkWidget*" "widget") + '("EmpathyContact*" "contact") + ) +) + (define-function empathy_contact_widget_set_account_filter (c-name "empathy_contact_widget_set_account_filter") (return-type "none") @@ -1921,19 +1930,11 @@ ) ) -(define-function empathy_icon_name_for_presence_state - (c-name "empathy_icon_name_for_presence_state") - (return-type "const-gchar*") - (parameters - '("McPresence" "state") - ) -) - (define-function empathy_icon_name_for_presence (c-name "empathy_icon_name_for_presence") (return-type "const-gchar*") (parameters - '("EmpathyPresence*" "presence") + '("McPresence" "presence") ) ) |