]> git.0d.be Git - empathy.git/commitdiff
Update python binding
authorXavier Claessens <xclaesse@src.gnome.org>
Wed, 2 Apr 2008 09:42:29 +0000 (09:42 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Wed, 2 Apr 2008 09:42:29 +0000 (09:42 +0000)
svn path=/trunk/; revision=859

python/example.py [changed mode: 0644->0755]
python/pyempathy.patch
python/pyempathy/pyempathy.defs
python/pyempathy/pyempathy.override
python/pyempathygtk/pyempathygtk.defs
python/pyempathygtk/pyempathygtk.override
python/update-binding.sh

old mode 100644 (file)
new mode 100755 (executable)
index 497ec4fe7783838e9ff776794d173ba63f82eba6..f7de6a4403f45b15af807982947efc96fe64df24 100644 (file)
@@ -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")
  )
    (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")
index d75155c4c92f6deb4f17c9c19db065c13bf97c0c..ef46a7b38a74ff0d5f2caf28b3cfa4c75e99f87b 100644 (file)
   (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")
   )
 )
 
+(define-function empathy_file_lookup
+  (c-name "empathy_file_lookup")
+  (return-type "gchar*")
+  (parameters
+    '("const-gchar*" "filename")
+    '("const-gchar*" "subdir")
+  )
+)
+
 
 
 ;; From empathy-message.h
   )
 )
 
+(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")
   (parameters
     '("McAccount*" "account")
     '("TpChan*" "tp_chan")
+    '("gboolean" "acknowledge")
   )
 )
 
   )
 )
 
-(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")
   (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")
   )
 )
 
-(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")
 
 
 
-;; 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
index 64b65e92066f3ac79913c8d7bdfc3e83f0426728..c5b70c17cd3a79c7915f4fa785a323609ef1d1ea 100644 (file)
@@ -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"
index f506760433a414065a09b2c48e606b1609283b59..d751527027ca51930691724391428d8d1808ee0e 100644 (file)
@@ -44,7 +44,7 @@
 
 (define-object Chat
   (in-module "Empathy")
-  (parent "GObject")
+  (parent "GtkBin")
   (c-name "EmpathyChat")
   (gtype-id "EMPATHY_TYPE_CHAT")
 )
   (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")
   (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")
   (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
   (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
   )
 )
 
-(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
   )
 )
 
+(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
   (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
 
 
 
-;; 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
 
 
 
-;; 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
index 7afb8e9529edb75a39ed8ec560247bcb89d04a2d..262942888b690a311d8320e254d39df1c59c2ff3 100644 (file)
@@ -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
index 629673f624f7f013dd7a9e1ffcbf8151b3e06246..0c4b94ac97650795c6cb1ff7b294fc1508ab4145 100755 (executable)
@@ -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