[Galago-commits] r2719 - in trunk/galago-gtk-python: . src tests
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Mon Apr 17 01:03:36 PDT 2006
Author: chipx86
Date: 2006-04-17 01:03:34 -0700 (Mon, 17 Apr 2006)
New Revision: 2719
Added:
trunk/galago-gtk-python/tests/test-chooser.py
Modified:
trunk/galago-gtk-python/ChangeLog
trunk/galago-gtk-python/src/galago-gtk.defs
Log:
- Add a test program for the chooser dialog.
- Update wrapps for some function renames in libgalago-gtk.
Modified: trunk/galago-gtk-python/ChangeLog
===================================================================
--- trunk/galago-gtk-python/ChangeLog 2006-04-17 08:00:41 UTC (rev 2718)
+++ trunk/galago-gtk-python/ChangeLog 2006-04-17 08:03:34 UTC (rev 2719)
@@ -1,3 +1,10 @@
+Mon Apr 17 01:03:00 PDT 2006 Christian Hammond <chipx86 at chipx86.com>
+
+ * src/galago-gtk.defs:
+ A tests/test-chooser.py:
+ - Add a test program for the chooser dialog.
+ - Update wrapps for some function renames in libgalago-gtk.
+
Sun Mar 19 13:34:55 PST 2006 Christian Hammond <chipx86 at chipx86.com>
* src/Makefile.am:
Modified: trunk/galago-gtk-python/src/galago-gtk.defs
===================================================================
--- trunk/galago-gtk-python/src/galago-gtk.defs 2006-04-17 08:00:41 UTC (rev 2718)
+++ trunk/galago-gtk-python/src/galago-gtk.defs 2006-04-17 08:03:34 UTC (rev 2719)
@@ -201,18 +201,18 @@
(return-type "GalagoService*")
)
-(define-method set_active
+(define-method set_account
(of-object "GalagoGtkAccountComboBox")
- (c-name "galago_gtk_account_combo_box_set_active")
+ (c-name "galago_gtk_account_combo_box_set_account")
(return-type "none")
(parameters
'("GalagoAccount*" "account")
)
)
-(define-method get_active
+(define-method get_account
(of-object "GalagoGtkAccountComboBox")
- (c-name "galago_gtk_account_combo_box_get_active")
+ (c-name "galago_gtk_account_combo_box_get_account")
(return-type "GalagoAccount*")
)
@@ -944,18 +944,18 @@
(return-type "GtkWidget*")
)
-(define-method set_active
+(define-method set_service
(of-object "GalagoGtkServiceComboBox")
- (c-name "galago_gtk_service_combo_box_set_active")
+ (c-name "galago_gtk_service_combo_box_set_service")
(return-type "none")
(parameters
'("GalagoService*" "service")
)
)
-(define-method get_active
+(define-method get_service
(of-object "GalagoGtkServiceComboBox")
- (c-name "galago_gtk_service_combo_box_get_active")
+ (c-name "galago_gtk_service_combo_box_get_service")
(return-type "GalagoService*")
)
Added: trunk/galago-gtk-python/tests/test-chooser.py
===================================================================
--- trunk/galago-gtk-python/tests/test-chooser.py 2006-04-17 08:00:41 UTC (rev 2718)
+++ trunk/galago-gtk-python/tests/test-chooser.py 2006-04-17 08:03:34 UTC (rev 2719)
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+
+import pygtk
+pygtk.require('2.0')
+import gtk
+import galago
+import galago.gtk
+import sys
+
+class ChooserTest(gtk.Window):
+ def __init__(self):
+ gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
+ self.contact_list = None
+
+ self.set_title("Galago Chooser Test")
+ self.set_border_width(12)
+
+ vbox = gtk.VBox(False, 6)
+ vbox.show()
+ self.add(vbox)
+
+ sw = gtk.ScrolledWindow()
+ sw.show()
+ vbox.pack_start(sw, True, True, 0)
+ sw.set_shadow_type(gtk.SHADOW_IN)
+
+ self.contact_list = galago.gtk.ContactList(False)
+ self.contact_list.show()
+ sw.add(self.contact_list)
+
+ bbox = gtk.HButtonBox()
+ bbox.show()
+ vbox.pack_start(bbox, False, True, 0)
+ bbox.set_layout(gtk.BUTTONBOX_END)
+
+ add_button = gtk.Button(stock=gtk.STOCK_ADD)
+ add_button.show()
+ bbox.pack_start(add_button, False, False, 0)
+ add_button.connect("clicked", self.add_clicked_cb)
+
+ def response_cb(self, chooser, response_id):
+ if response_id == gtk.RESPONSE_ACCEPT:
+ self.contact_list.add_contact(chooser.get_contact())
+
+ chooser.destroy()
+
+ def add_clicked_cb(self, button):
+ dialog = galago.gtk.ContactChooserDialog(
+ "Select a Contact", self,
+ galago.gtk.CONTACT_CHOOSER_SELECT_CONTACTS,
+ (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
+ gtk.STOCK_ADD, gtk.RESPONSE_ACCEPT))
+ dialog.show()
+ dialog.connect("response", self.response_cb)
+
+
+if __name__ == "__main__":
+ if not galago.init("test-chooser"):
+ sys.exit(1)
+
+ win = ChooserTest()
+ win.show()
+ win.connect("destroy", gtk.main_quit)
+
+ gtk.main()
Property changes on: trunk/galago-gtk-python/tests/test-chooser.py
___________________________________________________________________
Name: svn:executable
+ *
More information about the galago-commits
mailing list