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.
2005-06-17 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (validate_visible_area): don't try to update
the top_row rowref ourselves here, but just have _dy_to_top_row()
do it,
(gtk_tree_view_scroll_to_cell): handle scrolling via
validate_visible_area() if the treeview is not visible or needs
reallocation. (#165246, Nickolay V. Shmyrev).
2005-06-17 Kristian Rietveld <kris@gtk.org>
Fixes#307914 (Alexander Larsson), fixing some breakage caused
by my previous commit.
* gtk/gtktreeview.c (validate_visible_area): force dy to be zero
when it fits on a single page,
(scroll_sync_handler): same here.
Thu Jun 16 15:33:42 2005 Manish Singh <yosh@gimp.org>
* gdk/x11/gdkcursor-x11.c (update_cursor): remove unused variable.
* gdk/x11/gdkwindow-x11.c (_gdk_x11_window_get_cursor): use
g_return_val_if_fail.
* gtk/gtkdnd.c (gtk_drag_get_cursor): initialize hot_x and hot_y
for all cases.
* gtk/gtkfilechooserdefault.c (button_new): gtk_button_set_image
takes a GtkWidget, not a GtkImage.
2005-06-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (button_new): Simplify
the code and respect the show-button-images setting.
(#307941, Vincent Noel)
2005-06-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtksettings.c: Add two new settings,
gtk-cursor-theme-name and gtk-cursor-theme-size to
control the cursor theme.
* gdk/x11/gdkevents-x11.c: Add two new X settings,
Gtk/CursorThemeName and Gtk/CursorThemeSize, and map
these to the gtk settings.
* tests/testgtk.c (create_cursors): Add a cursor theme
testcase.
2005-06-15 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkwindow-x11.[hc]: Keep a reference to the
GdkCursor and add a private getter for it, so that we can
update the cursor when the cursor theme changes.
* gdk/gdk.symbols:
* gdk/x11/gdkx.h:
* gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme):
New function to change the cursor theme.
2005-06-14 Federico Mena Quintero <federico@ximian.com>
Merged from gtk-2-6:
Fix#302087:
* gtk/gtkfilechooserdefault.c (list_selection_changed): Emit
"selection-changed" and do the normal housekeeping even if we are
in SAVE mode and there is nothing selected. We didn't emit that
signal if we were in SAVE mode and unselect_all() got called.
(gtk_file_chooser_default_unselect_all): Call
pending_select_paths_free() so that we cancel any asynchronous
selections.
(gtk_file_chooser_default_set_current_name): Likewise.
2005-06-14 Federico Mena Quintero <federico@ximian.com>
Merged from gtk-2-6:
Fixes#307640:
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_should_respond): Oops, I broke SAVE
mode. If the parent path is a folder, only create a subfolder if
we are in CREATE_FOLDER mode; if we are in SAVE mode, just return
and respond. Also, pick up the case where the user types
"dirname/" instead of "dirname".
(check_save_entry): Make the return type void. Add some return
parameters so that we can do more thorough checking.
(gtk_file_chooser_default_get_paths): If the file part is empty
and we are in SAVE mode, return an empty selection.
2005-06-15 Kristian Rietveld <kris@gtk.org>
Patch for #163214 (reported by Tommi Komulainen) and fixes some
other scrolling/validation related bugs along the why.
* gtk/gtktreeview.c (gtk_tree_view_size_request): run
do_validate_rows once and don't queue a size request there,
(gtk_tree_view_size_allocate): don't update vadj value without
reason, sync top_row/dy after the window sizes and adjustments
are in sync again,
(validate_visible_area): always update dy when scrolling,
manually set top_row here after changing the vadj (don't depend
on _adjustment_changed and top_row/dy sync to do this), since we
now always set top_row here correctly, we can always free
scroll_to_path at the end which avoids infinite expose loops,
(do_validate_rows): add queue_resize boolean, remove top_row/dy
sync here, we cannot do it safely at this place since the
window sizes and adjustments are out of sync,
(validate_rows), (validate_rows_handler): update call to
do_validate_rows().
2005-06-14 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_name): Add a
stub for the no-Xcursor case. (noticed by Luis Villa)
2005-06-14 Matthias Clasen <mclasen@redhat.com>
Use named cursors for the DND cursors, the names are "dnd-none",
"dnd-copy", "dnd-link", "dnd-move" and "dnd-ask". Also use an RGBA
cursor instead of cursor+window when possible. This saves
roundtrips during the drag operation, and makes translucent icons
possible.
* gtk/gtkdndcursors.h: New file, containing inlined pixbufs
for the default dnd cursors.
* gtk/gtkdnd.c (struct _GtkDragSourceInfo): Store the cursors
used during the drag here, also store the icon pixbuf here.
* gtk/gtkdnd.c (drag_cursors): Store the cursor names here. Also
switch the default cursors from xbm to inlined pixbufs.
* gtk/gtkdnd.c (gtk_drag_get_cursor): This function now takes the
GtkDragSourceInfo as well, since it has to composite the
drag-specific cursors. The cursors combined from the image of
the themed cursor and the icon_pixbuf stored in the info.
* gtk/gtkdnd.c (gtk_drag_begin_internal): Don't set the default
icon if there is an icon_pixbuf, which will be composited into
the cursor later.
* gtk/gtkdnd.c (set_icon_stock_pixbuf): If appropriate, store
the pixbuf in the info struct for later compositing into the
cursor instead of creating an icon window.
* gtk/gtkdnd.c (gtk_drag_drop_finished): If we used an
RGBA cursor for the drag, and need to display the cancel
animation, construct the icon window here.
* gtk/gtkdnd.c (gtk_drag_source_info_destroy): Unref the
drag-specific cursors and the icon_pixbuf when done with
the drag.
2005-06-14 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcolorsel.c (make_picker_cursor): Use a named cursor
with the name "color-picker", when available.
2005-06-14 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
* gdk/gdkcursor.h:
* gdk/x11/gdkcursor-x11.c (gdk_cursor_get_image)
(gdk_cursor_new_from_name): New functions to construct named
cursors and to get the image used for a cursor.
2005-06-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkpathbar.[hc]: Rework the way in which rerooting of the
path bar is done, implementing the following principles:
(#137289, patch by Benjamin Otte)
1. Re-root only if $HOME is an ancestor of the current path.
2. When re-rooting, make sure the Left arrow appears in the path
bar, so that you can navigate up from $HOME to /. In that case,
make sure the Right arrow doesn't appear if the sub-hierarchy from
$HOME to the cwd fits in the window.
3. Make sure that hitting Alt-Up takes you always one folder up,
even when the path bar is re-rooted.
2005-06-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (model_update_current_folder):
Free the data of the row before overwriting it. (#307490,
Kjartan Maraas)
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-06-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcalendar.c (calendar_paint_header):
(gtk_calendar_size_request): Allow localization of the
format in which the year is displayed. (#135451, Paisa
Seeluangsawat)
2005-06-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilesystemunix.c: Support .hidden files. (#129170,
Sayamindu Dasgupta, patch by Jan Arne Petersen)
2005-06-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtkiconview.h:
* gtk/gtkiconview.c (gtk_icon_view_get_visible_range):
Add a function to determine what parts of the model are
visible. (#306726, Jonathan Blandford)
2005-06-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilesystemunix.c (create_file_info): Treat backup
files the same way as hidden files, to be closer to what
Nautilus does. (#136196, Sean Middleditch)
2005-06-10 Kjartan Maraas <kmaraas@gnome.org>
* gdk/gdkcairo.c: (gdk_cairo_set_source_pixbuf): Destroy the
cairo surface when done with it. Plugs a fairly large leak in
some cases.
==6014== 1999824 (115640 direct, 1884184 indirect) bytes in
826 blocks are definitely lost in loss record 25239 of 25250
Like this from nautilus.
2005-06-10 Michael Natterer <mitch@imendio.com>
* gtk/gtk.symbols
* gtk/gtkaction.[ch] (gtk_action_get_accel_closure): new function
to get an action's accel_closure (Fixes#141750 and #148106).
2005-06-10 Matthias Clasen <mclasen@redhat.com>
* gdk/gen-keyname-table.pl: Generate N_() calls for
translatable key names.
* gdk/keynames.txt: Mark some key names as translatable.
* gdk/keyname-table.h: Regenerated.
* gtk/gtkaccellabel.c (gtk_accel_label_class_init): Add
some context to the msg ids for keyboard modifiers and
key names.
(_gtk_accel_label_class_get_accelerator_label): Try to
translate key names. (#300224, Christian Rose)
2005-06-10 Federico Mena Quintero <federico@ximian.com>
Merged from gtk-2-6:
Fixes#162358:
* gtk/gtkfilechooserdefault.c (update_chooser_entry): Don't return
immediately if we are in CREATE_FOLDER mode, so that we can fill
the entry with the newly-selected folder.
(gtk_file_chooser_default_set_property): Warn against turning on
multiple selection for CREATE_FOLDER mode, or about setting that
action while multiple selection is on.
(update_chooser_entry): Change the entry's contents as well if we
are in CREATE_FOLDER mode. If nothing is selected, clear the
chooser entry.
(trap_activate_cb): Don't trap enter/space if modifiers are
pressed. This lets one use Ctrl-space to toggle rows in multiple
selection mode.
(gtk_file_chooser_default_should_respond): Clean up the if-chain
mess of special cases by using an array to determine what to do.
Also, for the save-entry case in CREATE_FOLDER mode, actually fix
the bug where the file chooser would switch to an existing folder
rather than confirming with it, and create the folder ourselves.
(error_creating_folder_over_existing_file_dialog): New function.
* gtk/gtkfilechooserentry.c (check_completion_callback): Only
insert the common prefix if we are in an "open" mode. Use a
helper function.
(append_common_prefix): New helper function; code moved over from
check_completion_callback().
(find_common_prefix): New helper function.
(gtk_file_chooser_entry_focus): Append the common prefix if the
user requests it explicitly.
2005-06-09 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkdnd-x11.c (motif_drop_start, xdnd_drop_filter): Update
the user time on the window when a drop happens. (#169364, Alexander
Hunziker, patch by Elijah Newren)
2005-06-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtkiconview.h:
* gtk/gtkiconview.c (gtk_icon_view_scroll_to_path): New function
to scroll to a path. (#306838, Jonathan Blandford)
2005-06-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search):
Don't crash if search_window is NULL. (#304914, Victor Osadci,
testcase by Olaf Vitters)
2005-06-05 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkscreen-win32.c
(_gdk_windowing_substitute_screen_number): Return NULL unless
screen number is zero. We have only one screen on Win32.
(gdk_screen_make_display_name): Call gdk_display_get_name() and
return that.
2005-06-05 Tor Lillqvist <tml@novell.com>
* modules/engines/Makefile.am
* modules/input/Makefile.am: Decide whether to build the
ms-windows theme engine based on the GDK backend, not based on
platform. (I.e., if building for Cygwin with the X11 backend, we
shouldn't build the ms-windows engine, but if building for Cygwin
but with the Win32 backend, we should.) Ditto for the IME
(Windows) input module. (#305832)
2005-06-04 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcursor-win32.c
* gdk/win32/gdkwindow-win32.c
* gdk/win32/gdkprivate-win32.h: Support full-colour cursors.
Support cursors with alpha on XP. Use code in common with the
support for alpha icons that already was present. (#306101, Tim
Evans)
2005-06-04 Tor Lillqvist <tml@novell.com>
* modules/engines/ms-windows/msw_style.c: Render insensitive icons
in a way that more closely matches Windows. (#305986, Tim Evans).
* modules/engines/ms-windows/Makefile.am (LDADDS): Link with
gdk-pixbuf.
2005-05-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.symbols:
* gtk/gtkentrycompletion.c: Add a property to suppress the
popup for single matches. (#154711)
* gtk/gtkentry.c (gtk_entry_completion_timeout): Respect it here.
* gtk/gtkfilechooserentry.c (_gtk_file_chooser_entry_set_action):
Use it here.
2005-05-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextbtree.c (_gtk_text_btree_tag): Queue the
redisplay after modifying the tag in the btree, otherwise
we end up showing the old tags until the next redraw comes
around. (#143537, Gary Kramlich)
2005-05-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_list_auto_scroll): Make
autoscrolling work at the bottom of the screen.
2005-05-26 Sven Neumann <sven@gimp.org>
* gtk/gtkselection.c (gtk_selection_data_set_pixbuf): use a less
aggressive PNG compression level (bug #305340).
2005-05-26 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkdrawable-win32.c (_gdk_win32_blit): If blitting
from the root window, take the multi-monitor offset into
account. (#305511)
2005-05-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): Draw the
background of rows insensitive when the treeview is insensitive.
(pointed out by Billy Biggs)
2005-05-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkselection.c (gtk_target_list_add_image_targets):
Make sure png comes first, otherwise dnd may use bmp by
default, loosing transparency.
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-24 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkproperty-win32.c (gdk_screen_get_setting): Handle
gtk-alternative-button-order (setting it to TRUE).