gtk.RecentChooserMenu
and gtk.RecentChooserDialog
(new in PyGTK 2.10)
|
gtk.RecentChooserMenu
and gtk.RecentChooserDialog
(new in PyGTK 2.10)
class gtk.RecentChooser: |
|
def callback( | |
def callback( |
gtk.RecentChooser
is an interface that can be implemented by widgets displaying the list
of recently used files. In PyGTK, the main objects that implement this
interface are gtk.RecentChooserWidget
,
gtk.RecentChooserDialog
and gtk.RecentChooserMenu
.
Recently used files are supported since GTK+ 2.10.
def set_show_private(show_private
)
| if True show private
items |
This method is available in PyGTK 2.10 and above.
Sets the "show-private" property to the value of
show_private
. If
show_private
is True
show
recently used resources marked registered as private.
def get_show_private()
Returns : | True if the recent chooser
should show private items. |
This method is available in PyGTK 2.10 and above.
Returns True
if recently used resources
registered as private should be displayed.
def set_show_not_found(show_not_found
)
| if True show the local items
we didn't find |
This method is available in PyGTK 2.10 and above.
Sets the "show-not'found" property to the value specified by
show_not_found
. If
show_not_found
is True
,
display the recently used resources that it didn't find. This only
applies to local resources.
def get_show_not_found()
Returns : | True if the resources not
found should be displayed. |
This method is available in PyGTK 2.10 and above.
Returns True
if the recently used resources
that were not found shoudl be shown.
def set_select_multiple(select_multiple
)
| if True more than one item
can be selected |
This method is available in PyGTK 2.10 and above.
Sets the "select-multiple" property to the value of
select_multiple
. If
select_mulitple
is True
multiple items can be selected.
def get_select_multiple()
Returns : | True if more than one item
can be selected. |
This method is available in PyGTK 2.10 and above.
Returns True
if multiple items can be
selected.
def set_limit(limit
)
| a positive integer, or -1 for all items |
This method is available in PyGTK 2.10 and above.
Sets the number of items that should be returned by the gtk.RecentChooser.get_items()
and gtk.RecentChooser.get_uris()
methods.
def get_limit()
Returns : | A positive integer, or -1 meaning that all items are returned. |
This method is available in PyGTK 2.10 and above.
Returns the number of items that can be returned by the gtk.RecentChooser.get_items()
and gtk.RecentChooser.get_uris()
methods.
def set_local_only(local_only
)
| if True only local files can
be shown |
This method is available in PyGTK 2.10 and above.
Sets the "local-only" property to the value of
local_only
. If
local_only
is True
only
local resources, that is resources using the file:// URI scheme,
should be shown in the recently used resources selector. If
local_only
is True
(the
default) then the resources shown are guaranteed to be accessible
through the operating system native file system.
def get_local_only()
Returns : | True if only local resources
should be shown. |
This method is available in PyGTK 2.10 and above.
Returns True
if only local resources should
be shown in the recently used resources selector. See the gtk.RecentChooser.set_local_only()
method.
def set_show_tips(show_tips
)
| if True tooltips should be
shown |
This method is available in PyGTK 2.10 and above.
Sets the "show-tips" property to the value of
show_tips
. If show_tips
is True
, show a tooltips on the widget.
def get_show_tips()
Returns : | True if the recent chooser
should show tooltips. |
This method is available in PyGTK 2.10 and above.
Returns True
if tooltips should be
displayed.
def set_show_numbers(show_numbers
)
| if True show
numbers |
This method is available in PyGTK 2.10 and above.
Sets the "show-number" property to the value of
show_numbers
. If
show_numbers
is True
, show
recently used resources prepended by a unique number.
def get_show_numbers()
Returns : | True if the recent chooser
should show display numbers. |
This method is available in PyGTK 2.10 and above.
Returns True
if recently used resources
should be displayed prepended by a unique number.
def set_show_icons(show_icons
)
| if True show an icon near
the resource |
This method is available in PyGTK 2.10 and above.
Sets the "show-icon" property to the value of
show_icon
. If show_icon
is True
, show an icon near the resource when
displaying it.
def get_show_icons()
Returns : | True if the icons should be
displayed. |
This method is available in PyGTK 2.10 and above.
Returns True
if an icon should be shown near
the resource.
def set_sort_type(sort_type
)
| the sort order that the chooser should use - one of the GTK Recent Sort Type Constants |
This method is available in PyGTK 2.10 and above.
Sets the sorting order of the recently used resources list to the value specified by sort_type which must be one of the GTK Recent Sort Type Constants.
def get_sort_type()
Returns : | the sorting order - one of the GTK Recent Sort Type Constants. |
This method is available in PyGTK 2.10 and above.
Returns the value set by the gtk.RecentChooser.set_sort_type()
method..
def set_sort_func(sort_func
, sort_data
=None)
| the comparison function |
| user data to pass to sort_func , or None |
This method is available in PyGTK 2.10 and above.
Sets the comparison function specified by
sort_func
to be used when sorting. If the
"sort-type" property is set to
gtk.RECENT_SORT_CUSTOM
, the chooser will sort using
this function.
The signature of the comparison function is:
def sort_func(a, b, data):
where a
and b
are
two gtk.RecentInfo
objects and data
is
sort_data
. sort_func
should return a positive integer if the first item comes before the
second, zero if the two items are equal and a negative integer if the
first item comes after the second.
def set_current_uri(uri
)
| a URI |
Returns : | True if the URI was
found. |
This method is available in PyGTK 2.10 and above.
Sets uri
as the current URI. Raises the
gobject.GError exception when an error occurs.
def get_current_uri()
Returns : | a URI. |
This method is available in PyGTK 2.10 and above.
Returns the currently selected URI.
def get_current_item()
Returns : | a gtk.RecentInfo
object. |
This method is available in PyGTK 2.10 and above.
Returns the gtk.RecentInfo
for the currently selected item.
def select_uri(uri
)
| a URI |
Returns : | True if
uri was found. |
This method is available in PyGTK 2.10 and above.
Selects uri
. Raises the gobject.GError
exception when an error occurs.
def unselect_uri(uri
)
| a URI |
This method is available in PyGTK 2.10 and above.
Unselects uri
.
def select_all()
This method is available in PyGTK 2.10 and above.
Selects all the items inside chooser
, if
the "select-multiple" property is True
.
def unselect_all()
This method is available in PyGTK 2.10 and above.
Unselects all the items.
def get_items()
Returns : | A list of gtk.RecentInfo
objects. |
This method is available in PyGTK 2.10 and above.
Returns the list of recently used resources in form of gtk.RecentInfo
objects.
The return value of this function is affected by the "sort-type" and "limit" properties.
def get_uris()
Returns : | A list of strings. |
This method is available in PyGTK 2.10 and above.
Returns a list of the URIs of the recently used resources.
The return value of this function is affected by the "sort-type" and "limit" properties>.
def add_filter(filter
)
| a gtk.RecentFilter |
This method is available in PyGTK 2.10 and above.
Adds filter
to the list of gtk.RecentFilter
objects.
If no previous filter objects were defined, this method will
call the gtk.RecentChooser.set_filter()
method.
def remove_filter(filter
)
| a gtk.RecentFilter |
This method is available in PyGTK 2.10 and above.
Removes filter
from the list of gtk.RecentFilter
objects.
def list_filters()
Returns : | A list of gtk.RecentFilter
objects.. |
This method is available in PyGTK 2.10 and above.
Returns a list of the gtk.RecentFilter
objects.
def set_filter(filter
)
| a gtk.RecentFilter |
This method is available in PyGTK 2.10 and above.
Sets filter
as the current gtk.RecentFilter
object used by the recent chooser to filter the displayed recently
used resources.
def get_filter()
Returns : | a gtk.RecentFilter
object. |
This method is available in PyGTK 2.10 and above.
Returns the currently used gtk.RecentFilter
object.
def callback(chooser
, user_param1
, ...
)
| the object which received the signal |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
This signal is available in GTK+ 2.10 and above.
This signal is emitted when the user "activates" a recent item in the recent chooser. This can happen by double-clicking on an item in the recently used resources list, or by pressing Enter.
def callback(chooser
, user_param1
, ...
)
| the object which received the signal |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
This signal is available in GTK+ 2.10 and above.
This signal is emitted when there is a change in the set of selected recently used resources. This can happen when a user modifies the selection with the mouse or the keyboard, or when explicitly calling methods to change the selection.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.