Recognize negative column indices as invalid. (#415260, Chris Wilson)
2007-04-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkliststore.c (gtk_list_store_set_valist_internal):
* gtk/gtktreestore.c (gtk_tree_store_set_valist_internal):
Recognize negative column indices as invalid. (#415260,
Chris Wilson)
Ronald Bultje [Sat, 28 Apr 2007 18:14:19 +0000 (18:14 +0000)]
fix two more potential races that could happen when an application is
2007-04-28 Ronald Bultje <rbultje@ronald.bitfreak.net>
* gdk/quartz/gdkeventloop-quartz.c: (select_thread_func),
(poll_func): fix two more potential races that could happen when
an application is polling in the mainloop and a separate thread
tries to wake it up using g_idle_add(). Fixes #425271 comment 5.
Rember the user input that triggered the completion, add
API to the retrieve it and reset the entry contents to it
if the user cancels the tentative completion during
the inline-selection.
When enabled cursor-match is emited when the cursor is on
a possible completion on the list. The default implementation
will replace the contents on the entry with the contents of
the text column in the completion model.
Michael Natterer [Fri, 27 Apr 2007 14:49:37 +0000 (14:49 +0000)]
Merged heavily modified patch from maemo-gtk which enables opening and
2007-04-27 Michael Natterer <mitch@imendio.com>
Merged heavily modified patch from maemo-gtk which enables opening
and closing submenus on click, and introduces some usability
changes when gtk-touchscreen-mode is enabled (bug #128968):
* gtk/gtkmenushell.c (struct GtkMenuShellPrivate): added boolean
"activated_submenu" to indicate that the current mouse operation
(click or drag) has opened a submenu.
(gtk_menu_shell_button_press): pop up submenus without delay
and record the fact in "activated_submenu".
(gtk_menu_shell_button_release): if a submenu was explicitely
opened, or not opened by this release's button_press, or enough
time has passed since timeout-opening it, close the submenu here.
(gtk_menu_shell_enter_notify): when entering a menu item with
any mouse button pressed, open its submenu.
(gtk_real_menu_shell_move_current): in touchsreen mode, close the
submenu when moving the focus away from it via keyboard-navigation.
* gtk/gtkmenuitem.[ch] (_gtk_menu_item_popup_submenu): added
parameter "gboolean with_delay" so GtkMenuShell can control this
for the different scenarios of submenu showing.
(_gtk_menu_item_popdown_submenu): new function. also needed by
GtkMenuShell for closing submenus on click.
Renamed internal function gtk_menu_item_select_timeout() to
gtk_menu_item_popup_timeout().
(gtk_menu_item_real_popup_submenu): new utility function which
does the actual popup and records the exact time of the popup when
the menu was timeout-opened (using g_get_current_time()).
(gtk_real_menu_item_select): don't add the popup timeout when in
touchscreen mode.
* gtk/gtkmenu.c (gtk_menu_popup): in touchscreen mode, select the
first item of every opened menu.
Add a simple validation demo. Make it possible to add arbitrary children
2007-04-26 Matthias Clasen <mclasen@redhat.com>
* demo/gtk-demo/combobox.c: Add a simple validation demo.
* gtk/gtkcomboboxentry.c: Make it possible to add arbitrary
children to a GtkComboBoxEntry. (#426401, Paul Pogonyshev)
Tor Lillqvist [Thu, 26 Apr 2007 06:23:36 +0000 (06:23 +0000)]
Remove old child of scrolled window before adding a new one when switching
2007-04-26 Tor Lillqvist <tml@novell.com>
* gtk/gtkinputdialog.c (gtk_input_dialog_fill_axes)
(gtk_input_dialog_fill_keys): Remove old child of scrolled window
before adding a new one when switching what input device is being
handled. (#399425)
Michael Natterer [Wed, 25 Apr 2007 12:11:08 +0000 (12:11 +0000)]
fix ACTIVE state of scroll buttons (we were setting the state to ACTIVE
2007-04-25 Michael Natterer <mitch@imendio.com>
* gtk/gtkmenu.c (gtk_menu_handle_scrolling): fix ACTIVE state of
scroll buttons (we were setting the state to ACTIVE but
immediately overwriting it with NORMAL or PRELIGHT). Also got rid
of many separate calls to gdk_window_invalidate_rect() by
remembering the old button state and only invalidating the area if
the state has changed (addresses parts of bug #433242, Tommi
Komulainen).
(gtk_menu_scroll_to): change the arrow states only if changing
from or to INSENSITIVE state, so we don't overwrite the ACTIVE
state set by above function.
Parse half-open ranges like -2 or 3-, and be a bit more liberal about
2007-04-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprintunixdialog.c (dialog_get_page_ranges): Parse
half-open ranges like -2 or 3-, and be a bit more liberal
about whitespace.
(dialog_set_page_ranges): Support half-open ranges.
* gtk/gtkprintoperation.c (print_pages_idle): Substitute the
number of pages in half-open ranges.
(preview_iface_is_selected): Support half-open ranges here, too.
Richard Hult [Wed, 18 Apr 2007 20:09:55 +0000 (20:09 +0000)]
Refactor the process updates functions to share code between them. Also
2007-04-18 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_quartz_process_updates_internal),
(gdk_window_quartz_process_all_updates),
(gdk_window_impl_quartz_process_updates): Refactor the process
updates functions to share code between them. Also fixes bug
#427660 by not updating larger regions than necessary.
Fix a leak by not increasing the refcount of the GtkRecentInfo object when
2007-04-18 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentmanager.c (gtk_recent_manager_lookup_item): Fix
a leak by not increasing the refcount of the GtkRecentInfo
object when returning it (thanks to Matthias Clasen).
fixed wrong g_convert_with_fallback() call which caused
2007-04-14 Yevgen Muntyan <muntyan@tamu.edu>
* gtk/gtkselection.c (selection_get_text_plain): fixed
wrong g_convert_with_fallback() call which caused
gtk_selection_data_get_text() return invalid UTF-8 for
non-ASCII text in text/plain selection (#382824).
Chris Wilson [Wed, 11 Apr 2007 17:48:20 +0000 (17:48 +0000)]
Switch over to use glib's new g_hash_table_get_keys() rather than our own
2007-04-11 Chris Wilson <chris@chris-wilson.co.uk>
* gtk/gtkiconfactory.c (_gtk_icon_factory_list_ids):
* gtk/gtkstock.c (gtk_stock_list_ids):
Switch over to use glib's new g_hash_table_get_keys() rather
than our own static implementation.
Ronald Bultje [Wed, 11 Apr 2007 11:08:22 +0000 (11:08 +0000)]
Protect the polling thread setup and shutdown function by mutexes and read
* gdk/quartz/gdkeventloop-quartz.c: Protect the polling thread
setup and shutdown function by mutexes and read the wakeup
pipe unconditionally and unblocking. This should make the main
loop always be woken up when using g_idle_add() from another
thread in the Quartz backend (#425271).
Change the XSettingsWatchFunc to return a Bool to indicate success. Update
2007-04-10 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/xsettings-client.[hc]: Change the XSettingsWatchFunc
to return a Bool to indicate success. Update callers and
implementors. Based on a patch by Owen Taylor.
* gdk/x11/gdkevents-x11.c (gdk_xsettings_watch_cb): Don't
leak a reference to gdkwin.
Richard Hult [Fri, 6 Apr 2007 21:12:48 +0000 (21:12 +0000)]
Clean up namespaces to make the code more maintainable.
2007-04-06 Richard Hult <richard@imendio.com>
* gdk/quartz/: Clean up namespaces to make the code more
maintainable.
* gdk/quartz/gdkdrawable-quartz.c:
* gdk/quartz/gdkgc-quartz.c: Fix bug #418384, alignment of tiled
images, by setting the pattern phase for the CG pattern.
* gtk/gtktooltip.c (tooltip_browse_mode_expired),
(gtk_tooltip_hide_tooltip), (tooltip_popup_timeout),
(gtk_tooltip_start_delay): use new gdk_threads API.
Don't set metrics-hinting font option. Rely on the default value which is
2007-04-03 Behdad Esfahbod <behdad@gnome.org>
* gtk/gtksettings.c (settings_update_font_options): Don't set
metrics-hinting font option. Rely on the default value which is
on for all raster cairo surfaces. (#425985)
Revert to non-xinerama mode when XineramaQueryScreens returns NULL; patch
2007-04-03 Loïc Minier <lool@dooz.org>
* gdk/x11/gdkscreen-x11.c: (check_xfree_xinerama): Revert to
non-xinerama mode when XineramaQueryScreens returns NULL; patch from
Simon McVittie; #425786.
remove artifact from the time when type checking casts warned on NULL,
2007-04-02 Michael Natterer <mitch@imendio.com>
* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): remove
artifact from the time when type checking casts warned on NULL,
some whitespace cleanup.
Patch from Matthias to add support for the _NET_WM_USER_TIME_WINDOW EWMH
2007-03-31 Elijah Newren <newren gmail com>
* gdk/x11/gdkwindow-x11.c (setup_toplevel_window,
gdk_x11_window_set_user_time):
Patch from Matthias to add support for the
_NET_WM_USER_TIME_WINDOW EWMH protocol; see #354213.
WARNING: This patch will make metacity <= 2.18.0 freeze on
workspace switch. This is due to a weird problem that should only
affect window managers using gdk in-process for decoration drawing
and which make an unsafe assumption relating to doing so (i.e. it
should only affect metacity). Upgrade your version of metacity if
you hit this bug.
Michael Natterer [Thu, 29 Mar 2007 15:47:49 +0000 (15:47 +0000)]
Don't close menus on clicks on their border area (bug #423761). (modified
2007-03-29 Michael Natterer <mitch@imendio.com>
Don't close menus on clicks on their border area (bug #423761).
(modified patch from maemo-gtk).
* gtk/gtkmenu.c (gtk_menu_button_press)
(gtk_menu_button_release): bail out early if the click was on the
menu's border (not on any item and not outside the window).
(pointer_in_menu_window): new utility function which checks if
passed root coords are inside the menu_shell or one of its
parent shells.
Michael Natterer [Thu, 29 Mar 2007 08:14:22 +0000 (08:14 +0000)]
get rid of local GtkSettings variables by moving gtk_widget_get_settings()
2007-03-29 Michael Natterer <mitch@imendio.com>
* gtk/gtkmenu.c: get rid of local GtkSettings variables by moving
gtk_widget_get_settings() into the g_object_get() call. Some small
indentation fixes.
Tim Janik [Wed, 28 Mar 2007 13:29:17 +0000 (13:29 +0000)]
applied JPEG loader fix from maemo. this fix makes sure stop_load()
Wed Mar 28 15:27:35 2007 Tim Janik <timj@imendio.com>
* io-jpeg.c: applied JPEG loader fix from maemo. this fix makes sure
stop_load() doesn't forget about its return value, and it pulls the
check for infinite looping out of an else branch in load_increment()
so it runs unconditionally, fixes #397643.
don't unref tooltip_window, since this is handled by set_qdata_full()
2007-03-28 Kristian Rietveld <kris@imendio.com>
* gtk/gtkwidget.c (gtk_widget_set_tooltip_window): don't unref
tooltip_window, since this is handled by set_qdata_full() already.
(#412001, Torsten Schoenfeld).
calculate the depth with the corrected real_cell_area and don't subtract
2007-03-24 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
calculate the depth with the corrected real_cell_area and don't
subtract horizontal_separator/2.
Rodney Dawes [Wed, 21 Mar 2007 19:31:01 +0000 (19:31 +0000)]
Add a new API call gtk_icon_theme_list_contexts so that one can choose
2007-03-21 Rodney Dawes <dobey@novell.com>
* gtk/gtk.symbols:
* gtk/gtkicontheme.[ch]:
* docs/reference/gtk/gtk-sections.txt:
* tests/testicontheme.c:
Add a new API call gtk_icon_theme_list_contexts so that one can
choose icons from a theme by context (#420719)
* gtk/gtktreeview.c (gtk_tree_view_clamp_column_visible): add
focus_to_cell parameter, rework to handle clamping columns which
are bigger than the available page size better,
(gtk_tree_view_key_press): remove code handling moving the focus
to other column headers,
(gtk_tree_view_header_focus): add clamp_column_visible parameter,
fix RTL support, don't wrap around when moving focus to other
column headers, call gtk_tree_view_clamp_column_visible() instead
of duplicating code,
(gtk_tree_view_focus): only clamp the column visible when we are
explicitly moving to another column header (fixes #399555, Charles
Kerr),
(gtk_tree_view_move_cursor_left_right): update call to
gtk_tree_view_clamp_column_visible().