Various clean ups in the GtkRecent code. (see #338843)
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
This commit is contained in:
committed by
Emmanuele Bassi
parent
4b3364ccc9
commit
86ea351bd7
@ -56,7 +56,7 @@ gtk_recent_chooser_get_type (void)
|
||||
(GClassInitFunc) gtk_recent_chooser_class_init,
|
||||
0, NULL, 0);
|
||||
|
||||
g_type_interface_add_prerequisite (chooser_type, GTK_TYPE_OBJECT);
|
||||
g_type_interface_add_prerequisite (chooser_type, G_TYPE_OBJECT);
|
||||
}
|
||||
|
||||
return chooser_type;
|
||||
@ -112,43 +112,43 @@ gtk_recent_chooser_class_init (gpointer g_iface)
|
||||
P_("Recent Manager"),
|
||||
P_("The RecentManager object to use"),
|
||||
GTK_TYPE_RECENT_MANAGER,
|
||||
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
|
||||
GTK_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
|
||||
g_object_interface_install_property (g_iface,
|
||||
g_param_spec_boolean ("show-private",
|
||||
P_("Show Private"),
|
||||
P_("Whether the private items should be displayed"),
|
||||
FALSE,
|
||||
G_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE));
|
||||
g_object_interface_install_property (g_iface,
|
||||
g_param_spec_boolean ("show-tips",
|
||||
P_("Show Tooltips"),
|
||||
P_("Whether there should be a tooltip on the item"),
|
||||
FALSE,
|
||||
G_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE));
|
||||
g_object_interface_install_property (g_iface,
|
||||
g_param_spec_boolean ("show-icons",
|
||||
P_("Show Icons"),
|
||||
P_("Whether there should be an icon near the item"),
|
||||
TRUE,
|
||||
G_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE));
|
||||
g_object_interface_install_property (g_iface,
|
||||
g_param_spec_boolean ("show-not-found",
|
||||
P_("Show Not Found"),
|
||||
P_("Whether the items pointing to unavailable resources should be displayed"),
|
||||
FALSE,
|
||||
G_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE));
|
||||
g_object_interface_install_property (g_iface,
|
||||
g_param_spec_boolean ("select-multiple",
|
||||
P_("Select Multiple"),
|
||||
P_("Whether to allow multiple items to be selected"),
|
||||
FALSE,
|
||||
G_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE));
|
||||
g_object_interface_install_property (g_iface,
|
||||
g_param_spec_boolean ("local-only",
|
||||
P_("Local only"),
|
||||
P_("Whether the selected resource(s) should be limited to local file: URIs"),
|
||||
TRUE,
|
||||
G_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE));
|
||||
g_object_interface_install_property (g_iface,
|
||||
g_param_spec_int ("limit",
|
||||
P_("Limit"),
|
||||
@ -156,20 +156,20 @@ gtk_recent_chooser_class_init (gpointer g_iface)
|
||||
-1,
|
||||
G_MAXINT,
|
||||
-1,
|
||||
G_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE));
|
||||
g_object_interface_install_property (g_iface,
|
||||
g_param_spec_enum ("sort-type",
|
||||
P_("Sort Type"),
|
||||
P_("The sorting order of the items displayed"),
|
||||
GTK_TYPE_RECENT_SORT_TYPE,
|
||||
GTK_RECENT_SORT_NONE,
|
||||
G_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE));
|
||||
g_object_interface_install_property (g_iface,
|
||||
g_param_spec_object ("filter",
|
||||
P_("Filter"),
|
||||
P_("The current filter for selecting which resources are displayed"),
|
||||
GTK_TYPE_RECENT_FILTER,
|
||||
G_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE));
|
||||
}
|
||||
|
||||
GQuark
|
||||
|
||||
Reference in New Issue
Block a user