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)
2006-03-29 Emmanuele Bassi <ebassi@cvs.gnome.org>
Import GtkRecent* from libegg.
* gtk/gtkrecentmanager.[ch]: Add GtkRecentManager, an object
for managing a list of recently used resources.
* gtk/gtkrecentchooser.[ch]:
* gtk/gtkrecentchooserdefault.[ch]:
* gtk/gtkrecentchooserdialog.[ch]:
* gtk/gtkrecentchoosermenu.[ch]:
* gtk/gtkrecentchooserprivate.h:
* gtk/gtkrecentchooserutils.[ch]:
* gtk/gtkrecentchooserwidget.[ch]: Add GtkRecentChooser, a
GTypeInterface for widgets implementing viewers for recently
used resources.
* gtk/gtkrecentfilter.[ch]: GtkRecentFilter, a filter object
for GtkRecentChooser implementations.
* gtk/gtk.h:
* gtk/gtk.symbols:
* gtk/Makefile.am: Build glue for GtkRecent*.