Gtk2-Ex-Datasheet-DBI
view release on metacpan or search on metacpan
Fixed cell editable height problem in gtk-2.10.x. Thanks Torsten :)
Fixed setting up primary_key_column and primary key in field list if a primary key is passed ( ie if column_info fails - very rare )
Ported data lock functionality from Gtk2::Ex::DBI, adding functions:
lock()
unlock()
Automatically scroll the treeview as the cursor changes
Copy a cell's font size to the editable when editing ( currently fixed at Arial though )
Update CellRendererDate to accept font sizes
Imported calculator from Gtk2::Ex::DBI ( and added ->calculator( column_name ) method )
Added GST removal and rounding to calculator
Added on_changed functionality ( gets passed { treepath => $treepath, iter => $iter } )
Pass model and iter to before_apply() and on_apply() functions
Added DBD::SQLite support
Added ( slightly buggy for some data, but hey ... ) initial column sorting support. Double-click in column headers to sort
Fixed duplicate execution of validation code
Added support for ticking over gtk2 main loop while populating a treeview ( good for slow networks )
Fixed header alignment for datasheets that aren't visible when being constructed
Added support for custom dialogs when datasheets need applying
Added icons to all dialogs
Added footer support, with sum, max, average
Better currency formatting
Added max_column() function
Added average_column() function
Documentation updates
Patches from DLB:
Add support for Postgres:
Set search path in constructor when Postgres driver detected
Added support for Postgres in last_insert_id()
Added detection of primary key columns
Other patches and suggestions merged
Simplified primary key detection
Allow 'faked' column_info hash to be passed into constructor
Version 2.0, released 16-Jan-2006
Overhaul SQL clause handling - now all SQL-related stuff is in the 'sql' hash
Added support for placeholders in where clause
Added detection of primary key from column_info() ( MySQL & SQL Server only at present )
Added destroy method, which destroys all signal handlers we've created, then destroys itself
( not working yet )
Renamed $model_setup->{table} to $model_setup->{from} in dynamic models
Added legacy mode to support 1.x requests
Process dynamic models out of order when querying - no need to queue them for later
Added method revert(), which is a synonym of undo()
Added graceful handling of failure of $dbh->column_info ( warn to console what's happened )
Warn to console if $dbh->column_info fails AND we don't have a primary_key definition
Only ask to apply changes if not read_only
Addded missing schema request to self
- harmless anyway because we only support automatic renderer selection for MySQL currently
Updated documentation & cleaned up POD somewhat
Version 1.0, ( not released )
Added dump_on_error flag to dump SQL on a DBI error
Converted more 0s to FALSEs
Version 0.9, released 16-Sep-2005
Add some logic to MOFO::CellRendererDate so that popup calendar gets placed completely on-screen
Added MOFO::CellRendererTime and use when a Time column is encountered
Dialog question asking user whether to apply if window is closed with unapplied changes to recordset
Add missing code to process sql_order_by
Renamed readonly flag to read_only ( for consistency ) and hide status column when read_only
Version 0.8, released 15-Aug-2005
Refresh dynamic combos when a toggle that they depend on is edited
Automatically choose a renderer type based on the database field type of each field ( can be overriden )
Automatically choose a default value for each column based on the database field definition ( can be overriden )
Removed more Perl warnings re: uninitialised use of ...
Choose string / numeric comparison based on database field type for combo renderers
Rename 'none' renderer to 'hidden' ( and still support old 'none' renderers )
Use text renderer for hidden columns ... so we can point dynamic combos at them and catch changes
Version 0.7, released 02-Aug-2005
Added support for dynamic combos - ie combos whose options depend on the current row
Disabled MOFO::CellRendererSpinButton ... not exactly working properly yet
Add support for CellRendererCombos with a string ID ( previously only supported int IDs )
Added undo() method - convenience function that basically does $self->query( undef, TRUE );
Added MOFO::CellRendererDate - copied and pasted from Torsten Schoenfeld's example in the Gtk2 distribution
Separated demo app from main package
Version 0.6, released 10-Jun-2005
Switched standard CellRendererText with a custom renderer that has better focus policy after editing
Added custom CellRendererSpinButton ( with improved focus policy ) for numeric values
Fixed segfault on exit of example app
Version 0.5, released 08-Jun-2005
Fixed make test so module actually installs via cpan
Version 0.4, released 27-May-2005
Changed calculation of primary key column to use $self->fieldlist
Added renderer type 'none' for hidden fields
Insert method accepts a list of column / value pairs to set initial values
Added column_from_name function to convert a column name into it's number in the model
Added column_value to look up a value in the selected row
Added question dialog to ask whether to apply current datasheet before querying ( override with 'dont_apply' )
Cache the fieldlist array in $self->{fieldlist} so we don't have to query the DB every time we need a field list
Remove requirement of field definitions - will use fieldnames from the database if none are given ( CellRendererText for everything )
Added POD documentation
Version 0.3, released 24-May-2005
Worked around 'Use of uninitialized value' warnings
Added support for CellRendererCombo - thanks muppet :)
Fixed bug where only the 1st updated row was applied
Added support for CellRendererToggle
Added dynamic column sizing, with mix of percentage and absolute values
Added 'multi_select' property which sets 'multiple' selection mode ( only really affects deleting )
Version 0.2, released 19-May-2005
Ported to Gtk2::ListStore / Gtk2::TreeView
( only supports text cell renderers currently )
Renamed sql_fields to sql_select and changes requirement back to and SQL select statement
( run in 1.356 second using v1.01-cache-2.11-cpan-39bf76dae61 )