1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719
|
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="class-gtkrecentmanager">
<refnamediv>
<refname>gtk.RecentManager</refname>
<refpurpose>manages recently used files (new in PyGTK
2.10)</refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>gtk.RecentManager</classname></ooclass>
<ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
<constructorsynopsis language="python">
<methodname><link linkend="constructor-gtkrecentmanager">gtk.RecentManager</link></methodname>
<methodparam></methodparam>
</constructorsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkrecentmanager--set-screen">set_screen</link></methodname>
<methodparam><parameter role="keyword">screen</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkrecentmanager--add-item">add_item</link></methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkrecentmanager--add-full">add_full</link></methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
<methodparam><parameter role="keyword">recent_data</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkrecentmanager--remove-item">remove_item</link></methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkrecentmanager--lookup-item">lookup_item</link></methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkrecentmanager--has-item">has_item</link></methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkrecentmanager--move-item">move_item</link></methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
<methodparam><parameter role="keyword">new_uri</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkrecentmanager--set-limit">set_limit</link></methodname>
<methodparam><parameter role="keyword">limit</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkrecentmanager--get-limit">get_limit</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkrecentmanager--get-items">get_items</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-gtkrecentmanager--purge-items">purge_items</link></methodname>
</methodsynopsis>
</classsynopsis>
<programlisting>
<emphasis role="bold">Functions</emphasis>
<methodsynopsis language="python">
<methodname><link linkend="function-gtk--recent-manager-get-default">gtk.recent_manager_get_default</link></methodname>
<methodparam></methodparam>
</methodsynopsis><methodsynopsis language="python">
<methodname><link linkend="function-gtk--recent-manager-get-for-screen">gtk.recent_manager_get_for_screen</link></methodname>
<methodparam><parameter role="keyword">screen</parameter></methodparam>
</methodsynopsis></programlisting>
</refsect1>
<refsect1>
<title>Ancestry</title>
<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
+-- <link linkend="class-gtkrecentmanager">gtk.RecentManager</link>
</synopsis>
</refsect1>
<refsect1 id="properties-gtkrecentmanager">
<title>gtk.RecentManager Properties</title>
<blockquote role="properties">
<informaltable pgwide="1" frame="none">
<tgroup cols="3">
<colspec column="1" colwidth="1in"/>
<colspec column="2" colwidth="1in"/>
<colspec column="3" colwidth="3.5in"/>
<tbody>
<row valign="top">
<entry>"filename"</entry>
<entry>Read-Write-Construct Only</entry>
<entry>The full path to the file to be used to store and read the
recently used resources list This property is available in GTK+
2.10 and above.</entry>
</row>
<row valign="top">
<entry>"limit"</entry>
<entry>Read-Write</entry>
<entry>The maximum number of items to be returned by the <link
linkend="method-gtkrecentmanager--get-items"><methodname>gtk.RecentManager.get_items()</methodname></link>
function. This property is available in GTK+ 2.10 and
above.</entry>
</row>
<row valign="top">
<entry>"size"</entry>
<entry>Read</entry>
<entry>The size of the recently used resources list. This
property is available in GTK+ 2.10 and above.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</blockquote>
</refsect1>
<refsect1 id="signal-prototypes-gtkrecentmanager">
<title>gtk.RecentManager Signal Prototypes</title>
<para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
<variablelist>
<varlistentry>
<term>"<link linkend="signal-gtkrecentmanager--changed">changed</link></term>
<listitem>
<methodsynopsis language="python"><methodname>callback</methodname>
<methodparam><parameter>recent_manager</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para><link
linkend="class-gtkrecentmanager"><classname>gtk.RecentManager</classname></link>
provides a facility for adding, removing and looking up recently used
files. Each recently used file is identified by its URI, and has
meta-data associated to it, like the names and command lines of the
applications that have registered it, the number of time each
application has registered the same file, the mime type of the file and
whether the file should be displayed only by the applications that have
registered it.</para>
<para>The <link
linkend="class-gtkrecentmanager"><classname>gtk.RecentManager</classname></link>
acts like a database of all the recently used files. You can create new
<link
linkend="class-gtkrecentmanager"><classname>gtk.RecentManager</classname></link>
objects, but it is more efficient to use the standard recent manager for
the <link
linkend="class-gdkscreen"><classname>gtk.gdk.Screen</classname></link>
so that information about the recently used files is shared with other
people using them. In case the default screen is being used, adding a
new recently used file is as simple as:</para>
<informalexample>
<programlisting>
manager = gtk.recent_manager_get_default()
manager.add_item(file_uri)
</programlisting>
</informalexample>
<para>While looking up a recently used file is as simple as:</para>
<informalexample>
<programlisting>
manager = gtk.recent_manager_get_default()
try:
info = manager.lookup_item(file_uri)
except gobject.GError:
print "Could not find the file: ", file_uri
</programlisting>
</informalexample>
<para>Recently used files are supported since GTK+ 2.10.</para>
</refsect1>
<refsect1>
<title>Constructor</title>
<refsect2 id="constructor-gtkrecentmanager">
<title>gtk.RecentManager</title>
<programlisting><constructorsynopsis language="python">
<methodname>gtk.RecentManager</methodname>
<methodparam></methodparam>
</constructorsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>A newly created <link
linkend="class-gtkrecentmanager"><classname>gtk.RecentManager</classname></link>
object.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This constructor is available in PyGTK 2.10 and above.</para>
</note>
<para>Creates a new recent manager object. Recent manager objects are
used to handle the list of recently used resources. A <link
linkend="class-gtkrecentmanager"><classname>gtk.RecentManager</classname></link>
object monitors the recently used resources list, and emits the
"changed" signal each time something inside the list changes.</para>
<para><link
linkend="class-gtkrecentmanager"><classname>gtk.RecentManager</classname></link>
objects are expansive: be sure to create them only when needed. You
should use the <link
linkend="function-gtk--recent-manager-get-for-screen"><function>gtk.recent_manager_get_for_screen</function>()</link>
or the <link
linkend="function-gtk--recent-manager-get-default"><function>gtk.recent_manager_get_default</function>()</link>
functions instead.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Methods</title>
<refsect2 id="method-gtkrecentmanager--set-screen">
<title>gtk.RecentManager.set_screen</title>
<programlisting><methodsynopsis language="python">
<methodname>set_screen</methodname>
<methodparam><parameter role="keyword">screen</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">screen</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gdkscreen"><classname>gtk.gdk.Screen</classname></link></simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Sets the screen for a recent manager; the screen is used to
track the user's currently configured recently used documents
storage.</para>
</refsect2>
<refsect2 id="method-gtkrecentmanager--add-item">
<title>gtk.RecentManager.add_item</title>
<programlisting><methodsynopsis language="python">
<methodname>add_item</methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">uri</parameter> :</term>
<listitem><simpara>a valid URI</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the new item was
successfully added to the recently used resources
list</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Adds a new resource, pointed by <parameter>uri</parameter>, into
the recently used resources list.</para>
<para>This method automatically retrieves some of the needed metadata
and sets other metadata to common default values.</para>
<para>See the <link
linkend="method-gtkrecentmanager--add-full"><methodname>gtk.RecentManager.add_full()</methodname></link>
method if you want to explicitly define the metadata for the resource
pointed by <parameter>uri</parameter>.</para>
</refsect2>
<refsect2 id="method-gtkrecentmanager--add-full">
<title>gtk.RecentManager.add_full</title>
<programlisting><methodsynopsis language="python">
<methodname>add_full</methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
<methodparam><parameter role="keyword">recent_data</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">uri</parameter> :</term>
<listitem><simpara>a valid URI</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">recent_data</parameter> :</term>
<listitem><simpara>a dict containing metadata of the
resource</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the new item was
successfully added to the recently used resources
list.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Adds a new resource, pointed by <parameter>uri</parameter>, into
the recently used resources list, using the metadata specified inside
the dict passed in <parameter>recent_data</parameter>.</para>
<para>The passed URI will be used to identify this resource inside the
list.</para>
<para>In order to register the new recently used resource, metadata
about the resource must be passed as well as the URI. The metadata is
stored in a dict, which must contain the MIME type of the resource
pointed by the URI ("mime_type"), the name of the application that is
registering the item ("app_name"), and a command line to be used when
launching the item ("app_exec").</para>
<para>Optionally, the <parameter>recent_data</parameter> dict might
contain a UTF-8 string to be used when viewing the item instead of the
last component of the URI ("display_name"), a short description of the
item ("description"), whether the item should be considered private -
that is, should be displayed only by the applications that have
registered it("is_private") or a list of the groups that the item
belongs to ("groups").</para>
</refsect2>
<refsect2 id="method-gtkrecentmanager--remove-item">
<title>gtk.RecentManager.remove_item</title>
<programlisting><methodsynopsis language="python">
<methodname>remove_item</methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">uri</parameter> :</term>
<listitem><simpara>the URI of the item you wish to remove</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the item pointed by
<parameter>uri</parameter> has been successfully removed by the
recently used resources list.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Removes a resource pointed by <parameter>uri</parameter> from
the recently used resources list handled by a recent manager. Raises
the gobject.GError when an error occurs.</para>
</refsect2>
<refsect2 id="method-gtkrecentmanager--lookup-item">
<title>gtk.RecentManager.lookup_item</title>
<programlisting><methodsynopsis language="python">
<methodname>lookup_item</methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">uri</parameter> :</term>
<listitem><simpara>a URI</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a <link
linkend="class-gtkrecentinfo"><classname>gtk.RecentInfo</classname></link>
object containing information about the resource pointed by
<parameter>uri</parameter>, or <literal>None</literal> if the URI
was not registered in the recently used resources
list.</simpara></listitem>
</varlistentry>
</variablelist>
<para>Searches for a URI inside the recently used resources list, and
returns a <link
linkend="class-gtkrecentinfo"><classname>gtk.RecentInfo</classname></link>
object containing information about the resource like its MIME type,
or its display name. Raises the gobject.GError when an error
occurs.</para>
</refsect2>
<refsect2 id="method-gtkrecentmanager--has-item">
<title>gtk.RecentManager.has_item</title>
<programlisting><methodsynopsis language="python">
<methodname>has_item</methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">uri</parameter> :</term>
<listitem><simpara>a URI</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> if the resource was
found.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Checks whether there is a recently used resource registered with
<parameter>uri</parameter>.</para>
</refsect2>
<refsect2 id="method-gtkrecentmanager--move-item">
<title>gtk.RecentManager.move_item</title>
<programlisting><methodsynopsis language="python">
<methodname>move_item</methodname>
<methodparam><parameter role="keyword">uri</parameter></methodparam>
<methodparam><parameter role="keyword">new_uri</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">uri</parameter> :</term>
<listitem><simpara>the URI of a recently used resource</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter role="keyword">new_uri</parameter> :</term>
<listitem><simpara>the new URI of the recently used resource, or <literal>None</literal> to
remove the item pointed by <parameter>uri</parameter> in the list</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara><literal>True</literal> on
success.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Changes the location of a recently used resource from
<parameter>uri</parameter> to <parameter>new_uri</parameter>.</para>
<para>Please note that this function will not affect the resource
pointed by the URIs, but only the URI used in the recently used
resources list. Raises the gobject.GError when an error occurs.</para>
</refsect2>
<refsect2 id="method-gtkrecentmanager--set-limit">
<title>gtk.RecentManager.set_limit</title>
<programlisting><methodsynopsis language="python">
<methodname>set_limit</methodname>
<methodparam><parameter role="keyword">limit</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">limit</parameter> :</term>
<listitem><simpara>the maximum number of items to return, or
-1.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Sets the maximum number of item that the <link
linkend="method-gtkrecentmanager--get-items"><methodname>gtk.RecentManager.get_items()</methodname></link>
function should return. If <parameter>limit</parameter> is set to -1,
then return all the items.</para>
</refsect2>
<refsect2 id="method-gtkrecentmanager--get-limit">
<title>gtk.RecentManager.get_limit</title>
<programlisting><methodsynopsis language="python">
<methodname>get_limit</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the number of items to return, or -1 for every
item.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Returns the maximum number of items that the <link
linkend="method-gtkrecentmanager--get-items"><methodname>gtk.RecentManager.get_items()</methodname></link>
method should return.</para>
</refsect2>
<refsect2 id="method-gtkrecentmanager--get-items">
<title>gtk.RecentManager.get_items</title>
<programlisting><methodsynopsis language="python">
<methodname>get_items</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>a list of <link
linkend="class-gtkrecentinfo"><classname>gtk.RecentInfo</classname></link>
objects.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Returns the list of recently used resources as <link
linkend="class-gtkrecentinfo"><classname>gtk.RecentInfo</classname></link>
objects.</para>
</refsect2>
<refsect2 id="method-gtkrecentmanager--purge-items">
<title>gtk.RecentManager.purge_items</title>
<programlisting><methodsynopsis language="python">
<methodname>purge_items</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the number of items that have been removed from
the recently used resources list.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This method is available in PyGTK 2.10 and above.</para>
</note>
<para>Purges every item from the recently used resources list. Raises
the gobject.GError when an error occurs.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Functions</title>
<refsect2 id="function-gtk--recent-manager-get-default">
<title>gtk.recent_manager_get_default</title>
<programlisting><methodsynopsis language="python">
<methodname>gtk.recent_manager_get_default</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>A unique <link
linkend="class-gtkrecentmanager"><classname>gtk.RecentManager</classname></link>
associated with the default screen. This recent manager is
associated to the screen and can be used as long as the screen is
open.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This function is available in PyGTK 2.10 and above.</para>
</note>
<para>Gets the recent manager for the default screen. See the <link
linkend="function-gtk--recent-manager-get-for-screen"><function>gtk.recent_manager_get_for_screen</function>()</link>
function.</para>
</refsect2>
<refsect2 id="function-gtk--recent-manager-get-for-screen">
<title>gtk.recent_manager_get_for_screen</title>
<programlisting><methodsynopsis language="python">
<methodname>gtk.recent_manager_get_for_screen</methodname>
<methodparam><parameter
role="keyword">screen</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">screen</parameter> :</term>
<listitem><simpara>a <link
linkend="class-gdkscreen"><classname>gtk.gdk.Screen</classname></link></simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>A unique <link
linkend="class-gtkrecentmanager"><classname>gtk.RecentManager</classname></link>
associated with the given screen. This recent manager is
associated to the with the screen and can be used as long as the
screen is open.</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This function is available in PyGTK 2.10 and above.</para>
</note>
<para>Gets the recent manager object associated with
<parameter>screen</parameter>; if this function has not previously
been called for the given screen, a new recent manager object will be
created and associated with the screen. Recent manager objects are
fairly expensive to create, so using this function is usually a better
choice than calling the <link
linkend="constructor-gtkrecentmanager">gtk.RecentManager</link>()
constructor and setting the screen yourself; by using this function a
single recent manager object will be shared between users.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Signals</title>
<refsect2 id="signal-gtkrecentmanager--changed">
<title>The "changed" gtk.RecentManager Signal</title>
<programlisting><methodsynopsis language="python"><methodname>callback</methodname>
<methodparam><parameter>recent_manager</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>recent_manager</parameter> :</term>
<listitem><simpara>the recent manager</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_param1</parameter> :</term>
<listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>...</parameter> :</term>
<listitem><simpara>additional user parameters (if any)</simpara></listitem>
</varlistentry>
</variablelist>
<note>
<para>This signal is available in GTK+ 2.10 and above.</para>
</note>
<para>Emitted when the current recently used resources manager changes
its contents.</para>
</refsect2>
</refsect1>
</refentry>
|