1. 08 Nov, 2000 1 commit
    • Alexander Larsson's avatar
      Add note about GtkMenuPositionFunc API changes. · 814957b4
      Alexander Larsson authored
      2000-11-08  Alexander Larsson  <alexl@redhat.com>
      
      	* docs/Changes-2.0.txt: Add note about GtkMenuPositionFunc
      	API changes.
      
      	* gtk/gtkmenu.c: Add support for scrolling menus.
      	Remove gtk_menu_append/prepend/insert, these have been moved to
      	gtkcompat.h as #defines.
      
      	* gtk/gtkcompat.h.in:
      	Add compatibility #defines for gtk_menu_append/prepend/insert
      
      	* gtk/gtkmenu.h: Add data needed for scrolling menus.
      	GtkMenuPositionFunc gets an extra argument push_in.
      	gtk_menu_append/prepend/insert removed.
      
      	* gtk/gtkmenuitem.c (gtk_menu_item_position_menu): Change menu
      	positioning behaviour to fit to scrolling menus.
      
      	* gtk/gtkmenuitem.c (gtk_menu_item_forall): Don't recurse
      	into menuitem->submeny. That is wrong, and broke torn
      	off submenus of torn off menus, since they were unrealized
      	when the first menu was unrealized.
      
      	* gtk/gtkmenushell.[ch]: Virtualize gtk_menu_shell_insert() and
      	gtk_menu_shell_select_item() since these need to be overridden in
      	GtkMenu.
      
      	* gtk/gtkoptionmenu.c (gtk_opttion_menu_position): Change menu
      	positioning behaviour to fit to scrolling menus.
      	(gtk_option_menu_key_press, gtk_option_menu_button_press): Select
      	the current item so that it is prelighted when the menu pops up.
      	This is a workaround to the fact that the menu doesn't get the
      	initial enter event (due to grabs).
      
      	* gtk/gtkfilesel.c, gtk/gtkinputdialog.c, gtk/testgtk.c:
      	s/gtk_menu_append/gtk_menu_shell_append/
      
      	* gtk/gtknotebook.c:
      	s/gtk_menu_insert/gtk_menu_shell_insert/
      
      	* gtk/testgtk.c (create_menu, create_menus):
      	Create the first menu with 50 items so that menu scrolling
      	can be tested.
      
      
      	Patch from Jonathan Blandford  <jrb@redhat.com>
      
      	* gtk/gtkmenuitem.[ch] (gtk_menu_item_toggle_size_request): new
      	system to handle size requests.  First, we ask what the size of
      	the toggle is.  Then, when allocating the size, we allocate the
      	toggle_size first.  This way we can have multiple menu-item
      	classes w/o needing a seperate class for each.
      
      	* gtk/gtkmenu.c (gtk_menu_size_request): Actually use the new system.
      	* gtk/gtkmenu.c (gtk_menu_size_allocate): Use the new system.
      
      	* gtk/gtkcheckmenuitem.c
      	(gtk_check_menu_item_toggle_size_request): New function to handle
      	the toggle size-request.
      814957b4
  2. 07 Nov, 2000 1 commit
    • Havoc Pennington's avatar
      rename to gtk_text_mark_get_visible · f1de9df0
      Havoc Pennington authored
      2000-11-07  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtktextmark.c (gtk_text_mark_is_visible): rename
      	to gtk_text_mark_get_visible
      
      	* gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_line_end): fix
      	bug that was generating an invalid iterator
      
      	* gtk/gtktextiter.c (gtk_text_iter_get_offset): move call to
      	ensure_char_offsets() in front of code placing the iter in an
      	invalid state.
      
      	* gtk/gtktextbuffer.c (gtk_text_buffer_paste_primary):
      	make override_location arg const
      	(paste): Replace the selection if we paste into the
      	current selection
      
      	* gtk/gtkselection.h: Remove "GtkSelectioData"
      	(struct _GtkSelectionData): move the definition here.
      
      	* gtk/gtktextbuffer.c (gtk_text_buffer_update_primary_selection):
      	Export the GTK_TEXT_BUFFER_CONTENTS target for in-process copies
      
      	* gtk/gtktextiter.c (gtk_text_iter_get_tags): New function
      
      	* gtk/gtktextbuffer.c (gtk_text_buffer_insert_range): implement
      	(gtk_text_buffer_insert_range_interactive): implement
      	(gtk_text_buffer_get_tags): Remove, replaced by
      	gtk_text_iter_get_tags()
      
      	* gtk/gtktextiter.c (gtk_text_iter_forward_search): Add a search
      	limit parameter, to avoid infinite linear scan.
      	(gtk_text_iter_backward_search): Add search limit
      	(gtk_text_iter_forward_find_char): Add search limit
      	(gtk_text_iter_backward_find_char): Add search limit
      f1de9df0
  3. 05 Nov, 2000 1 commit
    • Tim Janik's avatar
      provide a toggle button to temporarily disable position recording in the · ab6b184e
      Tim Janik authored
      Sun Nov  5 05:32:39 2000  Tim Janik  <timj@gtk.org>
      
              * gtk/testgtk.c (uposition_stop_configure): provide a toggle
              button to temporarily disable position recording in the
              "saved position" test.
      
      Sat Nov  4 05:37:17 2000  Tim Janik  <timj@gtk.org>
      
              * gtk/gtkthemes.c: added compat code that temporarily implements
              GtkThemeEnginePlugin as a GObject exporting GTypePlugin. this is
              going to be revamped by owen's upcoming GtkModule patches, but
              untill then people want gtk to build, right? ;)
      ab6b184e
  4. 02 Nov, 2000 1 commit
    • Havoc Pennington's avatar
      had a test backward · 0ee86faa
      Havoc Pennington authored
      2000-11-02  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/testgtk.c (create_labels): had a test backward
      
      	* gdk/x11/gdkgc-x11.c (gdk_gc_copy): Copy the client-side GC
      	fields, so the dest GC ends up with the correct clip origin,
      	etc. Fixes a bug where colored labels didn't redraw
      	properly.
      0ee86faa
  5. 01 Nov, 2000 2 commits
    • Havoc Pennington's avatar
      Test set_markup_with_accel() · e667f049
      Havoc Pennington authored
      2000-11-01  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/testgtk.c (create_labels): Test set_markup_with_accel()
      
      	* gtk/gtklabel.c (set_markup): Convert the unichar to a GDK keyval
      	before returning it.
      e667f049
    • Havoc Pennington's avatar
      New function to create a pixbuf pointing to a subregion of another pixbuf. · fe9f9d03
      Havoc Pennington authored
      2000-11-01  Havoc Pennington  <hp@pobox.com>
      
      * gdk-pixbuf.c (gdk_pixbuf_new_subpixbuf): New function to create
      a pixbuf pointing to a subregion of another pixbuf.
      
      2000-11-01  Havoc Pennington  <hp@pobox.com>
      
      * gtk/gtklabel.c (gtk_label_set_attributes): Set a PangoAttrList
      on a label
      (gtk_label_finalize): unref the attr list if any.
      
      * gtk/testgtk.c (create_get_image): close test on second click
      (make_message_dialog): close dialog if it exists
      
      * gdk/gdkpango.c (gdk_draw_layout): Handle rise attribute
      
      * gdk-2.0.pc.in (Requires): Make it require gdk-pixbuf-2.0 not
      gdk-pixbuf
      
      * gtk/gtklabel.c (gtk_label_set_markup): new function to set label
      from Pango markup format
      (gtk_label_set_markup_with_accel): ditto but with accelerator
      parsing
      
      * gtk/gtkimage.c (gtk_image_expose): reformatting.
      
      * gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): Hack to
      reflect current state of GDK - use gdk_drawable_get_colormap, etc.
      Check GDK_IS_WINDOW() not !GDK_IS_PIXMAP() to decide whether to
      call gdk_window_get_origin().
      
      * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
      implement GDK_PIXBUF_ALPHA_FULL
      fe9f9d03
  6. 27 Oct, 2000 1 commit
  7. 26 Oct, 2000 2 commits
    • Havoc Pennington's avatar
      add new marshallers used by the text widget · a291b0be
      Havoc Pennington authored
      2000-10-26  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtkmarshal.list: add new marshallers used by the text widget
      
      	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): fix marshaller
      	types
      
      	* gtk/gtktexttagtable.c (gtk_text_tag_table_class_init): fix
      	marshaller types
      
      	* gtk/gtktextlayout.h, gtk/gtktextlayout.c, gtk/gtktextdisplay.h,
      	gtk/gtktextdisplay.c: We need to preserve Tk copyrights and
      	license on these files.
      
      	* gtk/gtktextiter.c (gtk_text_iter_backward_search): Make this
      	work.
      
      	* gtk/gtktextbtree.c (gtk_text_btree_new): init stamps to
      	runtime random number different for each tree, instead of
      	a constant I made up.
      a291b0be
    • Jonathan Blandford's avatar
      Got rid of GtkTreeNode, and changed it to GtkTreeIter. Added iterators · ef7b510f
      Jonathan Blandford authored
      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.
      ef7b510f
  8. 25 Oct, 2000 1 commit
    • Robert Brady's avatar
      Allow creation of new files when saving. · f5377237
      Robert Brady authored
      2000-10-25  Robert Brady  <robert@suse.co.uk>
      
      	* gtk/testtext.c (save_buffer): Allow creation of new files when
      	saving.
      
      	(fill_file_buffer): Don't die if a UTF-8 sequence is split across
      	calls to read().
      f5377237
  9. 24 Oct, 2000 2 commits
    • Havoc Pennington's avatar
      make it a static function · 2fab0eb1
      Havoc Pennington authored
      2000-10-24  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtktextview.c (gtk_text_view_scroll_to_mark_adjusted): make
      	it a static function
      
      	* gtk/gtktextbtree.c (gtk_text_btree_tag): Gee, maybe we should
      	redraw text when a tag is applied to it.
      
      	* gtk/gtktexttag.c (gtk_text_tag_affects_size)
      	(gtk_text_tag_affects_nonsize_appearance): private functions to
      	see if a tag requires various kinds of redraw/layout to be queued
      	up.
      
      	* gtk/gtktexttag.h (struct _GtkTextTag): Remove relief crackrock
      
      	* gtk/testtext.c (fill_example_buffer): Put the cursor
      	at the start of the buffer, so search works by default
      
      	* gtk/gtktextiter.c (lines_match): init match_start always
      
      	* gtk/gtktextbuffer.c (gtk_text_buffer_get_iter_at_line_index): New
      	function, get iter at a line + a byte index
      
      	* gtk/gtktextiter.c (gtk_text_iter_set_line_index): New function,
      	to set byte position within a line
      	(gtk_text_iter_check): remove leftover G_BREAKPOINT thing
      2fab0eb1
    • Havoc Pennington's avatar
      Re-enable the "find" dialog · 86b5c82a
      Havoc Pennington authored
      2000-10-23  Havoc Pennington  <hp@redhat.com>
      
              * gtk/testtext.c: Re-enable the "find" dialog
      
      	* gtk/testgtk.c: Add test for gdk_drawable_get_image
      
      	* gdk/gdkwindow.c (gdk_window_begin_paint_region): Fix bug where
      	the arguments to gdk_draw_drawable were in the wrong order
      	(gdk_window_paint_init_bg): This function was ignoring the
      	init_region, instead of clipping to it, so the entire backing
      	pixmap was cleared on every begin_paint()
      	(gdk_window_begin_paint_region): Hmm, the same list-walking bug
      	was in here again, the loop kept using the same GtkWindowPaint
      	over and over.
      	(gdk_window_begin_paint_region): Fix a bug where we had two
      	x_offset instead of x_offset and y_offset
      
      	* gdk/gdkdraw.c (gdk_drawable_get_image): get composite drawable
      	before we get the image.
      	(gdk_draw_drawable): get the composite before we draw the drawable.
      	(gdk_drawable_real_get_composite_drawable): default
      	get_composite_drawable implementation that returns the drawable
      	itself
      
      	* gdk/gdkdrawable.h (struct _GdkDrawableClass ): Add
      	get_composite_drawable virtual function
      
      	* gdk/gdkwindow.c (gdk_window_begin_paint_region): Fix a cheesy
      	list-walking bug
      
      	* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_drawable): Add a hack to
      	make this work if the source drawable is a GdkDrawableImplX11
      	instead of a public drawable type. This is really broken; the
      	problem is that GdkDrawable needs a virtual method get_xid(), but
      	of course that doesn't work in practice. Enter RTTI.
      
      	Also, improve mismatched depth message.
      
      	* gdk/gdkpixmap.c (gdk_pixmap_get_image): Implement get_image for
      	GdkPixmap
      
      	* gdk/x11/gdkdrawable-x11.c (gdk_drawable_impl_x11_class_init):
      	install _gdk_x11_get_image as our implementation of get_image
      
      	* gdk/x11/gdkimage-x11.c (gdk_image_get): Rename to
      	_gdk_x11_get_image and export for use in gdkdrawable-x11.c
      
      	* gdk/gdkimage.c (gdk_image_get): Make this just a wrapper around
      	gdk_drawable_get_image
      
      	* gdk/gdkdraw.c (gdk_drawable_get_image): call virtual get_image
      
      	* gdk/gdkdrawable.h (struct _GdkDrawableClass ): Virtualize
      	get_image
      
      	* gtk/gtktreestore.c (gtk_tree_store_get_node): remove weird
      	trailing semicolon after for loop
      86b5c82a
  10. 22 Oct, 2000 1 commit
    • Tor Lillqvist's avatar
      gtk/makefile.mingw.in Updates. · 5fd61965
      Tor Lillqvist authored
      2000-10-22  Tor Lillqvist  <tml@iki.fi>
      
      	* gtk/makefile.mingw.in
      	* gtk/gtk.def: Updates.
      
      	* gtk/testgtk.c: sleep() is called _sleep in MS's C
      	library.
      
      	* gtk/gtkimcontextsimple.c: Include <stdlib.h> for bsearch().
      
      	* gtk/makefile.msc: Remove
      
      	* gtk/makefile.msc.in: New file, like makefile.mingw.in.
      
      	* gtk/Makefile.am: Add it.
      
      	* configure.in: Generate it.
      
      	* gtk/gtktextbuffer.c (gtk_text_buffer_create_child_anchor)
      	* gtk/gtktextbtree.c (gtk_text_line_char_to_byte): Return
      	something even if not implemented, to satisfy picky MSVC.
      5fd61965
  11. 20 Oct, 2000 1 commit
    • Havoc Pennington's avatar
      create some stock buttons with the default accel group (create_image): · 1c9f0c0b
      Havoc Pennington authored
      2000-10-04  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/testgtk.c (create_buttons): create some stock buttons
      	with the default accel group
      	(create_image): test some new GtkImage features
      	(make_message_dialog): test GtkMessageDialog
      	(create_modal_window): fix someone's bizzarro indentation
      
              * gtk/gtkwindow.h, gtk/gtkwindow.c: Implement
      	GTK_WIN_POS_CENTER_ON_PARENT.
      	Add "destroy with parent" setting, which means the window goes
      	away with its transient parent.
      	(gtk_window_get_default_accel_group): get the default accel group
      	for the window.
      	(gtk_window_set_destroy_with_parent): set/unset destroy with
      	parent flag
      	(gtk_window_read_rcfiles): invalidate icon set caches
      	after reloading rcfiles
      
      	* gtk/gtkenums.h (GtkWindowPosition): add
      	GTK_WIN_POS_CENTER_ON_PARENT, which centers a dialog
      	on its parent window when the dialog is mapped for the first time.
      
              * gtk/gtkmessagedialog.h, gtk/gtkmessagedialog.c: Add
      	a simple message dialog class
      
      	* gtk/gtkdialog.c (gtk_dialog_init): Connect delete event
      	handler to emit response signal, and maybe later it would
      	honor a hide_on_delete flag - though that isn't there yet.
      	Set border width on the vbox to 2, so we get some padding.
      	Use a button box for the action area.
      	(gtk_dialog_key_press): synthesize a delete event if Esc
      	is pressed and the GtkWidget key press handler didn't
      	handle the escape key.
      	(gtk_dialog_new_with_buttons): new function creates a dialog
      	with some default buttons in it.
      	(gtk_dialog_add_action_widget): add an activatable widget
      	as a button in the dialog - you can also add a non-activatable
      	widget by accessing the action area directly.
      	(gtk_dialog_add_button): add a simple button - stock ID or
      	label - to the action area
      	(gtk_dialog_response): emit response signal
      	(gtk_dialog_run): block waiting for the dialog, return
      	the response. Override normal delete_event behavior, so that
      	delete_event does nothing inside gtk_dialog_run().
      
      	* gtk/gtkdialog.h, gtk/gtkdialog.c: Add "response" signal
      	emitted when an action widget is clicked or the dialog gets
      	delete_event
      
      	* gtk/gtk.h: add gtkmessagedialog.h
      
      	* gtk/Makefile.am: add gtkmessagedialog.[hc]
      
      2000-10-20  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtk-sections.txt: Add dialog docs
      1c9f0c0b
  12. 18 Oct, 2000 1 commit
    • Havoc Pennington's avatar
      Some updates · 7a4c6893
      Havoc Pennington authored
      2000-10-18  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtk-sections.txt: Some updates
      
      	* gdk/gdk-sections.txt: remove GdkPixbufAlphaMode
      
      	* gdk-pixbuf/gdk-pixbuf-sections.txt: Add new API, remove
      	GdkPixbufClass/GdkAnimationClass since those are private
      
      	* gdk-pixbuf/Makefile.am (IGNORE_HFILES): ignore more headers
      
      2000-10-18  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtktextiter.c (gtk_text_iter_forward_to_newline): Fix a bug
      	where any number of empty lines would get skipped
      
      	* gtk/gtktextiter.h: Remove padding from GtkTextIter; live on the
      	edge.
      
      	* gtk/gtktextiter.c (gtk_text_iter_make_surreal): enhance the
      	warning about invalid iterators (explain more thoroughly)
      	(gtk_text_iter_in_region): rename gtk_text_iter_in_range
      
      	* gtk/gtktextview.c (FOCUS_EDGE_WIDTH): Make focus rectangle less
      	big
      
      	* demos/*.c: Add error handling
      
      	* gtk/gtktextbuffer.c: don't modify const iterators
      
      	* gtk/gdk-pixbuf-loader.c: Add full error handling here
      
      	* gtk/gtkimage.c (gtk_image_set_from_file): ignore errors
      	on file load
      
      	* gtk/gtkiconfactory.c: Update to reflect addition of error
      	handling to gdk-pixbuf loaders
      
      2000-10-16  Havoc Pennington  <hp@redhat.com>
      
      	* gdk-pixbuf-io.c (gdk_pixbuf_get_module)
      	(gdk_pixbuf_get_named_module) (gdk_pixbuf_load_module):
      	add error reporting here also
      
      	* make-inline-pixbuf.c (main): use GError
      
      	* io-xpm.c: include unistd.h
      
      	* gdk-pixbuf-util.c: include string.h
      
      	* io-*.c: add error reporting
      
      	* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): add
      	error reporting
      
      	* gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): Add error reporting
      
      	* gdk-pixbuf-io.h: Add GError** to load_increment and load
      	methods
      
      	* gdk-pixbuf-io.c (gdk_pixbuf_save) (gdk_pixbuf_savev): return
      	a G_FILE_ERROR if we fail to write or close the file.
      
      	* gdk-pixbuf.h: remove GDK_PIXBUF_ERROR_IO, instead we'll use
      	G_FILE_ERROR_*. Rename enum to GdkPixbufError, properly following
      	the GError naming rules. Add GError** to load functions.
      7a4c6893
  13. 16 Oct, 2000 1 commit
  14. 06 Oct, 2000 2 commits
  15. 05 Oct, 2000 1 commit
  16. 04 Oct, 2000 1 commit
    • Havoc Pennington's avatar
      clean up trailing whitespace, add extensive tests for tag toggle · 928c0698
      Havoc Pennington authored
      2000-10-03  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/testtextbuffer.c: clean up trailing whitespace,
      	add extensive tests for tag toggle iteration.
      
      	* gtk/gtktextiter.c (MAX_LINEAR_SCAN): decrease linear scan
      	distance
      
      	* gtk/gtktextbtree.c (gtk_text_line_next_could_contain_tag):
      	optimize case where the tag root is on level 1
      	(gtk_text_line_previous_could_contain_tag): attempt to implement
      	(gtk_text_line_next_could_contain_tag): Abstract out node_compare
      	functionality
      
      	* gtk/gtktextiter.c (gtk_text_iter_backward_to_tag_toggle):
      	Implement this, though not very efficiently.
      
      	* gtk/gtktextiterprivate.h: reformat
      
      	* gtk/gtktextiter.c (gtk_text_iter_get_char): return 0 on the end
      	iterator
      
      	* gtk/gtktextbuffer.c (gtk_text_buffer_delete_interactive): Fix
      	this to properly revalidate the iterators.
      
      	* gtk/gtktextview.c (gtk_text_view_delete): fix control-K to work
      	properly at the end of the line (and therefore on empty lines)
      
      	* gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Gee,
      	maybe we should return a value...
      928c0698
  17. 02 Oct, 2000 1 commit
    • Havoc Pennington's avatar
      text_window_* weren't static and should have been. Start work on child · 8ebf77d1
      Havoc Pennington authored
      2000-10-02  Havoc Pennington  <hp@pobox.com>
      
              * gtk/gtktextview.c: text_window_* weren't static and should have
      	        been.
      		        Start work on child widgets; not yet complete,
      syncing to
              office computer.
      
      	        * gtk/gtktextchild.h: change this to contain a public interface,
      		starting work on child interfaces.
      		        * gtk/gtktextchildprivate.h: move private interfaces here
      
      			* gtk/Makefile.am: update to reflect gtktextchildprivate.h
      
      			* gtk/gtktextview.h, gtk/gtktextview.c, gtk/gtktextbuffer.h,
      			gtk/gtktextbuffer.c, gtk/gtktextiter.h, gtk/gtk/textiter.c,
      			gtk/gtktextmark.c: copyright notices
      
      			* gtk/gtktextmarkprivate.h: reformat, and put _ in
      front of
              internal functions
      
      	* gtk/gtktextchild.c (_pixbuf_segment_new): put _ in front of
      	internal function
      
      	* gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
      	Reformatting
      8ebf77d1
  18. 30 Sep, 2000 2 commits
    • Havoc Pennington's avatar
      Handle NULL start/end pointers · 632fda6f
      Havoc Pennington authored
      2000-09-30  Havoc Pennington  <hp@pobox.com>
      
      * gtk/gtktextbtree.c (gtk_text_btree_get_selection_bounds): Handle
      NULL start/end pointers
      
      * gtk/gtktextbuffer.c: Write some docs
      (gtk_text_buffer_get_selection_bounds): Allow start/end to be
      NULL, so you can just check whether there's a selection.
      
      * gtk/gtktextbtree.c (gtk_text_btree_remove_mark): No need to
      cleanup_line or segments_changed ourselves, it gets done
      in unlink_segment
      
      * gtk/gtktextmark.h:
      s/gtk_text_mark_deleted/gtk_text_mark_get_deleted/
      
      * gtk/gtktextsegment.h: Clean up some indentation and naming mess
      
      * gtk/gtktextmark.c: delete some more old Tk cruft
      
      * gtk/gtktextbuffer.c (gtk_text_buffer_delete_mark): add ref to
      mark before removing it, so we can emit MARK_DELETED with a valid
      pointer.
      (gtk_text_buffer_mark_set): hold ref across signal emission
      
      * gtk/gtktextbtree.c (gtk_text_btree_remove_mark): improve
      whining about attempts to delete special marks
      
      * gtk/gtktextbuffer.c (_gtk_text_buffer_spew): Prepend with
      underscore, since it's internal.
      
      * gtk/gtktextbuffer.h: Remove find_string prototype, this is
      now implemented in terms of iterators in gtktextiter.h
      
      * gtk/gtktextbuffer.c (gtk_text_buffer_set_text):
      New function, destructively sets contents of buffer. Also
      a convenient way to clear the buffer by setting text to ""
      
      * gtk/gtktextiter.c (gtk_text_iter_make_surreal): reformat
      multiline string literal
      
      * gtk/testtext.c (text_changed_callback): Redraw line numbers if
      text changes.
      
      * gtk/gtktextiter.c (forward_char): Return FALSE if new location
      is not dereferenceable
      (gtk_text_iter_forward_lines): fix return value
      632fda6f
    • Havoc Pennington's avatar
      fix indentation · 244996ff
      Havoc Pennington authored
      2000-09-29  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtktexttag.c (gtk_text_tag_set_priority): fix indentation
      
              * gtk/gtktextview.c: Implement drag thresholding; change functions
      	that set border window size to have nicer name
      	(gtk_text_view_mark_set_handler):  Fix this to have the
      	right signature.
      
      	* gtk/testtextbuffer.c (fill_buffer): Update with pixbuf changes
      
      	* gtk/testtext.c: Update with API changes, put line numbers on
      	both sides.
      
      	* gtk/gtktextiter.c (gtk_text_iter_get_pixbuf): Replace get_pixmap
      	with this
      
      	* gtk/gtktextchild.h, gtk/gtktextchild.c: replace all pixmap with
      	pixbuf; delete a big block of #if 0 Tk code
      
      	* gtk/gtktextbuffer.c (gtk_text_buffer_insert_pixbuf): Replace
      	insert_pixmap with insert_pixbuf
      244996ff
  19. 29 Sep, 2000 1 commit
    • Havoc Pennington's avatar
      Implement the side windows. · d0cbd57d
      Havoc Pennington authored
      2000-09-29  Havoc Pennington  <hp@pobox.com>
      
      * gtk/gtktextview.c: Implement the side windows.
      
      * gtk/testtext.c: Implement simple line numbering in the
      left side window; seems to make scrolling sloooow. Oops.
      Also, cursor blink is for some reason causing redraws
      of the line numbers. Should investigate...
      d0cbd57d
  20. 28 Sep, 2000 1 commit
    • Havoc Pennington's avatar
      Set up infrastructure to deal with lots of scrolling child windows, and · 85735ec7
      Havoc Pennington authored
      2000-09-28  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtktextview.c: Set up infrastructure to deal with lots of
      	scrolling child windows, and draw focus rectangle properly.
      
      	(gtk_text_view_buffer_to_window_coords):
      	Coordinate transformation to deal with all these freaking windows
      	and offsets
      	(gtk_text_view_window_to_buffer_coords): transform the other way
      
      	* gtk/testtext.c (create_buffer): Update to match Pango API change
      
      	* gtk/gtktexttagtable.c (gtk_text_tag_table_foreach): Go over the
      	anonymous tags
      	(foreach_unref): don't emit remove signal from finalize, just
      	set tag's parent to NULL
      85735ec7
  21. 25 Sep, 2000 1 commit
    • Havoc Pennington's avatar
      Draw the focus, and leave space to do so. · 9bec105a
      Havoc Pennington authored
      2000-09-25  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtktextview.c: Draw the focus, and leave space to do so.
      
      	* gtk/gtktexttypes.c: Remove Latin1 conversion stuff
      
      	* gtk/gtktextbtree.c (gtk_text_btree_node_remove_data):
      	Fix a bug when removing node data, we didn't properly
      	re-splice the linked list after removing the data.
      
      	* gtk/gtktextview.c (gtk_text_view_key_press_event): Pass through
      	GDK_Tab as literal tab, Ctrl-Tab to tab to focus widget
      
      	* gtk/gtktextbuffer.c (selection_received): fix g_convert usage
      
      	* gtk/gtktextlayout.c (set_para_values): Set tab array
      	for the layout from the GtkTextTag.
      
      	* gtk/gtktexttypes.h: delete tab and search cruft,
      	remove g_convert() in favor of GLib version
      
      	* gtk/gtktexttypes.c: remove tab implementation from here,
      	move to Pango
      
      	* gtk/gtktexttag.h, gtk/gtktexttag.c: Implement
      	tab stuff using new PangoTabArray from Pango
      
      	* gtk/gtktexttag.c (gtk_text_attributes_fill_from_tags): Remove
      	unused border_width stuff
      9bec105a
  22. 08 Sep, 2000 1 commit
  23. 07 Sep, 2000 1 commit
    • Owen Taylor's avatar
      Doc comment fixing. (Mostly non-matching parameter names.) · 21b53897
      Owen Taylor authored
      Thu Sep  7 11:47:02 2000  Owen Taylor  <otaylor@redhat.com>
      
      	* gtk/gtktextbuffer.c gtk/gtkimcontext.c gtk/gtkwidget.c:
      	Doc comment fixing. (Mostly non-matching parameter names.)
      
      	* gtk/gtkcalendar.c gtk/gtklist.c gtk/gtknotebook.c: Modify
      	comments a little to avoid looking like a doc comment.
      
      	* gtk/gtkspinbutton.h (GTK_INPUT_ERROR): Change INPUT_ERROR to
      	GTK_INPUT_ERROR. (Should the mechanism for erros in spin button
      	conversions be changed to GError?)
      
      	* gtk/gtkcolorsel.c (GTK_CUSTOM_PALETTE_WIDTH/HEIGHT):
      	Move private #defines into .c file.
      
      	* gtk/gtktexttag.c (gtk_text_tag_class_init): Alphabetize
      	order of argument addition, remove duplicates.
      
      	* gtk/gtkaspectframe.h (struct _GtkAspectFrameClass):
      	parent class is FrameClass, not BinClass.
      
      	* gtk/gtk.h: Add gtkinvisible, which was missing.
      	(It's occasionalyl useful for client apps, if seldom.)
      
      	* gdk/gdktypes.h: Remove obsolete GDK_CORE_POINTER
      	#define.
      21b53897
  24. 05 Sep, 2000 1 commit
    • Sebastian Wilhelmi's avatar
      Use g_path_get_dirname instead of g_dirname, which is deprecated. · f4fc70e3
      Sebastian Wilhelmi authored
      
      2000-09-05  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* gtk/gtkrc.c (gtk_rc_parse_file): Use g_path_get_dirname instead
      	of g_dirname, which is deprecated.
      	(gtk_rc_parse_any): Removed calls to
      	g_scanner_{freeze,thaw}_symbol_table, which are deprecated.
      
      	* gtk/gtkbindings.c (binding_entry_new, binding_entry_destroy):
      	Removed calls to g_hash_table_{freeze,thaw}, as they are
      	deprecated now.
      
      	* gtk/testtext.c (buffer_pretty_name): Use g_path_get_basename
      	instead of g_basename.
      f4fc70e3
  25. 22 Aug, 2000 2 commits
    • Owen Taylor's avatar
      Fix double free of font desc. · 3f14b459
      Owen Taylor authored
      Tue Aug 22 12:33:24 2000  Owen Taylor  <otaylor@redhat.com>
      
      	* gtk/testgtk.c (create_styles): Fix double free of
      	font desc.
      3f14b459
    • Owen Taylor's avatar
      Add gtk_widget_modify_{fg,bg,text,base,font}. · 92b22465
      Owen Taylor authored
      Mon Aug 21 22:39:18 2000  Owen Taylor  <otaylor@redhat.com>
      
              * gtk/gtkwidget.[ch]: Add gtk_widget_modify_{fg,bg,text,base,font}.
      
      	* gtk/testgtk.c (create_styles): Add a test for modifying
      	the style through gtk_widget_modify_*.
      
      	* gtk/gtkwidget.c (gtk_widget_get_modifier_style): Add
      	a function to get the current modifier style.
      
      	* gtk/gtkwidget.c (gtk_widget_modify_style): Make a copy
      	of the passed in GtkRcStyle instead of ref'ing it.
      
      	* gtk/gtkrc.[ch]: Add gtk_rc_style_copy().
      92b22465
  26. 26 Jul, 2000 2 commits
  27. 25 Jul, 2000 1 commit
    • Havoc Pennington's avatar
      update to reflect text widget changes. · a4762fbf
      Havoc Pennington authored
      2000-07-25  Havoc Pennington  <hp@redhat.com>
      
      * gtk/testtext.c, gtk/testtextbuffer.c: update to reflect text
      widget changes.
      
      * gtk/gtktextview.h: To be consistent with usage of "line"
      throughout the API to mean "newline-terminated thingy", change
      MOVEMENT_LINE to be MOVEMENT_WRAPPED_LINE, and MOVEMENT_PARAGRAPH
      to MOVEMENT_LINE.
      
      (GtkTextView): Add flags for default editability, and whether to
      show the cursor. Add functions to get/set that. Add
      
      (gtk_text_view_get_iter_location): new function
      
      * gtk/gtktexttypes.h: Move GtkTextLine typedef from here to
      gtktextlayout.h
      (g_convert): Add g_convert temporarily, will go in glib in a bit
      
      * gtk/gtktexttagtable.h: include gtktexttag.h, and define
      GtkTextTagTableForeach instead of brokenly using GHFunc.
      Change gtk_text_tag_table_foreach() so it doesn't use GHFunc.
      
      * gtk/gtktexttagprivate.h: Remove GtkTextStyleValues from here,
      moved to public header.
      
      * gtk/gtktexttag.h: Rename the "elide" attribute of tags to
      "invisible", since "elide" was a bad name.
      (gtk_text_tag_get_priority): Added
      
      (GtkTextStyleValues): put this in public header, along with
      functions to use it.
      
      * gtk/gtktextmarkprivate.h: Include more headers, since we no
      longer include gtktextbtree.h.
      
      * gtk/gtktextmark.h: Add gtk_text_mark_ref, gtk_text_mark_unref,
      gtk_text_mark_deleted
      
      * gtk/gtktextlayout.h: Don't include the "really private" headers,
      only buffer/iter. Forward declare GtkTextLIne and GtkTextLineData
      to make this possible. Now we only need to install
      gtktextlayout.h, not gtktextbtree.h and gtktext*private.h.
      (However the Makefile.am isn't changed yet because of the
      logistics of merging gtk-hp-patches piecemeal)
      
      * gtk/gtktextiterprivate.h: include btree header, so it compiles;
      rename gtk_text_iter_get_line to gtk_text_iter_get_text_line since
      gtk_text_iter_get_line is now used in the public API for a
      different purpose.
      
      * gtk/gtktextiter.h: Clean up function names to be more
      consistent. Always call char offset "offset" and byte index
      "index". A "line" is always a line number.
      
      (gtk_text_iter_is_last): new function, more efficient than
      the existing way to check
      (gtk_text_iter_is_first): new function, also more efficient
      
      (gtk_text_iter_up_lines, gtk_text_iter_down_lines): Remove these
      
      (gtk_text_iter_next_char, gtk_text_iter_prev_char): Renamed from
      gtk_text_iter_forward_char, etc.
      
      (gtk_text_iter_forward_to_tag_toggle): Renamed from
      forward_find_tag_toggle, since this isn't a linear search
      
      (GtkTextCharPredicate): rename from GtkTextViewCharPredicate
      
      (gtk_text_iter_forward_search, gtk_text_iter_backward_search):
      New functions, search for a buffer substring.
      
      * gtk/gtktextbuffer.h: Add fields to store whether a paste is
      interactive and default editable (since we need to store that info
      until we receive the selection data).
      
      Remove all the _at_char and at_line etc. versions of functions;
      only have iterator versions.
      
      Add _interactive() versions of functions, that consider the
      editability of text. (FIXME add interactive flag to the
      insert/delete signals per Darin's suggestion)
      
      (gtk_text_buffer_get_tag_table): new function, demand-creates the
      tag table if necessary
      
      Remove declaration of gtk_text_buffer_get_iter_from_string
      
      (_gtk_text_buffer_get_btree): private/internal function, added.
      
      
      * gtk/gtktextbtree.h: Remove forward decl of GtkTextLineData.
      (gtk_text_line_is_last): new function
      a4762fbf
  28. 21 Jul, 2000 1 commit
    • Owen Taylor's avatar
      Use new PangoAttrShape to reserve space for pixmaps, add GSList *pixmaps · e6be8f3f
      Owen Taylor authored
      Fri Jul 21 15:28:13 2000  Owen Taylor  <otaylor@redhat.com>
      
              * gtk/gtktextlayout.[ch], gtk/gtktextdisplay.c: Use new
      	PangoAttrShape to reserve space for pixmaps, add
      	GSList *pixmaps to GtkTextLineDisplay, draw the pixmaps
      	in the display functions.
      
      	* gtk/testgtk.c (create_layout): Set some more exotic
      	scrolled window options
      
      	* gtk/gtkscrolledwindow.[ch] (gtk_scrolled_window_set_shadow_type):
      	Add function to set the shadow type of a window, to allow
      	putting a shadow around widgets such as GtkLayout or GnomeCanvas
      	which don't draw their own frame.
      e6be8f3f
  29. 11 Jul, 2000 1 commit
    • Tim Janik's avatar
      add xthickness and ythickness to GtkRcStyle and add the necessary tokens. · 64911ddc
      Tim Janik authored
      Tue Jul 11 06:38:42 2000  Tim Janik  <timj@gtk.org>
      
              * gtk/gtkrc.h: add xthickness and ythickness to GtkRcStyle and
              add the necessary tokens.
      
              * gtk/gtkrc.c (gtk_rc_style_init): properly initiality the rc style.
              (gtk_rc_style_to_style): copy thicknesses.
              (gtk_rc_init_style): apply thicknesses.
              (gtk_rc_parse_style): parse xthickness and ythickness.
      
              * gdk/x11/gdkdnd-x11.c: silence compiler in switch() statements.
      
              * gdk/x11/gdkwindow-x11.c (gdk_window_foreign_new):
              (gdk_window_new):
              (_gdk_windowing_window_init):
              * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_foreign_new):
              (gdk_pixmap_create_from_data):
              (gdk_bitmap_create_from_data):
              (gdk_pixmap_new):
              * gdk/x11/gdkimage-x11.c (gdk_image_get):
              (gdk_image_new):
              * gdk/x11/gdkgc-x11.c (_gdk_x11_gc_new):
              * gdk/x11/gdkdnd-x11.c (gdk_drag_context_new):
              * gdk/x11/gdkcolor-x11.c (gdkx_colormap_get):
              (gdk_colormap_get_system):
              (gdk_colormap_new):
              * gdk/gdkwindow.c (gdk_window_init):
              * gtk/gtkstyle.c (gtk_style_new):
              * gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done):
              * gdk/gdkpixmap.c (gdk_pixmap_init):
              * gtk/gtkrc.c (gtk_rc_style_new):
              use g_object_new() instead of g_type_create_instance() which
              is a private function for fundamental type implementations.
      
      Tue Jul 11 06:20:14 2000  Tim Janik  <timj@gtk.org>
      
              * io-gif.c (gdk_pixbuf__gif_image_load_animation):
              * gdk-pixbuf-data.c (gdk_pixbuf_new_from_data):
              * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file):
              use g_object_new() instead of g_type_create_instance() which
              is a private function for fundamental type implementations.
      64911ddc
  30. 03 Jul, 2000 1 commit
    • Owen Taylor's avatar
      Ignore calls with <= width or height. · 01212ce1
      Owen Taylor authored
      Mon Jul  3 14:24:16 2000  Owen Taylor  <otaylor@redhat.com>
      
      	* gtk/gtkwidget.c (gtk_widget_draw): Ignore calls with
      	<= width or height.
      
      	* gtk/gtktable.c (gtk_table_attach): Fix missed merge
      	from 1.2 for parent/child states.
      
      	* gdk/gdkgc.c (gdk_gc_set_rgb_fg/bg_color): Fix a couple
      	of typos.
      
      	* gdk/gdkevents.[ch]: Remove press/xtilt/ytilt fields of
      	event structures, replace with a generic axes field. Replace
      	deviceid/source with GdkDevice *device.
      
      	* gdk/gdkevents.[ch] (gdk_event_get_axis): Add function
      	to extract particular axis use value from event. (Also
      	can be used for normal X/Y.)
      
      	* gdk/gdkinput.h gdk/x11/gdkinput*: Major revision;
      	allow for arbitrary number of axes, namespace everything
      	as gdk_device_*. Replace guint32 deviceid with GdkDevice *
      	everywhere.
      
      	* gdk/x11/{gdkmain-x11.c,gdkevent-x11.c,gdkinput*}:
      	Get rid of the gdk_input_vtable setup if favor of simply
      	defining the functions in gdkinput-none/gxi/xfree.c in
      	a similar fashion to the way that the port structure is
      	done.
      
      	* gtk/gtkdnd.c: Fix fields of synthesized button press event
      	for new event structures.
      
      	* gtk/gtkinputdialog.c gtk/testinput.c: Revise to match
      	new device interfaces.
      01212ce1
  31. 02 Jul, 2000 2 commits
    • Owen Taylor's avatar
      Call gtk_widget_size_request() on reparented child, if one. Otherwise, · b02ebc65
      Owen Taylor authored
      Sun Jul  2 14:37:58 2000  Owen Taylor  <otaylor@redhat.com>
      
      	* gtk/gtkoptionmenu.c (gtk_option_menu_size_request): Call
      	gtk_widget_size_request() on reparented child, if one. Otherwise,
      	queue_resize() on the child never results in it getting size-requested
      	at all.
      
      	* gtk/testgtk.c (build_option_menu): Remove silly radio-menu-items
      	in option menus, so that (with luck) people won't copy it into
      	their apps in the future.
      
      	* gtk/gtkoptionmenu.c: Connect ::size_request on the menu
      	to gtk_option_menu_calc_size. This isn't perfect, but should fix
      	a lot of problems with changing the size of the menu's menu
      	items after adding it to the option menu.
      
      	* gtk/gtktexttag.c: Include gtkmain.h for gtk_get_default_language().
      
      	* gtk/gtkwidget.[ch]: Add a ::direction_changed that triggers when
      	the text direction for a widget changes.
      
      	* gtk/gtk{entry.c,label.[ch],textview.[ch]} gtk/testgtk.c: Use
      	::direction_changed to get rid of various hacks.
      b02ebc65
    • Owen Taylor's avatar
      Add gdk_rgb_find_color() to get a pixel value using GdkRGB functionality · 4f1ccca5
      Owen Taylor authored
      Sun Jul  2 12:45:50 2000  Owen Taylor  <otaylor@redhat.com>
      
      	* gdk/gdkrgb.[ch]: Add gdk_rgb_find_color() to get a pixel
      	value using GdkRGB functionality given GdkColormap and GdkColor.
      	(name not final, waiting for inspiration.)
      
      	* gdk/gdkgc.[ch] (gdk_gc_set_rgb_fg/bg_color): New functions to
      	set the foreground/background of a GC using the GC's colormap
      	and GdkRGB. (name not final, waiting for inspiration.)
      
      	* gdk/gdkcompat.h gdk/gdkrgb.c (gdk_rgb_get_colormap): Rename from
      	gdk_rgb_get_cmap(), put #define in gdkcompat.h.
      
      	* gtk/gtkwidget.[ch] gtkcompat.h: Make visuals for
      	gtk_widget_get_visual(), gtk_widget_get_default_visual, etc,
      	purely a function of the corresponding colormap. Make
      	gtk_widget_set_visual(), etc, noop macros in gtkcompat.h.
      
      	* gdk/gdkpixmap.c gdk/x11/gdkpixmap-c11.c: Rewrite
      	gdk_pixbuf_*create_from_xpm_* in terms of
      	gdk_pixbuf_new_from_xpm_data(), move into platform independent
      	code.
      
      	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Take
      	advantage of the new draw_rgb_32_image_dithalign.
      
      	* gdk/gdkrgb.c (gdk_draw_rgb_32_image_dithalign): Added.
      
      	* gtk/gtkgc.c (gtk_gc_new): Set the appropriate colormap
      	on each created GC.
      
      	* gdk/gdkgc.[ch]: Add gdk_gc_get/set_colormap.
      
      	* gdk/gdkgc.[ch]: Add a colormap field to the GdkGC structure
      	which we initialize from the drawable when the GC is created,
      	if the drawable has a colormap.
      
      	* gdk/x11/gdkgc-x11.c: include string.h for memset.
      
      	* gdk/x11/gdkinput-x11.c: include string.h for strlen, etc.
      
      	* gtk/gtklayout.[ch]: Remove unsed configure serial member.
      4f1ccca5
  32. 24 Jun, 2000 1 commit
    • Tim Janik's avatar
      make the current version number 1.3.1 (binary age 0, interface age 0). · 100c9594
      Tim Janik authored
      Fri Jun 23 17:54:23 2000  Tim Janik  <timj@gtk.org>
      
              * configure.in: make the current version number 1.3.1 (binary age 0,
              interface age 0).
      
              * gtkfeatures.h, gtkfeatures.h.in: dejavue, get rid of these *again*,
              gtkcompat.h is all we want.
      
              * gtk/gtktypeutils.[hc]: define most of the primitive types in terms of
              GLib primitive types. fixed g_type_register_fundamental() argument
              ordering.
      
              * gtk-config.in (lib_gtk): add -lgdk_pixbuf so third party code
              compiles.
      
              * gdk-pixbuf-loader.[hc]: get rid of unistd.h include.
              object code cleanup, comment trigraph fixes, etc...
      100c9594