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-23 Tor Lillqvist <tml@novell.com>
Improve and simplify line segment rendering on Win32, especially
the implementation of GDK_CAP_NOT_LAST, and dashed lines. Fixes
bug #306396.
* gdk/win32/gdkprivate-win32.h (GdkGCWin32): Save the GdkGC's
line_style, cap_style and join_style as such in the
GdkGCWin32. Don't need to keep the pen_double_dash flag, we can
check the line_style.
* gdk/win32/gdkgc-win32.c (fixup_pen): New internal function. Sets
up the GDI pen type, style, end cap and join attributes to use
based on the pen width, GDK line style, end cap style, and join
style.
For a narrow (zero-width) GDK pen with the GDK_CAP_NOT_LAST end
cap style, which typically are used for XOR drawing where it is
essential that the last pixel is not drawn, use a GDI cosmetic
pen. Only for a cosmetic pen does GDI not draw the last pixel. I
deduced this by experimetation, the documentation is rather vague.
For other GDK pens use a geometric GDI pen. If the width is 0 or 1
and the GDK end cap style is GDK_CAP_BUTT, and the line style is
GDK_LINE_SOLID, use PS_ENDCAP_ROUND. This ensures that also
single-pixel length lines are drawn. (For sngle-pixel width lines
roundness as such is of course irrelevant.) For dashed lines, use
PS_ENDCAP_FLAT.
For wide lines use PS_ENDCAP_FLAT, _ROUND or _SQUARE,
respectively, for GDK_CAP_BUTT, GDK_CAP_ROUND and GDK_CAP_PROJECTING.
For one pixel on-off dashed lines, use PS_ALTERNATE, it seems to
work better than PS_USERSTYLE. For other dashed lines, use
PS_USERSTYLE and the dashes as set by the user (or the default
four-pixel on-off style).
(gdk_win32_gc_values_to_win32values, gdk_win32_gc_set_dashes):
Call fixup_pen() to do the pen settings after modifying some of
the GDK GC attributes that affect pens.
* gdk/win32/gdkdrawable-win32.c (render_line_horizontal,
render_line_vertical, draw_segments): Check GdkGCWin32::line_style
instead of the the removed pen_double_dash member. Don't use
PATCOPY unconditionally in the PatBlt() call, use a raster ope
code that depends on the GC function in use.
(draw_rectangle, draw_segments, draw_lines): Be more careful in
deciding when to do the manual dash rendering.
(draw_segments): Don't do any manual "last point" drawing at
all. The above changes takes care of narrow line segments being
drawn correctly in most cases, at least on NT-based Windows.
2005-06-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_key_press): Change the
keynav for header reordering and resizing to Alt-arrows and
Shift-Alt-arrows, following a proposal by the keynav
authority. (#308666, Calum Benson)
2005-06-23 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcairo.c (gdk_cairo_set_source_pixbuf): Fix the
big endian case for 3-channel source. (Reported by
David Zeuthen)
2005-06-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbutton.c (gtk_button_construct_child): Don't
trigger warnings if there are extra references to the
hbox. (#308677, Dan Winship)
2005-06-22 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkdnd-x11.c (xdnd_finished_filter): Set the
time field in the event. (#308573, Morten Welinder)
2005-06-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkarrow.c:
* gtk/gtkimage.c:
* gtk/gtklabel.c:
* gtk/gtkpixmap.c: Modify all of the GtkMisc widgets to round down
on centering calculations to match the behaviour of other parts
of GTK+. (#307419, Ryan Lortie)
2005-06-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkdnd.c (gtk_drag_source_set): Connect to
button-release-event as well, to handle touchscreen
scenarios better. (#171490, Markku Vire)
2005-06-21 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
* gdk/gdkwindow.h:
* gdk/x11/gdkgeometry-x11.c (gdk_window_move_region): New
function which can be used to implement scrolling in
non-window widgets. (#135165, Søren Sandmann)
2005-06-19 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_clamp_node_visible): added a
check which avoids processing updates on bin_window and scrolling
if the node is already visible. (#170600, Billy Biggs).
2005-06-19 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): only keep the
row at the same position if the full row is visible. (#304623,
Jorn Baayen).
2005-06-19 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): set dy to zero
if treeview's height is smaller than the current page_size (just
like we do elsewhere).
2005-06-19 Kristian Rietveld <kris@gtk.org>
Make mousewheel scrolling possible in typeahead mode, suggestion
from Reinout van Schouwen (#307898).
* gtk/gtktreeview.c (gtk_tree_view_ensure_interactive_directory):
connect treeview search window to scroll_event signal,
(gtk_tree_view_search_scroll_event): implement.
2005-06-19 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_search_button_press_event): pass
the event on to treeview, so it has a change of selecting a row, etc.
(#169677, Kirk Bridger).
2005-06-19 Kristian Rietveld <kris@gtk.org>
This commit includes a fix for #169463, Stefan Kost.
* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_get_size):
when cell_area is set, return cell_area width/height as width/height,
so the focus rectangle will be drawn correctly.
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): drop unneeded get
of focus-line-width property,
(validate_row): take focus_line_width into account.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
also take focus_line_width into account when calculating the cell_area
y and height (before, we only took it into account when calculating
x and width).
2005-06-19 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtksizegroup.[hc]: Add an ignore-hidden property
with getter and setter. (#171612, Christian Neumair)
2005-06-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkuimanager.c (gtk_ui_manager_add_ui): Make this
work for inserting before/after an existing menuitem or
toolitem. (#155946, Christian Persch)
* tests/testmerge.c (delayed_toggle_dynamic): Test the
"insert after" functionality of gtk_ui_manager_add_ui.
2005-06-18 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): undo merging
of the separate loop setting cell data with cell drawing loop
(introduced in revision 1.280), since this breaks focus handling
wrt special cells.
Sat Jun 18 04:22:51 2005 Manish Singh <yosh@gimp.org>
* gdk/gdkcursor.h: remove GDK_CURSOR and GDK_IS_CURSOR, instance
checks don't work on boxed types.
* gdk/x11/gdkcursor-x11.c:
* gdk/gdkcursor.c: make return_if_fail checks != NULL instead of
GDK_IS_CURSOR.
2005-06-17 Matthias Clasen <mclasen@redhat.com>
Support the ICCCM urgency hint. (#61858, Havoc Pennington)
* gtk/gtk.symbols:
* gtk/gtkwindow.[hc]: Add a GtkWindow::urgency-hint property
with getter and setter.
* gdk/gdk.symbols:
* gdk/gdkwindow.h:
* gdk/x11/gdkwindow-x11.c (gdk_window_set_urgency_hint):
Add a setter for the urgency hint.
* gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Store
urgency hint here.
* gdk/x11/gdkwindow-x11.c (update_wm_hints): Set the urgency
hint in the WM_HINTS property when appropriate.
2005-06-17 Kristian Rietveld <kris@gtk.org>
Fix#160281, testcase from Peter Bloomfield.
* gtk/gtktreeview.c (do_presize_handler): always size request
and update adjustments in fixed height mode,
(gtk_tree_view_build_tree): if a fixed height is set, set this
height on newly added nodes.
2005-06-17 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkdnd-win32.c (gdk_dropfiles_filter): Set the actions
and suggested_action fields in the GdkDragContext to
GDK_ACTION_COPY. Otherwise apps that check the suggested_action
field, like eog, won't accept dropped files.
2005-06-17 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkcursor-x11.c:
* gdk/gdkcursor.c: Improve some return_if_fail checks,
and add the missing non-Xcursor fallback for
_gdk_x11_cursor_update_theme(), noticed by Jeroen
Zwartepoorte.
2005-06-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentrycompletion.c (gtk_entry_completion_complete):
Resize the popup if necessary. (#308076, Vincent Noel)
2005-06-17 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkwindow.c (gtk_window_real_set_focus): Queue a
draw on the old and new focus widgets, if their defaultness
changes. (#305607, Billy Biggs)
2005-06-17 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): make sure the row
above 'above_path' is always in a validated state, so it does
not mess up scrolling. (#303319, testcase from Billy Biggs).
2005-06-17 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkprivate-x11.h:
* gdk/x11/gdkcursor-x11.c: Handle cursor theme changes
for cached cursors which are not associated with a window
at the time of the theme change, by storing a serial
number in each cursor, and updating the theme_serial
counter whenever the cursor theme changes.
* gdk/x11/gdkcursor-x11.c (_gdk_x11_cursor_update_theme):
Private function to update a cursor to the current
cursor theme if necessary.
* gdk/x11/gdkmain-x11.c (gdk_pointer_grab):
* gdk/x11/gdkwindow-x11.c (gdk_window_set_cursor): Call
_gdk_x11_cursor_update_theme() here.