diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-02 17:42:29 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-02 17:42:29 +0800 |
commit | fd3fa32bca7a915619aec8af502b02d2b012b826 (patch) | |
tree | 908807aae33d644aa366826f7a0a70e9522cd4a5 | |
parent | 94627ccafc42066fe45265612bbdc88e8b5671d1 (diff) | |
download | gsoc2013-empathy-fd3fa32bca7a915619aec8af502b02d2b012b826.tar.gz gsoc2013-empathy-fd3fa32bca7a915619aec8af502b02d2b012b826.tar.zst gsoc2013-empathy-fd3fa32bca7a915619aec8af502b02d2b012b826.zip |
Update python binding
svn path=/trunk/; revision=859
-rwxr-xr-x[-rw-r--r--] | python/example.py | 0 | ||||
-rw-r--r-- | python/pyempathy.patch | 14 | ||||
-rw-r--r-- | python/pyempathy/pyempathy.defs | 92 | ||||
-rw-r--r-- | python/pyempathy/pyempathy.override | 1 | ||||
-rw-r--r-- | python/pyempathygtk/pyempathygtk.defs | 235 | ||||
-rw-r--r-- | python/pyempathygtk/pyempathygtk.override | 4 | ||||
-rwxr-xr-x | python/update-binding.sh | 13 |
7 files changed, 101 insertions, 258 deletions
diff --git a/python/example.py b/python/example.py index cffd5fffb..cffd5fffb 100644..100755 --- a/python/example.py +++ b/python/example.py diff --git a/python/pyempathy.patch b/python/pyempathy.patch index 497ec4fe7..f7de6a440 100644 --- a/python/pyempathy.patch +++ b/python/pyempathy.patch @@ -1,5 +1,5 @@ ---- pyempathy.defs 2008-01-24 16:03:39.000000000 +0100 -+++ pyempathy/pyempathy.defs 2008-01-24 16:04:34.000000000 +0100 +--- /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") ) @@ -17,15 +17,7 @@ (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 @@ +@@ -121,6 +122,7 @@ (define-object TpContactList (in-module "Empathy") (parent "GObject") diff --git a/python/pyempathy/pyempathy.defs b/python/pyempathy/pyempathy.defs index d75155c4c..ef46a7b38 100644 --- a/python/pyempathy/pyempathy.defs +++ b/python/pyempathy/pyempathy.defs @@ -112,14 +112,6 @@ (gtype-id "EMPATHY_TYPE_TP_CHAT") ) -(define-object TpChatroom - (in-module "Empathy") - (parent "EmpathyTpChat") - (implements "EmpathyContactList") - (c-name "EmpathyTpChatroom") - (gtype-id "EMPATHY_TYPE_TP_CHATROOM") -) - (define-object TpContactFactory (in-module "Empathy") (parent "GObject") @@ -562,6 +554,15 @@ ) ) +(define-function empathy_file_lookup + (c-name "empathy_file_lookup") + (return-type "gchar*") + (parameters + '("const-gchar*" "filename") + '("const-gchar*" "subdir") + ) +) + ;; From empathy-message.h @@ -664,6 +665,12 @@ ) ) +(define-method should_highlight + (of-object "EmpathyMessage") + (c-name "empathy_message_should_highlight") + (return-type "gboolean") +) + (define-function empathy_message_type_from_str (c-name "empathy_message_type_from_str") (return-type "EmpathyMessageType") @@ -1539,6 +1546,7 @@ (parameters '("McAccount*" "account") '("TpChan*" "tp_chan") + '("gboolean" "acknowledge") ) ) @@ -1550,21 +1558,6 @@ ) ) -(define-method get_acknowledge - (of-object "EmpathyTpChat") - (c-name "empathy_tp_chat_get_acknowledge") - (return-type "gboolean") -) - -(define-method set_acknowledge - (of-object "EmpathyTpChat") - (c-name "empathy_tp_chat_set_acknowledge") - (return-type "none") - (parameters - '("gboolean" "acknowledge") - ) -) - (define-method get_account (of-object "EmpathyTpChat") (c-name "empathy_tp_chat_get_account") @@ -1577,6 +1570,18 @@ (return-type "TpChan*") ) +(define-method get_id + (of-object "EmpathyTpChat") + (c-name "empathy_tp_chat_get_id") + (return-type "const-gchar*") +) + +(define-method get_remote_contact + (of-object "EmpathyTpChat") + (c-name "empathy_tp_chat_get_remote_contact") + (return-type "EmpathyContact*") +) + (define-method send (of-object "EmpathyTpChat") (c-name "empathy_tp_chat_send") @@ -1595,12 +1600,6 @@ ) ) -(define-method get_id - (of-object "EmpathyTpChat") - (c-name "empathy_tp_chat_get_id") - (return-type "const-gchar*") -) - (define-method set_property (of-object "EmpathyTpChat") (c-name "empathy_tp_chat_set_property") @@ -1613,41 +1612,6 @@ -;; From empathy-tp-chatroom.h - -(define-function empathy_tp_chatroom_get_type - (c-name "empathy_tp_chatroom_get_type") - (return-type "GType") -) - -(define-function empathy_tp_chatroom_new - (c-name "empathy_tp_chatroom_new") - (is-constructor-of "EmpathyTpChatroom") - (return-type "EmpathyTpChatroom*") - (parameters - '("McAccount*" "account") - '("TpChan*" "tp_chan") - ) -) - -(define-method get_invitation - (of-object "EmpathyTpChatroom") - (c-name "empathy_tp_chatroom_get_invitation") - (return-type "gboolean") - (parameters - '("EmpathyContact**" "contact") - '("const-gchar**" "message") - ) -) - -(define-method accept_invitation - (of-object "EmpathyTpChatroom") - (c-name "empathy_tp_chatroom_accept_invitation") - (return-type "none") -) - - - ;; From empathy-tp-roomlist.h (define-function empathy_tp_roomlist_get_type diff --git a/python/pyempathy/pyempathy.override b/python/pyempathy/pyempathy.override index 64b65e920..c5b70c17c 100644 --- a/python/pyempathy/pyempathy.override +++ b/python/pyempathy/pyempathy.override @@ -24,7 +24,6 @@ headers #include "empathy-time.h" #include "empathy-tp-call.h" #include "empathy-tp-chat.h" -#include "empathy-tp-chatroom.h" #include "empathy-tp-contact-factory.h" #include "empathy-tp-contact-list.h" #include "empathy-tp-group.h" diff --git a/python/pyempathygtk/pyempathygtk.defs b/python/pyempathygtk/pyempathygtk.defs index f50676043..d75152702 100644 --- a/python/pyempathygtk/pyempathygtk.defs +++ b/python/pyempathygtk/pyempathygtk.defs @@ -44,7 +44,7 @@ (define-object Chat (in-module "Empathy") - (parent "GObject") + (parent "GtkBin") (c-name "EmpathyChat") (gtype-id "EMPATHY_TYPE_CHAT") ) @@ -77,13 +77,6 @@ (gtype-id "EMPATHY_TYPE_CONTACT_LIST_VIEW") ) -(define-object GroupChat - (in-module "Empathy") - (parent "EmpathyChat") - (c-name "EmpathyGroupChat") - (gtype-id "EMPATHY_TYPE_GROUP_CHAT") -) - (define-object PresenceChooser (in-module "Empathy") (parent "GtkToggleButton") @@ -91,13 +84,6 @@ (gtype-id "EMPATHY_TYPE_PRESENCE_CHOOSER") ) -(define-object PrivateChat - (in-module "Empathy") - (parent "EmpathyChat") - (c-name "EmpathyPrivateChat") - (gtype-id "EMPATHY_TYPE_PRIVATE_CHAT") -) - (define-object SmileyManager (in-module "Empathy") (parent "GObject") @@ -279,40 +265,40 @@ (return-type "GType") ) -(define-method get_view - (of-object "EmpathyChat") - (c-name "empathy_chat_get_view") - (return-type "EmpathyChatView*") -) - -(define-method clear - (of-object "EmpathyChat") - (c-name "empathy_chat_clear") - (return-type "none") +(define-function empathy_chat_new + (c-name "empathy_chat_new") + (is-constructor-of "EmpathyChat") + (return-type "EmpathyChat*") + (parameters + '("EmpathyTpChat*" "tp_chat") + ) ) -(define-method scroll_down +(define-method get_tp_chat (of-object "EmpathyChat") - (c-name "empathy_chat_scroll_down") - (return-type "none") + (c-name "empathy_chat_get_tp_chat") + (return-type "EmpathyTpChat*") ) -(define-method cut +(define-method set_tp_chat (of-object "EmpathyChat") - (c-name "empathy_chat_cut") + (c-name "empathy_chat_set_tp_chat") (return-type "none") + (parameters + '("EmpathyTpChat*" "tp_chat") + ) ) -(define-method copy +(define-method get_account (of-object "EmpathyChat") - (c-name "empathy_chat_copy") - (return-type "none") + (c-name "empathy_chat_get_account") + (return-type "McAccount*") ) -(define-method paste +(define-method get_id (of-object "EmpathyChat") - (c-name "empathy_chat_paste") - (return-type "none") + (c-name "empathy_chat_get_id") + (return-type "const-gchar*") ) (define-method get_name @@ -321,87 +307,40 @@ (return-type "const-gchar*") ) -(define-method get_tooltip +(define-method get_subject (of-object "EmpathyChat") - (c-name "empathy_chat_get_tooltip") - (return-type "gchar*") -) - -(define-method get_status_icon_name - (of-object "EmpathyChat") - (c-name "empathy_chat_get_status_icon_name") + (c-name "empathy_chat_get_subject") (return-type "const-gchar*") ) -(define-method get_widget - (of-object "EmpathyChat") - (c-name "empathy_chat_get_widget") - (return-type "GtkWidget*") -) - -(define-method is_group_chat - (of-object "EmpathyChat") - (c-name "empathy_chat_is_group_chat") - (return-type "gboolean") -) - -(define-method is_connected - (of-object "EmpathyChat") - (c-name "empathy_chat_is_connected") - (return-type "gboolean") -) - -(define-method save_geometry +(define-method clear (of-object "EmpathyChat") - (c-name "empathy_chat_save_geometry") + (c-name "empathy_chat_clear") (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "w") - '("gint" "h") - ) ) -(define-method load_geometry +(define-method scroll_down (of-object "EmpathyChat") - (c-name "empathy_chat_load_geometry") + (c-name "empathy_chat_scroll_down") (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - '("gint*" "w") - '("gint*" "h") - ) ) -(define-method set_tp_chat +(define-method cut (of-object "EmpathyChat") - (c-name "empathy_chat_set_tp_chat") + (c-name "empathy_chat_cut") (return-type "none") - (parameters - '("EmpathyTpChat*" "tp_chat") - ) ) -(define-method get_id +(define-method copy (of-object "EmpathyChat") - (c-name "empathy_chat_get_id") - (return-type "const-gchar*") + (c-name "empathy_chat_copy") + (return-type "none") ) -(define-method get_account +(define-method paste (of-object "EmpathyChat") - (c-name "empathy_chat_get_account") - (return-type "McAccount*") -) - -(define-function empathy_chat_get_is_command - (c-name "empathy_chat_get_is_command") - (return-type "gboolean") - (parameters - '("const-gchar*" "str") - ) + (c-name "empathy_chat_paste") + (return-type "none") ) (define-method correct_word @@ -415,20 +354,6 @@ ) ) -(define-method should_play_sound - (of-object "EmpathyChat") - (c-name "empathy_chat_should_play_sound") - (return-type "gboolean") -) - -(define-function empathy_chat_should_highlight_nick - (c-name "empathy_chat_should_highlight_nick") - (return-type "gboolean") - (parameters - '("EmpathyMessage*" "message") - ) -) - ;; From empathy-irc-network-dialog.h @@ -774,6 +699,24 @@ ) ) +(define-function empathy_account_widget_sip_new + (c-name "empathy_account_widget_sip_new") + (is-constructor-of "EmpathyAccountWidgetSip") + (return-type "GtkWidget*") + (parameters + '("McAccount*" "account") + ) +) + +(define-function empathy_account_widget_groupwise_new + (c-name "empathy_account_widget_groupwise_new") + (is-constructor-of "EmpathyAccountWidgetGroupwise") + (return-type "GtkWidget*") + (parameters + '("McAccount*" "account") + ) +) + ;; From empathy-conf.h @@ -1099,10 +1042,13 @@ (return-type "GType") ) -(define-method store_new - (of-object "EmpathyContactList") +(define-function empathy_contact_list_store_new + (is-constructor-of "EmpathyContactListStore") (c-name "empathy_contact_list_store_new") (return-type "EmpathyContactListStore*") + (parameters + '("EmpathyContactList*" "list_iface") + ) ) (define-method get_list_iface @@ -1363,30 +1309,6 @@ -;; From empathy-private-chat.h - -(define-function empathy_private_chat_get_type - (c-name "empathy_private_chat_get_type") - (return-type "GType") -) - -(define-function empathy_private_chat_new - (c-name "empathy_private_chat_new") - (is-constructor-of "EmpathyPrivateChat") - (return-type "EmpathyPrivateChat*") - (parameters - '("EmpathyTpChat*" "tp_chat") - ) -) - -(define-method get_contact - (of-object "EmpathyPrivateChat") - (c-name "empathy_private_chat_get_contact") - (return-type "EmpathyContact*") -) - - - ;; From empathy-ui-utils.h (define-function empathy_glade_get_file_simple @@ -1809,45 +1731,6 @@ -;; From empathy-group-chat.h - -(define-function empathy_group_chat_get_type - (c-name "empathy_group_chat_get_type") - (return-type "GType") -) - -(define-function empathy_group_chat_new - (c-name "empathy_group_chat_new") - (is-constructor-of "EmpathyGroupChat") - (return-type "EmpathyGroupChat*") - (parameters - '("EmpathyTpChatroom*" "tp_chat") - ) -) - -(define-method get_show_contacts - (of-object "EmpathyGroupChat") - (c-name "empathy_group_chat_get_show_contacts") - (return-type "gboolean") -) - -(define-method set_show_contacts - (of-object "EmpathyGroupChat") - (c-name "empathy_group_chat_set_show_contacts") - (return-type "none") - (parameters - '("gboolean" "show") - ) -) - -(define-method set_topic - (of-object "EmpathyGroupChat") - (c-name "empathy_group_chat_set_topic") - (return-type "none") -) - - - ;; From empathy-spell.h (define-function empathy_spell_supported diff --git a/python/pyempathygtk/pyempathygtk.override b/python/pyempathygtk/pyempathygtk.override index 7afb8e952..262942888 100644 --- a/python/pyempathygtk/pyempathygtk.override +++ b/python/pyempathygtk/pyempathygtk.override @@ -19,14 +19,12 @@ headers #include "empathy-contact-list-view.h" #include "empathy-contact-widget.h" #include "empathy-geometry.h" -#include "empathy-group-chat.h" #include "empathy-gtk-enum-types.h" #include "empathy-images.h" #include "empathy-irc-network-dialog.h" #include "empathy-log-window.h" #include "empathy-new-message-dialog.h" #include "empathy-presence-chooser.h" -#include "empathy-private-chat.h" #include "empathy-profile-chooser.h" #include "empathy-smiley-manager.h" #include "empathy-spell-dialog.h" @@ -57,11 +55,11 @@ import gtk.Button as PyGtkButton_Type import gtk.EventBox as PyGtkEventBox_Type import gtk.CellRendererPixbuf as PyGtkCellRendererPixbuf_Type import gtk.gdk.Pixbuf as PyGdkPixbuf_Type +import gtk.Bin as PyGtkBin_Type import empathy.Contact as PyEmpathyContact_Type import empathy.ContactList as PyEmpathyContactList_Type import empathy.TpChat as PyEmpathyTpChat_Type import empathy.Message as PyEmpathyMessage_Type -import empathy.TpChatroom as PyEmpathyTpChatroom_Type import empathy.TpCall as PyEmpathyTpCall_Type %% ignore-glob diff --git a/python/update-binding.sh b/python/update-binding.sh index 629673f62..0c4b94ac9 100755 --- a/python/update-binding.sh +++ b/python/update-binding.sh @@ -21,7 +21,6 @@ python /usr/share/pygtk/2.0/codegen/h2def.py \ empathy-tp-group.h \ empathy-tp-contact-list.h \ empathy-tp-chat.h \ - empathy-tp-chatroom.h \ empathy-tp-roomlist.h \ empathy-tp-call.h \ empathy-chandler.h \ @@ -58,7 +57,6 @@ python /usr/share/pygtk/2.0/codegen/h2def.py \ empathy-theme-manager.h \ empathy-avatar-image.h \ empathy-contact-list-view.h \ - empathy-private-chat.h \ empathy-ui-utils.h \ empathy-cell-renderer-activatable.h \ empathy-contact-widget.h \ @@ -67,10 +65,19 @@ python /usr/share/pygtk/2.0/codegen/h2def.py \ empathy-geometry.h \ empathy-smiley-manager.h \ empathy-cell-renderer-text.h \ - empathy-group-chat.h \ empathy-spell.h \ > ../python/pyempathygtk/pyempathygtk.defs +# Keep original version cd ../python +cp pyempathy/pyempathy.defs /tmp +cp pyempathygtk/pyempathygtk.defs /tmp + +# Apply patches patch -p0 < pyempathy.patch +patch -p0 < pyempathygtk.patch + +# Make modification then run that: +#diff -up /tmp/pyempathy.defs pyempathy/pyempathy.defs > pyempathy.patch +#diff -up /tmp/pyempathygtk.defs pyempathygtk/pyempathygtk.defs > pyempathygtk.patch |