Merge lp:~ken-vandine/indicator-applet/python-v2work into lp:indicator-applet/python0.2

Proposed by Ken VanDine
Status: Merged
Merged at revision: not available
Proposed branch: lp:~ken-vandine/indicator-applet/python-v2work
Merge into: lp:indicator-applet/python0.2
Diff against target: None lines
To merge this branch: bzr merge lp:~ken-vandine/indicator-applet/python-v2work
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+11968@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Updated the im-client example for v2

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure.ac'
--- configure.ac 2009-08-05 10:26:04 +0000
+++ configure.ac 2009-09-14 15:56:26 +0000
@@ -1,16 +1,16 @@
1AC_INIT(indicate-python, 0.0.3, eitan@ascender.com)1AC_INIT(indicate-python, 0.2.0, eitan@ascender.com)
2AC_PREREQ(2.50)2AC_PREREQ(2.50)
3AC_CONFIG_SRCDIR(config.h.in)3AC_CONFIG_SRCDIR(config.h.in)
4AC_COPYRIGHT([Copyright 2009 Canonical])4AC_COPYRIGHT([Copyright 2009 Canonical])
55
6PACKAGE=indicate-python6PACKAGE=indicate-python
7VERSION=0.0.37VERSION=0.2.0
88
9AM_INIT_AUTOMAKE($PACKAGE, $VERSION)9AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
10AM_CONFIG_HEADER(config.h)10AM_CONFIG_HEADER(config.h)
1111
12PYGTK_REQUIRED=2.14.012PYGTK_REQUIRED=2.14.0
13LIBINDICATE_REQUIRED=0.1.113LIBINDICATE_REQUIRED=0.2.0
14PYGOBJECT_REQUIRED=0.2214PYGOBJECT_REQUIRED=0.22
1515
16AM_MAINTAINER_MODE16AM_MAINTAINER_MODE
1717
=== modified file 'src/indicate.defs'
--- src/indicate.defs 2009-04-10 15:17:38 +0000
+++ src/indicate.defs 2009-09-14 18:36:15 +0000
@@ -7,13 +7,6 @@
7 (gtype-id "INDICATE_TYPE_INDICATOR")7 (gtype-id "INDICATE_TYPE_INDICATOR")
8)8)
99
10(define-object IndicatorMessage
11 (in-module "Indicate")
12 (parent "IndicateIndicator")
13 (c-name "IndicateIndicatorMessage")
14 (gtype-id "INDICATE_TYPE_INDICATOR_MESSAGE")
15)
16
17(define-object Listener10(define-object Listener
18 (in-module "Indicate")11 (in-module "Indicate")
19 (parent "GObject")12 (parent "GObject")
@@ -83,12 +76,6 @@
83 (return-type "guint")76 (return-type "guint")
84)77)
8578
86(define-method get_indicator_type
87 (of-object "IndicateIndicator")
88 (c-name "indicate_indicator_get_indicator_type")
89 (return-type "const-gchar*")
90)
91
92(define-method user_display79(define-method user_display
93 (of-object "IndicateIndicator")80 (of-object "IndicateIndicator")
94 (c-name "indicate_indicator_user_display")81 (c-name "indicate_indicator_user_display")
@@ -125,6 +112,26 @@
125 )112 )
126)113)
127114
115(define-method set_property_int
116 (of-object "IndicateIndicator")
117 (c-name "indicate_indicator_set_property_int")
118 (return-type "none")
119 (parameters
120 '("const-gchar*" "key")
121 '("gint" "value")
122 )
123)
124
125(define-method set_property_bool
126 (of-object "IndicateIndicator")
127 (c-name "indicate_indicator_set_property_bool")
128 (return-type "none")
129 (parameters
130 '("const-gchar*" "key")
131 '("gboolean" "value")
132 )
133)
134
128(define-method get_property135(define-method get_property
129 (of-object "IndicateIndicator")136 (of-object "IndicateIndicator")
130 (c-name "indicate_indicator_get_property")137 (c-name "indicate_indicator_get_property")
@@ -140,21 +147,20 @@
140 (return-type "GPtrArray*")147 (return-type "GPtrArray*")
141)148)
142149
143150(define-method set_displayed
144151 (of-object "IndicateIndicator")
145;; From indicator-message.h152 (c-name "indicate_indicator_set_displayed")
146153 (return-type "none")
147(define-function indicate_indicator_message_get_type154 (parameters
148 (c-name "indicate_indicator_message_get_type")155 '("gboolean" "displayed")
149 (return-type "GType")156 )
150)157)
151158
152(define-function indicate_indicator_message_new159(define-method get_displayed
153 (c-name "indicate_indicator_message_new")160 (of-object "IndicateIndicator")
154 (is-constructor-of "IndicateIndicatorMessage")161 (c-name "indicate_indicator_get_displayed")
155 (return-type "IndicateIndicatorMessage*")162 (return-type "gboolean")
156)163)
157
158164
159165
160;; From listener.h166;; From listener.h
@@ -350,6 +356,15 @@
350 )356 )
351)357)
352358
359(define-method set_count
360 (of-object "IndicateServer")
361 (c-name "indicate_server_set_count")
362 (return-type "none")
363 (parameters
364 '("guint" "count")
365 )
366)
367
353(define-method show368(define-method show
354 (of-object "IndicateServer")369 (of-object "IndicateServer")
355 (c-name "indicate_server_show")370 (c-name "indicate_server_show")
@@ -397,41 +412,21 @@
397 (return-type "none")412 (return-type "none")
398)413)
399414
400(define-method emit_indicator_added415(define-method check_interest
401 (of-object "IndicateServer")416 (of-object "IndicateServer")
402 (c-name "indicate_server_emit_indicator_added")417 (c-name "indicate_server_check_interest")
403 (return-type "none")418 (return-type "gboolean")
404 (parameters419 (parameters
405 '("guint" "id")420 '("IndicateInterests" "interest")
406 '("const-gchar*" "type")421 )
407 )422)
408)423
409424(define-method get_max_indicators
410(define-method emit_indicator_removed425 (of-object "IndicateServer")
411 (of-object "IndicateServer")426 (c-name "indicate_server_get_max_indicators")
412 (c-name "indicate_server_emit_indicator_removed")427 (return-type "gint")
413 (return-type "none")428)
414 (parameters429
415 '("guint" "id")
416 '("const-gchar*" "type")
417 )
418)
419
420(define-method emit_indicator_modified
421 (of-object "IndicateServer")
422 (c-name "indicate_server_emit_indicator_modified")
423 (return-type "none")
424 (parameters
425 '("guint" "id")
426 '("const-gchar*" "property")
427 )
428)
429
430(define-method emit_server_display
431 (of-object "IndicateServer")
432 (c-name "indicate_server_emit_server_display")
433 (return-type "none")
434)
435430
436431
437432
438433
=== modified file 'src/indicate.override'
--- src/indicate.override 2009-08-05 10:26:04 +0000
+++ src/indicate.override 2009-09-14 16:41:57 +0000
@@ -28,7 +28,7 @@
28headers28headers
29#include <Python.h>29#include <Python.h>
30#include <libindicate/indicator.h>30#include <libindicate/indicator.h>
31#include <libindicate/indicator-message.h>31#include <libindicate/indicator-messages.h>
32#include <libindicate/listener.h>32#include <libindicate/listener.h>
33#include <libindicate/server.h>33#include <libindicate/server.h>
34#include <libindicate/interests.h>34#include <libindicate/interests.h>
3535
=== modified file 'tests/im-client.py'
--- tests/im-client.py 2009-04-08 15:35:22 +0000
+++ tests/im-client.py 2009-09-17 13:43:21 +0000
@@ -29,8 +29,8 @@
29import gtk29import gtk
30from time import time30from time import time
3131
32PATHA = "/usr/share/icons/hicolor/16x16/apps/pidgin.png"32PATHA = "/usr/share/icons/hicolor/16x16/apps/empathy.png"
33PATHB = "/usr/share/icons/hicolor/22x22/apps/pidgin.png"33PATHB = "/usr/share/icons/hicolor/22x22/apps/empathy.png"
34lastpath = None34lastpath = None
3535
36def timeout_cb(indicator):36def timeout_cb(indicator):
@@ -58,10 +58,10 @@
58if __name__ == "__main__":58if __name__ == "__main__":
59 server = indicate.indicate_server_ref_default()59 server = indicate.indicate_server_ref_default()
60 server.set_type("message.im")60 server.set_type("message.im")
61 server.set_desktop_file("/usr/share/applications/pidgin.desktop")61 server.set_desktop_file("/usr/share/applications/empathy.desktop")
62 server.connect("server-display", server_display)62 server.connect("server-display", server_display)
63 63
64 indicator = indicate.IndicatorMessage()64 indicator = indicate.Indicator()
65 indicator.set_property("subtype", "im")65 indicator.set_property("subtype", "im")
66 indicator.set_property("sender", "IM Client Test")66 indicator.set_property("sender", "IM Client Test")
67 indicator.set_property_time("time", time())67 indicator.set_property_time("time", time())

Subscribers

People subscribed via source and target branches