summaryrefslogtreecommitdiff
path: root/gtk/gtktreeprivate.h
Commit message (Collapse)AuthorAgeFilesLines
* Correct problems with earlier fix for bug #480065Kristian Rietveld2009-12-211-0/+2
| | | | | | | | | Initialize event_last_[xy] to out of range coordinates and also update these values in enter and leave notify. Fix up calls to update_prelight() from size allocate. Unconditionally doing these calls caused problems with hover selection. Now we only do this call when the "width before the expander column" has changed. (Which might be awkward, but it is the best heuristic I could come up with so far).
* Bug 480065 - wrong tree collapsed (or expanded) after having scrolledKristian Rietveld2009-12-211-0/+3
| | | | | | | | | | | | Commit again after revert. Store (x, y) of last motion event. From gtk_tree_view_adjustment_changed(), call prelight_or_select() so that the prelight is recalculated. We do the same from gtk_tree_view_size_allocate() for the case that clicking on an expander shows new rows that resize the column(s) left of the expander. This means that the expander is moved horizontally, in such a case the prelight also has to be reconsidered.
* Revert dd511e825aef9edada30107b3d891d496cc39fd8Benjamin Otte2009-12-161-3/+0
| | | | | The patch completely breaks entry completion - as can be seen when using epiphany. Bug 480065 has been reopened.
* Bug 596473 - Second double-click of GtkTreeView row doesn't emit...Kristian Rietveld2009-11-271-2/+3
| | | | | | | | | | | Rework double click handling in GtkTreeView. We cannot blindly use the 2BUTTON_PRESS and 3BUTTON_PRESS events. In case a user does two fast double clicks, we receive a 3BUTTON_PRESS and BUTTON_PRESS. We cannot easily deduce two double clicks from this. We have removed the bookkeeping using row references of the last paths clicked. Instead we monitor event time, (x, y) coordinates and compare against double-click-time and double-click-distance ourselves.
* Bug 480065 - wrong tree collapsed (or expanded) after having scrolledKristian Rietveld2009-11-271-0/+3
| | | | | | | | | | Store (x, y) of last motion event. From gtk_tree_view_adjustment_changed(), call prelight_or_select() so that the prelight is recalculated. We do the same from gtk_tree_view_size_allocate() for the case that clicking on an expander shows new rows that resize the column(s) left of the expander. This means that the expander is moved horizontally, in such a case the prelight also has to be reconsidered.
* Logically re-group fields in GtkTreePrivate structureKristian Rietveld2009-11-271-64/+80
| | | | | | | This should now cause much less of a headache than before. Fields have been properly reordered, each group has been given a comment. Since the GtkTreePrivate structure is private (as the name says), this should not have any effect on ABI.
* Use G_STRFUNC and G_STRLOC instead __FUNCTION__ and __FILE__Javier Jardón2009-10-261-8/+6
|
* bgo#580560 - Make Backspace work in the file chooser to to to the parent ↵Federico Mena Quintero2009-06-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | directory GtkFileChooserDefault actually implements a binding signal for Backspace, to make it go to the parent directory. However, GtkTreeView was eating our Backspace, and thus the file chooser was not getting a chance to execute its binding signal. GtkTreeView implements a Backspace binding itself, which it uses to move to the parent node of the current cursor node. However, the binding handler would return TRUE even if there was no parent to the current node. Now the binding handler only returns TRUE if it actually changed the cursor. Additionally, gtk_tree_view_key_press() sees if no bindings handled a key press; in that case, it re-sends the key press to the treeview's search entry. However, sending a Backspace to an empty entry makes the entry beep. Thus, we add a flag that gets set from GtkTreeView's Backspace binding handler, to tell gtk_tree_view_key_press() when it should *not* re-emit the key press on the search entry. Sort of, "yeah, I didn't handle this key press, but I don't want you to send it to the search entry, either!". Signed-off-by: Federico Mena Quintero <federico@novell.com>
* Fix #316087.Kristian Rietveld2008-07-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-07-11 Kristian Rietveld <kris@gtk.org> Bug 316087 - Resizing columns is chaotic * gtk/gtktreeprivate.h: add new member fields. * gtk/gtktreeview.c (gtk_tree_view_init), (validate_row): set post validation flag, (gtk_tree_view_size_allocate_columns): rework the size allocation mechanism to only recalculate the expand values if the width of the widget, content or the column configuration has changed, (gtk_tree_view_size_allocate): move call to size_allocate_columns() to before the adjustment updates so the proper width is used after we updated it, (gtk_tree_view_button_press), (gtk_tree_view_motion_resize_column): use the column width minus the expand value for the resized width, (gtk_tree_view_move_column_after): update call to gtk_tree_view_size_allocate_columns(). * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_expand): set use resized width to FALSE. * tests/Makefile.am: * tests/testtreecolumnsizing.c: new interactive test program for testing column resizing with different column configurations. svn path=/trunk/; revision=20818
* deprecate GtkDestroyNotify.Michael Natterer2008-06-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 2008-06-18 Michael Natterer <mitch@imendio.com> * gtk/gtktypeutils.h: deprecate GtkDestroyNotify. * gtk/gtkactiongroup.[ch] * gtk/gtkcombobox.[ch] * gtk/gtkcontainer.[ch] * gtk/gtkliststore.[ch] * gtk/gtkmain.[ch] * gtk/gtkmenu.c * gtk/gtkstock.[ch] * gtk/gtktreedatalist.[ch] * gtk/gtktreemodelfilter.[ch] * gtk/gtktreemodelsort.[ch] * gtk/gtktreeprivate.h * gtk/gtktreeselection.[ch] * gtk/gtktreesortable.[ch] * gtk/gtktreestore.[ch] * gtk/gtktreeview.[ch] * gtk/gtktreeviewcolumn.[ch]: s/GtkDestroyNotify/GDestroyNotify/g. svn path=/trunk/; revision=20448
* gtk/gtkbutton.h gtk/gtkcellrenderer.h gtk/gtkimcontext.h gtk/gtkstyle.hMichael Natterer2008-01-251-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-01-25 Michael Natterer <mitch@imendio.com> * gtk/gtkbutton.h * gtk/gtkcellrenderer.h * gtk/gtkimcontext.h * gtk/gtkstyle.h * gtk/gtktoolbar.h * gtk/gtktooltip.h * gtk/gtktreeprivate.h * gtk/gtktreeviewcolumn.h * gtk/gtkwidget.h: add const to constant structs which are passed into GTK+. Also add some forgotten const for const strings. * gtk/gtkbutton.c * gtk/gtkcellrenderer.c * gtk/gtkimcontext.c * gtk/gtkstyle.c * gtk/gtktoolbar.c * gtk/gtktooltip.c * gtk/gtktreeview.c * gtk/gtktreeviewcolumn.c * gtk/gtkwidget.c: changed accordingly. svn path=/trunk/; revision=19399
* Fix #477175, reported by Juri Pakaste.Kristian Rietveld2008-01-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 2008-01-10 Kristian Rietveld <kris@imendio.com> Fix #477175, reported by Juri Pakaste. * gtk/gtktreeprivate.h: * gtk/gtktreeview.c (gtk_tree_view_top_row_to_dy): do not set tree_view->priv->dy here directly, just calculate the new value and set it on the adjustment, (gtk_tree_view_adjustment_changed): add guards to not call gtk_tree_view_dy_to_top_row() if we are currently in gtk_tree_view_top_row_to_dy(), (gtk_tree_view_put): fix coordinate annotation: these are bin_window coordinates, not tree coordinates, (gtk_tree_view_real_start_editing): add cast. * gtk/tests/treeview-scrolling.c: add an assertion for checking the position of the editable in the "create new row and start editing" tests. svn path=/trunk/; revision=19331
* add more convenience API.Kristian Rietveld2007-07-191-0/+2
| | | | | | | | | | | | | | | | | | 2007-07-19 Kristian Rietveld <kris@imendio.com> * gtk/gtk.symbols: * gtk/gtktreeprivate.h: * gtk/gtktreeview.[ch] (gtk_tree_view_get_tooltip_context), (gtk_tree_view_[sg]et_tooltip_column): add more convenience API. * tests/testtooltip.c (query_tooltip_tree_view_cb): use gtk_tree_view_get_tooltip_context(). * demos/gtk-demo/demo.ui: add a tooltip column to the list store, set tooltip-column on the tree view. svn path=/trunk/; revision=18496
* add _gtk_tree_view_column_get_focus_area().Kristian Rietveld2007-03-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 2007-03-20 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeviewcolumn.c: * gtk/gtktreeprivate.h: add _gtk_tree_view_column_get_focus_area(). * gtk/gtktreeview.c (gtk_tree_view_clamp_column_visible): add focus_to_cell parameter, rework to handle clamping columns which are bigger than the available page size better, (gtk_tree_view_key_press): remove code handling moving the focus to other column headers, (gtk_tree_view_header_focus): add clamp_column_visible parameter, fix RTL support, don't wrap around when moving focus to other column headers, call gtk_tree_view_clamp_column_visible() instead of duplicating code, (gtk_tree_view_focus): only clamp the column visible when we are explicitly moving to another column header (fixes #399555, Charles Kerr), (gtk_tree_view_move_cursor_left_right): update call to gtk_tree_view_clamp_column_visible(). svn path=/trunk/; revision=17546
* add cursor_offset field.Kristian Rietveld2007-02-161-0/+1
| | | | | | | | | | | | | | 2007-02-16 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeprivate.h: add cursor_offset field. * gtk/gtktreeview.c (gtk_tree_view_init), (gtk_tree_view_move_cursor_page_up_down): fix off by one error in page up/down handling by memorizing the offset into the cursor row. (Fixes #399809, reported by Bruce Bowler). svn path=/trunk/; revision=17316
* Another fix for #164884.Kristian Rietveld2006-07-181-0/+2
| | | | | | | | | | | | 2006-07-18 Kristian Rietveld <kris@imendio.com> Another fix for #164884. * gtk/gtktreeprivate.h: add in_grab field. * gtk/gtktreeview.c (gtk_tree_view_button_press): only save press to possibly begin a drag when there's no grab pending, (gtk_tree_view_grab_notify): toggle in_grab field.
* Introduce grid and tree lines in GtkTreeView. (#106406, Martyn Russell).Kristian Rietveld2006-06-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | 2006-06-12 Kristian Rietveld <kris@imendio.com> Introduce grid and tree lines in GtkTreeView. (#106406, Martyn Russell). * gtk/gtktreeprivate.h: add new fields to GtkTreePrivate. * gtk/gtkenums.h: add GtkTreeViewGridLines. * gtk/gtktreeview.[ch] (gtk_tree_view_set_grid_lines), (gtk_tree_view_get_grid_lines), (gtk_tree_view_set_enable_tree_lines), (gtk_tree_view_get_enable_tree_lines): new API, (gtk_tree_view_class_init): new properties, (gtk_tree_view_init), (gtk_tree_view_{get,set}_property), (gtk_tree_view_realize), (gtk_tree_view_draw_grid_lines), (gtk_tree_view_bin_expose): implement. * gtk/gtk.symbols: update.
* Rubber banding for GtkTreeView, #80127. Uses same method as GtkIconView.Kristian Rietveld2006-06-021-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-06-02 Kristian Rietveld <kris@imendio.com> Rubber banding for GtkTreeView, #80127. Uses same method as GtkIconView. * gtk/gtktreeview.c (gtk_tree_view_class_init), (gtk_tree_view_init), (gtk_tree_view_get_property), (gtk_tree_view_set_property), (gtk_tree_view_set_rubber_banding), (gtk_tree_view_get_rubber_banding): add property, (gtk_tree_view_button_press): start rubber banding if enabled and press is on a non-selected node, (gtk_tree_view_button_release): stop rubber banding, (gtk_tree_view_motion_bin_window), (scrool_row_timeout): enable/update the rubber band, (gtk_tree_view_bin_expose): draw rubber band if active, (gtk_tree_view_stop_rubberband), (gtk_tree_view_update_rubber_band_selection_range), (gtk_tree_view_update_rubber_band_selection), (gtk_tree_view_update_rubber_band), (gtk_tree_view_paint_rubber_band): new functions. * gtk/gtktreeview.h: add new set/get function for rubber banding property. * gtk/gtktreeprivate.h: add a bunch of new private fields.
* (broken pipe)Kristian Rietveld2006-04-261-0/+3
|
* rename to _gtk_tree_selection_row_is_selectable and export internally,Kristian Rietveld2006-03-011-0/+3
| | | | | | | | | | | | | | | 2006-03-01 Kristian Rietveld <kris@imendio.com> * gtk/gtktreeselection.c (row_is_selectable): rename to _gtk_tree_selection_row_is_selectable and export internally, (gtk_tree_selection_real_select_node): changed so it is always possible to unselect insensitive nodes, changed the logic a bit to be more clear. * gtk/gtktreeprivate.h: add _gtk_tree_selection_row_is_selectable. * gtk/gtktreeview.c (gtk_tree_view_row_changed): Unselect a row if it became insensitive.
* #322591, Jonathan Blandford.Kristian Rietveld2006-01-241-4/+4
| | | | | | | | | | | | | | | | | | | | | 2006-01-24 Kristian Rietveld <kris@gtk.org> #322591, Jonathan Blandford. * gtk/gtktreeview.[ch] (gtk_tree_view_get_search_entry), (gtk_tree_view_set_search_entry), (gtk_tree_view_get_search_position_func), (gtk_tree_view_set_search_position_func): New functions, and small adaptions to the tree view code to allow for setting the entry and search position function. * gtk/gtktreeprivate.h: Removed GtkTreeViewSearchDialogPositionFunc typedef, which is now in gtktreeview.h as GtkTreeViewSearchPositionFunc. Add/update fields. * gtk/gtk.symbols: Add new functions. * tests/testtreesort.c: Add a little test for _set_search_entry().
* Properly handle model changes in GtkTreeSelection: (#322569, MiloszMatthias Clasen2005-11-291-0/+1
| | | | | | | | | | | | | | | | | | 2005-11-29 Matthias Clasen <mclasen@redhat.com> Properly handle model changes in GtkTreeSelection: (#322569, Milosz Derezynski) * gtk/gtktreeselection.c (gtk_tree_selection_selected_foreach): Get a reference to the model, and stop the iteration if the model of the treeview is changed on the way. * gtk/gtktreeprivate.h: * gtk/gtktreeselection.c (_gtk_tree_selection_emit_changed): New private function to emit the GtkTreeSelection::changed signal. * gtk/gtktreeview.c (gtk_tree_view_set_model): Call _gtk_tree_selection_emit_changed() when the model changes.
* Trivial cleanups. (#169647, #303455, Fabricio Barros Cabral, BenoitMatthias Clasen2005-06-211-6/+3
| | | | | | | 2005-06-21 Matthias Clasen <mclasen@redhat.com> * gtk/*.h: Trivial cleanups. (#169647, #303455, Fabricio Barros Cabral, Benoit Carpentier)
* Add a new boolean property ::hover-expand and make the treeviewMatthias Clasen2004-08-021-0/+4
| | | | | | | | | | 2004-08-02 Matthias Clasen <mclasen@redhat.com> * gtk/gtktreeview.h: * gtk/gtktreeview.c: * gtk/gtktreeprivate.h: Add a new boolean property ::hover-expand and make the treeview expand/collapse rows on mouseover if it is set.
* New argumentsJonathan Blandford2004-08-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | Thu Jul 29 16:36:42 2004 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeprivate.h: New arguments * gtk/gtktreeview.c: (gtk_tree_view_class_init): Add key_release callback (gtk_tree_view_init): Initialize timeout handler (gtk_tree_view_unrealize): clear timeout if needed (gtk_tree_view_key_press): Typeahead support (gtk_tree_view_key_release): Not used yet -- will be needed for typeahead. (gtk_tree_view_search_entry_flush_timeout): Remove typeahead entry in a timeout. (gtk_tree_view_ensure_interactive_directory): (gtk_tree_view_real_start_interactive_search): (gtk_tree_view_search_init): (gtk_tree_view_start_interactive_search): Typeahead support added. (gtk_tree_view_search_dialog_hide): Clear timeout and text when we hide.
* Forgotten file.Matthias Clasen2004-07-071-0/+4
|
* Forgotten commitMatthias Clasen2004-05-101-0/+2
|
* Moved search entries into priv data.Jonathan Blandford2004-04-111-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Sun Apr 11 15:08:45 2004 Jonathan Blandford <jrb@gnome.org> * gtk/gtktreeprivate.h: Moved search entries into priv data. * gtk/gtktreeview.c: Prep for type-ahead support. (gtk_tree_view_destroy): Destroy the search window explicitly. (gtk_tree_view_key_press): Minor change; prep for type-ahead (gtk_tree_view_ensure_interactive_directory): New function (gtk_tree_view_focus_out): Rework to handle new entry life-cycle. (gtk_tree_view_real_start_interactive_search): rework (gtk_tree_view_search_dialog_hide): ditto (gtk_tree_view_search_delete_event): ditto (gtk_tree_view_search_button_press_event): ditto (gtk_tree_view_search_key_press_event): ditto (gtk_tree_view_search_move): ditto (gtk_tree_view_search_init): ditto * gtk/gtktreeviewcolumn.c: (gtk_tree_view_column_cell_layout_clear): remove unused variable. * tests/testfilechooser.c: (main): change
* Add init_hadjust_value and prev_width. Initialize them here. ...and here.Matthias Clasen2004-02-021-0/+2
| | | | | | | | | | | | | Tue Feb 3 00:15:17 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): Add init_hadjust_value and prev_width. * gtk/gtktreeview.c (gtk_tree_view_init): Initialize them here. * gtk/gtktreeview.c (gtk_tree_view_update_size): ...and here. * gtk/gtktreeview.c (gtk_tree_view_size_allocate): Use them here to properly handle the initial position of rtl-oriented tree views. (#127581, chinen@jp.ibm.com)
* Migrating all cell renderers to use the new instance private dataKristian Rietveld2003-12-181-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thu Dec 18 00:57:18 2003 Kristian Rietveld <kris@gtk.org> Migrating all cell renderers to use the new instance private data construction. * gtk/gtktreeprivate.h: remove GtkCellRendererInfo, as it is no longer being used. * gtk/gtkcellrenderer.c (gtk_cell_renderer_init), (gtk_cell_renderer_class_init), (gtk_cell_renderer_get_property), (set_cell_bg_color), (gtk_cell_renderer_render): remove old GtkCellRendererInfo handling, migrate to instance private data. * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done), (gtk_cell_renderer_text_start_editing): moved focus_out_id from GtkCellRendererInfo to text renderer private data. * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_init), (gtk_cell_renderer_pixbuf_class_init), (gtk_cell_renderer_pixbuf_finalize), (gtk_cell_renderer_pixbuf_get_property), (gtk_cell_renderer_pixbuf_set_property), (gtk_cell_renderer_pixbuf_create_stock_pixbuf), (gtk_cell_renderer_pixbuf_get_size), (gtk_cell_renderer_pixbuf_render): migrate to instance private data. * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init), (gtk_cell_renderer_toggle_get_property), (gtk_cell_renderer_toggle_set_property), (gtk_cell_renderer_toggle_render): migrate to instance private data.
* Yay! Fixed height mode! Hooray! (Part 2 of #80868).Kristian Rietveld2003-12-171-0/+4
| | | | | | | | | | | | | | | | | | | | | Wed Dec 17 21:23:01 2003 Kristian Rietveld <kris@gtk.org> Yay! Fixed height mode! Hooray! (Part 2 of #80868). * gtk/gtktreeview.c (gtk_tree_view_class_init), (gtk_tree_view_init), (gtk_tree_view_set_property), (gtk_tree_view_get_property), (gtk_tree_view_set_model): add a fixed_height_mode property, (intialize_fixed_height_mode), (do_validate_rows), (column_sizing_notify), (gtk_tree_view_set_fixed_height_mode), (gtk_tree_view_style_set), (gtk_tree_view_row_changed), (gtk_tree_view_row_inserted), (gtk_tree_view_remove_column), (gtk_tree_view_insert_column): implement fixed height mode, (gtk_tree_view_append_column), (gtk_tree_view_insert_column), (gtk_tree_view_insert_column_with_attributes), (gtk_tree_view_insert_column_with_data_func): update docs. * gtk/gtktreeprivate.h: add two fields to GtkTreePrivate.
* Big TreeView DnD fixage, makes drops on empty models work, makes TreeStoreKristian Rietveld2003-09-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed Sep 10 01:06:44 2003 Kristian Rietveld <kris@gtk.org> Big TreeView DnD fixage, makes drops on empty models work, makes TreeStore DnD work and gets rid of gtk-tree-model-drop-append. Related bugs #95362 and #113314. I don't want to touch this code ever again. * gtk/gtktreeprivate.h (GtkTreePrivate): add empty_view_drop field. * gtk/gtktreednd.c (gtk_tree_get_row_drag_data): add check for selection_data->length. * gtk/gtktreeview.c (struct DestRow), (dest_row_free), (set_dest_row), (get_dest_row): we don't store just the row ref anymore, but a struct with the row ref and additional info, (set_destination_row): handle drops on empty space and some style fixes, (get_logical_dest_row): also return path_down_mode/drop_append_mode flags, handle dropping childs on their new parents, rewrite drop append handling into something saner, (gtk_tree_view_drag_motion): show a "drop possible arrow" on empty spaces, (gtk_tree_view_drag_drop): updates for updated backend, (gtk_tree_view_drag_data_received): updates for updated backend, path down mode (treestore DnD) handling, (gtk_tree_view_set_drag_dest_row): set empty_view_drop flag, when we are trying to drop a row on an empty model, (gtk_tree_view_get_drag_dest_row): handle empty_view_drop flag. * gtk/gtkliststore.c (gtk_list_store_drag_data_received), (gtk_list_store_row_drop_possible): style and drop-append fixes. * gtk/gtktreestore.c (gtk_tree_store_drag_data_received): ditto.
* Merge from stable.Kristian Rietveld2003-08-251-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Mon Aug 25 23:21:43 2003 Kristian Rietveld <kris@gtk.org> Merge from stable. Fixes #115871, reported by Michael Natterer. * gtk/gtktreeprivate.h: added GtkTreeSelectMode enum, added ctrl_pressed and shift_pressed bitfields, (_gtk_tree_selection_internal_select_node): replace GdkModifierType arg with GtkTreeSelectMode. * gtk/gtktreeselection.c (gtk_tree_selection_set_mode), (gtk_tree_selection_select_path), (gtk_tree_selection_unselect_path), (_gtk_tree_selection_internal_select_node): all updated for GdkModifierType -> GtkTreeSelectMode move. * gtk/gtktreeview.c (gtk_tree_view_button_press): set ctrl_pressed and shift_pressed around selection handling block, (gtk_tree_view_real_select_cursor_row), (gtk_tree_view_real_toggle_cursor_row), (gtk_tree_view_real_selection_cursor_parent), (gtk_tree_view_real_set_cursor): use ctrl_pressed and shift_pressed, instead of checking the event state. And also updates for the GdkModifierType -> GtkTreeSelectMode move.
* Remove dubious bitfields of unspecified signedness. (#112919, MortenMatthias Clasen2003-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-05-27 Matthias Clasen <maclas@gmx.de> * io-wbmp.c: Remove dubious bitfields of unspecified signedness. (#112919, Morten Welinder)gdk-p * gdk-pixdata.c (gdk_pixdata_to_csource): Replace all occurances of g_string_new ("") by g_string_new (NULL). (#106975, Morten Welinder) * gtk/gtkwindow-decorate.c: * gtk/gtktreeprivate.h: * gtk/gtkdnd.c: * gdk/win32/gdkwindow-win32.h: * gdk/linux-fb/gdkprivate-fb.h: * gdk/linux-fb/gdkkeyboard-fb.c: Remove dubious bitfields of unspecified signedness. (#112919, Morten Welinder) * gtk/queryimmodules.c (escape_string): * gtk/gtktextbtree.c (_gtk_text_btree_get_text): * gtk/gtksettings.c (_gtk_settings_parse_convert): * gtk/gtkrc.c (gtk_rc_parse_assignment): * gtk/gtkinputdialog.c (gtk_input_dialog_set_key): * gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Replace all occurances of g_string_new ("") by g_string_new (NULL). (#106975, Morten Welinder)
* add a gtk_list_store_sort_iter_changed line for some special case ...Kristian Rietveld2002-11-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org> * gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value): add a gtk_list_store_sort_iter_changed line for some special case ... (#96647 (issue 1), testcases from Soeren Sandmann and Daniel Elstner). Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org> Inconsistent state for toggle renderers, requested by Paolo Bacchilega in #88130. * gtk/gtktreeprivate.h: move GtkCellRendererInfo here. * gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away, fix some indentation issues. * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init), (gtk_cell_renderer_toggle_set_property), (gtk_cell_renderer_toggle_get_property), (gtk_cell_renderer_toggle_render): add an inconsistent property. * gtk/gtkstyle.c (gtk_default_draw_check), (gtk_default_draw_option): support drawing inconsistent options/checks for cells. Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org> * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done), (gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid calling _editing_done twice (which has nasty side-effects). (#96647, (issue 2) testcase from Soeren Sandmann). Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org> #82739, patch from Padraig O'Briain. * gtk/gtktreeviewcolumn.[ch]: add gtk_tree_view_column_cell_get_position() Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org> Yes, this chunk breaks ABI compatibility. Owen knows about it and agreed with it. It doesn't break ABI that bad though, things will still work. Please keep it silent :P. This patch fixes some keynav issues reported by Narayana Pattipati in #81633. (Also mentioned in #92037 (Sun tracking bug)). * gtk/gtkmarshalers.list: add two silly marshalers * gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all), (gtk_tree_view_real_unselect_all), (gtk_tree_view_real_select_cursor_row), (gtk_tree_view_real_toggle_cursor_row), (gtk_tree_view_real_expand_collapse_cursor_row), (gtk_tree_view_real_start_interactive_search): change the return type from void to gboolean, update prototypes, functions, signals and entries in GtkTreeViewClass, (gtk_tree_view_class_init): add select_cursor_row binding for enter key, (gtk_tree_view_key_press): only navigate the header button if the header is also visible ... Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org> API bit of #75745, reported by Richard Hult. * gtk/gtkcellrenderer.h (GtkCellRendererState): add GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
* API additions: _move, _reorder and _swap for stores, path constructor.Kristian Rietveld2002-07-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fri Jul 26 22:53:37 2002 Kristian Rietveld <kris@gtk.org> API additions: _move, _reorder and _swap for stores, path constructor. * gtk/gtktreemodel.[ch] (gtk_tree_path_new_from_indices): new function. * gtk/gtkliststore.[ch]: added gtk_list_store_reorder_func (private), gtk_list_store_reorder, gtk_list_store_swap, gtk_list_store_move. * gtk/gtktreestore.[ch]: added gtk_tree_store_reorder_func (private), gtk_tree_store_reorder, gtk_tree_store_swap, gtk_tree_store_move. Fri Jul 26 22:32:57 2002 Kristian Rietveld <kris@gtk.org> Merge from stable: * gtk/gtktreestore.c (node_free): return FALSE, (gtk_tree_store_finalize): use g_node_traverse instead of g_node_children_foreach, so the whole tree will be freed (#88854, patch from Emmanuel Briot). Fri Jul 26 22:32:24 2002 Kristian Rietveld <kris@gtk.org> Merge from stable: * gtk/gtktreeview.c (gtk_tree_view_button_press): fix some memleaks, (#84426, patch from Matthias Clasen). Fri Jul 26 22:31:25 2002 Kristian Rietveld <kris@gtk.org> Merge from stable: * gtk/gtktreeview.c (gtk_tree_view_unref_tree_helper): _iter_children check shouldn't be in g_return_return_val_if_fail (pointed out by Josh Green, #88997), (gtk_tree_view_set_model): call _gtk_tree_view_column_unset_model for each column when we unset the model (part of #82484), (gtk_tree_view_get_cell_area): return if we ran out of tree or if we got an invalid path (#82376). * gtk/gtktreeprivate.h: add _gtk_tree_view_column_unset_model. * gtk/gtktreeviewcolumn.c: implement _gtk_tree_view_column_unset_model which disconnects the sort_column_changed_signal (part of #82484). * gtk/gtkliststore.c (gtk_list_store_insert): append row if the given postion is off the end of the tree (#85813). * gtk/gtkentry.c (gtk_cell_editable_key_press_event): let's use 2-space indent, commit changes if up/down keys has been pressed, this overrides the focus key foo so the user won't be surprised (#84665).
* The "big treeview focus patch". Fixes several issues and adds someKristian Rietveld2002-05-051-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sun May 5 16:42:32 2002 Kristian Rietveld <kris@gtk.org> The "big treeview focus patch". Fixes several issues and adds some goodies. Related bugs: #73676, #73734, #78660. * gtk/gtktreeview.h: add gtk_tree_view_set_cursor_on_cell * gtk/gtktreeview.c (gtk_tree_view_button_press): focus on a cell if applicable, (gtk_tree_view_bin_expose): set_cell_data before iterating columns, add support for row-spanning focus rectangles, (gtk_tree_view_has_special_cell): new function, (gtk_tree_view_move_cursor_left_right): add support for multiple focusable cells in one column, (gtk_tree_view_set_cursor): call _set_cursor_on_cell now, (gtk_tree_view_set_cursor_on_cell): copy of _set_cursor, extended with focus_cell parameter, (gtk_tree_view_search_iter): removed unused column variable, (gtk_tree_view_start_editing): add neighbor size code to allow for multiple editable cells in one column. * gtk/gtktreeviewcolumn.c (_GtkTreeViewColumnCellInfo): add in_editing_mode field, (gtk_tree_view_column_get_edited_cell): new function, removed _get_editable_cell, (_gtk_tree_view_column_get_cell_at_pos): new function, (gtk_tree_view_column_pack_end): s/g_new/g_new0/ ..., (gtk_tree_view_column_cell_process_action): loads of changes to get it right and to allow for multiple special cells, etc, (gtk_tree_view_column_cell_first): new function, (gtk_tree_view_column_cell_last): ditto, (gtk_tree_view_column_cell_next): ditto, (gtk_tree_view_column_cell_prev): ditto, (gtk_tree_view_column_cell_focus): add left and right parameters, allow for multiple special cells, (gtk_tree_view_column_cell_is_visible): add assertion, (gtk_tree_view_column_focus_cell): new function, (gtk_tree_view_column_stop_editing): unset in_editing_mode flag, (_gtk_tree_view_column_get_neighbor_sizes): iterate through cells correctly * gtk/gtktreeviewcolumn.h: add gtk_tree_view_column_focus_cell * gtk/gtktreeprivate.h: s/_get_editable_cell/_get_edited_cell/, add _gtk_tree_view_column_get_cell_at_pos, add new parameters to _gtk_tree_view_column_cell_focus. * tests/testtreeedit.c: add some cells in order to test new code.
* Fixes #74206.Kristian Rietveld2002-04-251-0/+1
| | | | | | | | | | | | | | | Thu Apr 25 23:49:01 2002 Kristian Rietveld <kris@gtk.org> Fixes #74206. * gtk/gtktreeprivate.h: add _gtk_tree_view_column_count_special_cells * gtk/gtktreeview.c (_gtk_tree_view_column_has_editable_cell), (_gtk_tree_view_column_get_editable_cell): remove a space which made the code look ugly (_gtk_tree_view_column_count_special_cells): new function, (gtk_tree_view_column_cell_process_action): if there's only one activatable cell, the whole column will activate that renderer.
* add _gtk_tree_view_column_autosizeKristian Rietveld2002-04-191-1/+4
| | | | | | | | | | | | | | | Fri Apr 19 23:38:16 2002 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeprivate.h: add _gtk_tree_view_column_autosize * gtk/gtktreeview.c: privately export _gtk_tree_view_column_autosize, and add a small note about that function, (gtk_tree_view_button_press): check for double click and "not having an autosize" column before autosizing the column, * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_min_width): call _gtk_tree_view_column_autosize to update autosized column width (gtk_tree_view_column_set_max_width): ditto
* rename last_single_clicked{,_2} to last_button_press{,_2}, as the latterGTK_MULTIHEAD_MERGEPOINT_19_04_02Kristian Rietveld2002-04-191-2/+2
| | | | | | | | | | | | Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename last_single_clicked{,_2} to last_button_press{,_2}, as the latter is a more sane name. * gtk/gtktreeview.c (gtk_tree_view_button_press): use ->priv->anchor instead of ->priv->cursor, check for the anchor at another place, as you can go in edit mode without having an anchor.
* add _gtk_tree_view_column_get_editable_cell andKristian Rietveld2002-04-141-1/+6
| | | | | | | | | | | | | | | | | Sun Apr 14 16:56:59 2002 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeprivate.h: add _gtk_tree_view_column_get_editable_cell and _gtk_tree_view_column_get_neighbor_sizes * gtk/gtktreeviewcolumn.c (struct _GtkTreeViewColumnCellInfo): add real_width field, (_gtk_tree_view_column_get_editable_cell): implement, (gtk_tree_view_column_cell_process_action): fill info->real_width (_gtk_tree_view_column_get_neighbor_sizes): implement * gtk/gtktreeview.c (gtk_tree_view_button_press): make the "editable widget" show up with the same size as the actual cell, so it doesnt cover the complete column if there are any other cells in that column.
* Fixes #78110Kristian Rietveld2002-04-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org> Fixes #78110 * gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node): add override_browse_mode argument and implement, (gtk_tree_selection_unselect_path): always unselect the path, (toplevel): update uses of _gtk_tree_selection_internal_select_node * gtk/gtktreeview.c: update uses of _gtk_tree_selection_internal_select_node * gtk/gtktreeprivate.h (_gtk_tree_selection_internal_select_node): update prototype Tue Apr 9 21:39:44 2002 Kristian Rietveld <kris@gtk.org> Fixes #77862 * gtk/gtktreeprivate.h: add _gtk_tree_view_column_has_editable_cell * gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_has_editable_cell): new function * gtk/gtktreeview.c (gtk_tree_view_button_press): send cell event on first click when cell isn't editable Tue Apr 9 21:37:31 2002 Kristian Rietveld <kris@gtk.org> * gtk/gtktreedatalist.c (_gtk_tree_data_list_check_type): add some types which were missing and useful to use (fixes #77870)
* add _gtk_rbtree_set_fixed_height()Kristian Rietveld2002-03-201-0/+2
| | | | | | | | | | | | | | | | | Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org> * gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height() * gtk/gtktreeprivate.h: add fixed_height_check field * gtk/gtktreeview.c (gtk_tree_view_init): initialize scroll_sync_timer and fixed_height_check (do_validate_rows): add fixed_height_check. If all validated rows in the first cycle have the same height, then we set that height for the entire tree. This is some sort of 'fake' optimization, but helps a lot for the common case. We keep validating the entire tree in the background though. (gtk_tree_view_set_model): reset fixed_height_check
* just return when we have an input_only window (fix by Owen Taylor)Kristian Rietveld2002-03-161-0/+1
| | | | | | | | | | | | | | | | | | | | | Sat Mar 16 23:54:56 2002 Kristian Rietveld <kris@gtk.org> * gdk/x11/gdkwindow-x11.c (gdk_window_set_static_bit_gravity): just return when we have an input_only window (fix by Owen Taylor) * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): add scroll_sync_timer * gtk/gtktreeview.c (install_scroll_sync_handler): new function, (scroll_sync_handler): ditto, (gtk_tree_view_unrealize): take scroll_sync_timer into account (gtk_tree_view_row_deleted): install scroll_sync_timer instead of calling top_row_to_dy/dy_to_top_row directly -- this greatly speeds up clearing the model (#73199) * gtk/gtktreemodelsort.c (gtk_tree_model_sort_convert_path_to_child_path): fix up this function, for some reason I really screwed it up (fixes #74663)
* delay scrolling until we try to draw the window.Jonathan Blandford2002-02-231-1/+1
| | | | | | | | | | Wed Feb 20 16:44:05 2002 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): delay scrolling until we try to draw the window. * gtk/gtktreeview.c (validate_visible_area): Implement scroll_to_cell.
* add last_single_clicked and last_single_clicked_2 rowrefs and addKristian Rietveld2002-02-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fri Feb 22 22:39:59 2002 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeprivate.h: add last_single_clicked and last_single_clicked_2 rowrefs and add disable_popdown to the bitfield * gtk/gtktreeview.c (gtk_tree_view_destroy): add destroy stuff for two new rowrefs (gtk_tree_view_button_press): add some 'advanced' button handling, so double click is being handled right (double click madness was discovered by Anders Carlsson) * gtk/gtktreeview.c (gtk_tree_view_set_property): add missing break (gtk_tree_view_class_init): default value of headers_visible should be TRUE (both pointed out by Damon Chaplin, #71986) * gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search): connect to populate_popup, (gtk_tree_view_search_disable_popdown): new function, (gtk_tree_view_real_search_enable_popdown): ditto, (gtk_tree_view_search_enable_popdown): ditto, (gtk_tree_view_search_dialog_destroy): check for gtk-tree-view-popdown-disabled (#71868) * gtk/gtktreeview.c (gtk_tree_view_set_reorderable): move ->priv->reorderable assignment to bottom. (#72122)
* change gtk_tree_view_column_cell_render, gtk_tree_view_column_cell_focus,Kristian Rietveld2002-02-191-1/+16
| | | | | | | | | | | | | | | | | | | | | Tue Feb 19 17:36:31 2002 Kristian Rietveld <kris@gtk.org> * gtktreeprivate.h, gtktreeviewcolumn.[ch], gtktreeview.c: change 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 to be private functions. * gtktreeviewcolumn.[ch]: add install_handler argument to _cell_set_dirty to control if _mark_rows_col_dirty (which calls install_presize_handler) gets called, set widths correctly so autosizing works (#71870) * gtktreeview.c (gtk_tree_view_column_autosize): new function, (gtk_tree_view_button_press): make double click on column separator resize the row (#71870) (gtk_tree_view_get_dest_row_at_pos): change DnD threshold to 33% (#71869, suggestion by Anders Carlsson)
* Fix for bug #69586Kristian Rietveld2002-01-271-1/+1
| | | | | | | | | | | | | | Sun Jan 27 22:13:02 Kristian Rietveld <kris@gtk.org> Fix for bug #69586 * gtk/gtktreeprivate.h: get rid of tab_offset, introduce expander_size * gtk/gtktreeview.c: get rid of ->priv->tab_offset, introduce expander_size caching (from style), fix CELL_HEIGHT macro, use MAX ("RBNODE_HEIGHT", expander_size) (differs per case) for row height calculation, added style_set callback
* Update top_row. Remove extraneous print statements.Jonathan Blandford2002-01-211-0/+2
| | | | | | | Mon Jan 21 18:28:17 2002 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): Update top_row. Remove extraneous print statements.
* Now we test we can unselect nodes before selecting new ones.Jonathan Blandford2002-01-101-0/+2
| | | | | | | | | Wed Jan 9 19:10:07 2002 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node): Now we test we can unselect nodes before selecting new ones. (gtk_tree_selection_real_select_node): be careful comparing booleans.