summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* make threading runtime optionalGustavo J. A. M. Carneiro2004-08-041-0/+1
|
* pep-8Johan Dahlin2004-07-281-53/+54
|
* add, forgot it in last commitJohan Dahlin2004-07-172-0/+66
| | | | | | * tests/enum.py: add, forgot it in last commit * gobject/: Move gobject source files in here.
* change the allocation parameter to requisition so we have a more clearLorenzo Gil Sanchez2004-06-091-3/+3
| | | | | | | 2004-06-09 Lorenzo Gil Sanchez <lgs@cvs.gnome.org> * examples/gtk/widget.py (PyGtkWidget.do_size_request): change the allocation parameter to requisition so we have a more clear example.
* PyGtkWidget example improvementsGustavo J. A. M. Carneiro2004-06-071-21/+12
|
* Fix up *_CHECK callsJohan Dahlin2004-06-041-1/+1
| | | | * gtk/gdk.override (_wrap_gdk_event_tp_setattr): Fix up *_CHECK calls
* Require 2.3.93Johan Dahlin2004-06-041-1/+5
|
* Small updatesJohan Dahlin2004-06-041-7/+8
|
* Add a new example of subclassing a GtkWidget.Johan Dahlin2004-06-041-0/+84
| | | | | | | | * examples/gtk/widget.py: Add a new example of subclassing a GtkWidget. * Makefile.am (EXTRA_DIST): Add widget.py * pygobject.c (pygobject_new): guard object_ref call
* Some more polishing, it'll never be finished!Johan Dahlin2004-06-041-5/+11
| | | | * examples/gtk/uimanager.py: Some more polishing, it'll never be finished!
* polish a bit furtherJohan Dahlin2004-05-281-6/+8
|
* Add a toolbar and fix shortcuts.Johan Dahlin2004-05-281-5/+13
| | | | | | 2004-05-28 Johan Dahlin <johan@gnome.org> * examples/gtk/uimanager.py: Add a toolbar and fix shortcuts.
* examples/gtk/filechooser.py Fix bug #140946.John Finlay2004-05-251-1/+6
| | | | * examples/gtk/filechooser.py Fix bug #140946.
* Update version check and add one to filechooser.pyJohan Dahlin2004-04-232-1/+5
|
* Add 'Images' demo from Bug 100873: All demos from gtk-demo should be portedGustavo J. A. M. Carneiro2004-04-103-0/+163
|
* Updated, call dialog.destroy()PYGTK_2_3_90Johan Dahlin2004-03-302-1/+132
| | | | | | | | | * examples/gtk/filechooser.py (response): Updated, call dialog.destroy() * examples/gtk/uimanager.py: New example * gtk/gtk.override (_wrap_gtk_ui_manager_add_ui_from_string): Override, get rid of second argument.
* Impl, based on gtk_dialog_newJohan Dahlin2004-03-281-0/+26
| | | | | | | | | * gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): Impl, based on gtk_dialog_new * Makefile.am: Add example to EXTRA_DIST * examples/gtk/filechooser.py (filter): New example
* New small exampleJohan Dahlin2004-03-252-0/+47
| | | | * examples/glade/autoconnect.py: New small example
* appwindow demo postfixGustavo J. A. M. Carneiro2004-03-071-1/+1
|
* pygtk appwindow demo fix (stock item registration)Gustavo J. A. M. Carneiro2004-03-072-5/+3
|
* remove files.James Henstridge2003-09-154-519/+0
| | | | | | | | | | 2003-09-15 James Henstridge <james@daa.com.au> * gtk/gtkgl*: remove files. * gtk/Makefile.am: remove gtkgl binding. * configure.in (build_gtkgl): remove gtkgl bindings.
* remove gtk.py, change the #! lines of the OpenGL examples to call "python"James Henstridge2003-08-172-2/+2
| | | | rather than "python2.2".
* Allow some parameters to be NULL.Johan Dahlin2003-03-071-0/+218
| | | | | | | | | | | | * gtk/gtk.defs (gtk_label_new_with_mnemonic, gtk_label_new) (render_icon): Allow some parameters to be NULL. * gtk/gtk.override (_wrap_gtk_stock_lookup) (_wrap_gtk_stock_list_ids) (_wrap_gtk_tree_view_insert_column_with_data_func): Impl. (ignore-glob): Remove gtk_accelerator_* * examples/pygtk-demo/demos/stock_browser.py: Ported from C
* New demo. Rearrange code a bit. Clean up a bit.Johan Dahlin2002-12-2314-286/+456
| | | | | | * examples/pygtk-demo/demos/editable_cells.py: New demo. * examples/pygtk-demo/pygtk-demo.py: Rearrange code a bit. * examples/pygtk-demo/demos/*.py: Clean up a bit.
* mingw32 patches from Cedric Gustin <cgustin@ibelgique.com>:James Henstridge2002-08-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | 2002-08-24 James Henstridge <james@daa.com.au> mingw32 patches from Cedric Gustin <cgustin@ibelgique.com>: * gtk/gtk.override: ignore more socket/plug functions on win32. * gtk/gdk.override: gdk_pixmap_lookup is not implemented on win32. * gtk/Makefile.am (common_ldflags): and here. * pango.override (PyPangoAttribute_Type): initialise tp_alloc and tp_new in the init() function, rather than in the structure definition itself. * Makefile.am (common_ldflags): pass -no-undefined if we are on windows. * configure.in: turn on win32 DLL support, and add OS_WIN32 and PLATFORM_WIN32 conditionals for use in makefiles.
* fix small typo.James Henstridge2002-08-191-4/+12
| | | | | | | | 2002-08-19 James Henstridge <james@daa.com.au> * codegen/codegen.py (GObjectWrapper.get_initial_constructor_substdict): fix small typo.
* update to use this function. (ArgMatcher.register_boxed): short circuit ifJames Henstridge2002-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-07-07 James Henstridge <james@daa.com.au> * codegen/argtypes.py (GtkTreePathArg.write_return): update to use this function. (ArgMatcher.register_boxed): short circuit if there is already a handler for the boxed type (helps with setting custom handlers for boxed types). * gtk/gtk-types.c (pygdk_rectangle_from_pyobject): new function to parse a GdkRectangle from a PyObject. * gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_path): print a warning if the return value could not be converted to a GtkTreePath. * gtk/gtk.override (_wrap_gtk_tree_model_get_value): don't assume tree paths are tuples. * codegen/argtypes.py (GtkTreePathArg.write_param): fix up code generator to get rid of assumption that tree paths are tuples, and catch case where pygtk_tree_path_from_pyobject() returns NULL. * gtk/gtk-types.c (pygtk_tree_path_from_pyobject): change so that we treat an integer PyObject as a tree path with a single index. * pygtype.c (pyg_closure_marshal): apply patch from Arjan Molenaar <arjanmolenaar@hetnet.nl> that fixes a reference leak for the argument tuple passed to the callback. (pyg_signal_class_closure_marshal): apply similar fix here.
* fix definition, as reported by Thomas Leonard <tal00r@ecs.soton.ac.uk>James Henstridge2002-06-241-3/+4
| | | | | | | 2002-06-24 James Henstridge <james@daa.com.au> * gtk/gtk.defs (drag_source_set_icon_pixbuf): fix definition, as reported by Thomas Leonard <tal00r@ecs.soton.ac.uk>
* small updates to some examples.James Henstridge2002-06-234-6/+7
|
* update example to work with current PyGTK.James Henstridge2002-06-231-29/+28
| | | | | | | 2002-06-23 James Henstridge <james@daa.com.au> * examples/simple/scribble.py: update example to work with current PyGTK.
* implement (code mostly from jrb@redhat.com, minor fixups from me)Matt Wilson2002-06-041-3/+5
| | | | | | | | | | | | 2002-06-03 Matt Wilson <msw@redhat.com> * gtk/gtk.override (_wrap_gtk_tree_view_insert_column_with_attributes): implement (code mostly from jrb@redhat.com, minor fixups from me) * gtk/gdk-types.defs (EventExpose): added to make the code generator write GdkEventExpose * for _wrap_gtk_container_propagate_expose (gets rid of a warning)
* the path argument must be a tuple. Ints are not automatically converted toMatt Wilson2002-05-311-1/+1
| | | | | | | | | | | | 2002-05-31 Matt Wilson <msw@redhat.com> * examples/pygtk-demo/demos/list_store.py (fixed_toggled): the path argument must be a tuple. Ints are not automatically converted to tuples any more. * pygtype.c (pyg_value_as_pyobject): change the behavior of G_TYPE_UINT to match the code generator's output on 32 bit systems.
* added parameter --errorfilename to allow redirection of stderr even withHans Breuer2002-04-211-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-04-21 Hans Breuer <hans@breuer.org> * codegen/codegen.py : added parameter --errorfilename to allow redirection of stderr even with clumsy windoze shell * codegen/override.py : extended to allow 'sys.platform' specific ignores * examples/pygtk-demo/demos/colorsel.py : use color = gtk.gdk.color_parse("blue") to get the initial color * examples/pygtk-demo/demos/draw.py : (new file) demonstrating some simple drawing operations. It is using the gtk.GC interface additions below. * gtk/gdk.override : implement GdkGC.tp_getattr, GdkGC.tp_setattr and gdk_gc_set_dashes (ported from #if 0'ed code in gtk/gtk-types.c (should be removed there ?) * gtk/gtk.override : ignore-win32 GTK_TYPE_PLUG GTK_TYPE_SOCKET gtk_socket_new (the TYPE ignores do not work yet) * config.h.win32 makefile.msc pygtk/makefile.msc : new files to build pygtk on windoze using the established glib/build/win32 infrastructure * pygtk/gtk/gtk-fake-win32.c : (new file) implementing gtk_plug_get_type() and gtk_socket_get_type(). It could vanish if codegen/codegen.py has learned something like 'ignore-class-$(sys.platform) or my GtkPlug/GtkSocket patch gets accepted with Gtk. * gtk/gtkmodule.c : added a g_assert() to ensure importing pygobject did work.
* Added the gtk.gl module.Xavier Ordoquy2002-04-123-40/+41
| | | | | | | | | | | | | | | | | | | | 2002-04-12 Xavier Ordoquy <mcarkan@user.sourceforge.net> * configure.in: * gtk/Makefile.am: Added the gtk.gl module. * gtk/gtkgl.defs: * gtk/gtkgl.override: * gtk/gtkglmodule.c: (initgl): Updated the gtkgl module and changed the name to gtk.gl * examples/gl/dots.py: Updated example but still needs some work. * examples/gl/cone.py: * examples/gl/gears.py: Updated working examples.
* clean up a bit and add broken stock icon registrationJohan Dahlin2002-02-252-20/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-02-25 Johan Dahlin <jdahlin@telia.com> * examples/pygtk-demo/demos/appwindow.py: clean up a bit and add broken stock icon registration * examples/pygtk-demo/pygtk-demo.py: Use set_size_request instead of set_usize * gtk/gtk.override (_wrap_gtk_widget_translate_coordinates): Impl (_wrap_gtk_editable_get_selection_bounds): Impl (_wrap_gtk_entry_get_layout_offsets): Impl * gtk/gtk.defs: Add GtkTreeView.columns_autosize * gtk/gtk-types.defs: Add a few fields 2002-02-21 Johan Dahlin <jdahlin@telia.com> * gtk/gtk.defs: Removed gtk_tree_view_column_cell_render, gtk_tree_view_column_cell_focus, gtk_tree_view_column_cell_draw_focus and gtk_tree_view_column_cell_set_dirty since they're now private in gtk.
* add toggle for the check box column. VS:Johan Dahlin2002-02-051-0/+14
| | | | | | | | 2002-02-05 Johan Dahlin <jdahlin@telia.com> * examples/pygtk-demo/demos/list_store.py: add toggle for the check box column. VS: ----------------------------------------------------------------------
* add examples translated by Michelle Campeotto.James Henstridge2002-01-244-0/+439
| | | | | | | | | | 2002-01-24 James Henstridge <james@daa.com.au> * examples/pygtk-demo/demos/colorsel.py: * examples/pygtk-demo/demos/dialogs.py: * examples/pygtk-demo/demos/panes.py: * examples/pygtk-demo/demos/sizegroup.py: add examples translated by Michelle Campeotto.
* add gtk.stock_add() function from Skip (bug 68363).James Henstridge2002-01-241-26/+0
| | | | | | | 2002-01-24 James Henstridge <james@daa.com.au> * gtk/gtk.override (_wrap_gtk_stock_add): add gtk.stock_add() function from Skip (bug 68363).
* updated to use gobject.new().James Henstridge2002-01-246-103/+65
| | | | | | | | 2002-01-24 James Henstridge <james@daa.com.au> * examples/simple/simple.py: updated to use gobject.new(). * examples/simple/hello.py: updated version from Steve George.
* use g_string_append_printf(). (add_property_docs): same here.James Henstridge2002-01-243-75/+46
| | | | | | | | | 2002-01-24 James Henstridge <james@daa.com.au> * pygtype.c (add_signal_docs): use g_string_append_printf(). (add_property_docs): same here. * examples/simple/tooltip.py: updated version from Steve George.
* added appwindow.pyMatt Wilson2002-01-111-0/+154
| | | | | | | | 2002-01-11 Matt Wilson <msw@redhat.com> * Makefile.am (EXTRA_DIST): added appwindow.py * examples/pygtk-demo/demos/appwindow.py: added demo
* added missing newlineMatt Wilson2002-01-111-2/+2
| | | | | | | | | | | | | | | | | | 2002-01-11 Matt Wilson <msw@redhat.com> * codegen/argtypes.py (GtkTreePathArg.normal): added missing newline * gtk/gtk.defs (item_factory_path_from_widget): the return here should be gconst-gchar*. The header in gtk is wrong, filed #68527 against gtk. * gtk/gtk.override (pygtk_item_factory_cb): if the user passed data to GtkItemFactory.create_items, call the callable with the function data as the first parameter. (_wrap_gtk_item_factory_create_items): take an optional callback_data argument. Use PyGtkCustomNotify and g_object_weak_ref to free up the reference to the callable and data after the item factory is freed.
* the F10 key is used to start navigating the menu -- not alt.James Henstridge2002-01-071-1/+1
| | | | | | | | | | | | | | | | | | 2002-01-07 James Henstridge <james@daa.com.au> * examples/pygtk-demo/demos/itemfactory.py (main): the F10 key is used to start navigating the menu -- not alt. * gtk/gtk-types.c (PyGtkStyleHelper_Dealloc): use PyObject_DEL. (PyGtkStyle_Dealloc): same here. (PyGdkWindow_Dealloc): same here. (PyGdkGC_Dealloc): same here. (PyGdkColormap_Dealloc): same here. (pygdk_atom_dealloc): same here. * gobjectmodule.c (pyg_type_wrapper_dealloc): use PyObject_DEL to prevent segfaults with pymalloc. (pyg_param_spec_dealloc): same here.
* added demoMatt Wilson2002-01-031-0/+80
| | | | | | 2002-01-03 Matt Wilson <msw@redhat.com> * examples/pygtk-demo/demos/itemfactory.py: added demo
* remove -1 from store.set call.Matt Wilson2002-01-031-1/+1
| | | | | | | | | | | | | | | | | 2002-01-03 Matt Wilson <msw@redhat.com> * examples/pygtk-demo/demos/list_store.py (create_model): remove -1 from store.set call. * gtk/gtk.defs (GtkMenuBar.append, GtkMenuBar.prepend, GtkMenuBar.insert): uncomment, just ignore these in gtk.override * gtk/gtk.override (ignore): ignore gtk_menu_bar_append, gtk_menu_bar_insert, and gtk_menu_bar_prepend. * gtk/gtkmodule.c (init_gtk): remove unused v variable. * gtk/gtk-types.defs (DialogFlags): s/define-enum/define-flags/
* add new example to dist.James Henstridge2001-12-181-0/+43
| | | | | | | | | | | | | | | | | | | 2001-12-18 James Henstridge <james@daa.com.au> * Makefile.am (EXTRA_DIST): add new example to dist. * examples/gobject/properties.py: test program that implements a few properties. * gobjectmodule.c (add_properties): new function for parsing the __gproperties__ class attribute. (create_property): helper routine for creating and installing the new pspecs. (pyg_type_register): add code to call add_properties if a __gproperties__ attribute is found. (pyg_object_class_init): set set_property/get_property methods in vtable, and get rid of debug message. (initgobject): add G_PARAM_* constants.
* use __gsignals__ notation here.James Henstridge2001-12-141-3/+4
| | | | | | | | | | | 2001-12-14 James Henstridge <james@daa.com.au> * examples/gobject/signal.py: use __gsignals__ notation here. * gobjectmodule.c (create_signal, add_signals): helper routines for handling __gsignals__ attribute of classes. (pyg_type_register): add support for creating signals as part of type registration.
* use new GtkListStore.set method.Matt Wilson2001-12-051-5/+4
| | | | | | | | | | | | 2001-12-05 Matt Wilson <msw@redhat.com> * examples/pygtk-demo/demos/list_store.py (create_model): use new GtkListStore.set method. 2001-12-04 Matt Wilson <msw@redhat.com> * gtk/gtk.override (_wrap_gtk_list_store_set, _wrap_gtk_tree_store_set): added.
* fname is actually required. Added default to NULL for all arguments thatMatt Wilson2001-11-291-1/+1
| | | | | | | | | | 2001-11-29 Matt Wilson <msw@redhat.com> * gtk/libglade.defs (glade_xml_new): fname is actually required. Added default to NULL for all arguments that are null-ok. * gtk/libglademodule.c: added missing #include pygobject.h. Why does pygtk.h define NO_IMPORT_PYGOBJECT?
* rework glade demo and demo files to be glade2Matt Wilson2001-11-295-2302/+141
|