summaryrefslogtreecommitdiff
path: root/gtk/gtktreedatalist.c
Commit message (Collapse)AuthorAgeFilesLines
* gtk/: fully remove gtkalias hacksJavier Jardón2010-07-101-1/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=623845
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Mitch and Tim svn path=/trunk/; revision=20669
* deprecate GtkDestroyNotify.Michael Natterer2008-06-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,Matthias Clasen2007-03-091-2/+1
| | | | | | | | | | | | | 2007-03-09 Matthias Clasen <mclasen@redhat.com> * Everywhere: Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder, Djihed Afifi) * configure.in: Check for ftw.h svn path=/trunk/; revision=17444
* Apply a cleanup patch by Kjartan Maraas (#341812)Matthias Clasen2006-10-081-1/+1
| | | | | | 2006-10-08 Matthias Clasen <mclasen@redhat.com> * Apply a cleanup patch by Kjartan Maraas (#341812)
* Use the slice allocater for GtkTreeDataSortHeader.Matthias Clasen2005-12-291-4/+51
| | | | | | | | | | | | | | 2005-12-29 Matthias Clasen <mclasen@redhat.com> * gtk/gtktreedatalist.c: Use the slice allocater for GtkTreeDataSortHeader. * gtk/gtktreedatalist.h: * gtk/gtktreedatalist.c (_gtk_tree_data_list_set_header): New function. * gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): * gtk/gtkliststore.c (gtk_list_store_set_sort_func): * gtk/gtktreestore.c (gtk_tree_store_set_sort_func): Use it here.
* Use g_slice instead of mem chunks.Matthias Clasen2005-12-051-11/+2
| | | | | | | | | | | | | | | 2005-12-05 Matthias Clasen <mclasen@redhat.com> * gtk/gtkwidget.c: * gtk/gtkuimanager.c: * gtk/gtktreedatalist.c: * gtk/gtktext.c: * gtk/gtkmain.c: * gtk/gtkitemfactory.c: * gtk/gtkseparator.[hc]: * gtk/gtkclist.[hc]: * gtk/gtkctree.c: * gtk/gtkgc.c: Use g_slice instead of mem chunks.
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-201-1/+1
| | | | | | | | | | | | | | | | | | 2005-03-20 Matthias Clasen <mclasen@redhat.com> Make PLT-reduction work with gcc4, and don't include everything in gdkalias.h: * gtk/grk.symbols: Group symbols by header and source file. * gtk/makegtkalias.pl: Protect definitions by the same preprocessor symbols used to guard the headers. Move the alias declarations to a separate file which is produced when calling makegtkalias.pl -def * gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate this file. * gtk/*.c: Include gtkalias.h after the other headers, include gtkaliasdef.c at the bottom. * gtk/*.h: Small cleanups.
* gdk/gdkkeyuni.c gdk/gdkpixbuf-drawable.c gdk/gdkrgb.c gdk/x11/gdkdnd-x11.cMatthias Clasen2005-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-03-01 Matthias Clasen <mclasen@redhat.com> * gdk/gdkkeyuni.c * gdk/gdkpixbuf-drawable.c * gdk/gdkrgb.c * gdk/x11/gdkdnd-x11.c * gdk/x11/gdkevents-x11.c * gdk/x11/gdkproperty-x11.c * gdk/x11/gdkvisual-x11.c * gdk-pixbuf/gdk-pixbuf.c * gtk/gtkaction.c * gtk/gtkbindings.c * gtk/gtkcolorbutton.c * gtk/gtkcombo.c * gtk/gtkcontainer.c * gtk/gtkfilechooserdefault.c * gtk/gtkfilesel.c * gtk/gtkgamma.c * gtk/gtkiconview.c * gtk/gtkinputdialog.c * gtk/gtkitemfactory.c * gtk/gtkmenu.c * gtk/gtktextview.c * gtk/gtktooltips.c * gtk/gtktreedatalist.c * gtk/gtkuimanager.c * gtk/tree_minus.xpm * gtk/tree_plus.xpm * gtk/xdgmime/xdgmime.c * gtk/xdgmime/xdgmime.h: Move constant data to .rodata.
* Support columns whose declared type is an interface better, by treatingMatthias Clasen2004-11-081-4/+19
| | | | | | | | 2004-11-08 Matthias Clasen <mclasen@redhat.com> * gtk/gtktreedatalist.c: Support columns whose declared type is an interface better, by treating them like G_TYPE_OBJECT if the interface types requires G_TYPE_OBJECT.
* Underscore-prefix gtk_tree_data_list_compare_func.Matthias Clasen2004-08-111-5/+5
| | | | | | | | | | | | 2004-08-11 Matthias Clasen <mclasen@redhat.com> * gtk/gtktreedatalist.[hc]: * gtk/gtkliststore.c: * gtk/gtktreestore.c: Underscore-prefix gtk_tree_data_list_compare_func. * gtk/gtk.symbols: Remove gtk_tree_data_list_compare_func. * gtk/makegtkalias.pl: No need to include gtktreedatalist.h any more.
* Add hidden aliases for exported symbols which are used internally in orderMatthias Clasen2004-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mon Aug 9 12:48:04 2004 Matthias Clasen <maclas@gmx.de> Add hidden aliases for exported symbols which are used internally in order to get rid of many PLT entries. (#145519, Arjan van de Ven) * gtk/Makefile.am: Add rules to generate gtk.def and from gtk.symbols, and make make check check the abi with abicheck.sh. (gtk_private_h_sources): Add gtkinternals.h (gtk_built_private_headers): Add gtkalias.h (gtk_extra_sources): Add gtk.symbols (EXTRA_DIST): Add makegtkalias.pl and abicheck.sh * gtk/gtk.symbols: New file. Definition of the GTK+ ABI. The file can be processed by cpp to filter out certain subsets of symbols. * gtk/abicheck.sh: New file. Script to check the actually symbols exported from libgtk-x11.2.0.so against the symbols found in gtk.symbols. * gtk/makegtkalias.pl: New file. Perl script to generate the header containing the alias definitions for internally used exported symbols from a list of symbols. * gtk/gtkinternals.h: New file. An uninstalled header listing symbols which must be exported for some reason and do not appear in any other header. * gtk/*.c: Include gtkalias.h
* Fixes #136082 and #135265, patch by Morten Welinder.Federico Mena Quintero2004-03-061-0/+1
| | | | | | | | | | 2004-03-05 Federico Mena Quintero <federico@ximian.com> Fixes #136082 and #135265, patch by Morten Welinder. * configure.in: Use AC_SYS_LARGEFILE. * */*.c: #include <config.h>
* Patch from David Hampton to fix sorting on booleans.Jonathan Blandford2003-11-201-2/+2
| | | | | | | Thu Nov 20 14:51:41 2003 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreedatalist.c (gtk_tree_data_list_compare_func): Patch from David Hampton to fix sorting on booleans.
* Deprecation cleanupManish Singh2002-10-071-2/+2
| | | | | | | | | Mon Oct 7 11:59:33 2002 Manish Singh <yosh@gimp.org> * gtk/gtkliststore.[ch] gtk/gtktreedatalist.[ch] gtk/gtktreednd.c gtk/gtktreemodel.[ch] gtk/gtktreemodelsort.[ch] gtk/gtktreeselection.[ch] gtk/gtktreesortable.[ch] gtk/gtktreestore.[ch]: Deprecation cleanup
* [ merge from stable ]Daniel Elstner2002-05-271-13/+75
| | | | | | | | | | | | | | | 2002-05-27 Daniel Elstner <daniel.elstner@gmx.net> [ merge from stable ] Fixes for #83190 * gtk/gtktreedatalist.h (_GtkTreeDataList::data): Add missing fields to anonymous union: glong, gulong, gint64 and guint64. This is an internal header file, so it should not affect ABI or API compatibility. * gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value): Implement missing support for glong, gulong, gint64 and guint64 fundamental types. Use data.v_uint instead of data.v_int for G_TYPE_FLAGS, as GValue does. (_gtk_tree_data_list_value_to_node): ditto (_gtk_tree_data_list_node_copy): Add case labels for missing fundamental types, and reorder them to match the other functions. (gtk_tree_data_list_compare_func): Implement comparison for glong, gulong, gint64 and guint64. Use g_value_get_enum() for G_TYPE_ENUM and g_value_get_flags() for G_TYPE_FLAGS, rather than accessing them as gint/guint. The G_VALUE_HOLDS() check probably won't like this.
* Fixes #78110Kristian Rietveld2002-04-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* added compile time switch to put the tree views into a hpaned for owen toTim Janik2002-03-031-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Sun Mar 3 06:39:19 2002 Tim Janik <timj@gtk.org> * gtk/gtkfilesel.c: added compile time switch to put the tree views into a hpaned for owen to play with. * gtk/gtktreedatalist.c (_gtk_tree_data_list_header_free): * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_cell_data_func), (gtk_tree_view_column_finalize): * gtk/gtktreestore.c (gtk_tree_store_set_default_sort_func), (gtk_tree_store_set_sort_func), (gtk_tree_store_finalize): * gtk/gtktreeselection.c (gtk_tree_selection_finalize): * gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func), (gtk_tree_model_sort_set_default_sort_func), (gtk_tree_model_sort_set_sort_func): * gtk/gtkliststore.c (gtk_list_store_set_default_sort_func), (gtk_list_store_set_default_sort_func), (gtk_list_store_set_sort_func), (gtk_list_store_finalize): add reentrancy protection around destroy() function invocation. * gtk/gtktreeselection.c (gtk_tree_selection_set_select_function): fix destroy function invocation (which was missing).
* wow! Am I a moron or what 0 < 1 is not equivalent to strcmp ("a", "b")Jonathan Blandford2002-01-081-9/+55
| | | | | | | Tue Jan 8 18:39:23 2002 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreedatalist.c (gtk_tree_data_list_compare_func): wow! Am I a moron or what 0 < 1 is not equivalent to strcmp ("a", "b")
* if we use pointers, we should free the previous pointer first (if itKristian Rietveld2001-12-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | Mon Dec 3 21:15:59 2001 Kristian Rietveld <kris@gtk.org> * gtk/gtktreedatalist.c (_gtk_tree_data_list_value_to_node): if we use pointers, we should free the previous pointer first (if it exists), before we set a new pointer. (#64726) * gtk/gtktreeprivate.h: get rid of cursor_drag * gtk/gtktreeview.c (gtk_tree_view_unrealize): remove check for cursor_drag (gtk_tree_view_bin_expose): don't directly return in the while loop (gtk_tree_view_class_init): indentend expanders by default (gtk_tree_view_header_focus): only give the button focus if it's clickable, visible and the column is reorderable (#65539) * gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_realize_button): create and free cursor
* maybe fix #64160 Also, forgot to save gtktreeview.hJonathan Blandford2001-11-151-2/+2
| | | | | | | Thu Nov 15 18:44:33 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreedatalist.c (_gtk_tree_data_list_free): maybe fix #64160 Also, forgot to save gtktreeview.h
* after allocating the treedatalist, zero it to make sure the values areMatt Wilson2001-10-311-0/+1
| | | | | | | | 2001-10-31 Matt Wilson <msw@redhat.com> * gtk/gtktreedatalist.c (_gtk_tree_data_list_alloc): after allocating the treedatalist, zero it to make sure the values are cleared from any garbage that was in this chunk.
* Remove G_DISABLE_CONST_RETURNS.Owen Taylor2001-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tue Oct 23 11:53:00 2001 Owen Taylor <otaylor@redhat.com> * gtk/Makefile.am (INCLUDES): Remove G_DISABLE_CONST_RETURNS. * gtk/gtkfontsel.[ch]: Make gtk_font_selection_get_font() G_CONST_RETURN. (Murray Cumming) * gtk/gtkfontsel.c (gtk_font_selection_dialog_get_preview_text): Make G_CONST_RETURN. * gtk/gtkfilesel.c (open_user_dir): Fix bug with freeing results of g_get_home_dir(). * gtk/gtkfilesel.c: Make filesel->fileop_file a duplicated copy. Storing the return from gtk_entry_get_text() is evil. * gtk/gtkcombo.c gtk/gtkcellrenderertext.c gtk/gtkbindings.c gtk/gtkfilesel.c gtk/gtkfontsel.c gtk/gtkimmodule.c gtk/gtkobject.c gtk/gtkoldeditable.c gtk/gtktreedatalist.c gtk/gtksignal.c: Add const. * gdk/x11/gdkkeys-x11.c (get_direction): Add missing const. * gtk/gtktreeview.c: Namespace object data keys to be safe, even if we are setting them on private widgets. * gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search): Duplicate entry->text before setting it as object data.
* change scroll_to_cell delayed code to happen in size_allocate.Jonathan Blandford2001-10-011-5/+3
| | | | | | | | | | | | | | Mon Oct 1 14:07:02 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeview.c (gtk_tree_view_size_allocate): change scroll_to_cell delayed code to happen in size_allocate. * gtk/gtkstyle.c (gtk_default_draw_expander): change prelight/normal arrow drawing. * gtk/gtktreedatalist.c: Change compare func to use g_utf8_collate * gtk/gtktreestore.c: refactor.
* add missing '}' that got munched by #endif.Jonathan Blandford2001-04-231-0/+1
| | | | | | | | | | | | | | | | | | | Mon Apr 23 18:57:03 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtksocket.c (gtk_socket_filter_func): add missing '}' that got munched by #endif. * gtk/Makefile.am (gtk_plug_c_sources): add missing '\' * gtk/gtktreeview.c: Refactored code to clean up a number of events. * gtk/gtktreemodel.c (gtk_tree_path_compare): Switched return values to make consistent with other functions. Spotted by Jeff Franks <jcf@tpg.com.au>. * gtk/gtktreeview.h (struct _GtkTreeViewClass): Fixes to signal declaration spotted by Jeff Franks <jcf@tpg.com.au>.
* Initial work on implementing the GtkTreeSortable interface. Basicaly a bigJonathan Blandford2001-04-011-1/+1
| | | | | | | Sun Apr 1 00:52:06 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreestore.c: Initial work on implementing the GtkTreeSortable interface. Basicaly a big cut'n'paste job.
* More work on implementing sortable interface.Jonathan Blandford2001-03-281-2/+24
| | | | | | | Tue Mar 27 20:55:29 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkliststore.c: More work on implementing sortable interface.
* fix braino. New interface to add cleanup sortable support.Jonathan Blandford2001-03-231-1/+107
| | | | | | | | | | | | | | | | | | | | Thu Mar 22 19:27:34 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render): fix braino. * gtk/gtktreesortable.[ch]: New interface to add cleanup sortable support. * gtk/gtktreeview.c: Addition of initial sortable support. * gtk/gtktreestore.c: Addition of initial sortable support. * gtk/gtkliststore.c: Addition of initial sortable support. * gtk/gtkmarshal.list: yet another marshaller. * gtk/gtktreedatallist.[ch]: shared code between the store models for handling sorting headers.
* Fix up focus code a lot.Jonathan Blandford2001-03-131-172/+134
| | | | | | | | | | | | | | | | | Mon Mar 12 21:02:08 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeview.c (gtk_tree_view_header_focus): Fix up focus code a lot. * gtk/gtktreedatalist.c (_gtk_tree_data_list_free): use g_mem_chunk. (_gtk_tree_data_list_alloc): use g_mem_chunk. (_gtk_tree_data_list_node_to_value): Fix to switch on G_TYPE_FUNDAMENTAL. (_gtk_tree_data_list_value_to_node): Fix to switch on G_TYPE_FUNDAMENTAL. (_gtk_tree_data_list_node_copy): Fix to switch on G_TYPE_FUNDAMENTAL.
* Make select_all not work if you're in SINGLE mode (it doesn't make thatJonathan Blandford2001-03-101-114/+119
| | | | | | | | | | | | | | | | | | | Fri Mar 9 20:36:21 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeselection.c (gtk_tree_selection_select_all): Make select_all not work if you're in SINGLE mode (it doesn't make that much sense, anyway.) * gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value): handle types more sanely. (_gtk_tree_data_list_value_to_node): handle types more sanely. (_gtk_tree_data_list_node_copy): handle types more sanely. * gtk/gtkliststore.c (gtk_list_store_set_cell): fix to work with GValue better. Converts the type as well. * gtk/gtktreestore.c (gtk_tree_store_set_cell): fix to work with GValue better. Converts the type as well.
* marshaller fixes.Tim Janik2001-03-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed Mar 7 13:24:57 2001 Tim Janik <timj@gtk.org> * gtk/*.c: marshaller fixes. * gtk/gtkmarshal.list: extreme cleanup. * gtk/gtktreeview.c (gtk_tree_view_class_init): disable interface param spec for now. * gtk/gtktexttag.c (gtk_text_tag_set_property): use g_value_get_boxed() where appliable. * gtk/gtktypeutils.[hc]: updates to GLib API changes. special cased autogenerated boxed types from gtktypebuiltins_ids.c which are not reference counted: GtkSelectionData, GdkEvent, GdkColor, GtkTextIter, PangoTabArray, PangoFontDescription, GtkTreeIter and GtkTreePath. Thu Mar 1 03:58:56 2001 Tim Janik <timj@gtk.org> * gtk/gtktreeselection.h: * gtk/gtktreemodel.c: * gtk/gtktreedatalist.[hc]: fixed includes. no gobject/* file should be included directly, and gobject/gmarshal.h as well as gtk/gtkmarshal.h even can't be included directly. * Makefile.am: grr, install gtk-config-2.0. * gtk/testgtk.c: * gtk/simple.c: * gtk/gtkmenu.c: * gtk/gtkitemfactory.c: use g_object_connect() instead of passing "*signal*::*" args to gtk_widget_set(). * gtk/gtktypeutils.[hc]: got rid of GTK_TYPE_SIGNAL. * gtk/*.c: removed trailer arg from property setters and getters. macro fixups. Thu Mar 1 04:01:57 2001 Tim Janik <timj@gtk.org> * test-gdk-pixbuf.c: fixed includes.
* updated for win32 msvc buildHans Breuer2001-02-191-0/+1
|
* fix bug in here where prev pointer was set to the wrong thingHavoc Pennington2001-01-311-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-30 Havoc Pennington <hp@redhat.com> * gtk/gtkliststore.c (gtk_list_store_insert_before): fix bug in here where prev pointer was set to the wrong thing * gtk/gtktreemodel.c (gtk_tree_path_is_ancestor): new function (gtk_tree_path_is_descendant): new function * gtk/gtkliststore.c (gtk_list_store_iter_n_children): return cached length (gtk_list_store_get_iter): don't modify iter if we can't get the path. * gtk/gtkliststore.h (struct _GtkListStore): cache the length * gtk/gtktreednd.h: add virtual function row_drop_possible() to GtkTreeDragDest * gtk/gtktreestore.c (copy_node_data): fix varargs type error that was causing segfault * gtk/gtktreedatalist.c (_gtk_tree_data_list_node_copy): set next pointer to NULL * gtk/gtktreestore.c (gtk_tree_store_append): fix memleak * gtk/gtkliststore.c (gtk_list_store_iter_next): don't modify iter on returning FALSE (gtk_list_store_iter_children): ditto (gtk_list_store_iter_nth_child): ditto (gtk_list_store_iter_nth_child): ditto (gtk_list_store_iter_parent): ditto * gtk/gtktreestore.c (gtk_tree_store_get_path): g_return_if_fail on iter->user_data != NULL instead of silently accepting it. (gtk_tree_store_iter_next): ditto. Also, don't modify iter unless we are returning TRUE. (gtk_tree_store_iter_children): ditto (gtk_tree_store_iter_nth_child): ditto (gtk_tree_store_iter_parent): ditto (gtk_tree_store_insert): remove handling of parent->user_data == NULL, replace with parent == NULL * gtk/gtktreemodel.c (inserted_callback): put some fixes in here, and a comment explaining things * gtk/gtktreestore.c: add GtkTreeDragSource/GtkTreeDragDest interface support to GtkTreeStore. * gtk/gtktreemodel.c (gtk_tree_path_prev): didn't properly return FALSE if no prev, fix * gtk/gtktreeview.c (set_source_row): use a row reference (set_dest_row): use a row reference
* adapt to handle PangoColorHavoc Pennington2001-01-261-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-26 Havoc Pennington <hp@redhat.com> * gtk/gtktextlayout.c (convert_color): adapt to handle PangoColor * gtk/gtktreeview.c (gtk_tree_view_widget_to_tree_coords): fix to not offset by TREE_VIEW_HEADER_HEIGHT (gtk_tree_view_tree_to_widget_coords): fix to not offset by TREE_VIEW_HEADER_HEIGHT * configure.in (included_loaders): for me, --with-included-loaders generates the error "the specified loader yes does not exist", i.e. the arg defaults to "yes", so change test for value "" to test for value "yes", and include all loaders in that case. * gtk/gtkrbtree.c (_gtk_rbtree_get_depth): new function * gtk/gtktreeview.c (gtk_tree_view_get_cell_rect): fix to properly handle TREE_VIEW_VERTICAL_SEPARATOR (gtk_tree_view_bin_expose): fix to consider the row offset as pointing halfway into vertical separator. (gtk_tree_view_draw_node_focus_rect): ditto * gtk/gtkdebug.h, gtk/gtkmain.c (gtk_init_check): Add --gtk-debug=updates, which causes gdk_window_set_debug_updates (TRUE) to be called. * gdk/gdkwindow.c (gdk_window_set_debug_updates): Allow enabling a debug mode where the invalid region is colored in on invalidate, so you can see the flicker and know whether your redraw code is doing a good job. * gtk/gtktreeview.c (gtk_tree_view_queue_draw_node): Work in tree window coordinates (clip rect is in tree window coords) * gtk/Makefile.am: add gtktreednd.[hc] * gtk/gtkliststore.c: implement gtktreednd interfaces. * gtk/gtktreednd.c, gtk/gtktreednd.h: New interface to support drag-and-drop data operations on a model (so we can set up tree drag-and-drop automatically) * gtk/testgtk.c: Add a window to change sensitivity in the GtkLabel test; add a way to change the entry frame in GtkEntry test * gtk/gtkentry.c (gtk_entry_set_has_frame): (gtk_entry_get_has_frame): new functions to remove the frame around an entry (gtk_entry_size_request): shrink requisition if no frame (gtk_entry_draw_focus): don't draw frame if no frame * gtk/gtkstyle.c (gtk_default_draw_check): draw custom look for checks inside a cell renderer (gtk_default_draw_option): ditto for options * gtk/gtktreeviewcolumn.c (update_button_contents): add/remove children from the alignment, not the button (gtk_tree_view_column_init): ref/sink the column, to emulate GObject refcounting. * gtk/gtkcellrenderer.c (gtk_cell_renderer_init): ref/sink * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render): Use theme functions to draw the toggles * gdk/gdkpango.c (gdk_pango_get_gc): use GdkRGB to alloc colors * gdk/gdkpango.h, gdk/gdkpango.c: Add GdkPangoAttrStipple and GdkPangoAttrEmbossed to use in rendering insensitive text * gdk/gdkpango.c (gdk_draw_layout_line): render new properties * gtk/gtkstyle.c (gtk_default_draw_layout): handle sensitivity using new GDK features
* handle case where there are no rows in the modelHavoc Pennington2001-01-091-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-09 Havoc Pennington <hp@redhat.com> * gtk/gtktreeview.c (gtk_tree_view_check_dirty): handle case where there are no rows in the model * gtk/gtkliststore.c (gtk_list_store_iter_children): if parent is NULL, then return the start of the list * gtk/gtktreeview.c (gtk_tree_view_setup_model): don't build tree if we can't get any rows from an empty model * gtk/gtktreeviewcolumn.h (struct _GtkTreeViewColumn): remove extraneous * after function pointer typedef usage * Makefile.am: don't specify full path to cp and rm * gtk/gtkcellrenderertextpixbuf.c (gtk_cell_renderer_text_pixbuf_get_size): check width/height != NULL before dereferencing, fixes a segfault that happened from time to time * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render): use gdk_pixbuf_render_to_drawable_alpha() to get alpha channel, and reindent the function (gtk_cell_renderer_pixbuf_get_size): indentation * gtk/gtkdialog.c (gtk_dialog_run): destroy main loop only after we quit it (gtk_dialog_add_buttons_valist): add g_return_if_fail (gtk_dialog_set_default_response): New function, to set default button (gtk_dialog_set_response_sensitive): New function, to set sensitivity of buttons * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_get_property): allow getting a NULL pixbuf (gtk_cell_renderer_pixbuf_set_property): allow setting a NULL pixbuf * gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value): handle any G_TYPE_OBJECT subclass, not just the base class, and also boxed types. (_gtk_tree_data_list_value_to_node): ditto * gtk/gtkrbtree.c: Run _gtk_rbtree_test at strategic points if --gtk-debug=tree * gtk/gtkmain.c: add GTK_DEBUG_TREE * gtk/gtkdebug.h: add GTK_DEBUG_TREE
* Adapt to GtkTreeSelection changesHavoc Pennington2001-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-01 Havoc Pennington <hp@redhat.com> * gtk/gtktreeview.c: Adapt to GtkTreeSelection changes * gtk/gtktreeselection.c (_gtk_tree_selection_set_tree_view): don't fill in tree_view->priv->selection, kind of an unexpected side effect * gtk/gtkcellrenderertext.c: Remove definition of _ and include gtkintl.h * gtk/gtkcellrenderer.c: Remove definition of _ and include gtkintl.h (gtk_cell_renderer_get_property): remove calls to g_value_init * gtk/gtkcellrendererpixbuf.c: Remove definition of _ and include gtkintl.h * gtk/gtkcellrenderertextpixbuf.c: Remove definition of _ macro and include gtkintl.h (gtk_cell_renderer_text_pixbuf_class_init): remove spaces from property names * gtk/gtktreeselection.c (_gtk_tree_selection_new): rename, return GtkTreeSelection (_gtk_tree_selection_new_from_with_view): rename, return GtkTreeSelection (_gtk_tree_selection_set_tree_view): rename with uscore (gtk_tree_selection_get_selected): fill in the "model" out param first, so it gets filled in even if we return at the top of the function (gtk_tree_selection_real_select_all): add a comment and an else{} to clarify this a bit (gtk_tree_selection_real_unselect_all): add the same else{} * gtk/gtktreeselection.h: Rename new, new_with_tree_view, and set_tree_view to have underscore prefixes, move them to the private header, fix return type of new_with_tree_view (struct _GtkTreeSelection): mark struct fields private * gtk/gtktreemodel.c (gtk_tree_model_get_flags): return GtkTreeModelFlags, not a guint (gtk_tree_path_prev): return gboolean not gint (gtk_tree_path_up): return gboolean not gint * gtk/gtktreemodel.h (struct _GtkTreeModelIface): make get_flags return GtkTreeModelFlags, not a guint * gtk/gtktreemodelsort.c (gtk_tree_model_sort_finalize): check that child model is non-null before unrefing it (g_value_int_compare_func): make this a qsort compare func, not a boolean predicate * gtk/gtktreemodelsort.h: rename gtk_tree_model_set_sort_column, (add -umn to the end), and mark it unimplemented (gtk_tree_model_sort_resort): remove, this wasn't implemented, and I don't see what it's for - doesn't the model always sort itself? (gtk_tree_model_sort_set_compare): this had the wrong signature * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_attributes): Fix the docs to say that it destructively replaces existing attributes (previously said that it added attributes). (gtk_tree_view_column_set_visible): canonicalize bool before equality testing. Also, check for realization before hiding/showing the tree_column->window; if this window could exist before realization, then it's busted and needs fixing, we can't create GDK resources pre-realization. Also, remove superfluous queue_resize(), since set_size() does that for us. (gtk_tree_view_column_set_col_type): check realization before using tree_column->window * gtk/gtktreedatalist.c: fix filename in copyright notice
* Not sure how this ever worked. Fixed it to use new iter stuff, and addedJonathan Blandford2000-10-271-9/+29
| | | | | | | | | | Fri Oct 27 17:56:26 2000 Jonathan Blandford <jrb@redhat.com> * gtk/gtkliststore.c: Not sure how this ever worked. Fixed it to use new iter stuff, and added all the appropriate signals et al. * gtk/gtktreedatalist.h: s/gtk/_gtk to further reinforce that this code is internal to gtk only.
* Got rid of GtkTreeNode, and changed it to GtkTreeIter. Added iteratorsJonathan Blandford2000-10-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | Wed Oct 25 20:40:25 2000 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreemodel.h: Got rid of GtkTreeNode, and changed it to GtkTreeIter. Added iterators everywhere. * gtk/gtktreeviewcolumn.c: Changed to use the iterators. * gtk/gtktreeviewselection.c: Changed to use the iterators. * gtk/gtktreestore.c: Changed to use the iterators. * gtk/gtkliststore.c: Commented out the code. Will convert to iterators tomorrow. * gtk/gtkmodelsimple.c: Commented out the code. Will convert to iterators tomorrow. * gtk/treestoretest.c: Changed to use iterators. * demos/testgtk/main.c: Moved to use the new iterator system.
* Fix GtkTreeNode *node ->GtkTreeNode node issue.52000-10-151-0/+1
| | | | | | | | | | | 2000-10-15 <jrb@redhat.com> * gtk/gtktreeview.c, gtk/gtktreeview.h, gtk/gtktreestore.h, gtk/gtktreestore.c, gtk/gtkliststore.h, gtk/gtkliststore.c, gtk/gtkmodelsimple.c, gtk/gtkmodelsimple.h, gtk/gtktreedatalist.c, gtk/gtktreemodel.h, gtk/gtktreeselection.c, gtk/gtktreeselection.h: Fix GtkTreeNode *node ->GtkTreeNode node issue.
* Added values other then G_TYPE_STRING. Minor commenting updates. FormatJonathan Blandford2000-10-131-0/+43
| | | | | | | | | 2000-10-12 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreedatalist.[ch] (gtk_tree_data_list_value_to_node): Added values other then G_TYPE_STRING. * gtk/gtktreeselection.c: Minor commenting updates. * gtk/gtktreeview.c: Format updates.
* Checked in initial draft of the new tree widget.42000-10-051-0/+159
2000-10-04 <jrb@redhat.com> * gtk/gtk{tree,cell}?*.[ch]: Checked in initial draft of the new tree widget.