Before this patch, unsetting the filter manually before disposing
the recent chooser menu (or unsetting the filter twice), would cause
warnings (or invalid memory accesses).
* gtk/gtk.symbols:
* gtk/gtkactivatable.[hc]: Rename gtk_activatable_reset to
gtk_activatable_sync_action_properties, since the previous name
was deemed too generic. Update all implementations.
svn path=/trunk/; revision=22389
Rework the way actions and proxies interact, to make the
interaction less ad hoc, more extensible, and better suited
for support in GUI builders like glade.
To be used as a proxy, a widget must now implement the
GtkActivatable interface, and GtkActivatable implementations
are responsible for syncing their appearance with the action
and for activating the action.
All the widgets that are commonly used as proxies implement
GtkActivatable now.
Patch by Tristan van Berkom.
* gtk/gtkactivatable.[hc]: The GtkActivatable interface.
* gtk/gtkbutton.c:
* gtk/gtktogglebutton.c:
* gtk/gtktoolitem.c:
* gtk/gtktoolbutton.c:
* gtk/gtktoggletoolbutton.c:
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkimagemenuitem.c:
* gtk/gtkradiomenuitem.c:
* gtk/gtkrecentchooserprivate.h:
* gtk/gtkrecentchooser.c:
* gtk/gtkrecentchooserdefault.c:
* gtk/gtkrecentchoosermenu.c: Implement GtkActivatable.
* gtk/gtkaction.[hc]: Move appearance synchronization to
GtkActivatable implementations.
* gtk/gtkradioaction.c:
* gtk/gtkrecentaction.c:
* gtk/gtktoggleaction.c:
* gtk/gtkactiongroup.c: Adapt.
* gtk/gtk.h: Include gtkactivatable.h
* gtk/gtk.symbols: Add new functions
svn path=/trunk/; revision=22195
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2008-04-18 Michael Natterer <mitch@imendio.com>
* gtk/gtkicontheme.h
* gtk/gtkrecentmanager.h: include <gdk/gdk.h> instead of
<gdk/gdkscreen.h>.
* gtk/gtkbuilderparser.c
* gtk/gtklinkbutton.c
* gtk/gtkpreview.c
* gtk/gtkrecentchooserdefault.c
* gtk/gtkrecentchoosermenu.c
* modules/input/gtkimcontextthai.c: remove inclusion of single
files from gdk, none of the includes was actually needed.
svn path=/trunk/; revision=20023
2008-02-11 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c:
(gtk_recent_chooser_menu_constructor): Set no-show-all flag
on the placeholder menu item.
* tests/testrecentchoosermenu.c:
(create_recent_chooser_menu): Use gtk_widget_show_all() to test
whether the placeholder menu item gets shown.
svn path=/trunk/; revision=19509
2007-07-23 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchooserdefault.c: Port the GtkRecentChooser default
implementation widget to the new tooltips API, and make it look
like the GtkFileChooser widget in recent files mode (move the
full path from the widget to a tooltip on the row) to improve
consistency.
* gtk/gtkrecentchoosermenu.c: Port the GtkRecentChooserMenu widget
to the new tooltips API.
* tests/testrecentchooser.c:
* tests/testrecentchoosermenu.c: Exercise the tooltips code paths.
svn path=/trunk/; revision=18526
2007-07-20 Matthias Clasen <mclasen@redhat.com>
Apply a patch by Emmanuele Bassi to limit the number
of shown recent files. (#439715)
* gtk/gtksettings.c: Add a setting for the number
of recent files to display by default.
* gtk/gtkrecentchooserdefault.c:
* gtk/gtkfilechooserdefault.c: Respect the limit.
* gtk/gtkrecentmanager.c: Remove the poll timeout in
dispose, and do not stat more often than every 5 seconds.
* gtk/gtkrecentchooserutils.c:
* gtk/gtkrecentchoosermenu.c: Cleanups
* tests/testrecentchoosermenu.c: Test limits.
svn path=/trunk/; revision=18510
2007-07-04 Chris Wilson <chris@chris-wilson.co.uk>
* gtk/gtkrecentchoosermenu.c (idle_populate_func),
(idle_populate_clean_up), (gtk_recent_chooser_menu_populate):
Remove a surplus GDK_THREADS_LEAVE() and avoid a potential use after
free in the source destroy notify. (#453033)
svn path=/trunk/; revision=18375
2007-03-15 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchooserprivate.h:
* gtk/gtkrecentchooserutils.c: Move filtering of the recent
files list into the shared implementation; do the filtering
before the sorting, so that we always clamp on the desired
size. (#418219)
* gtk/gtkrecentchoosermenu.c: Remove the filtering of the
list, as it's already been done.
* gtk/gtkrecentchooserdefault.c: Ditto; also remove the
GtkTreeModelFilter: just reload the view if the sorting and
filtering properties change.
* gtk/testrecentchoosermenu.c: Exercise the limit property.
svn path=/trunk/; revision=17516
2007-03-14 Emmanuele Bassi <ebassi@gnome.org>
Various clean ups in the GtkRecent code. (see #338843)
* gtk/gtkrecentchooserdefault.c:
* gtk/gtkrecentchoosermenu.c:
* gtk/gtkrecentchooserprivate.h:
* gtk/gtkrecentchooserutils.c: Move the recent chooser function
for getting the sorted and clamped list of recent files from the
manager outside the implementations.
* gtk/gtkrecentchooserdefault.c (chooser_set_sort_type): Repopulate
the list when the sorting order changes.
(gtk_recent_chooser_default_dispose),
(gtk_recent_chooser_default_finalize): Move object unref and
source removal from finalize to dispose.
* gtk/gtkrecentchooser.c (gtk_recent_chooser_type_init): Relax the
prerequisite for the GtkRecentChooser interface implementations,
from GtkObject to GObject.
(gtk_recent_chooser_class_init): Use GTK_PARAM_* instead of
G_PARAM_*
svn path=/trunk/; revision=17514
2007-02-10 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c: Fix the english of the comment;
remove some type checking; use better variable naming for the
internal menu item markers.
svn path=/trunk/; revision=17284
2007-02-09 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c: Add support for both prepending
and appending custom menu items.
(gtk_recent_chooser_menu_constructor): Add a placeholder menu
item for the empty menu case, and for giving us a starting
point for the recent items populating process.
(gtk_recent_chooser_menu_insert_item),
(gtk_recent_chooser_menu_dispose_items): Insert an item at
the position following the placeholder (and find that position
if needed).
(idle_populate_func), (idle_populate_clean_up): Show the
placeholder menu item, instead of creating one each time.
(gtk_recent_chooser_menu_populate): Kill some indirections
and hide the placeholder before populating the menu.
(set_recent_manager): Remember to remove the idle population
source if the manager changes.
* tests/testrecentchoosermenu.c: Test the appending and
prepending of the menu items to the recent chooser menu
widget.
svn path=/trunk/; revision=17281
2007-02-08 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c (idle_populate_func): Keep count
of the displayed items to build the menu items mnemonic instead
of the overall item count. (#377164)
(idle_populate_clean_up): Append a menu item if all the items
got filtered in the idle populate function. (#405696)
svn path=/trunk/; revision=17277
2007-01-15 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c: Ellipsize the menu items label
if they grow too much. (#357303)
svn path=/trunk/; revision=17156
2007-01-08 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c (gtk_recent_chooser_menu_create_item):
Don't leak the icon pixbuf after setting it to the image menu
item. Found by Paolo Borelli.
svn path=/trunk/; revision=17119
2006-12-31 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c (set_recent_manager): Use the
right object when disconnecting from the GtkRecentManager::changed
signal; save us a few indirections using a variable.
svn path=/trunk/; revision=16999
2006-12-31 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c: Move the signal and idle
disconnections into the dispose function, as well as the
object unrefs; reset every handler id and the
pointers. (suggested by Paolo Borelli, #390873)
svn path=/trunk/; revision=16997
2006-11-16 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c:
(gtk_recent_chooser_menu_add_tip): Apply the tip only
if we have a displayable name for the item. (#365031,
patch by padraig.obriain(at)sun.com)
2006-11-16 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentmanager.c: Provide a fast path returning
NULL when the limit is set to 0.
* gtk/gtkrecentchooserdefault.c:
* gtk/gtkrecentchoosermenu.c: Add the same fast path
inside the RecentChooser implementation; add a check
in the list clamping code. (#373466 and duplicates)
2006-08-29 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c
(gtk_recent_chooser_menu_set_current_item): Break when an item
is found and activated. (#353449, based on a patch by Jan Arne
Petersen)
2006-08-14 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchooser.c:
(gtk_recent_chooser_add_filter),
(gtk_recent_chooser_remove_filter),
(gtk_recent_chooser_set_filter): Add a check on the
filter argument, instead of blindly passing it to
underlying implementation.
* gtk/gtkrecentchoosermenu.c:
(gtk_recent_chooser_menu_add_filter),
(gtk_recent_chooser_menu_remove_filter),
(gtk_recent_chooser_menu_list_filters): Implement
these GtkRecentChooser methods, by setting and
returning the only GtkRecentFilter object supported
by a GtkRecentChooserMenu. (#347856, reported by Rod
Butcher)
2006-08-10 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c:
(gtk_recent_chooser_menu_finalize): Remove the idle
source in ::finalize...
(idle_populate_func),
(idle_populate_clean_up): ...and reset the idle source
id at the end of the idle loop while we hold the GDK mutex
lock. (#350605, reported by Wouter Bolsterlee, patch by
Chris Wilson)
2006-08-07 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchooserdefault.c:
(_gtk_recent_chooser_default_init): Show non existing
resources by default.
(recent_meta_data_func): Do not mark non existing
resources as insensitive.
* gtk/gtkrecentchoosermenu.c:
(gtk_recent_chooser_menu_init): Show non existing
resources by default.
(gtk_recent_chooser_menu_create_item): Do not mark
non existing resources as insensitive.
2006-08-03 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchoosermenu.c:
(set_recent_managet), (gtk_recent_chooser_menu_populate),
(idle_populate_func), (idle_populate_clean_up),
(manager_changed_cb): Lazily populate the menu when creating
it and after the manager emits the "changed" signal; this
fixes the initial bad placing of the GtkRecentChooserMenu
widget when its set as the menu of a GtkMenuToolButton.
(gtk_recent_chooser_menu_map),
(gtk_recent_chooser_menu_class_init): Remove the ::map method
override, since it's not needed anymore.
2006-06-11 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchooserdefault.c
(get_is_recent_filtered):
* gtk/gtkrecentchoosermenu.c
(get_is_recent_filtered):
Do not leak the groups string vector. (#344607,
John Finlay)
2006-06-10 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrecentchooserwidget.c
(gtk_recent_chooser_widget_new_for_manager):
* gtk/gtkrecentchoosermenu.c
(gtk_recent_chooser_menu_new_for_manager):
Allow NULL to mean the default manager. (#344530,
John Finlay)