2005-12-07 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_preedit_changed_handler):
Only scroll if we have focus. (#316310, Paolo Borelli)
2005-12-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkimcontextsimple.c (gtk_im_context_simple_reset): Don't
commit from reset, it upstets GtkTextView.
* gtk/gtktextview.c (gtk_text_view_check_cursor_blink): Be more
careful when turning blinking on and off.
(gtk_text_view_focus_out_event): Make the cursor really invisible
when the focus goes away. (#323087, Sadrul Habib Chowdhury)
(cursor_blinks): Check the gtk-cursor-blink setting first.
2005-11-02 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c: Remove some g_return_if_fail() from
static functions, replace some others by g_assert().
* gtk/gtktextview.c (selection_motion_event_handler)
(gtk_text_view_start_selection_drag): Keep track of the original
selection boundaries during a drag selection, in order to correctly
decide when to extend or shrink the selection. (#320167,
reported by Arvind S N, patch by Paolo Borelli)
2005-10-24 Matthias Clasen <mclasen@redhat.com>
Add settings to hide the input method and Unicode control character
submenus in the context menus of GtkEntry and GtkTextView.
* gdk/x11/gdkevents-x11.c: Map GTK+ settings to X settings.
* gtk/gtksettings.c (gtk_settings_class_init): Declare GTK+ settings here.
* gtk/gtktextview.c (popup_targets_received):
* gtk/gtkentry.c (popup_targets_received): Use the settings here.
2005-09-09 Matthias Clasen <mclasen@redhat.com>
Stop cursor blinking in non-editable regions of a text view.
(#311508, Torbjörn Andersson)
* gtk/gtktextview.c (gtk_text_view_check_cursor_blink):
(cursor_blinks): Take editability into account when deciding
whether the cursor blinks.
(gtk_text_view_button_release_event):
(gtk_text_view_move_cursor_internal): Update cursor blinking here.
2005-09-01 Matthias Clasen <mclasen@redhat.com>
* gdk/*.c: Intern some more strings.
* gtk/gtkintl.h:
* gtk/*.c: Define an I_() macro and use it instead of the
bulky g_intern_static_string().
2005-08-31 Matthias Clasen <mclasen@redhat.com>
* gdk/Makefile.am:
* gtk/Makefile.am: Intern type names in code generated by
glib-mkenums, too.
* gtk/*.c:
* gdk/x11/*.c:
* gdk/*.c: Intern type names before registering the type to avoid
unnecessary copies.
2005-07-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Don't
ever go unconditionally to the buffer ends; that doesn't work
if the initial or final portion of the buffer are invisible.
2005-07-11 Matthias Clasen <mclasen@redhat.com>
When dragging text, use a drag icon showing the (ellipsized)
text that is being dragged: (#161132, Kevin Duffus, patch
by Carlos Garnacho Parro)
* gtk/gtktextutil.h:
* gtk/gtktextutil.c (_gtk_text_util_create_drag_icon): Add
a function to create a pixmap for use when dragging text.
* gtk/gtktextview.c (gtk_text_view_start_selection_dnd):
* gtk/gtklabel.c (gtk_label_motion):
* gtk/gtkentry.c (gtk_entry_motion_notify): Use a drag icon
showing the text being dragged.
2005-07-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentry.c (gtk_entry_move_forward_word)
(gtk_entry_move_backward_word): Match the text view change
to allow selecting whitespace with double-click.
2005-07-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (extend_selection): Make double-clicking
between words select whitespace. (#309860, Mike Miller, patch
by Paolo Borelli)
2005-06-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
jump to the next line if we are at the end of the line.
2005-06-13 Matthias Clasen <mclasen@redhat.com>
Make invisible text work a bit better (#66194, patch by
Jeroen Zwartepoorte)
* gtk/gtk.symbols:
* gtk/gtktextiter.[hc]: Add function to move by
visible lines.
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal):
Skip invisible text when moving by paragraphs.
* gtk/gtktextlayout.c (gtk_text_layout_move_iter_visually):
Skip invisible lines here too.
2005-05-25 Michael Natterer <mitch@imendio.com>
* gtk/gtktextview.c (blink_cb): block the text_layout's "changed"
handler when changing cursor visibility because it would expose
the whole paragraph where the cursor is. Instead, expose the
cursors' areas manually. (#173047).
(text_window_invalidate_cursors): new function which exposes the
cursors.
* gtk/gtkstyle.c (draw_insertion_cursor): added comment that the
same cursor size calculation is in text_window_invalidate_cursors().
2005-05-18 Anders Carlsson <andersca@imendio.com>
* gtk/gtktextview.c: (gtk_text_view_flush_scroll),
(gtk_text_view_update_adjustments), (gtk_text_view_value_changed):
* gtk/gtktextview.h:
If the horizontal adjustment changes because of a change in the
layout width, then do a complete redraw. This is because there
might be right-aligned or centered text that needs to be redrawn.
2005-05-11 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
to draw the swatch in to avoid having an extraneous window.
* gtk/gtkcolorsel.c (color_sample_draw_sample): Actually se tthe
color when !has_opacity.
2005-05-10 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcairo.[ch] gdk/gdkcolor.[ch] gdk/Makefile.am: Add source
files for Cairo convenience functionality.
* gdk/gdkcairo.h (gdk_cairo_rectangle, gdk_cairo_region): Add a
convenience functions to add GdkRectangle, GdkRegion to a cairo path.
* gdk/gdkwindow.c gdk/gdkgc.c gtk/gtkcolorsel.c gtk/gtkiconview.c
gtk/gtkstyle.c: Use gdk_cairo_rectangle/region().
* gdk/gdkcairo.[ch] gdk/gdkdrawable.h gdk/gdkdraw.c: Rename
gdk_drawable_create_cairo_context() to gdk_cairo_create().
* gdk/gdkcairo.c gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c:
Rename gdk_pixbuf_set_as_cairo_source() to
gdk_cairo_set_source_pixbuf().
* gdk/gdkdraw.c gdk/gdkpango.c gtk/gtkcolorsel.c gtk/gtkhruler.c
gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkstyle.c gtk/gtkvruler.c:
Adjust for renames.
* gdk/gdk.symbols: Update.
* gtk/gtkwidget.c (gtk_widget_queue_shallow_draw): Fix
coordinate system problem that was causing the wrong portions
to be invalidated.
* gtk/gtkcellrenderer.c (gtk_cell_renderer_render)
gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render)
gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_render)
gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render)
gtk/gtkcellview.c (gtk_cell_view_expose)
gtk/gtkdnd.c (gtk_drag_highlight_expose)
gtk/gtkentry.c (gtk_entry_draw_text)
gtk/gtktextview.c (text_window_invalidate_rect): Some cairoization.
* gtk/gtkcalendar.[ch]: Beat into something roughly resembling
GTK+ style ... use instance-private data and standard names for
private structure, etc. Move function docs inline.
* gtk/gtkcalendar.[ch]: Switch to drawing everything in
expose. Switch drawing to Cairo.
* gtk/gtkcalendar.c (gtk_calendar_freeze): Deprecate
gtk_calendar_freeze/thaw
2005-05-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_expose_event): Propagate
the event to unanchored children in the text window.
(#302494, Stephen Kennedy)
2005-03-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like
their G_ counterparts, but also mark the name, nick
and blurb as static.
* gtk/*.c: Mark param spec strings as static, using
the new macros.
2005-03-20 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gtk/grk.symbols: Group symbols by header and source file.
* gtk/makegtkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegtkalias.pl -def
* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
this file.
* gtk/*.c: Include gtkalias.h after the other headers,
include gtkaliasdef.c at the bottom.
* gtk/*.h: Small cleanups.
Wed Jan 5 11:42:49 2005 Søren Sandmann <sandmann@redhat.com>
* gtk/gtkviewport.c (gtk_viewport_realize):
* gtk/gtktextview.c ((text_window_realize): Set the background of
the windows to None instead of adding EXPOSURE_MASK, as suggested
by Owen in #162112.
2004-12-08 Matthias Clasen <mclasen@redhat.com>
Fix#111031, reported by Padraig O'Briain:
* gtk/gtktextlayout.h:
* gtk/gtktextlayout.c (gtk_text_layout_get_iter_at_position):
Add a variant of gtk_text_layout_get_iter_at_pixel() which
returns the character at the position, not the closest
cursor position.
* gtk/gtktextview.h:
* gtk/gtktextview.c (gtk_text_view_get_iter_at_position):
Add a variant of gtk_text_view_get_iter_at_location() which
returns the character at the position, not the closest
cursor position.
2004-11-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_iter_by_lines): Return
a boolean indicating whether we could do the requested move.
(gtk_text_view_move_cursor_internal): For GTK_MOVEMENT_DISPLAY_LINES,
move to the beginning/end of the line if we're on the first/last
line. (#155891, Paolo Borelli)
2004-10-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkdnd.c: Document how to use info with text/image
targets.
* gtk/gtkselection.h:
* gtk/gtkselection.c (gtk_target_list_add_text_targets):
(gtk_target_list_add_image_targets): Add info argument.
* gtk/gtkcalendar.c (gtk_calendar_motion_notify):
* gtk/gtkentry.c (gtk_entry_init):
* gtk/gtktextview.c (gtk_text_view_init): Adjust all callers.
Thu Oct 21 15:01:09 2004 Owen Taylor <otaylor@redhat.com>
#155952
* gtk/gtkentry.c: Fix checking the wrong position for
the backspace_deletes_character PangoLogAttr.
* gtk/gtktextbuffer.[ch] gtk/gtk.symbols (gtk_text_buffer_backspace):
Move backspace logic from GtkTextView to here, check
backspace_deletes_char.
* gtk/gtktextview.c: Use gtk_text_buffer_backspace().
2004-08-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_delete_surrounding_handler): Make it compile.
2004-08-27 Matthias Clasen <mclasen@redhat.com>
Fix#151112, Olexiy Avramchenko:
* gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout):
* gtk/gtkiconview.c (scroll_timeout, layout_callback)
(gtk_icon_view_item_accessible_idle_do_action):
* gtk/gtkcombobox.c (list_popup_resize_idle, popdown_idle)
(popup_idle): Protect idle callbacks and timeouts with
GDK_THREADS_ENTER/_LEAVE.
* gtk/gtkfilechooserbutton.c (update_dialog_idle): New function to
call update_dialog() from an idle with the necessary protection.
Mon Aug 30 01:34:42 2004 Matthias Clasen <maclas@gmx.de>
Changes to make sure input methods respect the editability
of entries and text views. #114173, Noah Levitt.
* gtk/gtkentry.c (popup_targets_received): Make the Input
Methods menuitem insensitive if we're not editable.
* gtk/gtkentry.c (gtk_entry_delete_surrounding_cb):
* gtk/gtkentry.c (gtk_entry_preedit_changed_cb):
* gtk/gtkentry.c (gtk_entry_commit_cb): Don't change anything
if we're not editable.
* gtk/gtkentry.c (gtk_entry_focus_out):
* gtk/gtkentry.c (gtk_entry_focus_in): Only send focus_in and
focus_out to the im context if we're editable.
* gtk/gtkentry.c (gtk_entry_set_property): Reset the im context
if the entry just became non-editable.
* gtk/gtktextview.c (gtk_text_view_delete_surrounding_handler):
Use gtk_text_buffer_delete_interactive() to not delete
non-editable portions of text.
Mon Aug 9 12:48:04 2004 Matthias Clasen <maclas@gmx.de>
Add hidden aliases for exported symbols which are
used internally in order to get rid of many PLT
entries. (#145519, Arjan van de Ven)
* gtk/Makefile.am: Add rules to generate gtk.def and
from gtk.symbols, and make make check check the abi
with abicheck.sh.
(gtk_private_h_sources): Add gtkinternals.h
(gtk_built_private_headers): Add gtkalias.h
(gtk_extra_sources): Add gtk.symbols
(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh
* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
The file can be processed by cpp to filter out certain
subsets of symbols.
* gtk/abicheck.sh: New file. Script to check the actually
symbols exported from libgtk-x11.2.0.so against the symbols
found in gtk.symbols.
* gtk/makegtkalias.pl: New file. Perl script to generate the
header containing the alias definitions for internally used
exported symbols from a list of symbols.
* gtk/gtkinternals.h: New file. An uninstalled header listing
symbols which must be exported for some reason and do not appear
in any other header.
* gtk/*.c: Include gtkalias.h
Mon Aug 2 01:30:03 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.[hc]:
* gtk/gtkentry.[hc]: Add a new binding signal ::backspace,
bind it to the backspace key, and make it pay attention
to the Pango backspace_deletes_character
attribute. (#119891, Noah Levitt, patch by Theppitak
Karoonboonyanan)
Mon Aug 2 00:21:26 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c (blink_cb): Add the same warning
that the blink_cb() in GtkEntry already has. (#148733)
Sat Jul 17 00:48:27 2004 Matthias Clasen <maclas@gmx.de>
Support text/plain selection target (#55117, Owen Taylor)
* gtk/gtkselection.h:
* gtk/gtkdnd.h:
* gtk/gtkselection.c (gtk_target_list_add_text_targets):
* gtk/gtkdnd.c (gtk_drag_dest_add_text_targets):
* gtk/gtkdnd.c (gtk_drag_source_add_text_targets): New
functions to facilitate handling of text targets.
* gtk/gtkentry.c:
* gtk/gtktextview.c: Use the new text target handling
functions instead of hardwiring the list of supported
text targets everywhere.
* gtk/gtkselection.c (gtk_selection_data_get_text):
(gtk_selection_data_set_text):
Support the targets text/plain, text/plain?charset=utf-8
and text/plain?charset=<LOCALE-CHARSET> as outlined in
#55117:
For text/plain send only ASCII, but accept 8-bit text
and treat it as ISO-8859-1 as specified by the Xdnd spec.
Always send CRLF terminators. Accept either and convert
into the native terminator for the platform.