summaryrefslogtreecommitdiff
path: root/gtk.py
Commit message (Collapse)AuthorAgeFilesLines
* added news items.James Henstridge2000-04-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-04-07 James Henstridge <james@daa.com.au> * NEWS: added news items. * pygtk.spec, configure.in: updated version number. * configure.in (enable_numpy): added --disable-numpy argument that disables numeric python support even if numpy is found. * gtkmodule.c (PyGdkWindow_{Pointer,Keyboard}{Grab,Ungrab}): new GdkWindow methods. * gtk.py (rc_reparse_all): fix spelling mistake. (GtkTreeItem.__getattr__): fix bug reported by Aaron Digulla. * generate/gtklists.defs (gtk_clist_get_selectable): fix bug in return type. 2000-04-07 James Henstridge <james@daa.com.au> * configure.in, gnome-python.spec: updated version number. * NEWS: added news items. * pygnome/Makefile.am (_gtkhtmlmodule_la_LIBADD): link with the correct library list. * pygnome/gnome/config.py (section_contents,private_section_contents): fixed incorrect naming of wrapper.
* The following is from Paul Clifford <paul@plasma.demon.co.uk>extension-class-branch-anchorJames Henstridge2000-03-031-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-03-03 James Henstridge <james@daa.com.au> The following is from Paul Clifford <paul@plasma.demon.co.uk> * libglade.py (GladeXML.signal_autoconnect): pass all the extra arguments to autoconnect. * libglademodule.c (connect_many): don't exit if the handler is a tuple instead of a function. The following fixes are from John Ehresman <jpe@archaeopteryx.com> * gtk.py (GtkWidget.set_scroll_adjustments): return the value to user. * gtkmodule.c (GtkArg_AsPyObject): check if GtkObject is not NULL. (_wrap_gtk_clist_get_pixmap, _gtk_clist_get_pixtext): check that returned pixmap is not NULL. (_wrap_gtk_ctree_node_get_pixmap, _gtk_ctree_node_get_pixtext): check that returned pixmap is not NULL. * gtk.py (GtkToolbar): wrap callbacks when inserting a toolbar item. (GtkNotebook.set_menu_label_text): fixed typo (GtkTreeItem.__getattr__): wrap subtree attribute.
* added missing function. Patch from wrobell <wrobell@posexperts.com.pl>.James Henstridge2000-02-211-0/+2
| | | | | | | | | | 2000-02-21 James Henstridge <james@daa.com.au> * gtk.py (GtkTable.resize): added missing function. Patch from wrobell <wrobell@posexperts.com.pl>. * generate/gtkcontainers.defs (gtk_table_resize): added missing function.
* apply fix from Martin Preishuber.James Henstridge2000-02-201-2/+2
| | | | | | | | | | | | 2000-02-20 James Henstridge <james@daa.com.au> * gtk.py (GtkCList.get_[hv]adjustment): apply fix from Martin Preishuber. 2000-02-20 James Henstridge <james@daa.com.au> * pygnome/gnome/ui.py (GnomeMDIGenericChild.__marshal.__call__): fix mistake here.
* s/sel/self/ in GtkSpinButton.get_adjustment()Elliot Lee2000-01-261-1/+1
| | | | s/sel/self/ in GtkSpinButton.get_adjustment()
* use C level GtkObject for hash function. (GtkAccelGroup.__cmp__): use CJames Henstridge2000-01-251-0/+9
| | | | | | | | | | | 2000-01-26 James Henstridge <james@daa.com.au> * gtk.py (GtkObject.__hash__): use C level GtkObject for hash function. (GtkAccelGroup.__cmp__): use C level object for comparisons. (GtkAccelGroup.__hash__): use C level object for hashing. * gtkmodule.c: added hash functions for many object types.
* new wrapper new implementationKelly Lynn Martin2000-01-251-0/+3
| | | | | | | | | | | 2000-01-25 Kelly Lynn Martin <kelly@poverty.bloomington.in.us> * gtk.py (gdk_beep): new wrapper * gtkmodule.c (_wrap_gdk_beep): new implementation Added gdk_beep function (I want to be able to beep, damnit!) --Kelly
* s/soure_row/source_row/g typoMatt Wilson2000-01-201-1/+1
| | | | | | 2000-01-20 Matt Wilson <msw@redhat.com> * gtk.py (GtkCList.row_move): s/soure_row/source_row/g typo
* oops - left out the _gtk. partMatt Wilson1999-12-161-1/+1
| | | | | | 1999-12-16 Matt Wilson <msw@redhat.com> * gtk.py (GtkCList.__getattr__): oops - left out the _gtk. part
* added a function to create a GdkColor object. You should use this if youMatt Wilson1999-12-161-0/+3
| | | | | | | | | | | | 1999-12-15 Matt Wilson <msw@redhat.com> * gtk.py (GdkColor): added a function to create a GdkColor object. You should use this if you don't want to allocate a color before passing it into functions that don't need an allocated color. * gtkmodule.c (_wrap_gdk_color_new, PyGdkColor_GetAttr): add a functions to create and modify a GdkColor object.
* added 'rows' attribute.Matt Wilson1999-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-12-15 Matt Wilson <msw@redhat.com> * gtk.py (GtkCList.__getattr__): added 'rows' attribute. * gtkmodule.c (_wrap_gtk_clist_get_rows): added wrapper to get number of rows in a clist * gtkmodule.c (PyGtkStyle_New): If the GtkStyle passed in is NULL, return a None object. This is a bit of a hack, but without it you'll fail NULL assertions when you attach to the style_set signal. * generate/gtkmisc.defs (gtk_pixmap_new): mask is null-ok. * generate/gtklists.defs (gtk_clist_set_pixmap): likewise. * pygtk.h (PyGdkBitmap_Check): define PyGdkBitmap_Check to be the same as PyGdkWindow_Check. * gtkmodule.c: -Wall cleanups * libglademodule.c (init_libglade): removed unused variable * gdkimlibmodule.c (_wrap_gdk_imlib_init): s/static/static int/
* i1999-09-28 James Henstridge <james@daa.com.au>James Henstridge1999-09-281-2/+14
| | | | | | | | | | | | | | | | | | | | | | * pygnome/Makefile.am: added _gladegnome to the build. * pygnome/gladegnomemodule.c: new module. This one simply initialises the gnome portion of libglade when you import it. It provides no external interface. 1999-09-28 James Henstridge <james@daa.com.au> * libglade.py: enable gnome functionality if it is available. * gtk.py (GtkEditable.__getattr__): added accessors to GtkEditable. * generate/gtkedit.defs (GtkEditable): added accessors for some fields of the GtkEditable. * gtkmodule.c: added _raise, lower and input_get_pointer methods to the GdkWindow wrapper. * gtk.py (GtkAspectFrame.__init__): fixed prototype for GtkAspectFrame
* added wrapper for gdk_char_width added wrapper for gdk_char_widthMatt Wilson1999-08-251-0/+3
| | | | | | | 1999-08-25 Matt Wilson <msw@redhat.com> * gtkmodule.c (_wrap_gdk_char_width): added wrapper for gdk_char_width * gtk.py (gdk_char_width): added wrapper for gdk_char_width
* updated news file.James Henstridge1999-08-081-0/+52
| | | | | | | | | | | | | | | | | | | | | 1999-08-08 James Henstridge <james@daa.com.au> * NEWS: updated news file. * configure.in: increased version number to 0.6.2. * gdkimlibmodule.c (_wrap_gdk_imlib_image_get_array): make sure that the image data is not freed while the returned array is in use, so that we don't get into an inconsistent state. * gtk.py: added gdkrgb functions to this file. * gtkmodule.c: added the gdkrgb functions for drawing rgb and greyscale images. (gdk_draw_array): a new function that will draw a numpy array to a drawable with gdkrgb. It is written so that it can handle slicing on the first two axes -- it does not handle non contiguous data on the third axis.
* added descriptions of the new routines.James Henstridge1999-08-031-0/+7
| | | | | | | | | | | | | | | | 1999-08-03 James Henstridge <james@daa.com.au> * description.py (GdkWindow): added descriptions of the new routines. * gtkmodule.c (GdkWindow.property_{get,change,delete}): new functions for manipulating the properties on a window. * gtk.py (_window_foreign_new, _root_window): added wrappers for the new functions. * gtkmodule.c: added xid attribute to GdkWindow's, and added functions gdk_window_foreign_new and gdk_get_root_win. The second function is simply a wrapper that returns a GdkWindow for the root window.
* new file that wraps the _libglade module.James Henstridge1999-08-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | 1999-08-02 James Henstridge <james@daa.com.au> * libglade.py: new file that wraps the _libglade module. * libglademodule.c: handle connecting to another object correctly. * gtkmodule.c: added support for passing an object for gtk_signal_connect_object type behaviour. (_wrap_gtk_signal_connect_object) (_wrap_gtk_signal_connect_object_after): new wrappers. * gtk.py (idle_add, timeout_add, quit_add): pass extra arguments to the callback. * libglademodule.c (_wrap_glade_xml_signal_connect): fixed a small problem with reference counting here. * gtkmodule.c: added support for passing arguments to timeout, quit and idle functions.
* pass extra arguments to the callback.James Henstridge1999-08-021-6/+6
| | | | | | | | | | | | | 1999-08-02 James Henstridge <james@daa.com.au> * gtk.py (idle_add, timeout_add, quit_add): pass extra arguments to the callback. * libglademodule.c (_wrap_glade_xml_signal_connect): fixed a small problem with reference counting here. * gtkmodule.c: added support for passing arguments to timeout, quit and idle functions.
* put in Paul Fisher's enhancements to the threading code. It should nowJames Henstridge1999-07-311-1/+1
| | | | | | | | | | | | | | | | | 1999-07-31 James Henstridge <james@daa.com.au> * gtkmodule.c: put in Paul Fisher's enhancements to the threading code. It should now work better with multiple threads calling GTK+ routines (remember to use threads_enter/threads_leave), and doesn't reintroduce the global interpreter lock problems that Duncan's original code worked around. * configure.in: added a check for the numpy header. * GdkImlib.py: added wrappers for the numpy routines. * gdkimlibmodule.c: added Travis Oliphant's Numeric python stuff to the imlib module.
* new wrapper new implementationMatt Wilson1999-07-211-0/+3
| | | | | | | 1999-07-20 Matt Wilson <msw@redhat.com> * gtk.py (gdk_flush): new wrapper * gtkmodule.c (_wrap_gdk_flush): new implementation
* a wrapper for the new function.James Henstridge1999-07-191-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | 1999-07-19 James Henstridge <james@daa.com.au> * gtk.py (GtkAdjustment.set_all): a wrapper for the new function. * gtkmodule.c (_wrap_gtk_adjustment_set_all): simple wrapper for setting values on an adjustment. * gtk.py (GtkCList.get_column_width): a wrapper for this new function. * gtkmodule.c (_wrap_gtk_clist_get_column_width): a function to get the column width for a column in a clist. * gtk.py (_filtprops): convert GtkAccelGroup and GdkImlibImage types back to the C equivalents. This makes adding GnomeCanvasImage items to the GnomeCanvas easier. (GtkCTree.node_get_selectable): added wrapper function. 1999-07-18 James Henstridge <james@daa.com.au> * gtkmodule.c (_wrap_gdk_threads_enter): don't use PyGTK_BLOCK_THREADS, since it should only be called outside the gtk main loop. Instead use Py_BEGIN_ALLOW_THREADS.
* fixed a few bugs reported by Ville Lauriki.James Henstridge1999-07-121-4/+18
| | | | | | | | | | | | | | | | | | | | | | | 1999-07-12 James Henstridge <james@daa.com.au> * gtk.py: fixed a few bugs reported by Ville Lauriki. * generate/gtkmenus.defs (gtk_item_factory_add_foreign): fix a typo. * gtkmodule.c: fixed problems if gdk_atom_name returns NULL. (_wrap_gtk_main_iteration, _wrap_gtk_events_pending): added GDK_THREADS_LEAVE() and GDK_THREADS_ENTER() calls round these functions. Without this, it deadlocks if threads are enabled. * generate/gtklists.defs (GtkTreeItem): added wrapper for treeitem->subtree attribute. * pyglade/build.py (text_new): small fix. 1999-07-12 James Henstridge <james@daa.com.au> * pygnome/gnome/ui.py (GnomePixmap.load_imlib): small bug fix.
* a wrapper for the new function.PYGTK_0_6_0GNOME_PYTHON_1_0_2James Henstridge1999-04-251-0/+2
| | | | | | | | | | | | | | | | | | 1999-04-25 James Henstridge <james@daa.com.au> * gtk.py (GtkWidget.get_allocation): a wrapper for the new function. * gtkmodule.c: added a routine for getting the allocation of a widget. 1999-04-25 James Henstridge <james@daa.com.au> * pygnome/Makefile.am (EXTRA_DIST): added bookmarks-applet.py * pygnome/examples/bookmarks-applet.py: added another sample applet that demonstrates setting up context menu items. It basically reads in your Netscape 4.x bookmarks file, and puts the bookmarks into the context menu heirachy. It then uses gnome.url.show() to display the bookmark in the browser of the user's choice.
* added a summary of the new features.James Henstridge1999-04-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-04-22 James Henstridge <james@daa.com.au> * NEWS: added a summary of the new features. * pygtk.spec: upped version number. * configure.in: upped version number to 0.6.0. I think thread support is a big enough feature to bump it up to 0.6. 1999-04-21 James Henstridge <james@daa.com.au> * gtk.py (create_bitmap_from_data): added new wrapper. * gtkmodule.c: added gdk_bitmap_create_from_data function. Also export PyGtk_BlockThreads and PyGtk_UnblockThreads through the _private dictionary, so they can be used from within other modules (gnome-python in particular). 1999-04-22 James Henstridge <james@daa.com.au> * NEWS: added some news items. * configure.in: upped version number * gnome-python.spec: upped versions, and included capplet and applet modules. * pygnome/gnomeuimodule.c: added calls to make gnomeuimodule act correctly with the thread support in pygtk. * pygnome/gnome/Makefile.am (gnome_PYTHON): conditionally install applet.py and capplet.py. * pygnome/gnome/capplet.py: a wrapper for CappletWidget. 1999-04-21 James Henstridge <james@daa.com.au> * pygnome/gnome/applet.py: a wrapper for AppletWidget. This is what most people will use. * pygnome/Makefile.am, pygnome/generate/Makefile.am: made changes to build _applet and _capplet modules if libraries are available. * configure.in: added some tests to see if applets or capplets libraries are installed. If so, set up a few conditionals for building the python modules for them. * pygnome/cappletmodule.c, pygnome/generate/capplet.defs: base module for creating control center capplets in python. This module should also work properly with the threading fixes for pygtk. * pygnome/appletmodule.c, pygnome/generate/applet.defs: base module for creating panel applets in python. This module should work together with the threading fixes for pygtk. 1999-04-20 James Henstridge <james@daa.com.au> * pygnome/gnome/uiconsts.py: added some more stock item constants. * pygnome/gnomeuimodule.c (_wrap_gnome_canvas_get_item_at): this function could return NULL, which could cause a problem. * pygnome/gnomemodule.c (_wrap_gnome_config_{,private_}get_string): moved implementation here, because these functions can return NULL.
* updated package version number.James Henstridge1999-04-201-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-04-20 James Henstridge <james@daa.com.au> * pygtk.spec: updated package version number. * configure.in: added a check for the python thread module. If it is found, then also link _gtkmodule to the gthread library. Incremented minimum GTK version to 1.2.1. Incremented version to 0.5.13. * gtkmodule.c: call g_thread_init if python was built with thread support. This is required to turn thread support on inside gdk/gtk. * gtk.py: added new functions. (GtkList.insert_items): this function wasn't looking at the internal GtkObject for the children to insert, so would fail. * generate/gtkbase.defs (gtk_widget_accelerators_locked): new func. * generate/gtkmenus.defs (gtk_item_factory_add_foreign): new func. (gtk_menu_get_accel_group): new func. (gtk_menu_reorder_child): new func. (gtk_menu_shell_deselect): new func. * gtkmodule.c (_wrap_gtk_combo_set_popdown_strings): accept any sequence for the second argument, rather than just lists. (_wrap_gtk_init): check the return value, and throw an exception when a connection to the X server could not be made, rather than exiting. * gtk.py: got rid of some warnings when pygtk is imported when DISPLAY is not set. Not completely necessary, but it doesn't hurt. (GtkObject.remove_data) fixed small bug pointed out by Duncan Grisby.
* export these two new functions.James Henstridge1999-04-081-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-04-08 James Henstridge <james@daa.com.au> * gtk.py (threads_enter,threads_leave): export these two new functions. * gtkmodule.c: applied a modified version of Duncan Grisby's threading patch. The changes were mainly inlining some of the code with macros and making it so that the extra code was not added unless python was compiled with thread support. Also added wrappers for gdk_thread_enter and gdk_thread_leave. * gtk.py (GtkList.{,un}select_item): fixed small bug reported by Ben Darnell. * gtkmodule.c: fixed some small bugs in gtk_ctree stuff. Thanks go to Chi-Deok Hwang. Also fixed the bug in gtk_clist where I copy and pasted from. * gtk.py (GtkNotebook.set_tab_label_text): Small typo. Fix from Toby D. Reeves. 1999-04-08 James Henstridge <james@daa.com.au> * pygnome/gnome/ui.py (GnomeDialog.set_default): fixed a small bug. It was reported by Ben Darnell. * pygnome/gnomeuimodule.c: fixed a memory leak. Thanks go to Chi-Deok.
* increased version number to 0.5.12.James Henstridge1999-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-03-12 James Henstridge <james@daa.com.au> * configure.in, pygtk.spec: increased version number to 0.5.12. * gtkmodule.c: added optional support for not catching exceptions in callbacks. This way it should be a lot easier to debug a pygtk program with pdb. * gtkmodule.c, gtk.py: a few fixes for problems sent in by Chi-Deok Hwang. This includes a fix to GtkWidget.event(), assignments to GtkStyle attributes throwing exceptions, font loading getting reference counting correct and throwing exceptions for bad font names and allowing None to be passed as a colour to GnomeCanvasItem.set() (the fix is in pygtk). * generate/gtklists.defs (gtk_ctree_new): I had missed this function in previous releases. 1999-03-12 James Henstridge <james@daa.com.au> * configure.in, gnome-python.spec: incremented version number to 1.0.1 * pygnome/gnome/affine.py: new file that should help people compose affine transformations relatively easily. It allows you to quickly create rotations, scalings, translations and allows you to compose any number of affine transformations or invert them. * pygnome/gnome/ui.py: added GnomeCanvasItem.affine_relative and GnomeCanvasItem.affine_absolute. * pygnome/gnomeuimodule.c: added the PYGTK_FATAL_EXCEPTIONS handling code to this module as well. Added gnome_canvas_item_affine_{relative,absolute}. * */Makefile.am: changes so that you can build gnome-python with build directory != source directory.
* made changes to match those in the defs files and _gtk.James Henstridge1999-02-241-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | 1999-02-24 James Henstridge <james@daa.com.au> * gtk.py: made changes to match those in the defs files and _gtk. * description.py (GdkGC.set_dashes): describe new GdkGC method. * generate/gtkcontainers.defs: removed gtk_window_set{focus,default}, since these are internal to GtkWindow. Also added gtk_handle_box_set_handle_position and gtk_handle_box_set_snap_edge. * gtkmodule.c: added gtk_widget_get_child_requisition. (PyGdkGC_GetAttr): added method GdkGC.set_dashes to set the dash pattern for this GC. 1999-02-24 James Henstridge <james@daa.com.au> * pygnome/gnome/ui.py: updated the comments in the GnomeCanvasItems since they were out of date. The image and points arguments should work now. * pygnome/Makefile.am: use ZVT_LIBS in the library line for _zvtmodule
* added references to the MAPPING file.James Henstridge1999-02-231-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-02-23 James Henstridge <james@daa.com.au> * README, Makefile.am, pygtk.spec: added references to the MAPPING file. * MAPPING: new file describing the mapping of GTK+ onto python as pygtk does it. 1999-02-22 James Henstridge <james@daa.com.au> * description.py (GdkCursor): added information about this type. * gtk.py: commented out the __getattr__, __setattr__ and __delattr__ methods of GtkObject. There were too many things that broke because of these changes. If I can get these to work correctly in the future, I will consider re-enabling it, but not till then. * examples/testgtk/testgtk.py (create_cursor_test): added a cursor test to the python testgtk. It is adapted from the translation sent in by Osamu Tanimoto. * gtkmodule.c: fixed a bit of bad copy'n'paste in the GC part of the style wrapper code. Thanks go to Osamu Tanimoto <tanimoto@rios.co.jp>. (PyGdkCursor_GetAttr): now GdkCursor objects have a type attribute that returns the type number for the object, and a name attribute that gives a string representation of that type number.
* made tip_private argument optional. (GtkObject.__[gs]etattr__,James Henstridge1999-02-201-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | 1999-02-20 James Henstridge <james@daa.com.au> * gtk.py (GtkTooltips.set_tip): made tip_private argument optional. (GtkObject.__[gs]etattr__, GtkObject.__delattr__): added some more fixes to this code so that it shouldn't throw exceptions as much when it shouldn't. * gtkmodule.c: PyGdkEvent_New wasn't interpreting GDK_BUTTON_RELEASE events correctly. Also some fix ups for gtk_menu_popup. * generate/gtkcontainers.defs (gtk_container_set_focus_child): allow null child argument. 1999-02-20 James Henstridge <james@daa.com.au> * pygnome/gnome/ui.py: made corresponding changes. * pygnome/generate/gnomeui.defs: added some null-ok tags to the defs file (mainly for passing adjustments to constructors). * gnome-python.spec: fixed a bug in the pygtk files list. It wasn't including gtk.py!
* added __getattr__ and __setattr__ methods to GtkObject so that you can setJames Henstridge1999-02-191-50/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-02-19 James Henstridge <james@daa.com.au> * gtk.py: added __getattr__ and __setattr__ methods to GtkObject so that you can set data on a GtkObject directly in a persistent way (reference counting problems prevent pygtk from always passing the same python object to a callback). These functions ignore attributes starting with an underscore. Also modified all the other __getattr__ methods to call their parent class's __getattr__ method when they fail instead of raising an exception. * gtk.py: some changes to make use of the new null-ok flags. * generate/*.defs: added some null-ok tags where appropriate. * gtkmodule.c: removed gtk_frame_new, as the null-ok change in generate.py makes it unnecessary. Also gtk_spin_button_new_no_adj has been removed because it is no longer necessary. * generate/generate.py (FunctionDefsParser.define_func): altered the code generation routines so that they recognise the (null-ok) tag in the .defs file. This should give a lot more flexibility to the generator, and allow me to move some of the special case code in gtkmodule.c back to the .defs files. The null-ok tag is currently only recognised for string, object and boxed type arguments. * gtkmodule.c: fixes to the gtk_window_set_geometry_hints function to throw an exception for bad aspect values. Also let it understand integers for aspect values. Also fixed up gtk_menu_popup so that you could give None for a few more arguments. 1999-02-19 James Henstridge <james@daa.com.au> * pygnome/gnome/ui.py, pygnome/gnome/zvt.py: altered __getattr__ methods to call their parent's __getattr__ rather than raising exceptions on unknown attributes. This is to allow use of the GtkObject.__getattr__ method in gtk.py.
* added documentation about GtkStyle changes to this pseudo module.James Henstridge1999-02-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-02-16 James Henstridge <james@daa.com.au> * description.py: added documentation about GtkStyle changes to this pseudo module. * gtkmodule.c: added a new python type GtkStyleHelper that is used by python GtkStyle objects as a sequence type that alows us to write back to the arrays in the GtkStyle object. I have also made it possible to update the font and (black|white){,_gc}. I also added a GtkStyle.copy() method. This gives the user everything they need to alter styles inside their applications. I still believe that rc files are better, but there seem to be a lot of people who want this functionality. * gtkmodule.c (_wrap_gtk_window_set_geometry_hints): made changes so apect ratios can be set to integers. Also made it throw an exception for aspect ratios of zero, since this caused my X server to crash a few times. 1999-02-15 James Henstridge <james@daa.com.au> * gtk.py (GtkPaned.set_position): added function. * generate/gtkcontainers.defs (gtk_paned_set_position): added new function
* added GtkWindow.set_geometry_hints to match below addition.James Henstridge1999-02-141-0/+8
| | | | | | | | | | | | | | | | | | | 1999-02-14 James Henstridge <james@daa.com.au> * gtk.py: added GtkWindow.set_geometry_hints to match below addition. * gtkmodule.c: added gtk_window_set_geometry_hints. 1999-02-14 James Henstridge <james@daa.com.au> * pygnome/examples/zterm.py (main): set geometry hints so that resizing occurs in terms of the character cells. * pygnome/gnome/zvt.py: added charwidth and charheight attributes to the ZvtTerm widget. * pygnome/generate/zvt.defs: added charwidth and charheight as exposed attributes of ZvtTerm widgets.
* added the configurable uiinfo item code.PYGTK_0_5_10GNOME_PYTHON_0_99James Henstridge1999-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 1999-02-08 James Henstridge <james@daa.com.au> * pygnome/gnome/uiconsts.py: added the configurable uiinfo item code. * pygnome/gnome/ui.py: made changes to reflect those below. * pygnome/gnomeuimodule.c: added support for configurable uiinfo items. Also changed accelerator type from character to integer. * pygnome/generate/gnomeui.defs: added gnome_app_set_statusbar_custom, gnome_date_edit_[sg]et_flags and gnome_dentry_edit_get_*_entry. Made change to gnome_date_edit_new_flags arguments. 1999-02-08 James Henstridge <james@daa.com.au> * description.py (GdkWindow.depth): documented presence of this attribute. * gtk.py (GtkFileSelection.complete): I had left out the argument in this prototype. Fixed now.
* altered these functions to use the gdk_pixmap_colormap_create variants ifJames Henstridge1999-02-041-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-02-04 James Henstridge <james@daa.com.au> * gtk.py (create_pixmap_from_xpm,create_pixmap_from_xpm_d): altered these functions to use the gdk_pixmap_colormap_create variants if the first argument is a GtkWidget or GtkStyle. This means you don't have to realise the widget before creating pixmaps from it. (GtkCheckMenuItem.set_state, GtkToggleButton.set_state): removed these compatibility routines so they don't mask GtkWidget.set_state. * gtkmodule.c: moved gtk_item_factory_get_widget here so I can catch NULL returns and convert them to None returns. Also added the depth attribute to GdkWindow objects. Also added gdk_pixmap_colormap_create_* variants. These can be used if you only have a colormap reference, rather than a window. * GtkExtra.py: there were a couple of calls to GtkContainer.border_width which is deprecated. * examples/testgtk/testgtk.py: fixes to dnd code in this example. I hadn't looked at it since Owen made the dnd changes. * examples/simple/tooltip2.py: fixed small bug pointed out by Markus Oberhumer. * pyglade/build.py (clist_new): fixes to make it parse after clist changes.
* small bug fix that I forgot to commit with the last lot of changes.James Henstridge1999-02-031-1/+1
|
* added GtkCList.focus_row.James Henstridge1999-02-021-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-02-02 James Henstridge <james@daa.com.au> * generate/gtklists.defs, gtk.py: added GtkCList.focus_row. * _gdkimlibmodule.c, GdkImlib.py: added push_visual and pop_visual, that can be used to easily set GTK to use the imlib visual/colormap combination. * gtkmodule.c: the PyObject -> GtkArg conversion routines were not catching some exceptions that they generated. This would cause wierd problems if you passed the wrong argument types to signal handlers. This was found by Chi-Deok Hwang <cdhwang@sr.hei.co.kr> * examples/simple/dnd.py, examples/simple/dndpixmaps.py: and example of drag and drop contributed by Chi-Deok Hwang <cdhwang@sr.hei.co.kr> * gtkmodule.c: added gtk_ctree_get_selection, that returns nodes rather than pointers. * gtk.py: made changes to reflect those below. Also added GtkWidget.get_colormap() (it was missing previously). * generate/gtkedit.defs (gtk_spin_button_update): added function. * generate/gtkmenus.defs (gtk_check_menu_item_set_active): function renaming. (gtk_menu_set_title): added function. * generate/gtkmisc.defs (gtk_toggle_button_[sg]et_active): added functions, and removed gtk_toggle_button_set_state.
* fixed typo in GtkProgress.configure.James Henstridge1999-01-261-1/+1
| | | | | | 1999-01-26 James Henstridge <james@daa.com.au> * gtk.py: fixed typo in GtkProgress.configure.
* changed a call to GtkContainer.add to GtkScrolledWindow.add_with_viewport.James Henstridge1999-01-211-2/+3
| | | | | | | | | 1999-01-21 James Henstridge <james@daa.com.au> * examples/testgtk/testgtk.py (create_scrolled_windows): changed a call to GtkContainer.add to GtkScrolledWindow.add_with_viewport. * gtk.py (GtkPacker.add): Added defaults for the arguments.
* made relevant changes.James Henstridge1999-01-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1999-01-11 James Henstridge <james@daa.com.au> * pygnome/gnome/ui.py: made relevant changes. * pygnome/generate/gnomeui.defs (gnome_paper_selector_get_*_margin): added functions. * pygnome/generate/gnomeui.defs (gnome_client_get_flags): added function. * pygnome/gnomeuimodule.c (_wrap_gnome_canvas_new_aa): command to create new aa canvas. Handles pushing and popping colormaps and visuals. * pygnome/gnome/config.py, pygnome/gnome/metadata.py: made corresponding changes. * pygnome/gnomemodule.c (_wrap_gnome_metadata_{,un}lock): added extra functions. * pygnome/generate/gnome.defs (gnome_config_{,private_}sync_file): added new functions from libgnome. * pygnome/Makefile.am (EXTRA_DIST): added examples/fifteen.py * pygnome/examples/fifteen.py: a new example of using the canvas with python. It is a translation of the puzzle example in test-gnome, and was contributed by Chi-Deok Hwang <cdhwang@sr.hei.co.kr>. 1999-01-11 James Henstridge <james@daa.com.au> * gtk.py (GtkProgress.get_current_percentage): fixed function call * gtk.py (GtkScrolledWindow): changed so it inherits from GtkBin instead of GtkContainer, to match changes in GTK. * GDK.py (DRAG_PROTO_ROOTWIN): Added the constant. * gtkmodule.c: forgot to include GTK_TYPE_DOUBLE in one of the GtkArg processing routines. Also fixed a problem for events with a NULL window.
* changed calls to GtkLabel.set to GtkLabel.set_text.James Henstridge1998-12-171-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1998-12-17 James Henstridge <james@daa.com.au> * examples/*/*.py: changed calls to GtkLabel.set to GtkLabel.set_text. * gtk.py: made changes to reflect those below. * generate/gtkbase.defs (gtk_widget_set_app_paintable): added this stub. * generate/gtkmisc.defs (gtk_label_set_text): renamed gtk_label_set to this, added gtk_label_set_line_wrap. * generate/gtkdnd.defs: Added gtk_drag_source_unset. * generate/gtklists.defs: moved reordering function stubs from ctree to clist. * generate/gtkcontainers.defs: removed GtkDrawWindow. Added gtk_paned_pack[12] * GtkExtra.py (MenuFactory.create): wasn't passing extra arguments onto signal connect. Bug fix from Sam Tannous <stannous@cisco.com> * gtkmodule.c: Applied some fixes to the ctree code from A.Hartgers@phys.tue.nl
* Updated to match latest changes to set of constants.James Henstridge1998-12-091-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1998-12-09 James Henstridge <james@daa.com.au> * pygnome/gnome/uiconsts.py: Updated to match latest changes to set of constants. * pygnome/gnome/ui.py: added the gnome-app-util and gnome-dialog-util functions. * pygnome/gnomeuimodule.c: Added the gnome-*-util.h functions that required callbacks here. Also found gtk_dialog_cauldron was not listed in the function list. * pygnome/generate/gnomeui.defs: Added the functions in gnome-app-util.h and gnome-dialog-util.h. I missed these when changing over to using the .defs files. * pygnome/gnome/ui.py: made additions and changes to reflect those in the _gnomeui module. * pygnome/generate/gnomeui.defs: added GnomeDialog changes, and added the GnomeDock* widgets. * pygnome/gnomeuimodule.c: Added gnome_app_install_menu_hints function. The strings in the uiinfo structure will probably not be freed due to string interning in Python. If this assumption is wrong, I may have to introduce a memory leak :( 1998-12-09 James Henstridge <james@daa.com.au> * gtk.py, generate/gtkmisc.defs, GTK.py: Added gtk_toolbar_set_space_style and the required enum. 1998-12-08 James Henstridge <james@daa.com.au> * gtkmodule.c: fixed up the toolbar functions, so they also use gtk_signal_connect_full, and now return the added child, like the C functions do. * examples/testgtk/testgtk.py: fixed up some stuff in the main function and clist test. * gtk.py, generate/gtkcontainers.defs: added gtk_window_set_transient_for and gtk_window_set_default_size. * gtkmodule.c: Changed to use _full functions instead of _interp functions. Also made gtk_signal_connect and friends use the gtk_signal_connect_full function rather than the default marshaller method.
* Initial revisionJames Henstridge1998-12-061-0/+2494