Commit Graph

20 Commits

Author SHA1 Message Date
Jonathan Blandford
fa6e6928f6 centralize all the editing code
Tue Sep 18 18:46:54 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_start_editing): centralize all
	the editing code

	* gtk/gtkcelleditable.c: Got rid of stop_editing, as there was no
	reason to call it beyond emiting the two signals.

	* gtk/gtkentry.c (gtk_entry_class_init): add "has_frame" property
	to GtkEntry.
2001-09-18 22:49:02 +00:00
Jonathan Blandford
c45ee0bf85 Get rid of broken "can_edit" and "can_activate" properties in favor of
Tue Sep 18 13:51:35 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkcellrenderer.h (enum): Get rid of broken "can_edit" and
	"can_activate" properties in favor of
	GTK_CELL_RENDERER_MODE_INERT, GTK_CELL_RENDERER_MODE_ACTIVATABLE,
	and GTK_CELL_RENDERER_MODE_EDITABLE
2001-09-18 17:52:42 +00:00
Jonathan Blandford
a251679148 Add editable interface. This should be the last big GtkTreeView API
Mon Sep 17 17:39:52 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkcelleditable.[ch]: Add editable interface.  This should
	be the last big GtkTreeView API change.

	* gtk/gtkcellrenderer.[ch]: Get rid of the "event" vfunc, and
	replace with "activate" and "start_editing".  Also, added a
	"can_activate" and "can_edit" property.

	* gtk/gtktreeviewcolumn.c: modify to use above.
2001-09-17 21:44:20 +00:00
Jonathan Blandford
112eb9b2e5 Sun Aug 19 01:44:44 2001 Jonathan Blandford <jrb@redhat.com>>
* gtk/gtktreeviewcolumn.c
	(gtk_tree_view_column_pack_{start,end}_cell_renderer): sink cell.

	* gtk/gtktreeview.c (gtk_tree_view_insert_column): sink column.
	(_gtk_tree_view_find_node): If *node is NULL,
	*tree should be NULL too.

	* demos/gtk-demo/stock_browser.c (do_stock_browser): don't unref
	column/renderers.
	* tests/testtreecolumns.c: ditto
	* tests/testtreefocus.c: ditto
	* tests/testtreesort.c: ditto
	* tests/testtreeview.c: ditto
	* tests/treestoretest.c: ditto
2001-08-19 06:58:11 +00:00
Jonathan Blandford
6ffd507dea 2 new signals; is_expander/is_expanded.
Sat Aug 18 04:34:31 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkcellrenderer.c (gtk_cell_renderer_class_init): 2 new
	signals; is_expander/is_expanded.

	* gtk/gtlcellrendererpixbuf.c: Allow other expanded and closed
	pixbufs.

	* gtk/gtktreeview.c: set above properties.
2001-08-19 04:19:56 +00:00
Hans Breuer
0b5db507da coalescing property notifies
2001-08-11  Hans Breuer  <hans@breuer.org>

	* gtk/gtkalignment.c, gtk/gtkarrow.c, gtk/gtkaspectframe.c,
	  gtk/gtkcellrenderer.c, gtk/gtkcellrenderertext.c,
	  gtk/gtkcombo.c, gtk/gtkcurve.c, gtk/gtkfontsel.c,
	  gtk/gtklayout.c, gtk/gtkmisc.c, gtk/gtkpacker.c,
	  gtk/gtkprogress.c, gtk/gtkruler.c,, gtk/gtksettings.c,
	  gtk/gtkspinbutton.c, gtk/gtktexttag.c : coalescing property notifies

	* gtk/gtkclist.c, gtk/gtktipsquery.c, gtk/gtktexttag.c,
	  gtk/gtkwidget.c : added G_SIGNAL_TYPE_STATIC_SCOPE to all
	GDK_TYPE_EVENT signals

	* gtk/gtkalignment.c : removed 'direct allocation bug',
	which Tim discovered while reading the patch
2001-08-11 20:27:36 +00:00
Jonathan Blandford
ee5ff7ddc2 changed new_with_types to just plain new, fixing the number of columns,
Fri Jun 29 22:13:28 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreestore.c (gtk_tree_store_new): changed new_with_types
	to just plain new, fixing the number of columns, and column types
	at creation time.

	* gtk/gtkliststore.c (gtk_list_store_new): ditto.

	* gtk/gtkcellrenderertext.c
	(gtk_cell_renderer_text_set_fixed_height_from_font): FIX the
	height to a specific font.

	* gtk/gtktreeview.c (gtk_tree_view_is_expander_column): fix brokenness.

	* tests/*c: change to work with new store models.
2001-06-30 02:38:17 +00:00
Anders Carlsson
4006d34f27 It's pixbuf_pos, not pixbufpos.
2001-04-12  Anders Carlsson  <andersca@codefactory.se>

	* gtk/gtkcellrenderertextpixbuf.c (gtk_cell_renderer_text_pixbuf_class_init): It's pixbuf_pos,
	not pixbufpos.

	* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render): Fix small typo.

	* gtk/gtkcellrenderer.c (gtk_cell_renderer_get_property): xpad and ypad
	are unsigned insts, therefore use g_value_set_uint.
	(gtk_cell_renderer_set_property): Likewise, use g_value_get_uint.
2001-04-12 18:16:13 +00:00
Owen Taylor
a7f29c4efc Apply patch from Nils Barth fixing event return values. (#51041)
Tue Mar 27 22:36:07 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.h gtk/gtkrange.h: Apply patch from
	Nils Barth fixing event return values. (#51041)

	* gtk/gtkwidget.c: Fix some return values for default
	functions.

	* gtk/gtk[vh]scrollbar.c gtk/gtk[vh]range.c: Fix
	return values for trough_keys functions.

	* gtk/gtkwidget.h (struct _GtkWidgetClass): Fix return
	value for add_accelerator (shoudl have been a void
	return.)

	* gtk/gtkcellrenderer.[ch]: gtkcellrenderertoggle.h:
	Fix return type of EVENT.

	* gtk/gtkmarshal.list gtk/gtktexttag.c: Make EVENT
	signal return a boolean.
2001-03-28 04:01:21 +00:00
Jonathan Blandford
e4d1660042 Changed prototype to allow for getting the location of the cell relative
Thu Mar 15 18:22:44 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkcellrenderer.h: Changed prototype to allow for getting
	the location of the cell relative to its area.
	* gtk/gtkcell*: modified for above change
	* gtk/gtktreeview.c: modified for above change.

Wed Mar 14 13:58:32 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_set_model): Ref the model.
	 (gtk_tree_view_finalize): actually unref the model.  Thanks to
	Jamie Strachan <frostfreek@yahoo.com> for noticing this error.
2001-03-15 23:21:39 +00:00
Tim Janik
35af5c4eba marshaller fixes.
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.
2001-03-07 14:49:21 +00:00
Jonathan Blandford
4111cdd523 Add visible field to allow you to hide cell renderers.
Tue Mar  6 19:59:12 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkcellrenderer.h (struct _GtkCellRenderer): Add visible
	field to allow you to hide cell renderers.

	* gtk/gtkcellrenderer.c: Add support for invisible cells.

	* gtk/gtktreeview.c: Add support for invisible cells.
2001-03-07 00:57:49 +00:00
Jonathan Blandford
a7f524bbd6 Apply patch from Lee Mallabone to add object properties.
Mon Mar  5 14:55:19 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkcellrenderertoggle.c: Apply patch from Lee Mallabone to
	add object properties.

	* gtk/gtkcellrenderertextpixbuf.c: Apply patch from Lee Mallabone
	to add object properties.

	* gtk/gtkcellrenderertext.c: Apply patch from Lee Mallabone to add
	object properties.

	* gtk/gtkcellrendererpixbuf.c: Apply patch from Lee Mallabone to
	add object properties.

	* gtk/gtkcellrenderer.c: Apply patch from Lee Mallabone to add
	object properties.
2001-03-05 19:55:30 +00:00
Havoc Pennington
2c5d938ff8 CVS is doing its broken pipe thing, this is more of the previous commit
2001-02-02  Havoc Pennington  <hp@redhat.com>
2001-02-03 01:09:41 +00:00
Havoc Pennington
ef4356b567 adapt to handle PangoColor
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
2001-01-26 21:12:05 +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
Tim Janik
53d7e43060 get rid of object_signal:: GtkObject argument uses, use GObject
Tue Dec 12 08:24:42 2000  Tim Janik  <timj@gtk.org>

        * gtk/testgtk.c:
        (create_tooltips):
        (create_statusbar): get rid of object_signal:: GtkObject argument uses,
        use GObject swapped_signal:: properties instead.

        * gtk/gtkcellrenderertoggle.c:
        * gtk/gtkcellrenderertextpixbuf.c:
        * gtk/gtkcellrenderertext.c:
        * gtk/gtkcellrendererpixbuf.c:
        * gtk/gtkcellrenderer.c:
        * gtk/gtktreeviewcolumn.c: s/[sg]et_param/[sg]et_property/, fixed
        missing warnings for invalid property ids, install properties
        with g_object_class_install_property() now.

        * gtk/gtksignal.c:
        (gtk_signal_emit): let g_signal_emit_valist() collect the values for us.
2000-12-12 07:32:32 +00:00
Tim Janik
d69496c060 urg, removed implementation of gtk_marshal_VOID__INT_INT_INT_INT. if
Wed Oct 25 20:47:41 2000  Tim Janik  <timj@gtk.org>

        * gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_class_init): urg, removed
        implementation of gtk_marshal_VOID__INT_INT_INT_INT. if people do that,
        couldn't they at least give it a non-standard name?

        * gtk/gtktextlayout.c: arg! yet another implementation of
        gtk_marshal_VOID__INT_INT_INT_INT(), is this a conspiracy?

        * gtk/gtktextbuffer.c: gotcha! captured a vagabonding
        gtk_marshal_VOID__INT_POINTER_INT() implementation, braught it back
        home. now i know this _is_ a conspiracy.

        * gtk/gtkwidget.c (gtk_widget_class_init): marshaller fixups for
        ::state-changed.

        * gtk/gtkaccelgroup.c (gtk_accel_group_create_remove):
        (gtk_accel_group_create_add): marshaller signature fixups.

        * gtk/gtklistitem.c (gtk_list_item_class_init): signal creation fixups,
        pass in GTK_TYPE_SCROLL_TYPE instead of GTK_TYPE_ENUM.

        * gtk/gtkobject.[hc]: removed GTK_CONNECTED flag, it's not valid
        anymore.

Tue Oct 24 23:59:21 2000  Tim Janik  <timj@gtk.org>

        * docs/reference/Makefile.am: disabled SUBDIRS for the moment, since
        due to the signal system changes, it wouldn't build currently. to
        be fixed soon.

        * docs/Changes-2.0.txt: GtkSignal/GSignal updates.

        * gtk/gtkwidget.c: ::direction_changed takes an enum as argument,
        so it needs gtk_marshal_VOID__ENUM() instead of
        gtk_marshal_NONE__UINT().

        * gdk/gdk*.c: adapted type registration functions.

        * gtk/gtkbindings.c:
        * gtk/gtkaccelgroup.c: operate on GSignalQuery, GtkSignalQuery is
        gone.

        * gtk/gtkenums.h: define GtkSignalRunType in terms of GSignalType.

        * gtk/gtkobject.c:
        (gtk_object_destroy):
        (gtk_object_shutdown): fixed recursion guards. basically we have to
        catch the case where any of GObject.shutdown() or gtk_object_destroy()
        is called during ::destroy, and avoid recursion there.

        * gtk/gtktypeutils.c:
        * gtk/maketypes.awk: awk-script hackup to provide gtk_type_init() with
        boxed_copy/boxed_free. this needs a more general solution based on a
        publically installed code-generator utility.

        * gtk/gtktypeutils.[hc]: compat aliased GTK_TYPE_BOXED to G_TYPE_BOXED,
        glib's gobject has support for that now.
        define GtkSignalMarshaller in terms of GSignalCMarshaller.


Mon Oct 23 09:36:42 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.[hc]:
        * gtk/gtkmarshal.[hc]:
        * gtk/Makefile.am: generate marshallers with glib-genmarshal and don't
        compile gtkmarshal.c on its own anymore, just include it in gtksignal.c.
        removed #include <gtkmarshal.h>s all over the place, gtksignal.h takes
        care of that.

        * *.c: marshaller name fixups.

        * gtk/gtkmarshal.list: added a comment briefing the format.

Sun Oct 22 23:14:39 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.[hc]: nuked old implementation. we mostly have
        compatibility macros here now. more specifically, most of
        the API is preserved (yes, _most_, nonwithstanding the
        following exceptions listed, the API is stil lHUGE ;)
        things that got removed completely:
        GtkSignalQuery, gtk_signal_query(), gtk_signal_n_emissions(),
        gtk_signal_n_emissions_by_name(), gtk_signal_handlers_destroy(),
        gtk_signal_set_funcs(), gtk_signal_handler_pending_by_id(),
        gtk_signal_add_emission_hook(), gtk_signal_add_emission_hook_full(),
        gtk_signal_remove_emission_hook().
        non-functional functions variants:
        gtk_signal_add_emission_hook(), gtk_signal_remove_emission_hook().
        the GtkCallbackMarshal argument to gtk_signal_connect_full() is
        not supported anymore.
        (gtk_signal_compat_matched): new internal function to aid
        implementation of the compatibility macros, it  provides
        functionality to block/unblock/disconnect handlers based
        on func/data.

        * gtk/gtkenums.h: define GtkSignalRunType in terms of GSignalType,

        * *.c: adaptions to new type registration API signatures.


Fri Oct 20 15:26:33 2000  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.[hc]: removed G_TYPE_GTK_POINTER cludge.
2000-10-25 22:34:14 +00:00
4
3ff4a2c081 Checked in initial draft of the new tree widget.
2000-10-04    <jrb@redhat.com>

	* gtk/gtk{tree,cell}?*.[ch]: Checked in initial draft of the new
	tree widget.
2000-10-05 01:04:57 +00:00