Commit Graph

136 Commits

Author SHA1 Message Date
Matthias Clasen
f94e21be43 Make it work correctly when the child model is cleared completely.
Mon Mar  1 23:59:18 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_deleted):
	Make it work correctly when the child model is cleared
	completely. (#121633)
2004-03-01 23:34:08 +00:00
Matthias Clasen
07d4d314b6 The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and
Fri Jan 16 23:59:01 2004  Matthias Clasen  <maclas@gmx.de>

	The first part of the fix for #114351 (see also
	gdk-pixbuf/ChangeLog and po/ChangeLog):

	* gtk/gtkintl.h:
	* gdk-pixbuf/gdk-pixbuf-i18n.h:
	* gdk/gdkintl.h: Define P_() for property blurbs and nicks.

	* gdk/gdkdisplaymanager.c:
	* gdk-pixbuf/gdk-pixbuf.c:
	* modules/input/gtkimcontextxim.c:
	* gtk/*.c:  Mark property blurbs and nicks with P_().

	* po/Makefile.in.in: Add --keyword=P_ to the xgettext
	invocation, since property blurbs and nicks are
	now marked with P_().
2004-01-16 23:10:05 +00:00
Kristian Rietveld
4d9e9afdc1 Fixes #110249, reworked patch from Joshua N Pritikin.
Thu Dec 18 19:13:12 2003  Kristian Rietveld  <kris@gtk.org>

	Fixes #110249, reworked patch from Joshua N Pritikin.

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_type),
	(gtk_tree_model_sort_tree_drag_source_init),
	(gtk_tree_model_sort_row_draggable),
	(gtk_tree_model_sort_drag_data_get),
	(gtk_tree_model_sort_drag_data_delete): implement GtkTreeDragSource.

	* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_get_type),
	(gtk_tree_model_filter_tree_drag_source_init),
	(gtk_tree_model_filter_row_draggable),
	(gtk_tree_model_filter_drag_data_get),
	(gtk_tree_model_filter_drag_data_delete): ditto.
2003-12-18 18:19:05 +00:00
Marco Pesenti Gritti
3ea41a9212 Check that index is not bigger than level array length also when depth is
2003-12-17  Marco Pesenti Gritti  <marco@gnome.org>

        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_get_iter):

        Check that index is not bigger than level array length
        also when depth is 1. Now get_iter_first correctly return
        FALSE when the model is empty (#129411).
2003-12-17 22:47:55 +00:00
Kristian Rietveld
5f3cde77ba A trick for a faster treeview, step 1. Patch to short circuit
Sat Dec 13 16:13:27 2003  Kristian Rietveld  <kris@gtk.org>

	A trick for a faster treeview, step 1. Patch to short circuit
	_build_tree(), inspired by Jonathan (#80868).

	* gtk/gtktreeview.c (gtk_tree_view_init): don't put _IS_LIST in
	flags by default,
	(gtk_tree_view_build_tree): don't even try to recurse when the
	model says that it is a list, remove flag unsetter,
	(gtk_tree_view_set_model): change flag setting logic.

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_flags):
	propagate whether or not the child model has _IS_LIST set.

	* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_get_flags):
	ditto.
2003-12-13 15:20:28 +00:00
Kristian Rietveld
15885321cb Merged from stable.
Fri Aug 15 20:06:42 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtktreeview.c (gtk_tree_model_sort_row_changed),
	(gtk_tree_model_sort_level_find_insert),
	(gtk_tree_model_sort_insert_value): fix off-by-one error.
	(#109292 continued, patch from Yann Rouillard).
2003-08-15 18:13:54 +00:00
Jonathan Blandford
0f635335e2 Slightly modified patch from Owen Taylor <otaylor@redhat.com> to improve
Wed Jun  4 19:22:58 2003  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_level_find_insert):
        Slightly modified patch from Owen Taylor <otaylor@redhat.com> to
        improve the speed of inserting rows into an already sorted list,
        #109292
2003-06-04 23:44:52 +00:00
Kristian Rietveld
3804b7e64b ChangeLog too long to mention here. Bugs fixed: #100973, #83195, #87556,
#99803, #100458. And a couple of non-bugzilla'd bugs (I am soooo sure
I misspelled that).
2003-01-27 21:41:06 +00:00
Matthias Clasen
7cb3f99fc7 Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
Kristian Rietveld
d52077d68d remove the second ref command on the child_model, we only have to ref it
Sat Nov  2 23:48:52 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_model): remove
        the second ref command on the child_model, we only have to ref it
        once here. (#96851, reported by Jorn Baayen).
2002-11-02 22:34:58 +00:00
Kristian Rietveld
bd20ab01a5 Behaviour change, apply changes if the entry of the editable gets a focus
Tue Oct 15 00:53:14 2002  Kristian Rietveld  <kris@gtk.org>

        Behaviour change, apply changes if the entry of the editable gets
        a focus out event (#82405).

        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_focus_out_event):
        new function,
        (gtk_cell_renderer_text_start_editing): stop editing and apply
        changes on focus-out.

Tue Oct 15 00:47:35 2002  Kristian Rietveld  <kris@gtk.org>

        Fixes an *evil* GtkTreeModelSort bug, #93629.

        * gtk/gtktreemodel.c (release_row_references): return if the
        refs->list is NULL.

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_changed): if we
        are swapping two rows (re-insertion on row_changed), also *emit*
        a rows_reordered signal. oops.

Tue Oct 15 00:45:03 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkliststore.c (gtk_list_store_remove_silently): free
        the actual link after the node has been removed (#92014).

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_column_finalize):
        free the cell_list and the child if the exists (#92014).

Tue Oct 15 00:40:25 2002  Kristian Rietveld  <kris@gtk.org>

        Don't accept drops if the model has been sorted, #93758)

        * gtk/gtkliststore.c (gtk_list_store_row_drop_possible): return
        FALSE if the list has been sorted.

        * gtk/gtktreestore.c (gtk_tree_store_row_drop_possible): check
        if drag_dest is a TreeStore, return FALSE if the tree has been
        sorted.

Tue Oct 15 00:33:59 2002  Kristian Rietveld  <kris@gtk.org>

        Compiler warning fixage, (#85858, #85859, #85860, #85872)

        * gtk/gtkcellrendererpixbuf (gtk_cell_renderer_pixbuf_render):
        s/guint/GtkCellRendererState/.

        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render):
        ditto.

        * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render),
        (gtk_cell_renderer_toggle_activate): ditto.

        * gtk/gtkliststore.c (gtk_list_store_get_flags): a
        s/guint/GtkTreeModelFlags/ on the return type.
2002-10-14 22:50:18 +00:00
Manish Singh
55704fc7c1 Deprecation cleanup
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
2002-10-07 19:10:39 +00:00
Jonathan Blandford
e05a96609d fix warning. (gtk_tree_view_search_iter): fix warning, #85884
Fri Jul  5 02:50:24 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreeview.c (gtk_tree_view_collapse_all): fix warning.
	(gtk_tree_view_search_iter): fix warning, #85884

	* gtk/gtktreestore.c (gtk_tree_store_get_flags): change return
	value to GtkTreeModelFlags to fix compiler warning, #85883

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_flags): change
	return value to GtkTreeModelFlags to fix compiler warning, #85882

	* gtk/gtktreemodel.c (gtk_tree_path_prepend_index): fix compiler
	warning, #85881
2002-07-05 17:25:16 +00:00
Kristian Rietveld
f39b189d5c Discussed in #76249.
Tue Jun  4 19:24:41 2002  Kristian Rietveld  <kris@gtk.org>

        Discussed in #76249.

        * gtk/gtkliststore.[ch]: made gtk_list_store_remove return a gboolean,
        added gtk_list_store_iter_is_valid.

        * gtk/gtktreestore.[ch]: made gtk_tree_store_remove return a gboolean,
        added gtk_tree_store_iter_is_valid.

        * gtk/gtktreemodelsort.[ch]: added VALID_ITER macro as in liststore
        and treestore sources, added gtk_tree_model_sort_iter_is_valid.
2002-06-04 17:17:49 +00:00
Dave Camp
cffb8ea32d Built an iter directly instead of using
2002-05-24  Dave Camp  <dave@ximian.com>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
	Built an iter directly instead of using
	gtk_tree_model_sort_elt_get_path(), since that returns a path for
	the child model.
2002-05-24 18:38:21 +00:00
Dave Camp
b1db95a6fb Use indices[i] >= level->array->len rather than level->array->len >
2002-05-24  Dave Camp  <dave@ximian.com>

	* gtk/gtktreemodelsort.c: Use indices[i] >= level->array->len
	rather than level->array->len > indices[i] in the bounds check.
2002-05-24 16:24:04 +00:00
Jonathan Blandford
207daec517 Fix so that you can set a new sort func.
Sun Apr 28 22:43:55 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
	so that you can set a new sort func.
2002-04-29 02:57:06 +00:00
Kristian Rietveld
ef32bad877 resort if we're already in 'unsorted' state, and update the docs
Thu Apr 25 00:26:34 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func):
        resort if we're already in 'unsorted' state, and update the docs
2002-04-24 22:21:25 +00:00
Matthias Clasen
4138ac479b A bunch of trivial doc fixes. 2002-04-20 23:57:41 +00:00
Kristian Rietveld
a3045c84ef so this function was completely broken. Fix it and improve readability.
Thu Apr 18 00:23:31 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c
        (gtk_tree_model_sort_convert_path_to_child_path): so this function
        was completely broken. Fix it and improve readability.
2002-04-17 22:26:44 +00:00
Kristian Rietveld
3089666944 add check for y > tree_view->priv->height (fixes #76974)
Mon Apr  1 22:20:24 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): add
        check for y > tree_view->priv->height (fixes #76974)

Mon Apr  1 22:19:39 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_sort_level): get
        the stamp changes right this time

Mon Apr  1 22:13:24 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodel.c (gtk_tree_row_reference_free): only
        disconnect the ref callbacks when model == proxy (Thanks go to
        Manuel Clos Crespo for the remote debugging)
2002-04-01 20:40:58 +00:00
Owen Taylor
5a86c7f19e recommit after tagging 2_0_1 2002-03-30 20:52:42 +00:00
Owen Taylor
52f7a61289 revert change for tagging 2_0_1 2002-03-30 20:51:19 +00:00
Kristian Rietveld
8cc6b89fb9 revert the latest stamp increment changes, as it broke stuff for trees
Sat Mar 30 15:19:24 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c: revert the latest stamp increment changes,
        as it broke stuff for trees
2002-03-30 14:15:28 +00:00
Kristian Rietveld
835094b105 remove call to gtk_tree_model_sort_increment_stamp
Fri Mar 29 20:17:35 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
        remove call to gtk_tree_model_sort_increment_stamp
        (gtk_tree_model_sort_sort_level): always increment the stamp
2002-03-29 19:14:02 +00:00
Kristian Rietveld
bd7678c78d just return when we have an input_only window (fix by Owen Taylor)
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)
2002-03-16 23:30:44 +00:00
Vitaly Tishkov
2480ef52fb gtk/gtktreemodelsort.c typo in docs for
2002-03-14 Vitaly Tishkov <tvv@sparc.spb.su>

        * gtk/gtktreemodelsort.c
	typo in docs for gtk_tree_model_sort_convert_iter_to_child_iter() fixed
2002-03-14 17:56:57 +00:00
Darin Adler
1845cc4349 Update offsets before finding where to insert the new value.
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_insert_value):
	Update offsets before finding where to insert the new value.

	* gtk/gtktreeview.c: (validate_visible_area): Make sure we redraw when
	we scroll, instead of just updating the scroll position variables.
2002-03-07 06:04:03 +00:00
Tim Janik
f0b58ab846 added compile time switch to put the tree views into a hpaned for owen to
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).
2002-03-03 05:41:28 +00:00
Jonathan Blandford
a265926e2f at Feb 23 23:00:48 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.h: add () to function macros as per owen's
	request.

	* gtk/gtkfontsel.c: (gtk_font_selection_select_best_style),
	(gtk_font_selection_show_available_sizes),
	(gtk_font_selection_set_font_name):
	* gtk/gtktreemodel.c: (gtk_tree_model_get_iter_first),
	(gtk_tree_model_foreach):
	* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_sort_level),
	(gtk_tree_model_sort_build_level):
	* gtk/gtktreeselection.c: (gtk_tree_selection_selected_foreach):
	* gtk/gtktreeview.c: (validate_visible_area),
	(gtk_tree_view_focus_to_cursor), (gtk_tree_view_set_model),
	(gtk_tree_view_map_expanded_rows), (gtk_tree_view_search_move),
	(gtk_tree_view_search_init):
	* tests/testtreeview.c: (run_automated_tests): change iter_root
	to iter_first
2002-02-24 04:18:44 +00:00
Kristian Rietveld
67051d64f4 emit row_deleted before we start unreffing the nodes ourselves
Tue Feb 12 14:27:41 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_deleted): emit
        row_deleted before we start unreffing the nodes ourselves
        (gtk_tree_model_sort_increment_stamp): always increment the stamp,
        and not only if the stamp equals 0 (pointed out by Darin Adler)

        * gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): we want
        to continue the while loop and not the nested for loop.
2002-02-12 17:48:02 +00:00
Darin Adler
c823b8f6fd Consider reordering the row even when there's no sort column, if there's a
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_row_changed):
        Consider reordering the row even when there's no sort column, if
        there's a default sort function.
        (gtk_tree_model_sort_rows_reordered): Use symbolic constants.
        (gtk_tree_model_sort_level_find_insert): Add code to handle the
        case where there is no sort column, but a default sort function.
        (gtk_tree_model_sort_insert_value): Add code to handle the case
        where there is no sort column an no default sort function.
        (gtk_tree_model_sort_set_model): Use symbolic constant.
        (gtk_tree_model_sort_reset_default_sort_func): Use symbolic constant.
2002-02-12 01:00:22 +00:00
Kristian Rietveld
1e40b8cb18 convert the iter to a child iter again, after doing _iter_children. It's
Sat Feb  9 22:57:43 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_build_level): convert
        the iter to a child iter again, after doing _iter_children. It's
        possible that _iter_children added some rows and updated the stamp.
2002-02-09 21:56:30 +00:00
Jonathan Blandford
d243e3ec4a fix evil ref bug where the wrong row and a deleted row was unreffed. Found
Fri Feb  8 21:25:56 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_deleted): fix
	evil ref bug where the wrong row and a deleted row was unreffed.
	Found by Darin Adler <darin@bentspoon.com>
2002-02-09 01:28:00 +00:00
Darin Adler
e0e8197e1c Pass the ref_node and unref_node calls through to the child model.
* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_ref_node),
	(gtk_tree_model_sort_unref_node): Pass the ref_node and
	unref_node calls through to the child model.
2002-02-08 17:13:14 +00:00
Kristian Rietveld
2d1b1a623c rip out all the debugging ifdefs, as modelsort seems to be stable (and
Wed Feb  6 18:25:24 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c: rip out all the debugging ifdefs, as
        modelsort seems to be stable (and nobody complained :)
2002-02-06 17:24:28 +00:00
Kristian Rietveld
f0c42465b9 add some more stamp checks (pointed out by Anders Carlsson)
Mon Jan 21 01:21:54 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreestore.c: add some more stamp checks (pointed out
        by Anders Carlsson)

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): don't
        assume _row_changed will insert sort (because _row_changed doesn't
        need to follow this signal), so apply insert sort here
        (gtk_tree_model_sort_level_find_insert): header doesn't need to be
        set here, so use a return instead of g_return_val_if_fail.
2002-01-22 00:21:40 +00:00
Kristian Rietveld
953e0702b9 fix a load of open line ends, (gtk_tree_model_sort_set_model): only free
Tue Jan 15 01:13:51 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c: fix a load of open line ends,
        (gtk_tree_model_sort_set_model): only free root level if it's
        !NULL
2002-01-15 00:12:30 +00:00
Kristian Rietveld
86f07fb5bd various cleanups, (get_child_iter_from_elt): removed,
Sun Jan 13 01:15:45 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c: various cleanups,
        (get_child_iter_from_elt): removed,
        (gtk_tree_model_sort_elt_get_path): rewritten to be a lot cleaner
        and especially faster,
        (gtk_tree_model_convert_iter_to_child_iter): use
        gtk_tree_model_sort_elt_get_path
2002-01-13 00:22:04 +00:00
Vitaly Tishkov
f74dd2386a gtk/gtkimage.c gtk/gtkimcontext.c gtk/gtktreemodel.c
2002-01-10            Vitaly Tishkov       <tvv@sparc.spb.su>
        * gtk/gtkimage.c
	* gtk/gtkimcontext.c
	* gtk/gtktreemodel.c
	* gtk/gtktreemodelsort.c
	* gtk/gtkwindow.c
	* docs/reference/gtk/tmpl/gtkselection.sgml
	fix docs
2002-01-10 16:36:25 +00:00
Kristian Rietveld
2282ef41d1 fix a few places where I was confused between modelsort iters and other
Thu Dec 27 16:37:04 2001  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_deleted),
        (gtk_tree_model_sort_sort_level),
        (gtk_tree_model_sort_insert_value): fix a few places where
        I was confused between modelsort iters and other iters. This was
        really going to happen someday ;)
2001-12-27 15:38:10 +00:00
Kristian Rietveld
51ba172920 ensure we are unprelighted before reordering
Wed Dec 26 23:41:41 2001  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_rows_reordered): ensure
        we are unprelighted before reordering

        * gtk/gtktreemodel.c (gtk_tree_row_ref_reordered_callback): we
        need to break out of the for loop, not return

        * gtk/gtktreemodelsort.c: more fixage and cleanups. It seems to
        be pretty stable now, though it still needs some more code
        cleanups.
2001-12-26 22:43:53 +00:00
Jonathan Blandford
43d4639743 new "model" construct property for language bindings.
Tue Nov 13 21:00:59 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_class_init): new
	"model" construct property for language bindings.

	* gtk/gtktreestore.c (gtk_tree_store_set_column_types): New
	function to let you set the column types of a GtkTreeStore for
	language bindings.

	* gtk/gtkliststore.c (gtk_list_store_set_column_types): ditto.
2001-11-14 02:06:28 +00:00
Hans Breuer
2a0f4e7d9a chain finalize to parent class to get removed from the toplevel_list.
2001-11-03  Hans Breuer  <hans@breuer.org>

	* gtk/gtkfilesel.c (gtk_file_selection_finalize) : chain
	finalize to parent class to get removed from the toplevel_list.
	Should fix 'random' crashes of #63474.

	* gtk/gtktreemodelsort.c : chain finalize() to parent class
2001-11-03 20:47:50 +00:00
Jonathan Blandford
2704ea2b58 it's amazing how well things work sometimes, even when they're completely
Thu Nov  1 15:45:04 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
	it's amazing how well things work sometimes, even when they're
	completely wrong.

	* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Fix bug
	where you could try to collapse a node w/o it having children.

	(gtk_tree_view_class_init): remove Shift L<->R as they already
	existed for expand/collapse.
2001-11-01 20:46:01 +00:00
Jonathan Blandford
8ec7b9fcff massize rewrite. Static models now totally work. I'm not 100% sure about
Tue Oct 30 19:17:57 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_sort_level): massize
	rewrite.  Static models now totally work.  I'm not 100% sure about
	row_inserted and row_changed, but I'll get those later.
2001-10-31 00:20:15 +00:00
Jonathan Blandford
14a5e057c7 Darn. I can't believe this took this long to fix.
Mon Oct 29 15:41:58 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_sort_level): Darn.
	I can't believe this took this long to fix.
2001-10-29 20:43:01 +00:00
Jonathan Blandford
b5ccbdfb67 fix reordered signal.
Mon Oct 29 13:54:49 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered): fix
	reordered signal.
2001-10-29 18:56:00 +00:00
Jonathan Blandford
b1ea32b8a1 sync minor clenup 2001-10-26 14:44:27 +00:00
Jonathan Blandford
889d64b46e Add support for invalid nodes. (_gtk_rbnode_rotate_right): Ditto.
Thu Oct 25 16:27:29 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkrbtree.c (_gtk_rbnode_rotate_left): Add support for
	invalid nodes.
	 (_gtk_rbnode_rotate_right): Ditto.
	 (_gtk_rbtree_node_mark_invalid): New function.
	 (_gtk_rbtree_node_mark_valid): New function.

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_class_init): We're a
	GObject, not a GtkObject.
	(gtk_tree_model_sort_row_has_child_toggled): Rewrote to be more
	correct.
	(gtk_tree_model_sort_row_deleted): ditto.
	(gtk_tree_model_sort_{un,}ref_node): Fix.

	* gtk/gtktreeview.c: Protean incremental reflow support (commented
	out)

	* gtk/gtktreeview.h (GtkTreeViewSearchEqualFunc): change char *key
	to const char *key.

	* gtk/gtktreemodel.c (gtk_tree_row_reference_unref_path_helper):
	Important 1 line fix to fix a lot of refcounting woes.
2001-10-25 20:32:40 +00:00
Kristian Rietveld
c9e39b2a34 treat s_path as a child path
Wed Oct 24 22:54:07 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted): treat
        s_path as a child path
2001-10-24 20:54:32 +00:00
Kristian Rietveld
beaba6a43c more changes in an attempt to get it right. It's not yet ready for general
Wed Oct 24 20:29:47 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtktreemodelsort.c: more changes in an attempt to get
        it right. It's not yet ready for general consumption.

        * tests/treestoretest.c: add a button and entry for the new
        iter_change function
        (iter_change): new function, to test
        the row_changed signal implementation of the GtkTreeModelSort

        * tests/testtreesort.c: cleanups, changes to test more features
        of the GtkTreeModelSort at once
2001-10-24 18:36:50 +00:00
Jonathan Blandford
dc754528a0 Remove handle_box from App demo.
Mon Oct 22 14:08:26 2001  Jonathan Blandford  <jrb@redhat.com>

	* demos/gtk-demo/appwindow.c: Remove handle_box from App demo.

	* gtk/gtktreeview.c (size_allocate): Move to a different drawing
	system.  Instead of having a window the size of the tree, we have
	a window the size of widget->allocation, and simply draw with the
	offset.
	(coords_are_over_arrow): ditto.  Move to window coordinates.
	(do_prelight): ditto
	(do_unprelight): ditto

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
	Minor fix from Kristian Rietveld to fix unsorted case.
2001-10-22 18:24:29 +00:00
Kristian Rietveld
24f99d6447 we probably have rows_reordered nailed down now (this code is not yet
Fri Oct 19 22:46:54 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtktreemodelsort.[ch]: we probably have rows_reordered
        nailed down now (this code is not yet ready for general consumption)
2001-10-19 20:53:08 +00:00
Kristian Rietveld
b5ad197761 preparation for surgery ditto
Wed Oct  3 20:29:29 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtktreemodelsort.[ch]: preparation for surgery
        * tests/testtreesort.c: ditto
2001-10-03 18:29:20 +00:00
Owen Taylor
483fca5e50 Small warning cleanups.
Thu Sep 20 11:03:51 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkobject.c gtk/gtklist.c gtk/gtkplug.c gtk/gtksocket.c
        gtk/gtktreemodelsort.c gtk/gtktreeview.c: Small warning cleanups.

        * gtk/gtkradiomenuitem.c (gtk_radio_menu_item_get_group): Change
        the function definition so we don't accidentally rely on
        the compat #define from gtk_radio_menu_item_group.
        (#60782, Jeff Franks)
2001-09-20 15:08:00 +00:00
Jonathan Blandford
fc8304b134 Rename interface signals to make them more clear. Also, change
Wed Sep 12 19:01:05 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodel.h (struct _GtkTreeModelIface): Rename interface
	signals to make them more clear.  Also, change ::range_changed to
	::row_changed.
	* gtk/gtktreemodel.c: Adjust to interface change
	* gtk/gtktreemodel.h: ditto
	* gtk/gtktreemodelsort.c: ditto
	* gtk/gtktreestore.c: ditto
	* gtk/gtkliststore.c: ditto
	* gtk/gtktreeview.c: ditto
	* tests/testtreecolumns.c: ditto
	* gtk/gtkmarshal.list: Actually remove a marshaller!
2001-09-12 23:16:18 +00:00
Kristian Rietveld
109cda6bd2 much changes in an attempt to make it working. It mostly works now,
Sun Sep  2 23:27:16 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtktreemodelsort.[ch]: much changes in an attempt to make
        it working. It mostly works now, although there're still a few issues
        to be worked out.

        * tests/testtreesort.c (main): changes to have a better test
        application for the GtkTreeModelSort.
2001-09-02 21:47:12 +00:00
Kristian Rietveld
7cfc56dbd3 use GtkSortType instead of GtkTreeSortOrder. (#59173).
Thu Aug 23 20:01:41 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtktreemodelsort.[ch], gtk/gtktreesortable.[ch],
        gtk/gtktreestore.[ch], gtk/gtktreeviewcolumn.[ch],
        gtk/gtkliststore.[ch]: use GtkSortType instead of GtkTreeSortOrder.
        (#59173).
2001-08-23 18:33:37 +00:00
Owen Taylor
4e2b60ac4d Patch from Matthias Clasen to remove remove all instances of
Wed Jul 18 19:28:46 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/*.c: Patch from Matthias Clasen to remove remove
	all instances of g_return_if_fail (foo != NULL); that are
	immediately before a g_return_if_fail (GTK_IS_FOO (foo));
	since the second check catches the NULL anyways.
2001-07-18 23:39:26 +00:00
Darin Adler
0349676329 Ignore the sgml directory made by gtkdoc. Use gtk_window_set_resizable
* .cvsignore: Ignore the sgml directory made by gtkdoc.
	* demos/pixbuf-demo.c: (main): Use gtk_window_set_resizable
	instead of the deprecated gtk_window_set_policy.
	* demos/testpixbuf-scale.c: Add missing <stdlib.h> include.
	* gdk/gdkkeys.c: (gdk_keymap_class_init): Remove empty finalize
	function to get rid of warning and some code too.
	* gdk/x11/gdkfont-x11.c: (gdk_font_charset_for_locale): Add
	missing const.
	* gdk/x11/gdkmain-x11.c: (_gdk_windowing_init_check): Remove
	unused local.
	* gdk/x11/gdkpango-x11.c: (gdk_pango_context_get): Add missing
	const.
	* gdk/x11/gdkselection-x11.c: (gdk_text_property_to_utf8_list),
	(gdk_utf8_to_compound_text): Add missing const.
	* gtk/gtkimage.c: (gtk_image_expose): Remove unused local.
	* gtk/gtkmenubar.c: (gtk_menu_bar_hierarchy_changed): Add missing
	cast and get rid of an unnecessary one.
	* gtk/gtksettings.c: (gtk_settings_notify): Remove unused local.
	* gtk/gtkstatusbar.c: (gtk_statusbar_size_allocate): Remove unused
	local.
	* gtk/gtktreemodelsort.c: (gtk_tree_model_sort_build_level):
	Remove unused local.
	* modules/input/gtkimcontextxim.c: (gtk_im_context_xim_new): Add
	missing const.
	* tests/testsocket.c: (add_child): Add cast so the printf format
	doesn't make us implicitly depend on what integer type
	gtk_socket_get_id returns.
	* tests/testtextbuffer.c: Add missing const.
	* tests/testtreefocus.c: (main): Remove unused local.
	* tests/treestoretest.c: (iter_remove): Remove unused local.
	(uppercase_value): Remove unused function.
	(make_window): Add statement to quiet the compiler's uninitialized
	variable warning.
2001-07-18 04:31:11 +00:00
Havoc Pennington
49c1e6dc89 fixes to compile with G_DISABLE_COMPAT
2001-06-29  Havoc Pennington  <hp@redhat.com>

       * Throughout: fixes to compile with G_DISABLE_COMPAT
	(s/g_signal_connectc/g_signal_connect/,
	s/g_signal_newc/g_signal_new/,
	s/g_signal_disconnect_by_func/g_signal_handlers_disconnect_by_func/)
2001-06-29 16:30:25 +00:00
Jonathan Blandford
94f7d7e604 fix stupid missing statement
Tue Jun 26 12:59:28 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_model): fix
	stupid missing statement

	* gtk/gtktreeview.c (gtk_tree_view_set_destroy_count_func): New
	private function for ATK.  It notifies you of how many _visible_
	children are deleted when a node is deleted.  Should be used by
	atk only.
2001-06-26 17:01:53 +00:00
Jonathan Blandford
5b3ed55f80 Fix bug where collapsing a selected row would result in the cursor/anchor
Mon Jun 18 19:41:38 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): Fix bug
	where collapsing a selected row would result in the cursor/anchor
	getting screwed up.
2001-06-18 23:44:41 +00:00
Jonathan Blandford
67f8b5bd46 Rename gtk_tree_sortable_sort_column_id_set_func. It's much shorter now.
Fri Jun 15 18:53:48 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreesortable.c (gtk_tree_sortable_set_sort_func): Rename
	gtk_tree_sortable_sort_column_id_set_func.  It's much shorter now.
	* gtk/gtktreeview.c (gtk_tree_view_sort_iter_changed): WOOO!!!
	Now I can really reorder/sort all Store widgets.  treesorttest
	seems to just work now.
	* gtk/gtklistview.c (gtk_list_store_iter_changed): Whoops.
	testtreesort worked through a big coincidence all this time.
	* gtk/gtkrbtree.c (_gtk_rbtree_reorder): Nasty bug fix in nasty
	code.
	* tests/testtreecolumns.c: Big 'ol warning at the top letting
	people know that this code should never ever ever be copied.

HA!

While everyone else was busy flaming eash other over configuration
engines, I secretly got sorting completely working with store widgets
and GtkTreeView.  GtkTreeModelSort, here I come!!!!!
2001-06-15 23:03:27 +00:00
Jonathan Blandford
426ac9c6fe Whoops. Forgot this a couple months ago. Now GtkTreeStore sort of sorts.
Thu Jun 14 19:21:27 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreestore.c (gtk_tree_store_sort_helper): Whoops.  Forgot
	this a couple months ago.  Now GtkTreeStore sort of sorts.  I'll
	finish it off tonight, though it basically works now when it's a
	list.  Also, I have a sinking feeling neither GtkTreeStore or
	GtkListStore actually resort when adding a new item.  I'll look
	into it.
2001-06-14 23:25:52 +00:00
Jonathan Blandford
29985af0fa BOXED,BOXED,BOXED,BOXED): new marshaller.
Mon Apr  2 16:56:15 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkmarshal.list (VOID:BOXED,BOXED,BOXED,BOXED): new
	marshaller.

	* gtk/gtktreemodel.c (gtk_tree_model_range_changed): change
	"changed" signal to "range_changed".

	* gtk/gtktreeview.c (gtk_tree_view_set_model): fix small bug where
	removing a tree from one model would remove all trees from that
	model.
	* gtk/gtktreeview.c (gtk_tree_view_range_changed): use range
	changed signal instead.
2001-04-02 20:56:55 +00:00
Havoc Pennington
207e3bb977 make this somewhat key-navigable
2001-03-23  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkhsv.c: make this somewhat key-navigable

	* gtk/gtkfontsel.c: mnemonics

	* gtk/gtkgamma.c: mnemonics

	* gtk/gtkcolorsel.c: add mnemonics to labels

2001-03-22  Havoc Pennington  <hp@pobox.com>

	Applied big patch from Seth Lytle to fix event handler return
	values, slightly modified.

	* gtk/gtkcalendar.c (gtk_calendar_button_press): return TRUE if
	handled.
	(gtk_calendar_key_press): return TRUE for GDK_space triggers
	select_day

	* gtk/gtkclist.c (gtk_clist_button_press): return TRUE if handled
	(gtk_clist_button_release): return TRUE if handled

	* gtk/gtkcolorsel.c (mouse_release):
	(palette_activate):
	(palette_press):
	(palette_new):
	(mouse_press):
	(get_screen_color):
	fixed return type (void to gboolean), return TRUE,
	added GTK_SIGNAL_FUNC cast

	* gtk/gtkcombo.c (gtk_combo_popup_button_press): fixed return type
	(void to gboolean), and return TRUE
	(gtk_combo_button_release): changed return value to TRUE after
	gtk_grab_add on combo->popwin

	* gtk/gtkctree.c (gtk_ctree_button_press): return TRUE if triggers a
	collapse or expand

	* gtk/gtkcurve.c (gtk_curve_graph_events): return TRUE for
	button/motion

	* gtk/gtkdnd.c (gtk_drag_source_event_cb): return TRUE for button
	press/release and motion that trigger act

	* gtk/gtkentry.c (gtk_entry_button_release): return TRUE

	* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): return TRUE
	for GDK_Return

	* gtk/gtklist.c (gtk_list_button_press): return TRUE mostly
	(gtk_list_button_release): return TRUE if selection

	* gtk/gtklistitem.c (gtk_list_item_button_press): return TRUE on
	press

	* gtk/gtkmenushell.c (gtk_menu_shell_button_press):
	(gtk_menu_shell_button_release): chain parent_menu_shell retval

	* gtk/gtknotebook.c (gtk_notebook_button_press): return FALSE if
	nothing triggered
	(gtk_notebook_button_release): return TRUE if we do anything

	* gtk/gtkspinbutton.c (gtk_spin_button_button_press):
	(gtk_spin_button_button_release): return TRUE or chained retval

	* gtk/gtktext.c (gtk_text_button_press):
	(gtk_text_button_release): return TRUE
	(gtk_text_key_press): remove redundant retval code

	* gtk/gtktreeitem.c (gtk_tree_item_button_press): return TRUE if button
	and sensitive
	(gtk_tree_item_subtree_button_click): changed type to gint, and return
	TRUE if sensitive

	* gtk/gtktooltips.c (gtk_tooltips_event_handler): deactivate implies
	return TRUE
2001-03-24 06:10:40 +00:00
Jonathan Blandford
8401ea1a21 Actually unref the nodes. Fixes bug #50058.
Thu Mar  8 19:18:27 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_unref_tree_helper): Actually
	unref the nodes.   Fixes bug #50058.

	* gtk/gtktreemodel.c (gtk_tree_model_ref_node): change
	"::ref_iter" to "::ref_node".
	(gtk_tree_model_unref_node): change "::unref_iter" to
	"::unref_node". Fixes bug #50064.
2001-03-09 00:19:11 +00:00
Tim Janik
06718ecfed added accumulator data argument to g_signal_newc() functions.
Thu Mar  8 16:51:21 2001  Tim Janik  <timj@gtk.org>

        * *.c: added accumulator data argument to g_signal_newc()
        functions.

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_model):
        * gtk/gtktreeview.c (gtk_tree_view_setup_model):
        * gtk/treestoretest.c (make_window):
        s/g_signal_connect/g_signal_connectc/.

        * gtk/gtktextbuffer.c: completed signal arg fixups,
        they also needed G_SIGNAL_TYPE_STATIC_SCOPE flag.
2001-03-08 16:36:17 +00:00
Jonathan Blandford
3b2ffda1f5 renamed "child_toggled" to "has_child_toggled".
Mon Mar  5 14:38:54 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodel.c: renamed "child_toggled" to
	"has_child_toggled".

	* gtk/gtktreeview.c: Handle removing columns better.  Updated to
	handle new signal name.

	* gtk/gtktreestore.c: Updated to handle new signal name.
	* gtk/gtklisttore.c: Updated to handle new signal name.
	* gtk/gtktreemodelsort.c: Updated to handle new signal name.
2001-03-05 19:43:24 +00:00
Jonathan Blandford
ef084e87e5 removed signals. Moved to inherit from GObject instead of GtkObject.
Wed Feb 21 15:41:34 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreestore.c: removed signals.  Moved to inherit from
	GObject instead of GtkObject.

	* gtk/gtkliststore.c: ditto.

	* gtk/gtktreemodelsort.c: ditto.

	* gtk/gtktreemodel.c (gtk_tree_model_base_init): moved signals to
	GtkTreeModelIface, instead of in each model.
2001-02-21 23:49:22 +00:00
Havoc Pennington
4a3c8a367a remove validation idle
2001-02-08  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
	validation idle

	* demos/gtk-demo/main.c (create_tree): adjust to changes in text
	cell renderer

	* demos/pixbuf-demo.c (timeout): remove deprecated
	gtk_widget_draw

	* demos/testpixbuf-save.c (main): remove deprecated
	gtk_drawing_area_size

	* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
	buttons even if the model isn't setup. gtk_tree_view_check_dirty()
	at the start of the allocation.
	(gtk_tree_view_check_dirty): handle column->button == NULL, handle
	unsetup or NULL model.

	* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
	even/odd/sorted cells in the tree view.

	* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
	bugfixes

	* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
	backgrounds with draw_flat_box using different detail for even/odd
	rows.

	* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
	row, so we can draw the alternating colors thing

	* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
	property from a synonym property, notify for the synonym.
	Also, nuke the background_gdk_set and foreground_gdk_set synonyms
	(gtk_text_tag_get_property): Always return the font, even if
	all its fields aren't set

	* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
	store the attr list; it leaves us with no way to change attributes
	in _render according to the render flags, and no way to implement
	get_property. Instead store all the specific text attributes.
	Separate whether an attribute is enabled from its value. Sync all
	properties with GtkTextTag, make them all consistent, etc.

	* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
	renderers can highlight the sort row/column

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
	accessor functions to get values; this has the side effect of
	showing up which accessor functions were missing. Added those.

	* gtk/gtktreeviewcolumn.h: Replace set_justification with
	set_alignment, to be consistent with GtkLabel, GtkMisc

	* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
	arrow.

	* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h

	* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
Havoc Pennington
8e8dd66aec add test stuff for CellRendererToggle
2001-01-15  Havoc Pennington  <hp@pobox.com>

	* tests/testtreeview.c: add test stuff for CellRendererToggle

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_model): add this
	accessor

	* gtk/gtkcellrenderertoggle.c: distinguish different event types,
	only toggle on button press (would do release like GtkButton, but
	we'd need implicit grab code for treeview cells)
2001-01-16 03:49:24 +00:00
Owen Taylor
a801ea7bf0 Doc fixups.
Tue Jan  9 11:20:48 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktreeview.[ch] gtktreemodelsort.[ch] gtknotebook.c
	gdk/gdk-pixbuf.h: Doc fixups.

	* gtk/gtkobject.h: Remove trailing , from enum
2001-01-09 16:23:57 +00:00
Havoc Pennington
ae89b1e1b1 add this
2001-01-04  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktreeselection.c (gtk_tree_selection_get_tree_view): add
	this

	* gtk/gtktreemodel.h (struct _GtkTreeIter): rename fields to
	user_data instead of tree_node

	* gtk/gtktreeprivate.h (TREE_VIEW_COLUMN_WIDTH): rename from
	TREE_VIEW_COLUMN_SIZE

	* gtk/gtktreeviewcolumn.h (struct _GtkTreeViewColumn): rename
	"size" field to "width" finishes bug 40061

	* gtk/gtkcellrenderer.h: Use GtkCellRendererState instead of guint
	for bitfields, bug 40268
2001-01-04 23:36:19 +00:00
Havoc Pennington
66f87948e2 Adapt to GtkTreeSelection changes
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
2001-01-01 19:01:54 +00:00
Jonathan Blandford
dadf966b3b :get_property): remove g_value_init calls, as they are no longer needed.
2000-12-20  Jonathan Blandford  <jrb@redhat.com>

	    * gtk/gtkcellrenderer*.c (::get_property): remove
              g_value_init
	      calls, as they are no longer needed.

	      * gtk/gtktreemodelsort.c: Fix up the comparison code.

	      * gtk/gtktreemodel.h: Start work on ::reordered signal.
	      Need to
	      figure out how to emit a signal on an interface.
2000-12-21 05:27:06 +00:00
Jonathan Blandford
fb14db07bd sync 2000-12-20 00:37:58 +00:00
Tim Janik
2c9eb3a572 doh, this was broken beyond believe.
Tue Dec 12 23:46:44 2000  Tim Janik  <timj@gtk.org>

	* gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.

	* gtk/gtkbox.c: change property types from (u)long to (u)int for
	::position and ::padding.

	* gtk/gtkcontainer.c: make ::border_width an INT property.

	* gtk/gtkpacker.c: make ::position an INT property.

	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
	guard against NULL h/v scrollbars, since this is used at construction
	time.

	* gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
	internal gtk_clist_constructor().

	* gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
	gtk_ctree_constructor().

	* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
	::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.

	* docs/reference/Makefile.am: fun stuff, disabled docs generation
	again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.

	* gtk/gtkwidget.[hc]:
	removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
	and gtk_widget_get().
	(gtk_widget_new): use g_object_new_valist().
	(gtk_widget_set): use g_object_set_valist().

	* gtk/gtkobject.[hc]:
	removed gtk_object_arg_get_info(), gtk_object_getv(),
	gtk_object_query_args(), gtk_object_newv(),
	gtk_object_class_add_signals(),
	gtk_object_class_user_signal_new(),
	gtk_object_class_user_signal_newv(),
	gtk_object_arg_set(), gtk_object_arg_get(),
	gtk_object_args_collect(),
	gtk_object_default_construct(),
	gtk_object_constructed(),
	GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
	removed nsignals, signals and n_args members from GtkObjectClass.
	(gtk_object_new): use g_object_new_valist().
	(gtk_object_set): use g_object_set_valist().
	(gtk_object_get): use g_object_get_valist().

	* gtk/gtkcompat.h: define gtk_object_default_construct().

	* gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
	g_object_new().

	* gtk/*.c: removed gtk_object_class_add_signals() from class_init()
	fucntions, cleaned up method assignments (make sure your structures
	are setup properly before calling out). removed all GTK_CONSTRUCTED
	hacks ;)
2000-12-13 01:34:41 +00:00
Jonathan Blandford
a2771e40bc sync to home 2000-11-22 05:16:37 +00:00
Jonathan Blandford
7a2e1974f0 Add convertion functions to let you convert to and from relative path's
2000-11-20  Jonathan Blandford <jrb@redhat.com>
	* gtk/gtktreemodelsort.h: Add convertion functions to let you
	  convert to and from relative path's and iters.

	* gtk/treestoretest.c: move to having a sorted/unsorted view.  Start
	  testing sorting functions a bit better.  Currently broken -- will
	  fix in morning.
2000-11-21 09:07:45 +00:00
Jonathan Blandford
fbd9c79f37 confirm path != NULL ditto
Mon Nov 13 14:29:32 2000  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodel.c (gtk_tree_path_copy): confirm path != NULL
	* gtk/gtktreemodel.c (gtk_tree_path_free): ditto

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): make
	work better.
2000-11-13 19:23:24 +00:00
Jonathan Blandford
48a1ddbeb1 New function to help handle keeping things in sync.
Fri Nov 10 19:06:41 2000  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_insert_value): New
	function to help handle keeping things in sync.
2000-11-11 00:02:05 +00:00
Jonathan Blandford
f8faec4574 use the new BOXED marshallers.
Fri Nov 10 12:10:34 2000  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkliststore.c (gtk_model_simple_class_init): use the new
	BOXED marshallers.

	* gtk/gtkliststore.c (gtk_list_store_get_column_type): Add this.
	(gtk_list_store_class_init): use the new BOXED marshallers.

	* gtk/gtktreestore.c (gtk_tree_store_new_with_types): change
	new_with_values to new_with_types.
	(gtk_tree_store_get_column_type): add this.
	(gtk_tree_store_class_init): use the new BOXED marshallers.

	* gtk/gtkmarshal.list: Added a number of BOXED marshallers to
	mirror some POINTER marshallers.
2000-11-10 19:38:53 +00:00
Jonathan Blandford
c97d57ebb8 added more fields to allow more interesting iterators. Also, made the
Thu Nov  9 11:23:22 2000  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodel.h (struct _GtkTreeIter): added more fields to
	allow more interesting iterators.  Also, made the lifecycle of
	iterators more explicit.

	* gtk/gtktreemodelsort.[ch]: New model for sorting.

	* gtk/gtk-boxed.defs (GtkTreeIter, GtkTreePath): Added two boxed
	types.
2000-11-09 16:52:17 +00:00