1. 25 Sep, 2001 2 commits
    • Havoc Pennington's avatar
      use gtk_text_iter_can_insert · 1a26412d
      Havoc Pennington authored
      2001-09-25  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtktextview.c (gtk_text_view_key_press_event): use
      	gtk_text_iter_can_insert
      
      	* gtk/gtktextbuffer.c: use gtk_text_iter_can_insert
      
      	* gtk/gtktextiter.c (find_line_log_attrs): fixes, #57611, #57613
      	 (gtk_text_iter_can_insert): new function to fix #60282, should
      	also fix msw's "can paste into empty buffer" bug.
      
      	* gtk/gtktexttag.c (gtk_text_tag_event): change type check for
      	"event object,"  #59091
      
      	* gtk/gtktextbtree.c: indentation fixes
      
      	* gtk/gtktextiter.c (find_by_log_attrs): fixes
      1a26412d
    • Havoc Pennington's avatar
      Add tests for line separators, addresses bug #57428 · 5c15d1df
      Havoc Pennington authored
      2001-09-25  Havoc Pennington  <hp@redhat.com>
      
      	* tests/testtextbuffer.c (line_separator_tests): Add tests for
      	line separators, addresses bug #57428
      5c15d1df
  2. 24 Sep, 2001 1 commit
    • Havoc Pennington's avatar
      Get rid of the newline-that-could-not-be-deleted; buffers may now be · 1e3b62fd
      Havoc Pennington authored
      2001-09-24  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtktextiter.c, gtk/gtktextbuffer.c, gtk/gtktextbtree.c,
      	gtktextlayout.c:
      	Get rid of the newline-that-could-not-be-deleted; buffers may
      	now be zero-length. Much easier to fix than expected, once
      	I figured out the right way to do it. However, there are
      	various subtle bugs introduced by this that will have to get
      	sorted out. Please use bugzilla.
      1e3b62fd
  3. 08 Sep, 2001 1 commit
    • Havoc Pennington's avatar
      default xscale/yscale to 0.0, not 0.5, 0.5 isn't useful · 9ddcb3e0
      Havoc Pennington authored
      2001-09-08  Havoc Pennington  <hp@pobox.com>
      
      	* gtk/gtkalignment.c (gtk_alignment_class_init): default
      	xscale/yscale to 0.0, not 0.5, 0.5 isn't useful
      
      	* tests/testtextbuffer.c: fix usage of gtk_text_iter_spew
      
      	* gtk/gtktextiter.c: fix docs
      	(gtk_text_iter_spew): get rid of this
      
      	* gtk/gtklayout.c: docs
      
      	* gtk/gtkbutton.c (gtk_button_construct_child): add an alignment
      	to center image and label together, instead of having image on
      	left and label centered, patch/suggestion from Jacob
      
      	* gtk/gtkdialog.c: docs
      
      2001-09-08  Havoc Pennington  <hp@pobox.com>
      
      	* gtk/tmpl/gtklayout.sgml: docs
      
      	* gdk-pixbuf/gdk-pixbuf.sgml: remove the section on compiling
      	gdk-pixbuf since it isn't a standalone package anymore
      
      	* gtk/building.sgml: section on compiling GTK itself
      9ddcb3e0
  4. 18 Jul, 2001 1 commit
    • Darin Adler's avatar
      Ignore the sgml directory made by gtkdoc. Use gtk_window_set_resizable · 03496763
      Darin Adler authored
      	* .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.
      03496763
  5. 03 Apr, 2001 1 commit
    • Owen Taylor's avatar
      Updated. · af5c897e
      Owen Taylor authored
      Tue Apr  3 13:55:37 2001  Owen Taylor  <otaylor@redhat.com>
      
      	* NEWS: Updated.
      
      	* configure.in: Remove support for uninstalled glib.
      
      	* gtk/gtkdnd.c (gtk_drag_highlight_expose): Return FALSE as
      	so as not to stop emission.
      
      	* gtk-config-2.0.in: Exit with an error message that gtk-config-2.0
      	is no longer supported.
      
      	* Makefile.am gtk/Makefile.am tests/*: Moved all tests
      	into tests, change build order to build modules before
      	gtk/.
      
      	* modules/input/Makefile.am: Move gtk-query-immodules-2.0 invocation
      	to here.
      af5c897e
  6. 16 Mar, 2001 1 commit
    • Havoc Pennington's avatar
      add varargs for properties to set on the tag. · e7a21a2e
      Havoc Pennington authored
      2001-03-15  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtktextbuffer.c (gtk_text_buffer_create_tag): add varargs
      	for properties to set on the tag.
      
      	* gtk/testtext.c: fixups to reflect create_tag change
      
      	* gtk/gtktexttag.c (gtk_text_tag_set_property):
      	background/foreground stipple are objects, not boxed.
      
      	* demos/gtk-demo/textview.c: intellihancing
      e7a21a2e
  7. 17 Feb, 2001 1 commit
    • Havoc Pennington's avatar
      convert the X coordinates so they're with respect to the line, rather than · 08add3cd
      Havoc Pennington authored
      2001-02-15  Havoc Pennington  <hp@redhat.com>
      
      	* gdk/gdkpango.c (gdk_pango_layout_line_get_clip_region): convert
      	the X coordinates so they're with respect to the line, rather than
      	with respect to the layout.
      
      	* gtk/gtkalignment.c: Convert to new property API, patch from Lee
      	Mallabone
      
      	* gtk/testgtk.c (create_range_controls): add vscale tests,
      	and inverted test
      
      	* gtk/gtkrange.c (gtk_range_set_inverted): new function to fix
      	#50806
      
      	* gtk/gtkentry.c (gtk_entry_get_text): add G_CONST_RETURN
      
      	* gtk/gtktextiter.h (gtk_text_iter_is_last): rename
      	gtk_text_iter_is_end
      
      	* gtk/gtktextbuffer.h (gtk_text_buffer_get_last_iter):
      	rename gtk_text_buffer_get_end_iter
      
      	* gtk/testgtk.c (create_labels): Add test for selectable
      
      	* gtk/gtkentry.c (gtk_entry_draw_text): Use new GDK API to draw
      	the selection stuff. This code is kind of broken since it doesn't
      	use the theme engine.
      
      	* gdk/gdkpango.c (gdk_pango_layout_line_get_clip_region):
      	fix infinite loop and y offset problem
      	(gdk_draw_layout_line_with_colors): fix foreground color handling
      
              * gtk/gtklabel.h, gtk/gtklabel.c: Implement a "selectable" flag
      	that makes the label selectable.
      
      	* gtk/gtklabel.c (gtk_label_style_set): recreate the label's
      	layout when the style is set, since fonts etc. could have changed.
      08add3cd
  8. 31 Dec, 2000 1 commit
    • Havoc Pennington's avatar
      Rearrange all the scroll-while-dragging-or-selecting code to be different, · 7a958797
      Havoc Pennington authored
      2000-12-31  Havoc Pennington  <hp@pobox.com>
      
      * gtk/gtktextview.c: Rearrange all the
      scroll-while-dragging-or-selecting code to be different, not
      necessarily better. ;-)
      (gtk_text_view_scroll_to_mark): Change this
      function to take within_margin as a fraction instead of a pixel
      value, and to take alignment arguments (indicating where to align
      the mark inside the visible area)
      
      * gtk/testtextbuffer.c (fill_buffer): fix bad cast of GtkTextTag
      to GtkObject
      
      * gtk/gtktextiter.c (gtk_text_iter_set_line_offset): change
      behavior so that offsets past the end of the line are not
      allowed, and an offset equal to the line length moves the iterator
      to the next line
      (gtk_text_iter_set_line_index): make parallel change
      (gtk_text_iter_get_bytes_in_line): add this function
      
      * gtk/gtktextbtree.c (_gtk_text_line_byte_locate): change handling
      of byte indexes off the end of the line; byte index at the end of
      the line now returns FALSE and doesn't fill in the requested
      values, byte index past the end of the line is an error.  Also,
      don't allow -1 offset anymore, since its meaning is unclear.
      
      This change exposes some bug in visual cursor motion, where we
      end up with a huge invalid byte index; needs fixing. Symptom of
      bug is a crash when you hit up arrow.
      
      (_gtk_text_line_char_locate): match the change to byte_locate
      
      * gtk/gtktextiter.c (find_by_log_attrs): Handle iteration backward
      from start of line properly. fixes bug reported by Mikael
      Hermansson where backspace would delete all text before the
      cursor.
      7a958797
  9. 16 Dec, 2000 1 commit
    • Havoc Pennington's avatar
      General cleanup of the log attr iteration stuff. This should make e.g. the · e405f75c
      Havoc Pennington authored
      2000-12-16  Havoc Pennington  <hp@pobox.com>
      
      * gtk/gtktextiter.c: General cleanup of the log attr iteration
      stuff. This should make e.g. the delete key work again in the
      text widget...
      (gtk_text_iter_forward_cursor_positions): handle negative count
      (gtk_text_iter_backward_cursor_positions): handle negative count
      (gtk_text_iter_forward_word_ends): handle negative count
      (gtk_text_iter_backward_word_starts): handle negative count
      
      * gtk/gtktextlayout.h, gtk/gtktextlayout.c, gtk/gtktexttag.h,
      gtk/gtktexttag.c, gtk/gtktexttagtable.h, gtk/gtktexttagtable.c,
      gtk/gtktextbuffer.h, gtk/gtktextbuffer.c: Convert everything to
      GObject. No doubt will cause breakage.
      
      * demos/gtk-demo/textview.c: remove hacks around
      non-GObject-ification of the text objects
      
      * demos/gtk-demo/main.c (main): use g_object_set() to manipulate
      the text tag
      e405f75c
  10. 11 Dec, 2000 1 commit
    • Havoc Pennington's avatar
      Handle chopping off \r\n and 0x2029 in addition to \n before passing to · 310a0d4f
      Havoc Pennington authored
      2000-12-11  Havoc Pennington  <hp@redhat.com>
      
      	* gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
      	Handle chopping off \r\n and 0x2029 in addition to \n before
      	passing to PangoLayout
      
      	* gtk/gtkimcontextsimple.c
      	(gtk_im_context_simple_get_preedit_string):
      	return an empty string if no match is pending
      
      	* gtk/gtkimcontext.c (gtk_im_context_get_preedit_string): add
      	assertion that the returned preedit string was sane
      
      	* gtk/gtktext*.[hc], gtk/testtext.c, gtk/testtextbuffer.c:
      	s/gtk_text_iter_next_char/gtk_text_iter_forward_char/g;
      	s/gtk_text_iter_prev_char/gtk_text_iter_backward_char/g;
      310a0d4f
  11. 15 Nov, 2000 1 commit
    • Havoc Pennington's avatar
      change "offset" to "rise" · c72cec38
      Havoc Pennington authored
      2000-11-14  Havoc Pennington  <hp@pobox.com>
      
      * gtk/testtextbuffer.c (fill_buffer): change "offset" to "rise"
      
      * gtk/gtktexttypes.h (GTK_TEXT_UNKNOWN_CHAR): Add macro for
      unknown char, no real reason we were using a variable.
      Remove gtk_text_unknown_char variable. Fix all the text widget
      files accordingly.
      
      * gtk/gtktexttypes.c: Change "unknown character" to 0xFFFC,
      since the Unicode spec seems to prefer that character for our
      purposes.
      c72cec38
  12. 13 Nov, 2000 1 commit
    • Havoc Pennington's avatar
      change demo install dir to datadir/gtk+-2.0/demo · 9adcd8a4
      Havoc Pennington authored
      2000-11-12  Havoc Pennington  <hp@pobox.com>
      
      * demos/gtk-demo/Makefile.am (democodedir): change demo install
      dir to datadir/gtk+-2.0/demo
      
      * demos/gtk-demo/textview.c: Text widget demo; reveals all
      sorts of text widget and Pango font bugs. Urgh.
      
      * demos/gtk-demo/Makefile.am (demos): Add textview.c
      
      * demos/gtk-demo/main.c (create_tree): Add instructions at top of
      tree that you should double click to see the demo. Fix
      types of variables to reflect changed return values from
      GtkTreeStore and GtkTreeViewColumn constructors.
      
      * gtk/gtktextbuffer.c (gtk_text_buffer_new): ref/sink the
      newly-created buffer to prepare for GObject semantics
      
      * gtk/testtext.c: don't leak the buffer with GObject semantics
      
      * gtk/testtextbuffer.c: ditto
      9adcd8a4
  13. 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
  14. 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
  15. 30 Sep, 2000 1 commit
    • 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
  16. 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
  17. 21 Jun, 2000 1 commit
    • Havoc Pennington's avatar
      Use gunichar instead of gint when appropriate in the interfaces · ee089516
      Havoc Pennington authored
      2000-06-21  Havoc Pennington  <hp@redhat.com>
      
      * gtk/gtktextiter.h: Use gunichar instead of gint when appropriate
      in the interfaces
      
      * gtk/gtktexttypes.c: Remove UTF functions, use glib
      stuff instead when possible.
      
      * gtk/gtktexttypes.h: Delete some unused constants
      
      * gtktextbtree.c, gtktextiter.c, gtktextsegment.c, gtktextview.c,
      testtextbuffer.c: use glib instead of custom unicode routines
      ee089516
  18. 02 Jun, 2000 1 commit
    • Havoc Pennington's avatar
      Test program to make sure GtkTextBuffer is in working order. · e86329d5
      Havoc Pennington authored
      2000-06-02  Havoc Pennington  <hp@pobox.com>
      
              * gtk/testtextbuffer.c: Test program to make sure GtkTextBuffer
      	is in working order.
      
      	* gtk/testtext.c: Change to reflect anonymous mark API
      
      	* gtk/gtktextview.c: Convert from mark names to GtkTextMark*.
      
      	* gtk/gtktexttag.h (struct _GtkTextTag): remove the affects_size
      	field, which was unused.
      
      	* gtk/gtktextmarkprivate.h (GTK_IS_TEXT_MARK): add this macro,
      	saves some typing.
      
      	* gtk/gtktextbuffer.c: Switch from mark names to GtkTextMark*
      
      	* gtk/gtktextbtree.c (gtk_text_btree_new): set the not_deleteable
      	flag on the insertion point and selection bound
      
      	Throughout, use GtkTextMark instead of GtkTextLineSegment, and
      	make mark-manipulation functions take a GtkTextMark* instead of a
      	mark name.
      
      	* gtk/gtktextmarkprivate.h: Add a "not_deleteable" flag to
      	GtkTextMarkBody; will be used to detect attempts to delete
      	the permanent marks (insert and selection bound)
      e86329d5