commit d20f5bafdce87eddd45f48cc549e57cf86a499d8
parent e2df8f3ebb720481e34b6d30207562a6d9f3145a
Author: Jean-Yves Lefort <jylefort@brutele.be>
Date: Wed, 28 Nov 2007 02:49:40 +1000
mail-notification-5.0-rc1
* Core changes:
* A "Play a sound when new mail arrives" option has
been added
* Yahoo! Mail support has been added (requires
fetchyahoo)
* Windows Live Hotmail support has been added
(requires GetLive)
* A "consider new mail as read" action has been added
(#18241)
* An optional message count has been added over the
icon (#18241)
* The "Display the properties dialog" click action was
not very useful and has been removed
* The size of the status icon is now dynamically
adjusted when the size of the notification area
changes
* The mailbox list icon selection algorithm has been
made more coherent; the "timer" icon was confusing
and has been removed
* In order to simplify the properties dialog, several
options have been removed (they are however still
available in GConf)
* The "Delay between mail checks" spin buttons did not
retain a value typed in manually: fixed (#19379)
* If a mailbox was added or removed while the "Test
messages" option was enabled, a bogus mailbox was
added to the configuration file: fixed
* If some GConf default values are missing, MN will
now refuse to run. This ensures that MN will not
behave unexpectedly because of unproper
installation.
* The simultaneous number of popups is now limited
(/apps/mail-notification/popups/limit)
* New messages are no longer cleared when a mailbox
error occurs. This way, already shown message popups
will not unduly reappear after the error is unset
(https://bugs.launchpad.net/ubuntu/+source/mail-notification/+bug/78487).
* Message popups are now closed when MN exits
* Minor bugs have been fixed (#20266, #20352, #20353)
* Mail Notification is now licensed under the terms of
the GNU General Public License version 3
* The documentation is now licensed under the terms of
the GNU Free Documentation License version 1.2
* Gmail, IMAP and POP3 changes:
* Passwords are now encrypted, using GNOME
Keyring. Note that I do not endorse the flawed GNOME
Keyring approach of granting passwords an
encryption-worth status while ignoring other
sensitive data. Furthermore, at the time of this
writing, GNOME Keyring does not seem to prevent the
memory it uses for storing the passwords from being
swapped out to disk. However, despite these flaws,
it has been observed that GNOME Keyring has
beneficial psychological effects on some users. For
increased psychological well-being, MN even moves
the plain text passwords it finds in mailboxes.xml
to the keyring.
* Filling in the username in the mailbox properties is
now mandatory again (it had been optional since 2.0)
* IMAP and POP3 changes:
* The "Connect to untrusted server?" dialog is now
closed when the mailbox is removed
* Gmail changes:
* Label support has been added
* IMAP changes:
* IMAP URLs (RFC 2192) having no path component are
now handled properly again
* POP3 changes:
* The RSA MD5 implementation has been replaced by the
glibc implementation because the RSA license is
incompatible with the GPL (#21138)
* Maildir changes:
* The delete message action has been implemented
* MH changes:
* Race conditions with the MDA and MUA are now
avoided, using a delay-based workaround
* Evolution changes:
* The Evolution 2.12 API change which caused the build
to fail has been adapted to; as a consequence, MN
now requires Evolution 2.12 or superior (#20904)
* The configure script now properly uses the
unversioned evolution-plugin package which was
introduced with Evolution 2.10 (#20904, #20124)
* Sylpheed changes:
* The delay-based race condition avoidance code now
works regardless of the underlying file monitor
implementation
* Claws Mail mailboxes (which contain both a
.mh_sequences and a .sylpheed_mark file) are now
detected as Sylpheed mailboxes rather than as MH
mailboxes: this removes the need to use rcvstore
from procmail
* The --enable-sylpheed-locking configure option has
been removed: the appropriate race condition
avoidance strategy is now automatically detected at
runtime
* Updated translations:
* French
* Polish (Tomasz Sałaciński)
Diffstat:
295 files changed, 24155 insertions(+), 11578 deletions(-)
diff --git a/AUTHORS b/AUTHORS
@@ -18,17 +18,24 @@ Translators:
* Daniel Nylander <po@danielnylander.se> (Swedish)
* Vladimir Petkov <vpetkov@i-space.org> (Bulgarian)
* Tomasz Sarota-Raczek <tomasz.sarota.raczek@gmail.com>,
- Maurycy Pawłowski-Wieroński <maurycy@abstrakcja.pl> (Polish)
+ Maurycy Pawłowski-Wieroński <maurycy@abstrakcja.pl>,
+ Tomasz Sałaciński <tsalacinski@gmail.com> (Polish)
* Topi <topi@phreaker.net> (Catalan)
* Marcel J. Zwiebel <mj.zwiebel@nonux.nl> (Dutch)
-Artists:
+Graphic designers:
* Josef Vybíral <cornelius@vybiral.info>
(art/*/apps/mail-notification.*)
External code sources:
* libegg (src/egg*)
* Nautilus (src/nautilus*)
+ * The GNU C Library (src/mn-md5.*)
-External art sources (images taken as-is or slightly modified):
+External image sources (images taken as-is or slightly modified):
* Google (gmail.png)
+ * Yahoo! (yahoo.png)
+ * Microsoft (hotmail.png)
+
+External sound sources:
+ * Ekiga (new-mail.wav)
diff --git a/COPYING b/COPYING
@@ -1,285 +1,626 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
this License.
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
+state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -303,37 +644,31 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/COPYING-DOCS b/COPYING-DOCS
@@ -1,8 +1,9 @@
GNU Free Documentation License
- Version 1.1, March 2000
+ Version 1.2, November 2002
- Copyright (C) 2000 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -10,12 +11,12 @@
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
-written document "free" in the sense of freedom: to assure everyone
-the effective freedom to copy and redistribute it, with or without
-modifying it, either commercially or noncommercially. Secondarily,
-this License preserves for the author and publisher a way to get
-credit for their work, while not being considered responsible for
-modifications made by others.
+functional and useful document "free" in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
@@ -33,11 +34,15 @@ principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
-This License applies to any manual or other work that contains a
-notice placed by the copyright holder saying it can be distributed
-under the terms of this License. The "Document", below, refers to any
-such manual or work. Any member of the public is a licensee, and is
-addressed as "you".
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The "Document", below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as "you". You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
@@ -47,7 +52,7 @@ A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
-within that overall subject. (For example, if the Document is in part a
+within that overall subject. (Thus, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
@@ -56,33 +61,40 @@ them.
The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License.
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License.
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
-general public, whose contents can be viewed and edited directly and
+general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
-format whose markup has been designed to thwart or discourage
-subsequent modification by readers is not Transparent. A copy that is
-not "Transparent" is called "Opaque".
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
-HTML designed for human modification. Opaque formats include
-PostScript, PDF, proprietary formats that can be read and edited only
-by proprietary word processors, SGML or XML for which the DTD and/or
+HTML, PostScript or PDF designed for human modification. Examples of
+transparent image formats include PNG, XCF and JPG. Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
-machine-generated HTML produced by some word processors for output
-purposes only.
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
@@ -91,6 +103,21 @@ formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgements",
+"Dedications", "Endorsements", or "History".) To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
2. VERBATIM COPYING
@@ -110,9 +137,10 @@ you may publicly display copies.
3. COPYING IN QUANTITY
-If you publish printed copies of the Document numbering more than 100,
-and the Document's license notice requires Cover Texts, you must enclose
-the copies in covers that carry, clearly and legibly, all these Cover
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
@@ -130,16 +158,15 @@ pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
-a publicly-accessible computer-network location containing a complete
-Transparent copy of the Document, free of added material, which the
-general network-using public has access to download anonymously at no
-charge using public-standard network protocols. If you use the latter
-option, you must take reasonably prudent steps, when you begin
-distribution of Opaque copies in quantity, to ensure that this
-Transparent copy will remain thus accessible at the stated location
-until at least one year after the last time you distribute an Opaque
-copy (directly or through your agents or retailers) of that edition to
-the public.
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
@@ -163,7 +190,8 @@ A. Use in the Title Page (and on the covers, if any) a title distinct
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
- Document (all of its principal authors, if it has less than five).
+ Document (all of its principal authors, if it has fewer than five),
+ unless they release you from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
@@ -175,10 +203,10 @@ F. Include, immediately after the copyright notices, a license notice
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
-I. Preserve the section entitled "History", and its title, and add to
- it an item stating at least the title, year, new authors, and
+I. Preserve the section Entitled "History", Preserve its Title, and add
+ to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
- there is no section entitled "History" in the Document, create one
+ there is no section Entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
@@ -189,17 +217,18 @@ J. Preserve the network location, if any, given in the Document for
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
-K. In any section entitled "Acknowledgements" or "Dedications",
- preserve the section's title, and preserve in the section all the
- substance and tone of each of the contributor acknowledgements
+K. For any section Entitled "Acknowledgements" or "Dedications",
+ Preserve the Title of the section, and preserve in the section all
+ the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
-M. Delete any section entitled "Endorsements". Such a section
+M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
-N. Do not retitle any existing section as "Endorsements"
+N. Do not retitle any existing section to be Entitled "Endorsements"
or to conflict in title with any Invariant Section.
+O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
@@ -208,7 +237,7 @@ of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
-You may add a section entitled "Endorsements", provided it contains
+You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
@@ -236,7 +265,7 @@ License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
-license notice.
+license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
@@ -247,11 +276,11 @@ author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
-In the combination, you must combine any sections entitled "History"
-in the various original documents, forming one section entitled
-"History"; likewise combine any sections entitled "Acknowledgements",
-and any sections entitled "Dedications". You must delete all sections
-entitled "Endorsements."
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgements",
+and any sections Entitled "Dedications". You must delete all sections
+Entitled "Endorsements".
6. COLLECTIONS OF DOCUMENTS
@@ -272,18 +301,20 @@ other respects regarding verbatim copying of that document.
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
-distribution medium, does not as a whole count as a Modified Version
-of the Document, provided no compilation copyright is claimed for the
-compilation. Such a compilation is called an "aggregate", and this
-License does not apply to the other self-contained works thus compiled
-with the Document, on account of their being thus compiled, if they
-are not themselves derivative works of the Document.
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one quarter
-of the entire aggregate, the Document's Cover Texts may be placed on
-covers that surround only the Document within the aggregate.
-Otherwise they must appear on covers around the whole aggregate.
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
8. TRANSLATION
@@ -294,10 +325,17 @@ Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
-translation of this License provided that you also include the
-original English version of this License. In case of a disagreement
-between the translation and the original English version of this
-License, the original English version will prevail.
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled "Acknowledgements",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
9. TERMINATION
@@ -335,19 +373,23 @@ To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
- Copyright (c) YEAR YOUR NAME.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1
- or any later version published by the Free Software Foundation;
- with the Invariant Sections being LIST THEIR TITLES, with the
- Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
- A copy of the license is included in the section entitled "GNU
- Free Documentation License".
-
-If you have no Invariant Sections, write "with no Invariant Sections"
-instead of saying which ones are invariant. If you have no
-Front-Cover Texts, write "no Front-Cover Texts" instead of
-"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.2
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with...Texts." line with this:
+
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
diff --git a/INSTALL b/INSTALL
@@ -11,12 +11,17 @@ Index
0. About this document
- $Id: INSTALL,v 1.22 2007-06-26 10:16:21 jylefort Exp $
+ $Id: INSTALL,v 1.26 2007-11-26 03:29:25 jylefort Exp $
Copyright (C) 2003-2007 Jean-Yves Lefort.
- This document is part of Mail Notification.
- It may be distributed under the same terms as Mail Notification.
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License
+ (GFDL), Version 1.2 or any later version published by the Free
+ Software Foundation with no Invariant Sections, no Front-Cover
+ Texts, and no Back-Cover Texts. You can find a copy of the
+ GFDL at http://www.gnu.org/licenses/fdl.html or in the file
+ COPYING-DOCS distributed with this manual.
1. Dependencies
@@ -25,17 +30,28 @@ Index
* GNOME (version 2.14.0 or superior)
http://www.gnome.org/
- * libnotify (version 0.3.0 or superior)
+ * libnotify (version 0.4.1 or superior)
http://www.galago-project.org/
Optional:
- * for mbox, MH, Maildir, POP3, IMAP, Mozilla and
- Sylpheed support:
+ * for IMAP, Maildir, mbox, MH, Mozilla, POP3,
+ Sylpheed, Windows Live Hotmail and Yahoo! Mail
+ support:
GMime (version 2.1.0 or superior)
http://spruce.sourceforge.net/gmime/
+ * for Windows Live Hotmail support:
+
+ GetLive
+ http://sourceforge.net/projects/getlive/
+
+ * for Yahoo! Mail support:
+
+ FetchYahoo
+ http://fetchyahoo.twizzler.org/
+
* for SSL/TLS support:
OpenSSL (version 0.9.6 or superior)
@@ -48,7 +64,7 @@ Index
* for Evolution support:
- Evolution (version 2.4 or superior)
+ Evolution (version 2.12 or superior)
http://www.gnome.org/projects/evolution/
2. Instructions
@@ -58,8 +74,7 @@ Index
$ ./configure
$ make
- <get root privileges, if needed>
- $ make install
+ $ sudo make install
IMPORTANT:
@@ -73,15 +88,23 @@ Index
3. Configure options
- --enable-mbox (default: yes)
+ --enable-evolution (default: yes)
- Enable mbox mailbox support.
+ Enable Evolution mailbox support.
- Requirements: GMime version 2.1.0 or superior.
+ Requirements: Evolution version 2.12 or superior.
- --enable-mh (default: yes)
+ --enable-gmail (default: yes)
- Enable MH mailbox support.
+ Enable Gmail mailbox support.
+
+ --enable-hotmail (default: yes)
+
+ Enable Windows Live Hotmail mailbox support.
+
+ --enable-imap (default: yes)
+
+ Enable IMAP mailbox support.
Requirements: GMime version 2.1.0 or superior.
@@ -91,67 +114,63 @@ Index
Requirements: GMime version 2.1.0 or superior.
- --enable-pop3 (default: yes)
+ --enable-mbox (default: yes)
- Enable POP3 mailbox support.
+ Enable mbox mailbox support.
Requirements: GMime version 2.1.0 or superior.
- --enable-imap (default: yes)
+ --enable-mh (default: yes)
- Enable IMAP mailbox support.
+ Enable MH mailbox support.
Requirements: GMime version 2.1.0 or superior.
- --enable-ssl (default: yes)
-
- Enable SSL/TLS support.
+ --enable-mozilla (default: yes)
- Requirements: OpenSSL version 0.9.6 or superior.
- Applies to: POP3, IMAP.
+ Enable Mozilla products (Mozilla, SeaMonkey,
+ Thunderbird, ...) mailbox support.
- --enable-sasl (default: yes)
+ Requirements: GMime version 2.1.0 or superior.
- Enable SASL authentication support.
+ --enable-pop3 (default: yes)
- Requirements: Cyrus SASL version 2.0 or superior.
- Applies to: POP3, IMAP.
+ Enable POP3 mailbox support.
- --enable-ipv6 (default: yes)
+ Requirements: GMime version 2.1.0 or superior.
- Enable IPv6 support.
+ --enable-sylpheed (default: yes)
- Applies to: POP3, IMAP.
+ Enable Sylpheed mailbox support.
- --enable-gmail (default: yes)
+ Requirements: GMime version 2.1.0 or superior.
- Enable Gmail mailbox support.
+ Note: if you want more responsive notifications, apply
+ the patch sylpheed-locking.diff (provided in this
+ archive) to Sylpheed and recompile it.
- --enable-evolution (default: yes)
+ --enable-yahoo (default: yes)
- Enable Evolution mailbox support.
+ Enable Yahoo! Mail mailbox support.
- Requirements: Evolution version 2.4 or superior.
+ Requirements: GMime version 2.1.0 or superior.
- --enable-mozilla (default: yes)
+ --enable-ipv6 (default: yes)
- Enable Mozilla products (Mozilla, SeaMonkey,
- Thunderbird, ...) mailbox support.
+ Enable IPv6 support.
- Requirements: GMime version 2.1.0 or superior.
+ Applies to: IMAP, POP3.
- --enable-sylpheed (default: yes)
+ --enable-sasl (default: yes)
- Enable Sylpheed mailbox support.
+ Enable SASL authentication support.
- Requirements: GMime version 2.1.0 or superior.
+ Requirements: Cyrus SASL version 2.0 or superior.
+ Applies to: IMAP, POP3.
- --enable-sylpheed-locking (default: no)
+ --enable-ssl (default: yes)
- Enable .sylpheed_mark locking. This option allows Mail
- Notification to reliably avoid race conditions which
- can occur when Sylpheed is running, but it requires a
- patched version of Sylpheed (the Sylpheed patch,
- sylpheed-locking.diff, is included in this archive).
+ Enable SSL/TLS support.
- Requirements: Sylpheed patched with sylpheed-locking.diff
+ Requirements: OpenSSL version 0.9.6 or superior.
+ Applies to: IMAP, POP3.
diff --git a/Makefile.in b/Makefile.in
@@ -44,8 +44,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/evolution-plugin.m4 \
$(top_srcdir)/m4/gnome.m4 $(top_srcdir)/m4/idl.m4 \
$(top_srcdir)/m4/openssl.m4 \
$(top_srcdir)/m4/reentrant-resolver.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sasl2.m4 \
+ $(top_srcdir)/m4/string-arch-unaligned.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -123,11 +124,11 @@ GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_CFLAGS = @GNOME_CFLAGS@
+GNOME_KEYRING_CFLAGS = @GNOME_KEYRING_CFLAGS@
+GNOME_KEYRING_LIBS = @GNOME_KEYRING_LIBS@
GNOME_LIBS = @GNOME_LIBS@
GOB2 = @GOB2@
GREP = @GREP@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_LIBS = @GTK_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -139,14 +140,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_ICONV = @INTLTOOL_ICONV@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
-INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
@@ -158,7 +157,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
@@ -192,6 +190,7 @@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SASL_CFLAGS = @SASL_CFLAGS@
SASL_LIBS = @SASL_LIBS@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
diff --git a/NEWS b/NEWS
@@ -1,3 +1,120 @@
+---
+ Note: below, bug numbers refer to the old bug tracker
+ (https://savannah.nongnu.org/bugs/?group=mailnotify).
+---
+
+5.0 Release Candidate 1 November 27, 2007
+
+ * Core changes:
+ * A "Play a sound when new mail arrives" option has
+ been added
+ * Yahoo! Mail support has been added (requires
+ fetchyahoo)
+ * Windows Live Hotmail support has been added
+ (requires GetLive)
+ * A "consider new mail as read" action has been added
+ (#18241)
+ * An optional message count has been added over the
+ icon (#18241)
+ * The "Display the properties dialog" click action was
+ not very useful and has been removed
+ * The size of the status icon is now dynamically
+ adjusted when the size of the notification area
+ changes
+ * The mailbox list icon selection algorithm has been
+ made more coherent; the "timer" icon was confusing
+ and has been removed
+ * In order to simplify the properties dialog, several
+ options have been removed (they are however still
+ available in GConf)
+ * The "Delay between mail checks" spin buttons did not
+ retain a value typed in manually: fixed (#19379)
+ * If a mailbox was added or removed while the "Test
+ messages" option was enabled, a bogus mailbox was
+ added to the configuration file: fixed
+ * If some GConf default values are missing, MN will
+ now refuse to run. This ensures that MN will not
+ behave unexpectedly because of unproper
+ installation.
+ * The simultaneous number of popups is now limited
+ (/apps/mail-notification/popups/limit)
+ * New messages are no longer cleared when a mailbox
+ error occurs. This way, already shown message popups
+ will not unduly reappear after the error is unset
+ (https://bugs.launchpad.net/ubuntu/+source/mail-notification/+bug/78487).
+ * Message popups are now closed when MN exits
+ * Minor bugs have been fixed (#20266, #20352, #20353)
+ * Mail Notification is now licensed under the terms of
+ the GNU General Public License version 3
+ * The documentation is now licensed under the terms of
+ the GNU Free Documentation License version 1.2
+
+ * Gmail, IMAP and POP3 changes:
+ * Passwords are now encrypted, using GNOME
+ Keyring. Note that I do not endorse the flawed GNOME
+ Keyring approach of granting passwords an
+ encryption-worth status while ignoring other
+ sensitive data. Furthermore, at the time of this
+ writing, GNOME Keyring does not seem to prevent the
+ memory it uses for storing the passwords from being
+ swapped out to disk. However, despite these flaws,
+ it has been observed that GNOME Keyring has
+ beneficial psychological effects on some users. For
+ increased psychological well-being, MN even moves
+ the plain text passwords it finds in mailboxes.xml
+ to the keyring.
+ * Filling in the username in the mailbox properties is
+ now mandatory again (it had been optional since 2.0)
+
+ * IMAP and POP3 changes:
+ * The "Connect to untrusted server?" dialog is now
+ closed when the mailbox is removed
+
+ * Gmail changes:
+ * Label support has been added
+
+ * IMAP changes:
+ * IMAP URLs (RFC 2192) having no path component are
+ now handled properly again
+
+ * POP3 changes:
+ * The RSA MD5 implementation has been replaced by the
+ glibc implementation because the RSA license is
+ incompatible with the GPL (#21138)
+
+ * Maildir changes:
+ * The delete message action has been implemented
+
+ * MH changes:
+ * Race conditions with the MDA and MUA are now
+ avoided, using a delay-based workaround
+
+ * Evolution changes:
+ * The Evolution 2.12 API change which caused the build
+ to fail has been adapted to; as a consequence, MN
+ now requires Evolution 2.12 or superior (#20904)
+ * The configure script now properly uses the
+ unversioned evolution-plugin package which was
+ introduced with Evolution 2.10 (#20904, #20124)
+
+ * Sylpheed changes:
+ * The delay-based race condition avoidance code now
+ works regardless of the underlying file monitor
+ implementation
+ * Claws Mail mailboxes (which contain both a
+ .mh_sequences and a .sylpheed_mark file) are now
+ detected as Sylpheed mailboxes rather than as MH
+ mailboxes: this removes the need to use rcvstore
+ from procmail
+ * The --enable-sylpheed-locking configure option has
+ been removed: the appropriate race condition
+ avoidance strategy is now automatically detected at
+ runtime
+
+ * Updated translations:
+ * French
+ * Polish (Tomasz Sałaciński)
+
4.1 June 26, 2007
* Core changes:
diff --git a/README b/README
@@ -11,12 +11,17 @@ Index
0. About this document
- $Id: README,v 1.36 2007-06-26 11:34:17 jylefort Exp $
+ $Id: README,v 1.39 2007-11-26 03:23:41 jylefort Exp $
Copyright (C) 2003-2007 Jean-Yves Lefort.
- This document is part of Mail Notification.
- It may be distributed under the same terms as Mail Notification.
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License
+ (GFDL), Version 1.2 or any later version published by the Free
+ Software Foundation with no Invariant Sections, no Front-Cover
+ Texts, and no Back-Cover Texts. You can find a copy of the
+ GFDL at http://www.gnu.org/licenses/fdl.html or in the file
+ COPYING-DOCS distributed with this manual.
1. About Mail Notification
@@ -31,9 +36,10 @@ Index
Mail Notification features include:
* multiple mailbox support
- * mbox, MH, Maildir, POP3, IMAP, Gmail, Evolution,
- Mozilla products (Mozilla, SeaMonkey, Thunderbird,
- ...) and Sylpheed support
+ * Evolution, Gmail, IMAP, Maildir, mbox, MH, Mozilla
+ products (Mozilla, SeaMonkey, Thunderbird, ...),
+ POP3, Sylpheed, Windows Live Hotmail and Yahoo! Mail
+ support
* SASL authentication support
* APOP authentication support
* SSL/TLS support
@@ -120,6 +126,11 @@ Index
- FreeBSD port devel/gnomevfs2 >= 2.14.1_2
- GnomeVFS >= 2.15.90
+ * A bug in GnomeVFS causes intermittent Gmail errors when the
+ delay between mail checks is set to a small value.
+
+ http://bugzilla.gnome.org/show_bug.cgi?id=455972
+
3. Installation instructions
See the INSTALL file.
diff --git a/TODO b/TODO
@@ -1,4 +1,5 @@
-* List the available IMAP folders in the mailbox properties dialog
+* List the available IMAP folders in the mailbox properties dialog,
+ and/or allow to check all subscribed folders
* Allow to set a different mail reader for each mailbox. Invoking the
mail reader action would run the mail reader of the most recent
@@ -7,5 +8,5 @@
* Limit the tooltip height to the screen height
* The "delete" message action could also be implemented with little
- effort for Maildir and Sylpheed mailboxes (other mailbox types would
+ effort for Sylpheed mailboxes (other mailbox types would
require more work).
diff --git a/TRANSLATING b/TRANSLATING
@@ -16,12 +16,17 @@ Index
0. About this document
- $Id: TRANSLATING,v 1.5 2007/01/17 14:59:14 jylefort Exp $
+ $Id: TRANSLATING,v 1.6 2007-11-26 03:21:25 jylefort Exp $
Copyright (C) 2005-2007 Jean-Yves Lefort.
- This document is part of Mail Notification.
- It may be distributed under the same terms as Mail Notification.
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License
+ (GFDL), Version 1.2 or any later version published by the Free
+ Software Foundation with no Invariant Sections, no Front-Cover
+ Texts, and no Back-Cover Texts. You can find a copy of the
+ GFDL at http://www.gnu.org/licenses/fdl.html or in the file
+ COPYING-DOCS distributed with this manual.
1. Correctness
diff --git a/acinclude.m4 b/acinclude.m4
@@ -1,7 +1,19 @@
-# Copyright (C) 2003-2007 Jean-Yves Lefort.
+# Mail Notification
+# Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
#
-# This file is part of Mail Notification.
-# It may be distributed under the same terms as Mail Notification.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
### feature handling ##########################################################
diff --git a/aclocal.m4 b/aclocal.m4
@@ -266,7 +266,7 @@ glib_DEFUN([GLIB_WITH_NLS],
AC_CHECK_FUNCS(dcgettext)
MSGFMT_OPTS=
AC_MSG_CHECKING([if msgfmt accepts -c])
- GLIB_RUN_PROG([msgfmt -c -o /dev/null],[
+ GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
@@ -490,206 +490,9 @@ sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
fi])
-# Configure paths for GTK+
-# Owen Taylor 1997-2001
-
-dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
-dnl pass to pkg-config
-dnl
-AC_DEFUN([AM_PATH_GTK_2_0],
-[dnl
-dnl Get the cflags and libraries from pkg-config
-dnl
-AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
- , enable_gtktest=yes)
-
- pkg_config_args=gtk+-2.0
- for module in . $4
- do
- case "$module" in
- gthread)
- pkg_config_args="$pkg_config_args gthread-2.0"
- ;;
- esac
- done
-
- no_gtk=""
-
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-
- if test x$PKG_CONFIG != xno ; then
- if pkg-config --atleast-pkgconfig-version 0.7 ; then
- :
- else
- echo "*** pkg-config too old; version 0.7 or better required."
- no_gtk=yes
- PKG_CONFIG=no
- fi
- else
- no_gtk=yes
- fi
-
- min_gtk_version=ifelse([$1], ,2.0.0,$1)
- AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
-
- if test x$PKG_CONFIG != xno ; then
- ## don't try to run the test against uninstalled libtool libs
- if $PKG_CONFIG --uninstalled $pkg_config_args; then
- echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
- enable_gtktest=no
- fi
-
- if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
- :
- else
- no_gtk=yes
- fi
- fi
-
- if test x"$no_gtk" = x ; then
- GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
- GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
- gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_gtktest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GTK_CFLAGS"
- LIBS="$GTK_LIBS $LIBS"
-dnl
-dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
-dnl checks the results of pkg-config to some extent)
-dnl
- rm -f conf.gtktest
- AC_TRY_RUN([
-#include <gtk/gtk.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main ()
-{
- int major, minor, micro;
- char *tmp_version;
-
- system ("touch conf.gtktest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = g_strdup("$min_gtk_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
- printf("%s, bad version string\n", "$min_gtk_version");
- exit(1);
- }
-
- if ((gtk_major_version != $gtk_config_major_version) ||
- (gtk_minor_version != $gtk_config_minor_version) ||
- (gtk_micro_version != $gtk_config_micro_version))
- {
- printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
- $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
- gtk_major_version, gtk_minor_version, gtk_micro_version);
- printf ("*** was found! If pkg-config was correct, then it is best\n");
- printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
- printf("*** required on your system.\n");
- printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
- printf("*** to point to the correct configuration files\n");
- }
- else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
- (gtk_minor_version != GTK_MINOR_VERSION) ||
- (gtk_micro_version != GTK_MICRO_VERSION))
- {
- printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
- GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
- printf("*** library (version %d.%d.%d)\n",
- gtk_major_version, gtk_minor_version, gtk_micro_version);
- }
- else
- {
- if ((gtk_major_version > major) ||
- ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
- ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
- gtk_major_version, gtk_minor_version, gtk_micro_version);
- printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
- major, minor, micro);
- printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
- printf("*** correct copy of pkg-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- }
- return 1;
-}
-],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_gtk" = x ; then
- AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** A new enough version of pkg-config was not found."
- echo "*** See http://pkgconfig.sourceforge.net"
- else
- if test -f conf.gtktest ; then
- :
- else
- echo "*** Could not run GTK+ test program, checking why..."
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GTK_CFLAGS"
- LIBS="$LIBS $GTK_LIBS"
- AC_TRY_LINK([
-#include <gtk/gtk.h>
-#include <stdio.h>
-], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
- echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- GTK_CFLAGS=""
- GTK_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(GTK_CFLAGS)
- AC_SUBST(GTK_LIBS)
- rm -f conf.gtktest
-])
-
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 35 IT_PROG_INTLTOOL
+# serial 36 IT_PROG_INTLTOOL
AC_DEFUN([IT_PROG_INTLTOOL],
[AC_PREREQ([2.50])dnl
@@ -702,7 +505,7 @@ case "$am__api_version" in
esac
if test -n "$1"; then
- AC_MSG_CHECKING(for intltool >= $1)
+ AC_MSG_CHECKING([for intltool >= $1])
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
@@ -731,6 +534,7 @@ INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcar
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
AC_SUBST(INTLTOOL_DESKTOP_RULE)
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
@@ -750,6 +554,7 @@ AC_SUBST(INTLTOOL_CAVES_RULE)
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
AC_SUBST(INTLTOOL_THEME_RULE)
AC_SUBST(INTLTOOL_SERVICE_RULE)
+AC_SUBST(INTLTOOL_POLICY_RULE)
# Use the tools built into the package, not the ones that are installed.
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
@@ -772,19 +577,16 @@ if test "x$2" != "xno-xml"; then
fi
fi
-AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
-AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
-AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
-AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
-
# Substitute ALL_LINGUAS so we can use it in po/Makefile
AC_SUBST(ALL_LINGUAS)
# Set DATADIRNAME correctly if it is not set yet
# (copied from glib-gettext.m4)
if test -z "$DATADIRNAME"; then
- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr],
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]],
+ [[extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr]])],
[DATADIRNAME=share],
[case $host in
*-*-solaris*)
@@ -825,10 +627,6 @@ AC_CONFIG_COMMANDS([intltool], [
for file in intltool-extract intltool-merge intltool-update; do
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
- -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
- -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
- -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
- -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
< ${ac_aux_dir}/${file}.in > ${file}.out
if cmp -s ${file} ${file}.out 2>/dev/null; then
@@ -843,9 +641,7 @@ done
],
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
-INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
-INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
+INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
])
@@ -894,7 +690,7 @@ AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
+# serial 51 Debian 1.5.24-1ubuntu1 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
@@ -1057,7 +853,7 @@ test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
@@ -1144,8 +940,9 @@ cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# Check for compiler boilerplate output or warnings with
# the simple compiler test code.
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
@@ -1157,8 +954,9 @@ $rm conftest*
# Check for linker boilerplate output or warnings with
# the simple link test code.
AC_DEFUN([_LT_LINKER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -1174,12 +972,20 @@ $rm conftest*
# If we don't find anything, use the default library path according
# to the aix ld manual.
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi],[])
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
])# _LT_AC_SYS_LIBPATH_AIX
@@ -1410,13 +1216,17 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
*32-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
@@ -1433,6 +1243,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
;;
*64-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
@@ -1504,7 +1317,7 @@ AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
AC_CACHE_CHECK([$1], [$2],
[$2=no
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$3"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -1545,11 +1358,12 @@ fi
# ------------------------------------------------------------
# Check whether the given compiler option works
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
[$2=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $3"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -1663,24 +1477,27 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
fi
;;
*)
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
= "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
;;
esac
])
@@ -1907,7 +1724,8 @@ fi
# ---------------------------------
# Check to see if options -c and -o are simultaneously supported by compiler
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
@@ -1915,7 +1733,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -2055,6 +1873,7 @@ else
darwin*)
if test -n "$STRIP" ; then
striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
@@ -2072,7 +1891,8 @@ fi
# -----------------------------
# PORTME Fill in your ld.so characteristics
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
library_names_spec=
libname_spec='lib$name'
soname_spec=
@@ -2086,20 +1906,58 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
+m4_if($1,[],[
if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
# if the path contains ";" then we assume it to be the separator
# otherwise default to the standard path separator (i.e. ":") - it is
# assumed that no part of a normal pathname contains ";" but that should
# okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`echo $lt_search_path_spec`
else
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+fi])
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -2256,12 +2114,8 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+ m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -2315,7 +2169,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -2378,7 +2232,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[[3-9]]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -2449,7 +2303,7 @@ linux* | k*bsd*-gnu)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -2555,6 +2409,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -2660,7 +2518,8 @@ fi
# _LT_AC_TAGCONFIG
# ----------------
AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_ARG_WITH([tags],
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
[include additional configurations @<:@automatic@:>@])],
[tagnames="$withval"])
@@ -2921,7 +2780,7 @@ m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
# AC_PATH_TOOL_PREFIX
# -------------------
-# find a file program which can recognise shared library
+# find a file program which can recognize shared library
AC_DEFUN([AC_PATH_TOOL_PREFIX],
[AC_REQUIRE([AC_PROG_EGREP])dnl
AC_MSG_CHECKING([for $1])
@@ -2984,7 +2843,7 @@ fi
# AC_PATH_MAGIC
# -------------
-# find a file program which can recognise a shared library
+# find a file program which can recognize a shared library
AC_DEFUN([AC_PATH_MAGIC],
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -3131,7 +2990,7 @@ esac
# how to check for library dependencies
# -- PORTME fill in with the dynamic library characteristics
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
+[AC_CACHE_CHECK([how to recognize dependent libraries],
lt_cv_deplibs_check_method,
[lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -3170,9 +3029,15 @@ cygwin*)
mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
@@ -3217,7 +3082,7 @@ hpux10.20* | hpux11*)
esac
;;
-interix3*)
+interix[[3-9]]*)
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
;;
@@ -3267,6 +3132,10 @@ osf3* | osf4* | osf5*)
lt_cv_deplibs_check_method=pass_all
;;
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3319,7 +3188,7 @@ AC_DEFUN([AC_PROG_NM],
lt_cv_path_NM="$NM"
else
lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm"
fi
for lt_tmp_nm in $lt_nm_to_check; do
@@ -3535,10 +3404,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
+lt_simple_link_test_code='int main(){return(0);}'
_LT_AC_SYS_COMPILER
@@ -3640,10 +3509,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -3789,7 +3658,7 @@ case $host_os in
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ :
else
# We have old collect2
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
@@ -3948,10 +3817,10 @@ case $host_os in
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -4034,9 +3903,7 @@ case $host_os in
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
case $host_cpu in
- hppa*64*|ia64*)
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- ;;
+ hppa*64*|ia64*) ;;
*)
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
;;
@@ -4104,7 +3971,7 @@ case $host_os in
;;
esac
;;
- interix3*)
+ interix[[3-9]]*)
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
@@ -4224,6 +4091,29 @@ case $host_os in
# dependencies.
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
esac
;;
lynxos*)
@@ -4262,16 +4152,20 @@ case $host_os in
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
openbsd*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ if test -f /usr/libexec/ld.so; then
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd='echo'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
- output_verbose_link_cmd='echo'
;;
osf3*)
case $cc_basename in
@@ -4433,15 +4327,10 @@ case $host_os in
case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
;;
esac
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
@@ -4488,6 +4377,12 @@ case $host_os in
fi
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
fi
;;
esac
@@ -4731,7 +4626,7 @@ $rm -f confest.$objext
# PORTME: override above test on systems where it is broken
ifelse([$1],[CXX],
[case $host_os in
-interix3*)
+interix[[3-9]]*)
# Interix 3.5 installs completely hosed .la files for C++, so rather than
# hack all around it, let's just trust "g++" to DTRT.
_LT_AC_TAGVAR(predep_objects,$1)=
@@ -4739,13 +4634,46 @@ interix3*)
_LT_AC_TAGVAR(postdeps,$1)=
;;
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ #
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
solaris*)
case $cc_basename in
CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
# Adding this requires a known-good setup of shared libraries for
# Sun compiler versions before 5.6, else PIC objects from an old
# archive will be linked into the output, leading to subtle bugs.
- _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
;;
esac
;;
@@ -4794,10 +4722,17 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
# Code to be used in simple link tests
-lt_simple_link_test_code=" program t\n end\n"
+lt_simple_link_test_code="\
+ program t
+ end
+"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -4876,10 +4811,10 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
+lt_simple_compile_test_code="class foo {}"
# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_AC_SYS_COMPILER
@@ -4932,7 +4867,7 @@ objext=o
_LT_AC_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
# Code to be used in simple link tests
lt_simple_link_test_code="$lt_simple_compile_test_code"
@@ -5021,6 +4956,7 @@ if test -f "$ltmain"; then
_LT_AC_TAGVAR(module_cmds, $1) \
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+ _LT_AC_TAGVAR(fix_srcfile_path, $1) \
_LT_AC_TAGVAR(exclude_expsyms, $1) \
_LT_AC_TAGVAR(include_expsyms, $1); do
@@ -5067,7 +5003,7 @@ ifelse([$1], [],
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
@@ -5392,7 +5328,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
@@ -5475,6 +5411,7 @@ fi
# ---------------------------------
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([LT_AC_PROG_SED])
AC_REQUIRE([AC_PROG_NM])
AC_REQUIRE([AC_OBJEXT])
# Check for command to grab the raw symbol name followed by C symbol from nm.
@@ -5701,12 +5638,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# like `-m68040'.
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | os2* | pw32*)
+ mingw* | cygwin* | os2* | pw32*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
;;
darwin* | rhapsody*)
@@ -5718,7 +5657,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# DJGPP does not support shared libraries at all
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
;;
- interix3*)
+ interix[[3-9]]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -5854,6 +5793,14 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
;;
esac
;;
@@ -5974,13 +5921,15 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
;;
@@ -5990,7 +5939,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
;;
- interix3*)
+ interix[[3-9]]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -6048,7 +5997,7 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
esac
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
@@ -6100,6 +6049,22 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
# All Alpha code is PIC.
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -6109,6 +6074,10 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ rdos*)
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
solaris*)
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -6203,7 +6172,8 @@ AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
# ------------------------------------
# See if the linker supports building shared libraries.
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
ifelse([$1],[CXX],[
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
@@ -6220,7 +6190,7 @@ ifelse([$1],[CXX],[
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
;;
cygwin* | mingw*)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
;;
linux* | k*bsd*-gnu)
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
@@ -6362,7 +6332,7 @@ EOF
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_AC_TAGVAR(always_export_symbols, $1)=no
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -6380,7 +6350,7 @@ EOF
fi
;;
- interix3*)
+ interix[[3-9]]*)
_LT_AC_TAGVAR(hardcode_direct, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
@@ -6395,7 +6365,7 @@ EOF
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux* | k*bsd*-gnu)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -6413,13 +6383,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
_LT_AC_TAGVAR(link_all_deplibs, $1)=no
else
@@ -6460,7 +6439,7 @@ EOF
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
_LT_AC_TAGVAR(ld_shlibs, $1)=no
cat <<_LT_EOF 1>&2
@@ -6579,7 +6558,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ :
else
# We have old collect2
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
@@ -6672,7 +6651,7 @@ _LT_EOF
# The linker will automatically build a .lib file if we build a DLL.
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
# FIXME: Should let the user specify the lib program.
- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
_LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
;;
@@ -6714,10 +6693,10 @@ _LT_EOF
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
_LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
_LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -6879,24 +6858,28 @@ _LT_EOF
;;
openbsd*)
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
;;
@@ -6955,17 +6938,16 @@ _LT_EOF
case $host_os in
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
- *)
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
;;
@@ -7022,7 +7004,7 @@ _LT_EOF
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -7097,7 +7079,7 @@ x|xyes)
# to ld, don't add -lc before -lgcc.
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
soname=conftest
@@ -7200,6 +7182,30 @@ AC_DEFUN([LT_AC_PROG_RC],
[AC_CHECK_TOOL(RC, windres, no)
])
+
+# Cheap backport of AS_EXECUTABLE_P and required macros
+# from Autoconf 2.59; we should not use $as_executable_p directly.
+
+# _AS_TEST_PREPARE
+# ----------------
+m4_ifndef([_AS_TEST_PREPARE],
+[m4_defun([_AS_TEST_PREPARE],
+[if test -x / >/dev/null 2>&1; then
+ as_executable_p='test -x'
+else
+ as_executable_p='test -f'
+fi
+])])# _AS_TEST_PREPARE
+
+# AS_EXECUTABLE_P
+# ---------------
+# Check whether a file is executable.
+m4_ifndef([AS_EXECUTABLE_P],
+[m4_defun([AS_EXECUTABLE_P],
+[AS_REQUIRE([_AS_TEST_PREPARE])dnl
+$as_executable_p $1[]dnl
+])])# AS_EXECUTABLE_P
+
# NOTE: This macro has been submitted for inclusion into #
# GNU Autoconf as AC_PROG_SED. When it is available in #
# a released version of Autoconf we should remove this #
@@ -7220,12 +7226,13 @@ do
test -z "$as_dir" && as_dir=.
for lt_ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
fi
done
done
done
+IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -7258,6 +7265,7 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
done
])
SED=$lt_cv_path_SED
+AC_SUBST([SED])
AC_MSG_RESULT([$SED])
])
@@ -7409,7 +7417,7 @@ path to pkg-config.
_PKG_TEXT
-To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
[$4])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
@@ -8310,4 +8318,5 @@ m4_include([m4/idl.m4])
m4_include([m4/openssl.m4])
m4_include([m4/reentrant-resolver.m4])
m4_include([m4/sasl2.m4])
+m4_include([m4/string-arch-unaligned.m4])
m4_include([acinclude.m4])
diff --git a/art/Makefile.am b/art/Makefile.am
@@ -7,12 +7,23 @@ nobase_dist_icons_DATA = \
48x48/apps/mail-notification.png \
scalable/apps/mail-notification.svg
-app_pixmapsdir = $(pkgdatadir)/ui
-dist_app_pixmaps_DATA = logo.png
+dist_pkgdata_DATA = logo.png
if WITH_GMAIL
-dist_app_pixmaps_DATA += gmail.png
+dist_pkgdata_DATA += gmail.png
endif
-install-data-hook:
+if WITH_YAHOO
+dist_pkgdata_DATA += yahoo.png
+endif
+
+if WITH_HOTMAIL
+dist_pkgdata_DATA += hotmail.png
+endif
+
+install-data-hook: update-icon-cache
+
+uninstall-hook: update-icon-cache
+
+update-icon-cache:
-gtk-update-icon-cache -f -t $(iconsdir)
diff --git a/art/Makefile.in b/art/Makefile.in
@@ -34,17 +34,19 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
@WITH_GMAIL_TRUE@am__append_1 = gmail.png
+@WITH_YAHOO_TRUE@am__append_2 = yahoo.png
+@WITH_HOTMAIL_TRUE@am__append_3 = hotmail.png
subdir = art
-DIST_COMMON = $(am__dist_app_pixmaps_DATA_DIST) \
- $(nobase_dist_icons_DATA) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+DIST_COMMON = $(am__dist_pkgdata_DATA_DIST) $(nobase_dist_icons_DATA) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/evolution-plugin.m4 \
$(top_srcdir)/m4/gnome.m4 $(top_srcdir)/m4/idl.m4 \
$(top_srcdir)/m4/openssl.m4 \
$(top_srcdir)/m4/reentrant-resolver.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sasl2.m4 \
+ $(top_srcdir)/m4/string-arch-unaligned.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -52,18 +54,17 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
-am__dist_app_pixmaps_DATA_DIST = logo.png gmail.png
+am__dist_pkgdata_DATA_DIST = logo.png gmail.png yahoo.png hotmail.png
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(app_pixmapsdir)" \
- "$(DESTDIR)$(iconsdir)"
-dist_app_pixmapsDATA_INSTALL = $(INSTALL_DATA)
+am__installdirs = "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(iconsdir)"
+dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
nobase_dist_iconsDATA_INSTALL = $(install_sh_DATA)
-DATA = $(dist_app_pixmaps_DATA) $(nobase_dist_icons_DATA)
+DATA = $(dist_pkgdata_DATA) $(nobase_dist_icons_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
@@ -110,11 +111,11 @@ GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_CFLAGS = @GNOME_CFLAGS@
+GNOME_KEYRING_CFLAGS = @GNOME_KEYRING_CFLAGS@
+GNOME_KEYRING_LIBS = @GNOME_KEYRING_LIBS@
GNOME_LIBS = @GNOME_LIBS@
GOB2 = @GOB2@
GREP = @GREP@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_LIBS = @GTK_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -126,14 +127,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_ICONV = @INTLTOOL_ICONV@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
-INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
@@ -145,7 +144,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
@@ -179,6 +177,7 @@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SASL_CFLAGS = @SASL_CFLAGS@
SASL_LIBS = @SASL_LIBS@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -253,8 +252,8 @@ nobase_dist_icons_DATA = \
48x48/apps/mail-notification.png \
scalable/apps/mail-notification.svg
-app_pixmapsdir = $(pkgdatadir)/ui
-dist_app_pixmaps_DATA = logo.png $(am__append_1)
+dist_pkgdata_DATA = logo.png $(am__append_1) $(am__append_2) \
+ $(am__append_3)
all: all-am
.SUFFIXES:
@@ -293,22 +292,22 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-install-dist_app_pixmapsDATA: $(dist_app_pixmaps_DATA)
+install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
@$(NORMAL_INSTALL)
- test -z "$(app_pixmapsdir)" || $(MKDIR_P) "$(DESTDIR)$(app_pixmapsdir)"
- @list='$(dist_app_pixmaps_DATA)'; for p in $$list; do \
+ test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
+ @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
- echo " $(dist_app_pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(app_pixmapsdir)/$$f'"; \
- $(dist_app_pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(app_pixmapsdir)/$$f"; \
+ echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+ $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
-uninstall-dist_app_pixmapsDATA:
+uninstall-dist_pkgdataDATA:
@$(NORMAL_UNINSTALL)
- @list='$(dist_app_pixmaps_DATA)'; for p in $$list; do \
+ @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(app_pixmapsdir)/$$f'"; \
- rm -f "$(DESTDIR)$(app_pixmapsdir)/$$f"; \
+ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
install-nobase_dist_iconsDATA: $(nobase_dist_icons_DATA)
@$(NORMAL_INSTALL)
@@ -366,7 +365,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(app_pixmapsdir)" "$(DESTDIR)$(iconsdir)"; do \
+ for dir in "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(iconsdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -411,7 +410,7 @@ info: info-am
info-am:
-install-data-am: install-dist_app_pixmapsDATA \
+install-data-am: install-dist_pkgdataDATA \
install-nobase_dist_iconsDATA
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
@@ -448,16 +447,18 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-dist_app_pixmapsDATA \
+uninstall-am: uninstall-dist_pkgdataDATA \
uninstall-nobase_dist_iconsDATA
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
-.MAKE: install-am install-data-am install-strip
+.MAKE: install-am install-data-am install-strip uninstall-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-hook \
- install-dist_app_pixmapsDATA install-dvi install-dvi-am \
+ install-dist_pkgdataDATA install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man \
install-nobase_dist_iconsDATA install-pdf install-pdf-am \
@@ -465,10 +466,15 @@ uninstall-am: uninstall-dist_app_pixmapsDATA \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-dist_app_pixmapsDATA uninstall-nobase_dist_iconsDATA
+ uninstall-dist_pkgdataDATA uninstall-hook \
+ uninstall-nobase_dist_iconsDATA
+
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
-install-data-hook:
+update-icon-cache:
-gtk-update-icon-cache -f -t $(iconsdir)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/art/hotmail.png b/art/hotmail.png
Binary files differ.
diff --git a/art/yahoo.png b/art/yahoo.png
Binary files differ.
diff --git a/config.guess b/config.guess
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
-timestamp='2006-07-02'
+timestamp='2007-03-06'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -161,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@@ -780,7 +781,7 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
- i*:MINGW*:*)
+ *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
@@ -790,12 +791,15 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[3456]*)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T:Interix*:[3456]*)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
@@ -950,6 +954,9 @@ EOF
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
+ xtensa:Linux:*:*)
+ echo xtensa-unknown-linux-gnu
+ exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
@@ -1208,6 +1215,15 @@ EOF
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
diff --git a/config.h.in b/config.h.in
@@ -78,6 +78,9 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* taken from glibc */
+#undef STRING_ARCH_UNALIGNED
+
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
@@ -87,9 +90,15 @@
/* Define to 1 if evolution is enabled, 0 otherwise */
#undef WITH_EVOLUTION
+/* Define to 1 if gconf-sanity-check is enabled, 0 otherwise */
+#undef WITH_GCONF_SANITY_CHECK
+
/* Define to 1 if gmail is enabled, 0 otherwise */
#undef WITH_GMAIL
+/* Define to 1 if hotmail is enabled, 0 otherwise */
+#undef WITH_HOTMAIL
+
/* Define to 1 if imap is enabled, 0 otherwise */
#undef WITH_IMAP
@@ -123,8 +132,12 @@
/* Define to 1 if sylpheed is enabled, 0 otherwise */
#undef WITH_SYLPHEED
-/* Define to 1 if sylpheed-locking is enabled, 0 otherwise */
-#undef WITH_SYLPHEED_LOCKING
+/* Define to 1 if yahoo is enabled, 0 otherwise */
+#undef WITH_YAHOO
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
diff --git a/config.sub b/config.sub
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
-timestamp='2006-09-20'
+timestamp='2007-01-18'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -245,12 +245,12 @@ case $basic_machine in
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
+ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore \
+ | maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -324,7 +324,7 @@ case $basic_machine in
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
@@ -925,6 +925,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
sh64)
basic_machine=sh64-unknown
;;
@@ -1219,7 +1222,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1414,6 +1417,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
+ mep-*)
+ os=-elf
+ ;;
mips*-cisco)
os=-elf
;;
diff --git a/configure b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for Mail Notification 4.1.
+# Generated by GNU Autoconf 2.61 for Mail Notification 5.0-rc1.
#
# Report bugs to <jylefort@brutele.be>.
#
@@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='Mail Notification'
PACKAGE_TARNAME='mail-notification'
-PACKAGE_VERSION='4.1'
-PACKAGE_STRING='Mail Notification 4.1'
+PACKAGE_VERSION='5.0-rc1'
+PACKAGE_STRING='Mail Notification 5.0-rc1'
PACKAGE_BUGREPORT='jylefort@brutele.be'
ac_unique_file="src/mn-main.c"
@@ -862,6 +862,7 @@ AMDEPBACKSLASH
CCDEPMODE
am__fastdepCC_TRUE
am__fastdepCC_FALSE
+SED
GREP
EGREP
LN_S
@@ -915,18 +916,13 @@ INTLTOOL_CAVES_RULE
INTLTOOL_SCHEMAS_RULE
INTLTOOL_THEME_RULE
INTLTOOL_SERVICE_RULE
+INTLTOOL_POLICY_RULE
INTLTOOL_EXTRACT
INTLTOOL_MERGE
INTLTOOL_UPDATE
INTLTOOL_PERL
-INTLTOOL_ICONV
-INTLTOOL_MSGFMT
-INTLTOOL_MSGMERGE
-INTLTOOL_XGETTEXT
ALL_LINGUAS
PKG_CONFIG
-GTK_CFLAGS
-GTK_LIBS
GNOME_CFLAGS
GNOME_LIBS
GCONF_SCHEMA_CONFIG_SOURCE
@@ -941,6 +937,8 @@ AML
GOB2
GMIME_CFLAGS
GMIME_LIBS
+GNOME_KEYRING_CFLAGS
+GNOME_KEYRING_LIBS
OPENSSL_CFLAGS
OPENSSL_LIBS
SASL_CFLAGS
@@ -964,18 +962,26 @@ WITH_IMAP_TRUE
WITH_IMAP_FALSE
WITH_POP3_OR_IMAP_TRUE
WITH_POP3_OR_IMAP_FALSE
-WITH_POP3_OR_IMAP_OR_GMAIL_TRUE
-WITH_POP3_OR_IMAP_OR_GMAIL_FALSE
+WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE
+WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_FALSE
+WITH_YAHOO_OR_HOTMAIL_TRUE
+WITH_YAHOO_OR_HOTMAIL_FALSE
WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE
WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_FALSE
WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE
WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_FALSE
+WITH_MAILDIR_OR_SYLPHEED_TRUE
+WITH_MAILDIR_OR_SYLPHEED_FALSE
WITH_SSL_TRUE
WITH_SSL_FALSE
WITH_SASL_TRUE
WITH_SASL_FALSE
WITH_GMAIL_TRUE
WITH_GMAIL_FALSE
+WITH_YAHOO_TRUE
+WITH_YAHOO_FALSE
+WITH_HOTMAIL_TRUE
+WITH_HOTMAIL_FALSE
WITH_EVOLUTION_TRUE
WITH_EVOLUTION_FALSE
WITH_SYLPHEED_TRUE
@@ -1007,6 +1013,8 @@ GNOME_CFLAGS
GNOME_LIBS
GMIME_CFLAGS
GMIME_LIBS
+GNOME_KEYRING_CFLAGS
+GNOME_KEYRING_LIBS
EVOLUTION_PLUGIN_CFLAGS
EVOLUTION_PLUGIN_LIBS'
@@ -1511,7 +1519,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Mail Notification 4.1 to adapt to many kinds of systems.
+\`configure' configures Mail Notification 5.0-rc1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1582,32 +1590,34 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Mail Notification 4.1:";;
+ short | recursive ) echo "Configuration of Mail Notification 5.0-rc1:";;
esac
cat <<\_ACEOF
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-evolution disable Evolution support
+ --disable-gmail disable Gmail support
+ --disable-hotmail disable Windows Live Hotmail support
+ --disable-imap disable IMAP support
+ --disable-maildir disable Maildir support
--disable-mbox disable mbox support
--disable-mh disable MH support
- --disable-maildir disable Maildir support
- --disable-pop3 disable POP3 support
- --disable-imap disable IMAP support
- --disable-ssl disable SSL/TLS support
- --disable-sasl disable SASL authentication support
- --disable-ipv6 disable IPv6 support
- --disable-gmail disable Gmail support
- --disable-evolution disable Evolution support
--disable-mozilla disable Mozilla products support
+ --disable-pop3 disable POP3 support
--disable-sylpheed disable Sylpheed support
- --enable-sylpheed-locking
- enable .sylpheed_mark locking
+ --disable-yahoo disable Yahoo! Mail support
+ --disable-ipv6 disable IPv6 support
+ --disable-sasl disable SASL authentication support
+ --disable-ssl disable SSL/TLS support
--enable-compile-warnings=no|yes|error
enable compiler warnings [no]
- --enable-debug enable assertions and cast checks
+ --disable-debug disable assertions and cast checks
--enable-regression-tests
build and run regression tests
+ --disable-gconf-sanity-check
+ disable the startup GConf sanity check
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
--enable-shared[=PKGS] build shared libraries [default=yes]
@@ -1618,7 +1628,6 @@ Optional Features:
--enable-dependency-tracking do not reject slow dependency extractors
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-largefile omit support for large files
- --disable-gtktest do not try to compile and run a test GTK+ program
--disable-schemas-install Disable the schemas installation
Optional Packages:
@@ -1655,6 +1664,10 @@ Some influential environment variables:
GMIME_CFLAGS
C compiler flags for GMIME, overriding pkg-config
GMIME_LIBS linker flags for GMIME, overriding pkg-config
+ GNOME_KEYRING_CFLAGS
+ C compiler flags for GNOME_KEYRING, overriding pkg-config
+ GNOME_KEYRING_LIBS
+ linker flags for GNOME_KEYRING, overriding pkg-config
EVOLUTION_PLUGIN_CFLAGS
C compiler flags for EVOLUTION_PLUGIN, overriding pkg-config
EVOLUTION_PLUGIN_LIBS
@@ -1724,7 +1737,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Mail Notification configure 4.1
+Mail Notification configure 5.0-rc1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1738,7 +1751,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Mail Notification $as_me 4.1, which was
+It was created by Mail Notification $as_me 5.0-rc1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2191,6 +2204,67 @@ fi
### command line arguments
+# mailbox backends
+# Check whether --enable-evolution was given.
+if test "${enable_evolution+set}" = set; then
+ enableval=$enable_evolution; case "$enableval" in
+ yes|no) enable_evolution=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-evolution" >&5
+echo "$as_me: error: bad value $enableval for --enable-evolution" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ enable_evolution=yes
+fi
+
+# Check whether --enable-gmail was given.
+if test "${enable_gmail+set}" = set; then
+ enableval=$enable_gmail; case "$enableval" in
+ yes|no) enable_gmail=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gmail" >&5
+echo "$as_me: error: bad value $enableval for --enable-gmail" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ enable_gmail=yes
+fi
+
+# Check whether --enable-hotmail was given.
+if test "${enable_hotmail+set}" = set; then
+ enableval=$enable_hotmail; case "$enableval" in
+ yes|no) enable_hotmail=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-hotmail" >&5
+echo "$as_me: error: bad value $enableval for --enable-hotmail" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ enable_hotmail=yes
+fi
+
+# Check whether --enable-imap was given.
+if test "${enable_imap+set}" = set; then
+ enableval=$enable_imap; case "$enableval" in
+ yes|no) enable_imap=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-imap" >&5
+echo "$as_me: error: bad value $enableval for --enable-imap" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ enable_imap=yes
+fi
+
+# Check whether --enable-maildir was given.
+if test "${enable_maildir+set}" = set; then
+ enableval=$enable_maildir; case "$enableval" in
+ yes|no) enable_maildir=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-maildir" >&5
+echo "$as_me: error: bad value $enableval for --enable-maildir" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ enable_maildir=yes
+fi
+
# Check whether --enable-mbox was given.
if test "${enable_mbox+set}" = set; then
enableval=$enable_mbox; case "$enableval" in
@@ -2215,16 +2289,16 @@ else
enable_mh=yes
fi
-# Check whether --enable-maildir was given.
-if test "${enable_maildir+set}" = set; then
- enableval=$enable_maildir; case "$enableval" in
- yes|no) enable_maildir=$enableval ;;
- *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-maildir" >&5
-echo "$as_me: error: bad value $enableval for --enable-maildir" >&2;}
+# Check whether --enable-mozilla was given.
+if test "${enable_mozilla+set}" = set; then
+ enableval=$enable_mozilla; case "$enableval" in
+ yes|no) enable_mozilla=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-mozilla" >&5
+echo "$as_me: error: bad value $enableval for --enable-mozilla" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
- enable_maildir=yes
+ enable_mozilla=yes
fi
# Check whether --enable-pop3 was given.
@@ -2239,42 +2313,32 @@ else
enable_pop3=yes
fi
-# Check whether --enable-imap was given.
-if test "${enable_imap+set}" = set; then
- enableval=$enable_imap; case "$enableval" in
- yes|no) enable_imap=$enableval ;;
- *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-imap" >&5
-echo "$as_me: error: bad value $enableval for --enable-imap" >&2;}
+# Check whether --enable-sylpheed was given.
+if test "${enable_sylpheed+set}" = set; then
+ enableval=$enable_sylpheed; case "$enableval" in
+ yes|no) enable_sylpheed=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sylpheed" >&5
+echo "$as_me: error: bad value $enableval for --enable-sylpheed" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
- enable_imap=yes
+ enable_sylpheed=yes
fi
-# Check whether --enable-ssl was given.
-if test "${enable_ssl+set}" = set; then
- enableval=$enable_ssl; case "$enableval" in
- yes|no) enable_ssl=$enableval ;;
- *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ssl" >&5
-echo "$as_me: error: bad value $enableval for --enable-ssl" >&2;}
+# Check whether --enable-yahoo was given.
+if test "${enable_yahoo+set}" = set; then
+ enableval=$enable_yahoo; case "$enableval" in
+ yes|no) enable_yahoo=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-yahoo" >&5
+echo "$as_me: error: bad value $enableval for --enable-yahoo" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
- enable_ssl=yes
+ enable_yahoo=yes
fi
-# Check whether --enable-sasl was given.
-if test "${enable_sasl+set}" = set; then
- enableval=$enable_sasl; case "$enableval" in
- yes|no) enable_sasl=$enableval ;;
- *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sasl" >&5
-echo "$as_me: error: bad value $enableval for --enable-sasl" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- enable_sasl=yes
-fi
+# POP3 and IMAP features
# Check whether --enable-ipv6 was given.
if test "${enable_ipv6+set}" = set; then
enableval=$enable_ipv6; case "$enableval" in
@@ -2287,67 +2351,32 @@ else
enable_ipv6=yes
fi
-# Check whether --enable-gmail was given.
-if test "${enable_gmail+set}" = set; then
- enableval=$enable_gmail; case "$enableval" in
- yes|no) enable_gmail=$enableval ;;
- *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gmail" >&5
-echo "$as_me: error: bad value $enableval for --enable-gmail" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- enable_gmail=yes
-fi
-
-# Check whether --enable-evolution was given.
-if test "${enable_evolution+set}" = set; then
- enableval=$enable_evolution; case "$enableval" in
- yes|no) enable_evolution=$enableval ;;
- *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-evolution" >&5
-echo "$as_me: error: bad value $enableval for --enable-evolution" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- enable_evolution=yes
-fi
-
-# Check whether --enable-mozilla was given.
-if test "${enable_mozilla+set}" = set; then
- enableval=$enable_mozilla; case "$enableval" in
- yes|no) enable_mozilla=$enableval ;;
- *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-mozilla" >&5
-echo "$as_me: error: bad value $enableval for --enable-mozilla" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- enable_mozilla=yes
-fi
-
-# Check whether --enable-sylpheed was given.
-if test "${enable_sylpheed+set}" = set; then
- enableval=$enable_sylpheed; case "$enableval" in
- yes|no) enable_sylpheed=$enableval ;;
- *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sylpheed" >&5
-echo "$as_me: error: bad value $enableval for --enable-sylpheed" >&2;}
+# Check whether --enable-sasl was given.
+if test "${enable_sasl+set}" = set; then
+ enableval=$enable_sasl; case "$enableval" in
+ yes|no) enable_sasl=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sasl" >&5
+echo "$as_me: error: bad value $enableval for --enable-sasl" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
- enable_sylpheed=yes
+ enable_sasl=yes
fi
-# Check whether --enable-sylpheed-locking was given.
-if test "${enable_sylpheed_locking+set}" = set; then
- enableval=$enable_sylpheed_locking; case "$enableval" in
- yes|no) enable_sylpheed_locking=$enableval ;;
- *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sylpheed-locking" >&5
-echo "$as_me: error: bad value $enableval for --enable-sylpheed-locking" >&2;}
+# Check whether --enable-ssl was given.
+if test "${enable_ssl+set}" = set; then
+ enableval=$enable_ssl; case "$enableval" in
+ yes|no) enable_ssl=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ssl" >&5
+echo "$as_me: error: bad value $enableval for --enable-ssl" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
- enable_sylpheed_locking=no
+ enable_ssl=yes
fi
+# miscellaneous
# Check whether --enable-compile-warnings was given.
if test "${enable_compile_warnings+set}" = set; then
enableval=$enable_compile_warnings; case "$enableval" in
@@ -2395,7 +2424,7 @@ echo "$as_me: error: bad value $enableval for --enable-debug" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
- enable_debug=no
+ enable_debug=yes
fi
@@ -2418,10 +2447,22 @@ else
enable_regression_tests=no
fi
+# Check whether --enable-gconf-sanity-check was given.
+if test "${enable_gconf_sanity_check+set}" = set; then
+ enableval=$enable_gconf_sanity_check; case "$enableval" in
+ yes|no) enable_gconf_sanity_check=$enableval ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gconf-sanity-check" >&5
+echo "$as_me: error: bad value $enableval for --enable-gconf-sanity-check" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ enable_gconf_sanity_check=yes
+fi
+
### initialization
-# needed by AC_REENTRANT_RESOLVER
+# needed by AC_REENTRANT_RESOLVER and AC_STRING_ARCH_UNALIGNED
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
if test -f "$ac_dir/install-sh"; then
@@ -2886,7 +2927,7 @@ fi
# Define the identity of the package.
PACKAGE='mail-notification'
- VERSION='4.1'
+ VERSION='5.0-rc1'
cat >>confdefs.h <<_ACEOF
@@ -4231,12 +4272,13 @@ do
test -z "$as_dir" && as_dir=.
for lt_ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
fi
done
done
done
+IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -4271,6 +4313,7 @@ done
fi
SED=$lt_cv_path_SED
+
{ echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6; }
@@ -4632,8 +4675,8 @@ else
echo "${ECHO_T}no, using $LN_S" >&6; }
fi
-{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
if test "${lt_cv_deplibs_check_method+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -4674,9 +4717,15 @@ cygwin*)
mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump'.
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
@@ -4721,7 +4770,7 @@ hpux10.20* | hpux11*)
esac
;;
-interix3*)
+interix[3-9]*)
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
;;
@@ -4771,6 +4820,10 @@ osf3* | osf4* | osf5*)
lt_cv_deplibs_check_method=pass_all
;;
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -4858,7 +4911,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4861 "configure"' > conftest.$ac_ext
+ echo '#line 4914 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -4893,7 +4946,8 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -4904,6 +4958,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
case `/usr/bin/file conftest.o` in
*32-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
@@ -4920,6 +4977,9 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
;;
*64-bit*)
case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
@@ -6712,24 +6772,27 @@ else
fi
;;
*)
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
= "XX$teststring") >/dev/null 2>&1 &&
- new_result=`expr "X$teststring" : ".*" 2>&1` &&
- lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- teststring=
- # Add a significant safety factor because C++ compilers can tack on massive
- # amounts of additional arguments before passing them to the linker.
- # It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
;;
esac
@@ -6746,6 +6809,7 @@ fi
+
# Check for command to grab the raw symbol name followed by C symbol from nm.
{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
@@ -7334,7 +7398,7 @@ test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
@@ -7534,10 +7598,10 @@ objext=o
objext=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
+lt_simple_link_test_code='int main(){return(0);}'
# If no C compiler was specified, use CC.
@@ -7552,13 +7616,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -7578,7 +7642,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -7589,11 +7653,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7592: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7656: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7596: \$? = $ac_status" >&5
+ echo "$as_me:7660: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7644,13 +7708,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
lt_prog_compiler_pic='-DDLL_EXPORT'
;;
@@ -7660,7 +7726,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -7718,7 +7784,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
esac
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
@@ -7770,6 +7836,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# All Alpha code is PIC.
lt_prog_compiler_static='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -7779,6 +7861,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
@@ -7846,7 +7932,7 @@ if test "${lt_prog_compiler_pic_works+set}" = set; then
else
lt_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -7857,11 +7943,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7860: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7946: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7864: \$? = $ac_status" >&5
+ echo "$as_me:7950: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7910,7 +7996,7 @@ else
lt_prog_compiler_static_works=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -7950,7 +8036,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -7961,11 +8047,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7964: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8050: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7968: \$? = $ac_status" >&5
+ echo "$as_me:8054: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8157,7 +8243,7 @@ EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -8175,7 +8261,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct=no
hardcode_shlibpath_var=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
@@ -8190,7 +8276,7 @@ EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux* | k*bsd*-gnu)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -8208,13 +8294,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
link_all_deplibs=no
else
@@ -8374,7 +8469,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct=yes
+ :
else
# We have old collect2
hardcode_direct=unsupported
@@ -8448,11 +8543,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -8507,11 +8609,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -8565,7 +8674,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes=yes
;;
@@ -8607,10 +8716,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -8772,24 +8881,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
openbsd*)
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
+ ld_shlibs=no
fi
;;
@@ -8848,17 +8961,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs=yes
;;
@@ -8915,7 +9027,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag='${wl}-z,text'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
@@ -8992,7 +9104,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -9050,17 +9162,55 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
+
if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
# if the path contains ";" then we assume it to be the separator
# otherwise default to the standard path separator (i.e. ":") - it is
# assumed that no part of a normal pathname contains ";" but that should
# okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`echo $lt_search_path_spec`
else
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
fi
@@ -9220,12 +9370,8 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -9279,7 +9425,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -9342,7 +9488,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -9413,7 +9559,7 @@ linux* | k*bsd*-gnu)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -9519,6 +9665,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -9672,6 +9822,7 @@ else
darwin*)
if test -n "$STRIP" ; then
striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
@@ -10258,7 +10409,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10261 "configure"
+#line 10412 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10358,7 +10509,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10361 "configure"
+#line 10512 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10556,6 +10707,7 @@ if test -f "$ltmain"; then
module_cmds \
module_expsym_cmds \
lt_cv_prog_compiler_c_o \
+ fix_srcfile_path \
exclude_expsyms \
include_expsyms; do
@@ -10600,7 +10752,7 @@ echo "$as_me: creating $ofile" >&6;}
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
@@ -10924,7 +11076,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols
@@ -11093,10 +11245,10 @@ objext=o
objext_CXX=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -11112,13 +11264,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -11377,7 +11529,7 @@ case $host_os in
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_CXX=yes
+ :
else
# We have old collect2
hardcode_direct_CXX=unsupported
@@ -11451,11 +11603,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -11511,11 +11670,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -11634,10 +11800,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -11720,9 +11886,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_separator_CXX=:
case $host_cpu in
- hppa*64*|ia64*)
- hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
- ;;
+ hppa*64*|ia64*) ;;
*)
export_dynamic_flag_spec_CXX='${wl}-E'
;;
@@ -11790,7 +11954,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
esac
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_CXX=no
hardcode_shlibpath_var_CXX=no
hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
@@ -11910,6 +12074,29 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# dependencies.
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
esac
;;
lynxos*)
@@ -11948,16 +12135,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
ld_shlibs_CXX=no
;;
openbsd*)
- hardcode_direct_CXX=yes
- hardcode_shlibpath_var_CXX=no
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- export_dynamic_flag_spec_CXX='${wl}-E'
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd='echo'
+ else
+ ld_shlibs_CXX=no
fi
- output_verbose_link_cmd='echo'
;;
osf3*)
case $cc_basename in
@@ -12119,15 +12310,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker. We must also pass each convience library through
- # to the system linker between allextract/defaultextract.
- # The C++ compiler will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
;;
esac
link_all_deplibs_CXX=yes
@@ -12174,6 +12360,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
fi
;;
esac
@@ -12365,7 +12557,7 @@ $rm -f confest.$objext
# PORTME: override above test on systems where it is broken
case $host_os in
-interix3*)
+interix[3-9]*)
# Interix 3.5 installs completely hosed .la files for C++, so rather than
# hack all around it, let's just trust "g++" to DTRT.
predep_objects_CXX=
@@ -12373,13 +12565,46 @@ interix3*)
postdeps_CXX=
;;
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ #
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
solaris*)
case $cc_basename in
CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
# Adding this requires a known-good setup of shared libraries for
# Sun compiler versions before 5.6, else PIC objects from an old
# archive will be linked into the output, leading to subtle bugs.
- postdeps_CXX='-lCstd -lCrun'
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
;;
esac
;;
@@ -12416,12 +12641,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# like `-m68040'.
lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | os2* | pw32*)
+ mingw* | cygwin* | os2* | pw32*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
;;
darwin* | rhapsody*)
@@ -12433,7 +12660,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# DJGPP does not support shared libraries at all
lt_prog_compiler_pic_CXX=
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -12569,6 +12796,14 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_CXX='-non_shared'
;;
*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
;;
esac
;;
@@ -12683,7 +12918,7 @@ if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
else
lt_prog_compiler_pic_works_CXX=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -12694,11 +12929,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12697: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12932: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12701: \$? = $ac_status" >&5
+ echo "$as_me:12936: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12747,7 +12982,7 @@ else
lt_prog_compiler_static_works_CXX=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -12787,7 +13022,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -12798,11 +13033,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12801: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13036: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12805: \$? = $ac_status" >&5
+ echo "$as_me:13040: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12868,7 +13103,7 @@ echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared librar
export_symbols_cmds_CXX="$ltdll_cmds"
;;
cygwin* | mingw*)
- export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
;;
linux* | k*bsd*-gnu)
link_all_deplibs_CXX=no
@@ -12902,7 +13137,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -12960,20 +13195,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -13130,12 +13352,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -13189,7 +13406,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -13252,7 +13469,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -13323,7 +13540,7 @@ linux* | k*bsd*-gnu)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -13429,6 +13646,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -13623,6 +13844,7 @@ if test -f "$ltmain"; then
module_cmds_CXX \
module_expsym_cmds_CXX \
lt_cv_prog_compiler_c_o_CXX \
+ fix_srcfile_path_CXX \
exclude_expsyms_CXX \
include_expsyms_CXX; do
@@ -13943,7 +14165,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_CXX"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_CXX
@@ -14034,10 +14256,17 @@ objext=o
objext_F77=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
# Code to be used in simple link tests
-lt_simple_link_test_code=" program t\n end\n"
+lt_simple_link_test_code="\
+ program t
+ end
+"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -14053,13 +14282,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -14146,13 +14375,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
lt_prog_compiler_pic_F77='-DDLL_EXPORT'
;;
@@ -14162,7 +14393,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic_F77='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -14220,7 +14451,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
esac
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic_F77='-DDLL_EXPORT'
@@ -14272,6 +14503,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# All Alpha code is PIC.
lt_prog_compiler_static_F77='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ lt_prog_compiler_wl_F77='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ lt_prog_compiler_wl_F77=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -14281,6 +14528,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_F77='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static_F77='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic_F77='-KPIC'
lt_prog_compiler_static_F77='-Bstatic'
@@ -14348,7 +14599,7 @@ if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
else
lt_prog_compiler_pic_works_F77=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_F77"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -14359,11 +14610,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14362: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14613: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14366: \$? = $ac_status" >&5
+ echo "$as_me:14617: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14412,7 +14663,7 @@ else
lt_prog_compiler_static_works_F77=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -14452,7 +14703,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -14463,11 +14714,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14466: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14717: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14470: \$? = $ac_status" >&5
+ echo "$as_me:14721: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14659,7 +14910,7 @@ EOF
allow_undefined_flag_F77=unsupported
always_export_symbols_F77=no
enable_shared_with_static_runtimes_F77=yes
- export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -14677,7 +14928,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_F77=no
hardcode_shlibpath_var_F77=no
hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
@@ -14692,7 +14943,7 @@ EOF
archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux* | k*bsd*-gnu)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -14710,13 +14961,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
link_all_deplibs_F77=no
else
@@ -14876,7 +15136,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_F77=yes
+ :
else
# We have old collect2
hardcode_direct_F77=unsupported
@@ -14940,11 +15200,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -14989,11 +15256,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -15047,7 +15321,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds_F77='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes_F77=yes
;;
@@ -15089,10 +15363,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -15254,24 +15528,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
openbsd*)
- hardcode_direct_F77=yes
- hardcode_shlibpath_var_F77=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_F77='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_F77='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ ;;
+ *)
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_F77='-R$libdir'
- ;;
- *)
- archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
- ;;
- esac
+ ld_shlibs_F77=no
fi
;;
@@ -15330,17 +15608,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs_F77=yes
;;
@@ -15397,7 +15674,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag_F77='${wl}-z,text'
archive_cmds_need_lc_F77=no
hardcode_shlibpath_var_F77=no
@@ -15474,7 +15751,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -15532,20 +15809,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -15702,12 +15966,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -15761,7 +16020,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -15824,7 +16083,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -15895,7 +16154,7 @@ linux* | k*bsd*-gnu)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -16001,6 +16260,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -16195,6 +16458,7 @@ if test -f "$ltmain"; then
module_cmds_F77 \
module_expsym_cmds_F77 \
lt_cv_prog_compiler_c_o_F77 \
+ fix_srcfile_path_F77 \
exclude_expsyms_F77 \
include_expsyms_F77; do
@@ -16515,7 +16779,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_F77"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_F77
@@ -16573,10 +16837,10 @@ objext=o
objext_GCJ=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
+lt_simple_compile_test_code="class foo {}"
# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -16592,13 +16856,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -16639,7 +16903,7 @@ if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -16650,11 +16914,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16653: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16917: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16657: \$? = $ac_status" >&5
+ echo "$as_me:16921: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16705,13 +16969,15 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
;;
@@ -16721,7 +16987,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_pic_GCJ='-fno-common'
;;
- interix3*)
+ interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
@@ -16779,7 +17045,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
esac
;;
- mingw* | pw32* | os2*)
+ mingw* | cygwin* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
@@ -16831,6 +17097,22 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
# All Alpha code is PIC.
lt_prog_compiler_static_GCJ='-non_shared'
;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ lt_prog_compiler_wl_GCJ=''
+ ;;
+ esac
+ ;;
esac
;;
@@ -16840,6 +17122,10 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
lt_prog_compiler_static_GCJ='-non_shared'
;;
+ rdos*)
+ lt_prog_compiler_static_GCJ='-non_shared'
+ ;;
+
solaris*)
lt_prog_compiler_pic_GCJ='-KPIC'
lt_prog_compiler_static_GCJ='-Bstatic'
@@ -16907,7 +17193,7 @@ if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
else
lt_prog_compiler_pic_works_GCJ=no
ac_outfile=conftest.$ac_objext
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
@@ -16918,11 +17204,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16921: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17207: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16925: \$? = $ac_status" >&5
+ echo "$as_me:17211: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16971,7 +17257,7 @@ else
lt_prog_compiler_static_works_GCJ=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -17011,7 +17297,7 @@ else
mkdir conftest
cd conftest
mkdir out
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
@@ -17022,11 +17308,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17025: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17311: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:17029: \$? = $ac_status" >&5
+ echo "$as_me:17315: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17218,7 +17504,7 @@ EOF
allow_undefined_flag_GCJ=unsupported
always_export_symbols_GCJ=no
enable_shared_with_static_runtimes_GCJ=yes
- export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -17236,7 +17522,7 @@ EOF
fi
;;
- interix3*)
+ interix[3-9]*)
hardcode_direct_GCJ=no
hardcode_shlibpath_var_GCJ=no
hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
@@ -17251,7 +17537,7 @@ EOF
archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux* | k*bsd*-gnu)
+ gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
@@ -17269,13 +17555,22 @@ EOF
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
- archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
link_all_deplibs_GCJ=no
else
@@ -17435,7 +17730,7 @@ _LT_EOF
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct_GCJ=yes
+ :
else
# We have old collect2
hardcode_direct_GCJ=unsupported
@@ -17509,11 +17804,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -17568,11 +17870,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -17626,7 +17935,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds_GCJ='true'
# FIXME: Should let the user specify the lib program.
- old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes_GCJ=yes
;;
@@ -17668,10 +17977,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
- archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
- archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
@@ -17833,24 +18142,28 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
openbsd*)
- hardcode_direct_GCJ=yes
- hardcode_shlibpath_var_GCJ=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_GCJ='${wl}-E'
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_GCJ=yes
+ hardcode_shlibpath_var_GCJ=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_GCJ='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_GCJ='-R$libdir'
+ ;;
+ *)
+ archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec_GCJ='-R$libdir'
- ;;
- *)
- archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
- ;;
- esac
+ ld_shlibs_GCJ=no
fi
;;
@@ -17909,17 +18222,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- # The compiler driver will combine linker options so we
- # cannot just pass the convience library names through
- # without $wl, iff we do not link with $LD.
- # Luckily, gcc supports the same syntax we need for Sun Studio.
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- case $wlarc in
- '')
- whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
- *)
- whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- esac ;;
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
esac
link_all_deplibs_GCJ=yes
;;
@@ -17976,7 +18288,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
fi
;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
no_undefined_flag_GCJ='${wl}-z,text'
archive_cmds_need_lc_GCJ=no
hardcode_shlibpath_var_GCJ=no
@@ -18053,7 +18365,7 @@ x|xyes)
{ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
$rm conftest*
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
@@ -18111,20 +18423,7 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
+
need_lib_prefix=unknown
hardcode_into_libs=no
@@ -18281,12 +18580,7 @@ darwin* | rhapsody*)
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- if test "$GCC" = yes; then
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
- else
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
- fi
+
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
@@ -18340,7 +18634,7 @@ freebsd* | dragonfly*)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
- freebsd*) # from 4.6 on
+ *) # from 4.6 on, and DragonFly
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
@@ -18403,7 +18697,7 @@ hpux9* | hpux10* | hpux11*)
postinstall_cmds='chmod 555 $lib'
;;
-interix3*)
+interix[3-9]*)
version_type=linux
need_lib_prefix=no
need_version=no
@@ -18474,7 +18768,7 @@ linux* | k*bsd*-gnu)
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
fi
@@ -18580,6 +18874,10 @@ osf3* | osf4* | osf5*)
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
+rdos*)
+ dynamic_linker=no
+ ;;
+
solaris*)
version_type=linux
need_lib_prefix=no
@@ -18774,6 +19072,7 @@ if test -f "$ltmain"; then
module_cmds_GCJ \
module_expsym_cmds_GCJ \
lt_cv_prog_compiler_c_o_GCJ \
+ fix_srcfile_path_GCJ \
exclude_expsyms_GCJ \
include_expsyms_GCJ; do
@@ -19094,7 +19393,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_GCJ"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_GCJ
@@ -19151,7 +19450,7 @@ objext=o
objext_RC=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
# Code to be used in simple link tests
lt_simple_link_test_code="$lt_simple_compile_test_code"
@@ -19170,13 +19469,13 @@ compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
@@ -19254,6 +19553,7 @@ if test -f "$ltmain"; then
module_cmds_RC \
module_expsym_cmds_RC \
lt_cv_prog_compiler_c_o_RC \
+ fix_srcfile_path_RC \
exclude_expsyms_RC \
include_expsyms_RC; do
@@ -19574,7 +19874,7 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_RC"
+fix_srcfile_path=$lt_fix_srcfile_path
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_RC
@@ -19684,7 +19984,6 @@ _ACEOF
-ALL_LINGUAS="bg ca cs de fr ja nl pl pt pt_BR ru sr sr@Latn sv"
for ac_header in locale.h
@@ -20867,8 +21166,8 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
_ACEOF
-if { (echo "$as_me:$LINENO: msgfmt -c -o /dev/null conftest.foo") >&5
- (msgfmt -c -o /dev/null conftest.foo) 2>&5
+if { (echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5
+ ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
@@ -21223,19 +21522,19 @@ echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
;;
esac
-if test -n ""; then
- { echo "$as_me:$LINENO: checking for intltool >= " >&5
-echo $ECHO_N "checking for intltool >= ... $ECHO_C" >&6; }
+if test -n "0.35.0"; then
+ { echo "$as_me:$LINENO: checking for intltool >= 0.35.0" >&5
+echo $ECHO_N "checking for intltool >= 0.35.0... $ECHO_C" >&6; }
- INTLTOOL_REQUIRED_VERSION_AS_INT=`echo | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+ INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
{ echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
- { { echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool or later." >&5
-echo "$as_me: error: Your intltool is too old. You need intltool or later." >&2;}
+ { { echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool 0.35.0 or later." >&5
+echo "$as_me: error: Your intltool is too old. You need intltool 0.35.0 or later." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -21257,6 +21556,8 @@ INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcar
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+
@@ -21348,221 +21649,56 @@ echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;}
fi
fi
-# Extract the first word of "iconv", so it can be a program name with args.
-set dummy iconv; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_INTLTOOL_ICONV+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $INTLTOOL_ICONV in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_INTLTOOL_ICONV="$INTLTOOL_ICONV" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_INTLTOOL_ICONV="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_INTLTOOL_ICONV" && ac_cv_path_INTLTOOL_ICONV="iconv"
- ;;
-esac
-fi
-INTLTOOL_ICONV=$ac_cv_path_INTLTOOL_ICONV
-if test -n "$INTLTOOL_ICONV"; then
- { echo "$as_me:$LINENO: result: $INTLTOOL_ICONV" >&5
-echo "${ECHO_T}$INTLTOOL_ICONV" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
-# Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_INTLTOOL_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $INTLTOOL_MSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_INTLTOOL_MSGFMT="$INTLTOOL_MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_INTLTOOL_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- test -z "$ac_cv_path_INTLTOOL_MSGFMT" && ac_cv_path_INTLTOOL_MSGFMT="msgfmt"
- ;;
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
-fi
-INTLTOOL_MSGFMT=$ac_cv_path_INTLTOOL_MSGFMT
-if test -n "$INTLTOOL_MSGFMT"; then
- { echo "$as_me:$LINENO: result: $INTLTOOL_MSGFMT" >&5
-echo "${ECHO_T}$INTLTOOL_MSGFMT" >&6; }
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ DATADIRNAME=share
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-# Extract the first word of "msgmerge", so it can be a program name with args.
-set dummy msgmerge; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_INTLTOOL_MSGMERGE+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $INTLTOOL_MSGMERGE in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_INTLTOOL_MSGMERGE="$INTLTOOL_MSGMERGE" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_INTLTOOL_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_INTLTOOL_MSGMERGE" && ac_cv_path_INTLTOOL_MSGMERGE="msgmerge"
- ;;
-esac
-fi
-INTLTOOL_MSGMERGE=$ac_cv_path_INTLTOOL_MSGMERGE
-if test -n "$INTLTOOL_MSGMERGE"; then
- { echo "$as_me:$LINENO: result: $INTLTOOL_MSGMERGE" >&5
-echo "${ECHO_T}$INTLTOOL_MSGMERGE" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_INTLTOOL_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $INTLTOOL_XGETTEXT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_INTLTOOL_XGETTEXT="$INTLTOOL_XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_INTLTOOL_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_INTLTOOL_XGETTEXT" && ac_cv_path_INTLTOOL_XGETTEXT="xgettext"
- ;;
-esac
-fi
-INTLTOOL_XGETTEXT=$ac_cv_path_INTLTOOL_XGETTEXT
-if test -n "$INTLTOOL_XGETTEXT"; then
- { echo "$as_me:$LINENO: result: $INTLTOOL_XGETTEXT" >&5
-echo "${ECHO_T}$INTLTOOL_XGETTEXT" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-
-# Substitute ALL_LINGUAS so we can use it in po/Makefile
-
-
-# Set DATADIRNAME correctly if it is not set yet
-# (copied from glib-gettext.m4)
-if test -z "$DATADIRNAME"; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- DATADIRNAME=share
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- case $host in
- *-*-solaris*)
- { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
-echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; }
-if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
+ case $host in
+ *-*-solaris*)
+ { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; }
+if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -23038,6 +23174,19 @@ _ACEOF
fi
+case "$target_cpu" in
+ i[34567]86|x86_64|s390|s390x) string_arch_unaligned=yes ;;
+ *) string_arch_unaligned=no ;;
+esac
+
+if test $string_arch_unaligned = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STRING_ARCH_UNALIGNED 1
+_ACEOF
+
+fi
+
# timegm() is non-standard, define HAVE_TIMEGM if it is present
for ac_func in timegm
@@ -23197,279 +23346,80 @@ _ACEOF
fi
-### mandatory libraries and programs
-
-# Check whether --enable-gtktest was given.
-if test "${enable_gtktest+set}" = set; then
- enableval=$enable_gtktest;
-else
- enable_gtktest=yes
-fi
-
-
- pkg_config_args=gtk+-2.0
- for module in .
- do
- case "$module" in
- gthread)
- pkg_config_args="$pkg_config_args gthread-2.0"
- ;;
- esac
- done
-
- no_gtk=""
-
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+# defines WORDS_BIGENDIAN if relevant, needed by mn-md5.c
+{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
- { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-
- if test x$PKG_CONFIG != xno ; then
- if pkg-config --atleast-pkgconfig-version 0.7 ; then
- :
- else
- echo "*** pkg-config too old; version 0.7 or better required."
- no_gtk=yes
- PKG_CONFIG=no
- fi
- else
- no_gtk=yes
- fi
-
- min_gtk_version=2.6.0
- { echo "$as_me:$LINENO: checking for GTK+ - version >= $min_gtk_version" >&5
-echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6; }
-
- if test x$PKG_CONFIG != xno ; then
- ## don't try to run the test against uninstalled libtool libs
- if $PKG_CONFIG --uninstalled $pkg_config_args; then
- echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
- enable_gtktest=no
- fi
-
- if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
- :
- else
- no_gtk=yes
- fi
- fi
-
- if test x"$no_gtk" = x ; then
- GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
- GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
- gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
- gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
- gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
- if test "x$enable_gtktest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GTK_CFLAGS"
- LIBS="$GTK_LIBS $LIBS"
- rm -f conf.gtktest
- if test "$cross_compiling" = yes; then
- echo $ac_n "cross compiling; assumed OK... $ac_c"
-else
- cat >conftest.$ac_ext <<_ACEOF
+ # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
-#include <gtk/gtk.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/param.h>
int
main ()
{
- int major, minor, micro;
- char *tmp_version;
-
- system ("touch conf.gtktest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = g_strdup("$min_gtk_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
- printf("%s, bad version string\n", "$min_gtk_version");
- exit(1);
- }
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
+ && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
+ bogus endian macros
+#endif
- if ((gtk_major_version != $gtk_config_major_version) ||
- (gtk_minor_version != $gtk_config_minor_version) ||
- (gtk_micro_version != $gtk_config_micro_version))
- {
- printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
- $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
- gtk_major_version, gtk_minor_version, gtk_micro_version);
- printf ("*** was found! If pkg-config was correct, then it is best\n");
- printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
- printf("*** required on your system.\n");
- printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
- printf("*** to point to the correct configuration files\n");
- }
- else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
- (gtk_minor_version != GTK_MINOR_VERSION) ||
- (gtk_micro_version != GTK_MICRO_VERSION))
- {
- printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
- GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
- printf("*** library (version %d.%d.%d)\n",
- gtk_major_version, gtk_minor_version, gtk_micro_version);
- }
- else
- {
- if ((gtk_major_version > major) ||
- ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
- ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
- gtk_major_version, gtk_minor_version, gtk_micro_version);
- printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
- major, minor, micro);
- printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
- printf("*** correct copy of pkg-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- }
- return 1;
+ ;
+ return 0;
}
-
_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-no_gtk=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_gtk" = x ; then
- { echo "$as_me:$LINENO: result: yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&5
-echo "${ECHO_T}yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&6; }
- :
- else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** A new enough version of pkg-config was not found."
- echo "*** See http://pkgconfig.sourceforge.net"
- else
- if test -f conf.gtktest ; then
- :
- else
- echo "*** Could not run GTK+ test program, checking why..."
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GTK_CFLAGS"
- LIBS="$LIBS $GTK_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
-#include <gtk/gtk.h>
-#include <stdio.h>
+#include <sys/types.h>
+#include <sys/param.h>
int
main ()
{
- return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -23478,41 +23428,163 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
- echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_bigendian=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."
+ ac_cv_c_bigendian=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- GTK_CFLAGS=""
- GTK_LIBS=""
- { { echo "$as_me:$LINENO: error: unable to find the GTK+ library" >&5
-echo "$as_me: error: unable to find the GTK+ library" >&2;}
- { (exit 1); exit 1; }; }
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
fi
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
- rm -f conf.gtktest
+### mandatory libraries and programs
@@ -23644,12 +23716,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_GNOME_CFLAGS="$GNOME_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gthread-2.0 gconf-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify\"") >&5
- ($PKG_CONFIG --exists --print-errors "gthread-2.0 gconf-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.10 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify >= 0.4.1\"") >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.10 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify >= 0.4.1") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_GNOME_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0 gconf-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify" 2>/dev/null`
+ pkg_cv_GNOME_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.10 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify >= 0.4.1" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -23662,12 +23734,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_GNOME_LIBS="$GNOME_LIBS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gthread-2.0 gconf-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify\"") >&5
- ($PKG_CONFIG --exists --print-errors "gthread-2.0 gconf-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.10 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify >= 0.4.1\"") >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.10 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify >= 0.4.1") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_GNOME_LIBS=`$PKG_CONFIG --libs "gthread-2.0 gconf-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify" 2>/dev/null`
+ pkg_cv_GNOME_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.10 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify >= 0.4.1" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -23686,9 +23758,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- GNOME_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gthread-2.0 gconf-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify"`
+ GNOME_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.10 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.10 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify >= 0.4.1"`
else
- GNOME_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gthread-2.0 gconf-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify"`
+ GNOME_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.10 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.10 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify >= 0.4.1"`
fi
# Put the nasty error message in config.log where it belongs
echo "$GNOME_PKG_ERRORS" >&5
@@ -23974,13 +24046,15 @@ fi
enable_mime=no
-if test $enable_mbox = yes ||
- test $enable_mh = yes ||
- test $enable_maildir = yes ||
- test $enable_pop3 = yes ||
+if test $enable_hotmail = yes ||
test $enable_imap = yes ||
+ test $enable_maildir = yes ||
+ test $enable_mbox = yes ||
+ test $enable_mh = yes ||
test $enable_mozilla = yes ||
- test $enable_sylpheed = yes; then
+ test $enable_pop3 = yes ||
+ test $enable_sylpheed = yes ||
+ test $enable_yahoo = yes; then
pkg_failed=no
{ echo "$as_me:$LINENO: checking for GMIME" >&5
@@ -24040,11 +24114,51 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$GMIME_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- :
+ { { echo "$as_me:$LINENO: error: Package requirements (gmime-2.0 >= 2.1.0) were not met:
+
+$GMIME_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GMIME_CFLAGS
+and GMIME_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (gmime-2.0 >= 2.1.0) were not met:
+
+$GMIME_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GMIME_CFLAGS
+and GMIME_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+ { (exit 1); exit 1; }; }
elif test $pkg_failed = untried; then
- :
+ { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GMIME_CFLAGS
+and GMIME_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GMIME_CFLAGS
+and GMIME_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
else
GMIME_CFLAGS=$pkg_cv_GMIME_CFLAGS
GMIME_LIBS=$pkg_cv_GMIME_LIBS
@@ -24053,6 +24167,24 @@ echo "${ECHO_T}yes" >&6; }
enable_mime=yes
fi
if test $enable_mime = no; then
+ if test $enable_hotmail = yes; then
+ { echo "$as_me:$LINENO: GMime not found: forcing --disable-hotmail" >&5
+echo "$as_me: GMime not found: forcing --disable-hotmail" >&6;}
+enable_hotmail=no
+disable_hotmail_reason="(GMime not found)"
+ fi
+ if test $enable_imap = yes; then
+ { echo "$as_me:$LINENO: GMime not found: forcing --disable-imap" >&5
+echo "$as_me: GMime not found: forcing --disable-imap" >&6;}
+enable_imap=no
+disable_imap_reason="(GMime not found)"
+ fi
+ if test $enable_maildir = yes; then
+ { echo "$as_me:$LINENO: GMime not found: forcing --disable-maildir" >&5
+echo "$as_me: GMime not found: forcing --disable-maildir" >&6;}
+enable_maildir=no
+disable_maildir_reason="(GMime not found)"
+ fi
if test $enable_mbox = yes; then
{ echo "$as_me:$LINENO: GMime not found: forcing --disable-mbox" >&5
echo "$as_me: GMime not found: forcing --disable-mbox" >&6;}
@@ -24065,11 +24197,11 @@ echo "$as_me: GMime not found: forcing --disable-mh" >&6;}
enable_mh=no
disable_mh_reason="(GMime not found)"
fi
- if test $enable_maildir = yes; then
- { echo "$as_me:$LINENO: GMime not found: forcing --disable-maildir" >&5
-echo "$as_me: GMime not found: forcing --disable-maildir" >&6;}
-enable_maildir=no
-disable_maildir_reason="(GMime not found)"
+ if test $enable_mozilla = yes; then
+ { echo "$as_me:$LINENO: GMime not found: forcing --disable-mozilla" >&5
+echo "$as_me: GMime not found: forcing --disable-mozilla" >&6;}
+enable_mozilla=no
+disable_mozilla_reason="(GMime not found)"
fi
if test $enable_pop3 = yes; then
{ echo "$as_me:$LINENO: GMime not found: forcing --disable-pop3" >&5
@@ -24077,32 +24209,170 @@ echo "$as_me: GMime not found: forcing --disable-pop3" >&6;}
enable_pop3=no
disable_pop3_reason="(GMime not found)"
fi
- if test $enable_imap = yes; then
- { echo "$as_me:$LINENO: GMime not found: forcing --disable-imap" >&5
-echo "$as_me: GMime not found: forcing --disable-imap" >&6;}
-enable_imap=no
-disable_imap_reason="(GMime not found)"
- fi
- if test $enable_mozilla = yes; then
- { echo "$as_me:$LINENO: GMime not found: forcing --disable-mozilla" >&5
-echo "$as_me: GMime not found: forcing --disable-mozilla" >&6;}
-enable_mozilla=no
-disable_mozilla_reason="(GMime not found)"
- fi
if test $enable_sylpheed = yes; then
{ echo "$as_me:$LINENO: GMime not found: forcing --disable-sylpheed" >&5
echo "$as_me: GMime not found: forcing --disable-sylpheed" >&6;}
enable_sylpheed=no
disable_sylpheed_reason="(GMime not found)"
fi
+ if test $enable_yahoo = yes; then
+ { echo "$as_me:$LINENO: GMime not found: forcing --disable-yahoo" >&5
+echo "$as_me: GMime not found: forcing --disable-yahoo" >&6;}
+enable_yahoo=no
+disable_yahoo_reason="(GMime not found)"
+ fi
fi
fi
-if test $enable_sylpheed_locking = yes && test $enable_sylpheed = no; then
- { echo "$as_me:$LINENO: Sylpheed support disabled: forcing --disable-sylpheed-locking" >&5
-echo "$as_me: Sylpheed support disabled: forcing --disable-sylpheed-locking" >&6;}
-enable_sylpheed_locking=no
-disable_sylpheed_locking_reason="(Sylpheed support disabled)"
+enable_gnome_keyring=no
+if test $enable_pop3 = yes ||
+ test $enable_imap = yes ||
+ test $enable_gmail = yes ||
+ test $enable_yahoo = yes ||
+ test $enable_hotmail = yes; then
+
+pkg_failed=no
+{ echo "$as_me:$LINENO: checking for GNOME_KEYRING" >&5
+echo $ECHO_N "checking for GNOME_KEYRING... $ECHO_C" >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GNOME_KEYRING_CFLAGS"; then
+ pkg_cv_GNOME_KEYRING_CFLAGS="$GNOME_KEYRING_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnome-keyring-1\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gnome-keyring-1") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_GNOME_KEYRING_CFLAGS=`$PKG_CONFIG --cflags "gnome-keyring-1" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$GNOME_KEYRING_LIBS"; then
+ pkg_cv_GNOME_KEYRING_LIBS="$GNOME_KEYRING_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnome-keyring-1\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gnome-keyring-1") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_GNOME_KEYRING_LIBS=`$PKG_CONFIG --libs "gnome-keyring-1" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GNOME_KEYRING_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gnome-keyring-1"`
+ else
+ GNOME_KEYRING_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnome-keyring-1"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GNOME_KEYRING_PKG_ERRORS" >&5
+
+ { { echo "$as_me:$LINENO: error: Package requirements (gnome-keyring-1) were not met:
+
+$GNOME_KEYRING_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GNOME_KEYRING_CFLAGS
+and GNOME_KEYRING_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&5
+echo "$as_me: error: Package requirements (gnome-keyring-1) were not met:
+
+$GNOME_KEYRING_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GNOME_KEYRING_CFLAGS
+and GNOME_KEYRING_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" >&2;}
+ { (exit 1); exit 1; }; }
+elif test $pkg_failed = untried; then
+ { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GNOME_KEYRING_CFLAGS
+and GNOME_KEYRING_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&5
+echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GNOME_KEYRING_CFLAGS
+and GNOME_KEYRING_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ GNOME_KEYRING_CFLAGS=$pkg_cv_GNOME_KEYRING_CFLAGS
+ GNOME_KEYRING_LIBS=$pkg_cv_GNOME_KEYRING_LIBS
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ enable_gnome_keyring=yes
+fi
+ if test $enable_gnome_keyring = no; then
+ if test $enable_pop3 = yes; then
+ { echo "$as_me:$LINENO: gnome-keyring not found: forcing --disable-pop3" >&5
+echo "$as_me: gnome-keyring not found: forcing --disable-pop3" >&6;}
+enable_pop3=no
+disable_pop3_reason="(gnome-keyring not found)"
+ fi
+ if test $enable_imap = yes; then
+ { echo "$as_me:$LINENO: gnome-keyring not found: forcing --disable-imap" >&5
+echo "$as_me: gnome-keyring not found: forcing --disable-imap" >&6;}
+enable_imap=no
+disable_imap_reason="(gnome-keyring not found)"
+ fi
+ if test $enable_gmail = yes; then
+ { echo "$as_me:$LINENO: gnome-keyring not found: forcing --disable-gmail" >&5
+echo "$as_me: gnome-keyring not found: forcing --disable-gmail" >&6;}
+enable_gmail=no
+disable_gmail_reason="(gnome-keyring not found)"
+ fi
+ if test $enable_yahoo = yes; then
+ { echo "$as_me:$LINENO: gnome-keyring not found: forcing --disable-yahoo" >&5
+echo "$as_me: gnome-keyring not found: forcing --disable-yahoo" >&6;}
+enable_yahoo=no
+disable_yahoo_reason="(gnome-keyring not found)"
+ fi
+ if test $enable_hotmail = yes; then
+ { echo "$as_me:$LINENO: gnome-keyring not found: forcing --disable-hotmail" >&5
+echo "$as_me: gnome-keyring not found: forcing --disable-hotmail" >&6;}
+enable_hotmail=no
+disable_hotmail_reason="(gnome-keyring not found)"
+ fi
+ fi
fi
if test $enable_pop3 = no && test $enable_imap = no; then
@@ -24268,533 +24538,129 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-openssl_mt=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-{ echo "$as_me:$LINENO: result: $openssl_mt" >&5
-echo "${ECHO_T}$openssl_mt" >&6; }
-
-CFLAGS="$ac_save_CFLAGS"
-LIBS="$ac_save_LIBS"
-
-if test $openssl_mt = yes; then
- :
-else
- { echo "$as_me:$LINENO: OpenSSL does not support multi-threading: forcing --disable-ssl" >&5
-echo "$as_me: OpenSSL does not support multi-threading: forcing --disable-ssl" >&6;}
-enable_ssl=no
-disable_ssl_reason="(OpenSSL does not support multi-threading)"
-fi
-
-
-
- fi
-fi
-if test $enable_sasl = yes; then
- SASL_CFLAGS=""
-SASL_LIBS="-lsasl2"
-
-ac_save_CFLAGS="$CFLAGS"
-ac_save_LIBS="$LIBS"
-CFLAGS="$CFLAGS $SASL_CFLAGS"
-LIBS="$LIBS $SASL_LIBS"
-
-sasl2_min_version=2.0
-
-{ echo "$as_me:$LINENO: checking for Cyrus SASL - version >= $sasl2_min_version" >&5
-echo $ECHO_N "checking for Cyrus SASL - version >= $sasl2_min_version... $ECHO_C" >&6; }
-if test "$cross_compiling" = yes; then
- found=yes
-else
- cat >conftest.$ac_ext <<_ACEOF
-
-#include <sasl/sasl.h>
-
-int main() {
- int major, minor, step = 0, patch = 0;
- int sasl_major, sasl_minor, sasl_step, sasl_patch;
-
- if (sscanf("$sasl2_min_version", "%d.%d.%d.%d", &major, &minor, &step, &patch) < 2)
- exit(1); /* bad version string */
-
- sasl_version_info(0, 0, &sasl_major, &sasl_minor, &sasl_step, &sasl_patch);
- if ((sasl_major << 24) + (sasl_minor << 16) + (sasl_step << 8) + sasl_patch
- < (major << 24) + (minor << 16) + (step << 8) + patch)
- exit(2); /* version too old */
-
- exit(0);
-}
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- found=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-found=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-{ echo "$as_me:$LINENO: result: $found" >&5
-echo "${ECHO_T}$found" >&6; }
-
-CFLAGS="$ac_save_CFLAGS"
-LIBS="$ac_save_LIBS"
-
-if test $found = yes; then
- :
-else
- SASL_CFLAGS=""
- SASL_LIBS=""
- { echo "$as_me:$LINENO: Cyrus SASL not found: forcing --disable-sasl" >&5
-echo "$as_me: Cyrus SASL not found: forcing --disable-sasl" >&6;}
-enable_sasl=no
-disable_sasl_reason="(Cyrus SASL not found)"
-fi
-
-
-
-fi
-
-if test $enable_evolution = yes; then
- evolution=no
-
-
-evolution_branch=2.12
-evolution_plugin_min_version=
-
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for EVOLUTION_PLUGIN" >&5
-echo $ECHO_N "checking for EVOLUTION_PLUGIN... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
- if test -n "$EVOLUTION_PLUGIN_CFLAGS"; then
- pkg_cv_EVOLUTION_PLUGIN_CFLAGS="$EVOLUTION_PLUGIN_CFLAGS"
- else
- if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\$evolution_branch \$evolution_plugin_min_version\"") >&5
- ($PKG_CONFIG --exists --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_EVOLUTION_PLUGIN_CFLAGS=`$PKG_CONFIG --cflags "evolution-plugin-$evolution_branch $evolution_plugin_min_version" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- fi
-else
- pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
- if test -n "$EVOLUTION_PLUGIN_LIBS"; then
- pkg_cv_EVOLUTION_PLUGIN_LIBS="$EVOLUTION_PLUGIN_LIBS"
- else
- if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\$evolution_branch \$evolution_plugin_min_version\"") >&5
- ($PKG_CONFIG --exists --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_EVOLUTION_PLUGIN_LIBS=`$PKG_CONFIG --libs "evolution-plugin-$evolution_branch $evolution_plugin_min_version" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- fi
-else
- pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version"`
- else
- EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version"`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$EVOLUTION_PLUGIN_PKG_ERRORS" >&5
-
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- found=no
-elif test $pkg_failed = untried; then
- found=no
-else
- EVOLUTION_PLUGIN_CFLAGS=$pkg_cv_EVOLUTION_PLUGIN_CFLAGS
- EVOLUTION_PLUGIN_LIBS=$pkg_cv_EVOLUTION_PLUGIN_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- found=yes
-fi
-
-if test $found = yes; then
- { echo "$as_me:$LINENO: checking for the Evolution plugin directory" >&5
-echo $ECHO_N "checking for the Evolution plugin directory... $ECHO_C" >&6; }
- evolution_plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin-$evolution_branch 2>/dev/null`
- if test -n "$evolution_plugindir"; then
- { echo "$as_me:$LINENO: result: $evolution_plugindir" >&5
-echo "${ECHO_T}$evolution_plugindir" >&6; }
- else
- { echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
- found=no
- fi
-fi
-
-if test $found = yes; then
- evolution=yes
-else
- evolution_plugindir=""
- :
-fi
-
-
- if test $evolution = no; then
-
-
-evolution_branch=2.10
-evolution_plugin_min_version=
-
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for EVOLUTION_PLUGIN" >&5
-echo $ECHO_N "checking for EVOLUTION_PLUGIN... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
- if test -n "$EVOLUTION_PLUGIN_CFLAGS"; then
- pkg_cv_EVOLUTION_PLUGIN_CFLAGS="$EVOLUTION_PLUGIN_CFLAGS"
- else
- if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\$evolution_branch \$evolution_plugin_min_version\"") >&5
- ($PKG_CONFIG --exists --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_EVOLUTION_PLUGIN_CFLAGS=`$PKG_CONFIG --cflags "evolution-plugin-$evolution_branch $evolution_plugin_min_version" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- fi
-else
- pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
- if test -n "$EVOLUTION_PLUGIN_LIBS"; then
- pkg_cv_EVOLUTION_PLUGIN_LIBS="$EVOLUTION_PLUGIN_LIBS"
- else
- if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\$evolution_branch \$evolution_plugin_min_version\"") >&5
- ($PKG_CONFIG --exists --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_EVOLUTION_PLUGIN_LIBS=`$PKG_CONFIG --libs "evolution-plugin-$evolution_branch $evolution_plugin_min_version" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- fi
-else
- pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version"`
- else
- EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version"`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$EVOLUTION_PLUGIN_PKG_ERRORS" >&5
-
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- found=no
-elif test $pkg_failed = untried; then
- found=no
-else
- EVOLUTION_PLUGIN_CFLAGS=$pkg_cv_EVOLUTION_PLUGIN_CFLAGS
- EVOLUTION_PLUGIN_LIBS=$pkg_cv_EVOLUTION_PLUGIN_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- found=yes
-fi
-
-if test $found = yes; then
- { echo "$as_me:$LINENO: checking for the Evolution plugin directory" >&5
-echo $ECHO_N "checking for the Evolution plugin directory... $ECHO_C" >&6; }
- evolution_plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin-$evolution_branch 2>/dev/null`
- if test -n "$evolution_plugindir"; then
- { echo "$as_me:$LINENO: result: $evolution_plugindir" >&5
-echo "${ECHO_T}$evolution_plugindir" >&6; }
- else
- { echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
- found=no
- fi
-fi
-
-if test $found = yes; then
- evolution=yes
-else
- evolution_plugindir=""
- :
-fi
-
-
- fi
- if test $evolution = no; then
-
-
-evolution_branch=2.8
-evolution_plugin_min_version=
-
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for EVOLUTION_PLUGIN" >&5
-echo $ECHO_N "checking for EVOLUTION_PLUGIN... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
- if test -n "$EVOLUTION_PLUGIN_CFLAGS"; then
- pkg_cv_EVOLUTION_PLUGIN_CFLAGS="$EVOLUTION_PLUGIN_CFLAGS"
- else
- if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\$evolution_branch \$evolution_plugin_min_version\"") >&5
- ($PKG_CONFIG --exists --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_EVOLUTION_PLUGIN_CFLAGS=`$PKG_CONFIG --cflags "evolution-plugin-$evolution_branch $evolution_plugin_min_version" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- fi
-else
- pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
- if test -n "$EVOLUTION_PLUGIN_LIBS"; then
- pkg_cv_EVOLUTION_PLUGIN_LIBS="$EVOLUTION_PLUGIN_LIBS"
- else
- if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\$evolution_branch \$evolution_plugin_min_version\"") >&5
- ($PKG_CONFIG --exists --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_EVOLUTION_PLUGIN_LIBS=`$PKG_CONFIG --libs "evolution-plugin-$evolution_branch $evolution_plugin_min_version" 2>/dev/null`
-else
- pkg_failed=yes
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+openssl_mt=no
fi
- fi
-else
- pkg_failed=untried
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+{ echo "$as_me:$LINENO: result: $openssl_mt" >&5
+echo "${ECHO_T}$openssl_mt" >&6; }
-if test $pkg_failed = yes; then
+CFLAGS="$ac_save_CFLAGS"
+LIBS="$ac_save_LIBS"
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
+if test $openssl_mt = yes; then
+ :
else
- _pkg_short_errors_supported=no
+ { echo "$as_me:$LINENO: OpenSSL does not support multi-threading: forcing --disable-ssl" >&5
+echo "$as_me: OpenSSL does not support multi-threading: forcing --disable-ssl" >&6;}
+enable_ssl=no
+disable_ssl_reason="(OpenSSL does not support multi-threading)"
fi
- if test $_pkg_short_errors_supported = yes; then
- EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version"`
- else
- EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version"`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$EVOLUTION_PLUGIN_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- found=no
-elif test $pkg_failed = untried; then
- found=no
-else
- EVOLUTION_PLUGIN_CFLAGS=$pkg_cv_EVOLUTION_PLUGIN_CFLAGS
- EVOLUTION_PLUGIN_LIBS=$pkg_cv_EVOLUTION_PLUGIN_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- found=yes
-fi
-if test $found = yes; then
- { echo "$as_me:$LINENO: checking for the Evolution plugin directory" >&5
-echo $ECHO_N "checking for the Evolution plugin directory... $ECHO_C" >&6; }
- evolution_plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin-$evolution_branch 2>/dev/null`
- if test -n "$evolution_plugindir"; then
- { echo "$as_me:$LINENO: result: $evolution_plugindir" >&5
-echo "${ECHO_T}$evolution_plugindir" >&6; }
- else
- { echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
- found=no
+
fi
fi
+if test $enable_sasl = yes; then
+ SASL_CFLAGS=""
+SASL_LIBS="-lsasl2"
-if test $found = yes; then
- evolution=yes
-else
- evolution_plugindir=""
- :
-fi
+ac_save_CFLAGS="$CFLAGS"
+ac_save_LIBS="$LIBS"
+CFLAGS="$CFLAGS $SASL_CFLAGS"
+LIBS="$LIBS $SASL_LIBS"
+sasl2_min_version=2.0
- fi
- if test $evolution = no; then
+{ echo "$as_me:$LINENO: checking for Cyrus SASL - version >= $sasl2_min_version" >&5
+echo $ECHO_N "checking for Cyrus SASL - version >= $sasl2_min_version... $ECHO_C" >&6; }
+if test "$cross_compiling" = yes; then
+ found=yes
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#include <sasl/sasl.h>
-evolution_branch=2.6
-evolution_plugin_min_version=
+int main() {
+ int major, minor, step = 0, patch = 0;
+ int sasl_major, sasl_minor, sasl_step, sasl_patch;
+ if (sscanf("$sasl2_min_version", "%d.%d.%d.%d", &major, &minor, &step, &patch) < 2)
+ exit(1); /* bad version string */
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for EVOLUTION_PLUGIN" >&5
-echo $ECHO_N "checking for EVOLUTION_PLUGIN... $ECHO_C" >&6; }
+ sasl_version_info(0, 0, &sasl_major, &sasl_minor, &sasl_step, &sasl_patch);
+ if ((sasl_major << 24) + (sasl_minor << 16) + (sasl_step << 8) + sasl_patch
+ < (major << 24) + (minor << 16) + (step << 8) + patch)
+ exit(2); /* version too old */
-if test -n "$PKG_CONFIG"; then
- if test -n "$EVOLUTION_PLUGIN_CFLAGS"; then
- pkg_cv_EVOLUTION_PLUGIN_CFLAGS="$EVOLUTION_PLUGIN_CFLAGS"
- else
- if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\$evolution_branch \$evolution_plugin_min_version\"") >&5
- ($PKG_CONFIG --exists --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version") 2>&5
+ exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_EVOLUTION_PLUGIN_CFLAGS=`$PKG_CONFIG --cflags "evolution-plugin-$evolution_branch $evolution_plugin_min_version" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- fi
-else
- pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
- if test -n "$EVOLUTION_PLUGIN_LIBS"; then
- pkg_cv_EVOLUTION_PLUGIN_LIBS="$EVOLUTION_PLUGIN_LIBS"
- else
- if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\$evolution_branch \$evolution_plugin_min_version\"") >&5
- ($PKG_CONFIG --exists --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version") 2>&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_EVOLUTION_PLUGIN_LIBS=`$PKG_CONFIG --libs "evolution-plugin-$evolution_branch $evolution_plugin_min_version" 2>/dev/null`
+ (exit $ac_status); }; }; then
+ found=yes
else
- pkg_failed=yes
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+found=no
fi
- fi
-else
- pkg_failed=untried
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+{ echo "$as_me:$LINENO: result: $found" >&5
+echo "${ECHO_T}$found" >&6; }
-if test $pkg_failed = yes; then
+CFLAGS="$ac_save_CFLAGS"
+LIBS="$ac_save_LIBS"
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
+if test $found = yes; then
+ :
else
- _pkg_short_errors_supported=no
+ SASL_CFLAGS=""
+ SASL_LIBS=""
+ { echo "$as_me:$LINENO: Cyrus SASL not found: forcing --disable-sasl" >&5
+echo "$as_me: Cyrus SASL not found: forcing --disable-sasl" >&6;}
+enable_sasl=no
+disable_sasl_reason="(Cyrus SASL not found)"
fi
- if test $_pkg_short_errors_supported = yes; then
- EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version"`
- else
- EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version"`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$EVOLUTION_PLUGIN_PKG_ERRORS" >&5
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- found=no
-elif test $pkg_failed = untried; then
- found=no
-else
- EVOLUTION_PLUGIN_CFLAGS=$pkg_cv_EVOLUTION_PLUGIN_CFLAGS
- EVOLUTION_PLUGIN_LIBS=$pkg_cv_EVOLUTION_PLUGIN_LIBS
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- found=yes
-fi
-if test $found = yes; then
- { echo "$as_me:$LINENO: checking for the Evolution plugin directory" >&5
-echo $ECHO_N "checking for the Evolution plugin directory... $ECHO_C" >&6; }
- evolution_plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin-$evolution_branch 2>/dev/null`
- if test -n "$evolution_plugindir"; then
- { echo "$as_me:$LINENO: result: $evolution_plugindir" >&5
-echo "${ECHO_T}$evolution_plugindir" >&6; }
- else
- { echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
- found=no
- fi
-fi
-if test $found = yes; then
- evolution=yes
-else
- evolution_plugindir=""
- :
fi
-
- fi
- if test $evolution = no; then
+if test $enable_evolution = yes; then
-evolution_branch=2.4
-evolution_plugin_min_version=
+# MN uses em_folder_tree_set_selected(), whose prototype was changed in 2.12
+evolution_plugin_min_version=2.12
pkg_failed=no
@@ -24806,12 +24672,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_EVOLUTION_PLUGIN_CFLAGS="$EVOLUTION_PLUGIN_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\$evolution_branch \$evolution_plugin_min_version\"") >&5
- ($PKG_CONFIG --exists --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin >= \$evolution_plugin_min_version\"") >&5
+ ($PKG_CONFIG --exists --print-errors "evolution-plugin >= $evolution_plugin_min_version") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_EVOLUTION_PLUGIN_CFLAGS=`$PKG_CONFIG --cflags "evolution-plugin-$evolution_branch $evolution_plugin_min_version" 2>/dev/null`
+ pkg_cv_EVOLUTION_PLUGIN_CFLAGS=`$PKG_CONFIG --cflags "evolution-plugin >= $evolution_plugin_min_version" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -24824,12 +24690,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_EVOLUTION_PLUGIN_LIBS="$EVOLUTION_PLUGIN_LIBS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin-\$evolution_branch \$evolution_plugin_min_version\"") >&5
- ($PKG_CONFIG --exists --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evolution-plugin >= \$evolution_plugin_min_version\"") >&5
+ ($PKG_CONFIG --exists --print-errors "evolution-plugin >= $evolution_plugin_min_version") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_EVOLUTION_PLUGIN_LIBS=`$PKG_CONFIG --libs "evolution-plugin-$evolution_branch $evolution_plugin_min_version" 2>/dev/null`
+ pkg_cv_EVOLUTION_PLUGIN_LIBS=`$PKG_CONFIG --libs "evolution-plugin >= $evolution_plugin_min_version" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -24848,9 +24714,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version"`
+ EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "evolution-plugin >= $evolution_plugin_min_version"`
else
- EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evolution-plugin-$evolution_branch $evolution_plugin_min_version"`
+ EVOLUTION_PLUGIN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "evolution-plugin >= $evolution_plugin_min_version"`
fi
# Put the nasty error message in config.log where it belongs
echo "$EVOLUTION_PLUGIN_PKG_ERRORS" >&5
@@ -24871,7 +24737,7 @@ fi
if test $found = yes; then
{ echo "$as_me:$LINENO: checking for the Evolution plugin directory" >&5
echo $ECHO_N "checking for the Evolution plugin directory... $ECHO_C" >&6; }
- evolution_plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin-$evolution_branch 2>/dev/null`
+ evolution_plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin 2>/dev/null`
if test -n "$evolution_plugindir"; then
{ echo "$as_me:$LINENO: result: $evolution_plugindir" >&5
echo "${ECHO_T}$evolution_plugindir" >&6; }
@@ -24883,20 +24749,16 @@ echo "${ECHO_T}not found" >&6; }
fi
if test $found = yes; then
- evolution=yes
+ :
else
evolution_plugindir=""
- :
-fi
-
-
- fi
- if test $evolution = no; then
- { echo "$as_me:$LINENO: Evolution not found: forcing --disable-evolution" >&5
+ { echo "$as_me:$LINENO: Evolution not found: forcing --disable-evolution" >&5
echo "$as_me: Evolution not found: forcing --disable-evolution" >&6;}
enable_evolution=no
disable_evolution_reason="(Evolution not found)"
- fi
+fi
+
+
fi
### Automake conditionals
@@ -24965,12 +24827,20 @@ else
WITH_POP3_OR_IMAP_FALSE=
fi
- if test $enable_pop3 = yes || test $enable_imap = yes || test $enable_gmail = yes; then
- WITH_POP3_OR_IMAP_OR_GMAIL_TRUE=
- WITH_POP3_OR_IMAP_OR_GMAIL_FALSE='#'
+ if test $enable_pop3 = yes || test $enable_imap = yes || test $enable_gmail = yes || test $enable_yahoo = yes || test $enable_hotmail = yes; then
+ WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE=
+ WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_FALSE='#'
else
- WITH_POP3_OR_IMAP_OR_GMAIL_TRUE='#'
- WITH_POP3_OR_IMAP_OR_GMAIL_FALSE=
+ WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE='#'
+ WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_FALSE=
+fi
+
+ if test $enable_yahoo = yes || test $enable_hotmail = yes; then
+ WITH_YAHOO_OR_HOTMAIL_TRUE=
+ WITH_YAHOO_OR_HOTMAIL_FALSE='#'
+else
+ WITH_YAHOO_OR_HOTMAIL_TRUE='#'
+ WITH_YAHOO_OR_HOTMAIL_FALSE=
fi
if test $enable_mbox = yes || test $enable_mozilla = yes || test $enable_mh = yes || test $enable_maildir = yes || test $enable_sylpheed = yes; then
@@ -24989,6 +24859,14 @@ else
WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_FALSE=
fi
+ if test $enable_maildir = yes || test $enable_sylpheed = yes; then
+ WITH_MAILDIR_OR_SYLPHEED_TRUE=
+ WITH_MAILDIR_OR_SYLPHEED_FALSE='#'
+else
+ WITH_MAILDIR_OR_SYLPHEED_TRUE='#'
+ WITH_MAILDIR_OR_SYLPHEED_FALSE=
+fi
+
if test $enable_ssl = yes; then
WITH_SSL_TRUE=
WITH_SSL_FALSE='#'
@@ -25013,6 +24891,22 @@ else
WITH_GMAIL_FALSE=
fi
+ if test $enable_yahoo = yes; then
+ WITH_YAHOO_TRUE=
+ WITH_YAHOO_FALSE='#'
+else
+ WITH_YAHOO_TRUE='#'
+ WITH_YAHOO_FALSE=
+fi
+
+ if test $enable_hotmail = yes; then
+ WITH_HOTMAIL_TRUE=
+ WITH_HOTMAIL_FALSE='#'
+else
+ WITH_HOTMAIL_TRUE='#'
+ WITH_HOTMAIL_FALSE=
+fi
+
if test $enable_evolution = yes; then
WITH_EVOLUTION_TRUE=
WITH_EVOLUTION_FALSE='#'
@@ -25102,6 +24996,18 @@ cat >>confdefs.h <<_ACEOF
#define WITH_GMAIL $_value
_ACEOF
+if test $enable_yahoo = yes; then _value=1; else _value=0; fi
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_YAHOO $_value
+_ACEOF
+
+if test $enable_hotmail = yes; then _value=1; else _value=0; fi
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_HOTMAIL $_value
+_ACEOF
+
if test $enable_evolution = yes; then _value=1; else _value=0; fi
cat >>confdefs.h <<_ACEOF
@@ -25120,16 +25026,16 @@ cat >>confdefs.h <<_ACEOF
#define WITH_SYLPHEED $_value
_ACEOF
-if test $enable_sylpheed_locking = yes; then _value=1; else _value=0; fi
+if test $enable_mime = yes; then _value=1; else _value=0; fi
cat >>confdefs.h <<_ACEOF
-#define WITH_SYLPHEED_LOCKING $_value
+#define WITH_MIME $_value
_ACEOF
-if test $enable_mime = yes; then _value=1; else _value=0; fi
+if test $enable_gconf_sanity_check = yes; then _value=1; else _value=0; fi
cat >>confdefs.h <<_ACEOF
-#define WITH_MIME $_value
+#define WITH_GCONF_SANITY_CHECK $_value
_ACEOF
@@ -25336,10 +25242,17 @@ echo "$as_me: error: conditional \"WITH_POP3_OR_IMAP\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${WITH_POP3_OR_IMAP_OR_GMAIL_TRUE}" && test -z "${WITH_POP3_OR_IMAP_OR_GMAIL_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"WITH_POP3_OR_IMAP_OR_GMAIL\" was never defined.
+if test -z "${WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE}" && test -z "${WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${WITH_YAHOO_OR_HOTMAIL_TRUE}" && test -z "${WITH_YAHOO_OR_HOTMAIL_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"WITH_YAHOO_OR_HOTMAIL\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"WITH_POP3_OR_IMAP_OR_GMAIL\" was never defined.
+echo "$as_me: error: conditional \"WITH_YAHOO_OR_HOTMAIL\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -25357,6 +25270,13 @@ echo "$as_me: error: conditional \"WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLP
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${WITH_MAILDIR_OR_SYLPHEED_TRUE}" && test -z "${WITH_MAILDIR_OR_SYLPHEED_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"WITH_MAILDIR_OR_SYLPHEED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_MAILDIR_OR_SYLPHEED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${WITH_SSL_TRUE}" && test -z "${WITH_SSL_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"WITH_SSL\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -25378,6 +25298,20 @@ echo "$as_me: error: conditional \"WITH_GMAIL\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${WITH_YAHOO_TRUE}" && test -z "${WITH_YAHOO_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"WITH_YAHOO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_YAHOO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${WITH_HOTMAIL_TRUE}" && test -z "${WITH_HOTMAIL_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"WITH_HOTMAIL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_HOTMAIL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${WITH_EVOLUTION_TRUE}" && test -z "${WITH_EVOLUTION_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"WITH_EVOLUTION\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -25706,7 +25640,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Mail Notification $as_me 4.1, which was
+This file was extended by Mail Notification $as_me 5.0-rc1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -25759,7 +25693,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-Mail Notification config.status 4.1
+Mail Notification config.status 5.0-rc1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -25867,9 +25801,7 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
-INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
-INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'
+INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'
_ACEOF
@@ -26049,10 +25981,10 @@ AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
CCDEPMODE!$CCDEPMODE$ac_delim
am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+SED!$SED$ac_delim
GREP!$GREP$ac_delim
EGREP!$EGREP$ac_delim
LN_S!$LN_S$ac_delim
-ECHO!$ECHO$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -26094,6 +26026,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+ECHO!$ECHO$ac_delim
AR!$AR$ac_delim
RANLIB!$RANLIB$ac_delim
CPP!$CPP$ac_delim
@@ -26143,18 +26076,13 @@ INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
INTLTOOL_SCHEMAS_RULE!$INTLTOOL_SCHEMAS_RULE$ac_delim
INTLTOOL_THEME_RULE!$INTLTOOL_THEME_RULE$ac_delim
INTLTOOL_SERVICE_RULE!$INTLTOOL_SERVICE_RULE$ac_delim
+INTLTOOL_POLICY_RULE!$INTLTOOL_POLICY_RULE$ac_delim
INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
-INTLTOOL_ICONV!$INTLTOOL_ICONV$ac_delim
-INTLTOOL_MSGFMT!$INTLTOOL_MSGFMT$ac_delim
-INTLTOOL_MSGMERGE!$INTLTOOL_MSGMERGE$ac_delim
-INTLTOOL_XGETTEXT!$INTLTOOL_XGETTEXT$ac_delim
ALL_LINGUAS!$ALL_LINGUAS$ac_delim
PKG_CONFIG!$PKG_CONFIG$ac_delim
-GTK_CFLAGS!$GTK_CFLAGS$ac_delim
-GTK_LIBS!$GTK_LIBS$ac_delim
GNOME_CFLAGS!$GNOME_CFLAGS$ac_delim
GNOME_LIBS!$GNOME_LIBS$ac_delim
GCONF_SCHEMA_CONFIG_SOURCE!$GCONF_SCHEMA_CONFIG_SOURCE$ac_delim
@@ -26169,6 +26097,8 @@ AML!$AML$ac_delim
GOB2!$GOB2$ac_delim
GMIME_CFLAGS!$GMIME_CFLAGS$ac_delim
GMIME_LIBS!$GMIME_LIBS$ac_delim
+GNOME_KEYRING_CFLAGS!$GNOME_KEYRING_CFLAGS$ac_delim
+GNOME_KEYRING_LIBS!$GNOME_KEYRING_LIBS$ac_delim
OPENSSL_CFLAGS!$OPENSSL_CFLAGS$ac_delim
OPENSSL_LIBS!$OPENSSL_LIBS$ac_delim
SASL_CFLAGS!$SASL_CFLAGS$ac_delim
@@ -26191,6 +26121,8 @@ WITH_POP3_FALSE!$WITH_POP3_FALSE$ac_delim
WITH_IMAP_TRUE!$WITH_IMAP_TRUE$ac_delim
WITH_IMAP_FALSE!$WITH_IMAP_FALSE$ac_delim
WITH_POP3_OR_IMAP_TRUE!$WITH_POP3_OR_IMAP_TRUE$ac_delim
+WITH_POP3_OR_IMAP_FALSE!$WITH_POP3_OR_IMAP_FALSE$ac_delim
+WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE!$WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -26232,19 +26164,25 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
-WITH_POP3_OR_IMAP_FALSE!$WITH_POP3_OR_IMAP_FALSE$ac_delim
-WITH_POP3_OR_IMAP_OR_GMAIL_TRUE!$WITH_POP3_OR_IMAP_OR_GMAIL_TRUE$ac_delim
-WITH_POP3_OR_IMAP_OR_GMAIL_FALSE!$WITH_POP3_OR_IMAP_OR_GMAIL_FALSE$ac_delim
+WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_FALSE!$WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_FALSE$ac_delim
+WITH_YAHOO_OR_HOTMAIL_TRUE!$WITH_YAHOO_OR_HOTMAIL_TRUE$ac_delim
+WITH_YAHOO_OR_HOTMAIL_FALSE!$WITH_YAHOO_OR_HOTMAIL_FALSE$ac_delim
WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE!$WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE$ac_delim
WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_FALSE!$WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_FALSE$ac_delim
WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE!$WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE$ac_delim
WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_FALSE!$WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_FALSE$ac_delim
+WITH_MAILDIR_OR_SYLPHEED_TRUE!$WITH_MAILDIR_OR_SYLPHEED_TRUE$ac_delim
+WITH_MAILDIR_OR_SYLPHEED_FALSE!$WITH_MAILDIR_OR_SYLPHEED_FALSE$ac_delim
WITH_SSL_TRUE!$WITH_SSL_TRUE$ac_delim
WITH_SSL_FALSE!$WITH_SSL_FALSE$ac_delim
WITH_SASL_TRUE!$WITH_SASL_TRUE$ac_delim
WITH_SASL_FALSE!$WITH_SASL_FALSE$ac_delim
WITH_GMAIL_TRUE!$WITH_GMAIL_TRUE$ac_delim
WITH_GMAIL_FALSE!$WITH_GMAIL_FALSE$ac_delim
+WITH_YAHOO_TRUE!$WITH_YAHOO_TRUE$ac_delim
+WITH_YAHOO_FALSE!$WITH_YAHOO_FALSE$ac_delim
+WITH_HOTMAIL_TRUE!$WITH_HOTMAIL_TRUE$ac_delim
+WITH_HOTMAIL_FALSE!$WITH_HOTMAIL_FALSE$ac_delim
WITH_EVOLUTION_TRUE!$WITH_EVOLUTION_TRUE$ac_delim
WITH_EVOLUTION_FALSE!$WITH_EVOLUTION_FALSE$ac_delim
WITH_SYLPHEED_TRUE!$WITH_SYLPHEED_TRUE$ac_delim
@@ -26257,7 +26195,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 23; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -26831,10 +26769,6 @@ done
for file in intltool-extract intltool-merge intltool-update; do
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
- -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
- -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
- -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
- -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
< ${ac_aux_dir}/${file}.in > ${file}.out
if cmp -s ${file} ${file}.out 2>/dev/null; then
@@ -26917,25 +26851,27 @@ Installation prefixes
Installation directories
--bindir $bindir
--datadir $datadir
- --sysconfdir $sysconfdir
+ --datarootdir $datarootdir
--libdir $libdir
+ --sysconfdir $sysconfdir
Mailbox backends
+ --enable-evolution $enable_evolution $disable_evolution_reason
+ --enable-gmail $enable_gmail $disable_gmail_reason
+ --enable-hotmail $enable_hotmail $disable_hotmail_reason
+ --enable-imap $enable_imap $disable_imap_reason
+ --enable-maildir $enable_maildir $disable_maildir_reason
--enable-mbox $enable_mbox $disable_mbox_reason
--enable-mh $enable_mh $disable_mh_reason
- --enable-maildir $enable_maildir $disable_maildir_reason
- --enable-pop3 $enable_pop3 $disable_pop3_reason
- --enable-imap $enable_imap $disable_imap_reason
- --enable-gmail $enable_gmail $disable_gmail_reason
- --enable-evolution $enable_evolution $disable_evolution_reason
--enable-mozilla $enable_mozilla $disable_mozilla_reason
+ --enable-pop3 $enable_pop3 $disable_pop3_reason
--enable-sylpheed $enable_sylpheed $disable_sylpheed_reason
- --enable-sylpheed-locking $enable_sylpheed_locking $disable_sylpheed_locking_reason
+ --enable-yahoo $enable_yahoo $disable_yahoo_reason
POP3 and IMAP features
- --enable-ssl $enable_ssl $disable_ssl_reason
- --enable-sasl $enable_sasl $disable_sasl_reason
--enable-ipv6 $enable_ipv6 $disable_ipv6_reason
+ --enable-sasl $enable_sasl $disable_sasl_reason
+ --enable-ssl $enable_ssl $disable_ssl_reason
EOF
diff --git a/configure.ac b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([Mail Notification], 4.1, jylefort@brutele.be)
+AC_INIT([Mail Notification], 5.0-rc1, jylefort@brutele.be)
AC_CONFIG_SRCDIR(src/mn-main.c)
AC_PREREQ(2.59)
@@ -8,27 +8,33 @@ AC_PREFIX_PROGRAM(gnome-open)
### command line arguments
+# mailbox backends
+MN_ARG_ENABLE(evolution, [disable Evolution support])
+MN_ARG_ENABLE(gmail, [disable Gmail support])
+MN_ARG_ENABLE(hotmail, [disable Windows Live Hotmail support])
+MN_ARG_ENABLE(imap, [disable IMAP support])
+MN_ARG_ENABLE(maildir, [disable Maildir support])
MN_ARG_ENABLE(mbox, [disable mbox support])
MN_ARG_ENABLE(mh, [disable MH support])
-MN_ARG_ENABLE(maildir, [disable Maildir support])
-MN_ARG_ENABLE(pop3, [disable POP3 support])
-MN_ARG_ENABLE(imap, [disable IMAP support])
-MN_ARG_ENABLE(ssl, [disable SSL/TLS support])
-MN_ARG_ENABLE(sasl, [disable SASL authentication support])
-MN_ARG_ENABLE(ipv6, [disable IPv6 support])
-MN_ARG_ENABLE(gmail, [disable Gmail support])
-MN_ARG_ENABLE(evolution, [disable Evolution support])
MN_ARG_ENABLE(mozilla, [disable Mozilla products support])
+MN_ARG_ENABLE(pop3, [disable POP3 support])
MN_ARG_ENABLE(sylpheed, [disable Sylpheed support])
-MN_ARG_ENABLE(sylpheed-locking, [enable .sylpheed_mark locking], no)
+MN_ARG_ENABLE(yahoo, [disable Yahoo! Mail support])
+
+# POP3 and IMAP features
+MN_ARG_ENABLE(ipv6, [disable IPv6 support])
+MN_ARG_ENABLE(sasl, [disable SASL authentication support])
+MN_ARG_ENABLE(ssl, [disable SSL/TLS support])
+# miscellaneous
MN_ARG_COMPILE_WARNINGS
-MN_ARG_DEBUG(no)
+MN_ARG_DEBUG(yes)
MN_ARG_ENABLE(regression-tests, [build and run regression tests], no)
+MN_ARG_ENABLE(gconf-sanity-check, [disable the startup GConf sanity check])
### initialization
-# needed by AC_REENTRANT_RESOLVER
+# needed by AC_REENTRANT_RESOLVER and AC_STRING_ARCH_UNALIGNED
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([foreign dist-bzip2])
@@ -42,10 +48,9 @@ GETTEXT_PACKAGE=mail-notification
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the gettext package name])
AC_SUBST(GETTEXT_PACKAGE)
-ALL_LINGUAS="bg ca cs de fr ja nl pl pt pt_BR ru sr sr@Latn sv"
AM_GLIB_GNU_GETTEXT
-AC_PROG_INTLTOOL
+IT_PROG_INTLTOOL([0.35.0])
### system features
@@ -60,17 +65,20 @@ fi
AC_REENTRANT_RESOLVER
+AC_STRING_ARCH_UNALIGNED
+
# timegm() is non-standard, define HAVE_TIMEGM if it is present
AC_CHECK_FUNCS(timegm)
# see if "struct tm" is defined in sys/time.h
AC_STRUCT_TM
-### mandatory libraries and programs
+# defines WORDS_BIGENDIAN if relevant, needed by mn-md5.c
+AC_C_BIGENDIAN
-AM_PATH_GTK_2_0(2.6.0,, [AC_MSG_ERROR([unable to find the GTK+ library])])
+### mandatory libraries and programs
-PKG_CHECK_MODULES(GNOME, [gthread-2.0 gconf-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify],, [AC_MSG_ERROR([unable to find the GNOME libraries])])
+PKG_CHECK_MODULES(GNOME, [glib-2.0 >= 2.10 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.10 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 >= 2.6.0 bonobo-activation-2.0 libxml-2.0 libnotify >= 0.4.1],, [AC_MSG_ERROR([unable to find the GNOME libraries])])
AM_GCONF_SOURCE_2
AM_PATH_GNOME_PREFIX
@@ -91,43 +99,73 @@ AC_PATH_PROG(AML, aml)
AC_PATH_PROG(GOB2, gob2)
MN_FEATURE_VAR_NAME(mime)=no
-if MN_FEATURE_ENABLED(mbox) ||
- MN_FEATURE_ENABLED(mh) ||
- MN_FEATURE_ENABLED(maildir) ||
- MN_FEATURE_ENABLED(pop3) ||
+if MN_FEATURE_ENABLED(hotmail) ||
MN_FEATURE_ENABLED(imap) ||
+ MN_FEATURE_ENABLED(maildir) ||
+ MN_FEATURE_ENABLED(mbox) ||
+ MN_FEATURE_ENABLED(mh) ||
MN_FEATURE_ENABLED(mozilla) ||
- MN_FEATURE_ENABLED(sylpheed); then
- PKG_CHECK_MODULES(GMIME, [gmime-2.0 >= 2.1.0], [MN_FEATURE_VAR_NAME(mime)=yes], [:])
+ MN_FEATURE_ENABLED(pop3) ||
+ MN_FEATURE_ENABLED(sylpheed) ||
+ MN_FEATURE_ENABLED(yahoo); then
+ PKG_CHECK_MODULES(GMIME, [gmime-2.0 >= 2.1.0], [MN_FEATURE_VAR_NAME(mime)=yes])
if MN_FEATURE_DISABLED(mime); then
+ if MN_FEATURE_ENABLED(hotmail); then
+ MN_FEATURE_DISABLE(hotmail, [GMime not found])
+ fi
+ if MN_FEATURE_ENABLED(imap); then
+ MN_FEATURE_DISABLE(imap, [GMime not found])
+ fi
+ if MN_FEATURE_ENABLED(maildir); then
+ MN_FEATURE_DISABLE(maildir, [GMime not found])
+ fi
if MN_FEATURE_ENABLED(mbox); then
MN_FEATURE_DISABLE(mbox, [GMime not found])
fi
if MN_FEATURE_ENABLED(mh); then
MN_FEATURE_DISABLE(mh, [GMime not found])
fi
- if MN_FEATURE_ENABLED(maildir); then
- MN_FEATURE_DISABLE(maildir, [GMime not found])
+ if MN_FEATURE_ENABLED(mozilla); then
+ MN_FEATURE_DISABLE(mozilla, [GMime not found])
fi
if MN_FEATURE_ENABLED(pop3); then
MN_FEATURE_DISABLE(pop3, [GMime not found])
fi
+ if MN_FEATURE_ENABLED(sylpheed); then
+ MN_FEATURE_DISABLE(sylpheed, [GMime not found])
+ fi
+ if MN_FEATURE_ENABLED(yahoo); then
+ MN_FEATURE_DISABLE(yahoo, [GMime not found])
+ fi
+ fi
+fi
+
+MN_FEATURE_VAR_NAME(gnome-keyring)=no
+if MN_FEATURE_ENABLED(pop3) ||
+ MN_FEATURE_ENABLED(imap) ||
+ MN_FEATURE_ENABLED(gmail) ||
+ MN_FEATURE_ENABLED(yahoo) ||
+ MN_FEATURE_ENABLED(hotmail); then
+ PKG_CHECK_MODULES(GNOME_KEYRING, [gnome-keyring-1], [MN_FEATURE_VAR_NAME(gnome-keyring=yes)])
+ if MN_FEATURE_DISABLED(gnome-keyring); then
+ if MN_FEATURE_ENABLED(pop3); then
+ MN_FEATURE_DISABLE(pop3, [gnome-keyring not found])
+ fi
if MN_FEATURE_ENABLED(imap); then
- MN_FEATURE_DISABLE(imap, [GMime not found])
+ MN_FEATURE_DISABLE(imap, [gnome-keyring not found])
fi
- if MN_FEATURE_ENABLED(mozilla); then
- MN_FEATURE_DISABLE(mozilla, [GMime not found])
+ if MN_FEATURE_ENABLED(gmail); then
+ MN_FEATURE_DISABLE(gmail, [gnome-keyring not found])
fi
- if MN_FEATURE_ENABLED(sylpheed); then
- MN_FEATURE_DISABLE(sylpheed, [GMime not found])
+ if MN_FEATURE_ENABLED(yahoo); then
+ MN_FEATURE_DISABLE(yahoo, [gnome-keyring not found])
+ fi
+ if MN_FEATURE_ENABLED(hotmail); then
+ MN_FEATURE_DISABLE(hotmail, [gnome-keyring not found])
fi
fi
fi
-if MN_FEATURE_ENABLED(sylpheed-locking) && MN_FEATURE_DISABLED(sylpheed); then
- MN_FEATURE_DISABLE(sylpheed-locking, [Sylpheed support disabled])
-fi
-
if MN_FEATURE_DISABLED(pop3) && MN_FEATURE_DISABLED(imap); then
if MN_FEATURE_ENABLED(ssl); then
MN_FEATURE_DISABLE(ssl, [POP3 and IMAP support disabled])
@@ -151,23 +189,7 @@ if MN_FEATURE_ENABLED(sasl); then
fi
if MN_FEATURE_ENABLED(evolution); then
- evolution=no
- AM_PATH_EVOLUTION_PLUGIN(2.12,, [evolution=yes])
- if test $evolution = no; then
- AM_PATH_EVOLUTION_PLUGIN(2.10,, [evolution=yes])
- fi
- if test $evolution = no; then
- AM_PATH_EVOLUTION_PLUGIN(2.8,, [evolution=yes])
- fi
- if test $evolution = no; then
- AM_PATH_EVOLUTION_PLUGIN(2.6,, [evolution=yes])
- fi
- if test $evolution = no; then
- AM_PATH_EVOLUTION_PLUGIN(2.4,, [evolution=yes])
- fi
- if test $evolution = no; then
- MN_FEATURE_DISABLE(evolution, [Evolution not found])
- fi
+ AM_PATH_EVOLUTION_PLUGIN(,, [MN_FEATURE_DISABLE(evolution, [Evolution not found])])
fi
### Automake conditionals
@@ -180,12 +202,16 @@ AM_CONDITIONAL(WITH_MAILDIR, [MN_FEATURE_ENABLED(maildir)])
AM_CONDITIONAL(WITH_POP3, [MN_FEATURE_ENABLED(pop3)])
AM_CONDITIONAL(WITH_IMAP, [MN_FEATURE_ENABLED(imap)])
AM_CONDITIONAL(WITH_POP3_OR_IMAP, [MN_FEATURE_ENABLED(pop3) || MN_FEATURE_ENABLED(imap)])
-AM_CONDITIONAL(WITH_POP3_OR_IMAP_OR_GMAIL, [MN_FEATURE_ENABLED(pop3) || MN_FEATURE_ENABLED(imap) || MN_FEATURE_ENABLED(gmail)])
+AM_CONDITIONAL(WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL, [MN_FEATURE_ENABLED(pop3) || MN_FEATURE_ENABLED(imap) || MN_FEATURE_ENABLED(gmail) || MN_FEATURE_ENABLED(yahoo) || MN_FEATURE_ENABLED(hotmail)])
+AM_CONDITIONAL(WITH_YAHOO_OR_HOTMAIL, [MN_FEATURE_ENABLED(yahoo) || MN_FEATURE_ENABLED(hotmail)])
AM_CONDITIONAL(WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED, [MN_FEATURE_ENABLED(mbox) || MN_FEATURE_ENABLED(mozilla) || MN_FEATURE_ENABLED(mh) || MN_FEATURE_ENABLED(maildir) || MN_FEATURE_ENABLED(sylpheed)])
AM_CONDITIONAL(WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION, [MN_FEATURE_ENABLED(mbox) || MN_FEATURE_ENABLED(mozilla) || MN_FEATURE_ENABLED(mh) || MN_FEATURE_ENABLED(maildir) || MN_FEATURE_ENABLED(sylpheed) || MN_FEATURE_ENABLED(evolution)])
+AM_CONDITIONAL(WITH_MAILDIR_OR_SYLPHEED, [MN_FEATURE_ENABLED(maildir) || MN_FEATURE_ENABLED(sylpheed)])
AM_CONDITIONAL(WITH_SSL, [MN_FEATURE_ENABLED(ssl)])
AM_CONDITIONAL(WITH_SASL, [MN_FEATURE_ENABLED(sasl)])
AM_CONDITIONAL(WITH_GMAIL, [MN_FEATURE_ENABLED(gmail)])
+AM_CONDITIONAL(WITH_YAHOO, [MN_FEATURE_ENABLED(yahoo)])
+AM_CONDITIONAL(WITH_HOTMAIL, [MN_FEATURE_ENABLED(hotmail)])
AM_CONDITIONAL(WITH_EVOLUTION, [MN_FEATURE_ENABLED(evolution)])
AM_CONDITIONAL(WITH_SYLPHEED, [MN_FEATURE_ENABLED(sylpheed)])
AM_CONDITIONAL(WITH_MIME, [MN_FEATURE_ENABLED(mime)])
@@ -193,7 +219,7 @@ AM_CONDITIONAL(WITH_REGRESSION_TESTS, [MN_FEATURE_ENABLED(regression-tests)])
### config.h definitions
-MN_FEATURES_DEFINE([mbox, mh, maildir, pop3, imap, ssl, sasl, ipv6, gmail, evolution, mozilla, sylpheed, sylpheed-locking, mime])
+MN_FEATURES_DEFINE([mbox, mh, maildir, pop3, imap, ssl, sasl, ipv6, gmail, yahoo, hotmail, evolution, mozilla, sylpheed, mime, gconf-sanity-check])
### output
@@ -219,11 +245,11 @@ The following settings will be used:
Installation prefixes
MN_REPORT_ARGS([prefix, exec-prefix])
Installation directories
-MN_REPORT_ARGS([bindir, datadir, sysconfdir, libdir])
+MN_REPORT_ARGS([bindir, datadir, datarootdir, libdir, sysconfdir])
Mailbox backends
-MN_REPORT_FEATURES([mbox, mh, maildir, pop3, imap, gmail, evolution, mozilla, sylpheed, sylpheed-locking])
+MN_REPORT_FEATURES([evolution, gmail, hotmail, imap, maildir, mbox, mh, mozilla, pop3, sylpheed, yahoo])
POP3 and IMAP features
-MN_REPORT_FEATURES([ssl, sasl, ipv6])
+MN_REPORT_FEATURES([ipv6, sasl, ssl])
EOF
if test -z "$gnome_prefix"; then
diff --git a/data/Makefile.am b/data/Makefile.am
@@ -19,6 +19,8 @@ schemasdir = $(GCONF_SCHEMA_FILE_DIR)
schemas_in_files = mail-notification.schemas.in
schemas_DATA = mail-notification.schemas
+dist_pkgdata_DATA = new-mail.wav
+
@INTLTOOL_DESKTOP_RULE@
@INTLTOOL_SERVER_RULE@
@INTLTOOL_SCHEMAS_RULE@
@@ -50,4 +52,4 @@ GNOME_MailNotification.server.in: GNOME_MailNotification.server.in.in
sed -e 's|\@bindir\@|$(bindir)|' GNOME_MailNotification.server.in.in > GNOME_MailNotification.server.in
mail-notification.schemas.in: mail-notification.schemas.in.in
- sed -e 's|\@gnome_prefix\@|$(gnome_prefix)|' mail-notification.schemas.in.in > mail-notification.schemas.in
+ sed -e 's|\@pkgdatadir\@|$(pkgdatadir)|' mail-notification.schemas.in.in > mail-notification.schemas.in
diff --git a/data/Makefile.in b/data/Makefile.in
@@ -34,14 +34,16 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = data
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/evolution-plugin.m4 \
$(top_srcdir)/m4/gnome.m4 $(top_srcdir)/m4/idl.m4 \
$(top_srcdir)/m4/openssl.m4 \
$(top_srcdir)/m4/reentrant-resolver.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sasl2.m4 \
+ $(top_srcdir)/m4/string-arch-unaligned.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -56,14 +58,15 @@ am__vpath_adj = case $$p in \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(autostartdir)" \
- "$(DESTDIR)$(gnome_cappletdir)" "$(DESTDIR)$(schemasdir)" \
- "$(DESTDIR)$(serverdir)"
+ "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(gnome_cappletdir)" \
+ "$(DESTDIR)$(schemasdir)" "$(DESTDIR)$(serverdir)"
autostartDATA_INSTALL = $(INSTALL_DATA)
+dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
gnome_cappletDATA_INSTALL = $(INSTALL_DATA)
schemasDATA_INSTALL = $(INSTALL_DATA)
serverDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(autostart_DATA) $(gnome_capplet_DATA) $(schemas_DATA) \
- $(server_DATA)
+DATA = $(autostart_DATA) $(dist_pkgdata_DATA) $(gnome_capplet_DATA) \
+ $(schemas_DATA) $(server_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
@@ -110,11 +113,11 @@ GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_CFLAGS = @GNOME_CFLAGS@
+GNOME_KEYRING_CFLAGS = @GNOME_KEYRING_CFLAGS@
+GNOME_KEYRING_LIBS = @GNOME_KEYRING_LIBS@
GNOME_LIBS = @GNOME_LIBS@
GOB2 = @GOB2@
GREP = @GREP@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_LIBS = @GTK_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -126,14 +129,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_ICONV = @INTLTOOL_ICONV@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
-INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
@@ -145,7 +146,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
@@ -179,6 +179,7 @@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SASL_CFLAGS = @SASL_CFLAGS@
SASL_LIBS = @SASL_LIBS@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -258,6 +259,7 @@ server_DATA = $(evolution_server) GNOME_MailNotification.server
schemasdir = $(GCONF_SCHEMA_FILE_DIR)
schemas_in_files = mail-notification.schemas.in
schemas_DATA = mail-notification.schemas
+dist_pkgdata_DATA = new-mail.wav
EXTRA_DIST = \
GNOME_MailNotification.server.in.in \
GNOME_MailNotification_Evolution.server.in \
@@ -329,6 +331,23 @@ uninstall-autostartDATA:
echo " rm -f '$(DESTDIR)$(autostartdir)/$$f'"; \
rm -f "$(DESTDIR)$(autostartdir)/$$f"; \
done
+install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
+ @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+ $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
+ done
+
+uninstall-dist_pkgdataDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
+ done
install-gnome_cappletDATA: $(gnome_capplet_DATA)
@$(NORMAL_INSTALL)
test -z "$(gnome_cappletdir)" || $(MKDIR_P) "$(DESTDIR)$(gnome_cappletdir)"
@@ -417,7 +436,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(autostartdir)" "$(DESTDIR)$(gnome_cappletdir)" "$(DESTDIR)$(schemasdir)" "$(DESTDIR)$(serverdir)"; do \
+ for dir in "$(DESTDIR)$(autostartdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(gnome_cappletdir)" "$(DESTDIR)$(schemasdir)" "$(DESTDIR)$(serverdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -465,8 +484,8 @@ info: info-am
info-am:
install-data-am: install-autostartDATA install-data-local \
- install-gnome_cappletDATA install-schemasDATA \
- install-serverDATA
+ install-dist_pkgdataDATA install-gnome_cappletDATA \
+ install-schemasDATA install-serverDATA
install-dvi: install-dvi-am
@@ -500,8 +519,9 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-autostartDATA uninstall-gnome_cappletDATA \
- uninstall-schemasDATA uninstall-serverDATA
+uninstall-am: uninstall-autostartDATA uninstall-dist_pkgdataDATA \
+ uninstall-gnome_cappletDATA uninstall-schemasDATA \
+ uninstall-serverDATA
.MAKE: install-am install-strip
@@ -509,15 +529,16 @@ uninstall-am: uninstall-autostartDATA uninstall-gnome_cappletDATA \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-autostartDATA install-data install-data-am \
- install-data-local install-dvi install-dvi-am install-exec \
- install-exec-am install-gnome_cappletDATA install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-schemasDATA install-serverDATA install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-autostartDATA uninstall-gnome_cappletDATA \
+ install-data-local install-dist_pkgdataDATA install-dvi \
+ install-dvi-am install-exec install-exec-am \
+ install-gnome_cappletDATA install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-schemasDATA \
+ install-serverDATA install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-autostartDATA \
+ uninstall-dist_pkgdataDATA uninstall-gnome_cappletDATA \
uninstall-schemasDATA uninstall-serverDATA
@@ -534,7 +555,7 @@ GNOME_MailNotification.server.in: GNOME_MailNotification.server.in.in
sed -e 's|\@bindir\@|$(bindir)|' GNOME_MailNotification.server.in.in > GNOME_MailNotification.server.in
mail-notification.schemas.in: mail-notification.schemas.in.in
- sed -e 's|\@gnome_prefix\@|$(gnome_prefix)|' mail-notification.schemas.in.in > mail-notification.schemas.in
+ sed -e 's|\@pkgdatadir\@|$(pkgdatadir)|' mail-notification.schemas.in.in > mail-notification.schemas.in
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/data/mail-notification-properties.desktop.in b/data/mail-notification-properties.desktop.in
@@ -4,7 +4,7 @@ _Name=Mail Notification
Icon=mail-notification
_Comment=Configure Mail Notification
Type=Application
-Categories=GNOME;Application;Settings;
+Categories=GNOME;GTK;Settings;
Exec=mail-notification --display-properties
Terminal=false
StartupNotify=true
diff --git a/data/mail-notification.desktop.in b/data/mail-notification.desktop.in
@@ -4,7 +4,7 @@ _Name=Mail Notification
Icon=mail-notification
_Comment=Get notified when new mail arrives
Type=Application
-Categories=GNOME;Application;Network;
+Categories=GNOME;GTK;Network;
Exec=mail-notification --sm-disable
Terminal=false
StartupNotify=true
diff --git a/data/mail-notification.schemas.in.in b/data/mail-notification.schemas.in.in
@@ -16,7 +16,7 @@
<applyto>/apps/mail-notification/commands/new-mail/command</applyto>
<owner>mail-notification</owner>
<type>string</type>
- <default>play @gnome_prefix@/share/gnome/sounds/email.wav</default>
+ <default></default>
<locale name="C">
<short>New mail command</short>
<long>The command to run when new mail arrives.</long>
@@ -51,7 +51,8 @@
<default>0</default>
<locale name="C">
<short>Run a command when the message list changes</short>
- <long>Whether to run a command when the message list changes or not.</long>
+ <long>Whether to run a command when the message list changes
+ or not.</long>
</locale>
</schema>
<schema>
@@ -105,7 +106,8 @@
<list_type>string</list_type>
<locale name="C">
<short>Fingerprints of trusted X509 certificates</short>
- <long>The list of trusted X509 certificates, represented by their MD5 fingerprint.</long>
+ <long>The list of trusted X509 certificates, represented by
+ their MD5 fingerprint.</long>
</locale>
</schema>
<schema>
@@ -116,7 +118,8 @@
<list_type>string</list_type>
<locale name="C">
<short>Trusted servers list</short>
- <long>The list of trusted SSL/TLS servers (hostname:port) lacking a X509 certificate.</long>
+ <long>The list of trusted SSL/TLS servers (hostname:port)
+ lacking a X509 certificate.</long>
</locale>
</schema>
<schema>
@@ -127,7 +130,8 @@
<default>1</default>
<locale name="C">
<short>Display seen mail</short>
- <long>Whether to display seen mail or not.</long>
+ <long>Whether to display mail which is still marked as unread
+ but has been seen or not.</long>
</locale>
</schema>
<schema>
@@ -138,7 +142,8 @@
<default>standard</default>
<locale name="C">
<short>Tooltip mail summary</short>
- <long>The type of mail summary to display in the icon's tooltip. Must be "standard", "compact" or "none".</long>
+ <long>The type of mail summary to display in the icon's
+ tooltip. Must be "standard", "compact" or "none".</long>
</locale>
</schema>
<schema>
@@ -149,18 +154,33 @@
<default>0</default>
<locale name="C">
<short>Always display an icon</short>
- <long>Whether to display an icon when there is no new mail or not.</long>
+ <long>Whether to display an icon when there is no new mail or
+ not.</long>
</locale>
</schema>
<schema>
- <key>/schemas/apps/mail-notification/click-action-2</key>
- <applyto>/apps/mail-notification/click-action-2</applyto>
+ <key>/schemas/apps/mail-notification/display-message-count</key>
+ <applyto>/apps/mail-notification/display-message-count</applyto>
+ <owner>mail-notification</owner>
+ <type>bool</type>
+ <default>1</default>
+ <locale name="C">
+ <short>Display a message count in the status icon</short>
+ <long>Whether to display a message count in the status icon or
+ not.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/click-action-3</key>
+ <applyto>/apps/mail-notification/click-action-3</applyto>
<owner>mail-notification</owner>
<type>string</type>
- <default>display-properties-dialog</default>
+ <default>launch-mail-reader</default>
<locale name="C">
<short>Click action</short>
- <long>The action to perform when the icon is clicked. Must be "display-properties-dialog", "launch-mail-reader", "open-latest-message" or "update-mail-status".</long>
+ <long>The action to perform when the icon is clicked. Must be
+ "launch-mail-reader", "open-latest-message",
+ "consider-new-mail-as-read" or "update-mail-status".</long>
</locale>
</schema>
<schema>
@@ -183,7 +203,9 @@
<default>[open,mark-as-read,mark-as-spam]</default>
<locale name="C">
<short>Message popups actions</short>
- <long>The ordered list of actions to include in the message popups. Each element must be "open", "mark-as-read", "mark-as-spam" or "delete".</long>
+ <long>The ordered list of actions to include in the message
+ popups. Each element must be "open", "mark-as-read",
+ "mark-as-spam" or "delete".</long>
</locale>
</schema>
<schema>
@@ -194,7 +216,23 @@
<default>attached</default>
<locale name="C">
<short>Message popups position</short>
- <long>The position of the message popups. Must be "attached" or "free".</long>
+ <long>The position of the message popups. Must be "attached"
+ or "free".</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/popups/limit</key>
+ <applyto>/apps/mail-notification/popups/limit</applyto>
+ <owner>mail-notification</owner>
+ <type>int</type>
+ <default>10</default>
+ <locale name="C">
+ <short>Maximum number of simultaneous popups</short>
+ <long>The maximum number of popups to display simultaneously.
+ If this limit is exceeded, only the most recent messages will
+ be displayed. If the /apps/mail-notification/popups/position
+ key is set to "attached", this limit will be ignored and only
+ one popup will be allowed.</long>
</locale>
</schema>
<schema>
@@ -205,7 +243,8 @@
<default>default</default>
<locale name="C">
<short>Expire message popups</short>
- <long>Whether to expire message popups or not. Must be "default", "false" or "true".</long>
+ <long>Whether to expire message popups or not. Must be
+ "default", "false" or "true".</long>
</locale>
</schema>
<schema>
@@ -216,7 +255,9 @@
<default>0</default>
<locale name="C">
<short>Minutes to wait before expiring message popups</short>
- <long>If /apps/mail-notification/popups/expiration/enabled is set to "true", the amount of time to wait before expiring message popups (minutes part).</long>
+ <long>If /apps/mail-notification/popups/expiration/enabled is
+ set to "true", the amount of time to wait before expiring
+ message popups (minutes part).</long>
</locale>
</schema>
<schema>
@@ -227,7 +268,44 @@
<default>10</default>
<locale name="C">
<short>Seconds to wait before expiring message popups</short>
- <long>If /apps/mail-notification/popups/expiration/enabled is set to "true", the amount of time to wait before expiring message popups (seconds part).</long>
+ <long>If /apps/mail-notification/popups/expiration/enabled is
+ set to "true", the amount of time to wait before expiring
+ message popups (seconds part).</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/sounds/play-command</key>
+ <applyto>/apps/mail-notification/sounds/play-command</applyto>
+ <owner>mail-notification</owner>
+ <type>string</type>
+ <default>exec gst-launch-0.10 filesrc location=%file ! decodebin ! audioconvert ! gconfaudiosink >/dev/null 2>&1</default>
+ <locale name="C">
+ <short>Play sound command</short>
+ <long>The command to use to play a sound file. The string
+ %file will be substituted with the filename of the sound to
+ play.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/sounds/new-mail/enabled</key>
+ <applyto>/apps/mail-notification/sounds/new-mail/enabled</applyto>
+ <owner>mail-notification</owner>
+ <type>bool</type>
+ <default>0</default>
+ <locale name="C">
+ <short>Play a sound when new mail arrives</short>
+ <long>Whether to play a sound when new mail arrives or not.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/mail-notification/sounds/new-mail/file</key>
+ <applyto>/apps/mail-notification/sounds/new-mail/file</applyto>
+ <owner>mail-notification</owner>
+ <type>string</type>
+ <default>@pkgdatadir@/new-mail.wav</default>
+ <locale name="C">
+ <short>New mail sound</short>
+ <long>The sound file to play when new mail arrives.</long>
</locale>
</schema>
</schemalist>
diff --git a/data/new-mail.wav b/data/new-mail.wav
Binary files differ.
diff --git a/help/C/Makefile.in b/help/C/Makefile.in
@@ -104,8 +104,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/evolution-plugin.m4 \
$(top_srcdir)/m4/gnome.m4 $(top_srcdir)/m4/idl.m4 \
$(top_srcdir)/m4/openssl.m4 \
$(top_srcdir)/m4/reentrant-resolver.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sasl2.m4 \
+ $(top_srcdir)/m4/string-arch-unaligned.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -160,11 +161,11 @@ GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_CFLAGS = @GNOME_CFLAGS@
+GNOME_KEYRING_CFLAGS = @GNOME_KEYRING_CFLAGS@
+GNOME_KEYRING_LIBS = @GNOME_KEYRING_LIBS@
GNOME_LIBS = @GNOME_LIBS@
GOB2 = @GOB2@
GREP = @GREP@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_LIBS = @GTK_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -176,14 +177,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_ICONV = @INTLTOOL_ICONV@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
-INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
@@ -195,7 +194,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
@@ -229,6 +227,7 @@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SASL_CFLAGS = @SASL_CFLAGS@
SASL_LIBS = @SASL_LIBS@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
diff --git a/help/C/documentation-license.xml b/help/C/documentation-license.xml
@@ -2,11 +2,11 @@
<para>
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
- License (GFDL), Version 1.1 or any later version published
+ License (GFDL), Version 1.2 or any later version published
by the Free Software Foundation with no Invariant Sections,
no Front-Cover Texts, and no Back-Cover Texts. You can find
- a copy of the GFDL at this <ulink type="help"
- url="ghelp:fdl">link</ulink> or in the file COPYING-DOCS
+ a copy of the GFDL at this <ulink type="http"
+ url="http://www.gnu.org/licenses/fdl.html">link</ulink> or in the file COPYING-DOCS
distributed with this manual.
</para>
<para> This manual is part of a collection of GNOME manuals
diff --git a/help/C/figures/mail.png b/help/C/figures/mail.png
Binary files differ.
diff --git a/help/C/figures/mailbox-emblem-error.png b/help/C/figures/mailbox-emblem-error.png
Binary files differ.
diff --git a/help/C/figures/mailbox-emblem-polled.png b/help/C/figures/mailbox-emblem-polled.png
Binary files differ.
diff --git a/help/C/figures/mailbox-emblem-unknown.png b/help/C/figures/mailbox-emblem-unknown.png
Binary files differ.
diff --git a/help/C/mail-notification-C.omf b/help/C/mail-notification-C.omf
@@ -12,9 +12,9 @@
Mail Notification Manual
</title>
<date>
- 2007-06-26
+ 2007-11-27
</date>
- <version identifier="2.19" date="2007-06-26" description="Version 2.19"/>
+ <version identifier="2.20" date="2007-11-27" description="Version 2.20"/>
<subject category="GNOME|Internet"/>
<description>
Mail Notification Manual
diff --git a/help/C/mail-notification.xml b/help/C/mail-notification.xml
@@ -2,9 +2,9 @@
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY app "<application>Mail Notification</application>">
- <!ENTITY appversion "4.1">
- <!ENTITY manrevision "2.19">
- <!ENTITY date "Tuesday, June 26, 2007">
+ <!ENTITY appversion "5.0 Release Candidate 1">
+ <!ENTITY manrevision "2.20">
+ <!ENTITY date "Tuesday, November 27, 2007">
<!ENTITY project "The Mail Notification Project">
@@ -23,11 +23,10 @@
<!ENTITY tls "<link linkend="pop3">TLS</link>">
<!ENTITY mozilla "<link linkend="mozilla">Mozilla</link>">
<!ENTITY sylpheed "<link linkend="sylpheed">Sylpheed</link>">
- <!ENTITY gmail "<link linkend="gmail">Gmail</link>">
<!ENTITY gnomevfs "<link linkend="gnomevfs">GnomeVFS</link>">
]>
-<!-- $Id: mail-notification.xml,v 1.152 2007-06-26 11:29:10 jylefort Exp $ -->
+<!-- $Id: mail-notification.xml,v 1.167 2007-11-27 16:30:55 jylefort Exp $ -->
<!-- Mail Notification Manual -->
<!-- Copyright (C) 2003-2007 Jean-Yves Lefort -->
@@ -112,6 +111,17 @@
</revdescription>
</revision>
<revision>
+ <revnumber>Mail Notification Manual V2.19</revnumber>
+ <date>Tuesday, June 26, 2007</date>
+ <revdescription>
+ <para role="author">
+ Jean-Yves Lefort
+ <email>jylefort@brutele.be</email>
+ </para>
+ <para role="publisher">&project;</para>
+ </revdescription>
+ </revision>
+ <revision>
<revnumber>Mail Notification Manual V2.18</revnumber>
<date>Wednesday, January 17, 2007</date>
<revdescription>
@@ -355,7 +365,7 @@
</para>
<itemizedlist>
<listitem><para>multiple mailbox support</para></listitem>
- <listitem><para>&mbox;, &mh;, &maildir;, &pop3;, &imap;, &gmail;, Evolution, &mozilla; products (Mozilla, SeaMonkey, Thunderbird, …) and &sylpheed; support</para></listitem>
+ <listitem><para>Evolution, Gmail, &imap;, &maildir;, &mbox;, &mh;, &mozilla; products (Mozilla, SeaMonkey, Thunderbird, …), &pop3;, &sylpheed;, Windows Live Hotmail and Yahoo! Mail support</para></listitem>
<listitem><para>&sasl; authentication support</para></listitem>
<listitem><para>APOP authentication support</para></listitem>
<listitem><para>&ssl;/&tls; support</para></listitem>
@@ -433,6 +443,11 @@
</varlistentry>
<varlistentry>
+ <term>-r, --consider-new-mail-as-read</term>
+ <listitem><para>Consider new mail as read</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>-u, --update</term>
<listitem><para>Update the mail status</para></listitem>
</varlistentry>
@@ -470,7 +485,8 @@
</para>
<para>
When new mail arrives, an icon similar to the following one is
- displayed in the notification area (&aka; system tray):
+ displayed in the notification area (&aka; system tray). The
+ number of new messages is displayed over the icon.
</para>
<figure id="no-mail-fig">
<title>&app; when there is new mail</title>
@@ -491,9 +507,10 @@
<itemizedlist>
<listitem>
<para>
- if a command to be executed when new mail arrives is set in
- the <link linkend="commands">Commands</link> properties,
- that command is executed
+ if the <link
+ linkend="play-a-sound-when-new-mail-arrives">Play a sound
+ when new mail arrives</link> setting is enabled, that sound
+ is played
</para>
</listitem>
<listitem>
@@ -505,8 +522,7 @@
</listitem>
</itemizedlist>
<para>
- If an error is detected, the icon blinks (unless the
- <link linkend="blink-on-errors">Blink on errors</link> setting is disabled).
+ If an error is detected, the icon blinks.
</para>
<para>
Leaving your mouse over the icon will reveal more details
@@ -543,8 +559,8 @@
</itemizedlist>
<para>
In addition, at the bottom of the dialog, the <guilabel>Test
- messages</guilabel> option can be used to test the various
- options against test messages.
+ messages</guilabel> setting can be used to test the various
+ settings against test messages.
</para>
<sect2 id="properties-general">
@@ -554,20 +570,12 @@
<term><guilabel>General</guilabel></term>
<listitem>
<variablelist>
- <varlistentry>
- <term><guilabel>Display seen mail</guilabel></term>
+ <varlistentry id="play-a-sound-when-new-mail-arrives">
+ <term><guilabel>Play a sound when new mail arrives</guilabel></term>
<listitem>
<para>
- If this option is enabled, mail which is still
- marked as unread but has been seen will be
- displayed.
- </para>
- <para>
- The following mailbox types make a distinction
- between seen and unseen mail: &mbox;, &maildir;,
- &pop3;, &imap;, Evolution, &mozilla; and
- &sylpheed;. Other mailbox types consider all
- unread mail as unseen.
+ If this setting is enabled, the selected sound
+ will be played when new mail arrives.
</para>
</listitem>
</varlistentry>
@@ -588,88 +596,6 @@
</para>
</tip>
</para>
- <para>
- Small emblems may be displayed over mailbox icons. The
- following table summarizes them.
- </para>
- <table>
- <title>Mailbox Emblems</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Icon</entry>
- <entry>Signification</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <screenshot>
- <mediaobject>
- <imageobject>
- <imagedata fileref="figures/mailbox-emblem-error.png" format="PNG"/>
- </imageobject>
- <textobject>
- <phrase>Shows the emblem which is displayed when a mailbox has errors.</phrase>
- </textobject>
- </mediaobject>
- </screenshot>
- </entry>
- <entry>
- An error has occurred while trying to access the
- mailbox. The mailbox is unhandled.
- </entry>
- </row>
- <row id="poll-emblem">
- <entry>
- <screenshot>
- <mediaobject>
- <imageobject>
- <imagedata fileref="figures/mailbox-emblem-polled.png" format="PNG"/>
- </imageobject>
- <textobject>
- <phrase>Shows the emblem which is displayed when a mailbox is checked periodically.</phrase>
- </textobject>
- </mediaobject>
- </screenshot>
- </entry>
- <entry>
- The mailbox does not support <link linkend="immediate-notification">immediate notification</link>,
- and is checked periodically according to its
- <link linkend="delay-between-mail-checks">Delay between mail checks</link> setting.
- </entry>
- </row>
- <row>
- <entry>
- <screenshot>
- <mediaobject>
- <imageobject>
- <imagedata fileref="figures/mailbox-emblem-unknown.png" format="PNG"/>
- </imageobject>
- <textobject>
- <phrase>Shows the emblem which is displayed when the format of a mailbox is unknown.</phrase>
- </textobject>
- </mediaobject>
- </screenshot>
- </entry>
- <entry>
- The format of the mailbox is unknown. The
- mailbox is unhandled.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </listitem>
- </varlistentry>
- <varlistentry id="commands">
- <term><guilabel>Commands</guilabel></term>
- <listitem>
- <para>
- You can configure commands to be executed <guilabel>when
- new mail arrives</guilabel> and <guilabel>when all mail
- has been read</guilabel>.
- </para>
</listitem>
</varlistentry>
</variablelist>
@@ -678,54 +604,15 @@
<sect2 id="properties-status-icon">
<title>Status Icon</title>
<variablelist>
- <varlistentry>
- <term><guilabel>General</guilabel></term>
- <listitem>
- <variablelist>
- <varlistentry id="blink-on-errors">
- <term><guilabel>Blink on errors</guilabel></term>
- <listitem>
- <para>
- If this option is enabled, &app; will show the status
- icon and make it blink on errors. Disabling this option
- is useful if some of your mailboxes are not permanently
- accessible.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Always display</guilabel></term>
- <listitem>
- <para>
- If this is option is enabled, &app; will display
- an icon even when there is no new mail.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Tooltip Mail Summary</guilabel></term>
- <listitem>
- <para>
- You can choose the layout of the tooltip mail summary
- (<guilabel>standard</guilabel> or
- <guilabel>compact</guilabel>), or you can choose to
- disable the tooltip mail summary
- (<guilabel>none</guilabel>).
- </para>
- </listitem>
- </varlistentry>
<varlistentry id="click-action">
<term><guilabel>Click Action</guilabel></term>
<listitem>
<para>
You can choose an action to be performed when the mail
icon is clicked:
- <guilabel>display this dialog</guilabel>,
<guilabel>launch the mail reader</guilabel>,
- <guilabel>open the latest message</guilabel> or
+ <guilabel>open the latest message</guilabel>,
+ <guilabel>consider new mail as read</guilabel> or
<guilabel>update the mail status</guilabel>.
</para>
</listitem>
@@ -744,7 +631,7 @@
<term><guilabel>Enable message popups</guilabel></term>
<listitem>
<para>
- If this option is enabled, an information window
+ If this setting is enabled, an information window
will be popped up on your desktop whenever a new
message arrives.
</para>
@@ -841,9 +728,9 @@
<note>
<para>
The mailbox name will be modified automatically
- as you set some of the other options. To avoid
+ as you set some of the other settings. To avoid
losing your choice, only fill in the mailbox
- name after setting the other options.
+ name after setting the other settings.
</para>
</note>
</listitem>
@@ -858,11 +745,7 @@
This delay is only used if the mailbox does
not support <link
linkend="immediate-notification">immediate
- notification</link> of changes. If this is the
- case, an <link
- linkend="poll-emblem">emblem</link> will be
- displayed in the <link
- linkend="mailbox-list">mailbox list</link>.
+ notification</link> of changes.
</para>
</note>
</para>
@@ -894,22 +777,23 @@
<varlistentry>
<term>
- <guilabel>Account</guilabel> (<guilabel>POP3</guilabel>,
- <guilabel>IMAP</guilabel> and <guilabel>Gmail</guilabel>
- only)
+ <guilabel>Account</guilabel> (<guilabel>Gmail</guilabel>,
+ <guilabel>IMAP</guilabel>, <guilabel>POP3</guilabel>,
+ <guilabel>Windows Live Hotmail</guilabel> and
+ <guilabel>Yahoo! Mail</guilabel> only)
</term>
<listitem>
<variablelist>
<varlistentry>
<term>
<guilabel>Server</guilabel>
- (<guilabel>POP3</guilabel> and
- <guilabel>IMAP</guilabel> only)
+ (<guilabel>IMAP</guilabel> and
+ <guilabel>POP3</guilabel> only)
</term>
<listitem>
<para>
- This is the hostname or IP address of the &pop3; or
- &imap; server.
+ This is the hostname or IP address of the &imap; or
+ &pop3; server.
<note>
<para>
Symbolic names as well as IPv4 and IPv6
@@ -923,10 +807,7 @@
<term><guilabel>Username</guilabel></term>
<listitem>
<para>
- This is your username on the &pop3;, &imap; or
- &gmail; server. The username will be stored to disk
- unless it is left blank (in such case, a credentials
- prompt will appear when needed).
+ This is your username on the mail server.
</para>
</listitem>
</varlistentry>
@@ -934,13 +815,13 @@
<term><guilabel>Password</guilabel></term>
<listitem>
<para>
- This is your password on the &pop3;, &imap; or
- &gmail; server. The password will be stored to disk
- unless it is left blank (in such case, a credentials
- prompt will appear when needed).
+ This is your password on the mail server. If the
+ password is filled in, it will be stored to your
+ default keyring. If it is left out, a password
+ prompt will appear when needed.
</para>
<warning>
- <title>POP3 and IMAP Security</title>
+ <title>IMAP and POP3 Security</title>
<para>
To avoid sending your password over the network in
clear text, you must either use a SSL/TLS
@@ -990,7 +871,7 @@
</sect2>
<sect2 id="mailbox-properties-connection">
- <title>Connection (<guilabel>POP3</guilabel> and <guilabel>IMAP</guilabel> only)</title>
+ <title>Connection (<guilabel>IMAP</guilabel> and <guilabel>POP3</guilabel> only)</title>
<variablelist>
<varlistentry>
<term><guilabel>Connection type</guilabel></term>
@@ -1002,8 +883,8 @@
<para>
<guilabel>In-band SSL/TLS</guilabel> refers to a
&ssl;/&tls; connection negotiated inside of the
- protocol (using the <literal>STLS</literal> &pop3;
- command or the <literal>STARTTLS</literal> &imap;
+ protocol (using the <literal>STARTTLS</literal> &imap;
+ command or the <literal>STLS</literal> &pop3;
command).
</para>
<para>
@@ -1035,8 +916,8 @@
<para>
This is the authentication mechanism to use.
If you select <guilabel>autodetect</guilabel>,
- all the authentication mechanisms supported by the &pop3;
- or &imap; server will be tried, in descending order of
+ all the authentication mechanisms supported by the &imap;
+ or &pop3; server will be tried, in descending order of
security. Otherwise, the selected mechanism (and
<emphasis>only</emphasis> the selected mechanism) will
be used.
@@ -1075,10 +956,10 @@
<para>
If <guilabel>never</guilabel> is selected, &app;
will never use the IDLE extension, not even if the
- server supports it. Use this option if it appears
+ server supports it. Use this setting if it appears
that &app; does not detect changes to an &imap;
mailbox while the IDLE extension is in use. If using
- this option fixes the issue, please also send the
+ this setting fixes the issue, please also send the
&imap; session transcript (obtained by running &app;
using the --enable-info option) to Jean-Yves Lefort
<email>jylefort@brutele.be</email>.
@@ -1096,7 +977,7 @@
If <guilabel>always</guilabel> is selected, &app;
will use the IDLE extension if the server supports
it, regardless of the server software. Use this
- option if you want to force &app; to use the IDLE
+ setting if you want to force &app; to use the IDLE
extension, even if it has detected a bogus
implementation.
</para>
@@ -1144,15 +1025,22 @@
</thead>
<tbody>
<row>
- <entry>&mbox;</entry>
- <entry>no</entry>
+ <entry>Evolution</entry>
+ <entry>yes</entry>
+ <entry>yes</entry>
+ <entry>yes</entry>
+ <entry>yes</entry>
+ </row>
+ <row>
+ <entry>Gmail</entry>
+ <entry>yes</entry>
<entry>no</entry>
<entry>no</entry>
<entry>no</entry>
</row>
<row>
- <entry>&mh;</entry>
- <entry>yes</entry>
+ <entry>&imap;</entry>
+ <entry>no</entry>
<entry>no</entry>
<entry>no</entry>
<entry>no</entry>
@@ -1162,47 +1050,54 @@
<entry>yes</entry>
<entry>yes</entry>
<entry>no</entry>
- <entry>no</entry>
+ <entry>yes</entry>
</row>
<row>
- <entry>&pop3;</entry>
+ <entry>&mbox;</entry>
<entry>no</entry>
<entry>no</entry>
<entry>no</entry>
<entry>no</entry>
</row>
<row>
- <entry>&imap;</entry>
- <entry>no</entry>
+ <entry>&mh;</entry>
+ <entry>yes</entry>
<entry>no</entry>
<entry>no</entry>
<entry>no</entry>
</row>
<row>
- <entry>&gmail;</entry>
- <entry>yes</entry>
+ <entry>&mozilla;</entry>
+ <entry>no</entry>
<entry>no</entry>
<entry>no</entry>
<entry>no</entry>
</row>
<row>
- <entry>Evolution</entry>
- <entry>yes</entry>
- <entry>yes</entry>
+ <entry>&sylpheed;</entry>
<entry>yes</entry>
<entry>yes</entry>
+ <entry>no</entry>
+ <entry>no</entry>
</row>
<row>
- <entry>&mozilla;</entry>
+ <entry>&pop3;</entry>
<entry>no</entry>
<entry>no</entry>
<entry>no</entry>
<entry>no</entry>
</row>
<row>
- <entry>&sylpheed;</entry>
- <entry>yes</entry>
- <entry>yes</entry>
+ <entry>Windows Live Hotmail</entry>
+ <entry>no</entry>
+ <entry>no</entry>
+ <entry>no</entry>
+ <entry>no</entry>
+ </row>
+ <row>
+ <entry>Yahoo! Mail</entry>
+ <entry>no</entry>
+ <entry>no</entry>
<entry>no</entry>
<entry>no</entry>
</row>
@@ -1400,7 +1295,7 @@
</para>
<variablelist>
<varlistentry>
- <term>&mbox;, &mh;, &maildir;, &mozilla; and &sylpheed; mailboxes:</term>
+ <term>&maildir;, &mbox;, &mh;, &mozilla; and &sylpheed; mailboxes:</term>
<listitem>
<para>
&gnomevfs; must support monitoring (it usually does).
@@ -1426,7 +1321,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term>&pop3; and &gmail; mailboxes:</term>
+ <term>Gmail, &pop3;, Windows Live Hotmail and Yahoo! Mail mailboxes:</term>
<listitem>
<para>
Immediate notification is not supported by these mailbox types.
@@ -1439,11 +1334,9 @@
If immediate notification cannot be enabled for a mailbox
(either because that type of mailbox does not support it or
because the requirements are not met), the mailbox will be
- checked periodically according to its
- <link linkend="delay-between-mail-checks">Delay between mail checks</link> setting,
- and an <link linkend="poll-emblem">emblem</link> will be
- displayed in the <link linkend="mailbox-list">mailbox
- list</link>.
+ checked periodically according to its <link
+ linkend="delay-between-mail-checks">Delay between mail
+ checks</link> setting.
</para>
</note>
</sect2>
@@ -1556,6 +1449,10 @@ if (! success) {
</thead>
<tbody>
<row>
+ <entry>mail icon and message count</entry>
+ <entry>mn-mail-icon</entry>
+ </row>
+ <row>
<entry>tooltip section title</entry>
<entry>mn-tooltip-section-title</entry>
</row>
@@ -1597,11 +1494,7 @@ if (! success) {
<entry>mn-remote</entry>
</row>
<row>
- <entry>polled mailbox</entry>
- <entry>mn-polled</entry>
- </row>
- <row>
- <entry>unknown mailbox format</entry>
+ <entry>autodetect (in the <guilabel>Mailbox type</guilabel> drop-down menu)</entry>
<entry>mn-unknown</entry>
</row>
<row>
@@ -1613,6 +1506,14 @@ if (! success) {
<entry>mn-gmail</entry>
</row>
<row>
+ <entry>Yahoo! Mail mailbox</entry>
+ <entry>mn-yahoo</entry>
+ </row>
+ <row>
+ <entry>Windows Live Hotmail mailbox</entry>
+ <entry>mn-hotmail</entry>
+ </row>
+ <row>
<entry>system mailbox</entry>
<entry>mn-system-mailbox</entry>
</row>
@@ -1621,10 +1522,6 @@ if (! success) {
<entry>mn-evolution-mailbox</entry>
</row>
<row>
- <entry>select all</entry>
- <entry>mn-select-all</entry>
- </row>
- <row>
<entry>mail reader</entry>
<entry>mn-mail-reader</entry>
</row>
@@ -1633,8 +1530,8 @@ if (! success) {
<entry>mn-open-message</entry>
</row>
<row>
- <entry>connect (in the SSL/TLS confirmation dialog)</entry>
- <entry>mn-connect</entry>
+ <entry>consider new mail as read</entry>
+ <entry>mn-consider-new-mail-as-read</entry>
</row>
</tbody>
</tgroup>
@@ -1652,7 +1549,18 @@ if (! success) {
<filename>~/.gtkrc-2.0</filename> file.
</para>
<para>
- To use a small font for the mail summary tooltip messages:
+ To use a larger font for the message count of the mail icon,
+ and display it on a yellow background:
+ </para>
+ <programlisting>style "mn-mail-icon"
+{
+ font_name = "Sans 12"
+ bg[NORMAL] = "#FFFF00"
+}
+
+widget "*.mn-mail-icon" style "mn-mail-icon"</programlisting>
+ <para>
+ To use a smaller font for the mail summary tooltip messages:
</para>
<programlisting>style "mn-mail-summary-tooltip-messages"
{
@@ -1668,13 +1576,13 @@ widget "gtk-tooltips.*.mn-message-view"
style "mn-icons"
{
- stock["mn-local"] =
+ stock["mn-mail"] =
{
- { "local.png" }
+ { "my-mail-icon.png" }
}
- stock["mn-remote"] =
+ stock["mn-no-mail"] =
{
- { "remote.png" }
+ { "my-no-mail-icon.png" }
}
}
@@ -1736,7 +1644,7 @@ widget "*" style "mn-icons"</programlisting>
<question>
<para>
I need &ssl;/&tls; for connecting to my &pop3; or &imap;
- server, but the &ssl;/&tls; options are greyed out.
+ server, but the &ssl;/&tls; settings are greyed out.
</para>
</question>
<answer>
@@ -1826,15 +1734,15 @@ widget "*" style "mn-icons"</programlisting>
&app; was written by Jean-Yves Lefort
<email>jylefort@brutele.be</email>. To find more information
about &app;, visit the
- <ulink url="http://www.nongnu.org/mailnotify" type="http">Mail Notification web page</ulink>.
+ <ulink url="http://www.nongnu.org/mailnotify" type="http">Mail Notification web site</ulink>.
</para>
<sect2 id="problem-reports">
<title>Reporting Bugs and Other Feedback</title>
<para>
- Bug reports and feedback should be filed in the <ulink
- url="https://savannah.nongnu.org/bugs/?group=mailnotify"
- type="http">Mail Notification bug tracker</ulink>.
+ Bug reports and feature requests should be filed in the
+ <ulink url="https://bugs.launchpad.net/mail-notification/" type="http">Mail Notification bug tracker</ulink>.
+ Other feedback can be sent to Jean-Yves Lefort <email>jylefort@brutele.be</email>.
</para>
</sect2>
@@ -1857,6 +1765,7 @@ widget "*" style "mn-icons"</programlisting>
<listitem><para>Vladimir Petkov</para></listitem>
<listitem><para>Benoît Rouits</para></listitem>
<listitem><para>Tomasz Sarota-Raczek</para></listitem>
+ <listitem><para>Tomasz Sałaciński</para></listitem>
<listitem><para>Edwin Shin</para></listitem>
<listitem><para>Topi</para></listitem>
<listitem><para>Marcel J. Zwiebel</para></listitem>
@@ -1873,16 +1782,6 @@ widget "*" style "mn-icons"</programlisting>
<title>Glossary</title>
<glossdiv><title>G</title>
- <glossentry id="gmail">
- <glossterm>Gmail</glossterm>
- <glossdef>
- <para>
- A free webmail service operated by <ulink url="http://www.google.com" type="http">Google</ulink>.
- More information can be found on the <ulink url="http://gmail.google.com" type="http">Gmail web page</ulink>.
- </para>
- </glossdef>
- </glossentry>
-
<glossentry id="gnomevfs">
<glossterm>GnomeVFS</glossterm>
<glossdef>
diff --git a/help/C/software-license.xml b/help/C/software-license.xml
@@ -1,8 +1,9 @@
<para>
This program is distributed under the terms of the GNU General
Public license as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version. A
- copy of this license can be found at this <ulink url="ghelp:gpl"
- type="help">link</ulink>, or in the file COPYING included with the
+ version 3 of the License, or (at your option) any later version. A
+ copy of this license can be found at this <ulink
+ url="http://www.gnu.org/licenses/gpl-3.0.html"
+ type="http">link</ulink>, or in the file COPYING included with the
source code of this program.
</para>
diff --git a/help/Makefile.in b/help/Makefile.in
@@ -39,8 +39,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/evolution-plugin.m4 \
$(top_srcdir)/m4/gnome.m4 $(top_srcdir)/m4/idl.m4 \
$(top_srcdir)/m4/openssl.m4 \
$(top_srcdir)/m4/reentrant-resolver.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sasl2.m4 \
+ $(top_srcdir)/m4/string-arch-unaligned.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -106,11 +107,11 @@ GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_CFLAGS = @GNOME_CFLAGS@
+GNOME_KEYRING_CFLAGS = @GNOME_KEYRING_CFLAGS@
+GNOME_KEYRING_LIBS = @GNOME_KEYRING_LIBS@
GNOME_LIBS = @GNOME_LIBS@
GOB2 = @GOB2@
GREP = @GREP@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_LIBS = @GTK_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -122,14 +123,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_ICONV = @INTLTOOL_ICONV@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
-INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
@@ -141,7 +140,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
@@ -175,6 +173,7 @@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SASL_CFLAGS = @SASL_CFLAGS@
SASL_LIBS = @SASL_LIBS@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
diff --git a/intltool-extract.in b/intltool-extract.in
@@ -32,7 +32,7 @@
## Release information
my $PROGRAM = "intltool-extract";
my $PACKAGE = "intltool";
-my $VERSION = "0.35.5";
+my $VERSION = "0.36.2";
## Loaded modules
use strict;
@@ -237,9 +237,9 @@ sub entity_decode
s/'/'/g; # '
s/"/"/g; # "
- s/&/&/g;
s/</</g;
s/>/>/g;
+ s/&/&/g;
return $_;
}
diff --git a/intltool-merge.in b/intltool-merge.in
@@ -35,7 +35,7 @@
## Release information
my $PROGRAM = "intltool-merge";
my $PACKAGE = "intltool";
-my $VERSION = "0.35.5";
+my $VERSION = "0.36.2";
## Loaded modules
use strict;
@@ -93,9 +93,24 @@ my $OUTFILE;
my %po_files_by_lang = ();
my %translations = ();
-my $iconv = $ENV{"ICONV"} || $ENV{"INTLTOOL_ICONV"} || "@INTLTOOL_ICONV@";
+my $iconv = $ENV{"ICONV"} || "iconv";
my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
+sub isProgramInPath
+{
+ my ($file) = @_;
+ # If either a file exists, or when run it returns 0 exit status
+ return 1 if ((-x $file) or (system("$file -l >$devnull") == 0));
+ return 0;
+}
+
+if (! isProgramInPath ("$iconv"))
+{
+ print STDERR " *** iconv is not found on this system!\n".
+ " *** Without it, intltool-merge can not convert encodings.\n";
+ exit;
+}
+
# Use this instead of \w for XML files to handle more possible characters.
my $w = "[-A-Za-z0-9._:]";
@@ -260,8 +275,42 @@ sub po_file2lang
sub gather_po_files
{
- for my $po_file (glob "$PO_DIR/*.po") {
- $po_files_by_lang{po_file2lang($po_file)} = $po_file;
+ if (my $linguas = $ENV{"LINGUAS"})
+ {
+ for my $lang (split / /, $linguas) {
+ my $po_file = $PO_DIR . "/" . $lang . ".po";
+ if (-e $po_file) {
+ $po_files_by_lang{$lang} = $po_file;
+ }
+ }
+ }
+ else
+ {
+ if (open LINGUAS_FILE, "$PO_DIR/LINGUAS")
+ {
+ while (<LINGUAS_FILE>)
+ {
+ next if /^#/;
+
+ if (/([-a-zA-Z_@.]+)\n/)
+ {
+ my $lang = $1;
+
+ my $po_file = $PO_DIR . "/" . $lang . ".po";
+ if (-e $po_file) {
+ $po_files_by_lang{$lang} = $po_file;
+ }
+ }
+ }
+
+ close LINGUAS_FILE;
+ }
+ else
+ {
+ for my $po_file (glob "$PO_DIR/*.po") {
+ $po_files_by_lang{po_file2lang($po_file)} = $po_file;
+ }
+ }
}
}
@@ -494,16 +543,15 @@ sub unescape_po_string
return $string;
}
-## NOTE: deal with < - < but not > - > because it seems its ok to have
-## > in the entity. For further info please look at #84738.
sub entity_decode
{
local ($_) = @_;
s/'/'/g; # '
s/"/"/g; # "
- s/&/&/g;
s/</</g;
+ s/>/>/g;
+ s/&/&/g;
return $_;
}
diff --git a/intltool-update.in b/intltool-update.in
@@ -30,7 +30,7 @@
## Release information
my $PROGRAM = "intltool-update";
-my $VERSION = "0.35.5";
+my $VERSION = "0.36.2";
my $PACKAGE = "intltool";
## Loaded modules
@@ -71,7 +71,8 @@ my $xml_support =
"sheet(?:\\.in)+|". # ?
"schemas(?:\\.in)+|". # GConf specific
"pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer.
-"kbd(?:\\.in)+"; # GOK specific.
+"kbd(?:\\.in)+|". # GOK specific.
+"policy(?:\\.in)+"; # PolicyKit files
my $ini_support =
"icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
@@ -328,7 +329,12 @@ sub FindLeftoutFiles
push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/;
push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
}, "..";
-
+ find sub {
+ push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/;
+ push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/;
+ push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/;
+ push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
+ }, "$SRCDIR/..";
open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n";
@buf_potfiles = grep !/^(#|\s*$)/, <POTFILES>;
@@ -489,11 +495,15 @@ sub FindLeftoutFiles
my %in2;
foreach (@buf_potfiles_sorted)
{
+ s#^$SRCDIR/../##;
+ s#^$SRCDIR/##;
$in2{$_} = 1;
}
foreach (@buf_potfiles_ignore_sorted)
{
+ s#^$SRCDIR/../##;
+ s#^$SRCDIR/##;
$in2{$_} = 1;
}
@@ -501,9 +511,16 @@ sub FindLeftoutFiles
foreach (@buf_allfiles_sorted)
{
- if (!exists($in2{$_}))
+ my $dummy = $_;
+ my $srcdir = $SRCDIR;
+
+ $srcdir =~ s#^../##;
+ $dummy =~ s#^$srcdir/../##;
+ $dummy =~ s#^$srcdir/##;
+ $dummy =~ s#_build/##;
+ if (!exists($in2{$dummy}))
{
- push @result, $_
+ push @result, $dummy
}
}
@@ -563,11 +580,23 @@ sub Console_WriteError_InvalidOption
exit 1;
}
-sub isIntltoolExtractInPath
+sub isProgramInPath
{
my ($file) = @_;
# If either a file exists, or when run it returns 0 exit status
- return 1 if ((-x $file) or (system("$file >/dev/null") == 0));
+ return 1 if ((-x $file) or (system("$file --version >$devnull") == 0));
+ return 0;
+}
+
+sub isGNUGettextTool
+{
+ my ($file) = @_;
+ # Check that we are using GNU gettext tools
+ if (isProgramInPath ($file))
+ {
+ my $version = `$file --version`;
+ return 1 if ($version =~ m/.*\(GNU .*\).*/);
+ }
return 0;
}
@@ -577,7 +606,7 @@ sub GenerateHeaders
## Generate the .h header files, so we can allow glade and
## xml translation support
- if (! isIntltoolExtractInPath("$EXTRACT"))
+ if (! isProgramInPath ("$EXTRACT"))
{
print STDERR "\n *** The intltool-extract script wasn't found!"
."\n *** Without it, intltool-update can not generate files.\n";
@@ -624,13 +653,13 @@ sub GenerateHeaders
#
sub GeneratePOTemplate
{
- my $XGETTEXT = $ENV{"XGETTEXT"} || "@INTLTOOL_XGETTEXT@";
+ my $XGETTEXT = $ENV{"XGETTEXT"} || "xgettext";
my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || '';
chomp $XGETTEXT;
- if (! -x $XGETTEXT)
+ if (! isGNUGettextTool ("$XGETTEXT"))
{
- print STDERR " *** xgettext is not found on this system!\n".
+ print STDERR " *** GNU xgettext is not found on this system!\n".
" *** Without it, intltool-update can not extract strings.\n";
exit;
}
@@ -726,7 +755,23 @@ sub GeneratePOTemplate
unlink "$MODULE.pot";
my @xgettext_argument=("$XGETTEXT",
"--add-comments",
- "--directory\=\.",
+ "--directory\=.",
+ "--default-domain\=$MODULE",
+ "--flag\=g_strdup_printf:1:c-format",
+ "--flag\=g_string_printf:2:c-format",
+ "--flag\=g_string_append_printf:2:c-format",
+ "--flag\=g_error_new:3:c-format",
+ "--flag\=g_set_error:4:c-format",
+ "--flag\=g_markup_printf_escaped:1:c-format",
+ "--flag\=g_log:3:c-format",
+ "--flag\=g_print:1:c-format",
+ "--flag\=g_printerr:1:c-format",
+ "--flag\=g_printf:1:c-format",
+ "--flag\=g_fprintf:2:c-format",
+ "--flag\=g_sprintf:2:c-format",
+ "--flag\=g_snprintf:3:c-format",
+ "--flag\=g_scanner_error:2:c-format",
+ "--flag\=g_scanner_warn:2:c-format",
"--output\=$MODULE\.pot",
"--files-from\=\.\/POTFILES\.in\.temp");
my $XGETTEXT_KEYWORDS = &FindPOTKeywords;
@@ -793,9 +838,16 @@ sub POFile_Update
{
-f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n";
- my $MSGMERGE = $ENV{"MSGMERGE"} || "@INTLTOOL_MSGMERGE@";
+ my $MSGMERGE = $ENV{"MSGMERGE"} || "msgmerge";
my ($lang, $outfile) = @_;
+ if (! isGNUGettextTool ("$MSGMERGE"))
+ {
+ print STDERR " *** GNU msgmerge is not found on this system!\n".
+ " *** Without it, intltool-update can not extract strings.\n";
+ exit;
+ }
+
print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE;
my $infile = "$SRCDIR/$lang.po";
@@ -836,7 +888,14 @@ sub POFile_GetLanguage ($)
sub Console_Write_TranslationStatus
{
my ($lang, $output_file) = @_;
- my $MSGFMT = $ENV{"MSGFMT"} || "@INTLTOOL_MSGFMT@";
+ my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt";
+
+ if (! isGNUGettextTool ("$MSGFMT"))
+ {
+ print STDERR " *** GNU msgfmt is not found on this system!\n".
+ " *** Without it, intltool-update can not extract strings.\n";
+ exit;
+ }
$output_file = "$SRCDIR/$lang.po" if ($output_file eq "");
@@ -845,21 +904,28 @@ sub Console_Write_TranslationStatus
sub Console_Write_CoverageReport
{
- my $MSGFMT = $ENV{"MSGFMT"} || "@INTLTOOL_MSGFMT@";
+ my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt";
+
+ if (! isGNUGettextTool ("$MSGFMT"))
+ {
+ print STDERR " *** GNU msgfmt is not found on this system!\n".
+ " *** Without it, intltool-update can not extract strings.\n";
+ exit;
+ }
&GatherPOFiles;
foreach my $lang (@languages)
{
- print "$lang: ";
+ print STDERR "$lang: ";
&POFile_Update ($lang, "");
}
- print "\n\n * Current translation support in $MODULE \n\n";
+ print STDERR "\n\n * Current translation support in $MODULE \n\n";
foreach my $lang (@languages)
{
- print "$lang: ";
+ print STDERR "$lang: ";
system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po");
}
}
@@ -933,13 +999,13 @@ sub CONF_Handle_Open
$conf_in || die "Cannot find top_builddir in Makevars.";
}
- elsif (-f "../configure.ac")
+ elsif (-f "$SRCDIR/../configure.ac")
{
- $conf_in = "../configure.ac";
+ $conf_in = "$SRCDIR/../configure.ac";
}
- elsif (-f "../configure.in")
+ elsif (-f "$SRCDIR/../configure.in")
{
- $conf_in = "../configure.in";
+ $conf_in = "$SRCDIR/../configure.in";
}
else
{
diff --git a/ltmain.sh b/ltmain.sh
@@ -1,8 +1,8 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
@@ -43,14 +43,22 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION="1.5.22 Debian 1.5.22-4"
-TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes.
-if test -n "${ZSH_VERSION+set}" ; then
+VERSION="1.5.24 Debian 1.5.24-1ubuntu1"
+TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@@ -105,12 +113,14 @@ esac
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
- save_LANG="$LANG"; LANG=C; export LANG
-fi
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ fi"
+done
# Make sure IFS has a sensible default
lt_nl='
@@ -136,6 +146,8 @@ duplicate_deps=no
preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
#####################################
# Shell function definitions:
@@ -196,7 +208,13 @@ func_win32_libid ()
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \
- $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
+ $SED -n -e '1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
case $win32_nmres in
import*) win32_libid_type="x86 archive import";;
*) win32_libid_type="x86 archive static";;
@@ -327,7 +345,17 @@ func_extract_archives ()
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
- my_xdir="$my_gentop/$my_xlib"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ extracted_serial=`expr $extracted_serial + 1`
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
@@ -454,11 +482,12 @@ do
;;
--version)
- $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
- $echo
- $echo "Copyright (C) 2005 Free Software Foundation, Inc."
- $echo "This is free software; see the source for copying conditions. There is NO"
- $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ echo "\
+$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
+
+Copyright (C) 2007 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit $?
;;
@@ -755,9 +784,10 @@ if test -z "$show_help"; then
*.class) xform=class ;;
*.cpp) xform=cpp ;;
*.cxx) xform=cxx ;;
- *.f90) xform=f90 ;;
+ *.[fF][09]?) xform=[fF][09]. ;;
*.for) xform=for ;;
*.java) xform=java ;;
+ *.obj) xform=obj ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -1138,8 +1168,9 @@ EOF
for arg
do
case $arg in
- -all-static | -static)
- if test "X$arg" = "X-all-static"; then
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
fi
@@ -1147,12 +1178,20 @@ EOF
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=yes
- else
+ ;;
+ -static)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=built
- fi
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
build_libtool_libs=no
build_old_libs=yes
break
@@ -1600,7 +1639,7 @@ EOF
continue
;;
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
@@ -1620,10 +1659,11 @@ EOF
# -m* pass through architecture-specific compiler args for GCC
# -m*, -t[45]*, -txscale* pass through architecture-specific
# compiler args for GCC
- # -pg pass through profiling flag for GCC
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
# @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
- -t[45]*|-txscale*|@*)
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
@@ -1651,9 +1691,9 @@ EOF
-no-install)
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
# The PATH hackery in wrapper scripts is required on Windows
- # in order for the loader to find any dlls it needs.
+ # and Darwin in order for the loader to find any dlls it needs.
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
@@ -1712,7 +1752,7 @@ EOF
continue
;;
- -static)
+ -static | -static-libtool-libs)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
@@ -2097,7 +2137,7 @@ EOF
lib=
found=no
case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
@@ -2493,7 +2533,9 @@ EOF
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
@@ -3189,7 +3231,7 @@ EOF
# which has an extra 1 added just for fun
#
case $version_type in
- darwin|linux|osf|windows)
+ darwin|linux|osf|windows|none)
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_revision"
@@ -3200,9 +3242,10 @@ EOF
age="0"
;;
irix|nonstopux)
- current=`expr $number_major + $number_minor - 1`
+ current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_minor"
+ lt_irix_increment=no
;;
*)
$echo "$modename: unknown library version type \`$version_type'" 1>&2
@@ -3266,7 +3309,8 @@ EOF
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
- verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
;;
freebsd-aout)
@@ -3280,8 +3324,11 @@ EOF
;;
irix | nonstopux)
- major=`expr $current - $age + 1`
-
+ if test "X$lt_irix_increment" = "Xno"; then
+ major=`expr $current - $age`
+ else
+ major=`expr $current - $age + 1`
+ fi
case $version_type in
nonstopux) verstring_prefix=nonstopux ;;
*) verstring_prefix=sgi ;;
@@ -3418,11 +3465,11 @@ EOF
fi
# Eliminate all temporary directories.
- for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
- deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
- done
+ #for path in $notinst_path; do
+ # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+ # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+ # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+ #done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
@@ -3523,13 +3570,12 @@ EOF
int main() { return 0; }
EOF
$rm conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
ldd_output=`ldd conftest`
for i in $deplibs; do
name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" -ne "0"; then
+ if test "$name" != "" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
@@ -3568,9 +3614,7 @@ EOF
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $i
- # Did it work?
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
ldd_output=`ldd conftest`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
@@ -3602,7 +3646,7 @@ EOF
droppeddeps=yes
$echo
$echo "*** Warning! Library $i is needed by this library but I was not able to"
- $echo "*** make it link in! You will probably need to install it or some"
+ $echo "*** make it link in! You will probably need to install it or some"
$echo "*** library that it depends on before this library will be fully"
$echo "*** functional. Installing it before continuing would be even better."
fi
@@ -3888,7 +3932,10 @@ EOF
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ case $archive_cmds in
+ *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
+ *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
+ esac
else
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
fi
@@ -4247,12 +4294,14 @@ EOF
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
else
gentop="$output_objdir/${obj}x"
generated="$generated $gentop"
@@ -4700,16 +4749,16 @@ static const void *lt_preloaded_setup() {
case $host in
*cygwin* | *mingw* )
if test -f "$output_objdir/${outputname}.def" ; then
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
else
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
fi
;;
* )
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
;;
esac
;;
@@ -4724,13 +4773,13 @@ static const void *lt_preloaded_setup() {
# really was required.
# Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
fi
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
@@ -4817,7 +4866,7 @@ static const void *lt_preloaded_setup() {
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
else
# fast_install is set to needless
relink_command=
@@ -4854,7 +4903,7 @@ static const void *lt_preloaded_setup() {
fi
done
relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
fi
# Quote $echo for shipping.
@@ -5261,6 +5310,20 @@ EOF
Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -5403,7 +5466,7 @@ else
;;
esac
$echo >> $output "\
- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ \$echo \"\$0: cannot exec \$program \$*\"
exit $EXIT_FAILURE
fi
else
@@ -5589,7 +5652,7 @@ fi\
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
if test "$hardcode_automatic" = yes ; then
relink_command=
fi
@@ -5934,9 +5997,9 @@ relink_command=\"$relink_command\""
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
else
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
fi
$echo "$modename: warning: relinking \`$file'" 1>&2
@@ -6145,7 +6208,7 @@ relink_command=\"$relink_command\""
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
$show "$relink_command"
if $run eval "$relink_command"; then :
@@ -6356,8 +6419,10 @@ relink_command=\"$relink_command\""
if test -f "$dir/$objdir/$dlname"; then
dir="$dir/$objdir"
else
- $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
- exit $EXIT_FAILURE
+ if test ! -f "$dir/$dlname"; then
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+ exit $EXIT_FAILURE
+ fi
fi
;;
@@ -6421,12 +6486,12 @@ relink_command=\"$relink_command\""
fi
# Restore saved environment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
+ for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ fi"
+ done
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"
@@ -6783,9 +6848,9 @@ The following components of LINK-COMMAND are treated specially:
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
+ try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX
- try to export only the symbols matching REGEX
+ try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened
@@ -6799,9 +6864,11 @@ The following components of LINK-COMMAND are treated specially:
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of libtool libraries
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
diff --git a/m4/Makefile.am b/m4/Makefile.am
@@ -4,4 +4,5 @@ EXTRA_DIST = \
idl.m4 \
openssl.m4 \
reentrant-resolver.m4 \
- sasl2.m4
+ sasl2.m4 \
+ string-arch-unaligned.m4
diff --git a/m4/Makefile.in b/m4/Makefile.in
@@ -39,8 +39,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/evolution-plugin.m4 \
$(top_srcdir)/m4/gnome.m4 $(top_srcdir)/m4/idl.m4 \
$(top_srcdir)/m4/openssl.m4 \
$(top_srcdir)/m4/reentrant-resolver.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sasl2.m4 \
+ $(top_srcdir)/m4/string-arch-unaligned.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -94,11 +95,11 @@ GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_CFLAGS = @GNOME_CFLAGS@
+GNOME_KEYRING_CFLAGS = @GNOME_KEYRING_CFLAGS@
+GNOME_KEYRING_LIBS = @GNOME_KEYRING_LIBS@
GNOME_LIBS = @GNOME_LIBS@
GOB2 = @GOB2@
GREP = @GREP@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_LIBS = @GTK_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -110,14 +111,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_ICONV = @INTLTOOL_ICONV@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
-INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
@@ -129,7 +128,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
@@ -163,6 +161,7 @@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SASL_CFLAGS = @SASL_CFLAGS@
SASL_LIBS = @SASL_LIBS@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -234,7 +233,8 @@ EXTRA_DIST = \
idl.m4 \
openssl.m4 \
reentrant-resolver.m4 \
- sasl2.m4
+ sasl2.m4 \
+ string-arch-unaligned.m4
all: all-am
diff --git a/m4/evolution-plugin.m4 b/m4/evolution-plugin.m4
@@ -1,24 +1,33 @@
-# This file is part of Mail Notification.
+# Mail Notification
+# Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
#
-# Copyright (C) 2005, 2006 Jean-Yves Lefort.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
#
-# As a special exception to the Mail Notification licensing terms,
-# Jean-Yves Lefort gives unlimited permission to copy, distribute and
-# modify this file.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-dnl AM_PATH_EVOLUTION_PLUGIN([BRANCH], [MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl AM_PATH_EVOLUTION_PLUGIN([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl
AC_DEFUN([AM_PATH_EVOLUTION_PLUGIN],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-evolution_branch=ifelse([$1],, [2.4], [$1])
-evolution_plugin_min_version=ifelse([$2],,, [>= $2])
+# MN uses em_folder_tree_set_selected(), whose prototype was changed in 2.12
+evolution_plugin_min_version=ifelse([$1],, [2.12], [$1])
-PKG_CHECK_MODULES(EVOLUTION_PLUGIN, [evolution-plugin-$evolution_branch $evolution_plugin_min_version], [found=yes], [found=no])
+PKG_CHECK_MODULES(EVOLUTION_PLUGIN, [evolution-plugin >= $evolution_plugin_min_version], [found=yes], [found=no])
if test $found = yes; then
AC_MSG_CHECKING([for the Evolution plugin directory])
- evolution_plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin-$evolution_branch 2>/dev/null`
+ evolution_plugindir=`$PKG_CONFIG --variable=plugindir evolution-plugin 2>/dev/null`
if test -n "$evolution_plugindir"; then
AC_MSG_RESULT([$evolution_plugindir])
else
@@ -28,10 +37,10 @@ if test $found = yes; then
fi
if test $found = yes; then
- ifelse([$3],, :, [$3])
+ ifelse([$2],, :, [$2])
else
evolution_plugindir=""
- ifelse([$4],, :, [$4])
+ ifelse([$3],, :, [$3])
fi
AC_SUBST(evolution_plugindir)])
diff --git a/m4/gnome.m4 b/m4/gnome.m4
@@ -1,10 +1,19 @@
-# This file is part of Mail Notification.
+# Mail Notification
+# Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
#
-# Copyright (C) 2005-2007 Jean-Yves Lefort.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
#
-# As a special exception to the Mail Notification licensing terms,
-# Jean-Yves Lefort gives unlimited permission to copy, distribute and
-# modify this file.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
dnl AM_PATH_GNOME_PREFIX([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl
diff --git a/m4/idl.m4 b/m4/idl.m4
@@ -1,10 +1,19 @@
-# This file is part of Mail Notification.
+# Mail Notification
+# Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
#
-# Copyright (C) 2005 Jean-Yves Lefort.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
#
-# As a special exception to the Mail Notification licensing terms,
-# Jean-Yves Lefort gives unlimited permission to copy, distribute and
-# modify this file.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
dnl AM_PATH_ORBIT_IDL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl
diff --git a/m4/openssl.m4 b/m4/openssl.m4
@@ -1,10 +1,19 @@
-# This file is part of Mail Notification.
+# Mail Notification
+# Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
#
-# Copyright (C) 2004 Jean-Yves Lefort.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
#
-# As a special exception to the Mail Notification licensing terms,
-# Jean-Yves Lefort gives unlimited permission to copy, distribute and
-# modify this file.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
dnl AM_PATH_OPENSSL([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl
diff --git a/m4/reentrant-resolver.m4 b/m4/reentrant-resolver.m4
@@ -1,10 +1,19 @@
-# This file is part of Mail Notification.
+# Mail Notification
+# Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
#
-# Copyright (C) 2005 Jean-Yves Lefort.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
#
-# As a special exception to the Mail Notification licensing terms,
-# Jean-Yves Lefort gives unlimited permission to copy, distribute and
-# modify this file.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
dnl AC_REENTRANT_RESOLVER
dnl
diff --git a/m4/sasl2.m4 b/m4/sasl2.m4
@@ -1,10 +1,19 @@
-# This file is part of Mail Notification.
+# Mail Notification
+# Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
#
-# Copyright (C) 2004 Jean-Yves Lefort.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
#
-# As a special exception to the Mail Notification licensing terms,
-# Jean-Yves Lefort gives unlimited permission to copy, distribute and
-# modify this file.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
dnl AM_PATH_SASL2([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl
diff --git a/m4/string-arch-unaligned.m4 b/m4/string-arch-unaligned.m4
@@ -0,0 +1,28 @@
+# Mail Notification
+# Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+dnl AC_STRING_ARCH_UNALIGNED
+dnl
+AC_DEFUN([AC_STRING_ARCH_UNALIGNED],
+[case "$target_cpu" in
+ i[[34567]]86|x86_64|s390|s390x) string_arch_unaligned=yes ;;
+ *) string_arch_unaligned=no ;;
+esac
+
+if test $string_arch_unaligned = yes; then
+ AC_DEFINE(STRING_ARCH_UNALIGNED, 1, [taken from glibc])
+fi])
diff --git a/po/LINGUAS b/po/LINGUAS
@@ -0,0 +1,14 @@
+bg
+ca
+cs
+de
+fr
+ja
+nl
+pl
+pt
+pt_BR
+ru
+sr
+sr@Latn
+sv
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
@@ -133,7 +133,7 @@ install-data-yes: all
dvi info tags TAGS ID:
# Define this as empty until I found a useful application.
-installcheck:
+install-exec installcheck:
uninstall:
linguas="$(USE_LINGUAS)"; \
diff --git a/po/POTFILES.in b/po/POTFILES.in
@@ -13,7 +13,6 @@ src/mn-authenticated-mailbox.gob
src/mn-autodetect-mailbox-properties.gob
src/mn-automation.gob
src/mn-base-mbox-mailbox-backend.gob
-src/mn-blinking-image.gob
src/mn-client-session.c
src/mn-client-session.h
src/mn-compact-message-view.gob
@@ -24,9 +23,11 @@ src/mn-evolution-folder-tree-control.gob
src/mn-evolution-mailbox-properties.gob
src/mn-evolution-mailbox.gob
src/mn-evolution-plugin.c
+src/mn-file-chooser-button.gob
src/mn-gmail-mailbox-properties.gob
src/mn-gmail-mailbox.gob
src/mn-gmime-stream-vfs.gob
+src/mn-hotmail-mailbox.gob
src/mn-imap-mailbox-properties.gob
src/mn-imap-mailbox.gob
src/mn-mail-icon.gob
@@ -35,6 +36,7 @@ src/mn-mailbox-view.gob
src/mn-mailbox.gob
src/mn-mailboxes.gob
src/mn-maildir-mailbox-backend.gob
+src/mn-maildir-message.gob
src/mn-main.c
src/mn-mbox-mailbox-backend.gob
src/mn-md5.c
@@ -53,12 +55,15 @@ src/mn-properties-dialog.gob
src/mn-sasl.c
src/mn-sasl.h
src/mn-shell.gob
+src/mn-sound-file-chooser-dialog.gob
+src/mn-sound-player.gob
src/mn-ssl.c
src/mn-ssl.h
src/mn-standard-message-view.gob
src/mn-stock.c
src/mn-stock.h
src/mn-sylpheed-mailbox-backend.gob
+src/mn-sylpheed-message.gob
src/mn-system-vfs-mailbox-properties.gob
src/mn-system-vfs-mailbox.gob
src/mn-test-mailbox.gob
@@ -69,6 +74,9 @@ src/mn-vfs-mailbox-backend.gob
src/mn-vfs-mailbox.gob
src/mn-vfs.c
src/mn-vfs.h
+src/mn-webmail-mailbox-properties.gob
+src/mn-webmail-mailbox.gob
src/mn-xml.c
+src/mn-yahoo-mailbox.gob
ui/mailbox-properties-dialog.glade
ui/properties-dialog.glade
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
@@ -14,7 +14,6 @@ src/mn-authenticated-mailbox.c
src/mn-autodetect-mailbox-properties.c
src/mn-automation.c
src/mn-base-mbox-mailbox-backend.c
-src/mn-blinking-image.c
src/mn-compact-message-view.c
src/mn-custom-vfs-mailbox.c
src/mn-dialog.c
@@ -22,9 +21,11 @@ src/mn-evolution-folder-tree-control.c
src/mn-evolution-glue.c
src/mn-evolution-mailbox-properties.c
src/mn-evolution-mailbox.c
+src/mn-file-chooser-button.c
src/mn-gmail-mailbox-properties.c
src/mn-gmail-mailbox.c
src/mn-gmime-stream-vfs.c
+src/mn-hotmail-mailbox.c
src/mn-imap-mailbox-properties.c
src/mn-imap-mailbox.c
src/mn-mail-icon.c
@@ -33,6 +34,7 @@ src/mn-mailbox-view.c
src/mn-mailbox.c
src/mn-mailboxes.c
src/mn-maildir-mailbox-backend.c
+src/mn-maildir-message.c
src/mn-mbox-mailbox-backend.c
src/mn-message.c
src/mn-mh-mailbox-backend.c
@@ -44,8 +46,11 @@ src/mn-popup.c
src/mn-properties-dialog.c
src/mn-reentrant-mailbox.c
src/mn-shell.c
+src/mn-sound-file-chooser-dialog.c
+src/mn-sound-player.c
src/mn-standard-message-view.c
src/mn-sylpheed-mailbox-backend.c
+src/mn-sylpheed-message.c
src/mn-system-vfs-mailbox-properties.c
src/mn-system-vfs-mailbox.c
src/mn-test-mailbox.c
@@ -53,3 +58,6 @@ src/mn-text-table.c
src/mn-tooltips.c
src/mn-vfs-mailbox-backend.c
src/mn-vfs-mailbox.c
+src/mn-webmail-mailbox-properties.c
+src/mn-webmail-mailbox.c
+src/mn-yahoo-mailbox.c
diff --git a/po/fr.po b/po/fr.po
@@ -8,10 +8,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: mail-notification 4.1\n"
+"Project-Id-Version: mail-notification 5.0-rc1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-06-18 07:44+0200\n"
-"PO-Revision-Date: 2007-06-18 07:47+0200\n"
+"POT-Creation-Date: 2007-11-27 17:27+0100\n"
+"PO-Revision-Date: 2007-11-27 17:28+0100\n"
"Last-Translator: Jean-Yves Lefort <jylefort@brutele.be>\n"
"Language-Team: Jean-Yves Lefort <jylefort@brutele.be>\n"
"MIME-Version: 1.0\n"
@@ -29,11 +29,11 @@ msgstr "usine d'automation de l'avertisseur de courrier"
#: ../data/GNOME_MailNotification_Evolution.server.in.h:1
msgid "Evolution folder tree control"
-msgstr "contrôle Evolution \"hiérarchie de dossiers\""
+msgstr "contrôle Evolution « hiérarchie de dossiers »"
#: ../data/GNOME_MailNotification_Evolution.server.in.h:2
msgid "Evolution folder tree control factory"
-msgstr "usine de contrôle Evolution \"hiérarchie de dossiers\""
+msgstr "créateur du contrôle Evolution « hiérarchie de dossiers »"
#: ../data/GNOME_MailNotification_Evolution.server.in.h:3
msgid "Mail Notification / Evolution glue"
@@ -41,16 +41,16 @@ msgstr "colle avertisseur de courrier / Evolution"
#: ../data/GNOME_MailNotification_Evolution.server.in.h:4
msgid "Mail Notification / Evolution glue factory"
-msgstr "usine de colle avertisseur de courrier / Evolution"
+msgstr "créateur du liant avertisseur de courrier / Evolution"
#: ../data/mail-notification-properties.desktop.in.h:1
msgid "Configure Mail Notification"
msgstr "Configurer l'avertisseur de courrier"
#: ../data/mail-notification-properties.desktop.in.h:2
-#: ../data/mail-notification.desktop.in.h:2 ../src/mn-mail-icon.gob:234
-#: ../src/mn-main.c:143 ../src/mn-main.c:350 ../src/mn-main.c:371
-#: ../src/mn-main.c:445
+#: ../data/mail-notification.desktop.in.h:2 ../src/mn-mail-icon.gob:299
+#: ../src/mn-main.c:146 ../src/mn-main.c:363 ../src/mn-main.c:384
+#: ../src/mn-main.c:458
msgid "Mail Notification"
msgstr "Avertisseur de courrier"
@@ -71,108 +71,137 @@ msgid "Click action"
msgstr "Action du click"
#: ../data/mail-notification.schemas.in.in.h:4
+msgid "Display a message count in the status icon"
+msgstr "Afficher le nombre de messages dans l'icône de statut"
+
+#: ../data/mail-notification.schemas.in.in.h:5
msgid "Display seen mail"
msgstr "Afficher le courrier vu"
-#: ../data/mail-notification.schemas.in.in.h:5
+#: ../data/mail-notification.schemas.in.in.h:6
msgid "Enable message popups"
msgstr "Activer les popups"
-#: ../data/mail-notification.schemas.in.in.h:6
+#: ../data/mail-notification.schemas.in.in.h:7
msgid "Expire message popups"
msgstr "Activer l'expiration des popups"
-#: ../data/mail-notification.schemas.in.in.h:7
+#: ../data/mail-notification.schemas.in.in.h:8
msgid "Fingerprints of trusted X509 certificates"
msgstr "Empreintes digitales des certificats X509 de confiance"
-#: ../data/mail-notification.schemas.in.in.h:8
+#: ../data/mail-notification.schemas.in.in.h:9
msgid "Height of properties dialog"
msgstr "Hauteur de la boîte de dialogue contenant les propriétés"
-#: ../data/mail-notification.schemas.in.in.h:9
+#: ../data/mail-notification.schemas.in.in.h:10
msgid ""
"If /apps/mail-notification/popups/expiration/enabled is set to \"true\", the "
"amount of time to wait before expiring message popups (minutes part)."
msgstr ""
-"Si /apps/mail-notification/popups/expiration/enabled est \"true\", le délai "
+"Si /apps/mail-notification/popups/expiration/enabled est « true », le délai "
"d'expiration des popups (minutes)."
-#: ../data/mail-notification.schemas.in.in.h:10
+#: ../data/mail-notification.schemas.in.in.h:11
msgid ""
"If /apps/mail-notification/popups/expiration/enabled is set to \"true\", the "
"amount of time to wait before expiring message popups (seconds part)."
msgstr ""
-"Si /apps/mail-notification/popups/expiration/enabled est \\\"true\\\", le "
-"délai d'expiration des popups (secondes)."
+"Si /apps/mail-notification/popups/expiration/enabled est « true », le délai "
+"d'expiration des popups (secondes)."
-#: ../data/mail-notification.schemas.in.in.h:11
+#: ../data/mail-notification.schemas.in.in.h:12
msgid "Mail changed command"
msgstr "Commande de courrier changé"
-#: ../data/mail-notification.schemas.in.in.h:12
+#: ../data/mail-notification.schemas.in.in.h:13
msgid "Mail read command"
msgstr "Commande de courrier lu"
-#: ../data/mail-notification.schemas.in.in.h:13
+#: ../data/mail-notification.schemas.in.in.h:14
+msgid "Maximum number of simultaneous popups"
+msgstr "Nombre maximum de popups simultanés"
+
+#: ../data/mail-notification.schemas.in.in.h:15
msgid "Message popups actions"
msgstr "Actions des popups"
-#: ../data/mail-notification.schemas.in.in.h:14
+#: ../data/mail-notification.schemas.in.in.h:16
msgid "Message popups position"
msgstr "Position des popups"
-#: ../data/mail-notification.schemas.in.in.h:15
+#: ../data/mail-notification.schemas.in.in.h:17
msgid "Minutes to wait before expiring message popups"
msgstr "Minutes du délai d'expiration des popups"
-#: ../data/mail-notification.schemas.in.in.h:16
+#: ../data/mail-notification.schemas.in.in.h:18
msgid "New mail command"
-msgstr "Commande de nouveau message"
+msgstr "Commande de nouveau courrier"
-#: ../data/mail-notification.schemas.in.in.h:17
+#: ../data/mail-notification.schemas.in.in.h:19
+msgid "New mail sound"
+msgstr "Son de nouveau courrier"
+
+#: ../data/mail-notification.schemas.in.in.h:20
+msgid "Play a sound when new mail arrives"
+msgstr "Lire un son lorsque du nouveau courrier arrive"
+
+#: ../data/mail-notification.schemas.in.in.h:21
+msgid "Play sound command"
+msgstr "Commande de lecture de son"
+
+#: ../data/mail-notification.schemas.in.in.h:22
msgid "Run a command when all mail is read"
msgstr "Exécuter une commande lorsque tout le courrier est lu"
-#: ../data/mail-notification.schemas.in.in.h:18
+#: ../data/mail-notification.schemas.in.in.h:23
msgid "Run a command when new mail arrives"
msgstr "Exécuter une commande lorsque du nouveau courrier arrive"
-#: ../data/mail-notification.schemas.in.in.h:19
+#: ../data/mail-notification.schemas.in.in.h:24
msgid "Run a command when the message list changes"
msgstr "Exécuter une commande lorsque la liste des messages change"
-#: ../data/mail-notification.schemas.in.in.h:20
+#: ../data/mail-notification.schemas.in.in.h:25
msgid "Seconds to wait before expiring message popups"
msgstr "Secondes du délai d'expiration des popups"
-#: ../data/mail-notification.schemas.in.in.h:21
+#: ../data/mail-notification.schemas.in.in.h:26
msgid ""
-"The action to perform when the icon is clicked. Must be \"display-properties-"
-"dialog\", \"launch-mail-reader\", \"open-latest-message\" or \"update-mail-"
+"The action to perform when the icon is clicked. Must be \"launch-mail-reader"
+"\", \"open-latest-message\", \"consider-new-mail-as-read\" or \"update-mail-"
"status\"."
msgstr ""
-"L'action à effectuer lorsque l'icône est clickée. Doit être \"display-"
-"properties-dialog\", \"launch-mail-reader\", \"open-latest-message\" ou "
-"\"update-mail-status\"."
+"L'action à effectuer lorsque l'icône est clickée. Doit être « launch-mail-"
+"reader », « open-latest-message », « consider-new-mail-as-read » ou « update-"
+"mail-status »."
-#: ../data/mail-notification.schemas.in.in.h:22
+#: ../data/mail-notification.schemas.in.in.h:27
msgid "The command to run when all mail is read."
msgstr "La commande à exécuter lorsque tout le courrier est lu"
-#: ../data/mail-notification.schemas.in.in.h:23
+#: ../data/mail-notification.schemas.in.in.h:28
msgid "The command to run when new mail arrives."
msgstr "La commande à exécuter lorsque du nouveau courrier arrive."
-#: ../data/mail-notification.schemas.in.in.h:24
+#: ../data/mail-notification.schemas.in.in.h:29
msgid "The command to run when the message list changes."
msgstr "La commande à exécuter lorsque la liste des messages change."
-#: ../data/mail-notification.schemas.in.in.h:25
+#: ../data/mail-notification.schemas.in.in.h:31
+#, no-c-format
+msgid ""
+"The command to use to play a sound file. The string %file will be "
+"substituted with the filename of the sound to play."
+msgstr ""
+"La commande à utiliser pour lire un fichier son. La chaîne de caractères %"
+"file sera remplacée par le nom de fichier du son à jouer."
+
+#: ../data/mail-notification.schemas.in.in.h:32
msgid "The height of the properties dialog in pixels."
msgstr "La hauteur de la boîte de dialogue contenant les propriétés en pixels."
-#: ../data/mail-notification.schemas.in.in.h:26
+#: ../data/mail-notification.schemas.in.in.h:33
msgid ""
"The list of trusted SSL/TLS servers (hostname:port) lacking a X509 "
"certificate."
@@ -180,96 +209,127 @@ msgstr ""
"La liste des serveurs SSL/TLS (hôte:port) de confiance auxquels il manque un "
"certificat X509."
-#: ../data/mail-notification.schemas.in.in.h:27
+#: ../data/mail-notification.schemas.in.in.h:34
msgid ""
"The list of trusted X509 certificates, represented by their MD5 fingerprint."
msgstr ""
"La liste des certificats X509 de confiance, représentés par leur empreinte "
"digitale."
-#: ../data/mail-notification.schemas.in.in.h:28
+#: ../data/mail-notification.schemas.in.in.h:35
+msgid ""
+"The maximum number of popups to display simultaneously. If this limit is "
+"exceeded, only the most recent messages will be displayed. If the /apps/mail-"
+"notification/popups/position key is set to \"attached\", this limit will be "
+"ignored and only one popup will be allowed."
+msgstr ""
+"Le nombre maximum de popups à afficher simultanément. Si cette limite est "
+"dépassée,\n"
+"seuls les messages les plus récents seront affichés. Si la clé /apps/mail-"
+"notification/popups/position a la valeur \"attached\", cette limite sera "
+"ignorée et un seul popup sera autorisé."
+
+#: ../data/mail-notification.schemas.in.in.h:36
msgid ""
"The ordered list of actions to include in the message popups. Each element "
"must be \"open\", \"mark-as-read\", \"mark-as-spam\" or \"delete\"."
msgstr ""
"La liste triée d'actions à inclure dans les popups. Chaque élément doit être "
-"\"open\", \"mark-as-read\", \"mark-as-spam\" ou \"delete\"."
+"« open », « mark-as-read », « mark-as-spam » ou « delete »."
-#: ../data/mail-notification.schemas.in.in.h:29
+#: ../data/mail-notification.schemas.in.in.h:37
msgid "The position of the message popups. Must be \"attached\" or \"free\"."
-msgstr "La position des popups. Doit être \"attached\" ou \"free\"."
+msgstr "La position des popups. Doit être « attached » ou « free »."
-#: ../data/mail-notification.schemas.in.in.h:30
+#: ../data/mail-notification.schemas.in.in.h:38
+msgid "The sound file to play when new mail arrives."
+msgstr "Le fichier son à lire lorsque du nouveau courrier arrive."
+
+#: ../data/mail-notification.schemas.in.in.h:39
msgid ""
"The type of mail summary to display in the icon's tooltip. Must be \"standard"
"\", \"compact\" or \"none\"."
msgstr ""
"Le type d'aperçu du courrier à afficher dans le ballon d'aide de l'icône. "
-"Doit être \"standard\", \"compact\" ou \"aucun\"."
+"Doit être « standard », « compact » ou « none »."
-#: ../data/mail-notification.schemas.in.in.h:31
+#: ../data/mail-notification.schemas.in.in.h:40
msgid "The width of the properties dialog in pixels."
msgstr "La largeur de la boîte de dialogue contenant les propriétés en pixels."
-#: ../data/mail-notification.schemas.in.in.h:32
+#: ../data/mail-notification.schemas.in.in.h:41
msgid "Tooltip mail summary"
msgstr "Aperçu du courrier dans le ballon d'aide"
-#: ../data/mail-notification.schemas.in.in.h:33
+#: ../data/mail-notification.schemas.in.in.h:42
msgid "Trusted servers list"
msgstr "Liste des serveurs de confiance"
-#: ../data/mail-notification.schemas.in.in.h:34
+#: ../data/mail-notification.schemas.in.in.h:43
msgid "Whether the status icon should blink on errors or not."
msgstr "Si l'icône de statut doit clignoter lors d'erreurs ou pas."
-#: ../data/mail-notification.schemas.in.in.h:35
+#: ../data/mail-notification.schemas.in.in.h:44
+msgid "Whether to display a message count in the status icon or not."
+msgstr ""
+"Si le nombre de messages doit être affiché dans l'icône de statut ou pas."
+
+#: ../data/mail-notification.schemas.in.in.h:45
msgid "Whether to display an icon when there is no new mail or not."
msgstr ""
"Si une icône doit être affichée lorsqu'il n'y a pas de nouveau courrier ou "
"pas."
-#: ../data/mail-notification.schemas.in.in.h:36
-msgid "Whether to display seen mail or not."
-msgstr "Si le courrier vu doit être affiché ou pas."
+#: ../data/mail-notification.schemas.in.in.h:46
+msgid ""
+"Whether to display mail which is still marked as unread but has been seen or "
+"not."
+msgstr ""
+"Si le courrier qui est encore marqué comme non lu mais qui a été vu\n"
+"doit être affiché ou pas."
-#: ../data/mail-notification.schemas.in.in.h:37
+#: ../data/mail-notification.schemas.in.in.h:47
msgid "Whether to enable message popups or not."
msgstr "Si les popups doivent être activés ou pas."
-#: ../data/mail-notification.schemas.in.in.h:38
+#: ../data/mail-notification.schemas.in.in.h:48
msgid ""
"Whether to expire message popups or not. Must be \"default\", \"false\" or "
"\"true\"."
msgstr ""
-"Si l'expiration des popups doit être activée ou pas. Doit être \"default\", "
-"\"false\" ou \"true\"."
+"Si l'expiration des popups doit être activée ou pas. Doit être « default », "
+"« false » ou « true »."
-#: ../data/mail-notification.schemas.in.in.h:39
+#: ../data/mail-notification.schemas.in.in.h:49
+msgid "Whether to play a sound when new mail arrives or not."
+msgstr ""
+"Si un fichier son doit être lu lorsque du nouveau courrier arrive ou pas."
+
+#: ../data/mail-notification.schemas.in.in.h:50
msgid "Whether to run a command when all mail is read or not."
msgstr ""
"Si une commande doit être exécutée lorsque tout le courrier est lu ou pas."
-#: ../data/mail-notification.schemas.in.in.h:40
+#: ../data/mail-notification.schemas.in.in.h:51
msgid "Whether to run a command when new mail arrives or not."
msgstr ""
"Si une commande doit être exécutée lorsque du nouveau courrier arrive ou pas."
-#: ../data/mail-notification.schemas.in.in.h:41
+#: ../data/mail-notification.schemas.in.in.h:52
msgid "Whether to run a command when the message list changes or not."
msgstr ""
"Si une commande doit être exécutée lorsque la liste des messages change ou "
"pas."
-#: ../data/mail-notification.schemas.in.in.h:42
+#: ../data/mail-notification.schemas.in.in.h:53
msgid "Width of properties dialog"
msgstr "Largeur de la boîte de dialogue contenant les propriétés"
-#: ../src/eggtrayicon.c:132
+#: ../src/eggtrayicon.c:134
msgid "Orientation"
msgstr "Orientation"
-#: ../src/eggtrayicon.c:133
+#: ../src/eggtrayicon.c:135
msgid "The orientation of the tray."
msgstr "L'orientation du plateau."
@@ -292,18 +352,65 @@ msgid "Autodetect"
msgstr "Autodétecter"
#. translators: header capitalization
-#: ../src/mn-authenticated-mailbox-properties.gob:50
+#: ../src/mn-authenticated-mailbox-properties.gob:59
msgid "Account"
msgstr "Compte"
-#: ../src/mn-authenticated-mailbox-properties.gob:53
+#: ../src/mn-authenticated-mailbox-properties.gob:62
msgid "_Username:"
msgstr "Nom d'_utilisateur :"
-#: ../src/mn-authenticated-mailbox-properties.gob:57
+#: ../src/mn-authenticated-mailbox-properties.gob:66
msgid "_Password:"
msgstr "Mot de _passe :"
+#: ../src/mn-authenticated-mailbox-properties.gob:148
+msgid "Saving password to keyring..."
+msgstr "Sauvegarde du mot de passe dans le trousseau de clés en cours..."
+
+#: ../src/mn-authenticated-mailbox-properties.gob:193
+msgid "Retrieving password from keyring..."
+msgstr "Récupération du mot de passe du trousseau de clés en cours..."
+
+#. translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org)
+#: ../src/mn-authenticated-mailbox.gob:310
+#, c-format
+msgid ""
+"Mail Notification was unable to log into %s mailbox %s, possibly because the "
+"password you have entered is invalid.\n"
+"\n"
+"Please re-enter your password."
+msgstr ""
+"L'avertisseur de courrier n'a pas été en mesure d'ouvrir une session dans la "
+"boîte aux lettres %s %s, peut-être parce que le mot de passe que vous avez "
+"saisi est invalide.\n"
+"\n"
+"Veuillez à nouveau saisir vos données d'authentification."
+
+#. translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org)
+#: ../src/mn-authenticated-mailbox.gob:312
+#, c-format
+msgid "Enter your password for %s mailbox %s."
+msgstr "Entrez votre mot de passe pour la boîte aux lettres %s %s."
+
+#. keep the title in sync with gnome-authentication-manager
+#. translators: header capitalization
+#: ../src/mn-authenticated-mailbox.gob:386
+msgid "Authentication Required"
+msgstr "Authentification requise"
+
+#: ../src/mn-authenticated-mailbox.gob:468
+msgid "Unable to save the mailbox password"
+msgstr "Impossible de sauvegarder le mot de passe de la boîte aux lettres"
+
+#. translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org)
+#: ../src/mn-authenticated-mailbox.gob:470
+#, c-format
+msgid "The password of %s mailbox %s could not be saved to the keyring."
+msgstr ""
+"Le mot de passe de la boîte aux lettres %s %s n'a pu être sauvegardé dans le "
+"trousseau de clés."
+
#. translators: header capitalization
#: ../src/mn-autodetect-mailbox-properties.gob:124
#: ../src/mn-system-vfs-mailbox-properties.gob:60
@@ -324,265 +431,239 @@ msgstr "_Parcourir..."
msgid "Select a File or Folder"
msgstr "Sélectionnez un fichier ou dossier"
-#: ../src/mn-base-mbox-mailbox-backend.gob:345
-#, c-format
-msgid "unable to close file: %s"
-msgstr "impossible de fermer le fichier : %s"
-
-#: ../src/mn-base-mbox-mailbox-backend.gob:359
+#: ../src/mn-base-mbox-mailbox-backend.gob:349
#, c-format
msgid "unable to open mailbox: %s"
msgstr "impossible d'ouvrir la boîte aux lettres : %s"
-#: ../src/mn-client-session.c:257
+#: ../src/mn-client-session.c:255
#, c-format
msgid "resolving %s"
msgstr "résolution de %s en cours"
-#: ../src/mn-client-session.c:273
+#: ../src/mn-client-session.c:271
#, c-format
msgid "unable to resolve %s: %s"
msgstr "impossible de résoudre %s : %s"
-#: ../src/mn-client-session.c:314
+#: ../src/mn-client-session.c:312
#, c-format
msgid "network address #%i"
msgstr "adresse réseau %i"
-#: ../src/mn-client-session.c:317
+#: ../src/mn-client-session.c:315
#, c-format
msgid "unable to convert network address #%i into textual form: %s"
msgstr ""
"impossible de convertir l'adresse réseau %i vers une forme textuelle : %s"
-#: ../src/mn-client-session.c:328
+#: ../src/mn-client-session.c:326
#, c-format
msgid "%s: unsupported address family"
msgstr "%s : famille d'adresse non prise en charge"
-#: ../src/mn-client-session.c:335
+#: ../src/mn-client-session.c:333
#, c-format
msgid "%s: unable to create socket: %s"
msgstr "%s : impossible de créer un socket : %s"
-#: ../src/mn-client-session.c:339
+#: ../src/mn-client-session.c:337
#, c-format
msgid "connecting to %s (%s) port %i"
msgstr "connexion à %s (%s) port %i en cours"
-#: ../src/mn-client-session.c:342
+#: ../src/mn-client-session.c:340
#, c-format
msgid "unable to connect: %s"
msgstr "impossible de se connecter : %s"
-#: ../src/mn-client-session.c:347
+#: ../src/mn-client-session.c:345
msgid "connected successfully"
msgstr "connecté avec succès"
#. if reached, we couldn't find a working address
-#: ../src/mn-client-session.c:361
+#: ../src/mn-client-session.c:359
#, c-format
msgid "unable to connect to %s"
msgstr "impossible de se connecter à %s"
-#: ../src/mn-client-session.c:388
+#: ../src/mn-client-session.c:386
#, c-format
msgid "unable to initialize the OpenSSL library: %s"
msgstr "impossible d'initialiser la bibliothèque OpenSSL : %s"
-#: ../src/mn-client-session.c:396
+#: ../src/mn-client-session.c:394
#, c-format
msgid "unable to create a SSL/TLS object: %s"
msgstr "impossible de créer un objet SSL/TLS : %s"
-#: ../src/mn-client-session.c:402
+#: ../src/mn-client-session.c:400
#, c-format
msgid "unable to set the SSL/TLS file descriptor: %s"
msgstr "impossible de spécifier le descripteur de fichier SSL/TLS : %s"
-#: ../src/mn-client-session.c:408
+#: ../src/mn-client-session.c:406
#, c-format
msgid "unable to perform the SSL/TLS handshake: %s"
msgstr "impossible d'accomplir la négociation SSL/TLS : %s"
-#: ../src/mn-client-session.c:414
+#: ../src/mn-client-session.c:412
msgid "untrusted server"
msgstr "serveur non fiable"
-#: ../src/mn-client-session.c:418
+#: ../src/mn-client-session.c:416
#, c-format
msgid "a SSL/TLS layer is now active (%s, %s %i-bit)"
msgstr "une couche SSL/TLS est maintenant active (%s, %s %i-bit)"
-#: ../src/mn-client-session.c:589
+#: ../src/mn-client-session.c:587
msgid "server name not found in certificate"
msgstr "nom de serveur non trouvé dans le certificat"
-#: ../src/mn-client-session.c:594
+#: ../src/mn-client-session.c:592
#, c-format
msgid ""
"user-provided server name \"%s\" does not match certificate-provided server "
"name \"%s\""
msgstr ""
-"le nom de serveur \"%s\" fourni par l'utilisateur ne correspond pas au nom "
-"de serveur \"%s\" fourni par le certificat"
+"le nom de serveur « %s » fourni par l'utilisateur ne correspond pas au nom "
+"de serveur « %s » fourni par le certificat"
-#: ../src/mn-client-session.c:612
+#: ../src/mn-client-session.c:606
#, c-format
-msgid ""
-"user-provided server name \"%s\" matches none of the certificate-provided "
-"server names %s"
-msgstr ""
-"le nom de serveur \"%s\" fourni par l'utilisateur ne correspond à aucun des "
-"noms de serveur %s fournis par le certificat"
+msgid "\"%s\", "
+msgstr "« %s », "
-#: ../src/mn-client-session.c:688
-msgid "missing certificate"
-msgstr "certificat manquant"
+#: ../src/mn-client-session.c:608 ../src/mn-client-session.c:1585
+#: ../src/mn-yahoo-mailbox.gob:192
+#, c-format
+msgid "\"%s\""
+msgstr "« %s »"
-#: ../src/mn-client-session.c:717
+#: ../src/mn-client-session.c:611
#, c-format
msgid ""
-"Mail Notification was unable to trust \"%s\" (%s). It is possible that "
-"someone is intercepting your communication to obtain your confidential "
-"information.\n"
-"\n"
-"You should only connect to the server if you are certain you are connected "
-"to \"%s\". If you choose to connect to the server, this message will not be "
-"shown again."
+"user-provided server name \"%s\" matches none of the certificate-provided "
+"server names %s"
msgstr ""
-"L'avertisseur de courrier n'a pas été en mesure de faire confiance à \"%s"
-"\" (%s). Il est possible que quelqu'un soit en train d'intercepter votre "
-"communication afin d'obtenir vos informations confidentielles.\n"
-"\n"
-"Vous devriez vous connecter au serveur uniquement si vous êtes certain que "
-"vous êtes connecté à \"%s\". Si vous choisissez de vous connecter au "
-"serveur, ce message ne sera plus affiché."
-
-#: ../src/mn-client-session.c:731
-#, c-format
-msgid "Certificate fingerprint: %s."
-msgstr "Empreinte digitale du certificat: %s."
-
-#: ../src/mn-client-session.c:738
-msgid "Connect to untrusted server?"
-msgstr "Se connecter au serveur non fiable ?"
+"le nom de serveur « %s » fourni par l'utilisateur ne correspond à aucun des "
+"noms de serveur %s fournis par le certificat"
-#: ../src/mn-client-session.c:803
+#: ../src/mn-client-session.c:727
#, c-format
msgid "response \"%s\" is not valid in current context"
-msgstr "la réponse \"%s\" n'est pas valable dans le contexte actuel"
+msgstr "la réponse « %s » n'est pas valable dans le contexte actuel"
-#: ../src/mn-client-session.c:832
+#: ../src/mn-client-session.c:756
#, c-format
msgid "unable to parse response \"%s\""
-msgstr "impossible d'interpréter la réponse \"%s\""
+msgstr "impossible d'interpréter la réponse « %s »"
-#: ../src/mn-client-session.c:882 ../src/mn-client-session.c:889
+#: ../src/mn-client-session.c:806 ../src/mn-client-session.c:813
#, c-format
msgid "unable to read from server: %s"
msgstr "impossible de lire depuis le serveur : %s"
-#: ../src/mn-client-session.c:887
+#: ../src/mn-client-session.c:811
msgid "unable to read from server: EOF"
msgstr "impossible de lire depuis le serveur : EOF"
-#: ../src/mn-client-session.c:899
+#: ../src/mn-client-session.c:823
#, c-format
msgid "unable to decode data using SASL: %s"
msgstr "impossible de décoder les données en utilisant SASL : %s"
-#: ../src/mn-client-session.c:1044
+#: ../src/mn-client-session.c:968
#, c-format
msgid "unable to encode data using SASL: %s"
msgstr "impossible d'encoder les données en utilisant SASL : %s"
-#: ../src/mn-client-session.c:1075 ../src/mn-client-session.c:1082
+#: ../src/mn-client-session.c:999 ../src/mn-client-session.c:1006
#, c-format
msgid "unable to write to server: %s"
msgstr "impossible d'écrire vers le serveur : %s"
-#: ../src/mn-client-session.c:1080
+#: ../src/mn-client-session.c:1004
msgid "unable to write to server: EOF"
msgstr "impossible d'écrire vers le serveur : EOF"
-#: ../src/mn-client-session.c:1111 ../src/mn-pop3-mailbox.gob:434
+#: ../src/mn-client-session.c:1035 ../src/mn-pop3-mailbox.gob:432
#, c-format
msgid "unable to encode Base64: %s"
msgstr "impossible d'encoder en Base64 : %s"
-#: ../src/mn-client-session.c:1288
+#: ../src/mn-client-session.c:1212
#, c-format
msgid "unable to initialize the SASL library: %s"
msgstr "impossible d'initialiser la bibliothèque SASL : %s"
-#: ../src/mn-client-session.c:1300
+#: ../src/mn-client-session.c:1224
#, c-format
msgid "unable to retrieve local address of socket: %s"
msgstr "impossible d'obtenir l'adresse locale du socket : %s"
-#: ../src/mn-client-session.c:1306
+#: ../src/mn-client-session.c:1230
#, c-format
msgid "unable to retrieve remote address of socket: %s"
msgstr "impossible d'obtenir l'adresse distante du socket : %s"
-#: ../src/mn-client-session.c:1340
+#: ../src/mn-client-session.c:1264
#, c-format
msgid "unable to set SASL security properties: %s"
msgstr "impossible de spécifier les propriétés de sécurité SASL : %s"
-#: ../src/mn-client-session.c:1364
+#: ../src/mn-client-session.c:1288
msgid ""
"unable to start SASL authentication: SASL asked for something we did not know"
msgstr ""
"impossible de démarrer l'authentification SASL : SASL a demandé quelque "
"chose que nous ne connaissions pas"
-#: ../src/mn-client-session.c:1383
+#: ../src/mn-client-session.c:1307
#, c-format
msgid "unable to start SASL authentication: %s"
msgstr "impossible de démarrer l'authentification SASL : %s"
-#: ../src/mn-client-session.c:1387
+#: ../src/mn-client-session.c:1311
#, c-format
msgid "unable to create a SASL connection: %s"
msgstr "impossible de créer une connexion SASL : %s"
-#: ../src/mn-client-session.c:1434
+#: ../src/mn-client-session.c:1358
msgid "SASL asked for something we did not know, aborting SASL authentication"
msgstr ""
"SASL a demandé quelque chose que nous ne connaissions pas, annulation de "
"l'authentification SASL"
-#: ../src/mn-client-session.c:1451
+#: ../src/mn-client-session.c:1375
#, c-format
msgid "%s, aborting SASL authentication"
msgstr "%s, annulation de l'authentification SASL"
#. compliance error
-#: ../src/mn-client-session.c:1456
+#: ../src/mn-client-session.c:1380
#, c-format
msgid "unable to decode Base64 input from server: %s"
msgstr "impossible de décoder l'entrée Base64 du serveur : %s"
-#: ../src/mn-client-session.c:1492
+#: ../src/mn-client-session.c:1416
#, c-format
msgid "a SASL security layer of strength factor %i is now active"
msgstr ""
"une couche de sécurité SASL de facteur de force %i est maintenant active"
#. a security layer is active but we can't retrieve maxoutbuf -> fatal
-#: ../src/mn-client-session.c:1497
+#: ../src/mn-client-session.c:1421
#, c-format
msgid "unable to get SASL_MAXOUTBUF property: %s"
msgstr "impossible d'obtenir la propriété SASL_MAXOUTBUF : %s"
-#: ../src/mn-client-session.c:1503
+#: ../src/mn-client-session.c:1427
#, c-format
msgid "warning: unable to get SASL_SSF property: %s"
msgstr "avertissement : impossible d'obtenir la propriété SASL_SSF : %s"
-#: ../src/mn-client-session.c:1662
+#: ../src/mn-client-session.c:1586
msgid "unknown server error"
msgstr "erreur serveur inconnue"
@@ -602,38 +683,53 @@ msgstr "Sujet"
msgid "Sent"
msgstr "Envoyé"
-#: ../src/mn-conf.c:282
+#: ../src/mn-conf.c:252
msgid "A directory creation error has occurred"
msgstr "Une erreur de création de répertoire s'est produite"
-#: ../src/mn-conf.c:283
+#: ../src/mn-conf.c:253
#, c-format
msgid "Unable to create directory \"%s\": %s."
-msgstr "Impossible de créer le répertoire \"%s\" : %s."
+msgstr "Impossible de créer le répertoire « %s » : %s."
+
+#: ../src/mn-conf.c:355
+#, c-format
+msgid "cannot find default value of configuration key \"%s\""
+msgstr ""
+"impossible de trouver la valeur par défaut de la clé de configuration « %s »"
+
+#: ../src/mn-conf.c:360
+msgid ""
+"The default configuration has not been installed properly. Please check your "
+"Mail Notification installation."
+msgstr ""
+"La configuration par défaut n'a pas été installée correctement. Veuillez "
+"vérifier votre installation de l'avertisseur de courrier."
-#: ../src/mn-conf.c:407
+#: ../src/mn-conf.c:454
#, c-format
msgid "recursively unsetting %s"
msgstr "en train de supprimer récursivement %s"
-#: ../src/mn-conf.c:411
+#: ../src/mn-conf.c:458
msgid "syncing the GConf database"
msgstr "en train de synchroniser la base de données GConf"
-#: ../src/mn-conf.c:414
+#: ../src/mn-conf.c:461
msgid "completed"
msgstr "terminé"
-#: ../src/mn-custom-vfs-mailbox.gob:77
+#: ../src/mn-custom-vfs-mailbox.gob:75
msgid "invalid location"
msgstr "emplacement invalide"
-#: ../src/mn-evolution-folder-tree-control.gob:69
+#: ../src/mn-evolution-folder-tree-control.gob:70
msgid "The currently selected URI"
msgstr "L'URI actuellement sélectionnée"
#. translators: header capitalization
#: ../src/mn-evolution-mailbox-properties.gob:79
+#: ../src/mn-webmail-mailbox-properties.gob:95
msgid "Folder"
msgstr "Dossier"
@@ -642,23 +738,26 @@ msgid ""
"Mail Notification can not contact Evolution. Make sure that Evolution is "
"running and that the Evolution Jean-Yves Lefort's Mail Notification plugin "
"is loaded."
-msgstr "L'avertisseur de courrier ne peut contacter Evolution. Assurez-vous qu'Evolution est en cours de fonctionnement et que l'extension Evolution \"Avertisseur de courrier de Jean-Yves Lefort\" est chargée."
+msgstr ""
+"L'avertisseur de courrier ne peut contacter Evolution. Assurez-vous "
+"qu'Evolution est en cours de fonctionnement et que l'extension Evolution « "
+"Avertisseur de courrier de Jean-Yves Lefort » est chargée."
-#: ../src/mn-evolution-mailbox.gob:78
+#: ../src/mn-evolution-mailbox.gob:80
msgid "folder not found"
msgstr "dossier non trouvé"
-#: ../src/mn-evolution-mailbox.gob:79
+#: ../src/mn-evolution-mailbox.gob:81
msgid "message not found"
msgstr "message non trouvé"
-#: ../src/mn-evolution-mailbox.gob:220
+#: ../src/mn-evolution-mailbox.gob:222
msgid "unable to contact Evolution"
msgstr "impossible de contacter Evolution"
#: ../src/mn-evolution-plugin.c:102 ../src/mn-evolution-plugin.c:106
msgid "Unable to activate the Mail Notification plugin"
-msgstr "Impossible d'activer l'extension \"Avertisseur de courrier\""
+msgstr "Impossible d'activer l'extension « Avertisseur de courrier »"
#: ../src/mn-evolution-plugin.c:102
#, c-format
@@ -669,7 +768,7 @@ msgstr ""
"Bonobo n'a pu localiser le serveur %s. Veuillez vérifier votre installation "
"de l'avertisseur de courrier."
-#: ../src/mn-evolution-plugin.c:106 ../src/mn-main.c:523
+#: ../src/mn-evolution-plugin.c:106 ../src/mn-main.c:544
#, c-format
msgid ""
"Bonobo was unable to register the %s server. Please check your Mail "
@@ -678,31 +777,55 @@ msgstr ""
"Bonobo n'a pu inscrire le serveur %s. Veuillez vérifier votre installation "
"de l'avertisseur de courrier."
-#: ../src/mn-gmail-mailbox.gob:104
+#.
+#. * translators: GTK+ has the same message used in the same
+#. * context; please use the GTK+ translation for consistency
+#.
+#: ../src/mn-file-chooser-button.gob:183
+msgid "(None)"
+msgstr "(Aucun)"
+
+#. translators: header capitalization
+#: ../src/mn-gmail-mailbox-properties.gob:108
+msgid "Gmail Label"
+msgstr "Etiquette Gmail"
+
+#: ../src/mn-gmail-mailbox-properties.gob:110
+msgid "_Restrict to this label:"
+msgstr "_Restreindre à cette étiquette :"
+
+#: ../src/mn-gmail-mailbox.gob:162
msgid "invalid feed location"
msgstr "emplacement d'alimentation non valide"
-#: ../src/mn-gmail-mailbox.gob:118
+#: ../src/mn-gmail-mailbox.gob:183
#, c-format
msgid "retrieving feed from %s"
msgstr "obtention de l'alimentation depuis %s en cours"
-#: ../src/mn-gmail-mailbox.gob:125
+#: ../src/mn-gmail-mailbox.gob:190
#, c-format
msgid "unable to retrieve feed: %s"
msgstr "impossible d'obtenir l'alimentation : %s"
-#: ../src/mn-gmail-mailbox.gob:140 ../src/mn-gmail-mailbox.gob:191
+#: ../src/mn-gmail-mailbox.gob:199
+#, c-format
+msgid "feed retrieved successfully (%i byte)"
+msgid_plural "feed retrieved successfully (%i bytes)"
+msgstr[0] "données récupérées avec succès (%i octet)"
+msgstr[1] "données récupérées avec succès (%i octets)"
+
+#: ../src/mn-gmail-mailbox.gob:211 ../src/mn-gmail-mailbox.gob:262
msgid "unable to parse feed"
msgstr "impossible d'interpréter l'alimentation"
#: ../src/mn-gmime-stream-vfs.gob:51
-#: ../src/mn-sylpheed-mailbox-backend.gob:209
+#: ../src/mn-sylpheed-mailbox-backend.gob:219
#, c-format
msgid "unable to read %s: %s"
msgstr "impossible de lire %s : %s"
-#: ../src/mn-gmime-stream-vfs.gob:53
+#: ../src/mn-gmime-stream-vfs.gob:53 ../src/mn-webmail-mailbox.gob:136
#, c-format
msgid "unable to write to %s: %s"
msgstr "impossible d'écrire vers %s : %s"
@@ -717,74 +840,81 @@ msgstr "impossible de chercher dans %s : %s"
msgid "unable to tell position of %s: %s"
msgstr "impossible de dire la position de %s : %s"
-#: ../src/mn-gmime-stream-vfs.gob:59 ../src/mn-mh-mailbox-backend.gob:174
+#: ../src/mn-gmime-stream-vfs.gob:59 ../src/mn-mh-mailbox-backend.gob:193
+#: ../src/mn-webmail-mailbox.gob:142
#, c-format
msgid "unable to close %s: %s"
msgstr "impossible de fermer %s : %s"
+#: ../src/mn-hotmail-mailbox.gob:128 ../src/mn-imap-mailbox.gob:1454
+#: ../src/mn-pop3-mailbox.gob:1042
+msgid "authentication failed"
+msgstr "l'authentification a échoué"
+
#. translators: header capitalization
-#: ../src/mn-imap-mailbox-properties.gob:118
+#: ../src/mn-imap-mailbox-properties.gob:112
msgid "IMAP Mailbox"
msgstr "Boîte aux lettres IMAP"
-#: ../src/mn-imap-mailbox-properties.gob:120
+#: ../src/mn-imap-mailbox-properties.gob:114
+#: ../src/mn-webmail-mailbox-properties.gob:97
msgid "In_box"
msgstr "_Boîte de réception"
-#: ../src/mn-imap-mailbox-properties.gob:125
+#: ../src/mn-imap-mailbox-properties.gob:119
+#: ../src/mn-webmail-mailbox-properties.gob:102
msgid "_Other:"
-msgstr "Autr_e :"
+msgstr "_Autre :"
#. translators: header capitalization
-#: ../src/mn-imap-mailbox-properties.gob:138
+#: ../src/mn-imap-mailbox-properties.gob:132
msgid "Use the IDLE Extension"
msgstr "Utiliser l'extension IDLE"
-#: ../src/mn-imap-mailbox-properties.gob:142
-#: ../ui/properties-dialog.glade.h:35
-msgid "_Never"
+#: ../src/mn-imap-mailbox-properties.gob:136
+msgid "IMAP connection tab|_Never"
msgstr "Jamai_s"
-#: ../src/mn-imap-mailbox-properties.gob:143
+#: ../src/mn-imap-mailbox-properties.gob:137
msgid "A_utodetect"
-msgstr "Auto_détecter"
+msgstr "_Autodétecter"
-#: ../src/mn-imap-mailbox-properties.gob:144
+#: ../src/mn-imap-mailbox-properties.gob:138
msgid "Al_ways"
msgstr "_Toujours"
-#: ../src/mn-imap-mailbox.gob:381
+#: ../src/mn-imap-mailbox.gob:375
msgid "server did not send capabilities"
msgstr "le serveur n'a pas envoyé ses possibilités"
-#: ../src/mn-imap-mailbox.gob:548
+#: ../src/mn-imap-mailbox.gob:542
msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
msgstr ""
"le serveur a annoncé LOGINDISABLED, pas d'utilisation de l'authentification "
"LOGIN"
-#: ../src/mn-imap-mailbox.gob:549
+#: ../src/mn-imap-mailbox.gob:543
msgid "unable to login"
msgstr "impossible d'ouvrir la session"
-#: ../src/mn-imap-mailbox.gob:822
+#: ../src/mn-imap-mailbox.gob:816
msgid "unable to fetch message"
msgstr "impossible d'obtenir le message"
-#: ../src/mn-imap-mailbox.gob:838
+#: ../src/mn-imap-mailbox.gob:832
msgid ""
"\"Use the IDLE extension\" set to \"never\" in the mailbox properties, "
"logging out"
msgstr ""
-"la valeur de l'option \"Utiliser l'extension IDLE\" dans les propriétés de "
-"la boîte aux lettres est \"jamais\", fermeture de session"
+"la valeur de l'option « Utiliser l'extension IDLE » dans les propriétés de "
+"la boîte aux lettres est « jamais », fermeture de session"
-#: ../src/mn-imap-mailbox.gob:849
+#: ../src/mn-imap-mailbox.gob:843
#, c-format
msgid "the remote server runs %s, not using the IDLE extension"
msgstr "le serveur distant utilise %s, l'extension IDLE ne sera pas utilisée"
-#: ../src/mn-imap-mailbox.gob:854
+#: ../src/mn-imap-mailbox.gob:848
#, c-format
msgid ""
"the remote server runs %s, the IDLE extension might not function properly"
@@ -792,16 +922,16 @@ msgstr ""
"le serveur distant utilise %s, il se peut que l'extension IDLE ne fonctionne "
"pas correctement"
-#: ../src/mn-imap-mailbox.gob:863
+#: ../src/mn-imap-mailbox.gob:857
msgid "the remote server does not support the IDLE extension, logging out"
msgstr ""
"le serveur distant ne supporte pas l'extension IDLE, fermeture de session"
-#: ../src/mn-imap-mailbox.gob:1368 ../src/mn-pop3-mailbox.gob:297
+#: ../src/mn-imap-mailbox.gob:1364 ../src/mn-pop3-mailbox.gob:295
msgid "server does not support in-band SSL/TLS"
msgstr "le serveur ne supporte pas le mode SSL/TLS interne"
-#: ../src/mn-imap-mailbox.gob:1392 ../src/mn-pop3-mailbox.gob:956
+#: ../src/mn-imap-mailbox.gob:1388 ../src/mn-pop3-mailbox.gob:957
msgid ""
"a SASL authentication mechanism was selected but SASL support has not been "
"compiled in"
@@ -809,123 +939,133 @@ msgstr ""
"un mécanisme d'authentification SASL a été sélectionné mais le support SASL "
"n'a pas été inclus lors de la compilation"
-#: ../src/mn-imap-mailbox.gob:1402 ../src/mn-pop3-mailbox.gob:976
+#: ../src/mn-imap-mailbox.gob:1398 ../src/mn-pop3-mailbox.gob:977
#, c-format
msgid "unknown authentication mechanism \"%s\""
-msgstr "mécanisme d'authentification inconnu \"%s\""
+msgstr "mécanisme d'authentification inconnu « %s »"
-#: ../src/mn-imap-mailbox.gob:1434 ../src/mn-pop3-mailbox.gob:1012
+#: ../src/mn-imap-mailbox.gob:1430 ../src/mn-pop3-mailbox.gob:1013
#, c-format
msgid "disabling mechanism \"%s\" and retrying SASL authentication"
msgstr ""
-"désactivation du mécanisme \"%s\" et nouvelle tentative d'authentification "
+"désactivation du mécanisme « %s » et nouvelle tentative d'authentification "
"SASL"
-#: ../src/mn-imap-mailbox.gob:1446
+#: ../src/mn-imap-mailbox.gob:1442
msgid "falling back to IMAP LOGIN authentication"
msgstr "rétrogradation vers l'authentification IMAP LOGIN"
-#: ../src/mn-imap-mailbox.gob:1458 ../src/mn-pop3-mailbox.gob:1041
-msgid "authentication failed"
-msgstr "l'authentification a échoué"
-
#. translators: header capitalization
-#: ../src/mn-mail-icon.gob:93
+#: ../src/mn-mail-icon.gob:89
msgid "_Mail Reader"
msgstr "_Lecteur de courrier"
#. translators: header capitalization
-#: ../src/mn-mail-icon.gob:95
+#: ../src/mn-mail-icon.gob:91
msgid "_Open Latest Message"
msgstr "_Ouvrir le dernier message"
#. translators: header capitalization
-#: ../src/mn-mail-icon.gob:97 ../src/mn-mailbox-view.gob:314
+#: ../src/mn-mail-icon.gob:96
+msgid "_Consider New Mail as Read"
+msgstr "_Considérer le nouveau courrier comme lu"
+
+#. translators: header capitalization
+#: ../src/mn-mail-icon.gob:98 ../src/mn-mailbox-view.gob:315
msgid "_Update"
msgstr "_Mettre à jour"
#. translators: header capitalization
-#: ../src/mn-mail-icon.gob:104
+#: ../src/mn-mail-icon.gob:109
msgid "R_emove From Notification Area"
msgstr "_Enlever de la zone d'avertissement"
#. translators: header capitalization
-#: ../src/mn-mailbox-properties-dialog.gob:95
+#: ../src/mn-mailbox-properties-dialog.gob:101
#, c-format
msgid "%s Properties"
msgstr "Propriétés de %s"
#. translators: header capitalization
-#: ../src/mn-mailbox-properties-dialog.gob:244
+#: ../src/mn-mailbox-properties-dialog.gob:258
msgid "Add a Mailbox"
msgstr "Ajouter une boîte aux lettres"
-#: ../src/mn-mailbox-view.gob:250
+#: ../src/mn-mailbox-view.gob:251
msgid "A paste error has occurred"
msgstr "Une erreur de collage s'est produite"
-#: ../src/mn-mailbox-view.gob:566
+#: ../src/mn-mailbox-view.gob:565
#, c-format
msgid "unhandled %s mailbox (%s)"
msgstr "boîte aux lettres %s non prise en charge (%s)"
-#: ../src/mn-mailbox-view.gob:571
+#: ../src/mn-mailbox-view.gob:569
#, c-format
msgid "%s mailbox"
msgstr "boîte aux lettres %s"
-#: ../src/mn-mailbox-view.gob:586
+#: ../src/mn-mailbox-view.gob:580
msgid "detecting mailbox type..."
msgstr "détection du type de boîte aux lettres en cours..."
-#: ../src/mn-mailbox.gob:507
+#: ../src/mn-mailbox.gob:573
+#, c-format
msgid "\"type\" attribute missing"
-msgstr "attribut \"type\" manquant"
+msgstr "attribut « type » manquant"
-#: ../src/mn-mailbox.gob:514
+#: ../src/mn-mailbox.gob:580
#, c-format
msgid "unknown mailbox type \"%s\""
-msgstr "type de boîte aux lettres \"%s\" inconnu"
+msgstr "type de boîte aux lettres « %s » inconnu"
-#: ../src/mn-mailbox.gob:910
+#: ../src/mn-mailbox.gob:979
#, c-format
msgid "property \"%s\" has no value"
-msgstr "la propriété \"%s\" n'a pas de valeur"
+msgstr "la propriété « %s » n'a pas de valeur"
-#: ../src/mn-mailboxes.gob:241
+#: ../src/mn-mailbox.gob:1060 ../src/mn-mailbox.gob:1081
+#: ../src/mn-shell.gob:541
+#, c-format
+msgid "%s: %s"
+msgstr "%s : %s"
+
+#: ../src/mn-mailboxes.gob:253
msgid "An error has occurred while importing old mailboxes"
msgstr ""
"Une erreur s'est produite lors de l'importation des anciennes boîtes aux "
"lettres"
-#: ../src/mn-mailboxes.gob:267
+#: ../src/mn-mailboxes.gob:279
msgid "Unable to load the mailboxes configuration"
msgstr "Impossible de charger la configuration des boîtes aux lettres"
-#: ../src/mn-mailboxes.gob:313
+#: ../src/mn-mailboxes.gob:328
+#, c-format
msgid "Unable to parse the XML document."
msgstr "Impossible d'interpréter le document XML."
-#: ../src/mn-mailboxes.gob:320
+#: ../src/mn-mailboxes.gob:335
+#, c-format
msgid "The root element is missing."
msgstr "L'élément racine est manquant."
-#: ../src/mn-mailboxes.gob:326
+#: ../src/mn-mailboxes.gob:341
#, c-format
msgid "The root element \"%s\" is invalid."
-msgstr "L'élément racine \"%s\" est invalide."
+msgstr "L'élément racine « %s » est invalide."
-#: ../src/mn-mailboxes.gob:349
+#: ../src/mn-mailboxes.gob:363
#, c-format
msgid "On line %i: %s."
msgstr "A la ligne %i : %s."
-#: ../src/mn-mailboxes.gob:354
+#: ../src/mn-mailboxes.gob:368
#, c-format
msgid "On line %i: unknown element \"%s\"."
-msgstr "A la ligne %i : élément \"%s\" inconnu."
+msgstr "A la ligne %i : élément « %s » inconnu."
-#: ../src/mn-mailboxes.gob:363
+#: ../src/mn-mailboxes.gob:377
msgid "An error has occurred while loading the mailboxes configuration"
msgid_plural "Errors have occurred while loading the mailboxes configuration"
msgstr[0] ""
@@ -935,139 +1075,160 @@ msgstr[1] ""
"Des erreurs se sont produites lors du chargement de la configuration des "
"boîtes aux lettres"
-#: ../src/mn-mailboxes.gob:388
+#: ../src/mn-mailboxes.gob:402
msgid "Unable to save the mailboxes configuration"
msgstr "Impossible de sauvegarder la configuration des boîtes aux lettres"
-#: ../src/mn-mailboxes.gob:430 ../src/mn-vfs.c:240
+#: ../src/mn-mailboxes.gob:447 ../src/mn-vfs.c:240
#, c-format
msgid "Unable to remove %s: %s."
msgstr "Impossible d'enlever %s : %s."
-#: ../src/mn-mailboxes.gob:438
+#: ../src/mn-mailboxes.gob:455
#, c-format
msgid "Unable to create %s: %s."
msgstr "Impossible de créer %s : %s."
-#: ../src/mn-mailboxes.gob:445
+#: ../src/mn-mailboxes.gob:462
#, c-format
msgid "Unable to open %s for writing: %s."
msgstr "Impossible d'ouvrir %s en mode écriture : %s."
-#: ../src/mn-mailboxes.gob:452
+#: ../src/mn-mailboxes.gob:469
+#, c-format
msgid "Unable to write the XML document."
msgstr "Impossible d'écrire le document XML."
-#: ../src/mn-mailboxes.gob:458
+#: ../src/mn-mailboxes.gob:475
#, c-format
msgid "Unable to close %s: %s."
msgstr "Impossible de fermer %s : %s."
-#: ../src/mn-mailboxes.gob:468 ../src/mn-mailboxes.gob:475 ../src/mn-vfs.c:258
+#: ../src/mn-mailboxes.gob:485 ../src/mn-mailboxes.gob:492 ../src/mn-vfs.c:258
#: ../src/mn-vfs.c:266
#, c-format
msgid "Unable to rename %s to %s: %s."
msgstr "Impossible de renommer %s en %s : %s."
#. non fatal
-#: ../src/mn-mailboxes.gob:481 ../src/mn-vfs.c:276
+#: ../src/mn-mailboxes.gob:498 ../src/mn-vfs.c:276
#, c-format
msgid "unable to delete %s: %s"
msgstr "impossible de supprimer %s : %s"
-#: ../src/mn-mailboxes.gob:511
+#: ../src/mn-mailboxes.gob:528
#, c-format
msgid "%s has %i new message"
msgid_plural "%s has %i new messages"
msgstr[0] "%s a %i nouveau message"
msgstr[1] "%s a %i nouveaux messages"
-#: ../src/mn-mailboxes.gob:537
+#: ../src/mn-mailboxes.gob:554
#, c-format
msgid "%s reported an error: %s"
msgstr "%s a indiqué une erreur : %s"
-#: ../src/mn-maildir-mailbox-backend.gob:129
+#: ../src/mn-maildir-mailbox-backend.gob:130
#, c-format
msgid "unable to open folder \"%s\": %s"
-msgstr "impossible d'ouvrir le dossier \"%s\" : %s"
+msgstr "impossible d'ouvrir le dossier « %s » : %s"
-#: ../src/mn-maildir-mailbox-backend.gob:178
+#: ../src/mn-maildir-mailbox-backend.gob:183
#, c-format
msgid "unable to close folder \"%s\": %s"
-msgstr "impossible de fermer le dossier \"%s\" : %s"
+msgstr "impossible de fermer le dossier « %s » : %s"
-#: ../src/mn-maildir-mailbox-backend.gob:181
+#: ../src/mn-maildir-mailbox-backend.gob:186
#, c-format
msgid "error while reading folder \"%s\": %s"
-msgstr "erreur lors de la lecture du dossier \"%s\" : %s"
+msgstr "erreur lors de la lecture du dossier « %s » : %s"
+
+#: ../src/mn-maildir-message.gob:162
+msgid "Delete message?"
+msgstr "Supprimer le message?"
+
+#: ../src/mn-maildir-message.gob:202
+msgid "The message cannot be moved to the trash. Permanently delete it?"
+msgstr ""
+"Le message ne peut être déplacé vers la corbeille. Le supprimer de manière "
+"permanente ?"
-#: ../src/mn-main.c:110
+#: ../src/mn-maildir-message.gob:225
+#, c-format
+msgid ""
+"The message could not be moved to the trash (%s). Permanently delete it?"
+msgstr ""
+"Le message n'a pu être déplacé vers la corbeille (%s). Le supprimer de "
+"manière permanente ?"
+
+#: ../src/mn-main.c:115
msgid "yes"
msgstr "oui"
-#: ../src/mn-main.c:110
+#: ../src/mn-main.c:115
msgid "no"
msgstr "non"
-#: ../src/mn-main.c:143
+#: ../src/mn-main.c:146
#, c-format
msgid "%s version %s\n"
msgstr "%s version %s\n"
-#: ../src/mn-main.c:148
+#: ../src/mn-main.c:151
+#, c-format
msgid "Mailbox backends:\n"
msgstr "Prises en charge de boîtes aux lettres :\n"
-#: ../src/mn-main.c:153
+#: ../src/mn-main.c:156
+#, c-format
msgid "POP3 and IMAP features:\n"
msgstr "Fonctionnalités POP3 et IMAP :\n"
-#: ../src/mn-main.c:158
-msgid "Sylpheed features:\n"
-msgstr "Fonctionnalités Sylpheed :\n"
-
-#: ../src/mn-main.c:206
+#: ../src/mn-main.c:209
#, c-format
msgid "A Bonobo exception (%s) has occurred in %s()."
msgstr "Une exception Bonobo (%s) s'est produite dans %s()."
-#: ../src/mn-main.c:248
+#: ../src/mn-main.c:251
#, c-format
msgid "%s option ignored since Mail Notification is not already running"
msgstr ""
"option %s ignorée puisque l'avertisseur de courrier n'est pas déjà en cours "
"d'exécution"
-#: ../src/mn-main.c:268
+#: ../src/mn-main.c:272
msgid "Show version information"
msgstr "Afficher les informations de version"
-#: ../src/mn-main.c:277
+#: ../src/mn-main.c:281
msgid "Enable informational output"
msgstr "Activer la sortie informationnelle"
-#: ../src/mn-main.c:286
+#: ../src/mn-main.c:290
msgid "Display the properties dialog"
msgstr "Afficher la boîte de dialogue contenant les propriétés"
-#: ../src/mn-main.c:295
+#: ../src/mn-main.c:299
msgid "Display the about dialog"
-msgstr "Afficher la boîte de dialogue \"à propos\""
+msgstr "Afficher la boîte de dialogue « à propos »"
+
+#: ../src/mn-main.c:308
+msgid "Consider new mail as read"
+msgstr "Considérer le nouveau courrier comme lu"
-#: ../src/mn-main.c:304
+#: ../src/mn-main.c:317
msgid "Update the mail status"
msgstr "Mettre à jour le statut du courrier"
-#: ../src/mn-main.c:313
+#: ../src/mn-main.c:326
msgid "Print a XML mail summary"
msgstr "Afficher un aperçu XML du courrier"
-#: ../src/mn-main.c:322
+#: ../src/mn-main.c:335
msgid "Unset obsolete GConf configuration"
msgstr "Supprimer la configuration GConf obsolète"
-#: ../src/mn-main.c:331
+#: ../src/mn-main.c:344
msgid "Quit Mail Notification"
msgstr "Quitter l'avertisseur de courrier"
@@ -1075,11 +1236,11 @@ msgstr "Quitter l'avertisseur de courrier"
#. * We cannot use mn_fatal_error_dialog() because gtk_init() has
#. * not been called yet.
#.
-#: ../src/mn-main.c:358
+#: ../src/mn-main.c:371
msgid "multi-threading is not available"
msgstr "le multi-threading n'est pas disponible"
-#: ../src/mn-main.c:412
+#: ../src/mn-main.c:425
msgid ""
"Bonobo could not locate the automation object. Please check your Mail "
"Notification installation."
@@ -1087,24 +1248,24 @@ msgstr ""
"Bonobo n'a pu localiser l'objet automation. Veuillez vérifier votre "
"installation de l'avertisseur de courrier."
-#: ../src/mn-main.c:418
+#: ../src/mn-main.c:431
msgid "quitting Mail Notification"
msgstr "en train de quitter l'avertisseur de courrier"
-#: ../src/mn-main.c:422
+#: ../src/mn-main.c:435
msgid "Mail Notification is not running"
msgstr "L'avertisseur de courrier n'est pas en cours d'exécution"
-#: ../src/mn-main.c:437
+#: ../src/mn-main.c:450
msgid "Unable to initialize the GnomeVFS library."
msgstr "Impossible d'initialiser la bibliothèque GnomeVFS."
-#: ../src/mn-main.c:447
+#: ../src/mn-main.c:460
msgid "An initialization error has occurred in Mail Notification"
msgstr ""
"Une erreur d'initialisation s'est produite dans l'avertisseur de courrier"
-#: ../src/mn-main.c:448
+#: ../src/mn-main.c:461
msgid ""
"Unable to initialize the notification library. Message popups will not be "
"displayed."
@@ -1112,15 +1273,19 @@ msgstr ""
"Impossible d'initialiser la bibliothèque d'avertissement. Les popups ne "
"seront pas affichés."
-#: ../src/mn-main.c:486
+#: ../src/mn-main.c:499
+msgid "considering new mail as read"
+msgstr "considération du nouveau courrier comme étant lu"
+
+#: ../src/mn-main.c:504
msgid "updating the mail status"
msgstr "mise à jour du statut du courrier"
-#: ../src/mn-main.c:502
+#: ../src/mn-main.c:521
msgid "Mail Notification is already running"
msgstr "L'avertisseur de courrier est déjà en cours d'exécution"
-#: ../src/mn-main.c:519
+#: ../src/mn-main.c:540
#, c-format
msgid ""
"Bonobo could not locate the %s file. Please check your Mail Notification "
@@ -1133,106 +1298,101 @@ msgstr ""
msgid "unable to parse MIME message"
msgstr "impossible d'interpréter le message MIME"
-#: ../src/mn-message.gob:145
+#: ../src/mn-message.gob:143
msgid "Unknown"
msgstr "Inconnu"
-#: ../src/mn-message.gob:208
-msgid "unterminated substitution"
-msgstr "substitution non terminée"
-
-#: ../src/mn-message.gob:247
-#, c-format
-msgid "unknown substitution \"%s\""
-msgstr "substitution \"%s\" inconnue"
-
-#: ../src/mn-message.gob:250
-msgid "empty substitution"
-msgstr "substitution vide"
-
-#: ../src/mn-message.gob:313 ../src/mn-util.c:1427
+#: ../src/mn-message.gob:220 ../src/mn-sound-player.gob:140
+#: ../src/mn-sound-player.gob:176 ../src/mn-util.c:1527
#, c-format
msgid "Unable to execute \"%s\": %s."
-msgstr "Impossible d'exécuter \"%s\" : %s"
+msgstr "Impossible d'exécuter « %s » : %s"
-#: ../src/mn-mh-mailbox-backend.gob:177
+#: ../src/mn-mh-mailbox-backend.gob:196
#, c-format
msgid "error while reading %s: %s"
msgstr "erreur lors de la lecture de %s : %s"
-#: ../src/mn-mh-mailbox-backend.gob:190
+#: ../src/mn-mh-mailbox-backend.gob:210 ../src/mn-webmail-mailbox.gob:271
#, c-format
msgid "unable to open %s: %s"
msgstr "impossible d'ouvrir %s : %s"
-#: ../src/mn-pi-mailbox-properties.gob:70
+#: ../src/mn-pi-mailbox-properties.gob:76
msgid "_Standard"
msgstr "_Standard"
-#: ../src/mn-pi-mailbox-properties.gob:71
+#: ../src/mn-pi-mailbox-properties.gob:77
msgid "In-_band SSL/TLS"
msgstr "SS_L/TLS interne"
-#: ../src/mn-pi-mailbox-properties.gob:72
+#: ../src/mn-pi-mailbox-properties.gob:78
msgid "SSL/TLS on s_eparate port"
msgstr "SSL/TLS sur port sépa_ré"
-#: ../src/mn-pi-mailbox-properties.gob:76
+#: ../src/mn-pi-mailbox-properties.gob:82
msgid "_Server:"
msgstr "_Serveur :"
#. translators: header capitalization
-#: ../src/mn-pi-mailbox-properties.gob:96
+#: ../src/mn-pi-mailbox-properties.gob:102
msgid "Connection Type"
msgstr "Type de connexion"
-#: ../src/mn-pi-mailbox-properties.gob:140
+#: ../src/mn-pi-mailbox-properties.gob:149
msgid "Port:"
msgstr "Port :"
#. translators: header capitalization
-#: ../src/mn-pi-mailbox-properties.gob:167
+#: ../src/mn-pi-mailbox-properties.gob:176
msgid "Authentication"
msgstr "Authentification"
-#: ../src/mn-pi-mailbox-properties.gob:171
+#: ../src/mn-pi-mailbox-properties.gob:180
msgid "_Mechanism:"
msgstr "_Mécanisme :"
-#: ../src/mn-pi-mailbox-properties.gob:205
+#: ../src/mn-pi-mailbox-properties.gob:214
msgid "Connection"
msgstr "Connexion"
-#: ../src/mn-pi-mailbox.gob:154
+#: ../src/mn-pi-mailbox.gob:147
msgid "SSL/TLS support has not been compiled in"
msgstr "le support SSL/TLS n'a pas été inclus lors de la compilation"
-#: ../src/mn-pi-mailbox.gob:320
+#: ../src/mn-pi-mailbox.gob:305
+msgid "missing certificate"
+msgstr "certificat manquant"
+
+#: ../src/mn-pi-mailbox.gob:339
#, c-format
msgid ""
-"Mail Notification was unable to log into %s mailbox %s, possibly because the "
-"credentials you have entered are invalid.\n"
+"Mail Notification was unable to trust \"%s\" (%s). It is possible that "
+"someone is intercepting your communication to obtain your confidential "
+"information.\n"
"\n"
-"Please re-enter your credentials."
+"You should only connect to the server if you are certain you are connected "
+"to \"%s\". If you choose to connect to the server, this message will not be "
+"shown again."
msgstr ""
-"L'avertisseur de courrier n'a pas été en mesure d'ouvrir une session dans la "
-"boîte aux lettres %s %s, peut-être parce que les données d'authentification "
-"que vous avez saisies sont invalides.\n"
+"L'avertisseur de courrier n'a pas été en mesure de faire confiance à « %s "
+"» (%s). Il est possible que quelqu'un soit en train d'intercepter votre "
+"communication afin d'obtenir vos informations confidentielles.\n"
"\n"
-"Veuillez à nouveau saisir vos données d'authentification."
+"Vous devriez vous connecter au serveur uniquement si vous êtes certain que "
+"vous êtes connecté à « %s ». Si vous choisissez de vous connecter au "
+"serveur, ce message ne sera plus affiché."
-#: ../src/mn-pi-mailbox.gob:321
+#: ../src/mn-pi-mailbox.gob:353
#, c-format
-msgid "Enter your credentials for %s mailbox %s."
-msgstr "Entrez vos données d'authentification pour la boîte aux lettres %s %s."
+msgid "Certificate fingerprint: %s."
+msgstr "Empreinte digitale du certificat: %s."
-#. keep the title in sync with gnome-authentication-manager
-#. translators: header capitalization
-#: ../src/mn-pi-mailbox.gob:364
-msgid "Authentication Required"
-msgstr "Authentification requise"
+#: ../src/mn-pi-mailbox.gob:360
+msgid "Connect to untrusted server?"
+msgstr "Se connecter au serveur non fiable ?"
-#: ../src/mn-pop3-mailbox.gob:345
+#: ../src/mn-pop3-mailbox.gob:343
msgid "invalid arguments for the LOGIN-DELAY capability"
msgstr "arguments invalides pour la possibilité LOGIN-DELAY"
@@ -1242,7 +1402,7 @@ msgstr "arguments invalides pour la possibilité LOGIN-DELAY"
#. * servers nevertheless, by retrying without the SASL
#. * initial client response.
#.
-#: ../src/mn-pop3-mailbox.gob:486
+#: ../src/mn-pop3-mailbox.gob:484
msgid ""
"SASL authentication with initial client response failed, retrying without "
"initial client response"
@@ -1250,128 +1410,133 @@ msgstr ""
"l'authentification SASL avec réponse client SASL initiale a échoué, nouvel "
"essai sans réponse client SASL initiale"
-#: ../src/mn-pop3-mailbox.gob:703
+#: ../src/mn-pop3-mailbox.gob:701
msgid "unknown error"
msgstr "erreur inconnue"
-#: ../src/mn-pop3-mailbox.gob:798
+#: ../src/mn-pop3-mailbox.gob:799
#, c-format
msgid "honouring LOGIN-DELAY, sleeping for %i second"
msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
msgstr[0] "attente de %i seconde afin d'obéir à LOGIN-DELAY"
msgstr[1] "attente de %i secondes afin d'obéir à LOGIN-DELAY"
-#: ../src/mn-pop3-mailbox.gob:968
+#: ../src/mn-pop3-mailbox.gob:969
msgid "server does not support APOP authentication"
msgstr "le serveur ne supporte pas l'authentification APOP"
-#: ../src/mn-pop3-mailbox.gob:1024
+#: ../src/mn-pop3-mailbox.gob:1025
msgid "falling back to APOP authentication"
msgstr "rétrogradation vers l'authentification APOP"
-#: ../src/mn-pop3-mailbox.gob:1029
+#: ../src/mn-pop3-mailbox.gob:1030
msgid "falling back to USER/PASS authentication"
msgstr "rétrogradation vers l'authentification USER/PASS"
-#: ../src/mn-popup.gob:60 ../src/mn-standard-message-view.gob:63
+#: ../src/mn-popup.gob:61 ../src/mn-standard-message-view.gob:63
msgid "Mailbox:"
msgstr "Boîte aux lettres :"
-#: ../src/mn-popup.gob:62 ../src/mn-standard-message-view.gob:65
+#: ../src/mn-popup.gob:63 ../src/mn-standard-message-view.gob:65
msgid "Unreadable message:"
msgstr "Message non lisible :"
-#: ../src/mn-popup.gob:65 ../src/mn-standard-message-view.gob:68
+#: ../src/mn-popup.gob:66 ../src/mn-standard-message-view.gob:68
msgid "From:"
msgstr "De :"
-#: ../src/mn-popup.gob:66 ../src/mn-standard-message-view.gob:69
+#: ../src/mn-popup.gob:67 ../src/mn-standard-message-view.gob:69
msgid "Subject:"
msgstr "Sujet :"
-#: ../src/mn-popup.gob:128
+#: ../src/mn-popup.gob:129
#, c-format
-msgid "configuration key %s: there is no action named `%s'"
-msgstr "clé de configuration %s: il n'y a pas d'action nommée `%s'"
+msgid "configuration key %s: there is no action named \"%s\""
+msgstr "clé de configuration %s : il n'y a pas d'action nommée « %s »"
#. translators: header capitalization
-#: ../src/mn-popup.gob:141
+#: ../src/mn-popup.gob:142
msgid "Open"
msgstr "Ouvrir"
#. translators: header capitalization
-#: ../src/mn-popup.gob:154
+#: ../src/mn-popup.gob:155
msgid "Mark as Read"
msgstr "Marquer comme lu"
#. translators: header capitalization
-#: ../src/mn-popup.gob:167
+#: ../src/mn-popup.gob:168
msgid "Mark as Spam"
msgstr "Marquer comme indésirable"
#. translators: header capitalization
-#: ../src/mn-popup.gob:180
+#: ../src/mn-popup.gob:181
msgid "Delete"
-msgstr "Effacer"
+msgstr "Supprimer"
-#: ../src/mn-popup.gob:196
+#: ../src/mn-popup.gob:197
msgid "Unable to open message"
msgstr "Impossible d'ouvrir le message"
-#: ../src/mn-popup.gob:213
+#: ../src/mn-popup.gob:214
msgid "Unable to mark message as read"
msgstr "Impossible de marquer le message comme lu"
-#: ../src/mn-popup.gob:230
+#: ../src/mn-popup.gob:231
msgid "Unable to mark message as spam"
msgstr "Impossible de marquer le message comme indésirable"
-#: ../src/mn-popup.gob:247
+#: ../src/mn-popup.gob:248
msgid "Unable to delete message"
-msgstr "Impossible d'effacer le message"
+msgstr "Impossible de supprimer le message"
-#: ../src/mn-popup.gob:306
+#: ../src/mn-popup.gob:310
#, c-format
msgid "unable to show popup: %s"
msgstr "impossible d'afficher le popup : %s"
-#: ../src/mn-popup.gob:323
+#: ../src/mn-popup.gob:328
#, c-format
msgid "unable to close popup: %s"
msgstr "impossible de fermer le popup : %s"
#. we set the summary here because libnotify requires it
#. translators: header capitalization
-#: ../src/mn-popup.gob:334
+#: ../src/mn-popup.gob:339
msgid "New Message"
msgstr "Nouveau message"
#. translators: header capitalization
-#: ../src/mn-properties-dialog.gob:131 ../ui/properties-dialog.glade.h:20
+#: ../src/mn-properties-dialog.gob:117 ../ui/properties-dialog.glade.h:17
msgid "Mail Notification Properties"
msgstr "Propriétés de l'avertisseur de courrier"
#. translators: "test" is an adjective, not a verb
-#: ../src/mn-properties-dialog.gob:136
+#: ../src/mn-properties-dialog.gob:122
msgid "_Test messages"
msgstr "_Messages de test"
-#: ../src/mn-properties-dialog.gob:276
+#: ../src/mn-properties-dialog.gob:256
msgid "No mailbox selected."
msgstr "Pas de boîte aux lettres sélectionnée."
-#: ../src/mn-properties-dialog.gob:281
+#: ../src/mn-properties-dialog.gob:261
#, c-format
msgid "%i mailbox selected."
msgid_plural "%i mailboxes selected."
msgstr[0] "%i boîte aux lettres sélectionnée"
msgstr[1] "%i boîtes aux lettres sélectionnées"
-#: ../src/mn-shell.gob:224
+#: ../src/mn-shell.gob:219
+#, c-format
+msgid "received %s signal, exiting"
+msgstr "signal %s reçu, application quittée"
+
+#: ../src/mn-shell.gob:354
msgid "No mail reader is configured"
msgstr "Aucun lecteur de courrier n'est configuré"
-#: ../src/mn-shell.gob:225
+#: ../src/mn-shell.gob:355
msgid ""
"You can configure a mail reader by choosing <b>System → Preferences → "
"Preferred Applications</b>."
@@ -1379,34 +1544,59 @@ msgstr ""
"Vous pouvez configurer un lecteur de courrier en choisissant <b>Système → "
"Préférences → Applications préférées</b>."
-#: ../src/mn-shell.gob:236 ../src/mn-shell.gob:242 ../src/mn-shell.gob:534
+#: ../src/mn-shell.gob:366 ../src/mn-shell.gob:372 ../src/mn-shell.gob:663
msgid "Unable to open the latest message"
msgstr "Impossible d'ouvrir le dernier message"
-#: ../src/mn-shell.gob:237
+#: ../src/mn-shell.gob:367
#, c-format
msgid "Messages of mailbox \"%s\" cannot be opened."
-msgstr "Les messages de la boîte aux lettres \"%s\" ne peuvent être ouverts."
+msgstr "Les messages de la boîte aux lettres « %s » ne peuvent être ouverts."
-#: ../src/mn-shell.gob:243 ../src/mn-shell.gob:462
+#: ../src/mn-shell.gob:373 ../src/mn-shell.gob:591
msgid "You have no new mail."
msgstr "Vous n'avez pas de nouveau courrier."
+#: ../src/mn-shell.gob:522
+#, c-format
+msgid "%s (%i)"
+msgstr "%s (%i)"
+
#. translators: header capitalization
-#: ../src/mn-shell.gob:398
+#: ../src/mn-shell.gob:527
msgid "Mailboxes Having New Mail"
msgstr "Boîtes aux lettres ayant du nouveau courrier"
#. translators: header capitalization
-#: ../src/mn-shell.gob:417
+#: ../src/mn-shell.gob:546
msgid "Errors"
msgstr "Erreurs"
#. translators: header capitalization
-#: ../src/mn-shell.gob:433
+#: ../src/mn-shell.gob:562
msgid "Mail Summary"
msgstr "Aperçu du courrier"
+#: ../src/mn-sound-file-chooser-dialog.gob:54
+msgid "Select a File"
+msgstr "Sélectionnez un fichier"
+
+#: ../src/mn-sound-file-chooser-dialog.gob:64
+msgid "All files"
+msgstr "Tous les fichiers"
+
+#: ../src/mn-sound-file-chooser-dialog.gob:69
+msgid "Audio files"
+msgstr "Fichiers audio"
+
+#: ../src/mn-sound-player.gob:127
+msgid "Unable to play sound"
+msgstr "Impossible de lire le son"
+
+#: ../src/mn-sound-player.gob:129 ../src/mn-util.c:1526
+msgid "A command error has occurred in Mail Notification"
+msgstr "Une erreur de commande s'est produite dans l'avertisseur de courrier"
+
#: ../src/mn-ssl.c:159
msgid "unknown SSL/TLS error"
msgstr "erreur SSL/TLS inconnue"
@@ -1415,52 +1605,49 @@ msgstr "erreur SSL/TLS inconnue"
msgid "Sent:"
msgstr "Envoyé :"
-#. translators: header capitalization
-#: ../src/mn-stock.c:30
-msgid "Select _All"
-msgstr "Sélectionner _tout"
-
-#. translators: header capitalization
-#: ../src/mn-stock.c:32
-msgid "Co_nnect"
-msgstr "Se co_nnecter"
-
-#: ../src/mn-sylpheed-mailbox-backend.gob:227
+#: ../src/mn-sylpheed-mailbox-backend.gob:239
#, c-format
msgid "unable to open folder: %s"
msgstr "impossible d'ouvrir le dossier : %s"
-#: ../src/mn-sylpheed-mailbox-backend.gob:277
+#: ../src/mn-sylpheed-mailbox-backend.gob:294
#, c-format
msgid "unable to close folder: %s"
msgstr "impossible de fermer le dossier : %s"
-#: ../src/mn-sylpheed-mailbox-backend.gob:280
+#: ../src/mn-sylpheed-mailbox-backend.gob:297
#, c-format
msgid "error while reading folder: %s"
msgstr "erreur lors de la lecture du dossier : %s"
-#: ../src/mn-sylpheed-mailbox-backend.gob:424
+#: ../src/mn-sylpheed-mailbox-backend.gob:345
+#, c-format
+msgid "unable to set encoding: %s"
+msgstr "impossible de sélectionner la page de code : %s"
+
+#: ../src/mn-sylpheed-mailbox-backend.gob:434
+#, c-format
msgid "unexpected end of file"
msgstr "fin de fichier inattendue"
-#: ../src/mn-sylpheed-mailbox-backend.gob:437
+#: ../src/mn-sylpheed-mailbox-backend.gob:447
#, c-format
msgid "incompatible file version \"%i\""
-msgstr "version de fichier \"%i\" incompatible"
+msgstr "version de fichier « %i » incompatible"
-#: ../src/mn-sylpheed-mailbox-backend.gob:440
+#: ../src/mn-sylpheed-mailbox-backend.gob:450
+#, c-format
msgid "file version missing"
msgstr "version de fichier manquante"
-#: ../src/mn-sylpheed-mailbox-backend.gob:498
+#: ../src/mn-sylpheed-message.gob:55
#, c-format
msgid "Unable to read %s: %s."
msgstr "Impossible de lire %s : %s."
#: ../src/mn-system-vfs-mailbox-properties.gob:41
#: ../src/mn-system-vfs-mailbox-properties.gob:49
-#: ../src/mn-system-vfs-mailbox.gob:46
+#: ../src/mn-system-vfs-mailbox.gob:47
msgid "System mailbox"
msgstr "Boîte aux lettres système"
@@ -1477,7 +1664,7 @@ msgstr ""
"L'emplacement de votre boîte aux lettres système n'a pu être détecté. "
"Vérifiez la variable d'environnement MAIL."
-#: ../src/mn-system-vfs-mailbox.gob:73
+#: ../src/mn-system-vfs-mailbox.gob:74
msgid "system mailbox not found"
msgstr "boîte aux lettres système non trouvée"
@@ -1496,70 +1683,74 @@ msgid "Mail Notification Properties Dialog"
msgstr ""
"Boîte de dialogue contenant les propriétés de l'avertisseur de courrier"
-#: ../src/mn-util.c:351
+#: ../src/mn-util.c:352
#, c-format
-msgid "error loading image: %s"
-msgstr "erreur de chargement d'image : %s"
+msgid ""
+"Unable to load image \"%s\" (%s). Please check your Mail Notification "
+"installation."
+msgstr ""
+"Impossible de charger l'image « %s » (%s). Veuillez vérifier votre "
+"installation de l'avertisseur de courrier."
-#: ../src/mn-util.c:367
+#: ../src/mn-util.c:368
#, c-format
msgid ""
"Unable to load interface \"%s\". Please check your Mail Notification "
"installation."
msgstr ""
-"Impossible de charger l'interface \"%s\". Veuillez vérifier votre "
+"Impossible de charger l'interface « %s ». Veuillez vérifier votre "
"installation de l'avertisseur de courrier."
-#: ../src/mn-util.c:382
+#: ../src/mn-util.c:383
#, c-format
msgid ""
"Widget \"%s\" not found in interface \"%s\". Please check your Mail "
"Notification installation."
msgstr ""
-"Elément \"%s\" non trouvé dans l'interface \"%s\". Veuillez vérifier votre "
+"Elément « %s » non trouvé dans l'interface « %s ». Veuillez vérifier votre "
"installation de l'avertisseur de courrier."
-#: ../src/mn-util.c:451
+#: ../src/mn-util.c:452
#, c-format
msgid "Unable to open self as a module (%s)."
msgstr "Impossible de s'auto-ouvrir en tant que module (%s)."
-#: ../src/mn-util.c:456
+#: ../src/mn-util.c:457
#, c-format
msgid ""
"Signal handler \"%s\" not found. Please check your Mail Notification "
"installation."
msgstr ""
-"Gestionnaire de signal \"%s\" non trouvé. Veuillez vérifier votre "
+"Gestionnaire de signal « %s » non trouvé. Veuillez vérifier votre "
"installation de l'avertisseur de courrier."
-#: ../src/mn-util.c:607 ../src/mn-util.c:630 ../src/mn-util.c:650
-#: ../src/mn-util.c:672
+#: ../src/mn-util.c:611 ../src/mn-util.c:634 ../src/mn-util.c:654
+#: ../src/mn-util.c:676
msgid "A drag and drop error has occurred"
msgstr "Une erreur de glisser-déposer s'est produite"
-#: ../src/mn-util.c:608
+#: ../src/mn-util.c:612
msgid "An invalid location list has been received."
msgstr "Une liste d'emplacements non valide a été reçue."
-#: ../src/mn-util.c:651
+#: ../src/mn-util.c:655
msgid "An invalid Mozilla location has been received."
msgstr "Un emplacement Mozilla non valide a été reçu."
-#: ../src/mn-util.c:727
+#: ../src/mn-util.c:731
msgid "Unable to display help"
msgstr "Impossible d'afficher l'aide"
-#: ../src/mn-util.c:739
+#: ../src/mn-util.c:743
msgid "Unable to open link"
msgstr "Impossible d'ouvrir le lien"
-#: ../src/mn-util.c:753
+#: ../src/mn-util.c:757
#, c-format
msgid "Unable to create a thread: %s."
msgstr "Impossible de créer un thread : %s."
-#: ../src/mn-util.c:930
+#: ../src/mn-util.c:934
#, c-format
msgid ""
"The following location is invalid:\n"
@@ -1578,68 +1769,79 @@ msgstr[1] ""
"\n"
"%s"
-#: ../src/mn-util.c:946
+#: ../src/mn-util.c:950
msgid "A fatal error has occurred in Mail Notification"
msgstr "Une erreur fatale s'est produite dans l'avertisseur de courrier"
-#: ../src/mn-util.c:990
+#: ../src/mn-util.c:994
#, c-format
msgid "unable to get current time: %s"
msgstr "impossible d'obtenir l'heure courante : %s"
-#: ../src/mn-util.c:1359
+#: ../src/mn-util.c:1363
#, c-format
msgid "%i second ago"
msgid_plural "%i seconds ago"
msgstr[0] "il y a %i seconde"
msgstr[1] "il y a %i secondes"
-#: ../src/mn-util.c:1363
+#: ../src/mn-util.c:1367
#, c-format
msgid "about %i minute ago"
msgid_plural "about %i minutes ago"
msgstr[0] "il y a approximativement %i minute"
msgstr[1] "il y a approximativement %i minutes"
-#: ../src/mn-util.c:1368
+#: ../src/mn-util.c:1372
#, c-format
msgid "about %i hour ago"
msgid_plural "about %i hours ago"
msgstr[0] "il y a approximativement %i heure"
msgstr[1] "il y a approximativement %i heures"
-#: ../src/mn-util.c:1373
+#: ../src/mn-util.c:1377
#, c-format
msgid "about %i day ago"
msgid_plural "about %i days ago"
msgstr[0] "il y a approximativement %i jour"
msgstr[1] "il y a approximativement %i jours"
-#: ../src/mn-util.c:1378
+#: ../src/mn-util.c:1382
#, c-format
msgid "about %i week ago"
msgid_plural "about %i weeks ago"
msgstr[0] "il y a approximativement %i semaine"
msgstr[1] "il y a approximativement %i semaines"
-#: ../src/mn-util.c:1391
+#: ../src/mn-util.c:1395
msgid "unknown date"
msgstr "date inconnue"
-#: ../src/mn-util.c:1426
-msgid "A command error has occurred in Mail Notification"
-msgstr "Une erreur de commande s'est produite dans l'avertisseur de courrier"
+#: ../src/mn-util.c:1456
+#, c-format
+msgid "unterminated substitution"
+msgstr "substitution non terminée"
+
+#: ../src/mn-util.c:1495
+#, c-format
+msgid "unknown substitution \"%s\""
+msgstr "substitution « %s » inconnue"
+
+#: ../src/mn-util.c:1498
+#, c-format
+msgid "empty substitution"
+msgstr "substitution vide"
-#: ../src/mn-vfs-mailbox.gob:249
+#: ../src/mn-vfs-mailbox.gob:255
#, c-format
msgid "unable to monitor %s (%s), poll mode activated"
msgstr "impossible de surveiller %s (%s), vérification explicite activée"
-#: ../src/mn-vfs-mailbox.gob:421
+#: ../src/mn-vfs-mailbox.gob:447
msgid "unknown mailbox format"
msgstr "format de boîte aux lettres inconnu"
-#: ../src/mn-vfs-mailbox.gob:421
+#: ../src/mn-vfs-mailbox.gob:447
msgid "does not exist"
msgstr "n'existe pas"
@@ -1648,29 +1850,81 @@ msgstr "n'existe pas"
msgid "Unable to write %s: %s."
msgstr "Impossible d'écrire %s : %s."
+#: ../src/mn-webmail-mailbox.gob:87
+#, c-format
+msgid "unable to create a temporary file: %s"
+msgstr "impossible de créer un fichier temporaire : %s"
+
+#: ../src/mn-webmail-mailbox.gob:94
+#, c-format
+msgid "unable to change the permissions of the temporary file: %s"
+msgstr "impossible de modifier les permissions du fichier temporaire : %s"
+
+#: ../src/mn-webmail-mailbox.gob:187
+msgid "configuration:"
+msgstr "configuration :"
+
+#: ../src/mn-webmail-mailbox.gob:215
+#, c-format
+msgid "running %s"
+msgstr "exécution de %s"
+
+#: ../src/mn-webmail-mailbox.gob:219
+#, c-format
+msgid "cannot execute \"%s\": %s"
+msgstr "impossible d'exécuter « %s » : %s"
+
+#: ../src/mn-webmail-mailbox.gob:224
+msgid "standard output:"
+msgstr "sortie standard :"
+
+#: ../src/mn-webmail-mailbox.gob:225
+msgid "standard error output:"
+msgstr "sortie d'erreur standard :"
+
+#. translators: %s is a program name, as in "unknown fetchyahoo failure"
+#: ../src/mn-webmail-mailbox.gob:243
+#, c-format
+msgid "unknown %s failure"
+msgstr "échec inconnu de %s"
+
#: ../src/mn-xml.c:54
#, c-format
msgid ""
"property \"%s\": unable to transform string \"%s\" into a value of type \"%s"
"\""
msgstr ""
-"propriété \"%s\" : impossible de transformer la chaîne de caractères \"%s\" "
-"en une valeur de type \"%s\""
+"propriété « %s » : impossible de transformer la chaîne de caractères « %s » "
+"en une valeur de type « %s »"
+
+#: ../src/mn-yahoo-mailbox.gob:73
+#, c-format
+msgid "unable to change the permissions of %s: %s"
+msgstr "impossible de changer les permissions de %s : %s"
+
+#: ../src/mn-yahoo-mailbox.gob:84
+#, c-format
+msgid "unable to create %s: %s"
+msgstr "impossible de créer %s : %s"
+
+#: ../src/mn-yahoo-mailbox.gob:203
+msgid "delay between mail checks too small"
+msgstr "délai entre les vérifications de courrier trop faible"
#. translators: header capitalization
-#: ../ui/mailbox-properties-dialog.glade.h:1 ../ui/properties-dialog.glade.h:8
+#: ../ui/mailbox-properties-dialog.glade.h:1 ../ui/properties-dialog.glade.h:6
msgid "<span weight=\"bold\">General</span>"
msgstr "<span weight=\"bold\">Général</span>"
#. translators: header capitalization
#: ../ui/mailbox-properties-dialog.glade.h:2
-#: ../ui/properties-dialog.glade.h:17
+#: ../ui/properties-dialog.glade.h:14
msgid "General"
msgstr "Général"
#: ../ui/mailbox-properties-dialog.glade.h:3
msgid "Mailbox _name:"
-msgstr "No_m de la boîte aux lettres :"
+msgstr "N_om de la boîte aux lettres :"
#: ../ui/mailbox-properties-dialog.glade.h:4
msgid "Mailbox _type:"
@@ -1683,7 +1937,7 @@ msgstr "Par dé_faut"
#: ../ui/mailbox-properties-dialog.glade.h:7
msgid "_Delay between mail checks:"
-msgstr "Délai entre les _vérifications de courrier :"
+msgstr "_Délai entre les vérifications de courrier :"
#. translators: header capitalization
#: ../ui/mailbox-properties-dialog.glade.h:9
@@ -1691,12 +1945,12 @@ msgid "_Use Default"
msgstr "_Par défaut"
#: ../ui/mailbox-properties-dialog.glade.h:10
-#: ../ui/properties-dialog.glade.h:41
+#: ../ui/properties-dialog.glade.h:30
msgid "minutes"
msgstr "minutes"
#: ../ui/mailbox-properties-dialog.glade.h:11
-#: ../ui/properties-dialog.glade.h:42
+#: ../ui/properties-dialog.glade.h:31
msgid "seconds"
msgstr "secondes"
@@ -1707,103 +1961,69 @@ msgstr "<span weight=\"bold\">Action du click</span>"
#. translators: header capitalization
#: ../ui/properties-dialog.glade.h:4
-msgid "<span weight=\"bold\">Commands</span>"
-msgstr "<span weight=\"bold\">Commandes</span>"
-
-#. translators: header capitalization
-#: ../ui/properties-dialog.glade.h:6
msgid "<span weight=\"bold\">Expiration</span>"
msgstr "<span weight=\"bold\">Expiration</span>"
#. translators: header capitalization
-#: ../ui/properties-dialog.glade.h:10
+#: ../ui/properties-dialog.glade.h:8
msgid "<span weight=\"bold\">Mailbox List</span>"
msgstr "<span weight=\"bold\">Liste des boîtes aux lettres</span>"
#. translators: header capitalization
-#: ../ui/properties-dialog.glade.h:12
+#: ../ui/properties-dialog.glade.h:10
msgid "<span weight=\"bold\">Position</span>"
msgstr "<span weight=\"bold\">Position</span>"
-#. translators: header capitalization
-#: ../ui/properties-dialog.glade.h:14
-msgid "<span weight=\"bold\">Tooltip Mail Summary</span>"
-msgstr "<span weight=\"bold\">Aperçu du courrier dans le ballon d'aide</span>"
-
-#: ../ui/properties-dialog.glade.h:15
+#: ../ui/properties-dialog.glade.h:11
msgid "A_fter:"
msgstr "Ap_rès :"
-#: ../ui/properties-dialog.glade.h:18
+#: ../ui/properties-dialog.glade.h:12
+msgid "Co_nsider new mail as read"
+msgstr "_Considérer le nouveau courrier comme lu"
+
+#: ../ui/properties-dialog.glade.h:15
msgid "In the p_opup stack"
-msgstr "Dans la pile des p_opups"
+msgstr "Dans la _pile des popups"
#. translators: header capitalization
-#: ../ui/properties-dialog.glade.h:22
+#: ../ui/properties-dialog.glade.h:19
msgid "Message Popups"
msgstr "Popups"
+#: ../ui/properties-dialog.glade.h:20
+msgid "Play a _sound when new mail arrives:"
+msgstr "_Lire un son lorsque du nouveau courrier arrive :"
+
#. translators: header capitalization
-#: ../ui/properties-dialog.glade.h:24
+#: ../ui/properties-dialog.glade.h:22
msgid "Status Icon"
msgstr "Icône de statut"
-#: ../ui/properties-dialog.glade.h:25
-msgid "When _new mail arrives:"
-msgstr "Quand du _nouveau courrier arrive :"
-
-#: ../ui/properties-dialog.glade.h:26
-msgid "When all mail has _been read:"
-msgstr "Quand _tout le courrier a été lu :"
-
-#: ../ui/properties-dialog.glade.h:27
-msgid "_Always display"
-msgstr "_Toujours afficher"
-
-#: ../ui/properties-dialog.glade.h:28
+#: ../ui/properties-dialog.glade.h:23
msgid "_Attached to the status icon"
msgstr "A_ttachés à l'icône de statut"
-#: ../ui/properties-dialog.glade.h:29
-msgid "_Blink on errors"
-msgstr "_Clignoter lors d'erreurs"
-
-#: ../ui/properties-dialog.glade.h:30
+#: ../ui/properties-dialog.glade.h:24
msgid "_Desktop default"
-msgstr "Valeur par _défaut du bureau"
-
-#: ../ui/properties-dialog.glade.h:31
-msgid "_Display seen mail"
-msgstr "Afficher le courrier _vu"
+msgstr "_Valeur par défaut du bureau"
-#: ../ui/properties-dialog.glade.h:32
-msgid "_Display this dialog"
-msgstr "Afficher cette _boîte de dialogue"
-
-#: ../ui/properties-dialog.glade.h:33
+#: ../ui/properties-dialog.glade.h:25
msgid "_Enable message popups"
-msgstr "A_ctiver les popups"
+msgstr "_Activer les popups"
-#: ../ui/properties-dialog.glade.h:34
+#: ../ui/properties-dialog.glade.h:26
msgid "_Launch the mail reader"
-msgstr "_Exécuter le lecteur de courrier"
+msgstr "E_xécuter le lecteur de courrier"
-#: ../ui/properties-dialog.glade.h:36
-msgid "_None"
-msgstr "Aucu_n"
-
-#: ../ui/properties-dialog.glade.h:37
+#: ../ui/properties-dialog.glade.h:27
msgid "_Open the latest message"
msgstr "_Ouvrir le dernier message"
-#: ../ui/properties-dialog.glade.h:38
+#: ../ui/properties-dialog.glade.h:28
msgid "_Update the mail status"
msgstr "Mett_re à jour le statut du courrier"
-#: ../ui/properties-dialog.glade.h:39
-msgid "icon tooltip's mail summary layout|Co_mpact"
-msgstr "Co_mpact"
-
-#: ../ui/properties-dialog.glade.h:40
-msgid "icon tooltip's mail summary layout|_Standard"
-msgstr "_Standard"
+#: ../ui/properties-dialog.glade.h:29
+msgid "message popups tab|_Never"
+msgstr "Jamai_s"
diff --git a/po/pl.po b/po/pl.po
@@ -4,22 +4,22 @@
# This file is distributed under the same license as the
# mail-notification package.
#
-# Maurycy Pawłowski-Wieroński <maurycy@abstrakcja.pl>, 2005.
# Tomasz Sarota-Raczek <tomasz.sarota.raczek@gmail.com>, 2004.
+# Maurycy Pawłowski-Wieroński <maurycy@abstrakcja.pl>, 2005.
+# Tomasz Sałaciński <tsalacinski@gmail.com>, 2007.
#
msgid ""
msgstr ""
-"Project-Id-Version: mail-notification 1.0\n"
+"Project-Id-Version: mail-notification 4.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-11-25 01:43+0100\n"
-"PO-Revision-Date: 2004-11-23 18:06+0100\n"
-"Last-Translator: Maurycy Pawłowski-Wieroński <maurycy@abstrakcja.pl>\n"
+"PO-Revision-Date: 2007-11-23 00:46+0100\n"
+"Last-Translator: Tomasz Sałaciński <tsalacinski@gmail.com>\n"
"Language-Team: Polish\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: data/GNOME_MailNotification_Automation.server.in.in.h:1
msgid "Mail Notification automation"
@@ -415,7 +415,7 @@ msgstr ""
#: src/mn-autodetect-mailbox-properties.gob:68
msgid "_Location:"
-msgstr "_Lokacja:"
+msgstr "_Lokalizacja:"
#: src/mn-autodetect-mailbox-properties.gob:74
msgid "_Browse..."
@@ -427,7 +427,7 @@ msgstr "URI skrzynki pocztowej"
#: src/mn-autodetect-mailbox-properties.gob:118
msgid "Select a File or Folder"
-msgstr "Wybierz Plik lub Teczkę"
+msgstr "Wybierz plik lub folder"
#: src/mn-blinking-image.gob:32
msgid "Whether the image is blinking or not"
@@ -857,7 +857,7 @@ msgstr "logowanie nie udało się"
#: src/mn-mail-icon.gob:92 ui/summary-dialog.glade.h:2
msgid "_Launch Mail Reader"
-msgstr "_Uruchom czytnik poczty"
+msgstr "_Uruchom program pocztowy"
#: src/mn-mail-icon.gob:93 ui/summary-dialog.glade.h:3
msgid "_Update"
@@ -1186,44 +1186,44 @@ msgstr "Nieczytalna wiadomość"
#: src/mn-message-box.gob:69
msgid "From"
-msgstr "Od"
+msgstr "Nadawca"
#: src/mn-message-box.gob:70
msgid "Subject"
-msgstr "Temat"
+msgstr "Temat wiadomości"
#: src/mn-message-box.gob:75
msgid "Sent"
-msgstr "Posłanę"
+msgstr "Wysłano"
#: src/mn-message-box.gob:192
#, c-format
-msgid "%i second ago"
-msgid_plural "%i seconds ago"
+msgid "about %i second ago"
+msgid_plural "about %i seconds ago"
msgstr[0] "%i sekundę temu"
-msgstr[1] "%i sekund temu"
-msgstr[2] "%i sekundy temu"
+msgstr[1] "%i sekundy temu"
+msgstr[2] "%i sekund temu"
#: src/mn-message-box.gob:196
#, c-format
-msgid "%i minute ago"
-msgid_plural "%i minutes ago"
+msgid "about %i minute ago"
+msgid_plural "about %i minutes ago"
msgstr[0] "%i minutę temu"
-msgstr[1] "%i minut temu"
-msgstr[2] "%i minuty temu"
+msgstr[1] "%i minuty temu"
+msgstr[2] "%i minut temu"
#: src/mn-message-box.gob:201
#, c-format
-msgid "%i hour ago"
-msgid_plural "%i hours ago"
+msgid "about %i hour ago"
+msgid_plural "about %i hours ago"
msgstr[0] "%i godzinę temu"
-msgstr[1] "%i godzin temu"
-msgstr[2] "%i godziny temu"
+msgstr[1] "%i godziny temu"
+msgstr[2] "%i godzin temu"
#: src/mn-message-box.gob:206
#, c-format
-msgid "%i day ago"
-msgid_plural "%i days ago"
+msgid "about %i day ago"
+msgid_plural "about %i days ago"
msgstr[0] "%i dzień temu"
msgstr[1] "%i dni temu"
msgstr[2] "%i dni temu"
@@ -1351,8 +1351,8 @@ msgstr "Żadna skrzynka pocztowa nie została wybrana."
msgid "%i mailbox selected."
msgid_plural "%i mailboxes selected."
msgstr[0] "%i skrzynka pocztowa wybrana"
-msgstr[1] "%i skrzynek pocztowych wybranych"
-msgstr[2] "%i skrzynki pocztowe wybranę"
+msgstr[1] "%i skrzynki pocztowe wybrane"
+msgstr[2] "%i wybranych skrzynek pocztowych"
#: src/mn-shell.gob:93
msgid "You have new mail."
@@ -1372,7 +1372,7 @@ msgstr "Nieskonfigurowane skrzynki pocztowe"
#: src/mn-shell.gob:381 ui/summary-dialog.glade.h:1
msgid "Mail Summary"
-msgstr "Streszczenie poczty"
+msgstr "Podsumowanie wiadomości"
#: src/mn-soup.c:140
#, c-format
@@ -1685,7 +1685,7 @@ msgstr "_Streszczenie poczty"
#: ui/properties.glade.h:42
msgid "_Launch the mail reader"
-msgstr "U_ruchom czytnik poczty"
+msgstr "U_ruchom program pocztowy"
#: ui/properties.glade.h:43
msgid "_Mail reader:"
@@ -1756,3 +1756,186 @@ msgstr "_Konfiguracja Zawiadomienia pocztowego"
#: ui/welcome.glade.h:9
msgid "_Skip configuration"
msgstr "_Pomiń konfigurację"
+
+# These messages are not translated in any PO file
+
+msgid "_Display seen mail"
+msgstr "_Pokazuj widzianą pocztę"
+
+msgid "_Always display"
+msgstr "Z_awsze pokazuj ikonę w tacce systemowej"
+
+msgid "_Test messages"
+msgstr "Wiadomość _testowa"
+
+msgid "Status Icon"
+msgstr "Ikona w tacce systemowej"
+
+msgid "When all mail has _been read:"
+msgstr "Kiedy wszystkie wiadomości zostały przeczytane:"
+
+msgid "<span weight=\"bold\">Tooltip Mail Summary</span>"
+msgstr "<span weight=\"bold\">Podsumowanie wiadomości</span>"
+
+msgid "icon tooltip's mail summary layout|_Standard"
+msgstr "_Standardowe"
+
+msgid "icon tooltip's mail summary layout|Co_mpact"
+msgstr "Ko_mpaktowe"
+
+msgid "_None"
+msgstr "Br_ak"
+
+msgid "Message Popups"
+msgstr "Okienka wiadomości"
+
+msgid "<span weight=\"bold\">Click Action</span>"
+msgstr "<span weight=\"bold\">Akcja po kliknięciu</span>"
+
+msgid "_Display this dialog"
+msgstr "Pokaż to okno _dialogowe"
+
+msgid "_Open the latest message"
+msgstr "_Otwórz ostatnią wiadomość"
+
+msgid "_Update the mail status"
+msgstr "O_dśwież stan poczty"
+
+msgid "_Enable message popups"
+msgstr "Włącz wyskakujące okna wiadomości"
+
+msgid "_Attached to the status icon"
+msgstr "_Podłączone do ikony w tacce systemowej"
+
+msgid "In the p_opup stack"
+msgstr "Okna ułożone na stosie"
+
+msgid "<span weight=\"bold\">Expiration</span>"
+msgstr "<span weight=\"bold\">Przedawnienie</span>"
+
+msgid "_Desktop default"
+msgstr "_Domyślne ustawienia systemowe"
+
+msgid "_Never"
+msgstr "_Nigdy"
+
+msgid "A_fter:"
+msgstr "P_o określonym czasie:"
+
+msgid "New Message"
+msgstr "Nowa wiadomość"
+
+msgid "Test mailbox"
+msgstr "Skrzynka testowa"
+
+msgid "From:"
+msgstr "Nadawca:"
+
+msgid "Subject:"
+msgstr "Temat wiadomości:"
+
+#, c-format
+msgid "Test message #%i"
+msgstr "Wiadomość testowa nr. %i"
+
+msgid "Mail Notification Properties Dialog"
+msgstr "Okno preferencji powiadamiania o nowej poczcie"
+
+msgid "Mailbox _type:"
+msgstr "_Typ skrzynki pocztowej:"
+
+msgid "Mailbox _name:"
+msgstr "_Nazwa skrzynki pocztowej:"
+
+msgid "_Use Default"
+msgstr "_Użyj domyślnej"
+
+msgid "Autodetect"
+msgstr "Wykryj automatycznie"
+
+msgid "System mailbox"
+msgstr "Skrzynka systemowa"
+
+msgid "Us_e Default"
+msgstr "_Domyślnie"
+
+msgid "<span weight=\"bold\">Location</span>"
+msgstr "<span weight=\"bold\">Lokalizacja</span>"
+
+msgid "Account"
+msgstr "Konto pocztowe"
+
+msgid "_Server:"
+msgstr "_Serwer:"
+
+msgid "IMAP Mailbox"
+msgstr "Skrzynka IMAP"
+
+msgid "In_box"
+msgstr "Ode_brane"
+
+msgid "_Other:"
+msgstr "_Inna:"
+
+msgid "Connection"
+msgstr "Połączenie"
+
+msgid "Connection Type"
+msgstr "Typ połączenia"
+
+msgid "In-_band SSL/TLS"
+msgstr "Wewnętrzne SSL/TLS"
+
+msgid "SSL/TLS on s_eparate port"
+msgstr "SSL/TLS na oddzielnym porcie"
+
+msgid "Authentication"
+msgstr "Autoryzacja"
+
+msgid "_Mechanism:"
+msgstr "_Mechanizm:"
+
+msgid "Use the IDLE Extension"
+msgstr "Użyj rozszerzenia IDLE"
+
+msgid "A_utodetect"
+msgstr "Wykryj a_utomatycznie"
+
+msgid "Al_ways"
+msgstr "_Zawsze"
+
+msgid "Location"
+msgstr "Lokalizacja"
+
+msgid "Your system mailbox is <span weight=\"bold\">%s</span>."
+msgstr "Lokalizacja Twojej systemowej skrzynki pocztowej:<span weight=\"bold\">%s</span>."
+
+msgid "Mail Notification can not contact Evolution. Make sure that Evolution is running and that the Evolution Jean-Yves Lefort's Mail Notification plugin is installed and loaded. Fedora ships the plugin in a separate package called mail-notification-evolution-plugin; you might need to install it manually."
+
+msgstr "Aplikacja powiadamiania o nowej poczcie nie może skontaktować się z Evolution. Upewnij się, że Evolution jest uruchomione i że wtyczka Jean-Yves Lefort's Mail Notification jest zainstalowana i załadowana. Fedora udostępnia tą wtyczkę w oddzielnej paczce: mail-notification-evolution-plugin; może zajść konieczność ręcznego zainstalowania tej paczki."
+
+#, c-format
+msgid "%s mailbox"
+msgstr "Skrzynka %s"
+
+msgid "You have no new mail."
+msgstr "Brak nowych wiadomości."
+
+msgid "_Mail Reader"
+msgstr "Otwórz program pocztowy"
+
+msgid "_Open Latest Message"
+msgstr "_Otwórz ostatnią wiadomość"
+
+msgid "Sent:"
+msgstr "Wysłano:"
+
+msgid "about"
+msgstr "około"
+
+msgid "day"
+msgstr "dzień/dni"
+
+msgid "ago"
+msgstr "temu"
+
diff --git a/src/GNOME_MailNotification.idl b/src/GNOME_MailNotification.idl
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -27,6 +27,7 @@ module GNOME
{
boolean hasMailboxes ();
string getSummary ();
+ void considerNewMailAsRead ();
void update ();
void displayProperties ();
void displayAbout ();
diff --git a/src/GNOME_MailNotification_Evolution.idl b/src/GNOME_MailNotification_Evolution.idl
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/Makefile.am b/src/Makefile.am
@@ -8,11 +8,11 @@ mail_notification_CPPFLAGS += -DG_LOG_DOMAIN="\"$(PACKAGE)\""
mail_notification_CPPFLAGS += -DPREFIX="\"$(prefix)\""
mail_notification_CPPFLAGS += -DSYSCONFDIR="\"$(sysconfdir)\""
mail_notification_CPPFLAGS += -DDATADIR="\"$(datadir)\""
+mail_notification_CPPFLAGS += -DPKGDATADIR="\"$(pkgdatadir)\""
mail_notification_CPPFLAGS += -DLIBDIR="\"$(libdir)\""
mail_notification_CPPFLAGS += -DGNOMELOCALEDIR="\"$(datadir)/locale\""
-mail_notification_CPPFLAGS += -DUIDIR="\"$(pkgdatadir)/ui\""
mail_notification_LDFLAGS = -export-dynamic
-mail_notification_LDFLAGS += $(INTLLIBS)
+mail_notification_LDFLAGS += -lm $(INTLLIBS)
mail_notification_CPPFLAGS += $(GNOME_CFLAGS)
mail_notification_LDFLAGS += $(GNOME_LIBS)
mail_notification_SOURCES = mn-main.c
@@ -47,11 +47,6 @@ mail_notification_SOURCES += mn-automation-private.h mn-automation.c mn-automati
BUILT_SOURCES += mn-automation.gob.stamp
MAINTAINERCLEANFILES += mn-automation.gob.stamp
MAINTAINERCLEANFILES += mn-automation-private.h mn-automation.c mn-automation.h
-mail_notification_SOURCES += mn-blinking-image.gob mn-blinking-image.gob.stamp
-mail_notification_SOURCES += mn-blinking-image-private.h mn-blinking-image.c mn-blinking-image.h
-BUILT_SOURCES += mn-blinking-image.gob.stamp
-MAINTAINERCLEANFILES += mn-blinking-image.gob.stamp
-MAINTAINERCLEANFILES += mn-blinking-image-private.h mn-blinking-image.c mn-blinking-image.h
mail_notification_SOURCES += mn-compact-message-view.gob mn-compact-message-view.gob.stamp
mail_notification_SOURCES += mn-compact-message-view-private.h mn-compact-message-view.c mn-compact-message-view.h
BUILT_SOURCES += mn-compact-message-view.gob.stamp
@@ -62,11 +57,21 @@ mail_notification_SOURCES += mn-dialog-private.h mn-dialog.c mn-dialog.h
BUILT_SOURCES += mn-dialog.gob.stamp
MAINTAINERCLEANFILES += mn-dialog.gob.stamp
MAINTAINERCLEANFILES += mn-dialog-private.h mn-dialog.c mn-dialog.h
+mail_notification_SOURCES += mn-file-chooser-button.gob mn-file-chooser-button.gob.stamp
+mail_notification_SOURCES += mn-file-chooser-button-private.h mn-file-chooser-button.c mn-file-chooser-button.h
+BUILT_SOURCES += mn-file-chooser-button.gob.stamp
+MAINTAINERCLEANFILES += mn-file-chooser-button.gob.stamp
+MAINTAINERCLEANFILES += mn-file-chooser-button-private.h mn-file-chooser-button.c mn-file-chooser-button.h
mail_notification_SOURCES += mn-mail-icon.gob mn-mail-icon.gob.stamp
mail_notification_SOURCES += mn-mail-icon-private.h mn-mail-icon.c mn-mail-icon.h
BUILT_SOURCES += mn-mail-icon.gob.stamp
MAINTAINERCLEANFILES += mn-mail-icon.gob.stamp
MAINTAINERCLEANFILES += mn-mail-icon-private.h mn-mail-icon.c mn-mail-icon.h
+mail_notification_SOURCES += mn-mail-icon-widget.gob mn-mail-icon-widget.gob.stamp
+mail_notification_SOURCES += mn-mail-icon-widget-private.h mn-mail-icon-widget.c mn-mail-icon-widget.h
+BUILT_SOURCES += mn-mail-icon-widget.gob.stamp
+MAINTAINERCLEANFILES += mn-mail-icon-widget.gob.stamp
+MAINTAINERCLEANFILES += mn-mail-icon-widget-private.h mn-mail-icon-widget.c mn-mail-icon-widget.h
mail_notification_SOURCES += mn-mailbox.gob mn-mailbox.gob.stamp
mail_notification_SOURCES += mn-mailbox-private.h mn-mailbox.c mn-mailbox.h
BUILT_SOURCES += mn-mailbox.gob.stamp
@@ -122,6 +127,16 @@ mail_notification_SOURCES += mn-shell-private.h mn-shell.c mn-shell.h
BUILT_SOURCES += mn-shell.gob.stamp
MAINTAINERCLEANFILES += mn-shell.gob.stamp
MAINTAINERCLEANFILES += mn-shell-private.h mn-shell.c mn-shell.h
+mail_notification_SOURCES += mn-sound-file-chooser-dialog.gob mn-sound-file-chooser-dialog.gob.stamp
+mail_notification_SOURCES += mn-sound-file-chooser-dialog-private.h mn-sound-file-chooser-dialog.c mn-sound-file-chooser-dialog.h
+BUILT_SOURCES += mn-sound-file-chooser-dialog.gob.stamp
+MAINTAINERCLEANFILES += mn-sound-file-chooser-dialog.gob.stamp
+MAINTAINERCLEANFILES += mn-sound-file-chooser-dialog-private.h mn-sound-file-chooser-dialog.c mn-sound-file-chooser-dialog.h
+mail_notification_SOURCES += mn-sound-player.gob mn-sound-player.gob.stamp
+mail_notification_SOURCES += mn-sound-player-private.h mn-sound-player.c mn-sound-player.h
+BUILT_SOURCES += mn-sound-player.gob.stamp
+MAINTAINERCLEANFILES += mn-sound-player.gob.stamp
+MAINTAINERCLEANFILES += mn-sound-player-private.h mn-sound-player.c mn-sound-player.h
mail_notification_SOURCES += mn-standard-message-view.gob mn-standard-message-view.gob.stamp
mail_notification_SOURCES += mn-standard-message-view-private.h mn-standard-message-view.c mn-standard-message-view.h
BUILT_SOURCES += mn-standard-message-view.gob.stamp
@@ -180,6 +195,11 @@ mail_notification_SOURCES += mn-maildir-mailbox-backend-private.h mn-maildir-mai
BUILT_SOURCES += mn-maildir-mailbox-backend.gob.stamp
MAINTAINERCLEANFILES += mn-maildir-mailbox-backend.gob.stamp
MAINTAINERCLEANFILES += mn-maildir-mailbox-backend-private.h mn-maildir-mailbox-backend.c mn-maildir-mailbox-backend.h
+mail_notification_SOURCES += mn-maildir-message.gob mn-maildir-message.gob.stamp
+mail_notification_SOURCES += mn-maildir-message-private.h mn-maildir-message.c mn-maildir-message.h
+BUILT_SOURCES += mn-maildir-message.gob.stamp
+MAINTAINERCLEANFILES += mn-maildir-message.gob.stamp
+MAINTAINERCLEANFILES += mn-maildir-message-private.h mn-maildir-message.c mn-maildir-message.h
endif
if WITH_POP3
mail_notification_SOURCES += mn-md5.c
@@ -226,7 +246,11 @@ BUILT_SOURCES += mn-pi-mailbox-properties.gob.stamp
MAINTAINERCLEANFILES += mn-pi-mailbox-properties.gob.stamp
MAINTAINERCLEANFILES += mn-pi-mailbox-properties-private.h mn-pi-mailbox-properties.c mn-pi-mailbox-properties.h
endif
-if WITH_POP3_OR_IMAP_OR_GMAIL
+if WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL
+mail_notification_CPPFLAGS += $(GNOME_KEYRING_CFLAGS)
+mail_notification_LDFLAGS += $(GNOME_KEYRING_LIBS)
+mail_notification_SOURCES += mn-keyring.c
+mail_notification_SOURCES += mn-keyring.h
mail_notification_SOURCES += mn-authenticated-mailbox.gob mn-authenticated-mailbox.gob.stamp
mail_notification_SOURCES += mn-authenticated-mailbox-private.h mn-authenticated-mailbox.c mn-authenticated-mailbox.h
BUILT_SOURCES += mn-authenticated-mailbox.gob.stamp
@@ -244,6 +268,18 @@ mail_notification_SOURCES += mn-sylpheed-mailbox-backend-private.h mn-sylpheed-m
BUILT_SOURCES += mn-sylpheed-mailbox-backend.gob.stamp
MAINTAINERCLEANFILES += mn-sylpheed-mailbox-backend.gob.stamp
MAINTAINERCLEANFILES += mn-sylpheed-mailbox-backend-private.h mn-sylpheed-mailbox-backend.c mn-sylpheed-mailbox-backend.h
+mail_notification_SOURCES += mn-sylpheed-message.gob mn-sylpheed-message.gob.stamp
+mail_notification_SOURCES += mn-sylpheed-message-private.h mn-sylpheed-message.c mn-sylpheed-message.h
+BUILT_SOURCES += mn-sylpheed-message.gob.stamp
+MAINTAINERCLEANFILES += mn-sylpheed-message.gob.stamp
+MAINTAINERCLEANFILES += mn-sylpheed-message-private.h mn-sylpheed-message.c mn-sylpheed-message.h
+endif
+if WITH_MAILDIR_OR_SYLPHEED
+mail_notification_SOURCES += mn-vfs-message.gob mn-vfs-message.gob.stamp
+mail_notification_SOURCES += mn-vfs-message-private.h mn-vfs-message.c mn-vfs-message.h
+BUILT_SOURCES += mn-vfs-message.gob.stamp
+MAINTAINERCLEANFILES += mn-vfs-message.gob.stamp
+MAINTAINERCLEANFILES += mn-vfs-message-private.h mn-vfs-message.c mn-vfs-message.h
endif
if WITH_GMAIL
mail_notification_SOURCES += mn-gmail-mailbox.gob mn-gmail-mailbox.gob.stamp
@@ -257,6 +293,42 @@ BUILT_SOURCES += mn-gmail-mailbox-properties.gob.stamp
MAINTAINERCLEANFILES += mn-gmail-mailbox-properties.gob.stamp
MAINTAINERCLEANFILES += mn-gmail-mailbox-properties-private.h mn-gmail-mailbox-properties.c mn-gmail-mailbox-properties.h
endif
+if WITH_YAHOO
+mail_notification_SOURCES += mn-yahoo-mailbox.gob mn-yahoo-mailbox.gob.stamp
+mail_notification_SOURCES += mn-yahoo-mailbox-private.h mn-yahoo-mailbox.c mn-yahoo-mailbox.h
+BUILT_SOURCES += mn-yahoo-mailbox.gob.stamp
+MAINTAINERCLEANFILES += mn-yahoo-mailbox.gob.stamp
+MAINTAINERCLEANFILES += mn-yahoo-mailbox-private.h mn-yahoo-mailbox.c mn-yahoo-mailbox.h
+mail_notification_SOURCES += mn-yahoo-mailbox-properties.gob mn-yahoo-mailbox-properties.gob.stamp
+mail_notification_SOURCES += mn-yahoo-mailbox-properties-private.h mn-yahoo-mailbox-properties.c mn-yahoo-mailbox-properties.h
+BUILT_SOURCES += mn-yahoo-mailbox-properties.gob.stamp
+MAINTAINERCLEANFILES += mn-yahoo-mailbox-properties.gob.stamp
+MAINTAINERCLEANFILES += mn-yahoo-mailbox-properties-private.h mn-yahoo-mailbox-properties.c mn-yahoo-mailbox-properties.h
+endif
+if WITH_HOTMAIL
+mail_notification_SOURCES += mn-hotmail-mailbox.gob mn-hotmail-mailbox.gob.stamp
+mail_notification_SOURCES += mn-hotmail-mailbox-private.h mn-hotmail-mailbox.c mn-hotmail-mailbox.h
+BUILT_SOURCES += mn-hotmail-mailbox.gob.stamp
+MAINTAINERCLEANFILES += mn-hotmail-mailbox.gob.stamp
+MAINTAINERCLEANFILES += mn-hotmail-mailbox-private.h mn-hotmail-mailbox.c mn-hotmail-mailbox.h
+mail_notification_SOURCES += mn-hotmail-mailbox-properties.gob mn-hotmail-mailbox-properties.gob.stamp
+mail_notification_SOURCES += mn-hotmail-mailbox-properties-private.h mn-hotmail-mailbox-properties.c mn-hotmail-mailbox-properties.h
+BUILT_SOURCES += mn-hotmail-mailbox-properties.gob.stamp
+MAINTAINERCLEANFILES += mn-hotmail-mailbox-properties.gob.stamp
+MAINTAINERCLEANFILES += mn-hotmail-mailbox-properties-private.h mn-hotmail-mailbox-properties.c mn-hotmail-mailbox-properties.h
+endif
+if WITH_YAHOO_OR_HOTMAIL
+mail_notification_SOURCES += mn-webmail-mailbox.gob mn-webmail-mailbox.gob.stamp
+mail_notification_SOURCES += mn-webmail-mailbox-private.h mn-webmail-mailbox.c mn-webmail-mailbox.h
+BUILT_SOURCES += mn-webmail-mailbox.gob.stamp
+MAINTAINERCLEANFILES += mn-webmail-mailbox.gob.stamp
+MAINTAINERCLEANFILES += mn-webmail-mailbox-private.h mn-webmail-mailbox.c mn-webmail-mailbox.h
+mail_notification_SOURCES += mn-webmail-mailbox-properties.gob mn-webmail-mailbox-properties.gob.stamp
+mail_notification_SOURCES += mn-webmail-mailbox-properties-private.h mn-webmail-mailbox-properties.c mn-webmail-mailbox-properties.h
+BUILT_SOURCES += mn-webmail-mailbox-properties.gob.stamp
+MAINTAINERCLEANFILES += mn-webmail-mailbox-properties.gob.stamp
+MAINTAINERCLEANFILES += mn-webmail-mailbox-properties-private.h mn-webmail-mailbox-properties.c mn-webmail-mailbox-properties.h
+endif
if WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED
mail_notification_SOURCES += mn-custom-vfs-mailbox.gob mn-custom-vfs-mailbox.gob.stamp
mail_notification_SOURCES += mn-custom-vfs-mailbox-private.h mn-custom-vfs-mailbox.c mn-custom-vfs-mailbox.h
@@ -283,11 +355,6 @@ mail_notification_SOURCES += mn-vfs-mailbox-backend-private.h mn-vfs-mailbox-bac
BUILT_SOURCES += mn-vfs-mailbox-backend.gob.stamp
MAINTAINERCLEANFILES += mn-vfs-mailbox-backend.gob.stamp
MAINTAINERCLEANFILES += mn-vfs-mailbox-backend-private.h mn-vfs-mailbox-backend.c mn-vfs-mailbox-backend.h
-mail_notification_SOURCES += mn-vfs-message.gob mn-vfs-message.gob.stamp
-mail_notification_SOURCES += mn-vfs-message-private.h mn-vfs-message.c mn-vfs-message.h
-BUILT_SOURCES += mn-vfs-message.gob.stamp
-MAINTAINERCLEANFILES += mn-vfs-message.gob.stamp
-MAINTAINERCLEANFILES += mn-vfs-message-private.h mn-vfs-message.c mn-vfs-message.h
endif
if WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION
mail_notification_SOURCES += mn-reentrant-mailbox.gob mn-reentrant-mailbox.gob.stamp
diff --git a/src/Makefile.in b/src/Makefile.in
@@ -82,13 +82,22 @@ bin_PROGRAMS = mail-notification$(EXEEXT)
@WITH_MAILDIR_TRUE@ mn-maildir-mailbox-backend.gob.stamp \
@WITH_MAILDIR_TRUE@ mn-maildir-mailbox-backend-private.h \
@WITH_MAILDIR_TRUE@ mn-maildir-mailbox-backend.c \
-@WITH_MAILDIR_TRUE@ mn-maildir-mailbox-backend.h
-@WITH_MAILDIR_TRUE@am__append_14 = mn-maildir-mailbox-backend.gob.stamp
+@WITH_MAILDIR_TRUE@ mn-maildir-mailbox-backend.h \
+@WITH_MAILDIR_TRUE@ mn-maildir-message.gob \
+@WITH_MAILDIR_TRUE@ mn-maildir-message.gob.stamp \
+@WITH_MAILDIR_TRUE@ mn-maildir-message-private.h \
+@WITH_MAILDIR_TRUE@ mn-maildir-message.c mn-maildir-message.h
+@WITH_MAILDIR_TRUE@am__append_14 = \
+@WITH_MAILDIR_TRUE@ mn-maildir-mailbox-backend.gob.stamp \
+@WITH_MAILDIR_TRUE@ mn-maildir-message.gob.stamp
@WITH_MAILDIR_TRUE@am__append_15 = \
@WITH_MAILDIR_TRUE@ mn-maildir-mailbox-backend.gob.stamp \
@WITH_MAILDIR_TRUE@ mn-maildir-mailbox-backend-private.h \
@WITH_MAILDIR_TRUE@ mn-maildir-mailbox-backend.c \
-@WITH_MAILDIR_TRUE@ mn-maildir-mailbox-backend.h
+@WITH_MAILDIR_TRUE@ mn-maildir-mailbox-backend.h \
+@WITH_MAILDIR_TRUE@ mn-maildir-message.gob.stamp \
+@WITH_MAILDIR_TRUE@ mn-maildir-message-private.h \
+@WITH_MAILDIR_TRUE@ mn-maildir-message.c mn-maildir-message.h
@WITH_POP3_TRUE@am__append_16 = mn-md5.c mn-md5.h mn-pop3-mailbox.gob \
@WITH_POP3_TRUE@ mn-pop3-mailbox.gob.stamp \
@WITH_POP3_TRUE@ mn-pop3-mailbox-private.h mn-pop3-mailbox.c \
@@ -154,39 +163,64 @@ bin_PROGRAMS = mail-notification$(EXEEXT)
@WITH_POP3_OR_IMAP_TRUE@ mn-pi-mailbox-properties-private.h \
@WITH_POP3_OR_IMAP_TRUE@ mn-pi-mailbox-properties.c \
@WITH_POP3_OR_IMAP_TRUE@ mn-pi-mailbox-properties.h
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@am__append_25 = \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox.gob \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox.gob.stamp \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-private.h \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox.c \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox.h \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-properties.gob \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-properties.gob.stamp \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-properties-private.h \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-properties.c \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-properties.h
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@am__append_26 = mn-authenticated-mailbox.gob.stamp \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-properties.gob.stamp
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@am__append_27 = mn-authenticated-mailbox.gob.stamp \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-private.h \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox.c \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox.h \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-properties.gob.stamp \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-properties-private.h \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-properties.c \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mn-authenticated-mailbox-properties.h
-@WITH_SYLPHEED_TRUE@am__append_28 = mn-sylpheed-mailbox-backend.gob \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@am__append_25 = $(GNOME_KEYRING_CFLAGS)
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@am__append_26 = $(GNOME_KEYRING_LIBS)
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@am__append_27 = mn-keyring.c \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-keyring.h \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox.gob \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox.gob.stamp \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-private.h \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox.c \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox.h \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-properties.gob \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-properties.gob.stamp \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-properties-private.h \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-properties.c \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-properties.h
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@am__append_28 = mn-authenticated-mailbox.gob.stamp \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-properties.gob.stamp
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@am__append_29 = mn-authenticated-mailbox.gob.stamp \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-private.h \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox.c \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox.h \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-properties.gob.stamp \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-properties-private.h \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-properties.c \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mn-authenticated-mailbox-properties.h
+@WITH_SYLPHEED_TRUE@am__append_30 = mn-sylpheed-mailbox-backend.gob \
@WITH_SYLPHEED_TRUE@ mn-sylpheed-mailbox-backend.gob.stamp \
@WITH_SYLPHEED_TRUE@ mn-sylpheed-mailbox-backend-private.h \
@WITH_SYLPHEED_TRUE@ mn-sylpheed-mailbox-backend.c \
-@WITH_SYLPHEED_TRUE@ mn-sylpheed-mailbox-backend.h
-@WITH_SYLPHEED_TRUE@am__append_29 = mn-sylpheed-mailbox-backend.gob.stamp
-@WITH_SYLPHEED_TRUE@am__append_30 = \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-mailbox-backend.h \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-message.gob \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-message.gob.stamp \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-message-private.h \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-message.c \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-message.h
+@WITH_SYLPHEED_TRUE@am__append_31 = \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-mailbox-backend.gob.stamp \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-message.gob.stamp
+@WITH_SYLPHEED_TRUE@am__append_32 = \
@WITH_SYLPHEED_TRUE@ mn-sylpheed-mailbox-backend.gob.stamp \
@WITH_SYLPHEED_TRUE@ mn-sylpheed-mailbox-backend-private.h \
@WITH_SYLPHEED_TRUE@ mn-sylpheed-mailbox-backend.c \
-@WITH_SYLPHEED_TRUE@ mn-sylpheed-mailbox-backend.h
-@WITH_GMAIL_TRUE@am__append_31 = mn-gmail-mailbox.gob \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-mailbox-backend.h \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-message.gob.stamp \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-message-private.h \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-message.c \
+@WITH_SYLPHEED_TRUE@ mn-sylpheed-message.h
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@am__append_33 = mn-vfs-message.gob \
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.gob.stamp \
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message-private.h \
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.c \
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.h
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@am__append_34 = mn-vfs-message.gob.stamp
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@am__append_35 = \
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.gob.stamp \
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message-private.h \
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.c \
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.h
+@WITH_GMAIL_TRUE@am__append_36 = mn-gmail-mailbox.gob \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox.gob.stamp \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox-private.h mn-gmail-mailbox.c \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox.h \
@@ -195,16 +229,74 @@ bin_PROGRAMS = mail-notification$(EXEEXT)
@WITH_GMAIL_TRUE@ mn-gmail-mailbox-properties-private.h \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox-properties.c \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox-properties.h
-@WITH_GMAIL_TRUE@am__append_32 = mn-gmail-mailbox.gob.stamp \
+@WITH_GMAIL_TRUE@am__append_37 = mn-gmail-mailbox.gob.stamp \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox-properties.gob.stamp
-@WITH_GMAIL_TRUE@am__append_33 = mn-gmail-mailbox.gob.stamp \
+@WITH_GMAIL_TRUE@am__append_38 = mn-gmail-mailbox.gob.stamp \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox-private.h mn-gmail-mailbox.c \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox.h \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox-properties.gob.stamp \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox-properties-private.h \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox-properties.c \
@WITH_GMAIL_TRUE@ mn-gmail-mailbox-properties.h
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@am__append_34 = mn-custom-vfs-mailbox.gob \
+@WITH_YAHOO_TRUE@am__append_39 = mn-yahoo-mailbox.gob \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox.gob.stamp \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-private.h mn-yahoo-mailbox.c \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox.h \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-properties.gob \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-properties.gob.stamp \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-properties-private.h \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-properties.c \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-properties.h
+@WITH_YAHOO_TRUE@am__append_40 = mn-yahoo-mailbox.gob.stamp \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-properties.gob.stamp
+@WITH_YAHOO_TRUE@am__append_41 = mn-yahoo-mailbox.gob.stamp \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-private.h mn-yahoo-mailbox.c \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox.h \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-properties.gob.stamp \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-properties-private.h \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-properties.c \
+@WITH_YAHOO_TRUE@ mn-yahoo-mailbox-properties.h
+@WITH_HOTMAIL_TRUE@am__append_42 = mn-hotmail-mailbox.gob \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox.gob.stamp \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-private.h \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox.c mn-hotmail-mailbox.h \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-properties.gob \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-properties.gob.stamp \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-properties-private.h \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-properties.c \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-properties.h
+@WITH_HOTMAIL_TRUE@am__append_43 = mn-hotmail-mailbox.gob.stamp \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-properties.gob.stamp
+@WITH_HOTMAIL_TRUE@am__append_44 = mn-hotmail-mailbox.gob.stamp \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-private.h \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox.c mn-hotmail-mailbox.h \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-properties.gob.stamp \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-properties-private.h \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-properties.c \
+@WITH_HOTMAIL_TRUE@ mn-hotmail-mailbox-properties.h
+@WITH_YAHOO_OR_HOTMAIL_TRUE@am__append_45 = mn-webmail-mailbox.gob \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox.gob.stamp \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-private.h \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox.c \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox.h \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-properties.gob \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-properties.gob.stamp \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-properties-private.h \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-properties.c \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-properties.h
+@WITH_YAHOO_OR_HOTMAIL_TRUE@am__append_46 = \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox.gob.stamp \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-properties.gob.stamp
+@WITH_YAHOO_OR_HOTMAIL_TRUE@am__append_47 = \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox.gob.stamp \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-private.h \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox.c \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox.h \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-properties.gob.stamp \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-properties-private.h \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-properties.c \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mn-webmail-mailbox-properties.h
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@am__append_48 = mn-custom-vfs-mailbox.gob \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-custom-vfs-mailbox.gob.stamp \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-custom-vfs-mailbox-private.h \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-custom-vfs-mailbox.c \
@@ -228,19 +320,13 @@ bin_PROGRAMS = mail-notification$(EXEEXT)
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend.gob.stamp \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend-private.h \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend.c \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend.h \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.gob \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.gob.stamp \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message-private.h \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.c \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.h
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@am__append_35 = mn-custom-vfs-mailbox.gob.stamp \
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend.h
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@am__append_49 = mn-custom-vfs-mailbox.gob.stamp \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-system-vfs-mailbox.gob.stamp \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-system-vfs-mailbox-properties.gob.stamp \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox.gob.stamp \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend.gob.stamp \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.gob.stamp
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@am__append_36 = mn-custom-vfs-mailbox.gob.stamp \
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend.gob.stamp
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@am__append_50 = mn-custom-vfs-mailbox.gob.stamp \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-custom-vfs-mailbox-private.h \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-custom-vfs-mailbox.c \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-custom-vfs-mailbox.h \
@@ -259,40 +345,36 @@ bin_PROGRAMS = mail-notification$(EXEEXT)
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend.gob.stamp \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend-private.h \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend.c \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend.h \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.gob.stamp \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message-private.h \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.c \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-message.h
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@am__append_37 = mn-reentrant-mailbox.gob \
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mn-vfs-mailbox-backend.h
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@am__append_51 = mn-reentrant-mailbox.gob \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@ mn-reentrant-mailbox.gob.stamp \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@ mn-reentrant-mailbox-private.h \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@ mn-reentrant-mailbox.c \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@ mn-reentrant-mailbox.h
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@am__append_38 = mn-reentrant-mailbox.gob.stamp
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@am__append_39 = mn-reentrant-mailbox.gob.stamp \
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@am__append_52 = mn-reentrant-mailbox.gob.stamp
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@am__append_53 = mn-reentrant-mailbox.gob.stamp \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@ mn-reentrant-mailbox-private.h \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@ mn-reentrant-mailbox.c \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@ mn-reentrant-mailbox.h
-@WITH_MIME_TRUE@am__append_40 = $(GMIME_CFLAGS)
-@WITH_MIME_TRUE@am__append_41 = $(GMIME_LIBS)
-@WITH_MIME_TRUE@am__append_42 = mn-message-mime.c mn-message-mime.h \
+@WITH_MIME_TRUE@am__append_54 = $(GMIME_CFLAGS)
+@WITH_MIME_TRUE@am__append_55 = $(GMIME_LIBS)
+@WITH_MIME_TRUE@am__append_56 = mn-message-mime.c mn-message-mime.h \
@WITH_MIME_TRUE@ mn-gmime-stream-vfs.gob \
@WITH_MIME_TRUE@ mn-gmime-stream-vfs.gob.stamp \
@WITH_MIME_TRUE@ mn-gmime-stream-vfs-private.h \
@WITH_MIME_TRUE@ mn-gmime-stream-vfs.c mn-gmime-stream-vfs.h
-@WITH_MIME_TRUE@am__append_43 = mn-gmime-stream-vfs.gob.stamp
-@WITH_MIME_TRUE@am__append_44 = mn-gmime-stream-vfs.gob.stamp \
+@WITH_MIME_TRUE@am__append_57 = mn-gmime-stream-vfs.gob.stamp
+@WITH_MIME_TRUE@am__append_58 = mn-gmime-stream-vfs.gob.stamp \
@WITH_MIME_TRUE@ mn-gmime-stream-vfs-private.h \
@WITH_MIME_TRUE@ mn-gmime-stream-vfs.c mn-gmime-stream-vfs.h
-@WITH_SSL_TRUE@am__append_45 = $(OPENSSL_CFLAGS)
-@WITH_SSL_TRUE@am__append_46 = $(OPENSSL_LIBS)
-@WITH_SSL_TRUE@am__append_47 = mn-ssl.c mn-ssl.h
-@WITH_SASL_TRUE@am__append_48 = $(SASL_CFLAGS)
-@WITH_SASL_TRUE@am__append_49 = $(SASL_LIBS)
-@WITH_SASL_TRUE@am__append_50 = mn-sasl.c mn-sasl.h
-@WITH_EVOLUTION_TRUE@am__append_51 = $(EVOLUTION_PLUGIN_CFLAGS)
-@WITH_EVOLUTION_TRUE@am__append_52 = mn-evolution.h \
+@WITH_SSL_TRUE@am__append_59 = $(OPENSSL_CFLAGS)
+@WITH_SSL_TRUE@am__append_60 = $(OPENSSL_LIBS)
+@WITH_SSL_TRUE@am__append_61 = mn-ssl.c mn-ssl.h
+@WITH_SASL_TRUE@am__append_62 = $(SASL_CFLAGS)
+@WITH_SASL_TRUE@am__append_63 = $(SASL_LIBS)
+@WITH_SASL_TRUE@am__append_64 = mn-sasl.c mn-sasl.h
+@WITH_EVOLUTION_TRUE@am__append_65 = $(EVOLUTION_PLUGIN_CFLAGS)
+@WITH_EVOLUTION_TRUE@am__append_66 = mn-evolution.h \
@WITH_EVOLUTION_TRUE@ mn-evolution-glue-client.c \
@WITH_EVOLUTION_TRUE@ mn-evolution-glue-client.h \
@WITH_EVOLUTION_TRUE@ mn-bonobo-unknown.gob \
@@ -315,7 +397,7 @@ bin_PROGRAMS = mail-notification$(EXEEXT)
@WITH_EVOLUTION_TRUE@ mn-evolution-message.c \
@WITH_EVOLUTION_TRUE@ mn-evolution-message.h \
@WITH_EVOLUTION_TRUE@ GNOME_MailNotification_Evolution.idl
-@WITH_EVOLUTION_TRUE@am__append_53 = mn-bonobo-unknown.gob.stamp \
+@WITH_EVOLUTION_TRUE@am__append_67 = mn-bonobo-unknown.gob.stamp \
@WITH_EVOLUTION_TRUE@ mn-evolution-mailbox.gob.stamp \
@WITH_EVOLUTION_TRUE@ mn-evolution-mailbox-properties.gob.stamp \
@WITH_EVOLUTION_TRUE@ mn-evolution-message.gob.stamp \
@@ -329,7 +411,7 @@ bin_PROGRAMS = mail-notification$(EXEEXT)
@WITH_EVOLUTION_TRUE@ GNOME_MailNotification_Evolution-skels.c \
@WITH_EVOLUTION_TRUE@ GNOME_MailNotification_Evolution-stubs.c \
@WITH_EVOLUTION_TRUE@ GNOME_MailNotification_Evolution.h
-@WITH_EVOLUTION_TRUE@am__append_54 = mn-bonobo-unknown.gob.stamp \
+@WITH_EVOLUTION_TRUE@am__append_68 = mn-bonobo-unknown.gob.stamp \
@WITH_EVOLUTION_TRUE@ mn-bonobo-unknown-private.h \
@WITH_EVOLUTION_TRUE@ mn-bonobo-unknown.c mn-bonobo-unknown.h \
@WITH_EVOLUTION_TRUE@ mn-evolution-mailbox.gob.stamp \
@@ -351,8 +433,8 @@ bin_PROGRAMS = mail-notification$(EXEEXT)
@WITH_EVOLUTION_TRUE@ mn-evolution-glue.gob.stamp \
@WITH_EVOLUTION_TRUE@ mn-evolution-glue-private.h \
@WITH_EVOLUTION_TRUE@ mn-evolution-glue.c mn-evolution-glue.h
-@WITH_EVOLUTION_TRUE@am__append_55 = GNOME_MailNotification_Evolution-common.c GNOME_MailNotification_Evolution-skels.c GNOME_MailNotification_Evolution-stubs.c GNOME_MailNotification_Evolution.h
-@WITH_EVOLUTION_TRUE@am__append_56 = GNOME_MailNotification_Evolution-common.c \
+@WITH_EVOLUTION_TRUE@am__append_69 = GNOME_MailNotification_Evolution-common.c GNOME_MailNotification_Evolution-skels.c GNOME_MailNotification_Evolution-stubs.c GNOME_MailNotification_Evolution.h
+@WITH_EVOLUTION_TRUE@am__append_70 = GNOME_MailNotification_Evolution-common.c \
@WITH_EVOLUTION_TRUE@ GNOME_MailNotification_Evolution-skels.c \
@WITH_EVOLUTION_TRUE@ GNOME_MailNotification_Evolution-stubs.c \
@WITH_EVOLUTION_TRUE@ GNOME_MailNotification_Evolution.h \
@@ -366,8 +448,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/evolution-plugin.m4 \
$(top_srcdir)/m4/gnome.m4 $(top_srcdir)/m4/idl.m4 \
$(top_srcdir)/m4/openssl.m4 \
$(top_srcdir)/m4/reentrant-resolver.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sasl2.m4 \
+ $(top_srcdir)/m4/string-arch-unaligned.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -426,17 +509,21 @@ am__mail_notification_SOURCES_DIST = mn-main.c eggtrayicon.c \
mn-autodetect-mailbox-properties.c \
mn-autodetect-mailbox-properties.h mn-automation.gob \
mn-automation.gob.stamp mn-automation-private.h \
- mn-automation.c mn-automation.h mn-blinking-image.gob \
- mn-blinking-image.gob.stamp mn-blinking-image-private.h \
- mn-blinking-image.c mn-blinking-image.h \
- mn-compact-message-view.gob mn-compact-message-view.gob.stamp \
+ mn-automation.c mn-automation.h mn-compact-message-view.gob \
+ mn-compact-message-view.gob.stamp \
mn-compact-message-view-private.h mn-compact-message-view.c \
mn-compact-message-view.h mn-dialog.gob mn-dialog.gob.stamp \
- mn-dialog-private.h mn-dialog.c mn-dialog.h mn-mail-icon.gob \
+ mn-dialog-private.h mn-dialog.c mn-dialog.h \
+ mn-file-chooser-button.gob mn-file-chooser-button.gob.stamp \
+ mn-file-chooser-button-private.h mn-file-chooser-button.c \
+ mn-file-chooser-button.h mn-mail-icon.gob \
mn-mail-icon.gob.stamp mn-mail-icon-private.h mn-mail-icon.c \
- mn-mail-icon.h mn-mailbox.gob mn-mailbox.gob.stamp \
- mn-mailbox-private.h mn-mailbox.c mn-mailbox.h \
- mn-mailbox-properties.gob mn-mailbox-properties.gob.stamp \
+ mn-mail-icon.h mn-mail-icon-widget.gob \
+ mn-mail-icon-widget.gob.stamp mn-mail-icon-widget-private.h \
+ mn-mail-icon-widget.c mn-mail-icon-widget.h mn-mailbox.gob \
+ mn-mailbox.gob.stamp mn-mailbox-private.h mn-mailbox.c \
+ mn-mailbox.h mn-mailbox-properties.gob \
+ mn-mailbox-properties.gob.stamp \
mn-mailbox-properties-private.h mn-mailbox-properties.c \
mn-mailbox-properties.h mn-mailbox-properties-dialog.gob \
mn-mailbox-properties-dialog.gob.stamp \
@@ -456,6 +543,12 @@ am__mail_notification_SOURCES_DIST = mn-main.c eggtrayicon.c \
mn-properties-dialog-private.h mn-properties-dialog.c \
mn-properties-dialog.h mn-shell.gob mn-shell.gob.stamp \
mn-shell-private.h mn-shell.c mn-shell.h \
+ mn-sound-file-chooser-dialog.gob \
+ mn-sound-file-chooser-dialog.gob.stamp \
+ mn-sound-file-chooser-dialog-private.h \
+ mn-sound-file-chooser-dialog.c mn-sound-file-chooser-dialog.h \
+ mn-sound-player.gob mn-sound-player.gob.stamp \
+ mn-sound-player-private.h mn-sound-player.c mn-sound-player.h \
mn-standard-message-view.gob \
mn-standard-message-view.gob.stamp \
mn-standard-message-view-private.h mn-standard-message-view.c \
@@ -482,7 +575,9 @@ am__mail_notification_SOURCES_DIST = mn-main.c eggtrayicon.c \
mn-maildir-mailbox-backend.gob.stamp \
mn-maildir-mailbox-backend-private.h \
mn-maildir-mailbox-backend.c mn-maildir-mailbox-backend.h \
- mn-md5.c mn-md5.h mn-pop3-mailbox.gob \
+ mn-maildir-message.gob mn-maildir-message.gob.stamp \
+ mn-maildir-message-private.h mn-maildir-message.c \
+ mn-maildir-message.h mn-md5.c mn-md5.h mn-pop3-mailbox.gob \
mn-pop3-mailbox.gob.stamp mn-pop3-mailbox-private.h \
mn-pop3-mailbox.c mn-pop3-mailbox.h \
mn-pop3-mailbox-properties.gob \
@@ -502,7 +597,8 @@ am__mail_notification_SOURCES_DIST = mn-main.c eggtrayicon.c \
mn-pi-mailbox.c mn-pi-mailbox.h mn-pi-mailbox-properties.gob \
mn-pi-mailbox-properties.gob.stamp \
mn-pi-mailbox-properties-private.h mn-pi-mailbox-properties.c \
- mn-pi-mailbox-properties.h mn-authenticated-mailbox.gob \
+ mn-pi-mailbox-properties.h mn-keyring.c mn-keyring.h \
+ mn-authenticated-mailbox.gob \
mn-authenticated-mailbox.gob.stamp \
mn-authenticated-mailbox-private.h mn-authenticated-mailbox.c \
mn-authenticated-mailbox.h \
@@ -515,13 +611,38 @@ am__mail_notification_SOURCES_DIST = mn-main.c eggtrayicon.c \
mn-sylpheed-mailbox-backend.gob.stamp \
mn-sylpheed-mailbox-backend-private.h \
mn-sylpheed-mailbox-backend.c mn-sylpheed-mailbox-backend.h \
- mn-gmail-mailbox.gob mn-gmail-mailbox.gob.stamp \
- mn-gmail-mailbox-private.h mn-gmail-mailbox.c \
- mn-gmail-mailbox.h mn-gmail-mailbox-properties.gob \
+ mn-sylpheed-message.gob mn-sylpheed-message.gob.stamp \
+ mn-sylpheed-message-private.h mn-sylpheed-message.c \
+ mn-sylpheed-message.h mn-vfs-message.gob \
+ mn-vfs-message.gob.stamp mn-vfs-message-private.h \
+ mn-vfs-message.c mn-vfs-message.h mn-gmail-mailbox.gob \
+ mn-gmail-mailbox.gob.stamp mn-gmail-mailbox-private.h \
+ mn-gmail-mailbox.c mn-gmail-mailbox.h \
+ mn-gmail-mailbox-properties.gob \
mn-gmail-mailbox-properties.gob.stamp \
mn-gmail-mailbox-properties-private.h \
mn-gmail-mailbox-properties.c mn-gmail-mailbox-properties.h \
- mn-custom-vfs-mailbox.gob mn-custom-vfs-mailbox.gob.stamp \
+ mn-yahoo-mailbox.gob mn-yahoo-mailbox.gob.stamp \
+ mn-yahoo-mailbox-private.h mn-yahoo-mailbox.c \
+ mn-yahoo-mailbox.h mn-yahoo-mailbox-properties.gob \
+ mn-yahoo-mailbox-properties.gob.stamp \
+ mn-yahoo-mailbox-properties-private.h \
+ mn-yahoo-mailbox-properties.c mn-yahoo-mailbox-properties.h \
+ mn-hotmail-mailbox.gob mn-hotmail-mailbox.gob.stamp \
+ mn-hotmail-mailbox-private.h mn-hotmail-mailbox.c \
+ mn-hotmail-mailbox.h mn-hotmail-mailbox-properties.gob \
+ mn-hotmail-mailbox-properties.gob.stamp \
+ mn-hotmail-mailbox-properties-private.h \
+ mn-hotmail-mailbox-properties.c \
+ mn-hotmail-mailbox-properties.h mn-webmail-mailbox.gob \
+ mn-webmail-mailbox.gob.stamp mn-webmail-mailbox-private.h \
+ mn-webmail-mailbox.c mn-webmail-mailbox.h \
+ mn-webmail-mailbox-properties.gob \
+ mn-webmail-mailbox-properties.gob.stamp \
+ mn-webmail-mailbox-properties-private.h \
+ mn-webmail-mailbox-properties.c \
+ mn-webmail-mailbox-properties.h mn-custom-vfs-mailbox.gob \
+ mn-custom-vfs-mailbox.gob.stamp \
mn-custom-vfs-mailbox-private.h mn-custom-vfs-mailbox.c \
mn-custom-vfs-mailbox.h mn-system-vfs-mailbox.gob \
mn-system-vfs-mailbox.gob.stamp \
@@ -535,9 +656,7 @@ am__mail_notification_SOURCES_DIST = mn-main.c eggtrayicon.c \
mn-vfs-mailbox.c mn-vfs-mailbox.h mn-vfs-mailbox-backend.gob \
mn-vfs-mailbox-backend.gob.stamp \
mn-vfs-mailbox-backend-private.h mn-vfs-mailbox-backend.c \
- mn-vfs-mailbox-backend.h mn-vfs-message.gob \
- mn-vfs-message.gob.stamp mn-vfs-message-private.h \
- mn-vfs-message.c mn-vfs-message.h mn-reentrant-mailbox.gob \
+ mn-vfs-mailbox-backend.h mn-reentrant-mailbox.gob \
mn-reentrant-mailbox.gob.stamp mn-reentrant-mailbox-private.h \
mn-reentrant-mailbox.c mn-reentrant-mailbox.h \
mn-message-mime.c mn-message-mime.h mn-gmime-stream-vfs.gob \
@@ -561,7 +680,8 @@ am__mail_notification_SOURCES_DIST = mn-main.c eggtrayicon.c \
@WITH_MOZILLA_TRUE@am__objects_2 = mail_notification-mn-mozilla-mailbox-backend.$(OBJEXT)
@WITH_MBOX_OR_MOZILLA_TRUE@am__objects_3 = mail_notification-mn-base-mbox-mailbox-backend.$(OBJEXT)
@WITH_MH_TRUE@am__objects_4 = mail_notification-mn-mh-mailbox-backend.$(OBJEXT)
-@WITH_MAILDIR_TRUE@am__objects_5 = mail_notification-mn-maildir-mailbox-backend.$(OBJEXT)
+@WITH_MAILDIR_TRUE@am__objects_5 = mail_notification-mn-maildir-mailbox-backend.$(OBJEXT) \
+@WITH_MAILDIR_TRUE@ mail_notification-mn-maildir-message.$(OBJEXT)
@WITH_POP3_TRUE@am__objects_6 = mail_notification-mn-md5.$(OBJEXT) \
@WITH_POP3_TRUE@ mail_notification-mn-pop3-mailbox.$(OBJEXT) \
@WITH_POP3_TRUE@ mail_notification-mn-pop3-mailbox-properties.$(OBJEXT)
@@ -572,25 +692,34 @@ am__mail_notification_SOURCES_DIST = mn-main.c eggtrayicon.c \
@WITH_POP3_OR_IMAP_TRUE@ mail_notification-mn-auth-combo-box.$(OBJEXT) \
@WITH_POP3_OR_IMAP_TRUE@ mail_notification-mn-pi-mailbox.$(OBJEXT) \
@WITH_POP3_OR_IMAP_TRUE@ mail_notification-mn-pi-mailbox-properties.$(OBJEXT)
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@am__objects_9 = mail_notification-mn-authenticated-mailbox.$(OBJEXT) \
-@WITH_POP3_OR_IMAP_OR_GMAIL_TRUE@ mail_notification-mn-authenticated-mailbox-properties.$(OBJEXT)
-@WITH_SYLPHEED_TRUE@am__objects_10 = mail_notification-mn-sylpheed-mailbox-backend.$(OBJEXT)
-@WITH_GMAIL_TRUE@am__objects_11 = \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@am__objects_9 = mail_notification-mn-keyring.$(OBJEXT) \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mail_notification-mn-authenticated-mailbox.$(OBJEXT) \
+@WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL_TRUE@ mail_notification-mn-authenticated-mailbox-properties.$(OBJEXT)
+@WITH_SYLPHEED_TRUE@am__objects_10 = mail_notification-mn-sylpheed-mailbox-backend.$(OBJEXT) \
+@WITH_SYLPHEED_TRUE@ mail_notification-mn-sylpheed-message.$(OBJEXT)
+@WITH_MAILDIR_OR_SYLPHEED_TRUE@am__objects_11 = mail_notification-mn-vfs-message.$(OBJEXT)
+@WITH_GMAIL_TRUE@am__objects_12 = \
@WITH_GMAIL_TRUE@ mail_notification-mn-gmail-mailbox.$(OBJEXT) \
@WITH_GMAIL_TRUE@ mail_notification-mn-gmail-mailbox-properties.$(OBJEXT)
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@am__objects_12 = mail_notification-mn-custom-vfs-mailbox.$(OBJEXT) \
+@WITH_YAHOO_TRUE@am__objects_13 = \
+@WITH_YAHOO_TRUE@ mail_notification-mn-yahoo-mailbox.$(OBJEXT) \
+@WITH_YAHOO_TRUE@ mail_notification-mn-yahoo-mailbox-properties.$(OBJEXT)
+@WITH_HOTMAIL_TRUE@am__objects_14 = mail_notification-mn-hotmail-mailbox.$(OBJEXT) \
+@WITH_HOTMAIL_TRUE@ mail_notification-mn-hotmail-mailbox-properties.$(OBJEXT)
+@WITH_YAHOO_OR_HOTMAIL_TRUE@am__objects_15 = mail_notification-mn-webmail-mailbox.$(OBJEXT) \
+@WITH_YAHOO_OR_HOTMAIL_TRUE@ mail_notification-mn-webmail-mailbox-properties.$(OBJEXT)
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@am__objects_16 = mail_notification-mn-custom-vfs-mailbox.$(OBJEXT) \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mail_notification-mn-system-vfs-mailbox.$(OBJEXT) \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mail_notification-mn-system-vfs-mailbox-properties.$(OBJEXT) \
@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mail_notification-mn-vfs-mailbox.$(OBJEXT) \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mail_notification-mn-vfs-mailbox-backend.$(OBJEXT) \
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mail_notification-mn-vfs-message.$(OBJEXT)
-@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@am__objects_13 = mail_notification-mn-reentrant-mailbox.$(OBJEXT)
-@WITH_MIME_TRUE@am__objects_14 = \
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_TRUE@ mail_notification-mn-vfs-mailbox-backend.$(OBJEXT)
+@WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION_TRUE@am__objects_17 = mail_notification-mn-reentrant-mailbox.$(OBJEXT)
+@WITH_MIME_TRUE@am__objects_18 = \
@WITH_MIME_TRUE@ mail_notification-mn-message-mime.$(OBJEXT) \
@WITH_MIME_TRUE@ mail_notification-mn-gmime-stream-vfs.$(OBJEXT)
-@WITH_SSL_TRUE@am__objects_15 = mail_notification-mn-ssl.$(OBJEXT)
-@WITH_SASL_TRUE@am__objects_16 = mail_notification-mn-sasl.$(OBJEXT)
-@WITH_EVOLUTION_TRUE@am__objects_17 = mail_notification-mn-evolution-glue-client.$(OBJEXT) \
+@WITH_SSL_TRUE@am__objects_19 = mail_notification-mn-ssl.$(OBJEXT)
+@WITH_SASL_TRUE@am__objects_20 = mail_notification-mn-sasl.$(OBJEXT)
+@WITH_EVOLUTION_TRUE@am__objects_21 = mail_notification-mn-evolution-glue-client.$(OBJEXT) \
@WITH_EVOLUTION_TRUE@ mail_notification-mn-bonobo-unknown.$(OBJEXT) \
@WITH_EVOLUTION_TRUE@ mail_notification-mn-evolution-mailbox.$(OBJEXT) \
@WITH_EVOLUTION_TRUE@ mail_notification-mn-evolution-mailbox-properties.$(OBJEXT) \
@@ -607,10 +736,11 @@ am_mail_notification_OBJECTS = mail_notification-mn-main.$(OBJEXT) \
mail_notification-mn-about-dialog.$(OBJEXT) \
mail_notification-mn-autodetect-mailbox-properties.$(OBJEXT) \
mail_notification-mn-automation.$(OBJEXT) \
- mail_notification-mn-blinking-image.$(OBJEXT) \
mail_notification-mn-compact-message-view.$(OBJEXT) \
mail_notification-mn-dialog.$(OBJEXT) \
+ mail_notification-mn-file-chooser-button.$(OBJEXT) \
mail_notification-mn-mail-icon.$(OBJEXT) \
+ mail_notification-mn-mail-icon-widget.$(OBJEXT) \
mail_notification-mn-mailbox.$(OBJEXT) \
mail_notification-mn-mailbox-properties.$(OBJEXT) \
mail_notification-mn-mailbox-properties-dialog.$(OBJEXT) \
@@ -622,6 +752,8 @@ am_mail_notification_OBJECTS = mail_notification-mn-main.$(OBJEXT) \
mail_notification-mn-popups.$(OBJEXT) \
mail_notification-mn-properties-dialog.$(OBJEXT) \
mail_notification-mn-shell.$(OBJEXT) \
+ mail_notification-mn-sound-file-chooser-dialog.$(OBJEXT) \
+ mail_notification-mn-sound-player.$(OBJEXT) \
mail_notification-mn-standard-message-view.$(OBJEXT) \
mail_notification-mn-test-mailbox.$(OBJEXT) \
mail_notification-mn-text-table.$(OBJEXT) \
@@ -631,15 +763,16 @@ am_mail_notification_OBJECTS = mail_notification-mn-main.$(OBJEXT) \
$(am__objects_8) $(am__objects_9) $(am__objects_10) \
$(am__objects_11) $(am__objects_12) $(am__objects_13) \
$(am__objects_14) $(am__objects_15) $(am__objects_16) \
- $(am__objects_17)
-@WITH_EVOLUTION_TRUE@am__objects_18 = mail_notification-GNOME_MailNotification_Evolution-common.$(OBJEXT) \
+ $(am__objects_17) $(am__objects_18) $(am__objects_19) \
+ $(am__objects_20) $(am__objects_21)
+@WITH_EVOLUTION_TRUE@am__objects_22 = mail_notification-GNOME_MailNotification_Evolution-common.$(OBJEXT) \
@WITH_EVOLUTION_TRUE@ mail_notification-GNOME_MailNotification_Evolution-skels.$(OBJEXT) \
@WITH_EVOLUTION_TRUE@ mail_notification-GNOME_MailNotification_Evolution-stubs.$(OBJEXT)
nodist_mail_notification_OBJECTS = \
mail_notification-GNOME_MailNotification-common.$(OBJEXT) \
mail_notification-GNOME_MailNotification-skels.$(OBJEXT) \
mail_notification-GNOME_MailNotification-stubs.$(OBJEXT) \
- $(am__objects_18)
+ $(am__objects_22)
mail_notification_OBJECTS = $(am_mail_notification_OBJECTS) \
$(nodist_mail_notification_OBJECTS)
mail_notification_LDADD = $(LDADD)
@@ -715,11 +848,11 @@ GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_CFLAGS = @GNOME_CFLAGS@
+GNOME_KEYRING_CFLAGS = @GNOME_KEYRING_CFLAGS@
+GNOME_KEYRING_LIBS = @GNOME_KEYRING_LIBS@
GNOME_LIBS = @GNOME_LIBS@
GOB2 = @GOB2@
GREP = @GREP@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_LIBS = @GTK_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -731,14 +864,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_ICONV = @INTLTOOL_ICONV@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
-INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
@@ -750,7 +881,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
@@ -784,6 +914,7 @@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SASL_CFLAGS = @SASL_CFLAGS@
SASL_LIBS = @SASL_LIBS@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -853,13 +984,14 @@ GOBFLAGS = --always-private-header --no-touch --exit-on-warn
mail_notification_CPPFLAGS = $(WARN_CFLAGS) $(DEBUG_CFLAGS) \
-I$(top_srcdir) -DG_LOG_DOMAIN="\"$(PACKAGE)\"" \
-DPREFIX="\"$(prefix)\"" -DSYSCONFDIR="\"$(sysconfdir)\"" \
- -DDATADIR="\"$(datadir)\"" -DLIBDIR="\"$(libdir)\"" \
- -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
- -DUIDIR="\"$(pkgdatadir)/ui\"" $(GNOME_CFLAGS) \
- $(am__append_40) $(am__append_45) $(am__append_48) \
- $(am__append_51)
-mail_notification_LDFLAGS = -export-dynamic $(INTLLIBS) $(GNOME_LIBS) \
- $(am__append_41) $(am__append_46) $(am__append_49)
+ -DDATADIR="\"$(datadir)\"" -DPKGDATADIR="\"$(pkgdatadir)\"" \
+ -DLIBDIR="\"$(libdir)\"" \
+ -DGNOMELOCALEDIR="\"$(datadir)/locale\"" $(GNOME_CFLAGS) \
+ $(am__append_25) $(am__append_54) $(am__append_59) \
+ $(am__append_62) $(am__append_65)
+mail_notification_LDFLAGS = -export-dynamic -lm $(INTLLIBS) \
+ $(GNOME_LIBS) $(am__append_26) $(am__append_55) \
+ $(am__append_60) $(am__append_63)
mail_notification_SOURCES = mn-main.c eggtrayicon.c eggtrayicon.h \
mn-conf.c mn-conf.h mn-locked-callback.c mn-locked-callback.h \
mn-stock.c mn-stock.h mn-util.c mn-util.h mn-vfs.c mn-vfs.h \
@@ -873,17 +1005,21 @@ mail_notification_SOURCES = mn-main.c eggtrayicon.c eggtrayicon.h \
mn-autodetect-mailbox-properties.c \
mn-autodetect-mailbox-properties.h mn-automation.gob \
mn-automation.gob.stamp mn-automation-private.h \
- mn-automation.c mn-automation.h mn-blinking-image.gob \
- mn-blinking-image.gob.stamp mn-blinking-image-private.h \
- mn-blinking-image.c mn-blinking-image.h \
- mn-compact-message-view.gob mn-compact-message-view.gob.stamp \
+ mn-automation.c mn-automation.h mn-compact-message-view.gob \
+ mn-compact-message-view.gob.stamp \
mn-compact-message-view-private.h mn-compact-message-view.c \
mn-compact-message-view.h mn-dialog.gob mn-dialog.gob.stamp \
- mn-dialog-private.h mn-dialog.c mn-dialog.h mn-mail-icon.gob \
+ mn-dialog-private.h mn-dialog.c mn-dialog.h \
+ mn-file-chooser-button.gob mn-file-chooser-button.gob.stamp \
+ mn-file-chooser-button-private.h mn-file-chooser-button.c \
+ mn-file-chooser-button.h mn-mail-icon.gob \
mn-mail-icon.gob.stamp mn-mail-icon-private.h mn-mail-icon.c \
- mn-mail-icon.h mn-mailbox.gob mn-mailbox.gob.stamp \
- mn-mailbox-private.h mn-mailbox.c mn-mailbox.h \
- mn-mailbox-properties.gob mn-mailbox-properties.gob.stamp \
+ mn-mail-icon.h mn-mail-icon-widget.gob \
+ mn-mail-icon-widget.gob.stamp mn-mail-icon-widget-private.h \
+ mn-mail-icon-widget.c mn-mail-icon-widget.h mn-mailbox.gob \
+ mn-mailbox.gob.stamp mn-mailbox-private.h mn-mailbox.c \
+ mn-mailbox.h mn-mailbox-properties.gob \
+ mn-mailbox-properties.gob.stamp \
mn-mailbox-properties-private.h mn-mailbox-properties.c \
mn-mailbox-properties.h mn-mailbox-properties-dialog.gob \
mn-mailbox-properties-dialog.gob.stamp \
@@ -903,6 +1039,12 @@ mail_notification_SOURCES = mn-main.c eggtrayicon.c eggtrayicon.h \
mn-properties-dialog-private.h mn-properties-dialog.c \
mn-properties-dialog.h mn-shell.gob mn-shell.gob.stamp \
mn-shell-private.h mn-shell.c mn-shell.h \
+ mn-sound-file-chooser-dialog.gob \
+ mn-sound-file-chooser-dialog.gob.stamp \
+ mn-sound-file-chooser-dialog-private.h \
+ mn-sound-file-chooser-dialog.c mn-sound-file-chooser-dialog.h \
+ mn-sound-player.gob mn-sound-player.gob.stamp \
+ mn-sound-player-private.h mn-sound-player.c mn-sound-player.h \
mn-standard-message-view.gob \
mn-standard-message-view.gob.stamp \
mn-standard-message-view-private.h mn-standard-message-view.c \
@@ -915,30 +1057,34 @@ mail_notification_SOURCES = mn-main.c eggtrayicon.c eggtrayicon.h \
mn-tooltips.h GNOME_MailNotification.idl $(am__append_1) \
$(am__append_4) $(am__append_7) $(am__append_10) \
$(am__append_13) $(am__append_16) $(am__append_19) \
- $(am__append_22) $(am__append_25) $(am__append_28) \
- $(am__append_31) $(am__append_34) $(am__append_37) \
- $(am__append_42) $(am__append_47) $(am__append_50) \
- $(am__append_52)
+ $(am__append_22) $(am__append_27) $(am__append_30) \
+ $(am__append_33) $(am__append_36) $(am__append_39) \
+ $(am__append_42) $(am__append_45) $(am__append_48) \
+ $(am__append_51) $(am__append_56) $(am__append_61) \
+ $(am__append_64) $(am__append_66)
BUILT_SOURCES = mn-about-dialog.gob.stamp \
mn-autodetect-mailbox-properties.gob.stamp \
- mn-automation.gob.stamp mn-blinking-image.gob.stamp \
- mn-compact-message-view.gob.stamp mn-dialog.gob.stamp \
- mn-mail-icon.gob.stamp mn-mailbox.gob.stamp \
- mn-mailbox-properties.gob.stamp \
+ mn-automation.gob.stamp mn-compact-message-view.gob.stamp \
+ mn-dialog.gob.stamp mn-file-chooser-button.gob.stamp \
+ mn-mail-icon.gob.stamp mn-mail-icon-widget.gob.stamp \
+ mn-mailbox.gob.stamp mn-mailbox-properties.gob.stamp \
mn-mailbox-properties-dialog.gob.stamp \
mn-mailbox-view.gob.stamp mn-mailboxes.gob.stamp \
mn-message.gob.stamp mn-message-view.gob.stamp \
mn-popup.gob.stamp mn-popups.gob.stamp \
mn-properties-dialog.gob.stamp mn-shell.gob.stamp \
- mn-standard-message-view.gob.stamp mn-test-mailbox.gob.stamp \
- mn-text-table.gob.stamp mn-tooltips.gob.stamp \
- GNOME_MailNotification-common.c GNOME_MailNotification-skels.c \
- GNOME_MailNotification-stubs.c GNOME_MailNotification.h \
- $(am__append_2) $(am__append_5) $(am__append_8) \
- $(am__append_11) $(am__append_14) $(am__append_17) \
- $(am__append_20) $(am__append_23) $(am__append_26) \
- $(am__append_29) $(am__append_32) $(am__append_35) \
- $(am__append_38) $(am__append_43) $(am__append_53)
+ mn-sound-file-chooser-dialog.gob.stamp \
+ mn-sound-player.gob.stamp mn-standard-message-view.gob.stamp \
+ mn-test-mailbox.gob.stamp mn-text-table.gob.stamp \
+ mn-tooltips.gob.stamp GNOME_MailNotification-common.c \
+ GNOME_MailNotification-skels.c GNOME_MailNotification-stubs.c \
+ GNOME_MailNotification.h $(am__append_2) $(am__append_5) \
+ $(am__append_8) $(am__append_11) $(am__append_14) \
+ $(am__append_17) $(am__append_20) $(am__append_23) \
+ $(am__append_28) $(am__append_31) $(am__append_34) \
+ $(am__append_37) $(am__append_40) $(am__append_43) \
+ $(am__append_46) $(am__append_49) $(am__append_52) \
+ $(am__append_57) $(am__append_67)
MAINTAINERCLEANFILES = mn-about-dialog.gob.stamp \
mn-about-dialog-private.h mn-about-dialog.c mn-about-dialog.h \
mn-autodetect-mailbox-properties.gob.stamp \
@@ -946,15 +1092,18 @@ MAINTAINERCLEANFILES = mn-about-dialog.gob.stamp \
mn-autodetect-mailbox-properties.c \
mn-autodetect-mailbox-properties.h mn-automation.gob.stamp \
mn-automation-private.h mn-automation.c mn-automation.h \
- mn-blinking-image.gob.stamp mn-blinking-image-private.h \
- mn-blinking-image.c mn-blinking-image.h \
mn-compact-message-view.gob.stamp \
mn-compact-message-view-private.h mn-compact-message-view.c \
mn-compact-message-view.h mn-dialog.gob.stamp \
mn-dialog-private.h mn-dialog.c mn-dialog.h \
- mn-mail-icon.gob.stamp mn-mail-icon-private.h mn-mail-icon.c \
- mn-mail-icon.h mn-mailbox.gob.stamp mn-mailbox-private.h \
- mn-mailbox.c mn-mailbox.h mn-mailbox-properties.gob.stamp \
+ mn-file-chooser-button.gob.stamp \
+ mn-file-chooser-button-private.h mn-file-chooser-button.c \
+ mn-file-chooser-button.h mn-mail-icon.gob.stamp \
+ mn-mail-icon-private.h mn-mail-icon.c mn-mail-icon.h \
+ mn-mail-icon-widget.gob.stamp mn-mail-icon-widget-private.h \
+ mn-mail-icon-widget.c mn-mail-icon-widget.h \
+ mn-mailbox.gob.stamp mn-mailbox-private.h mn-mailbox.c \
+ mn-mailbox.h mn-mailbox-properties.gob.stamp \
mn-mailbox-properties-private.h mn-mailbox-properties.c \
mn-mailbox-properties.h mn-mailbox-properties-dialog.gob.stamp \
mn-mailbox-properties-dialog-private.h \
@@ -970,7 +1119,12 @@ MAINTAINERCLEANFILES = mn-about-dialog.gob.stamp \
mn-popups.h mn-properties-dialog.gob.stamp \
mn-properties-dialog-private.h mn-properties-dialog.c \
mn-properties-dialog.h mn-shell.gob.stamp mn-shell-private.h \
- mn-shell.c mn-shell.h mn-standard-message-view.gob.stamp \
+ mn-shell.c mn-shell.h mn-sound-file-chooser-dialog.gob.stamp \
+ mn-sound-file-chooser-dialog-private.h \
+ mn-sound-file-chooser-dialog.c mn-sound-file-chooser-dialog.h \
+ mn-sound-player.gob.stamp mn-sound-player-private.h \
+ mn-sound-player.c mn-sound-player.h \
+ mn-standard-message-view.gob.stamp \
mn-standard-message-view-private.h mn-standard-message-view.c \
mn-standard-message-view.h mn-test-mailbox.gob.stamp \
mn-test-mailbox-private.h mn-test-mailbox.c mn-test-mailbox.h \
@@ -979,15 +1133,17 @@ MAINTAINERCLEANFILES = mn-about-dialog.gob.stamp \
mn-tooltips-private.h mn-tooltips.c mn-tooltips.h \
$(am__append_3) $(am__append_6) $(am__append_9) \
$(am__append_12) $(am__append_15) $(am__append_18) \
- $(am__append_21) $(am__append_24) $(am__append_27) \
- $(am__append_30) $(am__append_33) $(am__append_36) \
- $(am__append_39) $(am__append_44) $(am__append_54)
+ $(am__append_21) $(am__append_24) $(am__append_29) \
+ $(am__append_32) $(am__append_35) $(am__append_38) \
+ $(am__append_41) $(am__append_44) $(am__append_47) \
+ $(am__append_50) $(am__append_53) $(am__append_58) \
+ $(am__append_68)
nodist_mail_notification_SOURCES = GNOME_MailNotification-common.c \
GNOME_MailNotification-skels.c GNOME_MailNotification-stubs.c \
- GNOME_MailNotification.h $(am__append_55)
+ GNOME_MailNotification.h $(am__append_69)
CLEANFILES = GNOME_MailNotification-common.c \
GNOME_MailNotification-skels.c GNOME_MailNotification-stubs.c \
- GNOME_MailNotification.h $(am__append_56) $(evolution_eplug)
+ GNOME_MailNotification.h $(am__append_70) $(evolution_eplug)
@WITH_EVOLUTION_TRUE@evolution_plugin_LTLIBRARIES = liborg-jylefort-mail-notification.la
@WITH_EVOLUTION_TRUE@liborg_jylefort_mail_notification_la_CPPFLAGS = \
@WITH_EVOLUTION_TRUE@ $(WARN_CFLAGS) $(DEBUG_CFLAGS) \
@@ -1135,7 +1291,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-autodetect-mailbox-properties.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-automation.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-base-mbox-mailbox-backend.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-blinking-image.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-bonobo-unknown.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-client-session.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-compact-message-view.Po@am__quote@
@@ -1146,12 +1301,17 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-evolution-mailbox-properties.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-evolution-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-evolution-message.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-file-chooser-button.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-gmail-mailbox-properties.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-gmail-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-gmime-stream-vfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-hotmail-mailbox-properties.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-hotmail-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-imap-mailbox-properties.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-imap-mailbox.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-keyring.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-locked-callback.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-mail-icon-widget.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-mail-icon.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-mailbox-properties-dialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-mailbox-properties.Po@am__quote@
@@ -1159,6 +1319,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-mailboxes.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-maildir-mailbox-backend.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-maildir-message.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-mbox-mailbox-backend.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-md5.Po@am__quote@
@@ -1177,10 +1338,13 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-reentrant-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-sasl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-shell.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-sound-file-chooser-dialog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-sound-player.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-ssl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-standard-message-view.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-stock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-sylpheed-mailbox-backend.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-sylpheed-message.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-system-vfs-mailbox-properties.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-system-vfs-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-test-mailbox.Po@am__quote@
@@ -1191,7 +1355,11 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-vfs-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-vfs-message.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-vfs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-webmail-mailbox-properties.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-webmail-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-xml.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-yahoo-mailbox-properties.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-mn-yahoo-mailbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_notification-nautilus-cell-renderer-pixbuf-emblem.Po@am__quote@
.c.o:
@@ -1425,20 +1593,6 @@ mail_notification-mn-automation.obj: mn-automation.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-automation.obj `if test -f 'mn-automation.c'; then $(CYGPATH_W) 'mn-automation.c'; else $(CYGPATH_W) '$(srcdir)/mn-automation.c'; fi`
-mail_notification-mn-blinking-image.o: mn-blinking-image.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-blinking-image.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-blinking-image.Tpo -c -o mail_notification-mn-blinking-image.o `test -f 'mn-blinking-image.c' || echo '$(srcdir)/'`mn-blinking-image.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-blinking-image.Tpo $(DEPDIR)/mail_notification-mn-blinking-image.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-blinking-image.c' object='mail_notification-mn-blinking-image.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-blinking-image.o `test -f 'mn-blinking-image.c' || echo '$(srcdir)/'`mn-blinking-image.c
-
-mail_notification-mn-blinking-image.obj: mn-blinking-image.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-blinking-image.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-blinking-image.Tpo -c -o mail_notification-mn-blinking-image.obj `if test -f 'mn-blinking-image.c'; then $(CYGPATH_W) 'mn-blinking-image.c'; else $(CYGPATH_W) '$(srcdir)/mn-blinking-image.c'; fi`
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-blinking-image.Tpo $(DEPDIR)/mail_notification-mn-blinking-image.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-blinking-image.c' object='mail_notification-mn-blinking-image.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-blinking-image.obj `if test -f 'mn-blinking-image.c'; then $(CYGPATH_W) 'mn-blinking-image.c'; else $(CYGPATH_W) '$(srcdir)/mn-blinking-image.c'; fi`
-
mail_notification-mn-compact-message-view.o: mn-compact-message-view.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-compact-message-view.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-compact-message-view.Tpo -c -o mail_notification-mn-compact-message-view.o `test -f 'mn-compact-message-view.c' || echo '$(srcdir)/'`mn-compact-message-view.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-compact-message-view.Tpo $(DEPDIR)/mail_notification-mn-compact-message-view.Po
@@ -1467,6 +1621,20 @@ mail_notification-mn-dialog.obj: mn-dialog.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-dialog.obj `if test -f 'mn-dialog.c'; then $(CYGPATH_W) 'mn-dialog.c'; else $(CYGPATH_W) '$(srcdir)/mn-dialog.c'; fi`
+mail_notification-mn-file-chooser-button.o: mn-file-chooser-button.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-file-chooser-button.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-file-chooser-button.Tpo -c -o mail_notification-mn-file-chooser-button.o `test -f 'mn-file-chooser-button.c' || echo '$(srcdir)/'`mn-file-chooser-button.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-file-chooser-button.Tpo $(DEPDIR)/mail_notification-mn-file-chooser-button.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-file-chooser-button.c' object='mail_notification-mn-file-chooser-button.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-file-chooser-button.o `test -f 'mn-file-chooser-button.c' || echo '$(srcdir)/'`mn-file-chooser-button.c
+
+mail_notification-mn-file-chooser-button.obj: mn-file-chooser-button.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-file-chooser-button.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-file-chooser-button.Tpo -c -o mail_notification-mn-file-chooser-button.obj `if test -f 'mn-file-chooser-button.c'; then $(CYGPATH_W) 'mn-file-chooser-button.c'; else $(CYGPATH_W) '$(srcdir)/mn-file-chooser-button.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-file-chooser-button.Tpo $(DEPDIR)/mail_notification-mn-file-chooser-button.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-file-chooser-button.c' object='mail_notification-mn-file-chooser-button.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-file-chooser-button.obj `if test -f 'mn-file-chooser-button.c'; then $(CYGPATH_W) 'mn-file-chooser-button.c'; else $(CYGPATH_W) '$(srcdir)/mn-file-chooser-button.c'; fi`
+
mail_notification-mn-mail-icon.o: mn-mail-icon.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-mail-icon.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-mail-icon.Tpo -c -o mail_notification-mn-mail-icon.o `test -f 'mn-mail-icon.c' || echo '$(srcdir)/'`mn-mail-icon.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-mail-icon.Tpo $(DEPDIR)/mail_notification-mn-mail-icon.Po
@@ -1481,6 +1649,20 @@ mail_notification-mn-mail-icon.obj: mn-mail-icon.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-mail-icon.obj `if test -f 'mn-mail-icon.c'; then $(CYGPATH_W) 'mn-mail-icon.c'; else $(CYGPATH_W) '$(srcdir)/mn-mail-icon.c'; fi`
+mail_notification-mn-mail-icon-widget.o: mn-mail-icon-widget.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-mail-icon-widget.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-mail-icon-widget.Tpo -c -o mail_notification-mn-mail-icon-widget.o `test -f 'mn-mail-icon-widget.c' || echo '$(srcdir)/'`mn-mail-icon-widget.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-mail-icon-widget.Tpo $(DEPDIR)/mail_notification-mn-mail-icon-widget.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-mail-icon-widget.c' object='mail_notification-mn-mail-icon-widget.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-mail-icon-widget.o `test -f 'mn-mail-icon-widget.c' || echo '$(srcdir)/'`mn-mail-icon-widget.c
+
+mail_notification-mn-mail-icon-widget.obj: mn-mail-icon-widget.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-mail-icon-widget.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-mail-icon-widget.Tpo -c -o mail_notification-mn-mail-icon-widget.obj `if test -f 'mn-mail-icon-widget.c'; then $(CYGPATH_W) 'mn-mail-icon-widget.c'; else $(CYGPATH_W) '$(srcdir)/mn-mail-icon-widget.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-mail-icon-widget.Tpo $(DEPDIR)/mail_notification-mn-mail-icon-widget.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-mail-icon-widget.c' object='mail_notification-mn-mail-icon-widget.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-mail-icon-widget.obj `if test -f 'mn-mail-icon-widget.c'; then $(CYGPATH_W) 'mn-mail-icon-widget.c'; else $(CYGPATH_W) '$(srcdir)/mn-mail-icon-widget.c'; fi`
+
mail_notification-mn-mailbox.o: mn-mailbox.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-mailbox.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-mailbox.Tpo -c -o mail_notification-mn-mailbox.o `test -f 'mn-mailbox.c' || echo '$(srcdir)/'`mn-mailbox.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-mailbox.Tpo $(DEPDIR)/mail_notification-mn-mailbox.Po
@@ -1635,6 +1817,34 @@ mail_notification-mn-shell.obj: mn-shell.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-shell.obj `if test -f 'mn-shell.c'; then $(CYGPATH_W) 'mn-shell.c'; else $(CYGPATH_W) '$(srcdir)/mn-shell.c'; fi`
+mail_notification-mn-sound-file-chooser-dialog.o: mn-sound-file-chooser-dialog.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-sound-file-chooser-dialog.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-sound-file-chooser-dialog.Tpo -c -o mail_notification-mn-sound-file-chooser-dialog.o `test -f 'mn-sound-file-chooser-dialog.c' || echo '$(srcdir)/'`mn-sound-file-chooser-dialog.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-sound-file-chooser-dialog.Tpo $(DEPDIR)/mail_notification-mn-sound-file-chooser-dialog.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-sound-file-chooser-dialog.c' object='mail_notification-mn-sound-file-chooser-dialog.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-sound-file-chooser-dialog.o `test -f 'mn-sound-file-chooser-dialog.c' || echo '$(srcdir)/'`mn-sound-file-chooser-dialog.c
+
+mail_notification-mn-sound-file-chooser-dialog.obj: mn-sound-file-chooser-dialog.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-sound-file-chooser-dialog.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-sound-file-chooser-dialog.Tpo -c -o mail_notification-mn-sound-file-chooser-dialog.obj `if test -f 'mn-sound-file-chooser-dialog.c'; then $(CYGPATH_W) 'mn-sound-file-chooser-dialog.c'; else $(CYGPATH_W) '$(srcdir)/mn-sound-file-chooser-dialog.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-sound-file-chooser-dialog.Tpo $(DEPDIR)/mail_notification-mn-sound-file-chooser-dialog.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-sound-file-chooser-dialog.c' object='mail_notification-mn-sound-file-chooser-dialog.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-sound-file-chooser-dialog.obj `if test -f 'mn-sound-file-chooser-dialog.c'; then $(CYGPATH_W) 'mn-sound-file-chooser-dialog.c'; else $(CYGPATH_W) '$(srcdir)/mn-sound-file-chooser-dialog.c'; fi`
+
+mail_notification-mn-sound-player.o: mn-sound-player.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-sound-player.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-sound-player.Tpo -c -o mail_notification-mn-sound-player.o `test -f 'mn-sound-player.c' || echo '$(srcdir)/'`mn-sound-player.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-sound-player.Tpo $(DEPDIR)/mail_notification-mn-sound-player.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-sound-player.c' object='mail_notification-mn-sound-player.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-sound-player.o `test -f 'mn-sound-player.c' || echo '$(srcdir)/'`mn-sound-player.c
+
+mail_notification-mn-sound-player.obj: mn-sound-player.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-sound-player.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-sound-player.Tpo -c -o mail_notification-mn-sound-player.obj `if test -f 'mn-sound-player.c'; then $(CYGPATH_W) 'mn-sound-player.c'; else $(CYGPATH_W) '$(srcdir)/mn-sound-player.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-sound-player.Tpo $(DEPDIR)/mail_notification-mn-sound-player.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-sound-player.c' object='mail_notification-mn-sound-player.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-sound-player.obj `if test -f 'mn-sound-player.c'; then $(CYGPATH_W) 'mn-sound-player.c'; else $(CYGPATH_W) '$(srcdir)/mn-sound-player.c'; fi`
+
mail_notification-mn-standard-message-view.o: mn-standard-message-view.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-standard-message-view.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-standard-message-view.Tpo -c -o mail_notification-mn-standard-message-view.o `test -f 'mn-standard-message-view.c' || echo '$(srcdir)/'`mn-standard-message-view.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-standard-message-view.Tpo $(DEPDIR)/mail_notification-mn-standard-message-view.Po
@@ -1761,6 +1971,20 @@ mail_notification-mn-maildir-mailbox-backend.obj: mn-maildir-mailbox-backend.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-maildir-mailbox-backend.obj `if test -f 'mn-maildir-mailbox-backend.c'; then $(CYGPATH_W) 'mn-maildir-mailbox-backend.c'; else $(CYGPATH_W) '$(srcdir)/mn-maildir-mailbox-backend.c'; fi`
+mail_notification-mn-maildir-message.o: mn-maildir-message.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-maildir-message.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-maildir-message.Tpo -c -o mail_notification-mn-maildir-message.o `test -f 'mn-maildir-message.c' || echo '$(srcdir)/'`mn-maildir-message.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-maildir-message.Tpo $(DEPDIR)/mail_notification-mn-maildir-message.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-maildir-message.c' object='mail_notification-mn-maildir-message.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-maildir-message.o `test -f 'mn-maildir-message.c' || echo '$(srcdir)/'`mn-maildir-message.c
+
+mail_notification-mn-maildir-message.obj: mn-maildir-message.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-maildir-message.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-maildir-message.Tpo -c -o mail_notification-mn-maildir-message.obj `if test -f 'mn-maildir-message.c'; then $(CYGPATH_W) 'mn-maildir-message.c'; else $(CYGPATH_W) '$(srcdir)/mn-maildir-message.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-maildir-message.Tpo $(DEPDIR)/mail_notification-mn-maildir-message.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-maildir-message.c' object='mail_notification-mn-maildir-message.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-maildir-message.obj `if test -f 'mn-maildir-message.c'; then $(CYGPATH_W) 'mn-maildir-message.c'; else $(CYGPATH_W) '$(srcdir)/mn-maildir-message.c'; fi`
+
mail_notification-mn-md5.o: mn-md5.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-md5.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-md5.Tpo -c -o mail_notification-mn-md5.o `test -f 'mn-md5.c' || echo '$(srcdir)/'`mn-md5.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-md5.Tpo $(DEPDIR)/mail_notification-mn-md5.Po
@@ -1887,6 +2111,20 @@ mail_notification-mn-pi-mailbox-properties.obj: mn-pi-mailbox-properties.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-pi-mailbox-properties.obj `if test -f 'mn-pi-mailbox-properties.c'; then $(CYGPATH_W) 'mn-pi-mailbox-properties.c'; else $(CYGPATH_W) '$(srcdir)/mn-pi-mailbox-properties.c'; fi`
+mail_notification-mn-keyring.o: mn-keyring.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-keyring.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-keyring.Tpo -c -o mail_notification-mn-keyring.o `test -f 'mn-keyring.c' || echo '$(srcdir)/'`mn-keyring.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-keyring.Tpo $(DEPDIR)/mail_notification-mn-keyring.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-keyring.c' object='mail_notification-mn-keyring.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-keyring.o `test -f 'mn-keyring.c' || echo '$(srcdir)/'`mn-keyring.c
+
+mail_notification-mn-keyring.obj: mn-keyring.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-keyring.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-keyring.Tpo -c -o mail_notification-mn-keyring.obj `if test -f 'mn-keyring.c'; then $(CYGPATH_W) 'mn-keyring.c'; else $(CYGPATH_W) '$(srcdir)/mn-keyring.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-keyring.Tpo $(DEPDIR)/mail_notification-mn-keyring.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-keyring.c' object='mail_notification-mn-keyring.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-keyring.obj `if test -f 'mn-keyring.c'; then $(CYGPATH_W) 'mn-keyring.c'; else $(CYGPATH_W) '$(srcdir)/mn-keyring.c'; fi`
+
mail_notification-mn-authenticated-mailbox.o: mn-authenticated-mailbox.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-authenticated-mailbox.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-authenticated-mailbox.Tpo -c -o mail_notification-mn-authenticated-mailbox.o `test -f 'mn-authenticated-mailbox.c' || echo '$(srcdir)/'`mn-authenticated-mailbox.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-authenticated-mailbox.Tpo $(DEPDIR)/mail_notification-mn-authenticated-mailbox.Po
@@ -1929,6 +2167,34 @@ mail_notification-mn-sylpheed-mailbox-backend.obj: mn-sylpheed-mailbox-backend.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-sylpheed-mailbox-backend.obj `if test -f 'mn-sylpheed-mailbox-backend.c'; then $(CYGPATH_W) 'mn-sylpheed-mailbox-backend.c'; else $(CYGPATH_W) '$(srcdir)/mn-sylpheed-mailbox-backend.c'; fi`
+mail_notification-mn-sylpheed-message.o: mn-sylpheed-message.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-sylpheed-message.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-sylpheed-message.Tpo -c -o mail_notification-mn-sylpheed-message.o `test -f 'mn-sylpheed-message.c' || echo '$(srcdir)/'`mn-sylpheed-message.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-sylpheed-message.Tpo $(DEPDIR)/mail_notification-mn-sylpheed-message.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-sylpheed-message.c' object='mail_notification-mn-sylpheed-message.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-sylpheed-message.o `test -f 'mn-sylpheed-message.c' || echo '$(srcdir)/'`mn-sylpheed-message.c
+
+mail_notification-mn-sylpheed-message.obj: mn-sylpheed-message.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-sylpheed-message.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-sylpheed-message.Tpo -c -o mail_notification-mn-sylpheed-message.obj `if test -f 'mn-sylpheed-message.c'; then $(CYGPATH_W) 'mn-sylpheed-message.c'; else $(CYGPATH_W) '$(srcdir)/mn-sylpheed-message.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-sylpheed-message.Tpo $(DEPDIR)/mail_notification-mn-sylpheed-message.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-sylpheed-message.c' object='mail_notification-mn-sylpheed-message.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-sylpheed-message.obj `if test -f 'mn-sylpheed-message.c'; then $(CYGPATH_W) 'mn-sylpheed-message.c'; else $(CYGPATH_W) '$(srcdir)/mn-sylpheed-message.c'; fi`
+
+mail_notification-mn-vfs-message.o: mn-vfs-message.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-vfs-message.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-vfs-message.Tpo -c -o mail_notification-mn-vfs-message.o `test -f 'mn-vfs-message.c' || echo '$(srcdir)/'`mn-vfs-message.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-vfs-message.Tpo $(DEPDIR)/mail_notification-mn-vfs-message.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-vfs-message.c' object='mail_notification-mn-vfs-message.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-vfs-message.o `test -f 'mn-vfs-message.c' || echo '$(srcdir)/'`mn-vfs-message.c
+
+mail_notification-mn-vfs-message.obj: mn-vfs-message.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-vfs-message.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-vfs-message.Tpo -c -o mail_notification-mn-vfs-message.obj `if test -f 'mn-vfs-message.c'; then $(CYGPATH_W) 'mn-vfs-message.c'; else $(CYGPATH_W) '$(srcdir)/mn-vfs-message.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-vfs-message.Tpo $(DEPDIR)/mail_notification-mn-vfs-message.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-vfs-message.c' object='mail_notification-mn-vfs-message.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-vfs-message.obj `if test -f 'mn-vfs-message.c'; then $(CYGPATH_W) 'mn-vfs-message.c'; else $(CYGPATH_W) '$(srcdir)/mn-vfs-message.c'; fi`
+
mail_notification-mn-gmail-mailbox.o: mn-gmail-mailbox.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-gmail-mailbox.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-gmail-mailbox.Tpo -c -o mail_notification-mn-gmail-mailbox.o `test -f 'mn-gmail-mailbox.c' || echo '$(srcdir)/'`mn-gmail-mailbox.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-gmail-mailbox.Tpo $(DEPDIR)/mail_notification-mn-gmail-mailbox.Po
@@ -1957,6 +2223,90 @@ mail_notification-mn-gmail-mailbox-properties.obj: mn-gmail-mailbox-properties.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-gmail-mailbox-properties.obj `if test -f 'mn-gmail-mailbox-properties.c'; then $(CYGPATH_W) 'mn-gmail-mailbox-properties.c'; else $(CYGPATH_W) '$(srcdir)/mn-gmail-mailbox-properties.c'; fi`
+mail_notification-mn-yahoo-mailbox.o: mn-yahoo-mailbox.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-yahoo-mailbox.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-yahoo-mailbox.Tpo -c -o mail_notification-mn-yahoo-mailbox.o `test -f 'mn-yahoo-mailbox.c' || echo '$(srcdir)/'`mn-yahoo-mailbox.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-yahoo-mailbox.Tpo $(DEPDIR)/mail_notification-mn-yahoo-mailbox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-yahoo-mailbox.c' object='mail_notification-mn-yahoo-mailbox.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-yahoo-mailbox.o `test -f 'mn-yahoo-mailbox.c' || echo '$(srcdir)/'`mn-yahoo-mailbox.c
+
+mail_notification-mn-yahoo-mailbox.obj: mn-yahoo-mailbox.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-yahoo-mailbox.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-yahoo-mailbox.Tpo -c -o mail_notification-mn-yahoo-mailbox.obj `if test -f 'mn-yahoo-mailbox.c'; then $(CYGPATH_W) 'mn-yahoo-mailbox.c'; else $(CYGPATH_W) '$(srcdir)/mn-yahoo-mailbox.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-yahoo-mailbox.Tpo $(DEPDIR)/mail_notification-mn-yahoo-mailbox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-yahoo-mailbox.c' object='mail_notification-mn-yahoo-mailbox.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-yahoo-mailbox.obj `if test -f 'mn-yahoo-mailbox.c'; then $(CYGPATH_W) 'mn-yahoo-mailbox.c'; else $(CYGPATH_W) '$(srcdir)/mn-yahoo-mailbox.c'; fi`
+
+mail_notification-mn-yahoo-mailbox-properties.o: mn-yahoo-mailbox-properties.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-yahoo-mailbox-properties.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-yahoo-mailbox-properties.Tpo -c -o mail_notification-mn-yahoo-mailbox-properties.o `test -f 'mn-yahoo-mailbox-properties.c' || echo '$(srcdir)/'`mn-yahoo-mailbox-properties.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-yahoo-mailbox-properties.Tpo $(DEPDIR)/mail_notification-mn-yahoo-mailbox-properties.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-yahoo-mailbox-properties.c' object='mail_notification-mn-yahoo-mailbox-properties.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-yahoo-mailbox-properties.o `test -f 'mn-yahoo-mailbox-properties.c' || echo '$(srcdir)/'`mn-yahoo-mailbox-properties.c
+
+mail_notification-mn-yahoo-mailbox-properties.obj: mn-yahoo-mailbox-properties.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-yahoo-mailbox-properties.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-yahoo-mailbox-properties.Tpo -c -o mail_notification-mn-yahoo-mailbox-properties.obj `if test -f 'mn-yahoo-mailbox-properties.c'; then $(CYGPATH_W) 'mn-yahoo-mailbox-properties.c'; else $(CYGPATH_W) '$(srcdir)/mn-yahoo-mailbox-properties.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-yahoo-mailbox-properties.Tpo $(DEPDIR)/mail_notification-mn-yahoo-mailbox-properties.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-yahoo-mailbox-properties.c' object='mail_notification-mn-yahoo-mailbox-properties.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-yahoo-mailbox-properties.obj `if test -f 'mn-yahoo-mailbox-properties.c'; then $(CYGPATH_W) 'mn-yahoo-mailbox-properties.c'; else $(CYGPATH_W) '$(srcdir)/mn-yahoo-mailbox-properties.c'; fi`
+
+mail_notification-mn-hotmail-mailbox.o: mn-hotmail-mailbox.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-hotmail-mailbox.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-hotmail-mailbox.Tpo -c -o mail_notification-mn-hotmail-mailbox.o `test -f 'mn-hotmail-mailbox.c' || echo '$(srcdir)/'`mn-hotmail-mailbox.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-hotmail-mailbox.Tpo $(DEPDIR)/mail_notification-mn-hotmail-mailbox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-hotmail-mailbox.c' object='mail_notification-mn-hotmail-mailbox.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-hotmail-mailbox.o `test -f 'mn-hotmail-mailbox.c' || echo '$(srcdir)/'`mn-hotmail-mailbox.c
+
+mail_notification-mn-hotmail-mailbox.obj: mn-hotmail-mailbox.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-hotmail-mailbox.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-hotmail-mailbox.Tpo -c -o mail_notification-mn-hotmail-mailbox.obj `if test -f 'mn-hotmail-mailbox.c'; then $(CYGPATH_W) 'mn-hotmail-mailbox.c'; else $(CYGPATH_W) '$(srcdir)/mn-hotmail-mailbox.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-hotmail-mailbox.Tpo $(DEPDIR)/mail_notification-mn-hotmail-mailbox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-hotmail-mailbox.c' object='mail_notification-mn-hotmail-mailbox.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-hotmail-mailbox.obj `if test -f 'mn-hotmail-mailbox.c'; then $(CYGPATH_W) 'mn-hotmail-mailbox.c'; else $(CYGPATH_W) '$(srcdir)/mn-hotmail-mailbox.c'; fi`
+
+mail_notification-mn-hotmail-mailbox-properties.o: mn-hotmail-mailbox-properties.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-hotmail-mailbox-properties.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-hotmail-mailbox-properties.Tpo -c -o mail_notification-mn-hotmail-mailbox-properties.o `test -f 'mn-hotmail-mailbox-properties.c' || echo '$(srcdir)/'`mn-hotmail-mailbox-properties.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-hotmail-mailbox-properties.Tpo $(DEPDIR)/mail_notification-mn-hotmail-mailbox-properties.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-hotmail-mailbox-properties.c' object='mail_notification-mn-hotmail-mailbox-properties.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-hotmail-mailbox-properties.o `test -f 'mn-hotmail-mailbox-properties.c' || echo '$(srcdir)/'`mn-hotmail-mailbox-properties.c
+
+mail_notification-mn-hotmail-mailbox-properties.obj: mn-hotmail-mailbox-properties.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-hotmail-mailbox-properties.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-hotmail-mailbox-properties.Tpo -c -o mail_notification-mn-hotmail-mailbox-properties.obj `if test -f 'mn-hotmail-mailbox-properties.c'; then $(CYGPATH_W) 'mn-hotmail-mailbox-properties.c'; else $(CYGPATH_W) '$(srcdir)/mn-hotmail-mailbox-properties.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-hotmail-mailbox-properties.Tpo $(DEPDIR)/mail_notification-mn-hotmail-mailbox-properties.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-hotmail-mailbox-properties.c' object='mail_notification-mn-hotmail-mailbox-properties.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-hotmail-mailbox-properties.obj `if test -f 'mn-hotmail-mailbox-properties.c'; then $(CYGPATH_W) 'mn-hotmail-mailbox-properties.c'; else $(CYGPATH_W) '$(srcdir)/mn-hotmail-mailbox-properties.c'; fi`
+
+mail_notification-mn-webmail-mailbox.o: mn-webmail-mailbox.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-webmail-mailbox.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-webmail-mailbox.Tpo -c -o mail_notification-mn-webmail-mailbox.o `test -f 'mn-webmail-mailbox.c' || echo '$(srcdir)/'`mn-webmail-mailbox.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-webmail-mailbox.Tpo $(DEPDIR)/mail_notification-mn-webmail-mailbox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-webmail-mailbox.c' object='mail_notification-mn-webmail-mailbox.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-webmail-mailbox.o `test -f 'mn-webmail-mailbox.c' || echo '$(srcdir)/'`mn-webmail-mailbox.c
+
+mail_notification-mn-webmail-mailbox.obj: mn-webmail-mailbox.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-webmail-mailbox.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-webmail-mailbox.Tpo -c -o mail_notification-mn-webmail-mailbox.obj `if test -f 'mn-webmail-mailbox.c'; then $(CYGPATH_W) 'mn-webmail-mailbox.c'; else $(CYGPATH_W) '$(srcdir)/mn-webmail-mailbox.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-webmail-mailbox.Tpo $(DEPDIR)/mail_notification-mn-webmail-mailbox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-webmail-mailbox.c' object='mail_notification-mn-webmail-mailbox.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-webmail-mailbox.obj `if test -f 'mn-webmail-mailbox.c'; then $(CYGPATH_W) 'mn-webmail-mailbox.c'; else $(CYGPATH_W) '$(srcdir)/mn-webmail-mailbox.c'; fi`
+
+mail_notification-mn-webmail-mailbox-properties.o: mn-webmail-mailbox-properties.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-webmail-mailbox-properties.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-webmail-mailbox-properties.Tpo -c -o mail_notification-mn-webmail-mailbox-properties.o `test -f 'mn-webmail-mailbox-properties.c' || echo '$(srcdir)/'`mn-webmail-mailbox-properties.c
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-webmail-mailbox-properties.Tpo $(DEPDIR)/mail_notification-mn-webmail-mailbox-properties.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-webmail-mailbox-properties.c' object='mail_notification-mn-webmail-mailbox-properties.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-webmail-mailbox-properties.o `test -f 'mn-webmail-mailbox-properties.c' || echo '$(srcdir)/'`mn-webmail-mailbox-properties.c
+
+mail_notification-mn-webmail-mailbox-properties.obj: mn-webmail-mailbox-properties.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-webmail-mailbox-properties.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-webmail-mailbox-properties.Tpo -c -o mail_notification-mn-webmail-mailbox-properties.obj `if test -f 'mn-webmail-mailbox-properties.c'; then $(CYGPATH_W) 'mn-webmail-mailbox-properties.c'; else $(CYGPATH_W) '$(srcdir)/mn-webmail-mailbox-properties.c'; fi`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-webmail-mailbox-properties.Tpo $(DEPDIR)/mail_notification-mn-webmail-mailbox-properties.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-webmail-mailbox-properties.c' object='mail_notification-mn-webmail-mailbox-properties.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-webmail-mailbox-properties.obj `if test -f 'mn-webmail-mailbox-properties.c'; then $(CYGPATH_W) 'mn-webmail-mailbox-properties.c'; else $(CYGPATH_W) '$(srcdir)/mn-webmail-mailbox-properties.c'; fi`
+
mail_notification-mn-custom-vfs-mailbox.o: mn-custom-vfs-mailbox.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-custom-vfs-mailbox.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-custom-vfs-mailbox.Tpo -c -o mail_notification-mn-custom-vfs-mailbox.o `test -f 'mn-custom-vfs-mailbox.c' || echo '$(srcdir)/'`mn-custom-vfs-mailbox.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-custom-vfs-mailbox.Tpo $(DEPDIR)/mail_notification-mn-custom-vfs-mailbox.Po
@@ -2027,20 +2377,6 @@ mail_notification-mn-vfs-mailbox-backend.obj: mn-vfs-mailbox-backend.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-vfs-mailbox-backend.obj `if test -f 'mn-vfs-mailbox-backend.c'; then $(CYGPATH_W) 'mn-vfs-mailbox-backend.c'; else $(CYGPATH_W) '$(srcdir)/mn-vfs-mailbox-backend.c'; fi`
-mail_notification-mn-vfs-message.o: mn-vfs-message.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-vfs-message.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-vfs-message.Tpo -c -o mail_notification-mn-vfs-message.o `test -f 'mn-vfs-message.c' || echo '$(srcdir)/'`mn-vfs-message.c
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-vfs-message.Tpo $(DEPDIR)/mail_notification-mn-vfs-message.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-vfs-message.c' object='mail_notification-mn-vfs-message.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-vfs-message.o `test -f 'mn-vfs-message.c' || echo '$(srcdir)/'`mn-vfs-message.c
-
-mail_notification-mn-vfs-message.obj: mn-vfs-message.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-vfs-message.obj -MD -MP -MF $(DEPDIR)/mail_notification-mn-vfs-message.Tpo -c -o mail_notification-mn-vfs-message.obj `if test -f 'mn-vfs-message.c'; then $(CYGPATH_W) 'mn-vfs-message.c'; else $(CYGPATH_W) '$(srcdir)/mn-vfs-message.c'; fi`
-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-vfs-message.Tpo $(DEPDIR)/mail_notification-mn-vfs-message.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mn-vfs-message.c' object='mail_notification-mn-vfs-message.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mail_notification-mn-vfs-message.obj `if test -f 'mn-vfs-message.c'; then $(CYGPATH_W) 'mn-vfs-message.c'; else $(CYGPATH_W) '$(srcdir)/mn-vfs-message.c'; fi`
-
mail_notification-mn-reentrant-mailbox.o: mn-reentrant-mailbox.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mail_notification_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mail_notification-mn-reentrant-mailbox.o -MD -MP -MF $(DEPDIR)/mail_notification-mn-reentrant-mailbox.Tpo -c -o mail_notification-mn-reentrant-mailbox.o `test -f 'mn-reentrant-mailbox.c' || echo '$(srcdir)/'`mn-reentrant-mailbox.c
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/mail_notification-mn-reentrant-mailbox.Tpo $(DEPDIR)/mail_notification-mn-reentrant-mailbox.Po
diff --git a/src/automake.xml b/src/automake.xml
@@ -8,16 +8,16 @@
<cppflags>-DPREFIX="\"$(prefix)\""</cppflags>
<cppflags>-DSYSCONFDIR="\"$(sysconfdir)\""</cppflags>
<cppflags>-DDATADIR="\"$(datadir)\""</cppflags>
+ <cppflags>-DPKGDATADIR="\"$(pkgdatadir)\""</cppflags>
<cppflags>-DLIBDIR="\"$(libdir)\""</cppflags>
<cppflags>-DGNOMELOCALEDIR="\"$(datadir)/locale\""</cppflags>
- <cppflags>-DUIDIR="\"$(pkgdatadir)/ui\""</cppflags>
<!-- We add the -export-dynamic flag (which libtool will translate into -->
<!-- the proper linker flag) because libglade needs to resolve symbols -->
<!-- from our own binary in order to autoconnect signal handlers. -->
<ldflags>-export-dynamic</ldflags>
- <ldflags>$(INTLLIBS)</ldflags>
+ <ldflags>-lm $(INTLLIBS)</ldflags>
<package name="gnome"/>
@@ -35,10 +35,11 @@
<class name="MN:About:Dialog"/>
<class name="MN:Autodetect:Mailbox:Properties"/>
<class name="MN:Automation"/>
- <class name="MN:Blinking:Image"/>
<class name="MN:Compact:Message:View"/>
<class name="MN:Dialog"/>
+ <class name="MN:File:Chooser:Button"/>
<class name="MN:Mail:Icon"/>
+ <class name="MN:Mail:Icon:Widget"/>
<class name="MN:Mailbox"/>
<class name="MN:Mailbox:Properties"/>
<class name="MN:Mailbox:Properties:Dialog"/>
@@ -50,6 +51,8 @@
<class name="MN:Popups"/>
<class name="MN:Properties:Dialog"/>
<class name="MN:Shell"/>
+ <class name="MN:Sound:File:Chooser:Dialog"/>
+ <class name="MN:Sound:Player"/>
<class name="MN:Standard:Message:View"/>
<class name="MN:Test:Mailbox"/>
<class name="MN:Text:Table"/>
@@ -75,6 +78,7 @@
<if test="WITH_MAILDIR">
<class name="MN:Maildir:Mailbox:Backend"/>
+ <class name="MN:Maildir:Message"/>
</if>
<if test="WITH_POP3">
@@ -95,13 +99,20 @@
<class name="MN:PI:Mailbox:Properties"/>
</if>
- <if test="WITH_POP3_OR_IMAP_OR_GMAIL">
+ <if test="WITH_POP3_OR_IMAP_OR_GMAIL_OR_YAHOO_OR_HOTMAIL">
+ <package name="gnome-keyring"/>
+ <module name="mn-keyring"/>
<class name="MN:Authenticated:Mailbox"/>
<class name="MN:Authenticated:Mailbox:Properties"/>
</if>
<if test="WITH_SYLPHEED">
<class name="MN:Sylpheed:Mailbox:Backend"/>
+ <class name="MN:Sylpheed:Message"/>
+ </if>
+
+ <if test="WITH_MAILDIR_OR_SYLPHEED">
+ <class name="MN:VFS:Message"/>
</if>
<if test="WITH_GMAIL">
@@ -109,13 +120,27 @@
<class name="MN:Gmail:Mailbox:Properties"/>
</if>
+ <if test="WITH_YAHOO">
+ <class name="MN:Yahoo:Mailbox"/>
+ <class name="MN:Yahoo:Mailbox:Properties"/>
+ </if>
+
+ <if test="WITH_HOTMAIL">
+ <class name="MN:Hotmail:Mailbox"/>
+ <class name="MN:Hotmail:Mailbox:Properties"/>
+ </if>
+
+ <if test="WITH_YAHOO_OR_HOTMAIL">
+ <class name="MN:Webmail:Mailbox"/>
+ <class name="MN:Webmail:Mailbox:Properties"/>
+ </if>
+
<if test="WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED">
<class name="MN:Custom:VFS:Mailbox"/>
<class name="MN:System:VFS:Mailbox"/>
<class name="MN:System:VFS:Mailbox:Properties"/>
<class name="MN:VFS:Mailbox"/>
<class name="MN:VFS:Mailbox:Backend"/>
- <class name="MN:VFS:Message"/>
</if>
<if test="WITH_MBOX_OR_MOZILLA_OR_MH_OR_MAILDIR_OR_SYLPHEED_OR_EVOLUTION">
diff --git a/src/eggtrayicon.c b/src/eggtrayicon.c
@@ -1,20 +1,22 @@
/* eggtrayicon.c
* Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
*
- * This library is distributed in the hope that it will be useful,
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <config.h>
diff --git a/src/eggtrayicon.h b/src/eggtrayicon.h
@@ -2,20 +2,22 @@
/* eggtrayicon.h
* Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
*
- * This library is distributed in the hope that it will be useful,
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __EGG_TRAY_ICON_H__
diff --git a/src/mn-about-dialog.c b/src/mn-about-dialog.c
@@ -139,30 +139,27 @@ mn_about_dialog_init (MNAboutDialog * self G_GNUC_UNUSED)
*/
gtk_about_dialog_set_translator_credits(about, _("translator-credits"));
- logo = mn_pixbuf_new(UIDIR G_DIR_SEPARATOR_S "logo.png");
- if (logo)
- {
- gtk_about_dialog_set_logo(about, logo);
- g_object_unref(logo);
- }
+ logo = mn_pixbuf_new(PKGDATADIR G_DIR_SEPARATOR_S "logo.png");
+ gtk_about_dialog_set_logo(about, logo);
+ g_object_unref(logo);
g_signal_connect(self, "response", G_CALLBACK(gtk_widget_destroy), NULL);
-#line 152 "mn-about-dialog.c"
+#line 149 "mn-about-dialog.c"
}
}
#undef __GOB_FUNCTION__
-#line 70 "mn-about-dialog.gob"
+#line 67 "mn-about-dialog.gob"
static void
mn_about_dialog_activate_link_cb (GtkAboutDialog * about, const char * link, gpointer data)
-#line 162 "mn-about-dialog.c"
+#line 159 "mn-about-dialog.c"
{
#define __GOB_FUNCTION__ "MN:About:Dialog::activate_link_cb"
{
-#line 74 "mn-about-dialog.gob"
+#line 71 "mn-about-dialog.gob"
const char *prefix = data;
char *url;
@@ -171,5 +168,5 @@ mn_about_dialog_activate_link_cb (GtkAboutDialog * about, const char * link, gpo
mn_open_link(GTK_WINDOW(about), url);
g_free(url);
}}
-#line 175 "mn-about-dialog.c"
+#line 172 "mn-about-dialog.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-about-dialog.gob b/src/mn-about-dialog.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -57,12 +57,9 @@ class MN:About:Dialog from Gtk:About:Dialog
*/
gtk_about_dialog_set_translator_credits(about, _("translator-credits"));
- logo = mn_pixbuf_new(UIDIR G_DIR_SEPARATOR_S "logo.png");
- if (logo)
- {
- gtk_about_dialog_set_logo(about, logo);
- g_object_unref(logo);
- }
+ logo = mn_pixbuf_new(PKGDATADIR G_DIR_SEPARATOR_S "logo.png");
+ gtk_about_dialog_set_logo(about, logo);
+ g_object_unref(logo);
g_signal_connect(self, "response", G_CALLBACK(gtk_widget_destroy), NULL);
}
diff --git a/src/mn-auth-combo-box.gob b/src/mn-auth-combo-box.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-authenticated-mailbox-private.h b/src/mn-authenticated-mailbox-private.h
@@ -9,11 +9,30 @@
extern "C" {
#endif /* __cplusplus */
+
+#line 27 "mn-authenticated-mailbox.gob"
+
+#include <gtk/gtk.h>
+
+#line 18 "mn-authenticated-mailbox-private.h"
struct _MNAuthenticatedMailboxPrivate {
-#line 40 "mn-authenticated-mailbox.gob"
+#line 71 "mn-authenticated-mailbox.gob"
+ gpointer get_password_request;
+#line 72 "mn-authenticated-mailbox.gob"
+ gpointer set_password_request;
+#line 79 "mn-authenticated-mailbox.gob"
gboolean checking;
-#line 16 "mn-authenticated-mailbox-private.h"
+#line 83 "mn-authenticated-mailbox.gob"
+ GtkWidget * auth_dialog;
+#line 88 "mn-authenticated-mailbox.gob"
+ char * prompted_password_keyring;
+#line 89 "mn-authenticated-mailbox.gob"
+ guint32 prompted_password_item_id;
+#line 32 "mn-authenticated-mailbox-private.h"
};
+void mn_authenticated_mailbox_parse_username (MNAuthenticatedMailbox * self, char ** username, char ** domain);
+gboolean mn_authenticated_mailbox_fill_password (MNAuthenticatedMailbox * self, gboolean may_prompt);
+void mn_authenticated_mailbox_auth_failed (MNAuthenticatedMailbox * self);
#ifdef __cplusplus
}
diff --git a/src/mn-authenticated-mailbox-properties-private.h b/src/mn-authenticated-mailbox-properties-private.h
@@ -9,8 +9,26 @@
extern "C" {
#endif /* __cplusplus */
+
+#line 27 "mn-authenticated-mailbox-properties.gob"
+
+#include "mn-authenticated-mailbox.h"
+
+#line 18 "mn-authenticated-mailbox-properties-private.h"
+struct _MNAuthenticatedMailboxPropertiesPrivate {
+#line 47 "mn-authenticated-mailbox-properties.gob"
+ GtkWidget * password_operation_label;
+#line 48 "mn-authenticated-mailbox-properties.gob"
+ GtkWidget * password_widget;
+#line 50 "mn-authenticated-mailbox-properties.gob"
+ MNAuthenticatedMailbox * mailbox_setting_password;
+#line 51 "mn-authenticated-mailbox-properties.gob"
+ gpointer get_password_request;
+#line 28 "mn-authenticated-mailbox-properties-private.h"
+};
GtkWidget * mn_authenticated_mailbox_properties_field_new (MNAuthenticatedMailboxProperties * self, const char * mnemonic, GtkWidget ** label, GtkWidget ** entry);
void mn_authenticated_mailbox_properties_get_contents (MNAuthenticatedMailboxProperties * self, const char ** username, const char ** password);
+gboolean mn_authenticated_mailbox_properties_is_complete (MNAuthenticatedMailboxProperties * self);
#ifdef __cplusplus
}
diff --git a/src/mn-authenticated-mailbox-properties.c b/src/mn-authenticated-mailbox-properties.c
@@ -22,12 +22,12 @@
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */
-#line 27 "mn-authenticated-mailbox-properties.gob"
+#line 31 "mn-authenticated-mailbox-properties.gob"
#include "config.h"
#include <glib/gi18n.h>
-#include "mn-authenticated-mailbox.h"
#include "mn-mailbox-properties-private.h"
+#include "mn-util.h"
#line 33 "mn-authenticated-mailbox-properties.c"
/* self casting macros */
@@ -46,15 +46,27 @@ typedef MNAuthenticatedMailboxPropertiesClass SelfClass;
/* here are local prototypes */
static void mn_authenticated_mailbox_properties_class_init (MNAuthenticatedMailboxPropertiesClass * c) G_GNUC_UNUSED;
static void mn_authenticated_mailbox_properties_init (MNAuthenticatedMailboxProperties * self) G_GNUC_UNUSED;
-static void ___3_mn_authenticated_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED;
-static MNMailbox * ___4_mn_authenticated_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED;
+static void ___2_mn_authenticated_mailbox_properties_dispose (GObject * object) G_GNUC_UNUSED;
+static void ___4_mn_authenticated_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_properties_clear_mailbox_callbacks (MNAuthenticatedMailboxProperties * self) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_properties_setting_password_notify_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_properties_get_password (MNAuthenticatedMailboxProperties * self, MNAuthenticatedMailbox * mailbox) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_properties_get_password_cb (GnomeKeyringResult result, GList * list, gpointer data) G_GNUC_UNUSED;
+static MNMailbox * ___9_mn_authenticated_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_properties_set_password_operation (MNAuthenticatedMailboxProperties * self, const char * operation) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static MNMailboxPropertiesClass *parent_class = NULL;
/* Short form macros */
#define self_field_new mn_authenticated_mailbox_properties_field_new
+#define self_clear_mailbox_callbacks mn_authenticated_mailbox_properties_clear_mailbox_callbacks
+#define self_setting_password_notify_h mn_authenticated_mailbox_properties_setting_password_notify_h
+#define self_get_password mn_authenticated_mailbox_properties_get_password
+#define self_get_password_cb mn_authenticated_mailbox_properties_get_password_cb
+#define self_set_password_operation mn_authenticated_mailbox_properties_set_password_operation
#define self_get_contents mn_authenticated_mailbox_properties_get_contents
+#define self_is_complete mn_authenticated_mailbox_properties_is_complete
GType
mn_authenticated_mailbox_properties_get_type (void)
{
@@ -97,29 +109,66 @@ GET_NEW_VARG (const char *first, ...)
return ret;
}
+
+static void
+___dispose (GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::dispose"
+ MNAuthenticatedMailboxProperties *self G_GNUC_UNUSED = MN_AUTHENTICATED_MAILBOX_PROPERTIES (obj_self);
+#line 91 "mn-authenticated-mailbox-properties.gob"
+ ___2_mn_authenticated_mailbox_properties_dispose(obj_self);
+#line 121 "mn-authenticated-mailbox-properties.c"
+#line 46 "mn-authenticated-mailbox-properties.gob"
+ if(self->password_entry) { g_object_unref ((gpointer) self->password_entry); self->password_entry = NULL; }
+#line 124 "mn-authenticated-mailbox-properties.c"
+#line 47 "mn-authenticated-mailbox-properties.gob"
+ if(self->_priv->password_operation_label) { g_object_unref ((gpointer) self->_priv->password_operation_label); self->_priv->password_operation_label = NULL; }
+#line 127 "mn-authenticated-mailbox-properties.c"
+}
+#undef __GOB_FUNCTION__
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::finalize"
+ MNAuthenticatedMailboxProperties *self G_GNUC_UNUSED = MN_AUTHENTICATED_MAILBOX_PROPERTIES (obj_self);
+ gpointer priv G_GNUC_UNUSED = self->_priv;
+ if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
+}
+#undef __GOB_FUNCTION__
+
static void
mn_authenticated_mailbox_properties_class_init (MNAuthenticatedMailboxPropertiesClass * c G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::class_init"
+ GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
MNMailboxPropertiesClass *mn_mailbox_properties_class = (MNMailboxPropertiesClass *)c;
+ g_type_class_add_private(c,sizeof(MNAuthenticatedMailboxPropertiesPrivate));
+
parent_class = g_type_class_ref (MN_TYPE_MAILBOX_PROPERTIES);
-#line 97 "mn-authenticated-mailbox-properties.gob"
- mn_mailbox_properties_class->set_mailbox = ___3_mn_authenticated_mailbox_properties_set_mailbox;
-#line 107 "mn-authenticated-mailbox-properties.gob"
- mn_mailbox_properties_class->get_mailbox = ___4_mn_authenticated_mailbox_properties_get_mailbox;
-#line 113 "mn-authenticated-mailbox-properties.c"
+#line 91 "mn-authenticated-mailbox-properties.gob"
+ g_object_class->dispose = ___dispose;
+#line 129 "mn-authenticated-mailbox-properties.gob"
+ mn_mailbox_properties_class->set_mailbox = ___4_mn_authenticated_mailbox_properties_set_mailbox;
+#line 232 "mn-authenticated-mailbox-properties.gob"
+ mn_mailbox_properties_class->get_mailbox = ___9_mn_authenticated_mailbox_properties_get_mailbox;
+#line 160 "mn-authenticated-mailbox-properties.c"
+ g_object_class->finalize = ___finalize;
}
#undef __GOB_FUNCTION__
-#line 44 "mn-authenticated-mailbox-properties.gob"
+#line 53 "mn-authenticated-mailbox-properties.gob"
static void
mn_authenticated_mailbox_properties_init (MNAuthenticatedMailboxProperties * self G_GNUC_UNUSED)
-#line 119 "mn-authenticated-mailbox-properties.c"
+#line 167 "mn-authenticated-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::init"
+ self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES,MNAuthenticatedMailboxPropertiesPrivate);
{
-#line 45 "mn-authenticated-mailbox-properties.gob"
+#line 54 "mn-authenticated-mailbox-properties.gob"
MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self);
const char *username;
@@ -136,6 +185,18 @@ mn_authenticated_mailbox_properties_init (MNAuthenticatedMailboxProperties * sel
&self->password_label,
&self->password_entry);
+ selfp->password_operation_label = gtk_label_new(NULL);
+ gtk_misc_set_alignment(GTK_MISC(selfp->password_operation_label), 0.0, 0.5);
+
+ /*
+ * These two widgets will alternate in their parent container so
+ * we need to reference them.
+ */
+ mn_gtk_object_ref_and_sink(GTK_OBJECT(self->password_entry));
+ mn_gtk_object_ref_and_sink(GTK_OBJECT(selfp->password_operation_label));
+
+ selfp->password_widget = self->password_entry;
+
/* defaults to the login name */
username = g_get_user_name();
if (username)
@@ -143,30 +204,52 @@ mn_authenticated_mailbox_properties_init (MNAuthenticatedMailboxProperties * sel
gtk_entry_set_visibility(GTK_ENTRY(self->password_entry), FALSE);
-#line 147 "mn-authenticated-mailbox-properties.c"
+#line 208 "mn-authenticated-mailbox-properties.c"
}
}
#undef __GOB_FUNCTION__
-#line 69 "mn-authenticated-mailbox-properties.gob"
+#line 91 "mn-authenticated-mailbox-properties.gob"
+static void
+___2_mn_authenticated_mailbox_properties_dispose (GObject * object G_GNUC_UNUSED)
+#line 218 "mn-authenticated-mailbox-properties.c"
+#define PARENT_HANDLER(___object) \
+ { if(G_OBJECT_CLASS(parent_class)->dispose) \
+ (* G_OBJECT_CLASS(parent_class)->dispose)(___object); }
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::dispose"
+{
+#line 93 "mn-authenticated-mailbox-properties.gob"
+
+ Self *self = SELF(object);
+
+ self_clear_mailbox_callbacks(self);
+
+ PARENT_HANDLER(object);
+ }}
+#line 233 "mn-authenticated-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 101 "mn-authenticated-mailbox-properties.gob"
GtkWidget *
mn_authenticated_mailbox_properties_field_new (MNAuthenticatedMailboxProperties * self, const char * mnemonic, GtkWidget ** label, GtkWidget ** entry)
-#line 157 "mn-authenticated-mailbox-properties.c"
+#line 240 "mn-authenticated-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::field_new"
-#line 69 "mn-authenticated-mailbox-properties.gob"
+#line 101 "mn-authenticated-mailbox-properties.gob"
g_return_val_if_fail (self != NULL, (GtkWidget * )0);
-#line 69 "mn-authenticated-mailbox-properties.gob"
+#line 101 "mn-authenticated-mailbox-properties.gob"
g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self), (GtkWidget * )0);
-#line 69 "mn-authenticated-mailbox-properties.gob"
+#line 101 "mn-authenticated-mailbox-properties.gob"
g_return_val_if_fail (mnemonic != NULL, (GtkWidget * )0);
-#line 69 "mn-authenticated-mailbox-properties.gob"
+#line 101 "mn-authenticated-mailbox-properties.gob"
g_return_val_if_fail (entry != NULL, (GtkWidget * )0);
-#line 168 "mn-authenticated-mailbox-properties.c"
+#line 251 "mn-authenticated-mailbox-properties.c"
{
-#line 74 "mn-authenticated-mailbox-properties.gob"
+#line 106 "mn-authenticated-mailbox-properties.gob"
GtkWidget *hbox;
GtkWidget *_label;
@@ -189,35 +272,170 @@ mn_authenticated_mailbox_properties_field_new (MNAuthenticatedMailboxProperties
return hbox;
}}
-#line 193 "mn-authenticated-mailbox-properties.c"
+#line 276 "mn-authenticated-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 97 "mn-authenticated-mailbox-properties.gob"
+#line 129 "mn-authenticated-mailbox-properties.gob"
static void
-___3_mn_authenticated_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox)
-#line 199 "mn-authenticated-mailbox-properties.c"
+___4_mn_authenticated_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox)
+#line 282 "mn-authenticated-mailbox-properties.c"
#define PARENT_HANDLER(___properties,___mailbox) \
{ if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox) \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox)(___properties,___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::set_mailbox"
{
-#line 99 "mn-authenticated-mailbox-properties.gob"
+#line 131 "mn-authenticated-mailbox-properties.gob"
Self *self = SELF(properties);
MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
- gtk_entry_set_text(GTK_ENTRY(self->username_entry), auth_mailbox->username ? auth_mailbox->username : "");
- gtk_entry_set_text(GTK_ENTRY(self->password_entry), auth_mailbox->password ? auth_mailbox->password : "");
+ self_clear_mailbox_callbacks(self);
+
+ gtk_entry_set_text(GTK_ENTRY(self->username_entry), auth_mailbox->username);
+
+ /*
+ * If the password is currently being saved, wait for that
+ * operation to finish before querying the keyring for the
+ * password.
+ */
+ if (mn_authenticated_mailbox_get_setting_password(auth_mailbox))
+ {
+ selfp->mailbox_setting_password = g_object_ref(auth_mailbox);
+ g_signal_connect(auth_mailbox, "notify::setting-password", G_CALLBACK(self_setting_password_notify_h), self);
+ self_set_password_operation(self, _("Saving password to keyring..."));
+ }
+ else
+ self_get_password(self, auth_mailbox);
}}
-#line 214 "mn-authenticated-mailbox-properties.c"
+#line 312 "mn-authenticated-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 107 "mn-authenticated-mailbox-properties.gob"
+#line 154 "mn-authenticated-mailbox-properties.gob"
+static void
+mn_authenticated_mailbox_properties_clear_mailbox_callbacks (MNAuthenticatedMailboxProperties * self)
+#line 319 "mn-authenticated-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::clear_mailbox_callbacks"
+#line 154 "mn-authenticated-mailbox-properties.gob"
+ g_return_if_fail (self != NULL);
+#line 154 "mn-authenticated-mailbox-properties.gob"
+ g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self));
+#line 326 "mn-authenticated-mailbox-properties.c"
+{
+#line 156 "mn-authenticated-mailbox-properties.gob"
+
+ if (selfp->mailbox_setting_password)
+ {
+ g_signal_handlers_disconnect_by_func(selfp->mailbox_setting_password, self_setting_password_notify_h, self);
+ g_object_unref(selfp->mailbox_setting_password);
+ selfp->mailbox_setting_password = NULL;
+ }
+
+ if (selfp->get_password_request)
+ {
+ gnome_keyring_cancel_request(selfp->get_password_request);
+ selfp->get_password_request = NULL;
+ }
+ }}
+#line 343 "mn-authenticated-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 171 "mn-authenticated-mailbox-properties.gob"
+static void
+mn_authenticated_mailbox_properties_setting_password_notify_h (GObject * object, GParamSpec * pspec, gpointer user_data)
+#line 349 "mn-authenticated-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::setting_password_notify_h"
+{
+#line 175 "mn-authenticated-mailbox-properties.gob"
+
+ Self *self = user_data;
+ MNAuthenticatedMailbox *mailbox = MN_AUTHENTICATED_MAILBOX(object);
+
+ /*
+ * If the password save operation is finished, we can query the
+ * keyring for the password.
+ */
+ if (! mn_authenticated_mailbox_get_setting_password(mailbox))
+ {
+ g_signal_handlers_disconnect_by_func(mailbox, self_setting_password_notify_h, self);
+ self_get_password(self, mailbox);
+ }
+ }}
+#line 368 "mn-authenticated-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 190 "mn-authenticated-mailbox-properties.gob"
+static void
+mn_authenticated_mailbox_properties_get_password (MNAuthenticatedMailboxProperties * self, MNAuthenticatedMailbox * mailbox)
+#line 374 "mn-authenticated-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::get_password"
+#line 190 "mn-authenticated-mailbox-properties.gob"
+ g_return_if_fail (self != NULL);
+#line 190 "mn-authenticated-mailbox-properties.gob"
+ g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self));
+#line 190 "mn-authenticated-mailbox-properties.gob"
+ g_return_if_fail (mailbox != NULL);
+#line 383 "mn-authenticated-mailbox-properties.c"
+{
+#line 192 "mn-authenticated-mailbox-properties.gob"
+
+ self_set_password_operation(self, _("Retrieving password from keyring..."));
+
+ selfp->get_password_request = mn_authenticated_mailbox_get_password(mailbox,
+ self_get_password_cb,
+ self);
+ }}
+#line 393 "mn-authenticated-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 200 "mn-authenticated-mailbox-properties.gob"
+static void
+mn_authenticated_mailbox_properties_get_password_cb (GnomeKeyringResult result, GList * list, gpointer data)
+#line 399 "mn-authenticated-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::get_password_cb"
+{
+#line 202 "mn-authenticated-mailbox-properties.gob"
+
+ Self *self = data;
+ const char *password = NULL;
+
+ /*
+ * If the request was cancelled, it is either from dispose() and
+ * self might already have been finalized (since this is a main
+ * loop callback), or it is from set_mailbox() and the password
+ * will be retrieved again. In both cases we must do nothing.
+ */
+ if (result == GNOME_KEYRING_RESULT_CANCELLED)
+ return;
+
+ selfp->get_password_request = NULL;
+
+ if (result == GNOME_KEYRING_RESULT_OK && list)
+ {
+ GnomeKeyringNetworkPasswordData *data = list->data;
+ password = data->password;
+ }
+
+ GDK_THREADS_ENTER();
+
+ gtk_entry_set_text(GTK_ENTRY(self->password_entry), password ? password : "");
+ self_set_password_operation(self, NULL);
+
+ /* do not call gdk_flush(), we're normally in the main thread */
+ GDK_THREADS_LEAVE();
+ }}
+#line 433 "mn-authenticated-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 232 "mn-authenticated-mailbox-properties.gob"
static MNMailbox *
-___4_mn_authenticated_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 221 "mn-authenticated-mailbox-properties.c"
+___9_mn_authenticated_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED)
+#line 439 "mn-authenticated-mailbox-properties.c"
#define PARENT_HANDLER(___properties) \
((MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)? \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)(___properties): \
@@ -225,42 +443,80 @@ ___4_mn_authenticated_mailbox_properties_get_mailbox (MNMailboxProperties * prop
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::get_mailbox"
{
-#line 109 "mn-authenticated-mailbox-properties.gob"
+#line 234 "mn-authenticated-mailbox-properties.gob"
Self *self = SELF(properties);
MNMailbox *mailbox;
+ MNAuthenticatedMailbox *auth_mailbox;
const char *username;
const char *password;
mailbox = PARENT_HANDLER(properties);
+ auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
username = gtk_entry_get_text(GTK_ENTRY(self->username_entry));
password = gtk_entry_get_text(GTK_ENTRY(self->password_entry));
- g_object_set(mailbox,
- MN_AUTHENTICATED_MAILBOX_PROP_USERNAME((char *) (*username ? username : NULL)),
- MN_AUTHENTICATED_MAILBOX_PROP_PASSWORD((char *) (*password ? password : NULL)),
- NULL);
+ auth_mailbox->username = g_strdup(username);
+ if (*password)
+ auth_mailbox->password = g_strdup(password);
return mailbox;
}}
-#line 248 "mn-authenticated-mailbox-properties.c"
+#line 467 "mn-authenticated-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 128 "mn-authenticated-mailbox-properties.gob"
+#line 254 "mn-authenticated-mailbox-properties.gob"
+static void
+mn_authenticated_mailbox_properties_set_password_operation (MNAuthenticatedMailboxProperties * self, const char * operation)
+#line 474 "mn-authenticated-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::set_password_operation"
+#line 254 "mn-authenticated-mailbox-properties.gob"
+ g_return_if_fail (self != NULL);
+#line 254 "mn-authenticated-mailbox-properties.gob"
+ g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self));
+#line 481 "mn-authenticated-mailbox-properties.c"
+{
+#line 256 "mn-authenticated-mailbox-properties.gob"
+
+ GtkWidget *password_widget;
+
+ gtk_label_set_text(GTK_LABEL(selfp->password_operation_label), operation);
+
+ if (operation)
+ password_widget = selfp->password_operation_label;
+ else
+ password_widget = self->password_entry;
+
+ if (password_widget != selfp->password_widget)
+ {
+ gtk_container_remove(GTK_CONTAINER(self->password_vbox), selfp->password_widget);
+
+ gtk_box_pack_start(GTK_BOX(self->password_vbox), password_widget, TRUE, TRUE, 0);
+ gtk_widget_show(password_widget);
+ selfp->password_widget = password_widget;
+
+ mn_mailbox_properties_notify_complete(MN_MAILBOX_PROPERTIES(self));
+ }
+ }}
+#line 505 "mn-authenticated-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 278 "mn-authenticated-mailbox-properties.gob"
void
mn_authenticated_mailbox_properties_get_contents (MNAuthenticatedMailboxProperties * self, const char ** username, const char ** password)
-#line 255 "mn-authenticated-mailbox-properties.c"
+#line 511 "mn-authenticated-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::get_contents"
-#line 128 "mn-authenticated-mailbox-properties.gob"
+#line 278 "mn-authenticated-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 128 "mn-authenticated-mailbox-properties.gob"
+#line 278 "mn-authenticated-mailbox-properties.gob"
g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self));
-#line 262 "mn-authenticated-mailbox-properties.c"
+#line 518 "mn-authenticated-mailbox-properties.c"
{
-#line 132 "mn-authenticated-mailbox-properties.gob"
+#line 282 "mn-authenticated-mailbox-properties.gob"
if (username)
{
@@ -277,5 +533,31 @@ mn_authenticated_mailbox_properties_get_contents (MNAuthenticatedMailboxProperti
*password = *_password ? _password : NULL;
}
}}
-#line 281 "mn-authenticated-mailbox-properties.c"
+#line 537 "mn-authenticated-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 299 "mn-authenticated-mailbox-properties.gob"
+gboolean
+mn_authenticated_mailbox_properties_is_complete (MNAuthenticatedMailboxProperties * self)
+#line 543 "mn-authenticated-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox:Properties::is_complete"
+#line 299 "mn-authenticated-mailbox-properties.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 299 "mn-authenticated-mailbox-properties.gob"
+ g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX_PROPERTIES (self), (gboolean )0);
+#line 550 "mn-authenticated-mailbox-properties.c"
+{
+#line 301 "mn-authenticated-mailbox-properties.gob"
+
+ const char *username;
+
+ if (selfp->password_widget == selfp->password_operation_label)
+ return FALSE;
+
+ username = gtk_entry_get_text(GTK_ENTRY(self->username_entry));
+
+ return *username != 0;
+ }}
+#line 563 "mn-authenticated-mailbox-properties.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-authenticated-mailbox-properties.gob b/src/mn-authenticated-mailbox-properties.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -24,11 +24,15 @@ requires 2.0.14
#include "mn-mailbox-properties.h"
%}
+%privateheader{
+#include "mn-authenticated-mailbox.h"
+%}
+
%{
#include "config.h"
#include <glib/gi18n.h>
-#include "mn-authenticated-mailbox.h"
#include "mn-mailbox-properties-private.h"
+#include "mn-util.h"
%}
class MN:Authenticated:Mailbox:Properties from MN:Mailbox:Properties (abstract)
@@ -39,7 +43,12 @@ class MN:Authenticated:Mailbox:Properties from MN:Mailbox:Properties (abstract)
protected GtkWidget *username_entry;
protected GtkWidget *password_vbox;
protected GtkWidget *password_label;
- protected GtkWidget *password_entry;
+ protected GtkWidget *password_entry unrefwith g_object_unref;
+ private GtkWidget *password_operation_label unrefwith g_object_unref;
+ private GtkWidget *password_widget;
+
+ private MNAuthenticatedMailbox *mailbox_setting_password;
+ private gpointer get_password_request;
init (self)
{
@@ -58,6 +67,18 @@ class MN:Authenticated:Mailbox:Properties from MN:Mailbox:Properties (abstract)
&self->password_label,
&self->password_entry);
+ selfp->password_operation_label = gtk_label_new(NULL);
+ gtk_misc_set_alignment(GTK_MISC(selfp->password_operation_label), 0.0, 0.5);
+
+ /*
+ * These two widgets will alternate in their parent container so
+ * we need to reference them.
+ */
+ mn_gtk_object_ref_and_sink(GTK_OBJECT(self->password_entry));
+ mn_gtk_object_ref_and_sink(GTK_OBJECT(selfp->password_operation_label));
+
+ selfp->password_widget = self->password_entry;
+
/* defaults to the login name */
username = g_get_user_name();
if (username)
@@ -66,6 +87,17 @@ class MN:Authenticated:Mailbox:Properties from MN:Mailbox:Properties (abstract)
gtk_entry_set_visibility(GTK_ENTRY(self->password_entry), FALSE);
}
+ /* dispose and not finalize because we use unrefwith above */
+ override (G:Object) void
+ dispose (GObject *object)
+ {
+ Self *self = SELF(object);
+
+ self_clear_mailbox_callbacks(self);
+
+ PARENT_HANDLER(object);
+ }
+
protected GtkWidget *
field_new (self,
const char *mnemonic (check null),
@@ -100,8 +132,101 @@ class MN:Authenticated:Mailbox:Properties from MN:Mailbox:Properties (abstract)
Self *self = SELF(properties);
MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
- gtk_entry_set_text(GTK_ENTRY(self->username_entry), auth_mailbox->username ? auth_mailbox->username : "");
- gtk_entry_set_text(GTK_ENTRY(self->password_entry), auth_mailbox->password ? auth_mailbox->password : "");
+ self_clear_mailbox_callbacks(self);
+
+ gtk_entry_set_text(GTK_ENTRY(self->username_entry), auth_mailbox->username);
+
+ /*
+ * If the password is currently being saved, wait for that
+ * operation to finish before querying the keyring for the
+ * password.
+ */
+ if (mn_authenticated_mailbox_get_setting_password(auth_mailbox))
+ {
+ selfp->mailbox_setting_password = g_object_ref(auth_mailbox);
+ g_signal_connect(auth_mailbox, "notify::setting-password", G_CALLBACK(self_setting_password_notify_h), self);
+ self_set_password_operation(self, _("Saving password to keyring..."));
+ }
+ else
+ self_get_password(self, auth_mailbox);
+ }
+
+ private void
+ clear_mailbox_callbacks (self)
+ {
+ if (selfp->mailbox_setting_password)
+ {
+ g_signal_handlers_disconnect_by_func(selfp->mailbox_setting_password, self_setting_password_notify_h, self);
+ g_object_unref(selfp->mailbox_setting_password);
+ selfp->mailbox_setting_password = NULL;
+ }
+
+ if (selfp->get_password_request)
+ {
+ gnome_keyring_cancel_request(selfp->get_password_request);
+ selfp->get_password_request = NULL;
+ }
+ }
+
+ private void
+ setting_password_notify_h (GObject *object,
+ GParamSpec *pspec,
+ gpointer user_data)
+ {
+ Self *self = user_data;
+ MNAuthenticatedMailbox *mailbox = MN_AUTHENTICATED_MAILBOX(object);
+
+ /*
+ * If the password save operation is finished, we can query the
+ * keyring for the password.
+ */
+ if (! mn_authenticated_mailbox_get_setting_password(mailbox))
+ {
+ g_signal_handlers_disconnect_by_func(mailbox, self_setting_password_notify_h, self);
+ self_get_password(self, mailbox);
+ }
+ }
+
+ private void
+ get_password (self, MN:Authenticated:Mailbox *mailbox (check null))
+ {
+ self_set_password_operation(self, _("Retrieving password from keyring..."));
+
+ selfp->get_password_request = mn_authenticated_mailbox_get_password(mailbox,
+ self_get_password_cb,
+ self);
+ }
+
+ private void
+ get_password_cb (GnomeKeyringResult result, GList *list, gpointer data)
+ {
+ Self *self = data;
+ const char *password = NULL;
+
+ /*
+ * If the request was cancelled, it is either from dispose() and
+ * self might already have been finalized (since this is a main
+ * loop callback), or it is from set_mailbox() and the password
+ * will be retrieved again. In both cases we must do nothing.
+ */
+ if (result == GNOME_KEYRING_RESULT_CANCELLED)
+ return;
+
+ selfp->get_password_request = NULL;
+
+ if (result == GNOME_KEYRING_RESULT_OK && list)
+ {
+ GnomeKeyringNetworkPasswordData *data = list->data;
+ password = data->password;
+ }
+
+ GDK_THREADS_ENTER();
+
+ gtk_entry_set_text(GTK_ENTRY(self->password_entry), password ? password : "");
+ self_set_password_operation(self, NULL);
+
+ /* do not call gdk_flush(), we're normally in the main thread */
+ GDK_THREADS_LEAVE();
}
override (MN:Mailbox:Properties) MNMailbox *
@@ -109,22 +234,47 @@ class MN:Authenticated:Mailbox:Properties from MN:Mailbox:Properties (abstract)
{
Self *self = SELF(properties);
MNMailbox *mailbox;
+ MNAuthenticatedMailbox *auth_mailbox;
const char *username;
const char *password;
mailbox = PARENT_HANDLER(properties);
+ auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
username = gtk_entry_get_text(GTK_ENTRY(self->username_entry));
password = gtk_entry_get_text(GTK_ENTRY(self->password_entry));
- g_object_set(mailbox,
- MN_AUTHENTICATED_MAILBOX_PROP_USERNAME((char *) (*username ? username : NULL)),
- MN_AUTHENTICATED_MAILBOX_PROP_PASSWORD((char *) (*password ? password : NULL)),
- NULL);
+ auth_mailbox->username = g_strdup(username);
+ if (*password)
+ auth_mailbox->password = g_strdup(password);
return mailbox;
}
+ private void
+ set_password_operation (self, const char *operation)
+ {
+ GtkWidget *password_widget;
+
+ gtk_label_set_text(GTK_LABEL(selfp->password_operation_label), operation);
+
+ if (operation)
+ password_widget = selfp->password_operation_label;
+ else
+ password_widget = self->password_entry;
+
+ if (password_widget != selfp->password_widget)
+ {
+ gtk_container_remove(GTK_CONTAINER(self->password_vbox), selfp->password_widget);
+
+ gtk_box_pack_start(GTK_BOX(self->password_vbox), password_widget, TRUE, TRUE, 0);
+ gtk_widget_show(password_widget);
+ selfp->password_widget = password_widget;
+
+ mn_mailbox_properties_notify_complete(MN_MAILBOX_PROPERTIES(self));
+ }
+ }
+
protected void
get_contents (self,
const char **username,
@@ -145,4 +295,17 @@ class MN:Authenticated:Mailbox:Properties from MN:Mailbox:Properties (abstract)
*password = *_password ? _password : NULL;
}
}
+
+ protected gboolean
+ is_complete (self)
+ {
+ const char *username;
+
+ if (selfp->password_widget == selfp->password_operation_label)
+ return FALSE;
+
+ username = gtk_entry_get_text(GTK_ENTRY(self->username_entry));
+
+ return *username != 0;
+ }
}
diff --git a/src/mn-authenticated-mailbox-properties.h b/src/mn-authenticated-mailbox-properties.h
@@ -26,6 +26,9 @@ extern "C" {
#define MN_AUTHENTICATED_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_authenticated_mailbox_properties_get_type(), MNAuthenticatedMailboxPropertiesClass)
+/* Private structure type */
+typedef struct _MNAuthenticatedMailboxPropertiesPrivate MNAuthenticatedMailboxPropertiesPrivate;
+
/*
* Main object structure
*/
@@ -43,6 +46,7 @@ struct _MNAuthenticatedMailboxProperties {
GtkWidget * password_vbox; /* protected */
GtkWidget * password_label; /* protected */
GtkWidget * password_entry; /* protected */
+ MNAuthenticatedMailboxPropertiesPrivate *_priv;
};
/*
diff --git a/src/mn-authenticated-mailbox.c b/src/mn-authenticated-mailbox.c
@@ -22,13 +22,18 @@
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */
-#line 26 "mn-authenticated-mailbox.gob"
+#line 31 "mn-authenticated-mailbox.gob"
#include "config.h"
+#include <glib/gi18n.h>
+#include <gnome.h>
+#include <eel/eel.h>
#include "mn-mailbox-private.h"
+#include "mn-shell.h"
#include "mn-util.h"
+#include "mn-keyring.h"
-#line 32 "mn-authenticated-mailbox.c"
+#line 37 "mn-authenticated-mailbox.c"
/* self casting macros */
#define SELF(x) MN_AUTHENTICATED_MAILBOX(x)
#define SELF_CONST(x) MN_AUTHENTICATED_MAILBOX_CONST(x)
@@ -46,23 +51,53 @@ typedef MNAuthenticatedMailboxClass SelfClass;
static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void mn_authenticated_mailbox_init (MNAuthenticatedMailbox * o) G_GNUC_UNUSED;
-static void mn_authenticated_mailbox_class_init (MNAuthenticatedMailboxClass * c) G_GNUC_UNUSED;
-static void ___1_mn_authenticated_mailbox_check (MNMailbox * mailbox) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_class_init (MNAuthenticatedMailboxClass * class) G_GNUC_UNUSED;
+static void ___3_mn_authenticated_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
+static void ___4_mn_authenticated_mailbox_added (MNMailbox * mailbox) G_GNUC_UNUSED;
+static void ___5_mn_authenticated_mailbox_removed (MNMailbox * mailbox) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_set_password (MNAuthenticatedMailbox * self) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_set_password_cb (GnomeKeyringResult result, guint32 item_id, gpointer data) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_set_set_password_request (MNAuthenticatedMailbox * self, gpointer request) G_GNUC_UNUSED;
+static void ___9_mn_authenticated_mailbox_check (MNMailbox * mailbox) G_GNUC_UNUSED;
static void mn_authenticated_mailbox_check_thread_cb (MNAuthenticatedMailbox * self) G_GNUC_UNUSED;
+static void ___real_mn_authenticated_mailbox_authenticated_check (MNAuthenticatedMailbox * self);
static void mn_authenticated_mailbox_authenticated_check (MNAuthenticatedMailbox * self) G_GNUC_UNUSED;
+static char * mn_authenticated_mailbox_get_password_sync (MNAuthenticatedMailbox * self) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_get_password_sync_request_cb (gpointer request, gpointer data) G_GNUC_UNUSED;
+static gboolean mn_authenticated_mailbox_prompt_for_password (MNAuthenticatedMailbox * self, char ** password, const char * format, ...) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_set_prompted_password (MNAuthenticatedMailbox * self, const char * keyring, const char * password) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_set_prompted_password_request_cb (gpointer request, gpointer data) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_handle_set_password_result (MNAuthenticatedMailbox * self, GnomeKeyringResult result) G_GNUC_UNUSED;
+static void mn_authenticated_mailbox_delete_password (MNAuthenticatedMailbox * self, const char * keyring, guint32 item_id) G_GNUC_UNUSED;
enum {
PROP_0,
PROP_USERNAME,
- PROP_PASSWORD
+ PROP_PASSWORD,
+ PROP_SETTING_PASSWORD
};
/* pointer to the class of our parent */
static MNMailboxClass *parent_class = NULL;
/* Short form macros */
+#define self_get_setting_password mn_authenticated_mailbox_get_setting_password
+#define self_set_password mn_authenticated_mailbox_set_password
+#define self_set_password_cb mn_authenticated_mailbox_set_password_cb
+#define self_set_set_password_request mn_authenticated_mailbox_set_set_password_request
#define self_check_thread_cb mn_authenticated_mailbox_check_thread_cb
#define self_authenticated_check mn_authenticated_mailbox_authenticated_check
+#define self_parse_username mn_authenticated_mailbox_parse_username
+#define self_fill_password mn_authenticated_mailbox_fill_password
+#define self_get_password_sync mn_authenticated_mailbox_get_password_sync
+#define self_get_password_sync_request_cb mn_authenticated_mailbox_get_password_sync_request_cb
+#define self_auth_failed mn_authenticated_mailbox_auth_failed
+#define self_prompt_for_password mn_authenticated_mailbox_prompt_for_password
+#define self_set_prompted_password mn_authenticated_mailbox_set_prompted_password
+#define self_set_prompted_password_request_cb mn_authenticated_mailbox_set_prompted_password_request_cb
+#define self_handle_set_password_result mn_authenticated_mailbox_handle_set_password_result
+#define self_get_password mn_authenticated_mailbox_get_password
+#define self_delete_password mn_authenticated_mailbox_delete_password
GType
mn_authenticated_mailbox_get_type (void)
{
@@ -114,12 +149,33 @@ ___finalize(GObject *obj_self)
gpointer priv G_GNUC_UNUSED = self->_priv;
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 34 "mn-authenticated-mailbox.gob"
+#line 44 "mn-authenticated-mailbox.gob"
if(self->username) { g_free ((gpointer) self->username); self->username = NULL; }
-#line 120 "mn-authenticated-mailbox.c"
-#line 37 "mn-authenticated-mailbox.gob"
+#line 155 "mn-authenticated-mailbox.c"
+#line 60 "mn-authenticated-mailbox.gob"
if(self->password) { g_free ((gpointer) self->password); self->password = NULL; }
-#line 123 "mn-authenticated-mailbox.c"
+#line 158 "mn-authenticated-mailbox.c"
+#line 64 "mn-authenticated-mailbox.gob"
+ if(self->keyring_username) { g_free ((gpointer) self->keyring_username); self->keyring_username = NULL; }
+#line 161 "mn-authenticated-mailbox.c"
+#line 65 "mn-authenticated-mailbox.gob"
+ if(self->keyring_domain) { g_free ((gpointer) self->keyring_domain); self->keyring_domain = NULL; }
+#line 164 "mn-authenticated-mailbox.c"
+#line 66 "mn-authenticated-mailbox.gob"
+ if(self->keyring_server) { g_free ((gpointer) self->keyring_server); self->keyring_server = NULL; }
+#line 167 "mn-authenticated-mailbox.c"
+#line 67 "mn-authenticated-mailbox.gob"
+ if(self->keyring_protocol) { g_free ((gpointer) self->keyring_protocol); self->keyring_protocol = NULL; }
+#line 170 "mn-authenticated-mailbox.c"
+#line 68 "mn-authenticated-mailbox.gob"
+ if(self->keyring_authtype) { g_free ((gpointer) self->keyring_authtype); self->keyring_authtype = NULL; }
+#line 173 "mn-authenticated-mailbox.c"
+#line 81 "mn-authenticated-mailbox.gob"
+ if(self->runtime_password) { g_free ((gpointer) self->runtime_password); self->runtime_password = NULL; }
+#line 176 "mn-authenticated-mailbox.c"
+#line 88 "mn-authenticated-mailbox.gob"
+ if(self->_priv->prompted_password_keyring) { g_free ((gpointer) self->_priv->prompted_password_keyring); self->_priv->prompted_password_keyring = NULL; }
+#line 179 "mn-authenticated-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -130,21 +186,30 @@ mn_authenticated_mailbox_init (MNAuthenticatedMailbox * o G_GNUC_UNUSED)
o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_AUTHENTICATED_MAILBOX,MNAuthenticatedMailboxPrivate);
}
#undef __GOB_FUNCTION__
+#line 91 "mn-authenticated-mailbox.gob"
static void
-mn_authenticated_mailbox_class_init (MNAuthenticatedMailboxClass * c G_GNUC_UNUSED)
+mn_authenticated_mailbox_class_init (MNAuthenticatedMailboxClass * class G_GNUC_UNUSED)
+#line 193 "mn-authenticated-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
- MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)c;
+ GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
+ MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)class;
- g_type_class_add_private(c,sizeof(MNAuthenticatedMailboxPrivate));
+ g_type_class_add_private(class,sizeof(MNAuthenticatedMailboxPrivate));
parent_class = g_type_class_ref (MN_TYPE_MAILBOX);
-#line 42 "mn-authenticated-mailbox.gob"
- mn_mailbox_class->check = ___1_mn_authenticated_mailbox_check;
-#line 147 "mn-authenticated-mailbox.c"
- c->authenticated_check = NULL;
+#line 101 "mn-authenticated-mailbox.gob"
+ mn_mailbox_class->seal = ___3_mn_authenticated_mailbox_seal;
+#line 114 "mn-authenticated-mailbox.gob"
+ mn_mailbox_class->added = ___4_mn_authenticated_mailbox_added;
+#line 134 "mn-authenticated-mailbox.gob"
+ mn_mailbox_class->removed = ___5_mn_authenticated_mailbox_removed;
+#line 211 "mn-authenticated-mailbox.gob"
+ mn_mailbox_class->check = ___9_mn_authenticated_mailbox_check;
+#line 242 "mn-authenticated-mailbox.gob"
+ class->authenticated_check = ___real_mn_authenticated_mailbox_authenticated_check;
+#line 213 "mn-authenticated-mailbox.c"
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
g_object_class->set_property = ___object_set_property;
@@ -156,7 +221,7 @@ mn_authenticated_mailbox_class_init (MNAuthenticatedMailboxClass * c G_GNUC_UNUS
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_USERNAME,
param_spec);
@@ -165,11 +230,32 @@ mn_authenticated_mailbox_class_init (MNAuthenticatedMailboxClass * c G_GNUC_UNUS
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD));
g_object_class_install_property (g_object_class,
PROP_PASSWORD,
param_spec);
+ param_spec = g_param_spec_boolean
+ ("setting_password" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ FALSE /* default_value */,
+ (GParamFlags)(G_PARAM_READABLE));
+ g_object_class_install_property (g_object_class,
+ PROP_SETTING_PASSWORD,
+ param_spec);
}
+ {
+#line 92 "mn-authenticated-mailbox.gob"
+
+ /*
+ * We might need to save the password to the keyring before the
+ * first check, so we will call mn_mailbox_enable_checking()
+ * ourselves.
+ */
+ MN_MAILBOX_CLASS(class)->enable_checking_when_added = FALSE;
+
+#line 258 "mn-authenticated-mailbox.c"
+ }
}
#undef __GOB_FUNCTION__
@@ -187,16 +273,16 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_USERNAME:
{
-#line 35 "mn-authenticated-mailbox.gob"
+#line 45 "mn-authenticated-mailbox.gob"
{ char *old = self->username; self->username = g_value_dup_string (VAL); g_free (old); }
-#line 193 "mn-authenticated-mailbox.c"
+#line 279 "mn-authenticated-mailbox.c"
}
break;
case PROP_PASSWORD:
{
-#line 38 "mn-authenticated-mailbox.gob"
+#line 61 "mn-authenticated-mailbox.gob"
{ char *old = self->password; self->password = g_value_dup_string (VAL); g_free (old); }
-#line 200 "mn-authenticated-mailbox.c"
+#line 286 "mn-authenticated-mailbox.c"
}
break;
default:
@@ -225,16 +311,25 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_USERNAME:
{
-#line 35 "mn-authenticated-mailbox.gob"
+#line 45 "mn-authenticated-mailbox.gob"
g_value_set_string (VAL, self->username);
-#line 231 "mn-authenticated-mailbox.c"
+#line 317 "mn-authenticated-mailbox.c"
}
break;
case PROP_PASSWORD:
{
-#line 38 "mn-authenticated-mailbox.gob"
+#line 61 "mn-authenticated-mailbox.gob"
g_value_set_string (VAL, self->password);
-#line 238 "mn-authenticated-mailbox.c"
+#line 324 "mn-authenticated-mailbox.c"
+ }
+ break;
+ case PROP_SETTING_PASSWORD:
+ {
+#line 75 "mn-authenticated-mailbox.gob"
+
+ g_value_set_boolean(VAL, selfp->set_password_request != NULL);
+
+#line 333 "mn-authenticated-mailbox.c"
}
break;
default:
@@ -250,18 +345,209 @@ g_value_set_string (VAL, self->password);
#undef __GOB_FUNCTION__
+#line 75 "mn-authenticated-mailbox.gob"
+gboolean
+mn_authenticated_mailbox_get_setting_password (MNAuthenticatedMailbox * self)
+#line 352 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::get_setting_password"
+{
+#line 74 "mn-authenticated-mailbox.gob"
+ gboolean val; g_object_get (G_OBJECT (self), "setting_password", &val, NULL); return val;
+}}
+#line 359 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
-#line 42 "mn-authenticated-mailbox.gob"
+#line 101 "mn-authenticated-mailbox.gob"
static void
-___1_mn_authenticated_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 258 "mn-authenticated-mailbox.c"
+___3_mn_authenticated_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
+#line 366 "mn-authenticated-mailbox.c"
+#define PARENT_HANDLER(___mailbox) \
+ { if(MN_MAILBOX_CLASS(parent_class)->seal) \
+ (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::seal"
+{
+#line 103 "mn-authenticated-mailbox.gob"
+
+ Self *self = SELF(mailbox);
+
+ PARENT_HANDLER(mailbox);
+
+ if (self->password)
+ mn_shell->mailboxes->must_save_after_load = TRUE;
+
+ self_parse_username(self, &self->keyring_username, &self->keyring_domain);
+ }}
+#line 384 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 114 "mn-authenticated-mailbox.gob"
+static void
+___4_mn_authenticated_mailbox_added (MNMailbox * mailbox G_GNUC_UNUSED)
+#line 391 "mn-authenticated-mailbox.c"
+#define PARENT_HANDLER(___mailbox) \
+ { if(MN_MAILBOX_CLASS(parent_class)->added) \
+ (* MN_MAILBOX_CLASS(parent_class)->added)(___mailbox); }
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::added"
+{
+#line 116 "mn-authenticated-mailbox.gob"
+
+ Self *self = SELF(mailbox);
+
+ PARENT_HANDLER(mailbox);
+
+ /*
+ * If self->password is set, the password must be saved to the
+ * keyring (either because the user has just added the mailbox or
+ * because a mailboxes.xml produced by an older version of MN was
+ * loaded). Checking will be enabled after the password has been
+ * saved. Otherwise we must enable checking immediately.
+ */
+ if (self->password)
+ self_set_password(self);
+ else
+ mn_mailbox_enable_checking(mailbox);
+ }}
+#line 416 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 134 "mn-authenticated-mailbox.gob"
+static void
+___5_mn_authenticated_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
+#line 423 "mn-authenticated-mailbox.c"
+#define PARENT_HANDLER(___mailbox) \
+ { if(MN_MAILBOX_CLASS(parent_class)->removed) \
+ (* MN_MAILBOX_CLASS(parent_class)->removed)(___mailbox); }
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::removed"
+{
+#line 136 "mn-authenticated-mailbox.gob"
+
+ Self *self = SELF(mailbox);
+
+ PARENT_HANDLER(mailbox);
+
+ if (selfp->auth_dialog)
+ gtk_dialog_response(GTK_DIALOG(selfp->auth_dialog), GTK_RESPONSE_CANCEL);
+
+ if (selfp->get_password_request)
+ gnome_keyring_cancel_request(selfp->get_password_request);
+
+ if (selfp->set_password_request)
+ gnome_keyring_cancel_request(selfp->set_password_request);
+
+ /*
+ * We do not remove the password from the keyring, since it is
+ * meant to be shared with other applications
+ */
+ }}
+#line 450 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 156 "mn-authenticated-mailbox.gob"
+static void
+mn_authenticated_mailbox_set_password (MNAuthenticatedMailbox * self)
+#line 457 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::set_password"
+#line 156 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 156 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self));
+#line 464 "mn-authenticated-mailbox.c"
+{
+#line 158 "mn-authenticated-mailbox.gob"
+
+ g_assert(self->password != NULL);
+ g_assert(selfp->set_password_request == NULL);
+
+ g_object_ref(self);
+ self_set_set_password_request(self,
+ gnome_keyring_set_network_password(NULL,
+ self->keyring_username,
+ self->keyring_domain,
+ self->keyring_server,
+ NULL,
+ self->keyring_protocol,
+ self->keyring_authtype,
+ self->keyring_port,
+ self->password,
+ self_set_password_cb,
+ self,
+ g_object_unref));
+ }}
+#line 486 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 178 "mn-authenticated-mailbox.gob"
+static void
+mn_authenticated_mailbox_set_password_cb (GnomeKeyringResult result, guint32 item_id, gpointer data)
+#line 492 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::set_password_cb"
+{
+#line 182 "mn-authenticated-mailbox.gob"
+
+ Self *self = data;
+
+ GDK_THREADS_ENTER();
+
+ self_set_set_password_request(self, NULL);
+
+ /*
+ * If the mailbox has not been removed, display an error dialog if
+ * the password could not be saved and enable checking.
+ */
+ if (mn_mailbox_get_active(MN_MAILBOX(self)))
+ {
+ self_handle_set_password_result(self, result);
+
+ mn_mailbox_enable_checking(MN_MAILBOX(self));
+ }
+
+ /* do not call gdk_flush(), we're normally in the main thread */
+ GDK_THREADS_LEAVE();
+ }}
+#line 518 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 204 "mn-authenticated-mailbox.gob"
+static void
+mn_authenticated_mailbox_set_set_password_request (MNAuthenticatedMailbox * self, gpointer request)
+#line 524 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::set_set_password_request"
+#line 204 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 204 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self));
+#line 531 "mn-authenticated-mailbox.c"
+{
+#line 206 "mn-authenticated-mailbox.gob"
+
+ selfp->set_password_request = request;
+ g_object_notify(G_OBJECT(self), "setting-password");
+ }}
+#line 538 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 211 "mn-authenticated-mailbox.gob"
+static void
+___9_mn_authenticated_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
+#line 544 "mn-authenticated-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->check) \
(* MN_MAILBOX_CLASS(parent_class)->check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::check"
{
-#line 44 "mn-authenticated-mailbox.gob"
+#line 213 "mn-authenticated-mailbox.gob"
Self *self = SELF(mailbox);
@@ -276,23 +562,23 @@ ___1_mn_authenticated_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
g_object_ref(self);
mn_thread_create((GThreadFunc) self_check_thread_cb, self);
}}
-#line 280 "mn-authenticated-mailbox.c"
+#line 566 "mn-authenticated-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 59 "mn-authenticated-mailbox.gob"
+#line 228 "mn-authenticated-mailbox.gob"
static void
mn_authenticated_mailbox_check_thread_cb (MNAuthenticatedMailbox * self)
-#line 287 "mn-authenticated-mailbox.c"
+#line 573 "mn-authenticated-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::check_thread_cb"
-#line 59 "mn-authenticated-mailbox.gob"
+#line 228 "mn-authenticated-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 59 "mn-authenticated-mailbox.gob"
+#line 228 "mn-authenticated-mailbox.gob"
g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self));
-#line 294 "mn-authenticated-mailbox.c"
+#line 580 "mn-authenticated-mailbox.c"
{
-#line 61 "mn-authenticated-mailbox.gob"
+#line 230 "mn-authenticated-mailbox.gob"
self_authenticated_check(self);
@@ -304,22 +590,431 @@ mn_authenticated_mailbox_check_thread_cb (MNAuthenticatedMailbox * self)
gdk_flush();
GDK_THREADS_LEAVE();
}}
-#line 308 "mn-authenticated-mailbox.c"
+#line 594 "mn-authenticated-mailbox.c"
#undef __GOB_FUNCTION__
-#line 73 "mn-authenticated-mailbox.gob"
+#line 242 "mn-authenticated-mailbox.gob"
static void
mn_authenticated_mailbox_authenticated_check (MNAuthenticatedMailbox * self)
-#line 314 "mn-authenticated-mailbox.c"
+#line 600 "mn-authenticated-mailbox.c"
{
MNAuthenticatedMailboxClass *klass;
-#line 73 "mn-authenticated-mailbox.gob"
+#line 242 "mn-authenticated-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 73 "mn-authenticated-mailbox.gob"
+#line 242 "mn-authenticated-mailbox.gob"
g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self));
-#line 321 "mn-authenticated-mailbox.c"
+#line 607 "mn-authenticated-mailbox.c"
klass = MN_AUTHENTICATED_MAILBOX_GET_CLASS(self);
if(klass->authenticated_check)
(*klass->authenticated_check)(self);
}
+#line 242 "mn-authenticated-mailbox.gob"
+static void
+___real_mn_authenticated_mailbox_authenticated_check (MNAuthenticatedMailbox * self G_GNUC_UNUSED)
+#line 616 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::authenticated_check"
+{
+#line 244 "mn-authenticated-mailbox.gob"
+
+ self->auth_prompted = FALSE;
+ self->auth_cancelled = FALSE;
+ self->auth_failed = FALSE;
+
+ g_free(selfp->prompted_password_keyring);
+ selfp->prompted_password_keyring = NULL;
+
+ selfp->prompted_password_item_id = 0;
+ }}
+#line 631 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 255 "mn-authenticated-mailbox.gob"
+void
+mn_authenticated_mailbox_parse_username (MNAuthenticatedMailbox * self, char ** username, char ** domain)
+#line 637 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::parse_username"
+#line 255 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 255 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self));
+#line 644 "mn-authenticated-mailbox.c"
+{
+#line 257 "mn-authenticated-mailbox.gob"
+
+ char *at;
+
+ at = strrchr(self->username, '@');
+ if (at)
+ {
+ if (username)
+ *username = g_strndup(self->username, at - self->username);
+ if (domain)
+ *domain = g_strdup(at + 1);
+ }
+ else
+ {
+ if (username)
+ *username = g_strdup(self->username);
+ if (domain)
+ *domain = NULL;
+ }
+ }}
+#line 666 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 282 "mn-authenticated-mailbox.gob"
+gboolean
+mn_authenticated_mailbox_fill_password (MNAuthenticatedMailbox * self, gboolean may_prompt)
+#line 672 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::fill_password"
+#line 282 "mn-authenticated-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 282 "mn-authenticated-mailbox.gob"
+ g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self), (gboolean )0);
+#line 679 "mn-authenticated-mailbox.c"
+{
+#line 284 "mn-authenticated-mailbox.gob"
+
+ self->auth_cancelled = FALSE;
+
+ g_free(self->runtime_password);
+ self->runtime_password = self_get_password_sync(self);
+
+ /*
+ * Check if the user removed the mailbox while we were waiting for
+ * the keyring password.
+ */
+ if (! mn_mailbox_get_active(MN_MAILBOX(self)))
+ {
+ self->auth_cancelled = TRUE;
+ return FALSE;
+ }
+
+ if (! self->runtime_password && may_prompt)
+ {
+ GDK_THREADS_ENTER();
+
+ self->auth_prompted = TRUE;
+
+ if (! self_prompt_for_password(self,
+ &self->runtime_password,
+ self->auth_failed
+ /* translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org) */
+ ? _("Mail Notification was unable to log into %s mailbox %s, possibly because the password you have entered is invalid.\n\nPlease re-enter your password.")
+ /* translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org) */
+ : _("Enter your password for %s mailbox %s."),
+ MN_MAILBOX(self)->format,
+ MN_MAILBOX(self)->runtime_name))
+ self->auth_cancelled = TRUE;
+
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
+
+ return ! self->auth_cancelled;
+ }}
+#line 721 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 324 "mn-authenticated-mailbox.gob"
+static char *
+mn_authenticated_mailbox_get_password_sync (MNAuthenticatedMailbox * self)
+#line 727 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::get_password_sync"
+#line 324 "mn-authenticated-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (char * )0);
+#line 324 "mn-authenticated-mailbox.gob"
+ g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self), (char * )0);
+#line 734 "mn-authenticated-mailbox.c"
+{
+#line 326 "mn-authenticated-mailbox.gob"
+
+ return mn_keyring_get_password_sync(self->keyring_username,
+ self->keyring_domain,
+ self->keyring_server,
+ self->keyring_protocol,
+ self->keyring_authtype,
+ self->keyring_port,
+ self_get_password_sync_request_cb,
+ self);
+ }}
+#line 747 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 337 "mn-authenticated-mailbox.gob"
+static void
+mn_authenticated_mailbox_get_password_sync_request_cb (gpointer request, gpointer data)
+#line 753 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::get_password_sync_request_cb"
+{
+#line 339 "mn-authenticated-mailbox.gob"
+
+ Self *self = data;
+
+ selfp->get_password_request = request;
+ }}
+#line 763 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 345 "mn-authenticated-mailbox.gob"
+void
+mn_authenticated_mailbox_auth_failed (MNAuthenticatedMailbox * self)
+#line 769 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::auth_failed"
+#line 345 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 345 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self));
+#line 776 "mn-authenticated-mailbox.c"
+{
+#line 347 "mn-authenticated-mailbox.gob"
+
+ /*
+ * If the password had been entered at the password prompt, we
+ * must remove it from the keyring since the authentication has
+ * failed.
+ */
+ if (self->auth_prompted && selfp->prompted_password_item_id)
+ {
+ self_delete_password(self,
+ selfp->prompted_password_keyring,
+ selfp->prompted_password_item_id);
+
+ g_free(selfp->prompted_password_keyring);
+ selfp->prompted_password_keyring = NULL;
+
+ selfp->prompted_password_item_id = 0;
+ }
+
+ self->auth_failed = TRUE;
+ }}
+#line 799 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 368 "mn-authenticated-mailbox.gob"
+static gboolean
+mn_authenticated_mailbox_prompt_for_password (MNAuthenticatedMailbox * self, char ** password, const char * format, ...)
+#line 805 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::prompt_for_password"
+#line 368 "mn-authenticated-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 368 "mn-authenticated-mailbox.gob"
+ g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self), (gboolean )0);
+#line 368 "mn-authenticated-mailbox.gob"
+ g_return_val_if_fail (password != NULL, (gboolean )0);
+#line 368 "mn-authenticated-mailbox.gob"
+ g_return_val_if_fail (format != NULL, (gboolean )0);
+#line 816 "mn-authenticated-mailbox.c"
+{
+#line 372 "mn-authenticated-mailbox.gob"
+
+ va_list args;
+ char *message;
+ gboolean ok;
+
+ g_return_val_if_fail(selfp->auth_dialog == NULL, FALSE);
+
+ va_start(args, format);
+ message = g_strdup_vprintf(format, args);
+ va_end(args);
+
+ /* keep the title in sync with gnome-authentication-manager */
+
+ /* translators: header capitalization */
+ selfp->auth_dialog = gnome_password_dialog_new(_("Authentication Required"),
+ message,
+ self->username,
+ NULL,
+ FALSE);
+ g_free(message);
+
+ eel_add_weak_pointer(&selfp->auth_dialog);
+
+ gnome_password_dialog_set_show_userpass_buttons(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), FALSE);
+ gnome_password_dialog_set_readonly_username(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), TRUE);
+ gnome_password_dialog_set_show_remember(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), TRUE);
+ gnome_password_dialog_set_remember(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), GNOME_PASSWORD_DIALOG_REMEMBER_SESSION);
+
+ ok = gnome_password_dialog_run_and_block(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
+ if (ok)
+ {
+ GnomePasswordDialogRemember remember;
+
+ *password = gnome_password_dialog_get_password(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
+
+ remember = gnome_password_dialog_get_remember(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
+ if (remember == GNOME_PASSWORD_DIALOG_REMEMBER_SESSION)
+ self_set_prompted_password(self, "session", *password);
+ else if (remember == GNOME_PASSWORD_DIALOG_REMEMBER_FOREVER)
+ self_set_prompted_password(self, NULL, *password);
+ }
+
+ gtk_widget_destroy(selfp->auth_dialog);
+
+ return ok;
+ }}
+#line 865 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 419 "mn-authenticated-mailbox.gob"
+static void
+mn_authenticated_mailbox_set_prompted_password (MNAuthenticatedMailbox * self, const char * keyring, const char * password)
+#line 871 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::set_prompted_password"
+#line 419 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 419 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self));
+#line 419 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (password != NULL);
+#line 880 "mn-authenticated-mailbox.c"
+{
+#line 423 "mn-authenticated-mailbox.gob"
+
+ GnomeKeyringResult result;
+
+ /* do not block the main loop */
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+
+ g_free(selfp->prompted_password_keyring);
+ selfp->prompted_password_keyring = g_strdup(keyring);
+
+ result = mn_keyring_set_password_sync(keyring,
+ self->keyring_username,
+ self->keyring_domain,
+ self->keyring_server,
+ self->keyring_protocol,
+ self->keyring_authtype,
+ self->keyring_port,
+ password,
+ &selfp->prompted_password_item_id,
+ self_set_prompted_password_request_cb,
+ self);
+
+ GDK_THREADS_ENTER();
+
+ self_handle_set_password_result(self, result);
+ }}
+#line 909 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 450 "mn-authenticated-mailbox.gob"
+static void
+mn_authenticated_mailbox_set_prompted_password_request_cb (gpointer request, gpointer data)
+#line 915 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::set_prompted_password_request_cb"
+{
+#line 452 "mn-authenticated-mailbox.gob"
+
+ Self *self = data;
+
+ GDK_THREADS_ENTER();
+
+ self_set_set_password_request(self, request);
+
+ /* do not call gdk_flush(), we're normally in the main thread */
+ GDK_THREADS_LEAVE();
+ }}
+#line 930 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 463 "mn-authenticated-mailbox.gob"
+static void
+mn_authenticated_mailbox_handle_set_password_result (MNAuthenticatedMailbox * self, GnomeKeyringResult result)
+#line 936 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::handle_set_password_result"
+#line 463 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 463 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self));
+#line 943 "mn-authenticated-mailbox.c"
+{
+#line 465 "mn-authenticated-mailbox.gob"
+
+ if (result != GNOME_KEYRING_RESULT_OK && result != GNOME_KEYRING_RESULT_CANCELLED)
+ mn_error_dialog(NULL,
+ _("Unable to save the mailbox password"),
+ /* translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org) */
+ _("The password of %s mailbox %s could not be saved to the keyring."),
+ MN_MAILBOX(self)->format,
+ MN_MAILBOX(self)->runtime_name);
+ }}
+#line 955 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 475 "mn-authenticated-mailbox.gob"
+gpointer
+mn_authenticated_mailbox_get_password (MNAuthenticatedMailbox * self, GnomeKeyringOperationGetListCallback cb, gpointer data)
+#line 961 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::get_password"
+#line 475 "mn-authenticated-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (gpointer )0);
+#line 475 "mn-authenticated-mailbox.gob"
+ g_return_val_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self), (gpointer )0);
+#line 968 "mn-authenticated-mailbox.c"
+{
+#line 479 "mn-authenticated-mailbox.gob"
+
+ return gnome_keyring_find_network_password(self->keyring_username,
+ self->keyring_domain,
+ self->keyring_server,
+ NULL,
+ self->keyring_protocol,
+ self->keyring_authtype,
+ self->keyring_port,
+ cb,
+ data,
+ NULL);
+ }}
+#line 983 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 492 "mn-authenticated-mailbox.gob"
+static void
+mn_authenticated_mailbox_delete_password (MNAuthenticatedMailbox * self, const char * keyring, guint32 item_id)
+#line 989 "mn-authenticated-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Authenticated:Mailbox::delete_password"
+#line 492 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 492 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (MN_IS_AUTHENTICATED_MAILBOX (self));
+#line 492 "mn-authenticated-mailbox.gob"
+ g_return_if_fail (item_id != 0);
+#line 998 "mn-authenticated-mailbox.c"
+{
+#line 496 "mn-authenticated-mailbox.gob"
+
+ char *default_keyring = NULL;
+
+ if (keyring == NULL)
+ {
+ /*
+ * gnome_keyring_item_delete_sync() does not work if the
+ * passed keyring is NULL, so we must get the default keyring.
+ */
+ if (gnome_keyring_get_default_keyring_sync(&default_keyring) != GNOME_KEYRING_RESULT_OK)
+ return;
+
+ keyring = default_keyring;
+ }
+
+ gnome_keyring_item_delete_sync(keyring, item_id);
+
+ g_free(default_keyring);
+ }}
+#line 1020 "mn-authenticated-mailbox.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-authenticated-mailbox.gob b/src/mn-authenticated-mailbox.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -20,25 +20,194 @@
requires 2.0.14
%headertop{
+#include <gnome-keyring.h>
#include "mn-mailbox.h"
%}
+%privateheader{
+#include <gtk/gtk.h>
+%}
+
%{
#include "config.h"
+#include <glib/gi18n.h>
+#include <gnome.h>
+#include <eel/eel.h>
#include "mn-mailbox-private.h"
+#include "mn-shell.h"
#include "mn-util.h"
+#include "mn-keyring.h"
%}
class MN:Authenticated:Mailbox from MN:Mailbox (abstract)
{
public char *username destroywith g_free;
- property STRING username (link, flags = MN_MAILBOX_PARAM_PERMANENT);
+ property STRING username (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE | MN_MAILBOX_PARAM_REQUIRED);
+ /*
+ * Set when:
+ *
+ * - the password is loaded from a mailboxes.xml file produced by
+ * an older version of MN
+ * - a mailbox has just been created by the properties dialog
+ * (where the user has entered a password)
+ *
+ * When the password is set here, it is automatically saved to the
+ * keyring in added(). Is is otherwise unused (when getting the
+ * password, this field is not consulted, the keyring is used
+ * instead).
+ */
public char *password destroywith g_free;
- property STRING password (link, flags = MN_MAILBOX_PARAM_PERMANENT);
+ property STRING password (link, flags = MN_MAILBOX_PARAM_LOAD);
+
+ /* last moment for subclasses to set these attributes is during seal() */
+ protected char *keyring_username destroywith g_free;
+ protected char *keyring_domain destroywith g_free;
+ protected char *keyring_server destroywith g_free;
+ protected char *keyring_protocol destroywith g_free;
+ protected char *keyring_authtype destroywith g_free;
+ protected int keyring_port;
+
+ private gpointer get_password_request;
+ private gpointer set_password_request;
+
+ property BOOLEAN setting_password (export)
+ get {
+ g_value_set_boolean(VAL, selfp->set_password_request != NULL);
+ };
private gboolean checking;
+ public char *runtime_password destroywith g_free;
+
+ private GtkWidget *auth_dialog;
+ protected gboolean auth_prompted;
+ protected gboolean auth_cancelled; /* user pressed Cancel or mailbox removed */
+ protected gboolean auth_failed;
+
+ private char *prompted_password_keyring destroywith g_free;
+ private guint32 prompted_password_item_id;
+
+ class_init (class)
+ {
+ /*
+ * We might need to save the password to the keyring before the
+ * first check, so we will call mn_mailbox_enable_checking()
+ * ourselves.
+ */
+ MN_MAILBOX_CLASS(class)->enable_checking_when_added = FALSE;
+ }
+
+ override (MN:Mailbox) void
+ seal (MNMailbox *mailbox)
+ {
+ Self *self = SELF(mailbox);
+
+ PARENT_HANDLER(mailbox);
+
+ if (self->password)
+ mn_shell->mailboxes->must_save_after_load = TRUE;
+
+ self_parse_username(self, &self->keyring_username, &self->keyring_domain);
+ }
+
+ override (MN:Mailbox) void
+ added (MNMailbox *mailbox)
+ {
+ Self *self = SELF(mailbox);
+
+ PARENT_HANDLER(mailbox);
+
+ /*
+ * If self->password is set, the password must be saved to the
+ * keyring (either because the user has just added the mailbox or
+ * because a mailboxes.xml produced by an older version of MN was
+ * loaded). Checking will be enabled after the password has been
+ * saved. Otherwise we must enable checking immediately.
+ */
+ if (self->password)
+ self_set_password(self);
+ else
+ mn_mailbox_enable_checking(mailbox);
+ }
+
+ override (MN:Mailbox) void
+ removed (MNMailbox *mailbox)
+ {
+ Self *self = SELF(mailbox);
+
+ PARENT_HANDLER(mailbox);
+
+ if (selfp->auth_dialog)
+ gtk_dialog_response(GTK_DIALOG(selfp->auth_dialog), GTK_RESPONSE_CANCEL);
+
+ if (selfp->get_password_request)
+ gnome_keyring_cancel_request(selfp->get_password_request);
+
+ if (selfp->set_password_request)
+ gnome_keyring_cancel_request(selfp->set_password_request);
+
+ /*
+ * We do not remove the password from the keyring, since it is
+ * meant to be shared with other applications
+ */
+ }
+
+ private void
+ set_password (self)
+ {
+ g_assert(self->password != NULL);
+ g_assert(selfp->set_password_request == NULL);
+
+ g_object_ref(self);
+ self_set_set_password_request(self,
+ gnome_keyring_set_network_password(NULL,
+ self->keyring_username,
+ self->keyring_domain,
+ self->keyring_server,
+ NULL,
+ self->keyring_protocol,
+ self->keyring_authtype,
+ self->keyring_port,
+ self->password,
+ self_set_password_cb,
+ self,
+ g_object_unref));
+ }
+
+ private void
+ set_password_cb (GnomeKeyringResult result,
+ guint32 item_id,
+ gpointer data)
+ {
+ Self *self = data;
+
+ GDK_THREADS_ENTER();
+
+ self_set_set_password_request(self, NULL);
+
+ /*
+ * If the mailbox has not been removed, display an error dialog if
+ * the password could not be saved and enable checking.
+ */
+ if (mn_mailbox_get_active(MN_MAILBOX(self)))
+ {
+ self_handle_set_password_result(self, result);
+
+ mn_mailbox_enable_checking(MN_MAILBOX(self));
+ }
+
+ /* do not call gdk_flush(), we're normally in the main thread */
+ GDK_THREADS_LEAVE();
+ }
+
+ private void
+ set_set_password_request (self, gpointer request)
+ {
+ selfp->set_password_request = request;
+ g_object_notify(G_OBJECT(self), "setting-password");
+ }
+
override (MN:Mailbox) void
check (MNMailbox *mailbox)
{
@@ -71,5 +240,276 @@ class MN:Authenticated:Mailbox from MN:Mailbox (abstract)
}
virtual private void
- authenticated_check (self);
+ authenticated_check (self)
+ {
+ self->auth_prompted = FALSE;
+ self->auth_cancelled = FALSE;
+ self->auth_failed = FALSE;
+
+ g_free(selfp->prompted_password_keyring);
+ selfp->prompted_password_keyring = NULL;
+
+ selfp->prompted_password_item_id = 0;
+ }
+
+ protected void
+ parse_username (self, char **username, char **domain)
+ {
+ char *at;
+
+ at = strrchr(self->username, '@');
+ if (at)
+ {
+ if (username)
+ *username = g_strndup(self->username, at - self->username);
+ if (domain)
+ *domain = g_strdup(at + 1);
+ }
+ else
+ {
+ if (username)
+ *username = g_strdup(self->username);
+ if (domain)
+ *domain = NULL;
+ }
+ }
+
+ /*
+ * Returns FALSE if the authentication was cancelled (either because
+ * the user pressed Cancel in the password prompt dialog or because
+ * the mailbox was removed).
+ */
+ protected gboolean
+ fill_password (self, gboolean may_prompt)
+ {
+ self->auth_cancelled = FALSE;
+
+ g_free(self->runtime_password);
+ self->runtime_password = self_get_password_sync(self);
+
+ /*
+ * Check if the user removed the mailbox while we were waiting for
+ * the keyring password.
+ */
+ if (! mn_mailbox_get_active(MN_MAILBOX(self)))
+ {
+ self->auth_cancelled = TRUE;
+ return FALSE;
+ }
+
+ if (! self->runtime_password && may_prompt)
+ {
+ GDK_THREADS_ENTER();
+
+ self->auth_prompted = TRUE;
+
+ if (! self_prompt_for_password(self,
+ &self->runtime_password,
+ self->auth_failed
+ /* translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org) */
+ ? _("Mail Notification was unable to log into %s mailbox %s, possibly because the password you have entered is invalid.\n\nPlease re-enter your password.")
+ /* translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org) */
+ : _("Enter your password for %s mailbox %s."),
+ MN_MAILBOX(self)->format,
+ MN_MAILBOX(self)->runtime_name))
+ self->auth_cancelled = TRUE;
+
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
+
+ return ! self->auth_cancelled;
+ }
+
+ private char *
+ get_password_sync (self)
+ {
+ return mn_keyring_get_password_sync(self->keyring_username,
+ self->keyring_domain,
+ self->keyring_server,
+ self->keyring_protocol,
+ self->keyring_authtype,
+ self->keyring_port,
+ self_get_password_sync_request_cb,
+ self);
+ }
+
+ private void
+ get_password_sync_request_cb (gpointer request, gpointer data)
+ {
+ Self *self = data;
+
+ selfp->get_password_request = request;
+ }
+
+ protected void
+ auth_failed (self)
+ {
+ /*
+ * If the password had been entered at the password prompt, we
+ * must remove it from the keyring since the authentication has
+ * failed.
+ */
+ if (self->auth_prompted && selfp->prompted_password_item_id)
+ {
+ self_delete_password(self,
+ selfp->prompted_password_keyring,
+ selfp->prompted_password_item_id);
+
+ g_free(selfp->prompted_password_keyring);
+ selfp->prompted_password_keyring = NULL;
+
+ selfp->prompted_password_item_id = 0;
+ }
+
+ self->auth_failed = TRUE;
+ }
+
+ private gboolean
+ prompt_for_password (self,
+ char **password (check null),
+ const char *format (check null), ...)
+ {
+ va_list args;
+ char *message;
+ gboolean ok;
+
+ g_return_val_if_fail(selfp->auth_dialog == NULL, FALSE);
+
+ va_start(args, format);
+ message = g_strdup_vprintf(format, args);
+ va_end(args);
+
+ /* keep the title in sync with gnome-authentication-manager */
+
+ /* translators: header capitalization */
+ selfp->auth_dialog = gnome_password_dialog_new(_("Authentication Required"),
+ message,
+ self->username,
+ NULL,
+ FALSE);
+ g_free(message);
+
+ eel_add_weak_pointer(&selfp->auth_dialog);
+
+ gnome_password_dialog_set_show_userpass_buttons(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), FALSE);
+ gnome_password_dialog_set_readonly_username(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), TRUE);
+ gnome_password_dialog_set_show_remember(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), TRUE);
+ gnome_password_dialog_set_remember(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), GNOME_PASSWORD_DIALOG_REMEMBER_SESSION);
+
+ ok = gnome_password_dialog_run_and_block(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
+ if (ok)
+ {
+ GnomePasswordDialogRemember remember;
+
+ *password = gnome_password_dialog_get_password(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
+
+ remember = gnome_password_dialog_get_remember(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
+ if (remember == GNOME_PASSWORD_DIALOG_REMEMBER_SESSION)
+ self_set_prompted_password(self, "session", *password);
+ else if (remember == GNOME_PASSWORD_DIALOG_REMEMBER_FOREVER)
+ self_set_prompted_password(self, NULL, *password);
+ }
+
+ gtk_widget_destroy(selfp->auth_dialog);
+
+ return ok;
+ }
+
+ private void
+ set_prompted_password (self,
+ const char *keyring,
+ const char *password (check null))
+ {
+ GnomeKeyringResult result;
+
+ /* do not block the main loop */
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+
+ g_free(selfp->prompted_password_keyring);
+ selfp->prompted_password_keyring = g_strdup(keyring);
+
+ result = mn_keyring_set_password_sync(keyring,
+ self->keyring_username,
+ self->keyring_domain,
+ self->keyring_server,
+ self->keyring_protocol,
+ self->keyring_authtype,
+ self->keyring_port,
+ password,
+ &selfp->prompted_password_item_id,
+ self_set_prompted_password_request_cb,
+ self);
+
+ GDK_THREADS_ENTER();
+
+ self_handle_set_password_result(self, result);
+ }
+
+ private void
+ set_prompted_password_request_cb (gpointer request, gpointer data)
+ {
+ Self *self = data;
+
+ GDK_THREADS_ENTER();
+
+ self_set_set_password_request(self, request);
+
+ /* do not call gdk_flush(), we're normally in the main thread */
+ GDK_THREADS_LEAVE();
+ }
+
+ private void
+ handle_set_password_result (self, GnomeKeyringResult result)
+ {
+ if (result != GNOME_KEYRING_RESULT_OK && result != GNOME_KEYRING_RESULT_CANCELLED)
+ mn_error_dialog(NULL,
+ _("Unable to save the mailbox password"),
+ /* translators: the first %s is the mailbox format (eg: IMAP) and the second %s is the mailbox name (eg: john@imapserver.org) */
+ _("The password of %s mailbox %s could not be saved to the keyring."),
+ MN_MAILBOX(self)->format,
+ MN_MAILBOX(self)->runtime_name);
+ }
+
+ public gpointer
+ get_password (self,
+ GnomeKeyringOperationGetListCallback cb,
+ gpointer data)
+ {
+ return gnome_keyring_find_network_password(self->keyring_username,
+ self->keyring_domain,
+ self->keyring_server,
+ NULL,
+ self->keyring_protocol,
+ self->keyring_authtype,
+ self->keyring_port,
+ cb,
+ data,
+ NULL);
+ }
+
+ private void
+ delete_password (self,
+ const char *keyring,
+ guint32 item_id (check != 0))
+ {
+ char *default_keyring = NULL;
+
+ if (keyring == NULL)
+ {
+ /*
+ * gnome_keyring_item_delete_sync() does not work if the
+ * passed keyring is NULL, so we must get the default keyring.
+ */
+ if (gnome_keyring_get_default_keyring_sync(&default_keyring) != GNOME_KEYRING_RESULT_OK)
+ return;
+
+ keyring = default_keyring;
+ }
+
+ gnome_keyring_item_delete_sync(keyring, item_id);
+
+ g_free(default_keyring);
+ }
}
diff --git a/src/mn-authenticated-mailbox.h b/src/mn-authenticated-mailbox.h
@@ -4,6 +4,7 @@
#include <glib-object.h>
+#include <gnome-keyring.h>
#include "mn-mailbox.h"
#ifndef __MN_AUTHENTICATED_MAILBOX_H__
@@ -40,7 +41,17 @@ struct _MNAuthenticatedMailbox {
/*< public >*/
char * username;
char * password;
+ char * runtime_password;
/*< private >*/
+ char * keyring_username; /* protected */
+ char * keyring_domain; /* protected */
+ char * keyring_server; /* protected */
+ char * keyring_protocol; /* protected */
+ char * keyring_authtype; /* protected */
+ int keyring_port; /* protected */
+ gboolean auth_prompted; /* protected */
+ gboolean auth_cancelled; /* protected */
+ gboolean auth_failed; /* protected */
MNAuthenticatedMailboxPrivate *_priv;
};
@@ -58,6 +69,10 @@ struct _MNAuthenticatedMailboxClass {
* Public methods
*/
GType mn_authenticated_mailbox_get_type (void);
+gboolean mn_authenticated_mailbox_get_setting_password (MNAuthenticatedMailbox * self);
+gpointer mn_authenticated_mailbox_get_password (MNAuthenticatedMailbox * self,
+ GnomeKeyringOperationGetListCallback cb,
+ gpointer data);
/*
* Argument wrapping macros
@@ -67,11 +82,13 @@ GType mn_authenticated_mailbox_get_type (void);
#define MN_AUTHENTICATED_MAILBOX_GET_PROP_USERNAME(arg) "username", __extension__ ({gchar **z = (arg); z;})
#define MN_AUTHENTICATED_MAILBOX_PROP_PASSWORD(arg) "password", __extension__ ({gchar *z = (arg); z;})
#define MN_AUTHENTICATED_MAILBOX_GET_PROP_PASSWORD(arg) "password", __extension__ ({gchar **z = (arg); z;})
+#define MN_AUTHENTICATED_MAILBOX_GET_PROP_SETTING_PASSWORD(arg) "setting_password", __extension__ ({gboolean *z = (arg); z;})
#else /* __GNUC__ && !__STRICT_ANSI__ */
#define MN_AUTHENTICATED_MAILBOX_PROP_USERNAME(arg) "username",(gchar *)(arg)
#define MN_AUTHENTICATED_MAILBOX_GET_PROP_USERNAME(arg) "username",(gchar **)(arg)
#define MN_AUTHENTICATED_MAILBOX_PROP_PASSWORD(arg) "password",(gchar *)(arg)
#define MN_AUTHENTICATED_MAILBOX_GET_PROP_PASSWORD(arg) "password",(gchar **)(arg)
+#define MN_AUTHENTICATED_MAILBOX_GET_PROP_SETTING_PASSWORD(arg) "setting_password",(gboolean *)(arg)
#endif /* __GNUC__ && !__STRICT_ANSI__ */
diff --git a/src/mn-autodetect-mailbox-properties.c b/src/mn-autodetect-mailbox-properties.c
@@ -340,7 +340,7 @@ mn_autodetect_mailbox_properties_browse_clicked_h (GtkButton * button, gpointer
if (selfp->chooser)
{
- gtk_window_present(GTK_WINDOW(selfp->chooser));
+ mn_window_present_from_event(GTK_WINDOW(selfp->chooser));
return;
}
diff --git a/src/mn-autodetect-mailbox-properties.gob b/src/mn-autodetect-mailbox-properties.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -167,7 +167,7 @@ class MN:Autodetect:Mailbox:Properties from MN:Mailbox:Properties
if (selfp->chooser)
{
- gtk_window_present(GTK_WINDOW(selfp->chooser));
+ mn_window_present_from_event(GTK_WINDOW(selfp->chooser));
return;
}
diff --git a/src/mn-automation.c b/src/mn-automation.c
@@ -45,6 +45,7 @@ static void mn_automation_init (MNAutomation * o) G_GNUC_UNUSED;
static void mn_automation_class_init (MNAutomationClass * c) G_GNUC_UNUSED;
static CORBA_boolean mn_automation_hasMailboxes (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
static CORBA_string mn_automation_getSummary (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
+static void mn_automation_considerNewMailAsRead (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
static void mn_automation_update (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
static void mn_automation_displayProperties (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
static void mn_automation_displayAbout (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
@@ -56,6 +57,7 @@ static BonoboObjectClass *parent_class = NULL;
/* Short form macros */
#define self_hasMailboxes mn_automation_hasMailboxes
#define self_getSummary mn_automation_getSummary
+#define self_considerNewMailAsRead mn_automation_considerNewMailAsRead
#define self_update mn_automation_update
#define self_displayProperties mn_automation_displayProperties
#define self_displayAbout mn_automation_displayAbout
@@ -125,14 +127,16 @@ mn_automation_class_init (MNAutomationClass * c G_GNUC_UNUSED)
#line 40 "mn-automation.gob"
c->_epv.getSummary = self_getSummary;
#line 55 "mn-automation.gob"
- c->_epv.update = self_update;
+ c->_epv.considerNewMailAsRead = self_considerNewMailAsRead;
#line 62 "mn-automation.gob"
- c->_epv.displayProperties = self_displayProperties;
+ c->_epv.update = self_update;
#line 69 "mn-automation.gob"
- c->_epv.displayAbout = self_displayAbout;
+ c->_epv.displayProperties = self_displayProperties;
#line 76 "mn-automation.gob"
+ c->_epv.displayAbout = self_displayAbout;
+#line 83 "mn-automation.gob"
c->_epv.quit = self_quit;
-#line 136 "mn-automation.c"
+#line 140 "mn-automation.c"
}
#undef __GOB_FUNCTION__
@@ -141,7 +145,7 @@ mn_automation_class_init (MNAutomationClass * c G_GNUC_UNUSED)
#line 33 "mn-automation.gob"
static CORBA_boolean
mn_automation_hasMailboxes (PortableServer_Servant servant, CORBA_Environment * env)
-#line 145 "mn-automation.c"
+#line 149 "mn-automation.c"
{
#define __GOB_FUNCTION__ "MN:Automation::hasMailboxes"
{
@@ -150,13 +154,13 @@ mn_automation_hasMailboxes (PortableServer_Servant servant, CORBA_Environment *
g_assert(mn_shell != NULL);
return mn_shell->mailboxes->list != NULL ? CORBA_TRUE : CORBA_FALSE;
}}
-#line 154 "mn-automation.c"
+#line 158 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 40 "mn-automation.gob"
static CORBA_string
mn_automation_getSummary (PortableServer_Servant servant, CORBA_Environment * env)
-#line 160 "mn-automation.c"
+#line 164 "mn-automation.c"
{
#define __GOB_FUNCTION__ "MN:Automation::getSummary"
{
@@ -173,79 +177,94 @@ mn_automation_getSummary (PortableServer_Servant servant, CORBA_Environment * en
return csummary;
}}
-#line 177 "mn-automation.c"
+#line 181 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 55 "mn-automation.gob"
static void
-mn_automation_update (PortableServer_Servant servant, CORBA_Environment * env)
-#line 183 "mn-automation.c"
+mn_automation_considerNewMailAsRead (PortableServer_Servant servant, CORBA_Environment * env)
+#line 187 "mn-automation.c"
{
-#define __GOB_FUNCTION__ "MN:Automation::update"
+#define __GOB_FUNCTION__ "MN:Automation::considerNewMailAsRead"
{
#line 57 "mn-automation.gob"
g_assert(mn_shell != NULL);
- mn_mailboxes_check(mn_shell->mailboxes);
+ mn_shell_consider_new_mail_as_read(mn_shell);
}}
-#line 192 "mn-automation.c"
+#line 196 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 62 "mn-automation.gob"
static void
-mn_automation_displayProperties (PortableServer_Servant servant, CORBA_Environment * env)
-#line 198 "mn-automation.c"
+mn_automation_update (PortableServer_Servant servant, CORBA_Environment * env)
+#line 202 "mn-automation.c"
{
-#define __GOB_FUNCTION__ "MN:Automation::displayProperties"
+#define __GOB_FUNCTION__ "MN:Automation::update"
{
#line 64 "mn-automation.gob"
g_assert(mn_shell != NULL);
- mn_shell_display_properties_dialog(mn_shell);
+ mn_shell_update(mn_shell);
}}
-#line 207 "mn-automation.c"
+#line 211 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 69 "mn-automation.gob"
static void
-mn_automation_displayAbout (PortableServer_Servant servant, CORBA_Environment * env)
-#line 213 "mn-automation.c"
+mn_automation_displayProperties (PortableServer_Servant servant, CORBA_Environment * env)
+#line 217 "mn-automation.c"
{
-#define __GOB_FUNCTION__ "MN:Automation::displayAbout"
+#define __GOB_FUNCTION__ "MN:Automation::displayProperties"
{
#line 71 "mn-automation.gob"
g_assert(mn_shell != NULL);
- mn_shell_display_about_dialog(mn_shell);
+ mn_shell_display_properties_dialog(mn_shell, 0);
}}
-#line 222 "mn-automation.c"
+#line 226 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 76 "mn-automation.gob"
static void
-mn_automation_quit (PortableServer_Servant servant, CORBA_Environment * env)
-#line 228 "mn-automation.c"
+mn_automation_displayAbout (PortableServer_Servant servant, CORBA_Environment * env)
+#line 232 "mn-automation.c"
{
-#define __GOB_FUNCTION__ "MN:Automation::quit"
+#define __GOB_FUNCTION__ "MN:Automation::displayAbout"
{
#line 78 "mn-automation.gob"
g_assert(mn_shell != NULL);
- g_object_unref(mn_shell);
+ mn_shell_display_about_dialog(mn_shell, 0);
}}
-#line 237 "mn-automation.c"
+#line 241 "mn-automation.c"
#undef __GOB_FUNCTION__
#line 83 "mn-automation.gob"
+static void
+mn_automation_quit (PortableServer_Servant servant, CORBA_Environment * env)
+#line 247 "mn-automation.c"
+{
+#define __GOB_FUNCTION__ "MN:Automation::quit"
+{
+#line 85 "mn-automation.gob"
+
+ g_assert(mn_shell != NULL);
+ mn_shell_quit(mn_shell);
+ }}
+#line 256 "mn-automation.c"
+#undef __GOB_FUNCTION__
+
+#line 90 "mn-automation.gob"
MNAutomation *
mn_automation_new (void)
-#line 243 "mn-automation.c"
+#line 262 "mn-automation.c"
{
#define __GOB_FUNCTION__ "MN:Automation::new"
{
-#line 85 "mn-automation.gob"
+#line 92 "mn-automation.gob"
return GET_NEW;
}}
-#line 251 "mn-automation.c"
+#line 270 "mn-automation.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-automation.gob b/src/mn-automation.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -53,31 +53,38 @@ class MN:Automation from Bonobo:Object (BonoboObject GNOME_MailNotification_Auto
}
BonoboObject private void
+ considerNewMailAsRead (PortableServer_Servant servant, CORBA_Environment *env)
+ {
+ g_assert(mn_shell != NULL);
+ mn_shell_consider_new_mail_as_read(mn_shell);
+ }
+
+ BonoboObject private void
update (PortableServer_Servant servant, CORBA_Environment *env)
{
g_assert(mn_shell != NULL);
- mn_mailboxes_check(mn_shell->mailboxes);
+ mn_shell_update(mn_shell);
}
BonoboObject private void
displayProperties (PortableServer_Servant servant, CORBA_Environment *env)
{
g_assert(mn_shell != NULL);
- mn_shell_display_properties_dialog(mn_shell);
+ mn_shell_display_properties_dialog(mn_shell, 0);
}
BonoboObject private void
displayAbout (PortableServer_Servant servant, CORBA_Environment *env)
{
g_assert(mn_shell != NULL);
- mn_shell_display_about_dialog(mn_shell);
+ mn_shell_display_about_dialog(mn_shell, 0);
}
BonoboObject private void
quit (PortableServer_Servant servant, CORBA_Environment *env)
{
g_assert(mn_shell != NULL);
- g_object_unref(mn_shell);
+ mn_shell_quit(mn_shell);
}
public MNAutomation *
diff --git a/src/mn-base-mbox-mailbox-backend.c b/src/mn-base-mbox-mailbox-backend.c
@@ -59,8 +59,8 @@ static void mn_base_mbox_mailbox_backend_init (MNBaseMboxMailboxBackend * o) G_G
static void mn_base_mbox_mailbox_backend_class_init (MNBaseMboxMailboxBackendClass * c) G_GNUC_UNUSED;
static gboolean ___1_mn_base_mbox_mailbox_backend_is (MNVFSMailboxBackend * dummy, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) G_GNUC_UNUSED;
static GType mn_base_mbox_mailbox_backend_get_mailbox_type (GnomeVFSURI * uri) G_GNUC_UNUSED;
-static GMimeParser * mn_base_mbox_mailbox_backend_parser_new (GnomeVFSURI * uri, GnomeVFSHandle ** handle, GnomeVFSResult * result) G_GNUC_UNUSED;
-static void ___4_mn_base_mbox_mailbox_backend_check (MNVFSMailboxBackend * backend, unsigned long check_id) G_GNUC_UNUSED;
+static GMimeParser * mn_base_mbox_mailbox_backend_parser_new (GnomeVFSURI * uri, GnomeVFSResult * result) G_GNUC_UNUSED;
+static void ___4_mn_base_mbox_mailbox_backend_check (MNVFSMailboxBackend * backend, int check_id) G_GNUC_UNUSED;
static MNMessage * mn_base_mbox_mailbox_backend_get_new_message (MNBaseMboxMailboxBackend * self, GMimeMessage * mime_message) G_GNUC_UNUSED;
static GnomeVFSURI * mn_base_mbox_mailbox_backend_get_uncompressed_uri (GnomeVFSURI * uri, GnomeVFSFileInfo * file_info) G_GNUC_UNUSED;
@@ -166,7 +166,7 @@ mn_base_mbox_mailbox_backend_class_init (MNBaseMboxMailboxBackendClass * c G_GNU
#line 57 "mn-base-mbox-mailbox-backend.gob"
mn_vfs_mailbox_backend_class->is = ___1_mn_base_mbox_mailbox_backend_is;
-#line 192 "mn-base-mbox-mailbox-backend.gob"
+#line 194 "mn-base-mbox-mailbox-backend.gob"
mn_vfs_mailbox_backend_class->check = ___4_mn_base_mbox_mailbox_backend_check;
#line 172 "mn-base-mbox-mailbox-backend.c"
c->get_new_message = NULL;
@@ -251,20 +251,26 @@ mn_base_mbox_mailbox_backend_get_mailbox_type (GnomeVFSURI * uri)
#line 109 "mn-base-mbox-mailbox-backend.gob"
GMimeParser *parser;
- GnomeVFSHandle *handle;
GType type = 0;
- parser = self_parser_new(uri, &handle, NULL);
+ parser = self_parser_new(uri, NULL);
if (parser != NULL)
{
if (g_mime_parser_eos(parser))
/*
- * The file is empty. Treat it as a mbox mailbox for
- * now. Whenever the file grows, it will be checked again
- * and at that point we will decide whether it is a mbox
- * mailbox, a Mozilla mailbox or another type of file.
+ * The file is empty. For now, treat it as a mbox mailbox
+ * or, if mbox support was not compiled in, as a Mozilla
+ * mailbox. Whenever the file grows, it will be checked
+ * again and at that point we will decide whether it is a
+ * mbox mailbox, a Mozilla mailbox or another type of file.
*/
- type = MN_TYPE_MBOX_MAILBOX_BACKEND;
+ {
+#if WITH_MBOX
+ type = MN_TYPE_MBOX_MAILBOX_BACKEND;
+#elif WITH_MOZILLA
+ type = MN_TYPE_MOZILLA_MAILBOX_BACKEND;
+#endif
+ }
else
{
/*
@@ -296,45 +302,41 @@ mn_base_mbox_mailbox_backend_get_mailbox_type (GnomeVFSURI * uri)
}
}
g_object_unref(parser);
- gnome_vfs_close(handle);
}
return type;
}}
-#line 305 "mn-base-mbox-mailbox-backend.c"
+#line 310 "mn-base-mbox-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 162 "mn-base-mbox-mailbox-backend.gob"
+#line 167 "mn-base-mbox-mailbox-backend.gob"
static GMimeParser *
-mn_base_mbox_mailbox_backend_parser_new (GnomeVFSURI * uri, GnomeVFSHandle ** handle, GnomeVFSResult * result)
-#line 311 "mn-base-mbox-mailbox-backend.c"
+mn_base_mbox_mailbox_backend_parser_new (GnomeVFSURI * uri, GnomeVFSResult * result)
+#line 316 "mn-base-mbox-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::parser_new"
-#line 162 "mn-base-mbox-mailbox-backend.gob"
+#line 167 "mn-base-mbox-mailbox-backend.gob"
g_return_val_if_fail (uri != NULL, (GMimeParser * )0);
-#line 162 "mn-base-mbox-mailbox-backend.gob"
- g_return_val_if_fail (handle != NULL, (GMimeParser * )0);
-#line 318 "mn-base-mbox-mailbox-backend.c"
+#line 321 "mn-base-mbox-mailbox-backend.c"
{
-#line 166 "mn-base-mbox-mailbox-backend.gob"
+#line 169 "mn-base-mbox-mailbox-backend.gob"
GnomeVFSResult _result;
+ GnomeVFSHandle *handle;
GMimeParser *parser = NULL;
- _result = gnome_vfs_open_uri(handle, uri, GNOME_VFS_OPEN_READ);
+ _result = gnome_vfs_open_uri(&handle, uri, GNOME_VFS_OPEN_READ);
if (_result == GNOME_VFS_OK)
{
GMimeStream *stream;
- stream = mn_gmime_stream_vfs_new(*handle, uri, &_result);
+ stream = mn_gmime_stream_vfs_new(handle, uri, &_result);
if (stream)
{
parser = g_mime_parser_new_with_stream(stream);
g_object_unref(stream);
g_mime_parser_set_scan_from(parser, TRUE);
}
- else
- gnome_vfs_close(*handle);
}
if (result)
@@ -342,47 +344,40 @@ mn_base_mbox_mailbox_backend_parser_new (GnomeVFSURI * uri, GnomeVFSHandle ** ha
return parser;
}}
-#line 346 "mn-base-mbox-mailbox-backend.c"
+#line 348 "mn-base-mbox-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 192 "mn-base-mbox-mailbox-backend.gob"
+#line 194 "mn-base-mbox-mailbox-backend.gob"
static void
-___4_mn_base_mbox_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, unsigned long check_id)
-#line 352 "mn-base-mbox-mailbox-backend.c"
+___4_mn_base_mbox_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, int check_id)
+#line 354 "mn-base-mbox-mailbox-backend.c"
#define PARENT_HANDLER(___backend,___check_id) \
{ if(MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->check) \
(* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->check)(___backend,___check_id); }
{
#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::check"
{
-#line 194 "mn-base-mbox-mailbox-backend.gob"
+#line 196 "mn-base-mbox-mailbox-backend.gob"
Self *self = SELF(backend);
- gboolean aborted;
gboolean polled;
GMimeParser *parser;
- GnomeVFSHandle *handle;
GnomeVFSResult result;
gboolean uri_set;
mn_vfs_mailbox_backend_monitor(backend, check_id, backend->mailbox->uri, GNOME_VFS_MONITOR_FILE);
+ if (mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ return;
+
+ /* the poll property is protected by the GDK lock */
GDK_THREADS_ENTER();
- if (mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- aborted = TRUE;
- else
- {
- aborted = FALSE;
- polled = mn_mailbox_get_poll(MN_MAILBOX(backend->mailbox));
- }
+ polled = mn_mailbox_get_poll(MN_MAILBOX(backend->mailbox));
gdk_flush();
GDK_THREADS_LEAVE();
- if (aborted)
- return;
-
if (polled)
{
GnomeVFSFileInfo *file_info;
@@ -423,7 +418,7 @@ ___4_mn_base_mbox_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UN
selfp->last_mtime = file_info->mtime;
selfp->last_ctime = file_info->ctime;
- if (mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ if (mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
check = FALSE;
}
@@ -443,6 +438,7 @@ ___4_mn_base_mbox_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UN
{
GnomeVFSFileInfo *file_info;
GnomeVFSURI *uri;
+ gboolean aborted;
file_info = gnome_vfs_file_info_new();
if (gnome_vfs_get_file_info_uri(backend->mailbox->vfs_uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS | GNOME_VFS_FILE_INFO_GET_MIME_TYPE) == GNOME_VFS_OK)
@@ -459,8 +455,8 @@ ___4_mn_base_mbox_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UN
selfp->uri = uri;
uri = NULL;
}
- if (mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- aborted = TRUE;
+
+ aborted = mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id);
g_mutex_unlock(selfp->mutex);
@@ -471,11 +467,10 @@ ___4_mn_base_mbox_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UN
return;
}
- parser = self_parser_new(selfp->uri, &handle, &result);
+ parser = self_parser_new(selfp->uri, &result);
if (parser)
{
GSList *messages = NULL;
- GnomeVFSResult close_result;
while (! g_mime_parser_eos(parser))
{
@@ -498,49 +493,45 @@ ___4_mn_base_mbox_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UN
}
g_object_unref(parser);
- close_result = gnome_vfs_close(handle);
GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- {
- if (close_result == GNOME_VFS_OK)
- mn_mailbox_set_messages(MN_MAILBOX(backend->mailbox), messages);
- else
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to close file: %s"), gnome_vfs_result_to_string(close_result));
- }
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ mn_mailbox_set_messages(MN_MAILBOX(backend->mailbox), messages);
mn_g_object_slist_free(messages);
gdk_flush();
GDK_THREADS_LEAVE();
- return;
+ return; /* success */
}
- GDK_THREADS_ENTER();
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ {
+ GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open mailbox: %s"), gnome_vfs_result_to_string(result));
+ mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open mailbox: %s"), gnome_vfs_result_to_string(result));
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
}}
-#line 530 "mn-base-mbox-mailbox-backend.c"
+#line 521 "mn-base-mbox-mailbox-backend.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 365 "mn-base-mbox-mailbox-backend.gob"
+#line 356 "mn-base-mbox-mailbox-backend.gob"
static MNMessage *
mn_base_mbox_mailbox_backend_get_new_message (MNBaseMboxMailboxBackend * self, GMimeMessage * mime_message)
-#line 537 "mn-base-mbox-mailbox-backend.c"
+#line 528 "mn-base-mbox-mailbox-backend.c"
{
MNBaseMboxMailboxBackendClass *klass;
-#line 365 "mn-base-mbox-mailbox-backend.gob"
+#line 356 "mn-base-mbox-mailbox-backend.gob"
g_return_val_if_fail (self != NULL, (MNMessage * )0);
-#line 365 "mn-base-mbox-mailbox-backend.gob"
+#line 356 "mn-base-mbox-mailbox-backend.gob"
g_return_val_if_fail (MN_IS_BASE_MBOX_MAILBOX_BACKEND (self), (MNMessage * )0);
-#line 544 "mn-base-mbox-mailbox-backend.c"
+#line 535 "mn-base-mbox-mailbox-backend.c"
klass = MN_BASE_MBOX_MAILBOX_BACKEND_GET_CLASS(self);
if(klass->get_new_message)
@@ -549,19 +540,19 @@ mn_base_mbox_mailbox_backend_get_new_message (MNBaseMboxMailboxBackend * self, G
return (MNMessage * )(0);
}
-#line 368 "mn-base-mbox-mailbox-backend.gob"
+#line 359 "mn-base-mbox-mailbox-backend.gob"
static GnomeVFSURI *
mn_base_mbox_mailbox_backend_get_uncompressed_uri (GnomeVFSURI * uri, GnomeVFSFileInfo * file_info)
-#line 556 "mn-base-mbox-mailbox-backend.c"
+#line 547 "mn-base-mbox-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:Base:Mbox:Mailbox:Backend::get_uncompressed_uri"
-#line 368 "mn-base-mbox-mailbox-backend.gob"
+#line 359 "mn-base-mbox-mailbox-backend.gob"
g_return_val_if_fail (uri != NULL, (GnomeVFSURI * )0);
-#line 368 "mn-base-mbox-mailbox-backend.gob"
+#line 359 "mn-base-mbox-mailbox-backend.gob"
g_return_val_if_fail (file_info != NULL, (GnomeVFSURI * )0);
-#line 563 "mn-base-mbox-mailbox-backend.c"
+#line 554 "mn-base-mbox-mailbox-backend.c"
{
-#line 371 "mn-base-mbox-mailbox-backend.gob"
+#line 362 "mn-base-mbox-mailbox-backend.gob"
if ((file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE) != 0 && file_info->mime_type)
{
@@ -592,5 +583,5 @@ mn_base_mbox_mailbox_backend_get_uncompressed_uri (GnomeVFSURI * uri, GnomeVFSFi
return NULL;
}}
-#line 596 "mn-base-mbox-mailbox-backend.c"
+#line 587 "mn-base-mbox-mailbox-backend.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-base-mbox-mailbox-backend.gob b/src/mn-base-mbox-mailbox-backend.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -108,20 +108,26 @@ class MN:Base:Mbox:Mailbox:Backend from MN:VFS:Mailbox:Backend (abstract)
get_mailbox_type (GnomeVFSURI *uri (check null))
{
GMimeParser *parser;
- GnomeVFSHandle *handle;
GType type = 0;
- parser = self_parser_new(uri, &handle, NULL);
+ parser = self_parser_new(uri, NULL);
if (parser != NULL)
{
if (g_mime_parser_eos(parser))
/*
- * The file is empty. Treat it as a mbox mailbox for
- * now. Whenever the file grows, it will be checked again
- * and at that point we will decide whether it is a mbox
- * mailbox, a Mozilla mailbox or another type of file.
+ * The file is empty. For now, treat it as a mbox mailbox
+ * or, if mbox support was not compiled in, as a Mozilla
+ * mailbox. Whenever the file grows, it will be checked
+ * again and at that point we will decide whether it is a
+ * mbox mailbox, a Mozilla mailbox or another type of file.
*/
- type = MN_TYPE_MBOX_MAILBOX_BACKEND;
+ {
+#if WITH_MBOX
+ type = MN_TYPE_MBOX_MAILBOX_BACKEND;
+#elif WITH_MOZILLA
+ type = MN_TYPE_MOZILLA_MAILBOX_BACKEND;
+#endif
+ }
else
{
/*
@@ -153,34 +159,30 @@ class MN:Base:Mbox:Mailbox:Backend from MN:VFS:Mailbox:Backend (abstract)
}
}
g_object_unref(parser);
- gnome_vfs_close(handle);
}
return type;
}
private GMimeParser *
- parser_new (GnomeVFSURI *uri (check null),
- GnomeVFSHandle **handle (check null),
- GnomeVFSResult *result)
+ parser_new (GnomeVFSURI *uri (check null), GnomeVFSResult *result)
{
GnomeVFSResult _result;
+ GnomeVFSHandle *handle;
GMimeParser *parser = NULL;
- _result = gnome_vfs_open_uri(handle, uri, GNOME_VFS_OPEN_READ);
+ _result = gnome_vfs_open_uri(&handle, uri, GNOME_VFS_OPEN_READ);
if (_result == GNOME_VFS_OK)
{
GMimeStream *stream;
- stream = mn_gmime_stream_vfs_new(*handle, uri, &_result);
+ stream = mn_gmime_stream_vfs_new(handle, uri, &_result);
if (stream)
{
parser = g_mime_parser_new_with_stream(stream);
g_object_unref(stream);
g_mime_parser_set_scan_from(parser, TRUE);
}
- else
- gnome_vfs_close(*handle);
}
if (result)
@@ -190,34 +192,27 @@ class MN:Base:Mbox:Mailbox:Backend from MN:VFS:Mailbox:Backend (abstract)
}
override (MN:VFS:Mailbox:Backend) void
- check (MNVFSMailboxBackend *backend, unsigned long check_id)
+ check (MNVFSMailboxBackend *backend, int check_id)
{
Self *self = SELF(backend);
- gboolean aborted;
gboolean polled;
GMimeParser *parser;
- GnomeVFSHandle *handle;
GnomeVFSResult result;
gboolean uri_set;
mn_vfs_mailbox_backend_monitor(backend, check_id, backend->mailbox->uri, GNOME_VFS_MONITOR_FILE);
+ if (mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ return;
+
+ /* the poll property is protected by the GDK lock */
GDK_THREADS_ENTER();
- if (mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- aborted = TRUE;
- else
- {
- aborted = FALSE;
- polled = mn_mailbox_get_poll(MN_MAILBOX(backend->mailbox));
- }
+ polled = mn_mailbox_get_poll(MN_MAILBOX(backend->mailbox));
gdk_flush();
GDK_THREADS_LEAVE();
- if (aborted)
- return;
-
if (polled)
{
GnomeVFSFileInfo *file_info;
@@ -258,7 +253,7 @@ class MN:Base:Mbox:Mailbox:Backend from MN:VFS:Mailbox:Backend (abstract)
selfp->last_mtime = file_info->mtime;
selfp->last_ctime = file_info->ctime;
- if (mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ if (mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
check = FALSE;
}
@@ -278,6 +273,7 @@ class MN:Base:Mbox:Mailbox:Backend from MN:VFS:Mailbox:Backend (abstract)
{
GnomeVFSFileInfo *file_info;
GnomeVFSURI *uri;
+ gboolean aborted;
file_info = gnome_vfs_file_info_new();
if (gnome_vfs_get_file_info_uri(backend->mailbox->vfs_uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS | GNOME_VFS_FILE_INFO_GET_MIME_TYPE) == GNOME_VFS_OK)
@@ -294,8 +290,8 @@ class MN:Base:Mbox:Mailbox:Backend from MN:VFS:Mailbox:Backend (abstract)
selfp->uri = uri;
uri = NULL;
}
- if (mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- aborted = TRUE;
+
+ aborted = mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id);
g_mutex_unlock(selfp->mutex);
@@ -306,11 +302,10 @@ class MN:Base:Mbox:Mailbox:Backend from MN:VFS:Mailbox:Backend (abstract)
return;
}
- parser = self_parser_new(selfp->uri, &handle, &result);
+ parser = self_parser_new(selfp->uri, &result);
if (parser)
{
GSList *messages = NULL;
- GnomeVFSResult close_result;
while (! g_mime_parser_eos(parser))
{
@@ -333,33 +328,29 @@ class MN:Base:Mbox:Mailbox:Backend from MN:VFS:Mailbox:Backend (abstract)
}
g_object_unref(parser);
- close_result = gnome_vfs_close(handle);
GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- {
- if (close_result == GNOME_VFS_OK)
- mn_mailbox_set_messages(MN_MAILBOX(backend->mailbox), messages);
- else
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to close file: %s"), gnome_vfs_result_to_string(close_result));
- }
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ mn_mailbox_set_messages(MN_MAILBOX(backend->mailbox), messages);
mn_g_object_slist_free(messages);
gdk_flush();
GDK_THREADS_LEAVE();
- return;
+ return; /* success */
}
- GDK_THREADS_ENTER();
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ {
+ GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open mailbox: %s"), gnome_vfs_result_to_string(result));
+ mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open mailbox: %s"), gnome_vfs_result_to_string(result));
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
}
virtual private MNMessage *
diff --git a/src/mn-blinking-image-private.h b/src/mn-blinking-image-private.h
@@ -1,36 +0,0 @@
-/* Generated by GOB (v2.0.14) (do not edit directly) */
-
-#ifndef __MN_BLINKING_IMAGE_PRIVATE_H__
-#define __MN_BLINKING_IMAGE_PRIVATE_H__
-
-#include "mn-blinking-image.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-#line 26 "mn-blinking-image.gob"
-
-#include "mn-locked-callback.h"
-
-#line 18 "mn-blinking-image-private.h"
-struct _MNBlinkingImagePrivate {
-#line 37 "mn-blinking-image.gob"
- gboolean blinking;
-#line 59 "mn-blinking-image.gob"
- MNLockedGSource * timeout_source;
-#line 60 "mn-blinking-image.gob"
- gboolean is_on;
-#line 62 "mn-blinking-image.gob"
- char * stock_id;
-#line 63 "mn-blinking-image.gob"
- GtkIconSize icon_size;
-#line 30 "mn-blinking-image-private.h"
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/src/mn-blinking-image.c b/src/mn-blinking-image.c
@@ -1,393 +0,0 @@
-/* Generated by GOB (v2.0.14) (do not edit directly) */
-
-/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
-
-#define GOB_VERSION_MAJOR 2
-#define GOB_VERSION_MINOR 0
-#define GOB_VERSION_PATCHLEVEL 14
-
-#define selfp (self->_priv)
-
-#include <string.h> /* memset() */
-
-#include "mn-blinking-image.h"
-
-#include "mn-blinking-image-private.h"
-
-#ifdef G_LIKELY
-#define ___GOB_LIKELY(expr) G_LIKELY(expr)
-#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
-#else /* ! G_LIKELY */
-#define ___GOB_LIKELY(expr) (expr)
-#define ___GOB_UNLIKELY(expr) (expr)
-#endif /* G_LIKELY */
-
-#line 30 "mn-blinking-image.gob"
-
-#include "config.h"
-#include <glib/gi18n.h>
-
-#line 31 "mn-blinking-image.c"
-/* self casting macros */
-#define SELF(x) MN_BLINKING_IMAGE(x)
-#define SELF_CONST(x) MN_BLINKING_IMAGE_CONST(x)
-#define IS_SELF(x) MN_IS_BLINKING_IMAGE(x)
-#define TYPE_SELF MN_TYPE_BLINKING_IMAGE
-#define SELF_CLASS(x) MN_BLINKING_IMAGE_CLASS(x)
-
-#define SELF_GET_CLASS(x) MN_BLINKING_IMAGE_GET_CLASS(x)
-
-/* self typedefs */
-typedef MNBlinkingImage Self;
-typedef MNBlinkingImageClass SelfClass;
-
-/* here are local prototypes */
-static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
-static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-static void mn_blinking_image_init (MNBlinkingImage * o) G_GNUC_UNUSED;
-static void mn_blinking_image_class_init (MNBlinkingImageClass * c) G_GNUC_UNUSED;
-static void ___3_mn_blinking_image_finalize (GObject * object) G_GNUC_UNUSED;
-static void mn_blinking_image_update (MNBlinkingImage * self, gboolean is_on) G_GNUC_UNUSED;
-static gboolean mn_blinking_image_timeout_cb (gpointer data) G_GNUC_UNUSED;
-
-enum {
- PROP_0,
- PROP_BLINKING
-};
-
-/* pointer to the class of our parent */
-static GtkImageClass *parent_class = NULL;
-
-/* Short form macros */
-#define self_get_blinking mn_blinking_image_get_blinking
-#define self_set_blinking mn_blinking_image_set_blinking
-#define self_update mn_blinking_image_update
-#define self_timeout_cb mn_blinking_image_timeout_cb
-#define self_new mn_blinking_image_new
-#define self_set_from_stock mn_blinking_image_set_from_stock
-GType
-mn_blinking_image_get_type (void)
-{
- static GType type = 0;
-
- if ___GOB_UNLIKELY(type == 0) {
- static const GTypeInfo info = {
- sizeof (MNBlinkingImageClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mn_blinking_image_class_init,
- (GClassFinalizeFunc) NULL,
- NULL /* class_data */,
- sizeof (MNBlinkingImage),
- 0 /* n_preallocs */,
- (GInstanceInitFunc) mn_blinking_image_init,
- NULL
- };
-
- type = g_type_register_static (GTK_TYPE_IMAGE, "MNBlinkingImage", &info, (GTypeFlags)0);
- }
-
- return type;
-}
-
-/* a macro for creating a new object of our type */
-#define GET_NEW ((MNBlinkingImage *)g_object_new(mn_blinking_image_get_type(), NULL))
-
-/* a function for creating a new object of our type */
-#include <stdarg.h>
-static MNBlinkingImage * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
-static MNBlinkingImage *
-GET_NEW_VARG (const char *first, ...)
-{
- MNBlinkingImage *ret;
- va_list ap;
- va_start (ap, first);
- ret = (MNBlinkingImage *)g_object_new_valist (mn_blinking_image_get_type (), first, ap);
- va_end (ap);
- return ret;
-}
-
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Blinking:Image::finalize"
- MNBlinkingImage *self G_GNUC_UNUSED = MN_BLINKING_IMAGE (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 65 "mn-blinking-image.gob"
- ___3_mn_blinking_image_finalize(obj_self);
-#line 120 "mn-blinking-image.c"
-#line 62 "mn-blinking-image.gob"
- if(self->_priv->stock_id) { g_free ((gpointer) self->_priv->stock_id); self->_priv->stock_id = NULL; }
-#line 123 "mn-blinking-image.c"
-}
-#undef __GOB_FUNCTION__
-
-static void
-mn_blinking_image_init (MNBlinkingImage * o G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Blinking:Image::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_BLINKING_IMAGE,MNBlinkingImagePrivate);
-#line 55 "mn-blinking-image.gob"
- o->_priv->is_on = TRUE;
-#line 134 "mn-blinking-image.c"
-}
-#undef __GOB_FUNCTION__
-static void
-mn_blinking_image_class_init (MNBlinkingImageClass * c G_GNUC_UNUSED)
-{
-#define __GOB_FUNCTION__ "MN:Blinking:Image::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
-
- g_type_class_add_private(c,sizeof(MNBlinkingImagePrivate));
-
- parent_class = g_type_class_ref (GTK_TYPE_IMAGE);
-
-#line 65 "mn-blinking-image.gob"
- g_object_class->finalize = ___finalize;
-#line 149 "mn-blinking-image.c"
- g_object_class->get_property = ___object_get_property;
- g_object_class->set_property = ___object_set_property;
- {
- GParamSpec *param_spec;
-
- param_spec = g_param_spec_boolean
- ("blinking" /* name */,
- NULL /* nick */,
- NULL /* blurb */,
- FALSE /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
- g_object_class_install_property (g_object_class,
- PROP_BLINKING,
- param_spec);
- }
-}
-#undef __GOB_FUNCTION__
-
-static void
-___object_set_property (GObject *object,
- guint property_id,
- const GValue *VAL G_GNUC_UNUSED,
- GParamSpec *pspec G_GNUC_UNUSED)
-#define __GOB_FUNCTION__ "MN:Blinking:Image::set_property"
-{
- MNBlinkingImage *self G_GNUC_UNUSED;
-
- self = MN_BLINKING_IMAGE (object);
-
- switch (property_id) {
- case PROP_BLINKING:
- {
-#line 40 "mn-blinking-image.gob"
-
- gboolean blinking = g_value_get_boolean(VAL);
- if (blinking != selfp->blinking)
- {
- selfp->blinking = blinking;
- if (blinking)
- selfp->timeout_source = mn_g_timeout_add_gdk_locked(500, self_timeout_cb, self);
- else
- {
- mn_locked_g_source_remove(selfp->timeout_source);
- self_update(self, TRUE);
- }
- }
-
-#line 197 "mn-blinking-image.c"
- }
- break;
- default:
-/* Apparently in g++ this is needed, glib is b0rk */
-#ifndef __PRETTY_FUNCTION__
-# undef G_STRLOC
-# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
-#endif
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-#undef __GOB_FUNCTION__
-
-static void
-___object_get_property (GObject *object,
- guint property_id,
- GValue *VAL G_GNUC_UNUSED,
- GParamSpec *pspec G_GNUC_UNUSED)
-#define __GOB_FUNCTION__ "MN:Blinking:Image::get_property"
-{
- MNBlinkingImage *self G_GNUC_UNUSED;
-
- self = MN_BLINKING_IMAGE (object);
-
- switch (property_id) {
- case PROP_BLINKING:
- {
-#line 55 "mn-blinking-image.gob"
-
- g_value_set_boolean(VAL, selfp->blinking);
-
-#line 230 "mn-blinking-image.c"
- }
- break;
- default:
-/* Apparently in g++ this is needed, glib is b0rk */
-#ifndef __PRETTY_FUNCTION__
-# undef G_STRLOC
-# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
-#endif
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-#undef __GOB_FUNCTION__
-
-
-
-#line 55 "mn-blinking-image.gob"
-gboolean
-mn_blinking_image_get_blinking (MNBlinkingImage * self)
-#line 250 "mn-blinking-image.c"
-{
-#define __GOB_FUNCTION__ "MN:Blinking:Image::get_blinking"
-{
-#line 38 "mn-blinking-image.gob"
- gboolean val; g_object_get (G_OBJECT (self), "blinking", &val, NULL); return val;
-}}
-#line 257 "mn-blinking-image.c"
-#undef __GOB_FUNCTION__
-
-#line 40 "mn-blinking-image.gob"
-void
-mn_blinking_image_set_blinking (MNBlinkingImage * self, gboolean val)
-#line 263 "mn-blinking-image.c"
-{
-#define __GOB_FUNCTION__ "MN:Blinking:Image::set_blinking"
-{
-#line 38 "mn-blinking-image.gob"
- g_object_set (G_OBJECT (self), "blinking", val, NULL);
-}}
-#line 270 "mn-blinking-image.c"
-#undef __GOB_FUNCTION__
-
-#line 65 "mn-blinking-image.gob"
-static void
-___3_mn_blinking_image_finalize (GObject * object G_GNUC_UNUSED)
-#line 276 "mn-blinking-image.c"
-#define PARENT_HANDLER(___object) \
- { if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
-{
-#define __GOB_FUNCTION__ "MN:Blinking:Image::finalize"
-{
-#line 67 "mn-blinking-image.gob"
-
- Self *self = SELF(object);
-
- if (selfp->timeout_source)
- mn_locked_g_source_remove(selfp->timeout_source);
-
- PARENT_HANDLER(object);
- }}
-#line 292 "mn-blinking-image.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 76 "mn-blinking-image.gob"
-static void
-mn_blinking_image_update (MNBlinkingImage * self, gboolean is_on)
-#line 299 "mn-blinking-image.c"
-{
-#define __GOB_FUNCTION__ "MN:Blinking:Image::update"
-#line 76 "mn-blinking-image.gob"
- g_return_if_fail (self != NULL);
-#line 76 "mn-blinking-image.gob"
- g_return_if_fail (MN_IS_BLINKING_IMAGE (self));
-#line 306 "mn-blinking-image.c"
-{
-#line 78 "mn-blinking-image.gob"
-
- if (is_on)
- gtk_image_set_from_stock(GTK_IMAGE(self), selfp->stock_id, selfp->icon_size);
- else
- {
- GdkPixbuf *pixbuf;
- int width, height;
-
- pixbuf = gtk_widget_render_icon(GTK_WIDGET(self),
- selfp->stock_id,
- selfp->icon_size,
- NULL);
- g_assert(pixbuf != NULL);
-
- width = gdk_pixbuf_get_width(pixbuf);
- height = gdk_pixbuf_get_height(pixbuf);
- g_object_unref(pixbuf);
-
- pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height);
- gdk_pixbuf_fill(pixbuf, 0); /* fill with transparency */
-
- gtk_image_set_from_pixbuf(GTK_IMAGE(self), pixbuf);
- g_object_unref(pixbuf);
- }
-
- selfp->is_on = is_on;
- }}
-#line 336 "mn-blinking-image.c"
-#undef __GOB_FUNCTION__
-
-#line 106 "mn-blinking-image.gob"
-static gboolean
-mn_blinking_image_timeout_cb (gpointer data)
-#line 342 "mn-blinking-image.c"
-{
-#define __GOB_FUNCTION__ "MN:Blinking:Image::timeout_cb"
-{
-#line 108 "mn-blinking-image.gob"
-
- Self *self = data;
-
- self_update(self, ! selfp->is_on);
-
- return TRUE;
- }}
-#line 354 "mn-blinking-image.c"
-#undef __GOB_FUNCTION__
-
-#line 116 "mn-blinking-image.gob"
-GtkWidget *
-mn_blinking_image_new (void)
-#line 360 "mn-blinking-image.c"
-{
-#define __GOB_FUNCTION__ "MN:Blinking:Image::new"
-{
-#line 118 "mn-blinking-image.gob"
-
- return GTK_WIDGET(GET_NEW);
- }}
-#line 368 "mn-blinking-image.c"
-#undef __GOB_FUNCTION__
-
-#line 122 "mn-blinking-image.gob"
-void
-mn_blinking_image_set_from_stock (MNBlinkingImage * self, const char * stock_id, GtkIconSize icon_size)
-#line 374 "mn-blinking-image.c"
-{
-#define __GOB_FUNCTION__ "MN:Blinking:Image::set_from_stock"
-#line 122 "mn-blinking-image.gob"
- g_return_if_fail (self != NULL);
-#line 122 "mn-blinking-image.gob"
- g_return_if_fail (MN_IS_BLINKING_IMAGE (self));
-#line 122 "mn-blinking-image.gob"
- g_return_if_fail (stock_id != NULL);
-#line 383 "mn-blinking-image.c"
-{
-#line 126 "mn-blinking-image.gob"
-
- g_free(selfp->stock_id);
- selfp->stock_id = g_strdup(stock_id);
- selfp->icon_size = icon_size;
-
- self_update(self, selfp->is_on);
- }}
-#line 393 "mn-blinking-image.c"
-#undef __GOB_FUNCTION__
diff --git a/src/mn-blinking-image.gob b/src/mn-blinking-image.gob
@@ -1,133 +0,0 @@
-/*
- * Mail Notification
- * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-requires 2.0.14
-
-%headertop{
-#include <gtk/gtk.h>
-%}
-
-%privateheader{
-#include "mn-locked-callback.h"
-%}
-
-%{
-#include "config.h"
-#include <glib/gi18n.h>
-%}
-
-class MN:Blinking:Image from Gtk:Image
-{
- private gboolean blinking;
- property BOOLEAN blinking (export)
- set
- {
- gboolean blinking = g_value_get_boolean(VAL);
- if (blinking != selfp->blinking)
- {
- selfp->blinking = blinking;
- if (blinking)
- selfp->timeout_source = mn_g_timeout_add_gdk_locked(500, self_timeout_cb, self);
- else
- {
- mn_locked_g_source_remove(selfp->timeout_source);
- self_update(self, TRUE);
- }
- }
- }
- get
- {
- g_value_set_boolean(VAL, selfp->blinking);
- };
-
- private MNLockedGSource *timeout_source;
- private gboolean is_on = TRUE; /* is currently displaying the image? */
-
- private char *stock_id destroywith g_free;
- private GtkIconSize icon_size;
-
- override (G:Object) void
- finalize (GObject *object)
- {
- Self *self = SELF(object);
-
- if (selfp->timeout_source)
- mn_locked_g_source_remove(selfp->timeout_source);
-
- PARENT_HANDLER(object);
- }
-
- private void
- update (self, gboolean is_on)
- {
- if (is_on)
- gtk_image_set_from_stock(GTK_IMAGE(self), selfp->stock_id, selfp->icon_size);
- else
- {
- GdkPixbuf *pixbuf;
- int width, height;
-
- pixbuf = gtk_widget_render_icon(GTK_WIDGET(self),
- selfp->stock_id,
- selfp->icon_size,
- NULL);
- g_assert(pixbuf != NULL);
-
- width = gdk_pixbuf_get_width(pixbuf);
- height = gdk_pixbuf_get_height(pixbuf);
- g_object_unref(pixbuf);
-
- pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height);
- gdk_pixbuf_fill(pixbuf, 0); /* fill with transparency */
-
- gtk_image_set_from_pixbuf(GTK_IMAGE(self), pixbuf);
- g_object_unref(pixbuf);
- }
-
- selfp->is_on = is_on;
- }
-
- private gboolean
- timeout_cb (gpointer data)
- {
- Self *self = data;
-
- self_update(self, ! selfp->is_on);
-
- return TRUE;
- }
-
- public GtkWidget *
- new (void)
- {
- return GTK_WIDGET(GET_NEW);
- }
-
- public void
- set_from_stock (self,
- const char *stock_id (check null),
- GtkIconSize icon_size)
- {
- g_free(selfp->stock_id);
- selfp->stock_id = g_strdup(stock_id);
- selfp->icon_size = icon_size;
-
- self_update(self, selfp->is_on);
- }
-}
diff --git a/src/mn-blinking-image.h b/src/mn-blinking-image.h
@@ -1,81 +0,0 @@
-/* Generated by GOB (v2.0.14) (do not edit directly) */
-
-#include <glib.h>
-#include <glib-object.h>
-
-
-#include <gtk/gtk.h>
-
-#ifndef __MN_BLINKING_IMAGE_H__
-#define __MN_BLINKING_IMAGE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-
-/*
- * Type checking and casting macros
- */
-#define MN_TYPE_BLINKING_IMAGE (mn_blinking_image_get_type())
-#define MN_BLINKING_IMAGE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_blinking_image_get_type(), MNBlinkingImage)
-#define MN_BLINKING_IMAGE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_blinking_image_get_type(), MNBlinkingImage const)
-#define MN_BLINKING_IMAGE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_blinking_image_get_type(), MNBlinkingImageClass)
-#define MN_IS_BLINKING_IMAGE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_blinking_image_get_type ())
-
-#define MN_BLINKING_IMAGE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_blinking_image_get_type(), MNBlinkingImageClass)
-
-/* Private structure type */
-typedef struct _MNBlinkingImagePrivate MNBlinkingImagePrivate;
-
-/*
- * Main object structure
- */
-#ifndef __TYPEDEF_MN_BLINKING_IMAGE__
-#define __TYPEDEF_MN_BLINKING_IMAGE__
-typedef struct _MNBlinkingImage MNBlinkingImage;
-#endif
-struct _MNBlinkingImage {
- GtkImage __parent__;
- /*< private >*/
- MNBlinkingImagePrivate *_priv;
-};
-
-/*
- * Class definition
- */
-typedef struct _MNBlinkingImageClass MNBlinkingImageClass;
-struct _MNBlinkingImageClass {
- GtkImageClass __parent__;
-};
-
-
-/*
- * Public methods
- */
-GType mn_blinking_image_get_type (void);
-gboolean mn_blinking_image_get_blinking (MNBlinkingImage * self);
-void mn_blinking_image_set_blinking (MNBlinkingImage * self,
- gboolean val);
-GtkWidget * mn_blinking_image_new (void);
-void mn_blinking_image_set_from_stock (MNBlinkingImage * self,
- const char * stock_id,
- GtkIconSize icon_size);
-
-/*
- * Argument wrapping macros
- */
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_BLINKING_IMAGE_PROP_BLINKING(arg) "blinking", __extension__ ({gboolean z = (arg); z;})
-#define MN_BLINKING_IMAGE_GET_PROP_BLINKING(arg) "blinking", __extension__ ({gboolean *z = (arg); z;})
-#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_BLINKING_IMAGE_PROP_BLINKING(arg) "blinking",(gboolean )(arg)
-#define MN_BLINKING_IMAGE_GET_PROP_BLINKING(arg) "blinking",(gboolean *)(arg)
-#endif /* __GNUC__ && !__STRICT_ANSI__ */
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
diff --git a/src/mn-bonobo-unknown.gob b/src/mn-bonobo-unknown.gob
@@ -7,7 +7,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-client-session.c b/src/mn-client-session.c
@@ -20,7 +20,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -61,8 +61,6 @@
#endif /* WITH_SASL */
#include "mn-util.h"
#include "mn-client-session.h"
-#include "mn-conf.h"
-#include "mn-stock.h"
/*** cpp *********************************************************************/
@@ -124,9 +122,6 @@ static gboolean mn_client_session_ssl_check_server_name_from_list (const char *u
static char *mn_client_session_ssl_get_verify_error (MNClientSession *session,
X509 *cert);
static gboolean mn_client_session_ssl_verify (MNClientSession *session);
-static gboolean mn_client_session_run_untrusted_dialog (const char *server,
- const char *reason,
- const char *cert_fingerprint);
#endif
static int mn_client_session_enter_state (MNClientSession *session, int id);
@@ -182,6 +177,9 @@ mn_client_session_run (const MNClientSessionState *states,
g_return_val_if_fail(states != NULL, FALSE);
g_return_val_if_fail(callbacks != NULL, FALSE);
g_return_val_if_fail(callbacks->response_new != NULL, FALSE);
+#if WITH_SSL
+ g_return_val_if_fail(callbacks->ssl_trust_server != NULL, FALSE);
+#endif
g_return_val_if_fail(server != NULL, FALSE);
memset(&session, 0, sizeof(session));
@@ -340,7 +338,7 @@ mn_client_session_connect (MNClientSession *session, struct addrinfo *addrinfo)
if (connect(s, a->ai_addr, a->ai_addrlen) < 0)
{
mn_client_session_notice(session, _("unable to connect: %s"), g_strerror(errno));
- close(s);
+ while (close(s) < 0 && errno == EINTR);
}
else
{
@@ -604,9 +602,10 @@ mn_client_session_ssl_get_verify_error (MNClientSession *session, X509 *cert)
{
char *server = l->data;
- g_string_append_printf(servers_comma_list, "\"%s\"", server);
if (l->next)
- g_string_append(servers_comma_list, ", ");
+ g_string_append_printf(servers_comma_list, _("\"%s\", "), server);
+ else
+ g_string_append_printf(servers_comma_list, _("\"%s\""), server);
}
error = g_strdup_printf(_("user-provided server name \"%s\" matches none of the certificate-provided server names %s"),
@@ -625,7 +624,6 @@ static gboolean
mn_client_session_ssl_verify (MNClientSession *session)
{
X509 *cert;
- gboolean status = FALSE;
g_return_val_if_fail(session != NULL, FALSE);
g_return_val_if_fail(session->ssl != NULL, FALSE);
@@ -634,6 +632,7 @@ mn_client_session_ssl_verify (MNClientSession *session)
if (cert)
{
char *error;
+ gboolean status = FALSE;
error = mn_client_session_ssl_get_verify_error(session, cert);
if (! error)
@@ -645,7 +644,6 @@ mn_client_session_ssl_verify (MNClientSession *session)
int md5len;
int i;
unsigned char *f;
- GSList *gconf_fingerprints;
/* calculate the MD5 hash of the raw certificate */
md5len = sizeof(md5sum);
@@ -653,102 +651,28 @@ mn_client_session_ssl_verify (MNClientSession *session)
for (i = 0, f = fingerprint; i < 16; i++, f += 3)
sprintf(f, "%.2x%c", md5sum[i], i != 15 ? ':' : '\0');
- gconf_fingerprints = eel_gconf_get_string_list(MN_CONF_TRUSTED_X509_CERTIFICATES);
-
- if (mn_g_str_slist_find(gconf_fingerprints, fingerprint) != NULL)
+ if (session->callbacks->ssl_trust_server(session,
+ session->server,
+ session->port,
+ fingerprint,
+ error,
+ session->private))
status = TRUE;
- else
- {
- if (mn_client_session_run_untrusted_dialog(session->server, error, fingerprint))
- {
- status = TRUE;
- gconf_fingerprints = g_slist_append(gconf_fingerprints, g_strdup(fingerprint));
- eel_gconf_set_string_list(MN_CONF_TRUSTED_X509_CERTIFICATES, gconf_fingerprints);
- }
- }
- eel_g_slist_free_deep(gconf_fingerprints);
g_free(error);
}
X509_free(cert);
- }
- else
- {
- char *server;
- GSList *gconf_servers = NULL;
-
- server = g_strdup_printf("%s:%i", session->server, session->port);
- gconf_servers = eel_gconf_get_string_list(MN_CONF_TRUSTED_SERVERS);
-
- if (mn_g_str_slist_find(gconf_servers, server) != NULL)
- status = TRUE;
- else
- {
- if (mn_client_session_run_untrusted_dialog(session->server, _("missing certificate"), NULL))
- {
- status = TRUE;
- gconf_servers = g_slist_append(gconf_servers, g_strdup(server));
- eel_gconf_set_string_list(MN_CONF_TRUSTED_SERVERS, gconf_servers);
- }
- }
- g_free(server);
- eel_g_slist_free_deep(gconf_servers);
+ return status;
}
-
- return status;
-}
-
-static gboolean
-mn_client_session_run_untrusted_dialog (const char *server,
- const char *reason,
- const char *cert_fingerprint)
-{
- GtkWidget *dialog;
- GString *secondary;
- gboolean status;
-
- g_return_val_if_fail(server != NULL, FALSE);
- g_return_val_if_fail(reason != NULL, FALSE);
-
- secondary = g_string_new(NULL);
- g_string_printf(secondary,
- _("Mail Notification was unable to trust \"%s\" "
- "(%s). It is possible that someone is "
- "intercepting your communication to obtain "
- "your confidential information.\n"
- "\n"
- "You should only connect to the server if you "
- "are certain you are connected to \"%s\". "
- "If you choose to connect to the server, this "
- "message will not be shown again."),
- server, reason, server);
-
- if (cert_fingerprint)
- {
- g_string_append(secondary, "\n\n");
- g_string_append_printf(secondary, _("Certificate fingerprint: %s."), cert_fingerprint);
- }
-
- GDK_THREADS_ENTER();
-
- dialog = mn_alert_dialog_new(NULL,
- GTK_MESSAGE_WARNING, 0,
- _("Connect to untrusted server?"),
- secondary->str);
- g_string_free(secondary, TRUE);
-
- gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
- gtk_dialog_add_button(GTK_DIALOG(dialog), MN_STOCK_CONNECT, GTK_RESPONSE_OK);
-
- status = mn_dialog_run_nonmodal(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK;
- gtk_widget_destroy(dialog);
-
- gdk_flush();
- GDK_THREADS_LEAVE();
-
- return status;
+ else
+ return session->callbacks->ssl_trust_server(session,
+ session->server,
+ session->port,
+ NULL,
+ NULL,
+ session->private);
}
#endif /* WITH_SSL */
@@ -1658,7 +1582,7 @@ mn_client_session_set_error_from_response (MNClientSession *session,
g_return_val_if_fail(session != NULL, 0);
return response
- ? mn_client_session_set_error(session, code, "\"%s\"", response)
+ ? mn_client_session_set_error(session, code, _("\"%s\""), response)
: mn_client_session_set_error(session, code, _("unknown server error"));
}
diff --git a/src/mn-client-session.h b/src/mn-client-session.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -173,6 +173,24 @@ typedef struct
const char **username,
const char **password);
#endif /* WITH_SASL */
+
+#if WITH_SSL
+ /*
+ * ssl_trust_server (required if SSL support was compiled in):
+ *
+ * Decides whether to trust the given server after SSL verification
+ * failed. If the server provided a certificate, the @fingerprint
+ * and @verify_error arguments will be set.
+ *
+ * Return value: must return %TRUE if the given server should be trusted.
+ */
+ gboolean (*ssl_trust_server) (MNClientSession *session,
+ const char *server,
+ int port,
+ const char *fingerprint,
+ const char *verify_error,
+ MNClientSessionPrivate *priv);
+#endif /* WITH_SSL */
} MNClientSessionCallbacks;
gboolean mn_client_session_run (const MNClientSessionState *states,
diff --git a/src/mn-compact-message-view.gob b/src/mn-compact-message-view.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-conf.c b/src/mn-conf.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -140,6 +140,8 @@
MN_CONF_OBSOLETE_MAIL_SUMMARY_POPUP_FONTS_CONTENTS_NAMESPACE "/font"
#define MN_CONF_OBSOLETE_CLICK_ACTION \
MN_CONF_NAMESPACE "/click-action"
+#define MN_CONF_OBSOLETE_CLICK_ACTION_2 \
+ MN_CONF_NAMESPACE "/click-action-2"
#define BLOCK(info) \
g_signal_handler_block((info)->object, (info)->handler_id)
@@ -148,9 +150,6 @@
#define LINK_INFO(ptr) ((LinkInfo *) (ptr))
-#define SESSION_MANUAL_CONFIG_PREFIX "session-manual/"
-#define SESSION_MANUAL_NAME "Default"
-
/*** types *******************************************************************/
typedef struct
@@ -177,28 +176,19 @@ typedef struct
typedef struct
{
LinkInfo parent;
- GEnumClass *enum_class;
-} LinkRadioActionInfo;
-
-typedef struct
-{
- LinkInfo parent;
GParamSpec *pspec;
} LinkObjectInfo;
-typedef struct
-{
- int order;
- int argc;
- char **argv;
-} StartupClient;
-
/*** variables ***************************************************************/
const char *mn_conf_dot_dir = NULL;
/*** functions ***************************************************************/
+#if WITH_GCONF_SANITY_CHECK
+static void mn_conf_check_schemas (void);
+#endif
+
static void mn_conf_import_obsolete_key (const char *obsolete, const char *new);
static void mn_conf_import_obsolete_string (const char *obsolete,
const char *new,
@@ -226,24 +216,6 @@ static void mn_conf_link_window_notify_cb (GConfClient *client,
gpointer user_data);
static void mn_conf_link_window_free_info (LinkWindowInfo *info);
-static void mn_conf_link_radio_action_set (LinkRadioActionInfo *info,
- const GConfValue *value);
-static void mn_conf_link_radio_action_h (GtkRadioAction *action,
- GtkRadioAction *current,
- gpointer user_data);
-static void mn_conf_link_radio_action_notify_cb (GConfClient *client,
- unsigned int cnxn_id,
- GConfEntry *entry,
- gpointer user_data);
-static void mn_conf_link_radio_action_free_info (LinkRadioActionInfo *info);
-
-static void mn_conf_link_toggle_action_h (GtkToggleAction *action,
- gpointer user_data);
-static void mn_conf_link_toggle_action_notify_cb (GConfClient *client,
- unsigned int cnxn_id,
- GConfEntry *entry,
- gpointer user_data);
-
static void mn_conf_link_spin_button_h (GtkSpinButton *button,
gpointer user_data);
static void mn_conf_link_spin_button_notify_cb (GConfClient *client,
@@ -268,8 +240,6 @@ mn_conf_init (void)
{
g_assert(mn_conf_dot_dir == NULL);
- /* create our dot dir if it does not already exist */
-
mn_conf_dot_dir = g_build_filename(g_get_home_dir(),
GNOME_DOT_GNOME,
"mail-notification",
@@ -285,12 +255,12 @@ mn_conf_init (void)
g_strerror(errno));
}
- /* monitor our namespace */
+#if WITH_GCONF_SANITY_CHECK
+ mn_conf_check_schemas();
+#endif
eel_gconf_monitor_add(MN_CONF_NAMESPACE);
- /* import obsolete keys */
-
mn_conf_import_obsolete_key(MN_CONF_OBSOLETE_PREFERENCES_DIALOG "/height",
MN_CONF_PROPERTIES_DIALOG "/height");
mn_conf_import_obsolete_key(MN_CONF_OBSOLETE_PREFERENCES_DIALOG "/width",
@@ -298,6 +268,11 @@ mn_conf_init (void)
mn_conf_import_obsolete_key(MN_CONF_OBSOLETE_CLICK_ACTION,
MN_CONF_CLICK_ACTION);
+ mn_conf_import_obsolete_string(MN_CONF_OBSOLETE_CLICK_ACTION_2,
+ MN_CONF_CLICK_ACTION,
+ "display-properties-dialog", "launch-mail-reader",
+ NULL);
+
mn_conf_import_obsolete_string(MN_CONF_OBSOLETE_DOUBLE_CLICK_ACTION_2,
MN_CONF_CLICK_ACTION,
"display-main-window", "display-properties-dialog",
@@ -315,6 +290,77 @@ mn_conf_init (void)
}
}
+#if WITH_GCONF_SANITY_CHECK
+/*
+ * If the GConf schemas were not installed properly, refuse to
+ * proceed. This ensures that MN will not behave unexpectedly because
+ * of missing default values. The --disable-gconf-sanity-check
+ * configure argument disables this check and is meant to be used for
+ * development only.
+ */
+static void
+mn_conf_check_schemas (void)
+{
+ static const char *keys[] = {
+ MN_CONF_COMMANDS_NEW_MAIL_ENABLED,
+ MN_CONF_COMMANDS_NEW_MAIL_COMMAND,
+ MN_CONF_COMMANDS_MAIL_READ_ENABLED,
+ MN_CONF_COMMANDS_MAIL_READ_COMMAND,
+ MN_CONF_COMMANDS_MAIL_CHANGED_ENABLED,
+ MN_CONF_COMMANDS_MAIL_CHANGED_COMMAND,
+ MN_CONF_SOUNDS_NEW_MAIL_ENABLED,
+ MN_CONF_SOUNDS_NEW_MAIL_FILE,
+ MN_CONF_SOUNDS_PLAY_COMMAND,
+ MN_CONF_PROPERTIES_DIALOG "/width",
+ MN_CONF_PROPERTIES_DIALOG "/height",
+ MN_CONF_BLINK_ON_ERRORS,
+ MN_CONF_TRUSTED_X509_CERTIFICATES,
+ MN_CONF_TRUSTED_SERVERS,
+ MN_CONF_DISPLAY_SEEN_MAIL,
+ MN_CONF_TOOLTIP_MAIL_SUMMARY,
+ MN_CONF_ALWAYS_DISPLAY_ICON,
+ MN_CONF_DISPLAY_MESSAGE_COUNT,
+ MN_CONF_CLICK_ACTION,
+ MN_CONF_POPUPS_ENABLED,
+ MN_CONF_POPUPS_POSITION,
+ MN_CONF_POPUPS_EXPIRATION_ENABLED,
+ MN_CONF_POPUPS_EXPIRATION_DELAY_MINUTES,
+ MN_CONF_POPUPS_EXPIRATION_DELAY_SECONDS,
+ MN_CONF_POPUPS_ACTIONS,
+ MN_CONF_POPUPS_LIMIT
+ };
+ int i;
+ GConfClient *client;
+ gboolean schema_missing = FALSE;
+
+ client = eel_gconf_client_get_global();
+ g_assert(client != NULL);
+
+ for (i = 0; i < G_N_ELEMENTS(keys); i++)
+ {
+ GConfEntry *entry;
+
+ entry = gconf_client_get_entry(client, keys[i], NULL, TRUE, NULL);
+ if (entry)
+ {
+ gboolean has_schema;
+
+ has_schema = gconf_entry_get_schema_name(entry) != NULL;
+ gconf_entry_unref(entry);
+
+ if (has_schema)
+ continue;
+ }
+
+ g_warning(_("cannot find default value of configuration key \"%s\""), keys[i]);
+ schema_missing = TRUE;
+ }
+
+ if (schema_missing)
+ mn_fatal_error_dialog(NULL, _("The default configuration has not been installed properly. Please check your Mail Notification installation."));
+}
+#endif /* WITH_GCONF_SANITY_CHECK */
+
static void
mn_conf_import_obsolete_key (const char *obsolete, const char *new)
{
@@ -398,7 +444,8 @@ mn_conf_unset_obsolete (void)
MN_CONF_OBSOLETE_DOUBLE_CLICK_ACTION_2,
MN_CONF_OBSOLETE_MAIN_WINDOW_NAMESPACE,
MN_CONF_OBSOLETE_MAIL_SUMMARY_POPUP_NAMESPACE,
- MN_CONF_OBSOLETE_CLICK_ACTION
+ MN_CONF_OBSOLETE_CLICK_ACTION,
+ MN_CONF_OBSOLETE_CLICK_ACTION_2
};
int i;
@@ -508,38 +555,6 @@ mn_conf_link (gpointer object, ...)
signal_handler = G_CALLBACK(mn_conf_link_window_h);
notification_cb = mn_conf_link_window_notify_cb;
}
- else if (GTK_IS_RADIO_ACTION(object))
- {
- LinkRadioActionInfo *radio_action_info;
- GType enum_type;
- GConfValue *value;
-
- enum_type = va_arg(args, GType);
- g_return_if_fail(enum_type != 0);
-
- radio_action_info = g_new0(LinkRadioActionInfo, 1);
- radio_action_info->enum_class = g_type_class_ref(enum_type);
- info = LINK_INFO(radio_action_info);
- info->object = object;
- info->finalize = (GDestroyNotify) mn_conf_link_radio_action_free_info;
-
- value = eel_gconf_get_value(key);
- mn_conf_link_radio_action_set(radio_action_info, value);
- if (value)
- gconf_value_free(value);
-
- signal_name = g_strdup("changed");
- signal_handler = G_CALLBACK(mn_conf_link_radio_action_h);
- notification_cb = mn_conf_link_radio_action_notify_cb;
- }
- else if (GTK_IS_TOGGLE_ACTION(object))
- {
- gtk_toggle_action_set_active(object, eel_gconf_get_boolean(key));
-
- signal_name = g_strdup("toggled");
- signal_handler = G_CALLBACK(mn_conf_link_toggle_action_h);
- notification_cb = mn_conf_link_toggle_action_notify_cb;
- }
else if (GTK_IS_SPIN_BUTTON(object))
{
gtk_spin_button_set_value(object, eel_gconf_get_integer(key));
@@ -739,99 +754,6 @@ mn_conf_link_window_free_info (LinkWindowInfo *info)
}
static void
-mn_conf_link_radio_action_set (LinkRadioActionInfo *info,
- const GConfValue *value)
-{
- GEnumValue *enum_value;
- const char *nick;
-
- g_return_if_fail(info != NULL);
-
- if (! value)
- return;
-
- nick = gconf_value_get_string(value);
- enum_value = nick ? g_enum_get_value_by_nick(info->enum_class, nick) : NULL;
-
- if (enum_value)
- {
- GSList *l;
-
- MN_LIST_FOREACH(l, gtk_radio_action_get_group(LINK_INFO(info)->object))
- {
- GtkRadioAction *this_action = l->data;
- int this_value;
-
- g_object_get(this_action, "value", &this_value, NULL);
- if (this_value == enum_value->value)
- {
- gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(this_action), TRUE);
- break;
- }
- }
- }
-}
-
-static void
-mn_conf_link_radio_action_h (GtkRadioAction *action,
- GtkRadioAction *current,
- gpointer user_data)
-{
- LinkRadioActionInfo *info = user_data;
- int current_value;
- GEnumValue *enum_value;
-
- g_object_get(current, "value", ¤t_value, NULL);
-
- enum_value = g_enum_get_value(info->enum_class, current_value);
- g_assert(enum_value != NULL);
-
- eel_gconf_set_string(LINK_INFO(info)->key, enum_value->value_nick);
-}
-
-static void
-mn_conf_link_radio_action_notify_cb (GConfClient *client,
- unsigned int cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- LinkRadioActionInfo *info = user_data;
-
- BLOCK(LINK_INFO(info));
- mn_conf_link_radio_action_set(info, gconf_entry_get_value(entry));
- UNBLOCK(LINK_INFO(info));
-}
-
-static void
-mn_conf_link_radio_action_free_info (LinkRadioActionInfo *info)
-{
- g_type_class_unref(info->enum_class);
-}
-
-static void
-mn_conf_link_toggle_action_h (GtkToggleAction *action,
- gpointer user_data)
-{
- LinkInfo *info = user_data;
-
- eel_gconf_set_boolean(info->key, gtk_toggle_action_get_active(action));
-}
-
-static void
-mn_conf_link_toggle_action_notify_cb (GConfClient *client,
- unsigned int cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- LinkInfo *info = user_data;
- GConfValue *value = gconf_entry_get_value(entry);
-
- BLOCK(info);
- gtk_toggle_action_set_active(info->object, value ? gconf_value_get_bool(value) : FALSE);
- UNBLOCK(info);
-}
-
-static void
mn_conf_link_spin_button_h (GtkSpinButton *button, gpointer user_data)
{
LinkInfo *info = user_data;
diff --git a/src/mn-conf.h b/src/mn-conf.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -47,6 +47,16 @@
MN_CONF_COMMANDS_MAIL_CHANGED_NAMESPACE "/enabled"
#define MN_CONF_COMMANDS_MAIL_CHANGED_COMMAND \
MN_CONF_COMMANDS_MAIL_CHANGED_NAMESPACE "/command"
+#define MN_CONF_SOUNDS_NAMESPACE \
+ MN_CONF_NAMESPACE "/sounds"
+#define MN_CONF_SOUNDS_NEW_MAIL_NAMESPACE \
+ MN_CONF_SOUNDS_NAMESPACE "/new-mail"
+#define MN_CONF_SOUNDS_NEW_MAIL_ENABLED \
+ MN_CONF_SOUNDS_NEW_MAIL_NAMESPACE "/enabled"
+#define MN_CONF_SOUNDS_NEW_MAIL_FILE \
+ MN_CONF_SOUNDS_NEW_MAIL_NAMESPACE "/file"
+#define MN_CONF_SOUNDS_PLAY_COMMAND \
+ MN_CONF_SOUNDS_NAMESPACE "/play-command"
#define MN_CONF_UI_NAMESPACE \
MN_CONF_NAMESPACE "/ui"
#define MN_CONF_PROPERTIES_DIALOG \
@@ -63,8 +73,10 @@
MN_CONF_NAMESPACE "/tooltip-mail-summary"
#define MN_CONF_ALWAYS_DISPLAY_ICON \
MN_CONF_NAMESPACE "/always-display-icon"
+#define MN_CONF_DISPLAY_MESSAGE_COUNT \
+ MN_CONF_NAMESPACE "/display-message-count"
#define MN_CONF_CLICK_ACTION \
- MN_CONF_NAMESPACE "/click-action-2"
+ MN_CONF_NAMESPACE "/click-action-3"
#define MN_CONF_POPUPS_NAMESPACE \
MN_CONF_NAMESPACE "/popups"
#define MN_CONF_POPUPS_ENABLED \
@@ -83,6 +95,8 @@
MN_CONF_POPUPS_EXPIRATION_DELAY_NAMESPACE "/seconds"
#define MN_CONF_POPUPS_ACTIONS \
MN_CONF_POPUPS_NAMESPACE "/actions"
+#define MN_CONF_POPUPS_LIMIT \
+ MN_CONF_POPUPS_NAMESPACE "/limit"
/* obsolete keys */
#define MN_CONF_OBSOLETE_MAILBOXES \
@@ -95,6 +109,20 @@
MN_CONF_GNOME_MAIL_READER_NAMESPACE "/command"
#define MN_CONF_GNOME_MAIL_READER_NEEDS_TERMINAL \
MN_CONF_GNOME_MAIL_READER_NAMESPACE "/needs_terminal"
+#define MN_CONF_SYSTEM_HTTP_PROXY_NAMESPACE \
+ "/system/http_proxy"
+#define MN_CONF_SYSTEM_HTTP_PROXY_USE_HTTP_PROXY \
+ MN_CONF_SYSTEM_HTTP_PROXY_NAMESPACE "/use_http_proxy"
+#define MN_CONF_SYSTEM_HTTP_PROXY_HOST \
+ MN_CONF_SYSTEM_HTTP_PROXY_NAMESPACE "/host"
+#define MN_CONF_SYSTEM_HTTP_PROXY_PORT \
+ MN_CONF_SYSTEM_HTTP_PROXY_NAMESPACE "/port"
+#define MN_CONF_SYSTEM_HTTP_PROXY_USE_AUTHENTICATION \
+ MN_CONF_SYSTEM_HTTP_PROXY_NAMESPACE "/use_authentication"
+#define MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_USER \
+ MN_CONF_SYSTEM_HTTP_PROXY_NAMESPACE "/authentication_user"
+#define MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_PASSWORD \
+ MN_CONF_SYSTEM_HTTP_PROXY_NAMESPACE "/authentication_password"
extern const char *mn_conf_dot_dir;
diff --git a/src/mn-custom-vfs-mailbox.c b/src/mn-custom-vfs-mailbox.c
@@ -27,9 +27,8 @@
#include "config.h"
#include <glib/gi18n.h>
#include "mn-mailbox-private.h"
-#include "mn-stock.h"
-#line 33 "mn-custom-vfs-mailbox.c"
+#line 32 "mn-custom-vfs-mailbox.c"
/* self casting macros */
#define SELF(x) MN_CUSTOM_VFS_MAILBOX(x)
#define SELF_CONST(x) MN_CUSTOM_VFS_MAILBOX_CONST(x)
@@ -110,9 +109,9 @@ ___finalize(GObject *obj_self)
MNCustomVFSMailbox *self G_GNUC_UNUSED = MN_CUSTOM_VFS_MAILBOX (obj_self);
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 35 "mn-custom-vfs-mailbox.gob"
+#line 34 "mn-custom-vfs-mailbox.gob"
if(self->uri) { g_free ((gpointer) self->uri); self->uri = NULL; }
-#line 116 "mn-custom-vfs-mailbox.c"
+#line 115 "mn-custom-vfs-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -122,10 +121,10 @@ mn_custom_vfs_mailbox_init (MNCustomVFSMailbox * o G_GNUC_UNUSED)
#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::init"
}
#undef __GOB_FUNCTION__
-#line 38 "mn-custom-vfs-mailbox.gob"
+#line 37 "mn-custom-vfs-mailbox.gob"
static void
mn_custom_vfs_mailbox_class_init (MNCustomVFSMailboxClass * class G_GNUC_UNUSED)
-#line 129 "mn-custom-vfs-mailbox.c"
+#line 128 "mn-custom-vfs-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -133,13 +132,13 @@ mn_custom_vfs_mailbox_class_init (MNCustomVFSMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_VFS_MAILBOX);
-#line 43 "mn-custom-vfs-mailbox.gob"
+#line 42 "mn-custom-vfs-mailbox.gob"
mn_mailbox_class->seal = ___2_mn_custom_vfs_mailbox_seal;
-#line 51 "mn-custom-vfs-mailbox.gob"
+#line 50 "mn-custom-vfs-mailbox.gob"
mn_mailbox_class->parse_uri = ___3_mn_custom_vfs_mailbox_parse_uri;
-#line 67 "mn-custom-vfs-mailbox.gob"
+#line 66 "mn-custom-vfs-mailbox.gob"
mn_mailbox_class->check = ___4_mn_custom_vfs_mailbox_check;
-#line 143 "mn-custom-vfs-mailbox.c"
+#line 142 "mn-custom-vfs-mailbox.c"
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
g_object_class->set_property = ___object_set_property;
@@ -151,17 +150,17 @@ mn_custom_vfs_mailbox_class_init (MNCustomVFSMailboxClass * class G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_URI,
param_spec);
}
{
-#line 39 "mn-custom-vfs-mailbox.gob"
+#line 38 "mn-custom-vfs-mailbox.gob"
MN_MAILBOX_CLASS(class)->type = "custom-vfs";
-#line 165 "mn-custom-vfs-mailbox.c"
+#line 164 "mn-custom-vfs-mailbox.c"
}
}
#undef __GOB_FUNCTION__
@@ -180,9 +179,9 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_URI:
{
-#line 36 "mn-custom-vfs-mailbox.gob"
+#line 35 "mn-custom-vfs-mailbox.gob"
{ char *old = self->uri; self->uri = g_value_dup_string (VAL); g_free (old); }
-#line 186 "mn-custom-vfs-mailbox.c"
+#line 185 "mn-custom-vfs-mailbox.c"
}
break;
default:
@@ -211,9 +210,9 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_URI:
{
-#line 36 "mn-custom-vfs-mailbox.gob"
+#line 35 "mn-custom-vfs-mailbox.gob"
g_value_set_string (VAL, self->uri);
-#line 217 "mn-custom-vfs-mailbox.c"
+#line 216 "mn-custom-vfs-mailbox.c"
}
break;
default:
@@ -230,30 +229,30 @@ g_value_set_string (VAL, self->uri);
-#line 43 "mn-custom-vfs-mailbox.gob"
+#line 42 "mn-custom-vfs-mailbox.gob"
static void
___2_mn_custom_vfs_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 237 "mn-custom-vfs-mailbox.c"
+#line 236 "mn-custom-vfs-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->seal) \
(* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::seal"
{
-#line 45 "mn-custom-vfs-mailbox.gob"
+#line 44 "mn-custom-vfs-mailbox.gob"
MN_VFS_MAILBOX(mailbox)->uri = gnome_vfs_make_uri_canonical(SELF(mailbox)->uri);
PARENT_HANDLER(mailbox);
}}
-#line 250 "mn-custom-vfs-mailbox.c"
+#line 249 "mn-custom-vfs-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 51 "mn-custom-vfs-mailbox.gob"
+#line 50 "mn-custom-vfs-mailbox.gob"
static MNMailbox *
___3_mn_custom_vfs_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * uri)
-#line 257 "mn-custom-vfs-mailbox.c"
+#line 256 "mn-custom-vfs-mailbox.c"
#define PARENT_HANDLER(___dummy,___uri) \
((MN_MAILBOX_CLASS(parent_class)->parse_uri)? \
(* MN_MAILBOX_CLASS(parent_class)->parse_uri)(___dummy,___uri): \
@@ -261,7 +260,7 @@ ___3_mn_custom_vfs_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const cha
{
#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::parse_uri"
{
-#line 53 "mn-custom-vfs-mailbox.gob"
+#line 52 "mn-custom-vfs-mailbox.gob"
GnomeVFSURI *vfs_uri;
MNMailbox *mailbox = NULL;
@@ -275,21 +274,21 @@ ___3_mn_custom_vfs_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const cha
return mailbox;
}}
-#line 279 "mn-custom-vfs-mailbox.c"
+#line 278 "mn-custom-vfs-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 67 "mn-custom-vfs-mailbox.gob"
+#line 66 "mn-custom-vfs-mailbox.gob"
static void
___4_mn_custom_vfs_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 286 "mn-custom-vfs-mailbox.c"
+#line 285 "mn-custom-vfs-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->check) \
(* MN_MAILBOX_CLASS(parent_class)->check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Custom:VFS:Mailbox::check"
{
-#line 69 "mn-custom-vfs-mailbox.gob"
+#line 68 "mn-custom-vfs-mailbox.gob"
if (MN_VFS_MAILBOX(mailbox)->vfs_uri)
{
@@ -297,11 +296,10 @@ ___4_mn_custom_vfs_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
}
else
{
- mn_mailbox_set_stock_id(mailbox, MN_STOCK_UNKNOWN);
mn_mailbox_set_error(mailbox, _("invalid location"));
mn_mailbox_set_poll(mailbox, FALSE); /* disable the mailbox */
}
}}
-#line 306 "mn-custom-vfs-mailbox.c"
+#line 304 "mn-custom-vfs-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
diff --git a/src/mn-custom-vfs-mailbox.gob b/src/mn-custom-vfs-mailbox.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -27,13 +27,12 @@ requires 2.0.14
#include "config.h"
#include <glib/gi18n.h>
#include "mn-mailbox-private.h"
-#include "mn-stock.h"
%}
class MN:Custom:VFS:Mailbox from MN:VFS:Mailbox
{
public char *uri destroywith g_free;
- property STRING uri (link, flags = MN_MAILBOX_PARAM_PERMANENT | MN_MAILBOX_PARAM_REQUIRED);
+ property STRING uri (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE | MN_MAILBOX_PARAM_REQUIRED);
class_init (class)
{
@@ -73,7 +72,6 @@ class MN:Custom:VFS:Mailbox from MN:VFS:Mailbox
}
else
{
- mn_mailbox_set_stock_id(mailbox, MN_STOCK_UNKNOWN);
mn_mailbox_set_error(mailbox, _("invalid location"));
mn_mailbox_set_poll(mailbox, FALSE); /* disable the mailbox */
}
diff --git a/src/mn-dialog.gob b/src/mn-dialog.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-evolution-folder-tree-control-private.h b/src/mn-evolution-folder-tree-control-private.h
@@ -10,9 +10,9 @@ extern "C" {
#endif /* __cplusplus */
struct _MNEvolutionFolderTreeControlPrivate {
-#line 41 "mn-evolution-folder-tree-control.gob"
- BonoboPropertyBag * pb;
#line 42 "mn-evolution-folder-tree-control.gob"
+ BonoboPropertyBag * pb;
+#line 43 "mn-evolution-folder-tree-control.gob"
BonoboEventSource * es;
#line 18 "mn-evolution-folder-tree-control-private.h"
};
diff --git a/src/mn-evolution-folder-tree-control.c b/src/mn-evolution-folder-tree-control.c
@@ -24,6 +24,7 @@
#include "config.h"
#include <string.h>
+#include <glib/gi18n.h>
#include <mail/mail-component.h>
#include <mail/em-folder-tree.h>
#include "mn-evolution.h"
@@ -33,7 +34,7 @@ enum
PROP_SELECTED_URI
};
-#line 37 "mn-evolution-folder-tree-control.c"
+#line 38 "mn-evolution-folder-tree-control.c"
/* self casting macros */
#define SELF(x) MN_EVOLUTION_FOLDER_TREE_CONTROL(x)
#define SELF_CONST(x) MN_EVOLUTION_FOLDER_TREE_CONTROL_CONST(x)
@@ -115,9 +116,9 @@ ___dispose (GObject *obj_self)
MNEvolutionFolderTreeControl *self G_GNUC_UNUSED = MN_EVOLUTION_FOLDER_TREE_CONTROL (obj_self);
if (G_OBJECT_CLASS (parent_class)->dispose) \
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 41 "mn-evolution-folder-tree-control.gob"
+#line 42 "mn-evolution-folder-tree-control.gob"
if(self->_priv->pb) { bonobo_object_unref ((gpointer) self->_priv->pb); self->_priv->pb = NULL; }
-#line 121 "mn-evolution-folder-tree-control.c"
+#line 122 "mn-evolution-folder-tree-control.c"
}
#undef __GOB_FUNCTION__
@@ -150,9 +151,9 @@ mn_evolution_folder_tree_control_class_init (MNEvolutionFolderTreeControlClass *
parent_class = g_type_class_ref (BONOBO_TYPE_CONTROL);
-#line 44 "mn-evolution-folder-tree-control.gob"
+#line 45 "mn-evolution-folder-tree-control.gob"
g_object_class->constructor = ___1_mn_evolution_folder_tree_control_constructor;
-#line 156 "mn-evolution-folder-tree-control.c"
+#line 157 "mn-evolution-folder-tree-control.c"
g_object_class->dispose = ___dispose;
g_object_class->finalize = ___finalize;
}
@@ -160,10 +161,10 @@ mn_evolution_folder_tree_control_class_init (MNEvolutionFolderTreeControlClass *
-#line 44 "mn-evolution-folder-tree-control.gob"
+#line 45 "mn-evolution-folder-tree-control.gob"
static GObject *
___1_mn_evolution_folder_tree_control_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
-#line 167 "mn-evolution-folder-tree-control.c"
+#line 168 "mn-evolution-folder-tree-control.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -171,7 +172,7 @@ ___1_mn_evolution_folder_tree_control_constructor (GType type G_GNUC_UNUSED, uns
{
#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Control::constructor"
{
-#line 46 "mn-evolution-folder-tree-control.gob"
+#line 47 "mn-evolution-folder-tree-control.gob"
GObject *object;
Self *self;
@@ -195,7 +196,7 @@ ___1_mn_evolution_folder_tree_control_constructor (GType type G_GNUC_UNUSED, uns
PROP_SELECTED_URI,
BONOBO_ARG_STRING,
NULL,
- dgettext(GETTEXT_PACKAGE, "The currently selected URI"),
+ _("The currently selected URI"),
0);
bonobo_control_set_properties(control, BONOBO_OBJREF(selfp->pb), NULL);
@@ -213,18 +214,18 @@ ___1_mn_evolution_folder_tree_control_constructor (GType type G_GNUC_UNUSED, uns
return object;
}}
-#line 217 "mn-evolution-folder-tree-control.c"
+#line 218 "mn-evolution-folder-tree-control.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 88 "mn-evolution-folder-tree-control.gob"
+#line 89 "mn-evolution-folder-tree-control.gob"
static void
mn_evolution_folder_tree_control_get_property (BonoboPropertyBag * bag, BonoboArg * arg, unsigned int arg_id, CORBA_Environment * env, gpointer user_data)
-#line 224 "mn-evolution-folder-tree-control.c"
+#line 225 "mn-evolution-folder-tree-control.c"
{
#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Control::get_property"
{
-#line 94 "mn-evolution-folder-tree-control.gob"
+#line 95 "mn-evolution-folder-tree-control.gob"
Self *self = user_data;
EMFolderTree *tree = EM_FOLDER_TREE(bonobo_control_get_widget(BONOBO_CONTROL(self)));
@@ -246,17 +247,17 @@ mn_evolution_folder_tree_control_get_property (BonoboPropertyBag * bag, BonoboAr
break;
}
}}
-#line 250 "mn-evolution-folder-tree-control.c"
+#line 251 "mn-evolution-folder-tree-control.c"
#undef __GOB_FUNCTION__
-#line 116 "mn-evolution-folder-tree-control.gob"
+#line 117 "mn-evolution-folder-tree-control.gob"
static void
mn_evolution_folder_tree_control_set_property (BonoboPropertyBag * bag, const BonoboArg * arg, unsigned int arg_id, CORBA_Environment * env, gpointer user_data)
-#line 256 "mn-evolution-folder-tree-control.c"
+#line 257 "mn-evolution-folder-tree-control.c"
{
#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Control::set_property"
{
-#line 122 "mn-evolution-folder-tree-control.gob"
+#line 123 "mn-evolution-folder-tree-control.gob"
Self *self = user_data;
EMFolderTree *tree = EM_FOLDER_TREE(bonobo_control_get_widget(BONOBO_CONTROL(self)));
@@ -264,7 +265,7 @@ mn_evolution_folder_tree_control_set_property (BonoboPropertyBag * bag, const Bo
switch (arg_id)
{
case PROP_SELECTED_URI:
- em_folder_tree_set_selected(tree, BONOBO_ARG_GET_STRING(arg));
+ em_folder_tree_set_selected(tree, BONOBO_ARG_GET_STRING(arg), FALSE);
break;
default:
@@ -272,17 +273,17 @@ mn_evolution_folder_tree_control_set_property (BonoboPropertyBag * bag, const Bo
break;
}
}}
-#line 276 "mn-evolution-folder-tree-control.c"
+#line 277 "mn-evolution-folder-tree-control.c"
#undef __GOB_FUNCTION__
-#line 138 "mn-evolution-folder-tree-control.gob"
+#line 139 "mn-evolution-folder-tree-control.gob"
static void
mn_evolution_folder_tree_control_selected_h (EMFolderTree * tree, const char * full_name, const char * uri, guint32 flags, gpointer user_data)
-#line 282 "mn-evolution-folder-tree-control.c"
+#line 283 "mn-evolution-folder-tree-control.c"
{
#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Control::selected_h"
{
-#line 144 "mn-evolution-folder-tree-control.gob"
+#line 145 "mn-evolution-folder-tree-control.gob"
Self *self = user_data;
BonoboArg *arg;
@@ -299,17 +300,17 @@ mn_evolution_folder_tree_control_selected_h (EMFolderTree * tree, const char * f
bonobo_arg_release(arg);
}}
-#line 303 "mn-evolution-folder-tree-control.c"
+#line 304 "mn-evolution-folder-tree-control.c"
#undef __GOB_FUNCTION__
-#line 161 "mn-evolution-folder-tree-control.gob"
+#line 162 "mn-evolution-folder-tree-control.gob"
static void
mn_evolution_folder_tree_control_activated_h (EMFolderTree * tree, const char * full_name, const char * uri, gpointer user_data)
-#line 309 "mn-evolution-folder-tree-control.c"
+#line 310 "mn-evolution-folder-tree-control.c"
{
#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Control::activated_h"
{
-#line 166 "mn-evolution-folder-tree-control.gob"
+#line 167 "mn-evolution-folder-tree-control.gob"
Self *self = user_data;
BonoboArg *arg;
@@ -326,19 +327,19 @@ mn_evolution_folder_tree_control_activated_h (EMFolderTree * tree, const char *
bonobo_arg_release(arg);
}}
-#line 330 "mn-evolution-folder-tree-control.c"
+#line 331 "mn-evolution-folder-tree-control.c"
#undef __GOB_FUNCTION__
-#line 183 "mn-evolution-folder-tree-control.gob"
+#line 184 "mn-evolution-folder-tree-control.gob"
BonoboObject *
mn_evolution_folder_tree_control_factory_cb (BonoboGenericFactory * factory, const char * iid, gpointer closure)
-#line 336 "mn-evolution-folder-tree-control.c"
+#line 337 "mn-evolution-folder-tree-control.c"
{
#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Control::factory_cb"
{
-#line 187 "mn-evolution-folder-tree-control.gob"
+#line 188 "mn-evolution-folder-tree-control.gob"
return BONOBO_OBJECT(GET_NEW);
}}
-#line 344 "mn-evolution-folder-tree-control.c"
+#line 345 "mn-evolution-folder-tree-control.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-evolution-folder-tree-control.gob b/src/mn-evolution-folder-tree-control.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -26,6 +26,7 @@ requires 2.0.14
%{
#include "config.h"
#include <string.h>
+#include <glib/gi18n.h>
#include <mail/mail-component.h>
#include <mail/em-folder-tree.h>
#include "mn-evolution.h"
@@ -66,7 +67,7 @@ class MN:Evolution:Folder:Tree:Control from Bonobo:Control
PROP_SELECTED_URI,
BONOBO_ARG_STRING,
NULL,
- dgettext(GETTEXT_PACKAGE, "The currently selected URI"),
+ _("The currently selected URI"),
0);
bonobo_control_set_properties(control, BONOBO_OBJREF(selfp->pb), NULL);
@@ -126,7 +127,7 @@ class MN:Evolution:Folder:Tree:Control from Bonobo:Control
switch (arg_id)
{
case PROP_SELECTED_URI:
- em_folder_tree_set_selected(tree, BONOBO_ARG_GET_STRING(arg));
+ em_folder_tree_set_selected(tree, BONOBO_ARG_GET_STRING(arg), FALSE);
break;
default:
diff --git a/src/mn-evolution-glue-client.c b/src/mn-evolution-glue-client.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-evolution-glue-client.h b/src/mn-evolution-glue-client.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-evolution-glue.gob b/src/mn-evolution-glue.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-evolution-mailbox-private.h b/src/mn-evolution-mailbox-private.h
@@ -24,7 +24,9 @@ struct _MNEvolutionMailboxPrivate {
MNLockedBonoboListener * listener;
#line 64 "mn-evolution-mailbox.gob"
time_t last_browsed;
-#line 28 "mn-evolution-mailbox-private.h"
+#line 66 "mn-evolution-mailbox.gob"
+ GMutex * mutex;
+#line 30 "mn-evolution-mailbox-private.h"
};
#ifdef __cplusplus
diff --git a/src/mn-evolution-mailbox-properties.gob b/src/mn-evolution-mailbox-properties.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-evolution-mailbox.c b/src/mn-evolution-mailbox.c
@@ -60,7 +60,9 @@ static void mn_evolution_mailbox_init (MNEvolutionMailbox * self) G_GNUC_UNUSED;
static void ___3_mn_evolution_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
static void ___4_mn_evolution_mailbox_dispose (GObject * object) G_GNUC_UNUSED;
static void mn_evolution_mailbox_listener_cb (BonoboListener * listener, const char * event_name, const CORBA_any * any, CORBA_Environment * env, gpointer user_data) G_GNUC_UNUSED;
-static void ___6_mn_evolution_mailbox_reentrant_check (MNReentrantMailbox * mailbox, unsigned long check_id) G_GNUC_UNUSED;
+static void ___6_mn_evolution_mailbox_reentrant_check (MNReentrantMailbox * mailbox, int check_id) G_GNUC_UNUSED;
+static void mn_evolution_mailbox_lock (MNEvolutionMailbox * self) G_GNUC_UNUSED;
+static void mn_evolution_mailbox_unlock (MNEvolutionMailbox * self) G_GNUC_UNUSED;
enum {
PROP_0,
@@ -73,6 +75,8 @@ static MNReentrantMailboxClass *parent_class = NULL;
/* Short form macros */
#define self_listener_cb mn_evolution_mailbox_listener_cb
+#define self_lock mn_evolution_mailbox_lock
+#define self_unlock mn_evolution_mailbox_unlock
GType
mn_evolution_mailbox_get_type (void)
{
@@ -126,17 +130,20 @@ ___finalize(GObject *obj_self)
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
#line 51 "mn-evolution-mailbox.gob"
if(self->uri) { g_free ((gpointer) self->uri); self->uri = NULL; }
-#line 130 "mn-evolution-mailbox.c"
+#line 134 "mn-evolution-mailbox.c"
#line 58 "mn-evolution-mailbox.gob"
if(self->folder_name) { g_free ((gpointer) self->folder_name); self->folder_name = NULL; }
-#line 133 "mn-evolution-mailbox.c"
+#line 137 "mn-evolution-mailbox.c"
+#line 66 "mn-evolution-mailbox.gob"
+ if(self->_priv->mutex) { g_mutex_free ((gpointer) self->_priv->mutex); self->_priv->mutex = NULL; }
+#line 140 "mn-evolution-mailbox.c"
}
#undef __GOB_FUNCTION__
-#line 66 "mn-evolution-mailbox.gob"
+#line 68 "mn-evolution-mailbox.gob"
static void
mn_evolution_mailbox_class_init (MNEvolutionMailboxClass * class G_GNUC_UNUSED)
-#line 140 "mn-evolution-mailbox.c"
+#line 147 "mn-evolution-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -147,13 +154,13 @@ mn_evolution_mailbox_class_init (MNEvolutionMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_REENTRANT_MAILBOX);
-#line 91 "mn-evolution-mailbox.gob"
+#line 93 "mn-evolution-mailbox.gob"
mn_mailbox_class->seal = ___3_mn_evolution_mailbox_seal;
-#line 100 "mn-evolution-mailbox.gob"
+#line 102 "mn-evolution-mailbox.gob"
g_object_class->dispose = ___4_mn_evolution_mailbox_dispose;
-#line 164 "mn-evolution-mailbox.gob"
+#line 166 "mn-evolution-mailbox.gob"
mn_reentrant_mailbox_class->reentrant_check = ___6_mn_evolution_mailbox_reentrant_check;
-#line 157 "mn-evolution-mailbox.c"
+#line 164 "mn-evolution-mailbox.c"
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
g_object_class->set_property = ___object_set_property;
@@ -165,7 +172,7 @@ mn_evolution_mailbox_class_init (MNEvolutionMailboxClass * class G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_URI,
param_spec);
@@ -174,13 +181,13 @@ mn_evolution_mailbox_class_init (MNEvolutionMailboxClass * class G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_FOLDER_NAME,
param_spec);
}
{
-#line 67 "mn-evolution-mailbox.gob"
+#line 69 "mn-evolution-mailbox.gob"
MN_MAILBOX_CLASS(class)->type = "evolution";
@@ -195,19 +202,22 @@ mn_evolution_mailbox_class_init (MNEvolutionMailboxClass * class G_GNUC_UNUSED)
bonobo_exception_add_handler_str(ex_GNOME_MailNotification_Evolution_Glue_FolderNotFound, _("folder not found"));
bonobo_exception_add_handler_str(ex_GNOME_MailNotification_Evolution_Glue_MessageNotFound, _("message not found"));
-#line 199 "mn-evolution-mailbox.c"
+#line 206 "mn-evolution-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 82 "mn-evolution-mailbox.gob"
+#line 84 "mn-evolution-mailbox.gob"
static void
mn_evolution_mailbox_init (MNEvolutionMailbox * self G_GNUC_UNUSED)
-#line 206 "mn-evolution-mailbox.c"
+#line 213 "mn-evolution-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_EVOLUTION_MAILBOX,MNEvolutionMailboxPrivate);
+#line 66 "mn-evolution-mailbox.gob"
+ self->_priv->mutex = g_mutex_new();
+#line 219 "mn-evolution-mailbox.c"
{
-#line 83 "mn-evolution-mailbox.gob"
+#line 85 "mn-evolution-mailbox.gob"
mn_mailbox_set_format(MN_MAILBOX(self), "Evolution");
mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_EVOLUTION_MAILBOX);
@@ -215,7 +225,7 @@ mn_evolution_mailbox_init (MNEvolutionMailbox * self G_GNUC_UNUSED)
/* we receive notifications from Evolution, no need to poll */
mn_mailbox_set_poll(MN_MAILBOX(self), FALSE);
-#line 219 "mn-evolution-mailbox.c"
+#line 229 "mn-evolution-mailbox.c"
}
}
#undef __GOB_FUNCTION__
@@ -236,14 +246,14 @@ ___object_set_property (GObject *object,
{
#line 52 "mn-evolution-mailbox.gob"
{ char *old = self->uri; self->uri = g_value_dup_string (VAL); g_free (old); }
-#line 240 "mn-evolution-mailbox.c"
+#line 250 "mn-evolution-mailbox.c"
}
break;
case PROP_FOLDER_NAME:
{
#line 59 "mn-evolution-mailbox.gob"
{ char *old = self->folder_name; self->folder_name = g_value_dup_string (VAL); g_free (old); }
-#line 247 "mn-evolution-mailbox.c"
+#line 257 "mn-evolution-mailbox.c"
}
break;
default:
@@ -274,14 +284,14 @@ ___object_get_property (GObject *object,
{
#line 52 "mn-evolution-mailbox.gob"
g_value_set_string (VAL, self->uri);
-#line 278 "mn-evolution-mailbox.c"
+#line 288 "mn-evolution-mailbox.c"
}
break;
case PROP_FOLDER_NAME:
{
#line 59 "mn-evolution-mailbox.gob"
g_value_set_string (VAL, self->folder_name);
-#line 285 "mn-evolution-mailbox.c"
+#line 295 "mn-evolution-mailbox.c"
}
break;
default:
@@ -298,38 +308,38 @@ g_value_set_string (VAL, self->folder_name);
-#line 91 "mn-evolution-mailbox.gob"
+#line 93 "mn-evolution-mailbox.gob"
static void
___3_mn_evolution_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 305 "mn-evolution-mailbox.c"
+#line 315 "mn-evolution-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->seal) \
(* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::seal"
{
-#line 93 "mn-evolution-mailbox.gob"
+#line 95 "mn-evolution-mailbox.gob"
PARENT_HANDLER(mailbox);
if (! mailbox->runtime_name)
mailbox->runtime_name = g_strdup(SELF(mailbox)->folder_name);
}}
-#line 319 "mn-evolution-mailbox.c"
+#line 329 "mn-evolution-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 100 "mn-evolution-mailbox.gob"
+#line 102 "mn-evolution-mailbox.gob"
static void
___4_mn_evolution_mailbox_dispose (GObject * object G_GNUC_UNUSED)
-#line 326 "mn-evolution-mailbox.c"
+#line 336 "mn-evolution-mailbox.c"
#define PARENT_HANDLER(___object) \
{ if(G_OBJECT_CLASS(parent_class)->dispose) \
(* G_OBJECT_CLASS(parent_class)->dispose)(___object); }
{
#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::dispose"
{
-#line 102 "mn-evolution-mailbox.gob"
+#line 104 "mn-evolution-mailbox.gob"
Self *self = SELF(object);
@@ -359,18 +369,18 @@ ___4_mn_evolution_mailbox_dispose (GObject * object G_GNUC_UNUSED)
PARENT_HANDLER(object);
}}
-#line 363 "mn-evolution-mailbox.c"
+#line 373 "mn-evolution-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 132 "mn-evolution-mailbox.gob"
+#line 134 "mn-evolution-mailbox.gob"
static void
mn_evolution_mailbox_listener_cb (BonoboListener * listener, const char * event_name, const CORBA_any * any, CORBA_Environment * env, gpointer user_data)
-#line 370 "mn-evolution-mailbox.c"
+#line 380 "mn-evolution-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::listener_cb"
{
-#line 138 "mn-evolution-mailbox.gob"
+#line 140 "mn-evolution-mailbox.gob"
Self *self = user_data;
const char *uri;
@@ -382,9 +392,9 @@ mn_evolution_mailbox_listener_cb (BonoboListener * listener, const char * event_
{
time_t now = mn_time();
- mn_reentrant_mailbox_lock(MN_REENTRANT_MAILBOX(self));
+ self_lock(self);
selfp->last_browsed = now;
- mn_reentrant_mailbox_unlock(MN_REENTRANT_MAILBOX(self));
+ self_unlock(self);
mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(self));
}
@@ -396,20 +406,20 @@ mn_evolution_mailbox_listener_cb (BonoboListener * listener, const char * event_
mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(self));
}
}}
-#line 400 "mn-evolution-mailbox.c"
+#line 410 "mn-evolution-mailbox.c"
#undef __GOB_FUNCTION__
-#line 164 "mn-evolution-mailbox.gob"
+#line 166 "mn-evolution-mailbox.gob"
static void
-___6_mn_evolution_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_UNUSED, unsigned long check_id)
-#line 406 "mn-evolution-mailbox.c"
+___6_mn_evolution_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_UNUSED, int check_id)
+#line 416 "mn-evolution-mailbox.c"
#define PARENT_HANDLER(___mailbox,___check_id) \
{ if(MN_REENTRANT_MAILBOX_CLASS(parent_class)->reentrant_check) \
(* MN_REENTRANT_MAILBOX_CLASS(parent_class)->reentrant_check)(___mailbox,___check_id); }
{
#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::reentrant_check"
{
-#line 166 "mn-evolution-mailbox.gob"
+#line 168 "mn-evolution-mailbox.gob"
Self *self = SELF(mailbox);
GNOME_MailNotification_Evolution_Glue glue;
@@ -417,7 +427,7 @@ ___6_mn_evolution_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_U
CORBA_sequence_GNOME_MailNotification_Evolution_Message *message_seq;
time_t last_browsed;
- mn_reentrant_mailbox_lock(mailbox);
+ self_lock(self);
if (! selfp->glue)
{
@@ -456,22 +466,22 @@ ___6_mn_evolution_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_U
last_browsed = selfp->last_browsed;
- mn_reentrant_mailbox_unlock(mailbox);
+ self_unlock(self);
if (glue == CORBA_OBJECT_NIL)
{
- GDK_THREADS_ENTER();
-
- if (! mn_reentrant_mailbox_check_aborted_unlocked(mailbox, check_id))
+ if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
{
+ GDK_THREADS_ENTER();
+
mn_mailbox_set_error(MN_MAILBOX(self), _("unable to contact Evolution"));
if (mn_mailbox_get_poll(MN_MAILBOX(self)))
mn_mailbox_set_poll(MN_MAILBOX(self), FALSE);
- }
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
return;
}
@@ -482,12 +492,12 @@ ___6_mn_evolution_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_U
if (BONOBO_EX(&env))
{
- GDK_THREADS_ENTER();
-
- if (! mn_reentrant_mailbox_check_aborted_unlocked(mailbox, check_id))
+ if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
{
char *errmsg;
+ GDK_THREADS_ENTER();
+
errmsg = bonobo_exception_get_text(&env);
mn_mailbox_set_error(MN_MAILBOX(self), "%s", errmsg);
g_free(errmsg);
@@ -499,10 +509,10 @@ ___6_mn_evolution_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_U
* re-enable polling.
*/
mn_mailbox_set_poll(MN_MAILBOX(self), TRUE);
- }
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
}
else
{
@@ -531,7 +541,7 @@ ___6_mn_evolution_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_U
GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(mailbox, check_id))
+ if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
{
mn_mailbox_set_messages(MN_MAILBOX(self), messages);
@@ -550,6 +560,44 @@ ___6_mn_evolution_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_U
CORBA_exception_free(&env);
bonobo_object_release_unref(glue, NULL);
}}
-#line 554 "mn-evolution-mailbox.c"
+#line 564 "mn-evolution-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
+
+#line 309 "mn-evolution-mailbox.gob"
+static void
+mn_evolution_mailbox_lock (MNEvolutionMailbox * self)
+#line 571 "mn-evolution-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::lock"
+#line 309 "mn-evolution-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 309 "mn-evolution-mailbox.gob"
+ g_return_if_fail (MN_IS_EVOLUTION_MAILBOX (self));
+#line 578 "mn-evolution-mailbox.c"
+{
+#line 311 "mn-evolution-mailbox.gob"
+
+ g_mutex_lock(selfp->mutex);
+ }}
+#line 584 "mn-evolution-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 315 "mn-evolution-mailbox.gob"
+static void
+mn_evolution_mailbox_unlock (MNEvolutionMailbox * self)
+#line 590 "mn-evolution-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Evolution:Mailbox::unlock"
+#line 315 "mn-evolution-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 315 "mn-evolution-mailbox.gob"
+ g_return_if_fail (MN_IS_EVOLUTION_MAILBOX (self));
+#line 597 "mn-evolution-mailbox.c"
+{
+#line 317 "mn-evolution-mailbox.gob"
+
+ g_mutex_unlock(selfp->mutex);
+ }}
+#line 603 "mn-evolution-mailbox.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-evolution-mailbox.gob b/src/mn-evolution-mailbox.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -49,20 +49,22 @@ static GStaticMutex listeners_mutex = G_STATIC_MUTEX_INIT;
class MN:Evolution:Mailbox from MN:Reentrant:Mailbox
{
public char *uri destroywith g_free;
- property STRING uri (link, flags = MN_MAILBOX_PARAM_PERMANENT | MN_MAILBOX_PARAM_REQUIRED);
+ property STRING uri (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE | MN_MAILBOX_PARAM_REQUIRED);
/*
* Evolution might not be running when we instantiate the mailbox,
* so we cache the folder name.
*/
public char *folder_name destroywith g_free;
- property STRING folder_name (link, flags = MN_MAILBOX_PARAM_PERMANENT | MN_MAILBOX_PARAM_REQUIRED);
+ property STRING folder_name (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE | MN_MAILBOX_PARAM_REQUIRED);
private MNBonoboUnknown *glue;
private MNLockedBonoboListener *listener;
private time_t last_browsed;
+ private GMutex *mutex = {g_mutex_new()} destroywith g_mutex_free;
+
class_init (class)
{
MN_MAILBOX_CLASS(class)->type = "evolution";
@@ -146,9 +148,9 @@ class MN:Evolution:Mailbox from MN:Reentrant:Mailbox
{
time_t now = mn_time();
- mn_reentrant_mailbox_lock(MN_REENTRANT_MAILBOX(self));
+ self_lock(self);
selfp->last_browsed = now;
- mn_reentrant_mailbox_unlock(MN_REENTRANT_MAILBOX(self));
+ self_unlock(self);
mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(self));
}
@@ -162,7 +164,7 @@ class MN:Evolution:Mailbox from MN:Reentrant:Mailbox
}
override (MN:Reentrant:Mailbox) void
- reentrant_check (MNReentrantMailbox *mailbox, unsigned long check_id)
+ reentrant_check (MNReentrantMailbox *mailbox, int check_id)
{
Self *self = SELF(mailbox);
GNOME_MailNotification_Evolution_Glue glue;
@@ -170,7 +172,7 @@ class MN:Evolution:Mailbox from MN:Reentrant:Mailbox
CORBA_sequence_GNOME_MailNotification_Evolution_Message *message_seq;
time_t last_browsed;
- mn_reentrant_mailbox_lock(mailbox);
+ self_lock(self);
if (! selfp->glue)
{
@@ -209,22 +211,22 @@ class MN:Evolution:Mailbox from MN:Reentrant:Mailbox
last_browsed = selfp->last_browsed;
- mn_reentrant_mailbox_unlock(mailbox);
+ self_unlock(self);
if (glue == CORBA_OBJECT_NIL)
{
- GDK_THREADS_ENTER();
-
- if (! mn_reentrant_mailbox_check_aborted_unlocked(mailbox, check_id))
+ if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
{
+ GDK_THREADS_ENTER();
+
mn_mailbox_set_error(MN_MAILBOX(self), _("unable to contact Evolution"));
if (mn_mailbox_get_poll(MN_MAILBOX(self)))
mn_mailbox_set_poll(MN_MAILBOX(self), FALSE);
- }
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
return;
}
@@ -235,12 +237,12 @@ class MN:Evolution:Mailbox from MN:Reentrant:Mailbox
if (BONOBO_EX(&env))
{
- GDK_THREADS_ENTER();
-
- if (! mn_reentrant_mailbox_check_aborted_unlocked(mailbox, check_id))
+ if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
{
char *errmsg;
+ GDK_THREADS_ENTER();
+
errmsg = bonobo_exception_get_text(&env);
mn_mailbox_set_error(MN_MAILBOX(self), "%s", errmsg);
g_free(errmsg);
@@ -252,10 +254,10 @@ class MN:Evolution:Mailbox from MN:Reentrant:Mailbox
* re-enable polling.
*/
mn_mailbox_set_poll(MN_MAILBOX(self), TRUE);
- }
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
}
else
{
@@ -284,7 +286,7 @@ class MN:Evolution:Mailbox from MN:Reentrant:Mailbox
GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(mailbox, check_id))
+ if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
{
mn_mailbox_set_messages(MN_MAILBOX(self), messages);
@@ -303,4 +305,16 @@ class MN:Evolution:Mailbox from MN:Reentrant:Mailbox
CORBA_exception_free(&env);
bonobo_object_release_unref(glue, NULL);
}
+
+ private void
+ lock (self)
+ {
+ g_mutex_lock(selfp->mutex);
+ }
+
+ private void
+ unlock (self)
+ {
+ g_mutex_unlock(selfp->mutex);
+ }
}
diff --git a/src/mn-evolution-message-private.h b/src/mn-evolution-message-private.h
@@ -10,7 +10,7 @@ extern "C" {
#endif /* __cplusplus */
struct _MNEvolutionMessagePrivate {
-#line 73 "mn-evolution-message.gob"
+#line 74 "mn-evolution-message.gob"
char * uid;
#line 16 "mn-evolution-message-private.h"
};
diff --git a/src/mn-evolution-message.c b/src/mn-evolution-message.c
@@ -25,6 +25,7 @@
#line 26 "mn-evolution-message.gob"
#include "config.h"
+#include <glib/gi18n.h>
#include <camel/camel-folder-summary.h>
#include "GNOME_MailNotification_Evolution.h"
#include "mn-evolution-mailbox.h"
@@ -67,7 +68,7 @@
return status; \
}
-#line 71 "mn-evolution-message.c"
+#line 72 "mn-evolution-message.c"
/* self casting macros */
#define SELF(x) MN_EVOLUTION_MESSAGE(x)
#define SELF_CONST(x) MN_EVOLUTION_MESSAGE_CONST(x)
@@ -155,9 +156,9 @@ ___finalize(GObject *obj_self)
gpointer priv G_GNUC_UNUSED = self->_priv;
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 73 "mn-evolution-message.gob"
+#line 74 "mn-evolution-message.gob"
if(self->_priv->uid) { g_free ((gpointer) self->_priv->uid); self->_priv->uid = NULL; }
-#line 161 "mn-evolution-message.c"
+#line 162 "mn-evolution-message.c"
}
#undef __GOB_FUNCTION__
@@ -179,17 +180,17 @@ mn_evolution_message_class_init (MNEvolutionMessageClass * c G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_MESSAGE);
-#line 95 "mn-evolution-message.gob"
+#line 96 "mn-evolution-message.gob"
mn_message_class->can_open_impl = ___2_mn_evolution_message_can_open_impl;
-#line 101 "mn-evolution-message.gob"
+#line 102 "mn-evolution-message.gob"
mn_message_class->open_impl = ___3_mn_evolution_message_open_impl;
-#line 115 "mn-evolution-message.gob"
+#line 116 "mn-evolution-message.gob"
mn_message_class->mark_as_read_impl = ___5_mn_evolution_message_mark_as_read_impl;
-#line 121 "mn-evolution-message.gob"
+#line 122 "mn-evolution-message.gob"
mn_message_class->mark_as_spam_impl = ___6_mn_evolution_message_mark_as_spam_impl;
-#line 127 "mn-evolution-message.gob"
+#line 128 "mn-evolution-message.gob"
mn_message_class->delete_impl = ___7_mn_evolution_message_delete_impl;
-#line 193 "mn-evolution-message.c"
+#line 194 "mn-evolution-message.c"
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
g_object_class->set_property = ___object_set_property;
@@ -223,9 +224,9 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_UID:
{
-#line 74 "mn-evolution-message.gob"
+#line 75 "mn-evolution-message.gob"
{ char *old = self->_priv->uid; self->_priv->uid = g_value_dup_string (VAL); g_free (old); }
-#line 229 "mn-evolution-message.c"
+#line 230 "mn-evolution-message.c"
}
break;
default:
@@ -254,9 +255,9 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_UID:
{
-#line 74 "mn-evolution-message.gob"
+#line 75 "mn-evolution-message.gob"
g_value_set_string (VAL, self->_priv->uid);
-#line 260 "mn-evolution-message.c"
+#line 261 "mn-evolution-message.c"
}
break;
default:
@@ -273,17 +274,17 @@ g_value_set_string (VAL, self->_priv->uid);
-#line 76 "mn-evolution-message.gob"
+#line 77 "mn-evolution-message.gob"
MNMessage *
mn_evolution_message_new (MNMailbox * mailbox, time_t sent_time, const char * id, const char * from, const char * subject, MNMessageFlags flags, const char * uid)
-#line 280 "mn-evolution-message.c"
+#line 281 "mn-evolution-message.c"
{
#define __GOB_FUNCTION__ "MN:Evolution:Message::new"
-#line 76 "mn-evolution-message.gob"
+#line 77 "mn-evolution-message.gob"
g_return_val_if_fail (uid != NULL, (MNMessage * )0);
-#line 285 "mn-evolution-message.c"
+#line 286 "mn-evolution-message.c"
{
-#line 84 "mn-evolution-message.gob"
+#line 85 "mn-evolution-message.gob"
return MN_MESSAGE(GET_NEW_VARG(MN_MESSAGE_PROP_MAILBOX(mailbox),
MN_MESSAGE_PROP_SENT_TIME(sent_time),
@@ -294,13 +295,13 @@ mn_evolution_message_new (MNMailbox * mailbox, time_t sent_time, const char * id
MN_EVOLUTION_MESSAGE_PROP_UID((char *) uid),
NULL));
}}
-#line 298 "mn-evolution-message.c"
+#line 299 "mn-evolution-message.c"
#undef __GOB_FUNCTION__
-#line 95 "mn-evolution-message.gob"
+#line 96 "mn-evolution-message.gob"
static gboolean
___2_mn_evolution_message_can_open_impl (MNMessage * message G_GNUC_UNUSED)
-#line 304 "mn-evolution-message.c"
+#line 305 "mn-evolution-message.c"
#define PARENT_HANDLER(___message) \
((MN_MESSAGE_CLASS(parent_class)->can_open_impl)? \
(* MN_MESSAGE_CLASS(parent_class)->can_open_impl)(___message): \
@@ -308,18 +309,18 @@ ___2_mn_evolution_message_can_open_impl (MNMessage * message G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:Evolution:Message::can_open_impl"
{
-#line 97 "mn-evolution-message.gob"
+#line 98 "mn-evolution-message.gob"
return TRUE;
}}
-#line 316 "mn-evolution-message.c"
+#line 317 "mn-evolution-message.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 101 "mn-evolution-message.gob"
+#line 102 "mn-evolution-message.gob"
static gboolean
___3_mn_evolution_message_open_impl (MNMessage * message G_GNUC_UNUSED, GError ** err)
-#line 323 "mn-evolution-message.c"
+#line 324 "mn-evolution-message.c"
#define PARENT_HANDLER(___message,___err) \
((MN_MESSAGE_CLASS(parent_class)->open_impl)? \
(* MN_MESSAGE_CLASS(parent_class)->open_impl)(___message,___err): \
@@ -327,39 +328,39 @@ ___3_mn_evolution_message_open_impl (MNMessage * message G_GNUC_UNUSED, GError *
{
#define __GOB_FUNCTION__ "MN:Evolution:Message::open_impl"
{
-#line 103 "mn-evolution-message.gob"
+#line 104 "mn-evolution-message.gob"
Self *self = SELF(message);
GLUE_METHOD(GNOME_MailNotification_Evolution_Glue_openMessage(glue, mailbox->uri, selfp->uid, &env));
}}
-#line 336 "mn-evolution-message.c"
+#line 337 "mn-evolution-message.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 108 "mn-evolution-message.gob"
+#line 109 "mn-evolution-message.gob"
static gboolean
mn_evolution_message_set_flags (MNEvolutionMessage * self, guint32 flags, GError ** err)
-#line 343 "mn-evolution-message.c"
+#line 344 "mn-evolution-message.c"
{
#define __GOB_FUNCTION__ "MN:Evolution:Message::set_flags"
-#line 108 "mn-evolution-message.gob"
+#line 109 "mn-evolution-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 108 "mn-evolution-message.gob"
+#line 109 "mn-evolution-message.gob"
g_return_val_if_fail (MN_IS_EVOLUTION_MESSAGE (self), (gboolean )0);
-#line 350 "mn-evolution-message.c"
+#line 351 "mn-evolution-message.c"
{
-#line 110 "mn-evolution-message.gob"
+#line 111 "mn-evolution-message.gob"
MNMessage *message = MN_MESSAGE(self);
GLUE_METHOD(GNOME_MailNotification_Evolution_Glue_setMessageFlags(glue, mailbox->uri, selfp->uid, flags, &env));
}}
-#line 357 "mn-evolution-message.c"
+#line 358 "mn-evolution-message.c"
#undef __GOB_FUNCTION__
-#line 115 "mn-evolution-message.gob"
+#line 116 "mn-evolution-message.gob"
static gboolean
___5_mn_evolution_message_mark_as_read_impl (MNMessage * message G_GNUC_UNUSED, GError ** err)
-#line 363 "mn-evolution-message.c"
+#line 364 "mn-evolution-message.c"
#define PARENT_HANDLER(___message,___err) \
((MN_MESSAGE_CLASS(parent_class)->mark_as_read_impl)? \
(* MN_MESSAGE_CLASS(parent_class)->mark_as_read_impl)(___message,___err): \
@@ -367,18 +368,18 @@ ___5_mn_evolution_message_mark_as_read_impl (MNMessage * message G_GNUC_UNUSED,
{
#define __GOB_FUNCTION__ "MN:Evolution:Message::mark_as_read_impl"
{
-#line 117 "mn-evolution-message.gob"
+#line 118 "mn-evolution-message.gob"
return self_set_flags(SELF(message), CAMEL_MESSAGE_SEEN, err);
}}
-#line 375 "mn-evolution-message.c"
+#line 376 "mn-evolution-message.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 121 "mn-evolution-message.gob"
+#line 122 "mn-evolution-message.gob"
static gboolean
___6_mn_evolution_message_mark_as_spam_impl (MNMessage * message G_GNUC_UNUSED, GError ** err)
-#line 382 "mn-evolution-message.c"
+#line 383 "mn-evolution-message.c"
#define PARENT_HANDLER(___message,___err) \
((MN_MESSAGE_CLASS(parent_class)->mark_as_spam_impl)? \
(* MN_MESSAGE_CLASS(parent_class)->mark_as_spam_impl)(___message,___err): \
@@ -386,18 +387,18 @@ ___6_mn_evolution_message_mark_as_spam_impl (MNMessage * message G_GNUC_UNUSED,
{
#define __GOB_FUNCTION__ "MN:Evolution:Message::mark_as_spam_impl"
{
-#line 123 "mn-evolution-message.gob"
+#line 124 "mn-evolution-message.gob"
return self_set_flags(SELF(message), CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_JUNK | CAMEL_MESSAGE_JUNK_LEARN, err);
}}
-#line 394 "mn-evolution-message.c"
+#line 395 "mn-evolution-message.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 127 "mn-evolution-message.gob"
+#line 128 "mn-evolution-message.gob"
static gboolean
___7_mn_evolution_message_delete_impl (MNMessage * message G_GNUC_UNUSED, GError ** err)
-#line 401 "mn-evolution-message.c"
+#line 402 "mn-evolution-message.c"
#define PARENT_HANDLER(___message,___err) \
((MN_MESSAGE_CLASS(parent_class)->delete_impl)? \
(* MN_MESSAGE_CLASS(parent_class)->delete_impl)(___message,___err): \
@@ -405,10 +406,10 @@ ___7_mn_evolution_message_delete_impl (MNMessage * message G_GNUC_UNUSED, GError
{
#define __GOB_FUNCTION__ "MN:Evolution:Message::delete_impl"
{
-#line 129 "mn-evolution-message.gob"
+#line 130 "mn-evolution-message.gob"
return self_set_flags(SELF(message), CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED, err);
}}
-#line 413 "mn-evolution-message.c"
+#line 414 "mn-evolution-message.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
diff --git a/src/mn-evolution-message.gob b/src/mn-evolution-message.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -25,6 +25,7 @@ requires 2.0.14
%{
#include "config.h"
+#include <glib/gi18n.h>
#include <camel/camel-folder-summary.h>
#include "GNOME_MailNotification_Evolution.h"
#include "mn-evolution-mailbox.h"
diff --git a/src/mn-evolution-plugin.c b/src/mn-evolution-plugin.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-evolution.h b/src/mn-evolution.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-file-chooser-button-private.h b/src/mn-file-chooser-button-private.h
@@ -0,0 +1,40 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_FILE_CHOOSER_BUTTON_PRIVATE_H__
+#define __MN_FILE_CHOOSER_BUTTON_PRIVATE_H__
+
+#include "mn-file-chooser-button.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#line 37 "mn-file-chooser-button.gob"
+
+#include <libgnomevfs/gnome-vfs.h>
+
+#line 18 "mn-file-chooser-button-private.h"
+struct _MNFileChooserButtonPrivate {
+#line 51 "mn-file-chooser-button.gob"
+ char * filename;
+#line 68 "mn-file-chooser-button.gob"
+ MNFileChooserButtonCreateDialogFunction create_dialog;
+#line 69 "mn-file-chooser-button.gob"
+ gpointer create_dialog_data;
+#line 71 "mn-file-chooser-button.gob"
+ GtkWidget * image;
+#line 72 "mn-file-chooser-button.gob"
+ GtkWidget * label;
+#line 73 "mn-file-chooser-button.gob"
+ GtkWidget * dialog;
+#line 75 "mn-file-chooser-button.gob"
+ GnomeVFSAsyncHandle * async_handle;
+#line 34 "mn-file-chooser-button-private.h"
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-file-chooser-button.c b/src/mn-file-chooser-button.c
@@ -0,0 +1,542 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-file-chooser-button.h"
+
+#include "mn-file-chooser-button-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 41 "mn-file-chooser-button.gob"
+
+#include "config.h"
+#include <glib/gi18n.h>
+#include <gnome.h>
+#include <eel/eel.h>
+#include "mn-util.h"
+
+#line 34 "mn-file-chooser-button.c"
+/* self casting macros */
+#define SELF(x) MN_FILE_CHOOSER_BUTTON(x)
+#define SELF_CONST(x) MN_FILE_CHOOSER_BUTTON_CONST(x)
+#define IS_SELF(x) MN_IS_FILE_CHOOSER_BUTTON(x)
+#define TYPE_SELF MN_TYPE_FILE_CHOOSER_BUTTON
+#define SELF_CLASS(x) MN_FILE_CHOOSER_BUTTON_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_FILE_CHOOSER_BUTTON_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNFileChooserButton Self;
+typedef MNFileChooserButtonClass SelfClass;
+
+/* here are local prototypes */
+static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void mn_file_chooser_button_class_init (MNFileChooserButtonClass * c) G_GNUC_UNUSED;
+static void mn_file_chooser_button_init (MNFileChooserButton * self) G_GNUC_UNUSED;
+static void mn_file_chooser_button_clicked_h (GtkButton * button, gpointer data) G_GNUC_UNUSED;
+static void mn_file_chooser_button_update (MNFileChooserButton * self) G_GNUC_UNUSED;
+static void mn_file_chooser_button_get_file_info_cb (GnomeVFSAsyncHandle * handle, GList * results, gpointer data) G_GNUC_UNUSED;
+static void mn_file_chooser_button_response_h (GtkDialog * dialog, int response, gpointer user_data) G_GNUC_UNUSED;
+
+enum {
+ PROP_0,
+ PROP_FILENAME
+};
+
+/* pointer to the class of our parent */
+static GtkHBoxClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_get_filename mn_file_chooser_button_get_filename
+#define self_set_filename mn_file_chooser_button_set_filename
+#define self_clicked_h mn_file_chooser_button_clicked_h
+#define self_update mn_file_chooser_button_update
+#define self_get_file_info_cb mn_file_chooser_button_get_file_info_cb
+#define self_response_h mn_file_chooser_button_response_h
+#define self_new mn_file_chooser_button_new
+GType
+mn_file_chooser_button_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNFileChooserButtonClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_file_chooser_button_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNFileChooserButton),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_file_chooser_button_init,
+ NULL
+ };
+
+ type = g_type_register_static (GTK_TYPE_HBOX, "MNFileChooserButton", &info, (GTypeFlags)0);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNFileChooserButton *)g_object_new(mn_file_chooser_button_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNFileChooserButton * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNFileChooserButton *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNFileChooserButton *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNFileChooserButton *)g_object_new_valist (mn_file_chooser_button_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+
+static void
+___dispose (GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::dispose"
+ MNFileChooserButton *self G_GNUC_UNUSED = MN_FILE_CHOOSER_BUTTON (obj_self);
+ if (G_OBJECT_CLASS (parent_class)->dispose) \
+ (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
+#line 73 "mn-file-chooser-button.gob"
+ if(self->_priv->dialog) { gtk_widget_destroy ((gpointer) self->_priv->dialog); self->_priv->dialog = NULL; }
+#line 126 "mn-file-chooser-button.c"
+#line 75 "mn-file-chooser-button.gob"
+ if(self->_priv->async_handle) { gnome_vfs_async_cancel ((gpointer) self->_priv->async_handle); self->_priv->async_handle = NULL; }
+#line 129 "mn-file-chooser-button.c"
+}
+#undef __GOB_FUNCTION__
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::finalize"
+ MNFileChooserButton *self G_GNUC_UNUSED = MN_FILE_CHOOSER_BUTTON (obj_self);
+ gpointer priv G_GNUC_UNUSED = self->_priv;
+ if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
+#line 51 "mn-file-chooser-button.gob"
+ if(self->_priv->filename) { g_free ((gpointer) self->_priv->filename); self->_priv->filename = NULL; }
+#line 144 "mn-file-chooser-button.c"
+}
+#undef __GOB_FUNCTION__
+
+static void
+mn_file_chooser_button_class_init (MNFileChooserButtonClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::class_init"
+ GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+
+ g_type_class_add_private(c,sizeof(MNFileChooserButtonPrivate));
+
+ parent_class = g_type_class_ref (GTK_TYPE_HBOX);
+
+ g_object_class->dispose = ___dispose;
+ g_object_class->finalize = ___finalize;
+ g_object_class->get_property = ___object_get_property;
+ g_object_class->set_property = ___object_set_property;
+ {
+ GParamSpec *param_spec;
+
+ param_spec = g_param_spec_string
+ ("filename" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ NULL /* default_value */,
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_class_install_property (g_object_class,
+ PROP_FILENAME,
+ param_spec);
+ }
+}
+#undef __GOB_FUNCTION__
+#line 77 "mn-file-chooser-button.gob"
+static void
+mn_file_chooser_button_init (MNFileChooserButton * self G_GNUC_UNUSED)
+#line 180 "mn-file-chooser-button.c"
+{
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::init"
+ self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_FILE_CHOOSER_BUTTON,MNFileChooserButtonPrivate);
+ {
+#line 78 "mn-file-chooser-button.gob"
+
+ GtkWidget *button;
+ GtkWidget *box;
+ GtkWidget *separator;
+ GtkWidget *image;
+
+ button = gtk_button_new();
+ gtk_container_add(GTK_CONTAINER(self), button);
+ gtk_widget_show(button);
+
+ box = gtk_hbox_new(FALSE, 4);
+ gtk_container_add(GTK_CONTAINER(button), box);
+ gtk_widget_show(box);
+
+ selfp->image = gtk_image_new();
+ gtk_box_pack_start(GTK_BOX(box), selfp->image, FALSE, FALSE, 0);
+ gtk_widget_show(selfp->image);
+
+ selfp->label = gtk_label_new(NULL);
+ gtk_label_set_ellipsize(GTK_LABEL(selfp->label), PANGO_ELLIPSIZE_END);
+ gtk_misc_set_alignment(GTK_MISC(selfp->label), 0.0, 0.5);
+ gtk_container_add(GTK_CONTAINER(box), selfp->label);
+ gtk_widget_show(selfp->label);
+
+ separator = gtk_vseparator_new();
+ gtk_box_pack_start(GTK_BOX(box), separator, FALSE, FALSE, 0);
+ gtk_widget_show(separator);
+
+ image = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
+ gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 0);
+ gtk_widget_show(image);
+
+ g_signal_connect(button, "clicked", G_CALLBACK(self_clicked_h), self);
+
+ self_update(self);
+
+#line 222 "mn-file-chooser-button.c"
+ }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_set_property (GObject *object,
+ guint property_id,
+ const GValue *VAL G_GNUC_UNUSED,
+ GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::set_property"
+{
+ MNFileChooserButton *self G_GNUC_UNUSED;
+
+ self = MN_FILE_CHOOSER_BUTTON (object);
+
+ switch (property_id) {
+ case PROP_FILENAME:
+ {
+#line 58 "mn-file-chooser-button.gob"
+
+ g_free(selfp->filename);
+ selfp->filename = g_value_dup_string(VAL);
+
+ self_update(self);
+
+ if (selfp->dialog)
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(selfp->dialog), selfp->filename);
+
+#line 251 "mn-file-chooser-button.c"
+ }
+ break;
+ default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+# undef G_STRLOC
+# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_get_property (GObject *object,
+ guint property_id,
+ GValue *VAL G_GNUC_UNUSED,
+ GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::get_property"
+{
+ MNFileChooserButton *self G_GNUC_UNUSED;
+
+ self = MN_FILE_CHOOSER_BUTTON (object);
+
+ switch (property_id) {
+ case PROP_FILENAME:
+ {
+#line 54 "mn-file-chooser-button.gob"
+
+ g_value_set_string(VAL, selfp->filename);
+
+#line 284 "mn-file-chooser-button.c"
+ }
+ break;
+ default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+# undef G_STRLOC
+# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+#undef __GOB_FUNCTION__
+
+
+#line 54 "mn-file-chooser-button.gob"
+gchar *
+mn_file_chooser_button_get_filename (MNFileChooserButton * self)
+#line 303 "mn-file-chooser-button.c"
+{
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::get_filename"
+{
+#line 52 "mn-file-chooser-button.gob"
+ gchar* val; g_object_get (G_OBJECT (self), "filename", &val, NULL); return val;
+}}
+#line 310 "mn-file-chooser-button.c"
+#undef __GOB_FUNCTION__
+
+#line 58 "mn-file-chooser-button.gob"
+void
+mn_file_chooser_button_set_filename (MNFileChooserButton * self, gchar * val)
+#line 316 "mn-file-chooser-button.c"
+{
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::set_filename"
+{
+#line 52 "mn-file-chooser-button.gob"
+ g_object_set (G_OBJECT (self), "filename", val, NULL);
+}}
+#line 323 "mn-file-chooser-button.c"
+#undef __GOB_FUNCTION__
+
+
+#line 115 "mn-file-chooser-button.gob"
+static void
+mn_file_chooser_button_clicked_h (GtkButton * button, gpointer data)
+#line 330 "mn-file-chooser-button.c"
+{
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::clicked_h"
+{
+#line 117 "mn-file-chooser-button.gob"
+
+ Self *self = data;
+
+ if (! selfp->dialog)
+ {
+ /* translators: header capitalization */
+ selfp->dialog = GTK_WIDGET(selfp->create_dialog(selfp->create_dialog_data));
+ g_assert(GTK_IS_FILE_CHOOSER_DIALOG(selfp->dialog));
+
+ eel_add_weak_pointer(&selfp->dialog);
+
+ if (selfp->filename)
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(selfp->dialog), selfp->filename);
+
+ g_signal_connect(selfp->dialog, "response", G_CALLBACK(self_response_h), self);
+ }
+
+ if (! GTK_WIDGET_VISIBLE(selfp->dialog))
+ {
+ GtkWindow *parent;
+
+ parent = mn_widget_get_parent_window(GTK_WIDGET(self));
+ if (parent)
+ {
+ if (parent != gtk_window_get_transient_for(GTK_WINDOW(selfp->dialog)))
+ gtk_window_set_transient_for(GTK_WINDOW(selfp->dialog), parent);
+
+ gtk_window_set_modal(GTK_WINDOW(selfp->dialog), gtk_window_get_modal(parent));
+ }
+ }
+
+ mn_window_present_from_event(GTK_WINDOW(selfp->dialog));
+ }}
+#line 368 "mn-file-chooser-button.c"
+#undef __GOB_FUNCTION__
+
+#line 151 "mn-file-chooser-button.gob"
+static void
+mn_file_chooser_button_update (MNFileChooserButton * self)
+#line 374 "mn-file-chooser-button.c"
+{
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::update"
+#line 151 "mn-file-chooser-button.gob"
+ g_return_if_fail (self != NULL);
+#line 151 "mn-file-chooser-button.gob"
+ g_return_if_fail (MN_IS_FILE_CHOOSER_BUTTON (self));
+#line 381 "mn-file-chooser-button.c"
+{
+#line 153 "mn-file-chooser-button.gob"
+
+ GnomeVFSURI *uri = NULL;
+
+ if (selfp->async_handle)
+ {
+ gnome_vfs_async_cancel(selfp->async_handle);
+ selfp->async_handle = NULL;
+ }
+
+ if (selfp->filename && *selfp->filename)
+ {
+ char *text_uri;
+ char *base;
+
+ base = g_path_get_basename(selfp->filename);
+ gtk_label_set_text(GTK_LABEL(selfp->label), base);
+ g_free(base);
+
+ text_uri = gnome_vfs_get_uri_from_local_path(selfp->filename);
+ if (text_uri)
+ {
+ uri = gnome_vfs_uri_new(text_uri);
+ g_free(text_uri);
+ }
+ }
+ else
+ /*
+ * translators: GTK+ has the same message used in the same
+ * context; please use the GTK+ translation for consistency
+ */
+ gtk_label_set_text(GTK_LABEL(selfp->label), _("(None)"));
+
+ /*
+ * Do not use MN_STOCK_UNKNOWN: we want to appear exactly as a
+ * GtkFileChooserButton.
+ */
+ gtk_image_set_from_icon_name(GTK_IMAGE(selfp->image), "stock_unknown", GTK_ICON_SIZE_MENU);
+
+ if (uri)
+ {
+ GList *uri_list = NULL;
+
+ uri_list = g_list_append(uri_list, uri);
+
+ g_object_ref(self);
+ gnome_vfs_async_get_file_info(&selfp->async_handle,
+ uri_list,
+ GNOME_VFS_FILE_INFO_GET_MIME_TYPE
+ | GNOME_VFS_FILE_INFO_FOLLOW_LINKS,
+ GNOME_VFS_PRIORITY_DEFAULT,
+ self_get_file_info_cb,
+ self);
+
+ gnome_vfs_uri_unref(uri);
+ g_list_free(uri_list);
+ }
+ }}
+#line 441 "mn-file-chooser-button.c"
+#undef __GOB_FUNCTION__
+
+#line 211 "mn-file-chooser-button.gob"
+static void
+mn_file_chooser_button_get_file_info_cb (GnomeVFSAsyncHandle * handle, GList * results, gpointer data)
+#line 447 "mn-file-chooser-button.c"
+{
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::get_file_info_cb"
+{
+#line 213 "mn-file-chooser-button.gob"
+
+ Self *self = data;
+
+ GDK_THREADS_ENTER();
+
+ if (results)
+ {
+ GnomeVFSGetFileInfoResult *result = results->data;
+
+ if (result->result == GNOME_VFS_OK
+ && (result->file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE) != 0)
+ {
+ char *uri;
+ char *icon_name;
+
+ uri = gnome_vfs_get_uri_from_local_path(selfp->filename);
+ g_assert(uri != NULL);
+
+ icon_name = gnome_icon_lookup(gtk_icon_theme_get_default(),
+ NULL,
+ uri,
+ NULL,
+ result->file_info,
+ result->file_info->mime_type,
+ GNOME_ICON_LOOKUP_FLAGS_NONE,
+ NULL);
+
+ g_free(uri);
+
+ if (icon_name)
+ {
+ gtk_image_set_from_icon_name(GTK_IMAGE(selfp->image), icon_name, GTK_ICON_SIZE_MENU);
+ g_free(icon_name);
+ }
+ }
+ }
+
+ selfp->async_handle = NULL;
+ g_object_unref(self);
+
+ /* do not call gdk_flush(), we're normally in the main thread */
+ GDK_THREADS_LEAVE();
+ }}
+#line 495 "mn-file-chooser-button.c"
+#undef __GOB_FUNCTION__
+
+#line 257 "mn-file-chooser-button.gob"
+static void
+mn_file_chooser_button_response_h (GtkDialog * dialog, int response, gpointer user_data)
+#line 501 "mn-file-chooser-button.c"
+{
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::response_h"
+{
+#line 259 "mn-file-chooser-button.gob"
+
+ Self *self = user_data;
+
+ if (response == GTK_RESPONSE_ACCEPT)
+ {
+ char *filename;
+
+ filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+ self_set_filename(self, filename);
+ g_free(filename);
+ }
+
+ gtk_widget_destroy(GTK_WIDGET(dialog));
+ }}
+#line 520 "mn-file-chooser-button.c"
+#undef __GOB_FUNCTION__
+
+#line 274 "mn-file-chooser-button.gob"
+GtkWidget *
+mn_file_chooser_button_new (MNFileChooserButtonCreateDialogFunction create_dialog, gpointer data)
+#line 526 "mn-file-chooser-button.c"
+{
+#define __GOB_FUNCTION__ "MN:File:Chooser:Button::new"
+#line 274 "mn-file-chooser-button.gob"
+ g_return_val_if_fail (create_dialog != NULL, (GtkWidget * )0);
+#line 531 "mn-file-chooser-button.c"
+{
+#line 277 "mn-file-chooser-button.gob"
+
+ Self *self = GET_NEW;
+
+ selfp->create_dialog = create_dialog;
+ selfp->create_dialog_data = data;
+
+ return GTK_WIDGET(self);
+ }}
+#line 542 "mn-file-chooser-button.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-file-chooser-button.gob b/src/mn-file-chooser-button.gob
@@ -0,0 +1,285 @@
+/*
+ * MNFileChooserButton - a non-broken partial reimplementation of
+ * GtkFileChooserButton (GtkFileChooserButton is unusable, see
+ * http://bugzilla.gnome.org/show_bug.cgi?id=327243)
+ *
+ * Based on GtkFileChooserButton,
+ * Copyright (c) 2004 James M. Cape <jcape@ignore-your.tv>
+ *
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%headertop{
+#include <gtk/gtk.h>
+%}
+
+%h{
+typedef GtkFileChooserDialog *(*MNFileChooserButtonCreateDialogFunction) (gpointer data);
+%}
+
+%privateheader{
+#include <libgnomevfs/gnome-vfs.h>
+%}
+
+%{
+#include "config.h"
+#include <glib/gi18n.h>
+#include <gnome.h>
+#include <eel/eel.h>
+#include "mn-util.h"
+%}
+
+class MN:File:Chooser:Button from Gtk:HBox
+{
+ private char *filename destroywith g_free;
+ property STRING filename (export)
+ get
+ {
+ g_value_set_string(VAL, selfp->filename);
+ }
+ set
+ {
+ g_free(selfp->filename);
+ selfp->filename = g_value_dup_string(VAL);
+
+ self_update(self);
+
+ if (selfp->dialog)
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(selfp->dialog), selfp->filename);
+ };
+
+ private MNFileChooserButtonCreateDialogFunction create_dialog;
+ private gpointer create_dialog_data;
+
+ private GtkWidget *image;
+ private GtkWidget *label;
+ private GtkWidget *dialog unrefwith gtk_widget_destroy;
+
+ private GnomeVFSAsyncHandle *async_handle unrefwith gnome_vfs_async_cancel;
+
+ init (self)
+ {
+ GtkWidget *button;
+ GtkWidget *box;
+ GtkWidget *separator;
+ GtkWidget *image;
+
+ button = gtk_button_new();
+ gtk_container_add(GTK_CONTAINER(self), button);
+ gtk_widget_show(button);
+
+ box = gtk_hbox_new(FALSE, 4);
+ gtk_container_add(GTK_CONTAINER(button), box);
+ gtk_widget_show(box);
+
+ selfp->image = gtk_image_new();
+ gtk_box_pack_start(GTK_BOX(box), selfp->image, FALSE, FALSE, 0);
+ gtk_widget_show(selfp->image);
+
+ selfp->label = gtk_label_new(NULL);
+ gtk_label_set_ellipsize(GTK_LABEL(selfp->label), PANGO_ELLIPSIZE_END);
+ gtk_misc_set_alignment(GTK_MISC(selfp->label), 0.0, 0.5);
+ gtk_container_add(GTK_CONTAINER(box), selfp->label);
+ gtk_widget_show(selfp->label);
+
+ separator = gtk_vseparator_new();
+ gtk_box_pack_start(GTK_BOX(box), separator, FALSE, FALSE, 0);
+ gtk_widget_show(separator);
+
+ image = gtk_image_new_from_stock(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
+ gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 0);
+ gtk_widget_show(image);
+
+ g_signal_connect(button, "clicked", G_CALLBACK(self_clicked_h), self);
+
+ self_update(self);
+ }
+
+ private void
+ clicked_h (GtkButton *button, gpointer data)
+ {
+ Self *self = data;
+
+ if (! selfp->dialog)
+ {
+ /* translators: header capitalization */
+ selfp->dialog = GTK_WIDGET(selfp->create_dialog(selfp->create_dialog_data));
+ g_assert(GTK_IS_FILE_CHOOSER_DIALOG(selfp->dialog));
+
+ eel_add_weak_pointer(&selfp->dialog);
+
+ if (selfp->filename)
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(selfp->dialog), selfp->filename);
+
+ g_signal_connect(selfp->dialog, "response", G_CALLBACK(self_response_h), self);
+ }
+
+ if (! GTK_WIDGET_VISIBLE(selfp->dialog))
+ {
+ GtkWindow *parent;
+
+ parent = mn_widget_get_parent_window(GTK_WIDGET(self));
+ if (parent)
+ {
+ if (parent != gtk_window_get_transient_for(GTK_WINDOW(selfp->dialog)))
+ gtk_window_set_transient_for(GTK_WINDOW(selfp->dialog), parent);
+
+ gtk_window_set_modal(GTK_WINDOW(selfp->dialog), gtk_window_get_modal(parent));
+ }
+ }
+
+ mn_window_present_from_event(GTK_WINDOW(selfp->dialog));
+ }
+
+ private void
+ update (self)
+ {
+ GnomeVFSURI *uri = NULL;
+
+ if (selfp->async_handle)
+ {
+ gnome_vfs_async_cancel(selfp->async_handle);
+ selfp->async_handle = NULL;
+ }
+
+ if (selfp->filename && *selfp->filename)
+ {
+ char *text_uri;
+ char *base;
+
+ base = g_path_get_basename(selfp->filename);
+ gtk_label_set_text(GTK_LABEL(selfp->label), base);
+ g_free(base);
+
+ text_uri = gnome_vfs_get_uri_from_local_path(selfp->filename);
+ if (text_uri)
+ {
+ uri = gnome_vfs_uri_new(text_uri);
+ g_free(text_uri);
+ }
+ }
+ else
+ /*
+ * translators: GTK+ has the same message used in the same
+ * context; please use the GTK+ translation for consistency
+ */
+ gtk_label_set_text(GTK_LABEL(selfp->label), _("(None)"));
+
+ /*
+ * Do not use MN_STOCK_UNKNOWN: we want to appear exactly as a
+ * GtkFileChooserButton.
+ */
+ gtk_image_set_from_icon_name(GTK_IMAGE(selfp->image), "stock_unknown", GTK_ICON_SIZE_MENU);
+
+ if (uri)
+ {
+ GList *uri_list = NULL;
+
+ uri_list = g_list_append(uri_list, uri);
+
+ g_object_ref(self);
+ gnome_vfs_async_get_file_info(&selfp->async_handle,
+ uri_list,
+ GNOME_VFS_FILE_INFO_GET_MIME_TYPE
+ | GNOME_VFS_FILE_INFO_FOLLOW_LINKS,
+ GNOME_VFS_PRIORITY_DEFAULT,
+ self_get_file_info_cb,
+ self);
+
+ gnome_vfs_uri_unref(uri);
+ g_list_free(uri_list);
+ }
+ }
+
+ private void
+ get_file_info_cb (GnomeVFSAsyncHandle *handle, GList *results, gpointer data)
+ {
+ Self *self = data;
+
+ GDK_THREADS_ENTER();
+
+ if (results)
+ {
+ GnomeVFSGetFileInfoResult *result = results->data;
+
+ if (result->result == GNOME_VFS_OK
+ && (result->file_info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MIME_TYPE) != 0)
+ {
+ char *uri;
+ char *icon_name;
+
+ uri = gnome_vfs_get_uri_from_local_path(selfp->filename);
+ g_assert(uri != NULL);
+
+ icon_name = gnome_icon_lookup(gtk_icon_theme_get_default(),
+ NULL,
+ uri,
+ NULL,
+ result->file_info,
+ result->file_info->mime_type,
+ GNOME_ICON_LOOKUP_FLAGS_NONE,
+ NULL);
+
+ g_free(uri);
+
+ if (icon_name)
+ {
+ gtk_image_set_from_icon_name(GTK_IMAGE(selfp->image), icon_name, GTK_ICON_SIZE_MENU);
+ g_free(icon_name);
+ }
+ }
+ }
+
+ selfp->async_handle = NULL;
+ g_object_unref(self);
+
+ /* do not call gdk_flush(), we're normally in the main thread */
+ GDK_THREADS_LEAVE();
+ }
+
+ private void
+ response_h (GtkDialog *dialog, int response, gpointer user_data)
+ {
+ Self *self = user_data;
+
+ if (response == GTK_RESPONSE_ACCEPT)
+ {
+ char *filename;
+
+ filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+ self_set_filename(self, filename);
+ g_free(filename);
+ }
+
+ gtk_widget_destroy(GTK_WIDGET(dialog));
+ }
+
+ public GtkWidget *
+ new (MNFileChooserButtonCreateDialogFunction create_dialog (check null),
+ gpointer data)
+ {
+ Self *self = GET_NEW;
+
+ selfp->create_dialog = create_dialog;
+ selfp->create_dialog_data = data;
+
+ return GTK_WIDGET(self);
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-file-chooser-button.gob.stamp
diff --git a/src/mn-file-chooser-button.h b/src/mn-file-chooser-button.h
@@ -0,0 +1,83 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include <gtk/gtk.h>
+
+#ifndef __MN_FILE_CHOOSER_BUTTON_H__
+#define __MN_FILE_CHOOSER_BUTTON_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+
+typedef GtkFileChooserDialog *(*MNFileChooserButtonCreateDialogFunction) (gpointer data);
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_FILE_CHOOSER_BUTTON (mn_file_chooser_button_get_type())
+#define MN_FILE_CHOOSER_BUTTON(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_file_chooser_button_get_type(), MNFileChooserButton)
+#define MN_FILE_CHOOSER_BUTTON_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_file_chooser_button_get_type(), MNFileChooserButton const)
+#define MN_FILE_CHOOSER_BUTTON_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_file_chooser_button_get_type(), MNFileChooserButtonClass)
+#define MN_IS_FILE_CHOOSER_BUTTON(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_file_chooser_button_get_type ())
+
+#define MN_FILE_CHOOSER_BUTTON_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_file_chooser_button_get_type(), MNFileChooserButtonClass)
+
+/* Private structure type */
+typedef struct _MNFileChooserButtonPrivate MNFileChooserButtonPrivate;
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_FILE_CHOOSER_BUTTON__
+#define __TYPEDEF_MN_FILE_CHOOSER_BUTTON__
+typedef struct _MNFileChooserButton MNFileChooserButton;
+#endif
+struct _MNFileChooserButton {
+ GtkHBox __parent__;
+ /*< private >*/
+ MNFileChooserButtonPrivate *_priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNFileChooserButtonClass MNFileChooserButtonClass;
+struct _MNFileChooserButtonClass {
+ GtkHBoxClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_file_chooser_button_get_type (void);
+gchar * mn_file_chooser_button_get_filename (MNFileChooserButton * self);
+void mn_file_chooser_button_set_filename (MNFileChooserButton * self,
+ gchar * val);
+GtkWidget * mn_file_chooser_button_new (MNFileChooserButtonCreateDialogFunction create_dialog,
+ gpointer data);
+
+/*
+ * Argument wrapping macros
+ */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_FILE_CHOOSER_BUTTON_PROP_FILENAME(arg) "filename", __extension__ ({gchar *z = (arg); z;})
+#define MN_FILE_CHOOSER_BUTTON_GET_PROP_FILENAME(arg) "filename", __extension__ ({gchar **z = (arg); z;})
+#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_FILE_CHOOSER_BUTTON_PROP_FILENAME(arg) "filename",(gchar *)(arg)
+#define MN_FILE_CHOOSER_BUTTON_GET_PROP_FILENAME(arg) "filename",(gchar **)(arg)
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-gmail-mailbox-private.h b/src/mn-gmail-mailbox-private.h
@@ -16,7 +16,7 @@ extern "C" {
#line 18 "mn-gmail-mailbox-private.h"
struct _MNGmailMailboxPrivate {
-#line 59 "mn-gmail-mailbox.gob"
+#line 62 "mn-gmail-mailbox.gob"
GnomeVFSURI * uri;
#line 22 "mn-gmail-mailbox-private.h"
};
diff --git a/src/mn-gmail-mailbox-properties-private.h b/src/mn-gmail-mailbox-properties-private.h
@@ -10,9 +10,13 @@ extern "C" {
#endif /* __cplusplus */
struct _MNGmailMailboxPropertiesPrivate {
-#line 45 "mn-gmail-mailbox-properties.gob"
+#line 42 "mn-gmail-mailbox-properties.gob"
+ GtkWidget * label_check;
+#line 43 "mn-gmail-mailbox-properties.gob"
+ GtkWidget * label_entry;
+#line 49 "mn-gmail-mailbox-properties.gob"
char * location;
-#line 16 "mn-gmail-mailbox-properties-private.h"
+#line 20 "mn-gmail-mailbox-properties-private.h"
};
#ifdef __cplusplus
diff --git a/src/mn-gmail-mailbox-properties.c b/src/mn-gmail-mailbox-properties.c
@@ -28,13 +28,14 @@
#include <glib/gi18n.h>
#include "mn-mailbox-properties.h"
#include "mn-mailbox-properties-private.h"
+#include "mn-authenticated-mailbox-properties-private.h"
#include "mn-util.h"
#include "mn-properties-dialog.h"
#include "mn-authenticated-mailbox.h"
#include "mn-gmail-mailbox.h"
#include "mn-stock.h"
-#line 38 "mn-gmail-mailbox-properties.c"
+#line 39 "mn-gmail-mailbox-properties.c"
/* self casting macros */
#define SELF(x) MN_GMAIL_MAILBOX_PROPERTIES(x)
#define SELF_CONST(x) MN_GMAIL_MAILBOX_PROPERTIES_CONST(x)
@@ -52,17 +53,21 @@ typedef MNGmailMailboxPropertiesClass SelfClass;
static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void mn_gmail_mailbox_properties_class_init (MNGmailMailboxPropertiesClass * class) G_GNUC_UNUSED;
static void mn_gmail_mailbox_properties_init (MNGmailMailboxProperties * self) G_GNUC_UNUSED;
-static void ___3_mn_gmail_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED;
-static MNMailbox * ___4_mn_gmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_properties_check_toggled_h (GtkToggleButton * togglebutton, gpointer user_data) G_GNUC_UNUSED;
+static void ___4_mn_gmail_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED;
+static MNMailbox * ___5_mn_gmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED;
enum {
PROP_0,
+ PROP_COMPLETE,
PROP_DEFAULT_NAME
};
/* pointer to the class of our parent */
static MNAuthenticatedMailboxPropertiesClass *parent_class = NULL;
+/* Short form macros */
+#define self_check_toggled_h mn_gmail_mailbox_properties_check_toggled_h
GType
mn_gmail_mailbox_properties_get_type (void)
{
@@ -114,16 +119,16 @@ ___finalize(GObject *obj_self)
gpointer priv G_GNUC_UNUSED = self->_priv;
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 45 "mn-gmail-mailbox-properties.gob"
+#line 49 "mn-gmail-mailbox-properties.gob"
if(self->_priv->location) { g_free ((gpointer) self->_priv->location); self->_priv->location = NULL; }
-#line 120 "mn-gmail-mailbox-properties.c"
+#line 125 "mn-gmail-mailbox-properties.c"
}
#undef __GOB_FUNCTION__
-#line 57 "mn-gmail-mailbox-properties.gob"
+#line 88 "mn-gmail-mailbox-properties.gob"
static void
mn_gmail_mailbox_properties_class_init (MNGmailMailboxPropertiesClass * class G_GNUC_UNUSED)
-#line 127 "mn-gmail-mailbox-properties.c"
+#line 132 "mn-gmail-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -133,20 +138,23 @@ mn_gmail_mailbox_properties_class_init (MNGmailMailboxPropertiesClass * class G_
parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES);
-#line 82 "mn-gmail-mailbox-properties.gob"
- mn_mailbox_properties_class->set_mailbox = ___3_mn_gmail_mailbox_properties_set_mailbox;
-#line 93 "mn-gmail-mailbox-properties.gob"
- mn_mailbox_properties_class->get_mailbox = ___4_mn_gmail_mailbox_properties_get_mailbox;
-#line 141 "mn-gmail-mailbox-properties.c"
+#line 152 "mn-gmail-mailbox-properties.gob"
+ mn_mailbox_properties_class->set_mailbox = ___4_mn_gmail_mailbox_properties_set_mailbox;
+#line 169 "mn-gmail-mailbox-properties.gob"
+ mn_mailbox_properties_class->get_mailbox = ___5_mn_gmail_mailbox_properties_get_mailbox;
+#line 146 "mn-gmail-mailbox-properties.c"
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
{
g_object_class_override_property (g_object_class,
+ PROP_COMPLETE,
+ "complete");
+ g_object_class_override_property (g_object_class,
PROP_DEFAULT_NAME,
"default_name");
}
{
-#line 58 "mn-gmail-mailbox-properties.gob"
+#line 89 "mn-gmail-mailbox-properties.gob"
MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
@@ -154,34 +162,62 @@ mn_gmail_mailbox_properties_class_init (MNGmailMailboxPropertiesClass * class G_
p_class->stock_id = MN_STOCK_GMAIL;
p_class->combo_label = "Gmail";
-#line 158 "mn-gmail-mailbox-properties.c"
+#line 166 "mn-gmail-mailbox-properties.c"
}
}
#undef __GOB_FUNCTION__
-#line 66 "mn-gmail-mailbox-properties.gob"
+#line 97 "mn-gmail-mailbox-properties.gob"
static void
mn_gmail_mailbox_properties_init (MNGmailMailboxProperties * self G_GNUC_UNUSED)
-#line 165 "mn-gmail-mailbox-properties.c"
+#line 173 "mn-gmail-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_GMAIL_MAILBOX_PROPERTIES,MNGmailMailboxPropertiesPrivate);
{
-#line 67 "mn-gmail-mailbox-properties.gob"
+#line 98 "mn-gmail-mailbox-properties.gob"
MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self);
MNAuthenticatedMailboxProperties *auth = MN_AUTHENTICATED_MAILBOX_PROPERTIES(self);
+ GtkWidget *label_vbox;
+ GtkWidget *hbox;
gtk_box_pack_start(GTK_BOX(auth->account_vbox), auth->username_vbox, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(auth->account_vbox), auth->password_vbox, FALSE, FALSE, 0);
+ /* translators: header capitalization */
+ label_vbox = mn_mailbox_properties_add_general_section(properties, _("Gmail Label"));
+
+ selfp->label_check = gtk_check_button_new_with_mnemonic(_("_Restrict to this label:"));
+ gtk_size_group_add_widget(properties->label_size_group, selfp->label_check);
+
+ selfp->label_entry = gtk_entry_new();
+ gtk_widget_set_sensitive(selfp->label_entry, FALSE);
+
+ hbox = gtk_hbox_new(FALSE, 12);
+ gtk_box_pack_start(GTK_BOX(hbox), selfp->label_check, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), selfp->label_entry, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(label_vbox), hbox, FALSE, FALSE, 0);
+ gtk_widget_show_all(label_vbox);
+
properties->entries = mn_g_slist_append_elements(properties->entries,
auth->username_entry,
auth->password_entry,
+ selfp->label_entry,
NULL);
- g_signal_connect_swapped(auth->username_entry, "changed", G_CALLBACK(mn_mailbox_properties_notify_default_name), self);
+ g_signal_connect(selfp->label_check, "toggled", G_CALLBACK(self_check_toggled_h), self);
+
+ g_object_connect(auth->username_entry,
+ "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
+ "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
+ NULL);
+
+ g_object_connect(selfp->label_entry,
+ "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
+ "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
+ NULL);
-#line 185 "mn-gmail-mailbox-properties.c"
+#line 221 "mn-gmail-mailbox-properties.c"
}
}
#undef __GOB_FUNCTION__
@@ -198,17 +234,47 @@ ___object_get_property (GObject *object,
self = MN_GMAIL_MAILBOX_PROPERTIES (object);
switch (property_id) {
+ case PROP_COMPLETE:
+ {
+#line 53 "mn-gmail-mailbox-properties.gob"
+
+ gboolean complete;
+
+ complete = mn_authenticated_mailbox_properties_is_complete(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self));
+ if (complete)
+ {
+ gboolean label_enabled;
+ const char *label;
+
+ label_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check));
+ label = gtk_entry_get_text(GTK_ENTRY(selfp->label_entry));
+
+ if (label_enabled && ! *label)
+ complete = FALSE;
+ }
+
+ g_value_set_boolean(VAL, complete);
+
+#line 259 "mn-gmail-mailbox-properties.c"
+ }
+ break;
case PROP_DEFAULT_NAME:
{
-#line 49 "mn-gmail-mailbox-properties.gob"
+#line 74 "mn-gmail-mailbox-properties.gob"
const char *username;
+ gboolean label_enabled;
+ const char *label;
username = gtk_entry_get_text(GTK_ENTRY(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self)->username_entry));
+ g_assert(*username != 0);
+
+ label_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check));
+ label = gtk_entry_get_text(GTK_ENTRY(selfp->label_entry));
- g_value_take_string(VAL, mn_gmail_mailbox_build_name(*username ? username : NULL));
+ g_value_take_string(VAL, mn_gmail_mailbox_build_name(username, label_enabled ? label : NULL));
-#line 212 "mn-gmail-mailbox-properties.c"
+#line 278 "mn-gmail-mailbox-properties.c"
}
break;
default:
@@ -225,17 +291,36 @@ ___object_get_property (GObject *object,
-#line 82 "mn-gmail-mailbox-properties.gob"
+#line 141 "mn-gmail-mailbox-properties.gob"
static void
-___3_mn_gmail_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox)
-#line 232 "mn-gmail-mailbox-properties.c"
+mn_gmail_mailbox_properties_check_toggled_h (GtkToggleButton * togglebutton, gpointer user_data)
+#line 298 "mn-gmail-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::check_toggled_h"
+{
+#line 143 "mn-gmail-mailbox-properties.gob"
+
+ Self *self = user_data;
+
+ gtk_widget_set_sensitive(selfp->label_entry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check)));
+
+ g_object_notify(G_OBJECT(self), "complete");
+ g_object_notify(G_OBJECT(self), "default-name");
+ }}
+#line 311 "mn-gmail-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 152 "mn-gmail-mailbox-properties.gob"
+static void
+___4_mn_gmail_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox)
+#line 317 "mn-gmail-mailbox-properties.c"
#define PARENT_HANDLER(___properties,___mailbox) \
{ if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox) \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox)(___properties,___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::set_mailbox"
{
-#line 84 "mn-gmail-mailbox-properties.gob"
+#line 154 "mn-gmail-mailbox-properties.gob"
Self *self = SELF(properties);
MNGmailMailbox *gmail_mailbox = MN_GMAIL_MAILBOX(mailbox);
@@ -243,15 +328,21 @@ ___3_mn_gmail_mailbox_properties_set_mailbox (MNMailboxProperties * properties G
PARENT_HANDLER(properties, mailbox);
selfp->location = g_strdup(gmail_mailbox->location);
+
+ if (gmail_mailbox->label)
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->label_check), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(selfp->label_entry), gmail_mailbox->label);
+ }
}}
-#line 248 "mn-gmail-mailbox-properties.c"
+#line 339 "mn-gmail-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 93 "mn-gmail-mailbox-properties.gob"
+#line 169 "mn-gmail-mailbox-properties.gob"
static MNMailbox *
-___4_mn_gmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 255 "mn-gmail-mailbox-properties.c"
+___5_mn_gmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED)
+#line 346 "mn-gmail-mailbox-properties.c"
#define PARENT_HANDLER(___properties) \
((MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)? \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)(___properties): \
@@ -259,7 +350,7 @@ ___4_mn_gmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties G
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::get_mailbox"
{
-#line 95 "mn-gmail-mailbox-properties.gob"
+#line 171 "mn-gmail-mailbox-properties.gob"
Self *self = SELF(properties);
MNMailbox *mailbox;
@@ -269,8 +360,11 @@ ___4_mn_gmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties G
if (selfp->location)
g_object_set(mailbox, MN_GMAIL_MAILBOX_PROP_LOCATION(selfp->location), NULL);
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check)))
+ g_object_set(mailbox, MN_GMAIL_MAILBOX_PROP_LABEL((char *) gtk_entry_get_text(GTK_ENTRY(selfp->label_entry))), NULL);
+
return mailbox;
}}
-#line 275 "mn-gmail-mailbox-properties.c"
+#line 369 "mn-gmail-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
diff --git a/src/mn-gmail-mailbox-properties.gob b/src/mn-gmail-mailbox-properties.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -29,6 +29,7 @@ requires 2.0.14
#include <glib/gi18n.h>
#include "mn-mailbox-properties.h"
#include "mn-mailbox-properties-private.h"
+#include "mn-authenticated-mailbox-properties-private.h"
#include "mn-util.h"
#include "mn-properties-dialog.h"
#include "mn-authenticated-mailbox.h"
@@ -38,20 +39,50 @@ requires 2.0.14
class MN:Gmail:Mailbox:Properties from MN:Authenticated:Mailbox:Properties
{
+ private GtkWidget *label_check;
+ private GtkWidget *label_entry;
+
/*
* We do not provide a control for the atom feed location, because
* modifying it is probably unnecessary.
*/
private char *location destroywith g_free;
+ property BOOLEAN complete (override)
+ get
+ {
+ gboolean complete;
+
+ complete = mn_authenticated_mailbox_properties_is_complete(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self));
+ if (complete)
+ {
+ gboolean label_enabled;
+ const char *label;
+
+ label_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check));
+ label = gtk_entry_get_text(GTK_ENTRY(selfp->label_entry));
+
+ if (label_enabled && ! *label)
+ complete = FALSE;
+ }
+
+ g_value_set_boolean(VAL, complete);
+ };
+
property STRING default_name (override)
get
{
const char *username;
+ gboolean label_enabled;
+ const char *label;
username = gtk_entry_get_text(GTK_ENTRY(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self)->username_entry));
+ g_assert(*username != 0);
- g_value_take_string(VAL, mn_gmail_mailbox_build_name(*username ? username : NULL));
+ label_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check));
+ label = gtk_entry_get_text(GTK_ENTRY(selfp->label_entry));
+
+ g_value_take_string(VAL, mn_gmail_mailbox_build_name(username, label_enabled ? label : NULL));
};
class_init (class)
@@ -67,16 +98,55 @@ class MN:Gmail:Mailbox:Properties from MN:Authenticated:Mailbox:Properties
{
MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self);
MNAuthenticatedMailboxProperties *auth = MN_AUTHENTICATED_MAILBOX_PROPERTIES(self);
+ GtkWidget *label_vbox;
+ GtkWidget *hbox;
gtk_box_pack_start(GTK_BOX(auth->account_vbox), auth->username_vbox, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(auth->account_vbox), auth->password_vbox, FALSE, FALSE, 0);
+ /* translators: header capitalization */
+ label_vbox = mn_mailbox_properties_add_general_section(properties, _("Gmail Label"));
+
+ selfp->label_check = gtk_check_button_new_with_mnemonic(_("_Restrict to this label:"));
+ gtk_size_group_add_widget(properties->label_size_group, selfp->label_check);
+
+ selfp->label_entry = gtk_entry_new();
+ gtk_widget_set_sensitive(selfp->label_entry, FALSE);
+
+ hbox = gtk_hbox_new(FALSE, 12);
+ gtk_box_pack_start(GTK_BOX(hbox), selfp->label_check, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), selfp->label_entry, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(label_vbox), hbox, FALSE, FALSE, 0);
+ gtk_widget_show_all(label_vbox);
+
properties->entries = mn_g_slist_append_elements(properties->entries,
auth->username_entry,
auth->password_entry,
+ selfp->label_entry,
NULL);
- g_signal_connect_swapped(auth->username_entry, "changed", G_CALLBACK(mn_mailbox_properties_notify_default_name), self);
+ g_signal_connect(selfp->label_check, "toggled", G_CALLBACK(self_check_toggled_h), self);
+
+ g_object_connect(auth->username_entry,
+ "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
+ "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
+ NULL);
+
+ g_object_connect(selfp->label_entry,
+ "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
+ "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
+ NULL);
+ }
+
+ private void
+ check_toggled_h (GtkToggleButton *togglebutton, gpointer user_data)
+ {
+ Self *self = user_data;
+
+ gtk_widget_set_sensitive(selfp->label_entry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check)));
+
+ g_object_notify(G_OBJECT(self), "complete");
+ g_object_notify(G_OBJECT(self), "default-name");
}
override (MN:Mailbox:Properties) void
@@ -88,6 +158,12 @@ class MN:Gmail:Mailbox:Properties from MN:Authenticated:Mailbox:Properties
PARENT_HANDLER(properties, mailbox);
selfp->location = g_strdup(gmail_mailbox->location);
+
+ if (gmail_mailbox->label)
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->label_check), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(selfp->label_entry), gmail_mailbox->label);
+ }
}
override (MN:Mailbox:Properties) MNMailbox *
@@ -101,6 +177,9 @@ class MN:Gmail:Mailbox:Properties from MN:Authenticated:Mailbox:Properties
if (selfp->location)
g_object_set(mailbox, MN_GMAIL_MAILBOX_PROP_LOCATION(selfp->location), NULL);
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->label_check)))
+ g_object_set(mailbox, MN_GMAIL_MAILBOX_PROP_LABEL((char *) gtk_entry_get_text(GTK_ENTRY(selfp->label_entry))), NULL);
+
return mailbox;
}
}
diff --git a/src/mn-gmail-mailbox-properties.h b/src/mn-gmail-mailbox-properties.h
@@ -60,8 +60,10 @@ GType mn_gmail_mailbox_properties_get_type (void);
* Argument wrapping macros
*/
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;})
#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name", __extension__ ({gchar **z = (arg); z;})
#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg)
#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name",(gchar **)(arg)
#endif /* __GNUC__ && !__STRICT_ANSI__ */
diff --git a/src/mn-gmail-mailbox.c b/src/mn-gmail-mailbox.c
@@ -61,20 +61,23 @@ static void ___object_get_property (GObject *object, guint property_id, GValue *
static void mn_gmail_mailbox_class_init (MNGmailMailboxClass * class) G_GNUC_UNUSED;
static void mn_gmail_mailbox_init (MNGmailMailbox * self) G_GNUC_UNUSED;
static void ___3_mn_gmail_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
-static void ___4_mn_gmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox) G_GNUC_UNUSED;
+static GnomeVFSURI * mn_gmail_mailbox_build_uri (MNGmailMailbox * self) G_GNUC_UNUSED;
+static void ___5_mn_gmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox) G_GNUC_UNUSED;
static void mn_gmail_mailbox_parse_entry (xmlNode * node, time_t * sent_time, char ** id, char ** from, char ** subject, char ** url) G_GNUC_UNUSED;
static char * mn_gmail_mailbox_parse_author (xmlNode * node) G_GNUC_UNUSED;
static time_t mn_gmail_mailbox_parse_date (const char * w3c_datetime) G_GNUC_UNUSED;
enum {
PROP_0,
- PROP_LOCATION
+ PROP_LOCATION,
+ PROP_LABEL
};
/* pointer to the class of our parent */
static MNAuthenticatedMailboxClass *parent_class = NULL;
/* Short form macros */
+#define self_build_uri mn_gmail_mailbox_build_uri
#define self_parse_entry mn_gmail_mailbox_parse_entry
#define self_parse_author mn_gmail_mailbox_parse_author
#define self_parse_date mn_gmail_mailbox_parse_date
@@ -129,9 +132,9 @@ ___dispose (GObject *obj_self)
MNGmailMailbox *self G_GNUC_UNUSED = MN_GMAIL_MAILBOX (obj_self);
if (G_OBJECT_CLASS (parent_class)->dispose) \
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 59 "mn-gmail-mailbox.gob"
+#line 62 "mn-gmail-mailbox.gob"
if(self->_priv->uri) { gnome_vfs_uri_unref ((gpointer) self->_priv->uri); self->_priv->uri = NULL; }
-#line 135 "mn-gmail-mailbox.c"
+#line 138 "mn-gmail-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -146,14 +149,17 @@ ___finalize(GObject *obj_self)
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
#line 53 "mn-gmail-mailbox.gob"
if(self->location) { g_free ((gpointer) self->location); self->location = NULL; }
-#line 150 "mn-gmail-mailbox.c"
+#line 153 "mn-gmail-mailbox.c"
+#line 59 "mn-gmail-mailbox.gob"
+ if(self->label) { g_free ((gpointer) self->label); self->label = NULL; }
+#line 156 "mn-gmail-mailbox.c"
}
#undef __GOB_FUNCTION__
-#line 61 "mn-gmail-mailbox.gob"
+#line 64 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_class_init (MNGmailMailboxClass * class G_GNUC_UNUSED)
-#line 157 "mn-gmail-mailbox.c"
+#line 163 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -166,9 +172,9 @@ mn_gmail_mailbox_class_init (MNGmailMailboxClass * class G_GNUC_UNUSED)
#line 78 "mn-gmail-mailbox.gob"
mn_mailbox_class->seal = ___3_mn_gmail_mailbox_seal;
-#line 87 "mn-gmail-mailbox.gob"
- mn_authenticated_mailbox_class->authenticated_check = ___4_mn_gmail_mailbox_authenticated_check;
-#line 172 "mn-gmail-mailbox.c"
+#line 143 "mn-gmail-mailbox.gob"
+ mn_authenticated_mailbox_class->authenticated_check = ___5_mn_gmail_mailbox_authenticated_check;
+#line 178 "mn-gmail-mailbox.c"
g_object_class->dispose = ___dispose;
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
@@ -181,30 +187,36 @@ mn_gmail_mailbox_class_init (MNGmailMailboxClass * class G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
"https://mail.google.com/mail/feed/atom" /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_PERMANENT | G_PARAM_CONSTRUCT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE | G_PARAM_CONSTRUCT));
g_object_class_install_property (g_object_class,
PROP_LOCATION,
param_spec);
+ param_spec = g_param_spec_string
+ ("label" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ NULL /* default_value */,
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE));
+ g_object_class_install_property (g_object_class,
+ PROP_LABEL,
+ param_spec);
}
{
-#line 62 "mn-gmail-mailbox.gob"
+#line 65 "mn-gmail-mailbox.gob"
MN_MAILBOX_CLASS(class)->type = "gmail";
- /*
- * 5 minutes is a good default check delay for remote Gmail
- * mailboxes.
- */
+ /* 5 minutes is a good default */
MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 5;
-#line 201 "mn-gmail-mailbox.c"
+#line 213 "mn-gmail-mailbox.c"
}
}
#undef __GOB_FUNCTION__
#line 72 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_init (MNGmailMailbox * self G_GNUC_UNUSED)
-#line 208 "mn-gmail-mailbox.c"
+#line 220 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_GMAIL_MAILBOX,MNGmailMailboxPrivate);
@@ -214,7 +226,7 @@ mn_gmail_mailbox_init (MNGmailMailbox * self G_GNUC_UNUSED)
mn_mailbox_set_format(MN_MAILBOX(self), "Gmail");
mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_GMAIL);
-#line 218 "mn-gmail-mailbox.c"
+#line 230 "mn-gmail-mailbox.c"
}
}
#undef __GOB_FUNCTION__
@@ -235,7 +247,14 @@ ___object_set_property (GObject *object,
{
#line 54 "mn-gmail-mailbox.gob"
{ char *old = self->location; self->location = g_value_dup_string (VAL); g_free (old); }
-#line 239 "mn-gmail-mailbox.c"
+#line 251 "mn-gmail-mailbox.c"
+ }
+ break;
+ case PROP_LABEL:
+ {
+#line 60 "mn-gmail-mailbox.gob"
+{ char *old = self->label; self->label = g_value_dup_string (VAL); g_free (old); }
+#line 258 "mn-gmail-mailbox.c"
}
break;
default:
@@ -266,7 +285,14 @@ ___object_get_property (GObject *object,
{
#line 54 "mn-gmail-mailbox.gob"
g_value_set_string (VAL, self->location);
-#line 270 "mn-gmail-mailbox.c"
+#line 289 "mn-gmail-mailbox.c"
+ }
+ break;
+ case PROP_LABEL:
+ {
+#line 60 "mn-gmail-mailbox.gob"
+g_value_set_string (VAL, self->label);
+#line 296 "mn-gmail-mailbox.c"
}
break;
default:
@@ -286,7 +312,7 @@ g_value_set_string (VAL, self->location);
#line 78 "mn-gmail-mailbox.gob"
static void
___3_mn_gmail_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 290 "mn-gmail-mailbox.c"
+#line 316 "mn-gmail-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->seal) \
(* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
@@ -295,26 +321,95 @@ ___3_mn_gmail_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
{
#line 80 "mn-gmail-mailbox.gob"
+ MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
+ Self *self = SELF(mailbox);
+ GnomeVFSURI *uri;
+
PARENT_HANDLER(mailbox);
if (! mailbox->runtime_name)
- mailbox->runtime_name = self_build_name(MN_AUTHENTICATED_MAILBOX(mailbox)->username);
+ mailbox->runtime_name = self_build_name(auth_mailbox->username, self->label);
+
+ uri = self_build_uri(self);
+ if (uri)
+ {
+ /*
+ * Use keyring attributes that are compatible with what
+ * GnomeVFS uses. This allows the password entered by the user
+ * at the GnomeVFS password prompt to be recognized by Mail
+ * Notification and displayed in the mailbox properties
+ * dialog.
+ */
+ auth_mailbox->keyring_server = g_strdup(gnome_vfs_uri_get_host_name(uri));
+ auth_mailbox->keyring_protocol = g_strdup("http");
+ auth_mailbox->keyring_authtype = g_strdup("basic");
+ auth_mailbox->keyring_port = gnome_vfs_uri_get_host_port(uri);
+ if (auth_mailbox->keyring_port == 0)
+ {
+ const char *scheme;
+
+ scheme = gnome_vfs_uri_get_scheme(uri);
+ if (! strcmp(scheme, "http"))
+ auth_mailbox->keyring_port = 80;
+ else if (! strcmp(scheme, "https"))
+ auth_mailbox->keyring_port = 443;
+ }
+
+ gnome_vfs_uri_unref(uri);
+ }
+ else
+ /* fallback */
+ auth_mailbox->keyring_domain = g_strdup("gmail.com");
}}
-#line 304 "mn-gmail-mailbox.c"
+#line 365 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 87 "mn-gmail-mailbox.gob"
+#line 122 "mn-gmail-mailbox.gob"
+static GnomeVFSURI *
+mn_gmail_mailbox_build_uri (MNGmailMailbox * self)
+#line 372 "mn-gmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::build_uri"
+#line 122 "mn-gmail-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (GnomeVFSURI * )0);
+#line 122 "mn-gmail-mailbox.gob"
+ g_return_val_if_fail (MN_IS_GMAIL_MAILBOX (self), (GnomeVFSURI * )0);
+#line 379 "mn-gmail-mailbox.c"
+{
+#line 124 "mn-gmail-mailbox.gob"
+
+ GnomeVFSURI *uri;
+
+ uri = gnome_vfs_uri_new(self->location);
+ if (uri)
+ {
+ GnomeVFSURI *new_uri;
+
+ if (self->label)
+ {
+ new_uri = gnome_vfs_uri_append_file_name(uri, self->label);
+ gnome_vfs_uri_unref(uri);
+ uri = new_uri;
+ }
+ }
+
+ return uri;
+ }}
+#line 400 "mn-gmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 143 "mn-gmail-mailbox.gob"
static void
-___4_mn_gmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_UNUSED)
-#line 311 "mn-gmail-mailbox.c"
+___5_mn_gmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_UNUSED)
+#line 406 "mn-gmail-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_AUTHENTICATED_MAILBOX_CLASS(parent_class)->authenticated_check) \
(* MN_AUTHENTICATED_MAILBOX_CLASS(parent_class)->authenticated_check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::authenticated_check"
{
-#line 89 "mn-gmail-mailbox.gob"
+#line 145 "mn-gmail-mailbox.gob"
Self *self = SELF(mailbox);
GnomeVFSResult result;
@@ -323,9 +418,11 @@ ___4_mn_gmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GN
xmlDoc *doc;
xmlNode *node;
+ PARENT_HANDLER(mailbox);
+
if (! selfp->uri)
{
- selfp->uri = gnome_vfs_uri_new(self->location);
+ selfp->uri = self_build_uri(self);
if (! selfp->uri)
{
GDK_THREADS_ENTER();
@@ -340,8 +437,15 @@ ___4_mn_gmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GN
return;
}
+ /*
+ * Obtain the password from the keyring but do not prompt
+ * (GnomeVFS will prompt on our behalf if the password is
+ * missing).
+ */
+ mn_authenticated_mailbox_fill_password(mailbox, FALSE);
+
gnome_vfs_uri_set_user_name(selfp->uri, mailbox->username);
- gnome_vfs_uri_set_password(selfp->uri, mailbox->password);
+ gnome_vfs_uri_set_password(selfp->uri, mailbox->runtime_password);
}
mn_mailbox_notice(MN_MAILBOX(self), _("retrieving feed from %s"), self->location);
@@ -359,6 +463,12 @@ ___4_mn_gmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GN
return;
}
+ mn_mailbox_notice(MN_MAILBOX(self),
+ ngettext("feed retrieved successfully (%i byte)",
+ "feed retrieved successfully (%i bytes)",
+ atom_size),
+ atom_size);
+
doc = xmlParseMemory(atom, atom_size);
g_free(atom);
@@ -425,31 +535,31 @@ ___4_mn_gmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GN
xmlFreeDoc(doc);
}}
-#line 429 "mn-gmail-mailbox.c"
+#line 539 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 200 "mn-gmail-mailbox.gob"
+#line 271 "mn-gmail-mailbox.gob"
static void
mn_gmail_mailbox_parse_entry (xmlNode * node, time_t * sent_time, char ** id, char ** from, char ** subject, char ** url)
-#line 436 "mn-gmail-mailbox.c"
+#line 546 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::parse_entry"
-#line 200 "mn-gmail-mailbox.gob"
+#line 271 "mn-gmail-mailbox.gob"
g_return_if_fail (node != NULL);
-#line 200 "mn-gmail-mailbox.gob"
+#line 271 "mn-gmail-mailbox.gob"
g_return_if_fail (sent_time != NULL);
-#line 200 "mn-gmail-mailbox.gob"
+#line 271 "mn-gmail-mailbox.gob"
g_return_if_fail (id != NULL);
-#line 200 "mn-gmail-mailbox.gob"
+#line 271 "mn-gmail-mailbox.gob"
g_return_if_fail (from != NULL);
-#line 200 "mn-gmail-mailbox.gob"
+#line 271 "mn-gmail-mailbox.gob"
g_return_if_fail (subject != NULL);
-#line 200 "mn-gmail-mailbox.gob"
+#line 271 "mn-gmail-mailbox.gob"
g_return_if_fail (url != NULL);
-#line 451 "mn-gmail-mailbox.c"
+#line 561 "mn-gmail-mailbox.c"
{
-#line 207 "mn-gmail-mailbox.gob"
+#line 278 "mn-gmail-mailbox.gob"
*sent_time = 0;
*id = NULL;
@@ -495,20 +605,20 @@ mn_gmail_mailbox_parse_entry (xmlNode * node, time_t * sent_time, char ** id, ch
#endif
}
}}
-#line 499 "mn-gmail-mailbox.c"
+#line 609 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 253 "mn-gmail-mailbox.gob"
+#line 324 "mn-gmail-mailbox.gob"
static char *
mn_gmail_mailbox_parse_author (xmlNode * node)
-#line 505 "mn-gmail-mailbox.c"
+#line 615 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::parse_author"
-#line 253 "mn-gmail-mailbox.gob"
+#line 324 "mn-gmail-mailbox.gob"
g_return_val_if_fail (node != NULL, (char * )0);
-#line 510 "mn-gmail-mailbox.c"
+#line 620 "mn-gmail-mailbox.c"
{
-#line 255 "mn-gmail-mailbox.gob"
+#line 326 "mn-gmail-mailbox.gob"
char *from;
char *name = NULL;
@@ -538,20 +648,20 @@ mn_gmail_mailbox_parse_author (xmlNode * node)
return from;
}}
-#line 542 "mn-gmail-mailbox.c"
+#line 652 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 285 "mn-gmail-mailbox.gob"
+#line 356 "mn-gmail-mailbox.gob"
static time_t
mn_gmail_mailbox_parse_date (const char * w3c_datetime)
-#line 548 "mn-gmail-mailbox.c"
+#line 658 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::parse_date"
-#line 285 "mn-gmail-mailbox.gob"
+#line 356 "mn-gmail-mailbox.gob"
g_return_val_if_fail (w3c_datetime != NULL, (time_t )0);
-#line 553 "mn-gmail-mailbox.c"
+#line 663 "mn-gmail-mailbox.c"
{
-#line 287 "mn-gmail-mailbox.gob"
+#line 358 "mn-gmail-mailbox.gob"
#ifdef HAVE_TIMEGM
time_t t = 0;
@@ -590,24 +700,34 @@ mn_gmail_mailbox_parse_date (const char * w3c_datetime)
return 0;
#endif
}}
-#line 594 "mn-gmail-mailbox.c"
+#line 704 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
-#line 326 "mn-gmail-mailbox.gob"
+#line 397 "mn-gmail-mailbox.gob"
char *
-mn_gmail_mailbox_build_name (const char * username)
-#line 600 "mn-gmail-mailbox.c"
+mn_gmail_mailbox_build_name (const char * username, const char * label)
+#line 710 "mn-gmail-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::build_name"
+#line 397 "mn-gmail-mailbox.gob"
+ g_return_val_if_fail (username != NULL, (char * )0);
+#line 715 "mn-gmail-mailbox.c"
{
-#line 328 "mn-gmail-mailbox.gob"
+#line 399 "mn-gmail-mailbox.gob"
- if (username)
- return g_str_has_suffix(username, "@gmail.com")
- ? g_strdup(username)
- : g_strdup_printf("%s@gmail.com", username);
+ GString *name;
+
+ name = g_string_new(NULL);
+
+ if (g_str_has_suffix(username, "@gmail.com"))
+ g_string_append(name, username);
else
- return g_strdup("gmail.com");
+ g_string_append_printf(name, "%s@gmail.com", username);
+
+ if (label)
+ g_string_append_printf(name, "/%s", label);
+
+ return g_string_free(name, FALSE);
}}
-#line 613 "mn-gmail-mailbox.c"
+#line 733 "mn-gmail-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-gmail-mailbox.gob b/src/mn-gmail-mailbox.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -52,20 +52,20 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
{
public char *location destroywith g_free;
property STRING location (link, flags = CONSTRUCT
- | MN_MAILBOX_PARAM_PERMANENT
+ | MN_MAILBOX_PARAM_LOAD_SAVE
| MN_MAILBOX_PARAM_REQUIRED,
default_value = "https://mail.google.com/mail/feed/atom");
+ public char *label destroywith g_free;
+ property STRING label (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE);
+
private GnomeVFSURI *uri unrefwith gnome_vfs_uri_unref;
class_init (class)
{
MN_MAILBOX_CLASS(class)->type = "gmail";
- /*
- * 5 minutes is a good default check delay for remote Gmail
- * mailboxes.
- */
+ /* 5 minutes is a good default */
MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 5;
}
@@ -78,10 +78,66 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
override (MN:Mailbox) void
seal (MNMailbox *mailbox)
{
+ MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
+ Self *self = SELF(mailbox);
+ GnomeVFSURI *uri;
+
PARENT_HANDLER(mailbox);
if (! mailbox->runtime_name)
- mailbox->runtime_name = self_build_name(MN_AUTHENTICATED_MAILBOX(mailbox)->username);
+ mailbox->runtime_name = self_build_name(auth_mailbox->username, self->label);
+
+ uri = self_build_uri(self);
+ if (uri)
+ {
+ /*
+ * Use keyring attributes that are compatible with what
+ * GnomeVFS uses. This allows the password entered by the user
+ * at the GnomeVFS password prompt to be recognized by Mail
+ * Notification and displayed in the mailbox properties
+ * dialog.
+ */
+ auth_mailbox->keyring_server = g_strdup(gnome_vfs_uri_get_host_name(uri));
+ auth_mailbox->keyring_protocol = g_strdup("http");
+ auth_mailbox->keyring_authtype = g_strdup("basic");
+ auth_mailbox->keyring_port = gnome_vfs_uri_get_host_port(uri);
+ if (auth_mailbox->keyring_port == 0)
+ {
+ const char *scheme;
+
+ scheme = gnome_vfs_uri_get_scheme(uri);
+ if (! strcmp(scheme, "http"))
+ auth_mailbox->keyring_port = 80;
+ else if (! strcmp(scheme, "https"))
+ auth_mailbox->keyring_port = 443;
+ }
+
+ gnome_vfs_uri_unref(uri);
+ }
+ else
+ /* fallback */
+ auth_mailbox->keyring_domain = g_strdup("gmail.com");
+ }
+
+ private GnomeVFSURI *
+ build_uri (self)
+ {
+ GnomeVFSURI *uri;
+
+ uri = gnome_vfs_uri_new(self->location);
+ if (uri)
+ {
+ GnomeVFSURI *new_uri;
+
+ if (self->label)
+ {
+ new_uri = gnome_vfs_uri_append_file_name(uri, self->label);
+ gnome_vfs_uri_unref(uri);
+ uri = new_uri;
+ }
+ }
+
+ return uri;
}
override (MN:Authenticated:Mailbox) void
@@ -94,9 +150,11 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
xmlDoc *doc;
xmlNode *node;
+ PARENT_HANDLER(mailbox);
+
if (! selfp->uri)
{
- selfp->uri = gnome_vfs_uri_new(self->location);
+ selfp->uri = self_build_uri(self);
if (! selfp->uri)
{
GDK_THREADS_ENTER();
@@ -111,8 +169,15 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
return;
}
+ /*
+ * Obtain the password from the keyring but do not prompt
+ * (GnomeVFS will prompt on our behalf if the password is
+ * missing).
+ */
+ mn_authenticated_mailbox_fill_password(mailbox, FALSE);
+
gnome_vfs_uri_set_user_name(selfp->uri, mailbox->username);
- gnome_vfs_uri_set_password(selfp->uri, mailbox->password);
+ gnome_vfs_uri_set_password(selfp->uri, mailbox->runtime_password);
}
mn_mailbox_notice(MN_MAILBOX(self), _("retrieving feed from %s"), self->location);
@@ -130,6 +195,12 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
return;
}
+ mn_mailbox_notice(MN_MAILBOX(self),
+ ngettext("feed retrieved successfully (%i byte)",
+ "feed retrieved successfully (%i bytes)",
+ atom_size),
+ atom_size);
+
doc = xmlParseMemory(atom, atom_size);
g_free(atom);
@@ -324,13 +395,20 @@ class MN:Gmail:Mailbox from MN:Authenticated:Mailbox
}
public char *
- build_name (const char *username)
+ build_name (const char *username (check null), const char *label)
{
- if (username)
- return g_str_has_suffix(username, "@gmail.com")
- ? g_strdup(username)
- : g_strdup_printf("%s@gmail.com", username);
+ GString *name;
+
+ name = g_string_new(NULL);
+
+ if (g_str_has_suffix(username, "@gmail.com"))
+ g_string_append(name, username);
else
- return g_strdup("gmail.com");
+ g_string_append_printf(name, "%s@gmail.com", username);
+
+ if (label)
+ g_string_append_printf(name, "/%s", label);
+
+ return g_string_free(name, FALSE);
}
}
diff --git a/src/mn-gmail-mailbox.h b/src/mn-gmail-mailbox.h
@@ -39,6 +39,7 @@ struct _MNGmailMailbox {
MNAuthenticatedMailbox __parent__;
/*< public >*/
char * location;
+ char * label;
/*< private >*/
MNGmailMailboxPrivate *_priv;
};
@@ -56,7 +57,8 @@ struct _MNGmailMailboxClass {
* Public methods
*/
GType mn_gmail_mailbox_get_type (void);
-char * mn_gmail_mailbox_build_name (const char * username);
+char * mn_gmail_mailbox_build_name (const char * username,
+ const char * label);
/*
* Argument wrapping macros
@@ -64,9 +66,13 @@ char * mn_gmail_mailbox_build_name (const char * username);
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define MN_GMAIL_MAILBOX_PROP_LOCATION(arg) "location", __extension__ ({gchar *z = (arg); z;})
#define MN_GMAIL_MAILBOX_GET_PROP_LOCATION(arg) "location", __extension__ ({gchar **z = (arg); z;})
+#define MN_GMAIL_MAILBOX_PROP_LABEL(arg) "label", __extension__ ({gchar *z = (arg); z;})
+#define MN_GMAIL_MAILBOX_GET_PROP_LABEL(arg) "label", __extension__ ({gchar **z = (arg); z;})
#else /* __GNUC__ && !__STRICT_ANSI__ */
#define MN_GMAIL_MAILBOX_PROP_LOCATION(arg) "location",(gchar *)(arg)
#define MN_GMAIL_MAILBOX_GET_PROP_LOCATION(arg) "location",(gchar **)(arg)
+#define MN_GMAIL_MAILBOX_PROP_LABEL(arg) "label",(gchar *)(arg)
+#define MN_GMAIL_MAILBOX_GET_PROP_LABEL(arg) "label",(gchar **)(arg)
#endif /* __GNUC__ && !__STRICT_ANSI__ */
diff --git a/src/mn-gmime-stream-vfs-private.h b/src/mn-gmime-stream-vfs-private.h
@@ -13,10 +13,12 @@ struct _MNGMimeStreamVFSPrivate {
#line 64 "mn-gmime-stream-vfs.gob"
GnomeVFSHandle * handle;
#line 65 "mn-gmime-stream-vfs.gob"
+ gboolean handle_owned;
+#line 67 "mn-gmime-stream-vfs.gob"
char * uri;
-#line 66 "mn-gmime-stream-vfs.gob"
+#line 68 "mn-gmime-stream-vfs.gob"
gboolean eof;
-#line 20 "mn-gmime-stream-vfs-private.h"
+#line 22 "mn-gmime-stream-vfs-private.h"
};
#ifdef __cplusplus
diff --git a/src/mn-gmime-stream-vfs.c b/src/mn-gmime-stream-vfs.c
@@ -74,16 +74,17 @@ typedef MNGMimeStreamVFSClass SelfClass;
/* here are local prototypes */
static void mn_gmime_stream_vfs_init (MNGMimeStreamVFS * o) G_GNUC_UNUSED;
static void mn_gmime_stream_vfs_class_init (MNGMimeStreamVFSClass * c) G_GNUC_UNUSED;
-static ssize_t ___1_mn_gmime_stream_vfs_read (GMimeStream * stream, char * buf, size_t len) G_GNUC_UNUSED;
-static ssize_t ___2_mn_gmime_stream_vfs_write (GMimeStream * stream, const char * buf, size_t len) G_GNUC_UNUSED;
-static int ___3_mn_gmime_stream_vfs_flush (GMimeStream * stream) G_GNUC_UNUSED;
-static int ___4_mn_gmime_stream_vfs_close (GMimeStream * stream) G_GNUC_UNUSED;
-static gboolean ___5_mn_gmime_stream_vfs_eos (GMimeStream * stream) G_GNUC_UNUSED;
-static int ___6_mn_gmime_stream_vfs_reset (GMimeStream * stream) G_GNUC_UNUSED;
-static off_t ___7_mn_gmime_stream_vfs_seek (GMimeStream * stream, off_t offset, GMimeSeekWhence whence) G_GNUC_UNUSED;
-static off_t ___8_mn_gmime_stream_vfs_tell (GMimeStream * stream) G_GNUC_UNUSED;
-static ssize_t ___9_mn_gmime_stream_vfs_length (GMimeStream * stream) G_GNUC_UNUSED;
-static GMimeStream * ___a_mn_gmime_stream_vfs_substream (GMimeStream * stream, off_t start, off_t end) G_GNUC_UNUSED;
+static void ___1_mn_gmime_stream_vfs_finalize (GObject * object) G_GNUC_UNUSED;
+static ssize_t ___2_mn_gmime_stream_vfs_read (GMimeStream * stream, char * buf, size_t len) G_GNUC_UNUSED;
+static ssize_t ___3_mn_gmime_stream_vfs_write (GMimeStream * stream, const char * buf, size_t len) G_GNUC_UNUSED;
+static int ___4_mn_gmime_stream_vfs_flush (GMimeStream * stream) G_GNUC_UNUSED;
+static int ___5_mn_gmime_stream_vfs_close (GMimeStream * stream) G_GNUC_UNUSED;
+static gboolean ___6_mn_gmime_stream_vfs_eos (GMimeStream * stream) G_GNUC_UNUSED;
+static int ___7_mn_gmime_stream_vfs_reset (GMimeStream * stream) G_GNUC_UNUSED;
+static off_t ___8_mn_gmime_stream_vfs_seek (GMimeStream * stream, off_t offset, GMimeSeekWhence whence) G_GNUC_UNUSED;
+static off_t ___9_mn_gmime_stream_vfs_tell (GMimeStream * stream) G_GNUC_UNUSED;
+static ssize_t ___a_mn_gmime_stream_vfs_length (GMimeStream * stream) G_GNUC_UNUSED;
+static GMimeStream * ___b_mn_gmime_stream_vfs_substream (GMimeStream * stream, off_t start, off_t end) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static GMimeStreamClass *parent_class = NULL;
@@ -139,11 +140,12 @@ ___finalize(GObject *obj_self)
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::finalize"
MNGMimeStreamVFS *self G_GNUC_UNUSED = MN_GMIME_STREAM_VFS (obj_self);
gpointer priv G_GNUC_UNUSED = self->_priv;
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 65 "mn-gmime-stream-vfs.gob"
+#line 70 "mn-gmime-stream-vfs.gob"
+ ___1_mn_gmime_stream_vfs_finalize(obj_self);
+#line 146 "mn-gmime-stream-vfs.c"
+#line 67 "mn-gmime-stream-vfs.gob"
if(self->_priv->uri) { g_free ((gpointer) self->_priv->uri); self->_priv->uri = NULL; }
-#line 147 "mn-gmime-stream-vfs.c"
+#line 149 "mn-gmime-stream-vfs.c"
}
#undef __GOB_FUNCTION__
@@ -165,37 +167,61 @@ mn_gmime_stream_vfs_class_init (MNGMimeStreamVFSClass * c G_GNUC_UNUSED)
parent_class = g_type_class_ref (GMIME_TYPE_STREAM);
-#line 68 "mn-gmime-stream-vfs.gob"
- gmime_stream_class->read = ___1_mn_gmime_stream_vfs_read;
-#line 88 "mn-gmime-stream-vfs.gob"
- gmime_stream_class->write = ___2_mn_gmime_stream_vfs_write;
-#line 108 "mn-gmime-stream-vfs.gob"
- gmime_stream_class->flush = ___3_mn_gmime_stream_vfs_flush;
-#line 115 "mn-gmime-stream-vfs.gob"
- gmime_stream_class->close = ___4_mn_gmime_stream_vfs_close;
-#line 125 "mn-gmime-stream-vfs.gob"
- gmime_stream_class->eos = ___5_mn_gmime_stream_vfs_eos;
-#line 136 "mn-gmime-stream-vfs.gob"
- gmime_stream_class->reset = ___6_mn_gmime_stream_vfs_reset;
-#line 150 "mn-gmime-stream-vfs.gob"
- gmime_stream_class->seek = ___7_mn_gmime_stream_vfs_seek;
-#line 195 "mn-gmime-stream-vfs.gob"
- gmime_stream_class->tell = ___8_mn_gmime_stream_vfs_tell;
-#line 201 "mn-gmime-stream-vfs.gob"
- gmime_stream_class->length = ___9_mn_gmime_stream_vfs_length;
-#line 220 "mn-gmime-stream-vfs.gob"
- gmime_stream_class->substream = ___a_mn_gmime_stream_vfs_substream;
-#line 189 "mn-gmime-stream-vfs.c"
+#line 70 "mn-gmime-stream-vfs.gob"
g_object_class->finalize = ___finalize;
+#line 81 "mn-gmime-stream-vfs.gob"
+ gmime_stream_class->read = ___2_mn_gmime_stream_vfs_read;
+#line 101 "mn-gmime-stream-vfs.gob"
+ gmime_stream_class->write = ___3_mn_gmime_stream_vfs_write;
+#line 121 "mn-gmime-stream-vfs.gob"
+ gmime_stream_class->flush = ___4_mn_gmime_stream_vfs_flush;
+#line 128 "mn-gmime-stream-vfs.gob"
+ gmime_stream_class->close = ___5_mn_gmime_stream_vfs_close;
+#line 138 "mn-gmime-stream-vfs.gob"
+ gmime_stream_class->eos = ___6_mn_gmime_stream_vfs_eos;
+#line 149 "mn-gmime-stream-vfs.gob"
+ gmime_stream_class->reset = ___7_mn_gmime_stream_vfs_reset;
+#line 163 "mn-gmime-stream-vfs.gob"
+ gmime_stream_class->seek = ___8_mn_gmime_stream_vfs_seek;
+#line 208 "mn-gmime-stream-vfs.gob"
+ gmime_stream_class->tell = ___9_mn_gmime_stream_vfs_tell;
+#line 214 "mn-gmime-stream-vfs.gob"
+ gmime_stream_class->length = ___a_mn_gmime_stream_vfs_length;
+#line 233 "mn-gmime-stream-vfs.gob"
+ gmime_stream_class->substream = ___b_mn_gmime_stream_vfs_substream;
+#line 193 "mn-gmime-stream-vfs.c"
}
#undef __GOB_FUNCTION__
-#line 68 "mn-gmime-stream-vfs.gob"
+#line 70 "mn-gmime-stream-vfs.gob"
+static void
+___1_mn_gmime_stream_vfs_finalize (GObject * object G_GNUC_UNUSED)
+#line 202 "mn-gmime-stream-vfs.c"
+#define PARENT_HANDLER(___object) \
+ { if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
+{
+#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::finalize"
+{
+#line 72 "mn-gmime-stream-vfs.gob"
+
+ Self *self = SELF(object);
+
+ if (selfp->handle_owned)
+ g_mime_stream_close(GMIME_STREAM(object));
+
+ PARENT_HANDLER(object);
+ }}
+#line 218 "mn-gmime-stream-vfs.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 81 "mn-gmime-stream-vfs.gob"
static ssize_t
-___1_mn_gmime_stream_vfs_read (GMimeStream * stream G_GNUC_UNUSED, char * buf, size_t len)
-#line 199 "mn-gmime-stream-vfs.c"
+___2_mn_gmime_stream_vfs_read (GMimeStream * stream G_GNUC_UNUSED, char * buf, size_t len)
+#line 225 "mn-gmime-stream-vfs.c"
#define PARENT_HANDLER(___stream,___buf,___len) \
((GMIME_STREAM_CLASS(parent_class)->read)? \
(* GMIME_STREAM_CLASS(parent_class)->read)(___stream,___buf,___len): \
@@ -203,7 +229,7 @@ ___1_mn_gmime_stream_vfs_read (GMimeStream * stream G_GNUC_UNUSED, char * buf, s
{
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::read"
{
-#line 70 "mn-gmime-stream-vfs.gob"
+#line 83 "mn-gmime-stream-vfs.gob"
Self *self = SELF(stream);
GnomeVFSFileSize bytes_read;
@@ -221,14 +247,14 @@ ___1_mn_gmime_stream_vfs_read (GMimeStream * stream G_GNUC_UNUSED, char * buf, s
return bytes_read;
}}
-#line 225 "mn-gmime-stream-vfs.c"
+#line 251 "mn-gmime-stream-vfs.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 88 "mn-gmime-stream-vfs.gob"
+#line 101 "mn-gmime-stream-vfs.gob"
static ssize_t
-___2_mn_gmime_stream_vfs_write (GMimeStream * stream G_GNUC_UNUSED, const char * buf, size_t len)
-#line 232 "mn-gmime-stream-vfs.c"
+___3_mn_gmime_stream_vfs_write (GMimeStream * stream G_GNUC_UNUSED, const char * buf, size_t len)
+#line 258 "mn-gmime-stream-vfs.c"
#define PARENT_HANDLER(___stream,___buf,___len) \
((GMIME_STREAM_CLASS(parent_class)->write)? \
(* GMIME_STREAM_CLASS(parent_class)->write)(___stream,___buf,___len): \
@@ -236,7 +262,7 @@ ___2_mn_gmime_stream_vfs_write (GMimeStream * stream G_GNUC_UNUSED, const char *
{
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::write"
{
-#line 90 "mn-gmime-stream-vfs.gob"
+#line 103 "mn-gmime-stream-vfs.gob"
Self *self = SELF(stream);
GnomeVFSFileSize bytes_written;
@@ -254,14 +280,14 @@ ___2_mn_gmime_stream_vfs_write (GMimeStream * stream G_GNUC_UNUSED, const char *
return bytes_written;
}}
-#line 258 "mn-gmime-stream-vfs.c"
+#line 284 "mn-gmime-stream-vfs.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 108 "mn-gmime-stream-vfs.gob"
+#line 121 "mn-gmime-stream-vfs.gob"
static int
-___3_mn_gmime_stream_vfs_flush (GMimeStream * stream G_GNUC_UNUSED)
-#line 265 "mn-gmime-stream-vfs.c"
+___4_mn_gmime_stream_vfs_flush (GMimeStream * stream G_GNUC_UNUSED)
+#line 291 "mn-gmime-stream-vfs.c"
#define PARENT_HANDLER(___stream) \
((GMIME_STREAM_CLASS(parent_class)->flush)? \
(* GMIME_STREAM_CLASS(parent_class)->flush)(___stream): \
@@ -269,19 +295,19 @@ ___3_mn_gmime_stream_vfs_flush (GMimeStream * stream G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::flush"
{
-#line 110 "mn-gmime-stream-vfs.gob"
+#line 123 "mn-gmime-stream-vfs.gob"
/* nop */
return 0; /* success */
}}
-#line 278 "mn-gmime-stream-vfs.c"
+#line 304 "mn-gmime-stream-vfs.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 115 "mn-gmime-stream-vfs.gob"
+#line 128 "mn-gmime-stream-vfs.gob"
static int
-___4_mn_gmime_stream_vfs_close (GMimeStream * stream G_GNUC_UNUSED)
-#line 285 "mn-gmime-stream-vfs.c"
+___5_mn_gmime_stream_vfs_close (GMimeStream * stream G_GNUC_UNUSED)
+#line 311 "mn-gmime-stream-vfs.c"
#define PARENT_HANDLER(___stream) \
((GMIME_STREAM_CLASS(parent_class)->close)? \
(* GMIME_STREAM_CLASS(parent_class)->close)(___stream): \
@@ -289,7 +315,7 @@ ___4_mn_gmime_stream_vfs_close (GMimeStream * stream G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::close"
{
-#line 117 "mn-gmime-stream-vfs.gob"
+#line 130 "mn-gmime-stream-vfs.gob"
Self *self = SELF(stream);
@@ -297,14 +323,14 @@ ___4_mn_gmime_stream_vfs_close (GMimeStream * stream G_GNUC_UNUSED)
return 0; /* success */
}}
-#line 301 "mn-gmime-stream-vfs.c"
+#line 327 "mn-gmime-stream-vfs.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 125 "mn-gmime-stream-vfs.gob"
+#line 138 "mn-gmime-stream-vfs.gob"
static gboolean
-___5_mn_gmime_stream_vfs_eos (GMimeStream * stream G_GNUC_UNUSED)
-#line 308 "mn-gmime-stream-vfs.c"
+___6_mn_gmime_stream_vfs_eos (GMimeStream * stream G_GNUC_UNUSED)
+#line 334 "mn-gmime-stream-vfs.c"
#define PARENT_HANDLER(___stream) \
((GMIME_STREAM_CLASS(parent_class)->eos)? \
(* GMIME_STREAM_CLASS(parent_class)->eos)(___stream): \
@@ -312,7 +338,7 @@ ___5_mn_gmime_stream_vfs_eos (GMimeStream * stream G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::eos"
{
-#line 127 "mn-gmime-stream-vfs.gob"
+#line 140 "mn-gmime-stream-vfs.gob"
Self *self = SELF(stream);
@@ -321,14 +347,14 @@ ___5_mn_gmime_stream_vfs_eos (GMimeStream * stream G_GNUC_UNUSED)
else
return stream->position >= stream->bound_end;
}}
-#line 325 "mn-gmime-stream-vfs.c"
+#line 351 "mn-gmime-stream-vfs.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 136 "mn-gmime-stream-vfs.gob"
+#line 149 "mn-gmime-stream-vfs.gob"
static int
-___6_mn_gmime_stream_vfs_reset (GMimeStream * stream G_GNUC_UNUSED)
-#line 332 "mn-gmime-stream-vfs.c"
+___7_mn_gmime_stream_vfs_reset (GMimeStream * stream G_GNUC_UNUSED)
+#line 358 "mn-gmime-stream-vfs.c"
#define PARENT_HANDLER(___stream) \
((GMIME_STREAM_CLASS(parent_class)->reset)? \
(* GMIME_STREAM_CLASS(parent_class)->reset)(___stream): \
@@ -336,7 +362,7 @@ ___6_mn_gmime_stream_vfs_reset (GMimeStream * stream G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::reset"
{
-#line 138 "mn-gmime-stream-vfs.gob"
+#line 151 "mn-gmime-stream-vfs.gob"
Self *self = SELF(stream);
@@ -348,14 +374,14 @@ ___6_mn_gmime_stream_vfs_reset (GMimeStream * stream G_GNUC_UNUSED)
return 0;
}}
-#line 352 "mn-gmime-stream-vfs.c"
+#line 378 "mn-gmime-stream-vfs.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 150 "mn-gmime-stream-vfs.gob"
+#line 163 "mn-gmime-stream-vfs.gob"
static off_t
-___7_mn_gmime_stream_vfs_seek (GMimeStream * stream G_GNUC_UNUSED, off_t offset, GMimeSeekWhence whence)
-#line 359 "mn-gmime-stream-vfs.c"
+___8_mn_gmime_stream_vfs_seek (GMimeStream * stream G_GNUC_UNUSED, off_t offset, GMimeSeekWhence whence)
+#line 385 "mn-gmime-stream-vfs.c"
#define PARENT_HANDLER(___stream,___offset,___whence) \
((GMIME_STREAM_CLASS(parent_class)->seek)? \
(* GMIME_STREAM_CLASS(parent_class)->seek)(___stream,___offset,___whence): \
@@ -363,7 +389,7 @@ ___7_mn_gmime_stream_vfs_seek (GMimeStream * stream G_GNUC_UNUSED, off_t offset,
{
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::seek"
{
-#line 152 "mn-gmime-stream-vfs.gob"
+#line 165 "mn-gmime-stream-vfs.gob"
Self *self = SELF(stream);
off_t real = stream->position;
@@ -406,14 +432,14 @@ ___7_mn_gmime_stream_vfs_seek (GMimeStream * stream G_GNUC_UNUSED, off_t offset,
return real;
}}
-#line 410 "mn-gmime-stream-vfs.c"
+#line 436 "mn-gmime-stream-vfs.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 195 "mn-gmime-stream-vfs.gob"
+#line 208 "mn-gmime-stream-vfs.gob"
static off_t
-___8_mn_gmime_stream_vfs_tell (GMimeStream * stream G_GNUC_UNUSED)
-#line 417 "mn-gmime-stream-vfs.c"
+___9_mn_gmime_stream_vfs_tell (GMimeStream * stream G_GNUC_UNUSED)
+#line 443 "mn-gmime-stream-vfs.c"
#define PARENT_HANDLER(___stream) \
((GMIME_STREAM_CLASS(parent_class)->tell)? \
(* GMIME_STREAM_CLASS(parent_class)->tell)(___stream): \
@@ -421,18 +447,18 @@ ___8_mn_gmime_stream_vfs_tell (GMimeStream * stream G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::tell"
{
-#line 197 "mn-gmime-stream-vfs.gob"
+#line 210 "mn-gmime-stream-vfs.gob"
return stream->position;
}}
-#line 429 "mn-gmime-stream-vfs.c"
+#line 455 "mn-gmime-stream-vfs.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 201 "mn-gmime-stream-vfs.gob"
+#line 214 "mn-gmime-stream-vfs.gob"
static ssize_t
-___9_mn_gmime_stream_vfs_length (GMimeStream * stream G_GNUC_UNUSED)
-#line 436 "mn-gmime-stream-vfs.c"
+___a_mn_gmime_stream_vfs_length (GMimeStream * stream G_GNUC_UNUSED)
+#line 462 "mn-gmime-stream-vfs.c"
#define PARENT_HANDLER(___stream) \
((GMIME_STREAM_CLASS(parent_class)->length)? \
(* GMIME_STREAM_CLASS(parent_class)->length)(___stream): \
@@ -440,7 +466,7 @@ ___9_mn_gmime_stream_vfs_length (GMimeStream * stream G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::length"
{
-#line 203 "mn-gmime-stream-vfs.gob"
+#line 216 "mn-gmime-stream-vfs.gob"
Self *self = SELF(stream);
GnomeVFSFileSize bound_end;
@@ -457,14 +483,14 @@ ___9_mn_gmime_stream_vfs_length (GMimeStream * stream G_GNUC_UNUSED)
return bound_end - stream->bound_start;
}}
-#line 461 "mn-gmime-stream-vfs.c"
+#line 487 "mn-gmime-stream-vfs.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 220 "mn-gmime-stream-vfs.gob"
+#line 233 "mn-gmime-stream-vfs.gob"
static GMimeStream *
-___a_mn_gmime_stream_vfs_substream (GMimeStream * stream G_GNUC_UNUSED, off_t start, off_t end)
-#line 468 "mn-gmime-stream-vfs.c"
+___b_mn_gmime_stream_vfs_substream (GMimeStream * stream G_GNUC_UNUSED, off_t start, off_t end)
+#line 494 "mn-gmime-stream-vfs.c"
#define PARENT_HANDLER(___stream,___start,___end) \
((GMIME_STREAM_CLASS(parent_class)->substream)? \
(* GMIME_STREAM_CLASS(parent_class)->substream)(___stream,___start,___end): \
@@ -472,34 +498,35 @@ ___a_mn_gmime_stream_vfs_substream (GMimeStream * stream G_GNUC_UNUSED, off_t st
{
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::substream"
{
-#line 222 "mn-gmime-stream-vfs.gob"
+#line 235 "mn-gmime-stream-vfs.gob"
Self *self;
self = GET_NEW;
selfp->handle = SELF(stream)->_priv->handle;
+ /* handle of the substream is not owned */
g_mime_stream_construct(GMIME_STREAM(self), start, end);
return GMIME_STREAM(self);
}}
-#line 487 "mn-gmime-stream-vfs.c"
+#line 514 "mn-gmime-stream-vfs.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 233 "mn-gmime-stream-vfs.gob"
+#line 250 "mn-gmime-stream-vfs.gob"
GMimeStream *
mn_gmime_stream_vfs_new (GnomeVFSHandle * handle, GnomeVFSURI * uri, GnomeVFSResult * result)
-#line 494 "mn-gmime-stream-vfs.c"
+#line 521 "mn-gmime-stream-vfs.c"
{
#define __GOB_FUNCTION__ "MN:GMime:Stream:VFS::new"
-#line 233 "mn-gmime-stream-vfs.gob"
+#line 250 "mn-gmime-stream-vfs.gob"
g_return_val_if_fail (handle != NULL, (GMimeStream * )0);
-#line 233 "mn-gmime-stream-vfs.gob"
+#line 250 "mn-gmime-stream-vfs.gob"
g_return_val_if_fail (uri != NULL, (GMimeStream * )0);
-#line 501 "mn-gmime-stream-vfs.c"
+#line 528 "mn-gmime-stream-vfs.c"
{
-#line 237 "mn-gmime-stream-vfs.gob"
+#line 254 "mn-gmime-stream-vfs.gob"
GMimeStream *stream;
GnomeVFSResult _result;
@@ -521,6 +548,8 @@ mn_gmime_stream_vfs_new (GnomeVFSHandle * handle, GnomeVFSURI * uri, GnomeVFSRes
}
else
stream = NULL;
+
+ gnome_vfs_close(handle);
}
else
{
@@ -530,6 +559,7 @@ mn_gmime_stream_vfs_new (GnomeVFSHandle * handle, GnomeVFSURI * uri, GnomeVFSRes
self = GET_NEW;
selfp->handle = handle;
+ selfp->handle_owned = TRUE;
selfp->uri = gnome_vfs_uri_to_string(uri, GNOME_VFS_URI_HIDE_NONE);
stream = GMIME_STREAM(self);
@@ -545,5 +575,5 @@ mn_gmime_stream_vfs_new (GnomeVFSHandle * handle, GnomeVFSURI * uri, GnomeVFSRes
return stream;
}}
-#line 549 "mn-gmime-stream-vfs.c"
+#line 579 "mn-gmime-stream-vfs.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-gmime-stream-vfs.gob b/src/mn-gmime-stream-vfs.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -62,9 +62,22 @@ requires 2.0.14
class MN:GMime:Stream:VFS from GMime:Stream
{
private GnomeVFSHandle *handle;
+ private gboolean handle_owned;
+
private char *uri destroywith g_free; /* used in error messages only */
private gboolean eof;
+ override (G:Object) void
+ finalize (GObject *object)
+ {
+ Self *self = SELF(object);
+
+ if (selfp->handle_owned)
+ g_mime_stream_close(GMIME_STREAM(object));
+
+ PARENT_HANDLER(object);
+ }
+
override (GMime:Stream) ssize_t
read (GMimeStream *stream, char *buf, size_t len)
{
@@ -224,12 +237,16 @@ class MN:GMime:Stream:VFS from GMime:Stream
self = GET_NEW;
selfp->handle = SELF(stream)->_priv->handle;
+ /* handle of the substream is not owned */
g_mime_stream_construct(GMIME_STREAM(self), start, end);
return GMIME_STREAM(self);
}
+ /*
+ * Follows the GMime convention of owning the handle (even on error).
+ */
public GMimeStream *
new (GnomeVFSHandle *handle (check null),
GnomeVFSURI *uri (check null),
@@ -255,6 +272,8 @@ class MN:GMime:Stream:VFS from GMime:Stream
}
else
stream = NULL;
+
+ gnome_vfs_close(handle);
}
else
{
@@ -264,6 +283,7 @@ class MN:GMime:Stream:VFS from GMime:Stream
self = GET_NEW;
selfp->handle = handle;
+ selfp->handle_owned = TRUE;
selfp->uri = gnome_vfs_uri_to_string(uri, GNOME_VFS_URI_HIDE_NONE);
stream = GMIME_STREAM(self);
diff --git a/src/mn-hotmail-mailbox-private.h b/src/mn-hotmail-mailbox-private.h
@@ -0,0 +1,17 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_HOTMAIL_MAILBOX_PRIVATE_H__
+#define __MN_HOTMAIL_MAILBOX_PRIVATE_H__
+
+#include "mn-hotmail-mailbox.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-hotmail-mailbox-properties-private.h b/src/mn-hotmail-mailbox-properties-private.h
@@ -0,0 +1,17 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_HOTMAIL_MAILBOX_PROPERTIES_PRIVATE_H__
+#define __MN_HOTMAIL_MAILBOX_PROPERTIES_PRIVATE_H__
+
+#include "mn-hotmail-mailbox-properties.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-hotmail-mailbox-properties.c b/src/mn-hotmail-mailbox-properties.c
@@ -0,0 +1,122 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-hotmail-mailbox-properties.h"
+
+#include "mn-hotmail-mailbox-properties-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 26 "mn-hotmail-mailbox-properties.gob"
+
+#include "config.h"
+#include "mn-stock.h"
+
+#line 31 "mn-hotmail-mailbox-properties.c"
+/* self casting macros */
+#define SELF(x) MN_HOTMAIL_MAILBOX_PROPERTIES(x)
+#define SELF_CONST(x) MN_HOTMAIL_MAILBOX_PROPERTIES_CONST(x)
+#define IS_SELF(x) MN_IS_HOTMAIL_MAILBOX_PROPERTIES(x)
+#define TYPE_SELF MN_TYPE_HOTMAIL_MAILBOX_PROPERTIES
+#define SELF_CLASS(x) MN_HOTMAIL_MAILBOX_PROPERTIES_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_HOTMAIL_MAILBOX_PROPERTIES_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNHotmailMailboxProperties Self;
+typedef MNHotmailMailboxPropertiesClass SelfClass;
+
+/* here are local prototypes */
+static void mn_hotmail_mailbox_properties_init (MNHotmailMailboxProperties * o) G_GNUC_UNUSED;
+static void mn_hotmail_mailbox_properties_class_init (MNHotmailMailboxPropertiesClass * class) G_GNUC_UNUSED;
+
+/* pointer to the class of our parent */
+static MNWebmailMailboxPropertiesClass *parent_class = NULL;
+
+GType
+mn_hotmail_mailbox_properties_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNHotmailMailboxPropertiesClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_hotmail_mailbox_properties_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNHotmailMailboxProperties),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_hotmail_mailbox_properties_init,
+ NULL
+ };
+
+ type = g_type_register_static (MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES, "MNHotmailMailboxProperties", &info, (GTypeFlags)0);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNHotmailMailboxProperties *)g_object_new(mn_hotmail_mailbox_properties_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNHotmailMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNHotmailMailboxProperties *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNHotmailMailboxProperties *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNHotmailMailboxProperties *)g_object_new_valist (mn_hotmail_mailbox_properties_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+static void
+mn_hotmail_mailbox_properties_init (MNHotmailMailboxProperties * o G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox:Properties::init"
+}
+#undef __GOB_FUNCTION__
+#line 33 "mn-hotmail-mailbox-properties.gob"
+static void
+mn_hotmail_mailbox_properties_class_init (MNHotmailMailboxPropertiesClass * class G_GNUC_UNUSED)
+#line 103 "mn-hotmail-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox:Properties::class_init"
+
+ parent_class = g_type_class_ref (MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES);
+
+ {
+#line 34 "mn-hotmail-mailbox-properties.gob"
+
+ MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
+
+ p_class->type = "hotmail";
+ p_class->stock_id = MN_STOCK_HOTMAIL;
+ p_class->combo_label = "Windows Live Hotmail";
+
+#line 118 "mn-hotmail-mailbox-properties.c"
+ }
+}
+#undef __GOB_FUNCTION__
+
+
diff --git a/src/mn-hotmail-mailbox-properties.gob b/src/mn-hotmail-mailbox-properties.gob
@@ -0,0 +1,41 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%headertop{
+#include "mn-webmail-mailbox-properties.h"
+%}
+
+%{
+#include "config.h"
+#include "mn-stock.h"
+%}
+
+class MN:Hotmail:Mailbox:Properties from MN:Webmail:Mailbox:Properties
+{
+ class_init (class)
+ {
+ MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
+
+ p_class->type = "hotmail";
+ p_class->stock_id = MN_STOCK_HOTMAIL;
+ p_class->combo_label = "Windows Live Hotmail";
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-hotmail-mailbox-properties.gob.stamp
diff --git a/src/mn-hotmail-mailbox-properties.h b/src/mn-hotmail-mailbox-properties.h
@@ -0,0 +1,57 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include "mn-webmail-mailbox-properties.h"
+
+#ifndef __MN_HOTMAIL_MAILBOX_PROPERTIES_H__
+#define __MN_HOTMAIL_MAILBOX_PROPERTIES_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_HOTMAIL_MAILBOX_PROPERTIES (mn_hotmail_mailbox_properties_get_type())
+#define MN_HOTMAIL_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_hotmail_mailbox_properties_get_type(), MNHotmailMailboxProperties)
+#define MN_HOTMAIL_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_hotmail_mailbox_properties_get_type(), MNHotmailMailboxProperties const)
+#define MN_HOTMAIL_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_hotmail_mailbox_properties_get_type(), MNHotmailMailboxPropertiesClass)
+#define MN_IS_HOTMAIL_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_hotmail_mailbox_properties_get_type ())
+
+#define MN_HOTMAIL_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_hotmail_mailbox_properties_get_type(), MNHotmailMailboxPropertiesClass)
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_HOTMAIL_MAILBOX_PROPERTIES__
+#define __TYPEDEF_MN_HOTMAIL_MAILBOX_PROPERTIES__
+typedef struct _MNHotmailMailboxProperties MNHotmailMailboxProperties;
+#endif
+struct _MNHotmailMailboxProperties {
+ MNWebmailMailboxProperties __parent__;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNHotmailMailboxPropertiesClass MNHotmailMailboxPropertiesClass;
+struct _MNHotmailMailboxPropertiesClass {
+ MNWebmailMailboxPropertiesClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_hotmail_mailbox_properties_get_type (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-hotmail-mailbox.c b/src/mn-hotmail-mailbox.c
@@ -0,0 +1,335 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-hotmail-mailbox.h"
+
+#include "mn-hotmail-mailbox-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 26 "mn-hotmail-mailbox.gob"
+
+#include "config.h"
+#include <unistd.h>
+#include <glib/gi18n.h>
+#include "mn-conf.h"
+#include "mn-webmail-mailbox-private.h"
+#include "mn-stock.h"
+
+#line 35 "mn-hotmail-mailbox.c"
+/* self casting macros */
+#define SELF(x) MN_HOTMAIL_MAILBOX(x)
+#define SELF_CONST(x) MN_HOTMAIL_MAILBOX_CONST(x)
+#define IS_SELF(x) MN_IS_HOTMAIL_MAILBOX(x)
+#define TYPE_SELF MN_TYPE_HOTMAIL_MAILBOX
+#define SELF_CLASS(x) MN_HOTMAIL_MAILBOX_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_HOTMAIL_MAILBOX_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNHotmailMailbox Self;
+typedef MNHotmailMailboxClass SelfClass;
+
+/* here are local prototypes */
+static void mn_hotmail_mailbox_class_init (MNHotmailMailboxClass * class) G_GNUC_UNUSED;
+static void mn_hotmail_mailbox_init (MNHotmailMailbox * self) G_GNUC_UNUSED;
+static char * mn_hotmail_mailbox_create_config_file (MNHotmailMailbox * self, const char * spool_file, GError ** err) G_GNUC_UNUSED;
+static char * ___4_mn_hotmail_mailbox_get_error_message (MNWebmailMailbox * mailbox, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure) G_GNUC_UNUSED;
+static gboolean mn_hotmail_mailbox_run_getlive (MNHotmailMailbox * self, const char * config_file, GError ** err) G_GNUC_UNUSED;
+static gboolean ___6_mn_hotmail_mailbox_webmail_check (MNWebmailMailbox * mailbox, GError ** err) G_GNUC_UNUSED;
+
+/* pointer to the class of our parent */
+static MNWebmailMailboxClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_create_config_file mn_hotmail_mailbox_create_config_file
+#define self_run_getlive mn_hotmail_mailbox_run_getlive
+GType
+mn_hotmail_mailbox_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNHotmailMailboxClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_hotmail_mailbox_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNHotmailMailbox),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_hotmail_mailbox_init,
+ NULL
+ };
+
+ type = g_type_register_static (MN_TYPE_WEBMAIL_MAILBOX, "MNHotmailMailbox", &info, (GTypeFlags)0);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNHotmailMailbox *)g_object_new(mn_hotmail_mailbox_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNHotmailMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNHotmailMailbox *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNHotmailMailbox *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNHotmailMailbox *)g_object_new_valist (mn_hotmail_mailbox_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+#line 37 "mn-hotmail-mailbox.gob"
+static void
+mn_hotmail_mailbox_class_init (MNHotmailMailboxClass * class G_GNUC_UNUSED)
+#line 108 "mn-hotmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::class_init"
+ MNWebmailMailboxClass *mn_webmail_mailbox_class = (MNWebmailMailboxClass *)class;
+
+ parent_class = g_type_class_ref (MN_TYPE_WEBMAIL_MAILBOX);
+
+#line 119 "mn-hotmail-mailbox.gob"
+ mn_webmail_mailbox_class->get_error_message = ___4_mn_hotmail_mailbox_get_error_message;
+#line 146 "mn-hotmail-mailbox.gob"
+ mn_webmail_mailbox_class->webmail_check = ___6_mn_hotmail_mailbox_webmail_check;
+#line 119 "mn-hotmail-mailbox.c"
+ {
+#line 38 "mn-hotmail-mailbox.gob"
+
+ MN_MAILBOX_CLASS(class)->type = "hotmail";
+
+ /* 5 minutes is a good default */
+ MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 5;
+
+ MN_WEBMAIL_MAILBOX_CLASS(class)->default_domain = "hotmail.com";
+
+#line 130 "mn-hotmail-mailbox.c"
+ }
+}
+#undef __GOB_FUNCTION__
+#line 47 "mn-hotmail-mailbox.gob"
+static void
+mn_hotmail_mailbox_init (MNHotmailMailbox * self G_GNUC_UNUSED)
+#line 137 "mn-hotmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::init"
+ {
+#line 48 "mn-hotmail-mailbox.gob"
+
+ mn_mailbox_set_format(MN_MAILBOX(self), "Windows Live Hotmail");
+ mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_HOTMAIL);
+
+#line 146 "mn-hotmail-mailbox.c"
+ }
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 53 "mn-hotmail-mailbox.gob"
+static char *
+mn_hotmail_mailbox_create_config_file (MNHotmailMailbox * self, const char * spool_file, GError ** err)
+#line 156 "mn-hotmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::create_config_file"
+#line 53 "mn-hotmail-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (char * )0);
+#line 53 "mn-hotmail-mailbox.gob"
+ g_return_val_if_fail (MN_IS_HOTMAIL_MAILBOX (self), (char * )0);
+#line 53 "mn-hotmail-mailbox.gob"
+ g_return_val_if_fail (spool_file != NULL, (char * )0);
+#line 165 "mn-hotmail-mailbox.c"
+{
+#line 57 "mn-hotmail-mailbox.gob"
+
+ char *username;
+ char *domain;
+ GString *contents;
+ char *filename;
+
+ mn_webmail_mailbox_parse_username(MN_WEBMAIL_MAILBOX(self), &username, &domain);
+
+ contents = g_string_new(NULL);
+
+ g_string_append_printf(contents,
+ "UserName = %s\n"
+ "Domain = %s\n"
+ "Password = %s\n"
+ "FetchOnlyUnread = Yes\n"
+ "Folder = %s\n"
+ "Processor = cat >> '%s'\n"
+ "MarkRead = No\n",
+ username,
+ domain,
+ MN_AUTHENTICATED_MAILBOX(self)->runtime_password,
+ MN_WEBMAIL_MAILBOX(self)->folder,
+ spool_file);
+
+ g_free(username);
+ g_free(domain);
+
+ if (eel_gconf_get_boolean(MN_CONF_SYSTEM_HTTP_PROXY_USE_HTTP_PROXY))
+ {
+ char *host;
+
+ host = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_HOST);
+ if (host && *host)
+ {
+ g_string_append_printf(contents, "Proxy = %s:%i\n", host, eel_gconf_get_integer(MN_CONF_SYSTEM_HTTP_PROXY_PORT));
+
+ if (eel_gconf_get_boolean(MN_CONF_SYSTEM_HTTP_PROXY_USE_AUTHENTICATION))
+ {
+ char *user;
+ char *password;
+
+ user = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_USER);
+ password = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_PASSWORD);
+
+ if (user && *user && password && *password)
+ g_string_append_printf(contents, "ProxyAuth = %s:%s\n", user, password);
+
+ g_free(user);
+ g_free(password);
+ }
+ }
+ g_free(host);
+ }
+
+ mn_webmail_mailbox_display_config(MN_WEBMAIL_MAILBOX(self), contents->str);
+ filename = mn_webmail_mailbox_write_temporary_file(contents->str, err);
+
+ g_string_free(contents, TRUE);
+
+ return filename;
+ }}
+#line 229 "mn-hotmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 119 "mn-hotmail-mailbox.gob"
+static char *
+___4_mn_hotmail_mailbox_get_error_message (MNWebmailMailbox * mailbox G_GNUC_UNUSED, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure)
+#line 235 "mn-hotmail-mailbox.c"
+#define PARENT_HANDLER(___mailbox,___helper_stdout,___helper_stderr,___is_auth_failure) \
+ ((MN_WEBMAIL_MAILBOX_CLASS(parent_class)->get_error_message)? \
+ (* MN_WEBMAIL_MAILBOX_CLASS(parent_class)->get_error_message)(___mailbox,___helper_stdout,___helper_stderr,___is_auth_failure): \
+ ((char * )0))
+{
+#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::get_error_message"
+{
+#line 124 "mn-hotmail-mailbox.gob"
+
+ if (helper_stderr && mn_ascii_strcasestr(helper_stderr, "error logging in"))
+ {
+ *is_auth_failure = TRUE;
+ return g_strdup(_("authentication failed"));
+ }
+ return NULL;
+ }}
+#line 252 "mn-hotmail-mailbox.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 133 "mn-hotmail-mailbox.gob"
+static gboolean
+mn_hotmail_mailbox_run_getlive (MNHotmailMailbox * self, const char * config_file, GError ** err)
+#line 259 "mn-hotmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::run_getlive"
+#line 133 "mn-hotmail-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 133 "mn-hotmail-mailbox.gob"
+ g_return_val_if_fail (MN_IS_HOTMAIL_MAILBOX (self), (gboolean )0);
+#line 133 "mn-hotmail-mailbox.gob"
+ g_return_val_if_fail (config_file != NULL, (gboolean )0);
+#line 268 "mn-hotmail-mailbox.c"
+{
+#line 135 "mn-hotmail-mailbox.gob"
+
+ char *command;
+ gboolean status;
+
+ command = g_strdup_printf("GetLive --config-file %s", config_file);
+ status = mn_webmail_mailbox_run_helper(MN_WEBMAIL_MAILBOX(self), "GetLive", command, err);
+ g_free(command);
+
+ return status;
+ }}
+#line 281 "mn-hotmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 146 "mn-hotmail-mailbox.gob"
+static gboolean
+___6_mn_hotmail_mailbox_webmail_check (MNWebmailMailbox * mailbox G_GNUC_UNUSED, GError ** err)
+#line 287 "mn-hotmail-mailbox.c"
+#define PARENT_HANDLER(___mailbox,___err) \
+ ((MN_WEBMAIL_MAILBOX_CLASS(parent_class)->webmail_check)? \
+ (* MN_WEBMAIL_MAILBOX_CLASS(parent_class)->webmail_check)(___mailbox,___err): \
+ ((gboolean )0))
+{
+#define __GOB_FUNCTION__ "MN:Hotmail:Mailbox::webmail_check"
+{
+#line 148 "mn-hotmail-mailbox.gob"
+
+ Self *self = SELF(mailbox);
+ char *spool_file;
+ char *config_file = NULL;
+ gboolean status = FALSE;
+
+ /*
+ * We create an empty spool file beforehand to make sure it is not
+ * world-readable.
+ */
+ spool_file = mn_webmail_mailbox_create_spool_file(err);
+ if (! spool_file)
+ return FALSE;
+
+ config_file = self_create_config_file(self, spool_file, err);
+ if (! config_file)
+ goto end;
+
+ if (! self_run_getlive(self, config_file, err))
+ goto end;
+
+ if (! mn_webmail_mailbox_read_spool_file(mailbox, spool_file, err))
+ goto end;
+
+ status = TRUE;
+
+ end:
+ unlink(spool_file);
+ g_free(spool_file);
+
+ if (config_file)
+ {
+ unlink(config_file);
+ g_free(config_file);
+ }
+
+ return status;
+ }}
+#line 334 "mn-hotmail-mailbox.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
diff --git a/src/mn-hotmail-mailbox.gob b/src/mn-hotmail-mailbox.gob
@@ -0,0 +1,186 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%headertop{
+#include "mn-webmail-mailbox.h"
+%}
+
+%{
+#include "config.h"
+#include <unistd.h>
+#include <glib/gi18n.h>
+#include "mn-conf.h"
+#include "mn-webmail-mailbox-private.h"
+#include "mn-stock.h"
+%}
+
+class MN:Hotmail:Mailbox from MN:Webmail:Mailbox
+{
+ class_init (class)
+ {
+ MN_MAILBOX_CLASS(class)->type = "hotmail";
+
+ /* 5 minutes is a good default */
+ MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 5;
+
+ MN_WEBMAIL_MAILBOX_CLASS(class)->default_domain = "hotmail.com";
+ }
+
+ init (self)
+ {
+ mn_mailbox_set_format(MN_MAILBOX(self), "Windows Live Hotmail");
+ mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_HOTMAIL);
+ }
+
+ private char *
+ create_config_file (self,
+ const char *spool_file (check null),
+ GError **err)
+ {
+ char *username;
+ char *domain;
+ GString *contents;
+ char *filename;
+
+ mn_webmail_mailbox_parse_username(MN_WEBMAIL_MAILBOX(self), &username, &domain);
+
+ contents = g_string_new(NULL);
+
+ g_string_append_printf(contents,
+ "UserName = %s\n"
+ "Domain = %s\n"
+ "Password = %s\n"
+ "FetchOnlyUnread = Yes\n"
+ "Folder = %s\n"
+ "Processor = cat >> '%s'\n"
+ "MarkRead = No\n",
+ username,
+ domain,
+ MN_AUTHENTICATED_MAILBOX(self)->runtime_password,
+ MN_WEBMAIL_MAILBOX(self)->folder,
+ spool_file);
+
+ g_free(username);
+ g_free(domain);
+
+ if (eel_gconf_get_boolean(MN_CONF_SYSTEM_HTTP_PROXY_USE_HTTP_PROXY))
+ {
+ char *host;
+
+ host = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_HOST);
+ if (host && *host)
+ {
+ g_string_append_printf(contents, "Proxy = %s:%i\n", host, eel_gconf_get_integer(MN_CONF_SYSTEM_HTTP_PROXY_PORT));
+
+ if (eel_gconf_get_boolean(MN_CONF_SYSTEM_HTTP_PROXY_USE_AUTHENTICATION))
+ {
+ char *user;
+ char *password;
+
+ user = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_USER);
+ password = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_PASSWORD);
+
+ if (user && *user && password && *password)
+ g_string_append_printf(contents, "ProxyAuth = %s:%s\n", user, password);
+
+ g_free(user);
+ g_free(password);
+ }
+ }
+ g_free(host);
+ }
+
+ mn_webmail_mailbox_display_config(MN_WEBMAIL_MAILBOX(self), contents->str);
+ filename = mn_webmail_mailbox_write_temporary_file(contents->str, err);
+
+ g_string_free(contents, TRUE);
+
+ return filename;
+ }
+
+ override (MN:Webmail:Mailbox) char *
+ get_error_message (MNWebmailMailbox *mailbox,
+ const char *helper_stdout,
+ const char *helper_stderr,
+ gboolean *is_auth_failure)
+ {
+ if (helper_stderr && mn_ascii_strcasestr(helper_stderr, "error logging in"))
+ {
+ *is_auth_failure = TRUE;
+ return g_strdup(_("authentication failed"));
+ }
+ return NULL;
+ }
+
+ private gboolean
+ run_getlive (self, const char *config_file (check null), GError **err)
+ {
+ char *command;
+ gboolean status;
+
+ command = g_strdup_printf("GetLive --config-file %s", config_file);
+ status = mn_webmail_mailbox_run_helper(MN_WEBMAIL_MAILBOX(self), "GetLive", command, err);
+ g_free(command);
+
+ return status;
+ }
+
+ override (MN:Webmail:Mailbox) gboolean
+ webmail_check (MNWebmailMailbox *mailbox, GError **err)
+ {
+ Self *self = SELF(mailbox);
+ char *spool_file;
+ char *config_file = NULL;
+ gboolean status = FALSE;
+
+ /*
+ * We create an empty spool file beforehand to make sure it is not
+ * world-readable.
+ */
+ spool_file = mn_webmail_mailbox_create_spool_file(err);
+ if (! spool_file)
+ return FALSE;
+
+ config_file = self_create_config_file(self, spool_file, err);
+ if (! config_file)
+ goto end;
+
+ if (! self_run_getlive(self, config_file, err))
+ goto end;
+
+ if (! mn_webmail_mailbox_read_spool_file(mailbox, spool_file, err))
+ goto end;
+
+ status = TRUE;
+
+ end:
+ unlink(spool_file);
+ g_free(spool_file);
+
+ if (config_file)
+ {
+ unlink(config_file);
+ g_free(config_file);
+ }
+
+ return status;
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-hotmail-mailbox.gob.stamp
diff --git a/src/mn-hotmail-mailbox.h b/src/mn-hotmail-mailbox.h
@@ -0,0 +1,57 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include "mn-webmail-mailbox.h"
+
+#ifndef __MN_HOTMAIL_MAILBOX_H__
+#define __MN_HOTMAIL_MAILBOX_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_HOTMAIL_MAILBOX (mn_hotmail_mailbox_get_type())
+#define MN_HOTMAIL_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_hotmail_mailbox_get_type(), MNHotmailMailbox)
+#define MN_HOTMAIL_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_hotmail_mailbox_get_type(), MNHotmailMailbox const)
+#define MN_HOTMAIL_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_hotmail_mailbox_get_type(), MNHotmailMailboxClass)
+#define MN_IS_HOTMAIL_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_hotmail_mailbox_get_type ())
+
+#define MN_HOTMAIL_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_hotmail_mailbox_get_type(), MNHotmailMailboxClass)
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_HOTMAIL_MAILBOX__
+#define __TYPEDEF_MN_HOTMAIL_MAILBOX__
+typedef struct _MNHotmailMailbox MNHotmailMailbox;
+#endif
+struct _MNHotmailMailbox {
+ MNWebmailMailbox __parent__;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNHotmailMailboxClass MNHotmailMailboxClass;
+struct _MNHotmailMailboxClass {
+ MNWebmailMailboxClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_hotmail_mailbox_get_type (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-imap-mailbox-private.h b/src/mn-imap-mailbox-private.h
@@ -16,13 +16,11 @@ extern "C" {
#line 18 "mn-imap-mailbox-private.h"
struct _MNIMAPMailboxPrivate {
-#line 153 "mn-imap-mailbox.gob"
- int removed;
-#line 156 "mn-imap-mailbox.gob"
+#line 151 "mn-imap-mailbox.gob"
GMutex * mutex;
-#line 158 "mn-imap-mailbox.gob"
+#line 153 "mn-imap-mailbox.gob"
MNClientSessionPrivate * idle_session;
-#line 26 "mn-imap-mailbox-private.h"
+#line 24 "mn-imap-mailbox-private.h"
};
#ifdef __cplusplus
diff --git a/src/mn-imap-mailbox-properties.c b/src/mn-imap-mailbox-properties.c
@@ -123,7 +123,7 @@ ___finalize(GObject *obj_self)
}
#undef __GOB_FUNCTION__
-#line 99 "mn-imap-mailbox-properties.gob"
+#line 93 "mn-imap-mailbox-properties.gob"
static void
mn_imap_mailbox_properties_class_init (MNIMAPMailboxPropertiesClass * class G_GNUC_UNUSED)
#line 130 "mn-imap-mailbox-properties.c"
@@ -136,9 +136,9 @@ mn_imap_mailbox_properties_class_init (MNIMAPMailboxPropertiesClass * class G_GN
parent_class = g_type_class_ref (MN_TYPE_PI_MAILBOX_PROPERTIES);
-#line 190 "mn-imap-mailbox-properties.gob"
+#line 184 "mn-imap-mailbox-properties.gob"
mn_mailbox_properties_class->set_mailbox = ___5_mn_imap_mailbox_properties_set_mailbox;
-#line 209 "mn-imap-mailbox-properties.gob"
+#line 203 "mn-imap-mailbox-properties.gob"
mn_mailbox_properties_class->get_mailbox = ___6_mn_imap_mailbox_properties_get_mailbox;
#line 144 "mn-imap-mailbox-properties.c"
g_object_class->finalize = ___finalize;
@@ -152,7 +152,7 @@ mn_imap_mailbox_properties_class_init (MNIMAPMailboxPropertiesClass * class G_GN
"default_name");
}
{
-#line 100 "mn-imap-mailbox-properties.gob"
+#line 94 "mn-imap-mailbox-properties.gob"
MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
@@ -163,7 +163,7 @@ mn_imap_mailbox_properties_class_init (MNIMAPMailboxPropertiesClass * class G_GN
}
}
#undef __GOB_FUNCTION__
-#line 107 "mn-imap-mailbox-properties.gob"
+#line 101 "mn-imap-mailbox-properties.gob"
static void
mn_imap_mailbox_properties_init (MNIMAPMailboxProperties * self G_GNUC_UNUSED)
#line 170 "mn-imap-mailbox-properties.c"
@@ -171,7 +171,7 @@ mn_imap_mailbox_properties_init (MNIMAPMailboxProperties * self G_GNUC_UNUSED)
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox:Properties::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_IMAP_MAILBOX_PROPERTIES,MNIMAPMailboxPropertiesPrivate);
{
-#line 108 "mn-imap-mailbox-properties.gob"
+#line 102 "mn-imap-mailbox-properties.gob"
MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self);
MNPIMailboxProperties *pi = MN_PI_MAILBOX_PROPERTIES(self);
@@ -185,12 +185,12 @@ mn_imap_mailbox_properties_init (MNIMAPMailboxProperties * self G_GNUC_UNUSED)
folder_vbox = mn_mailbox_properties_add_general_section(properties, _("IMAP Mailbox"));
selfp->inbox_radio = gtk_radio_button_new_with_mnemonic(NULL, _("In_box"));
- gtk_size_group_add_widget(MN_MAILBOX_PROPERTIES(self)->label_size_group, selfp->inbox_radio);
+ gtk_size_group_add_widget(properties->label_size_group, selfp->inbox_radio);
gtk_box_pack_start(GTK_BOX(folder_vbox), selfp->inbox_radio, FALSE, FALSE, 0);
selfp->other_radio = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(selfp->inbox_radio), _("_Other:"));
- gtk_size_group_add_widget(MN_MAILBOX_PROPERTIES(self)->label_size_group, selfp->other_radio);
+ gtk_size_group_add_widget(properties->label_size_group, selfp->other_radio);
selfp->mailbox_entry = gtk_entry_new();
gtk_widget_set_sensitive(selfp->mailbox_entry, FALSE);
@@ -206,7 +206,7 @@ mn_imap_mailbox_properties_init (MNIMAPMailboxProperties * self G_GNUC_UNUSED)
gtk_box_pack_start(GTK_BOX(pi->connection_page), idle_section, FALSE, FALSE, 0);
gtk_widget_show(idle_section);
- self_add_idle_usage(self, GTK_BOX(idle_vbox), MN_IMAP_MAILBOX_USE_IDLE_NEVER, _("_Never"));
+ self_add_idle_usage(self, GTK_BOX(idle_vbox), MN_IMAP_MAILBOX_USE_IDLE_NEVER, Q_("IMAP connection tab|_Never"));
self_add_idle_usage(self, GTK_BOX(idle_vbox), MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT, _("A_utodetect"));
self_add_idle_usage(self, GTK_BOX(idle_vbox), MN_IMAP_MAILBOX_USE_IDLE_ALWAYS, _("Al_ways"));
@@ -249,35 +249,29 @@ ___object_get_property (GObject *object,
{
#line 51 "mn-imap-mailbox-properties.gob"
- MNPIMailboxProperties *pi = MN_PI_MAILBOX_PROPERTIES(self);
gboolean complete;
- const char *server;
- gboolean other_active;
- const char *mailbox;
- mn_pi_mailbox_properties_get_contents(pi,
- NULL,
- NULL,
- &server,
- NULL);
+ complete = mn_pi_mailbox_properties_is_complete(MN_PI_MAILBOX_PROPERTIES(self));
+ if (complete)
+ {
+ gboolean other_active;
+ const char *mailbox;
- other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
- mailbox = gtk_entry_get_text(GTK_ENTRY(selfp->mailbox_entry));
+ other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
+ mailbox = gtk_entry_get_text(GTK_ENTRY(selfp->mailbox_entry));
- complete = *server && (! other_active || *mailbox);
-#if ! WITH_SSL
- if (complete)
- complete = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pi->conn_radio[MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL]));
-#endif /* WITH_SSL */
+ if (other_active && ! *mailbox)
+ complete = FALSE;
+ }
g_value_set_boolean(VAL, complete);
-#line 276 "mn-imap-mailbox-properties.c"
+#line 270 "mn-imap-mailbox-properties.c"
}
break;
case PROP_DEFAULT_NAME:
{
-#line 78 "mn-imap-mailbox-properties.gob"
+#line 72 "mn-imap-mailbox-properties.gob"
const char *username;
const char *server;
@@ -298,7 +292,7 @@ ___object_get_property (GObject *object,
g_value_take_string(VAL, mn_imap_mailbox_build_name(username, server, other_active ? mailbox : NULL));
-#line 302 "mn-imap-mailbox-properties.c"
+#line 296 "mn-imap-mailbox-properties.c"
}
break;
default:
@@ -315,23 +309,23 @@ ___object_get_property (GObject *object,
-#line 165 "mn-imap-mailbox-properties.gob"
+#line 159 "mn-imap-mailbox-properties.gob"
static void
mn_imap_mailbox_properties_add_idle_usage (MNIMAPMailboxProperties * self, GtkBox * idle_vbox, MNIMAPMailboxUseIDLE usage, const char * mnemonic)
-#line 322 "mn-imap-mailbox-properties.c"
+#line 316 "mn-imap-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox:Properties::add_idle_usage"
-#line 165 "mn-imap-mailbox-properties.gob"
+#line 159 "mn-imap-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 165 "mn-imap-mailbox-properties.gob"
+#line 159 "mn-imap-mailbox-properties.gob"
g_return_if_fail (MN_IS_IMAP_MAILBOX_PROPERTIES (self));
-#line 165 "mn-imap-mailbox-properties.gob"
+#line 159 "mn-imap-mailbox-properties.gob"
g_return_if_fail (idle_vbox != NULL);
-#line 165 "mn-imap-mailbox-properties.gob"
+#line 159 "mn-imap-mailbox-properties.gob"
g_return_if_fail (mnemonic != NULL);
-#line 333 "mn-imap-mailbox-properties.c"
+#line 327 "mn-imap-mailbox-properties.c"
{
-#line 170 "mn-imap-mailbox-properties.gob"
+#line 164 "mn-imap-mailbox-properties.gob"
selfp->use_idle_radio[usage] = usage == 0
? gtk_radio_button_new_with_mnemonic(NULL, mnemonic)
@@ -340,17 +334,17 @@ mn_imap_mailbox_properties_add_idle_usage (MNIMAPMailboxProperties * self, GtkBo
gtk_box_pack_start(idle_vbox, selfp->use_idle_radio[usage], TRUE, TRUE, 0);
gtk_widget_show(selfp->use_idle_radio[usage]);
}}
-#line 344 "mn-imap-mailbox-properties.c"
+#line 338 "mn-imap-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 179 "mn-imap-mailbox-properties.gob"
+#line 173 "mn-imap-mailbox-properties.gob"
static void
mn_imap_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data)
-#line 350 "mn-imap-mailbox-properties.c"
+#line 344 "mn-imap-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox:Properties::radio_toggled_h"
{
-#line 181 "mn-imap-mailbox-properties.gob"
+#line 175 "mn-imap-mailbox-properties.gob"
Self *self = user_data;
@@ -359,20 +353,20 @@ mn_imap_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpoi
g_object_notify(G_OBJECT(self), "complete");
g_object_notify(G_OBJECT(self), "default-name");
}}
-#line 363 "mn-imap-mailbox-properties.c"
+#line 357 "mn-imap-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 190 "mn-imap-mailbox-properties.gob"
+#line 184 "mn-imap-mailbox-properties.gob"
static void
___5_mn_imap_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox)
-#line 369 "mn-imap-mailbox-properties.c"
+#line 363 "mn-imap-mailbox-properties.c"
#define PARENT_HANDLER(___properties,___mailbox) \
{ if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox) \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox)(___properties,___mailbox); }
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox:Properties::set_mailbox"
{
-#line 192 "mn-imap-mailbox-properties.gob"
+#line 186 "mn-imap-mailbox-properties.gob"
Self *self = SELF(properties);
MNIMAPMailbox *imap_mailbox = MN_IMAP_MAILBOX(mailbox);
@@ -389,14 +383,14 @@ ___5_mn_imap_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->use_idle_radio[imap_mailbox->use_idle_extension]), TRUE);
}}
-#line 393 "mn-imap-mailbox-properties.c"
+#line 387 "mn-imap-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 209 "mn-imap-mailbox-properties.gob"
+#line 203 "mn-imap-mailbox-properties.gob"
static MNMailbox *
___6_mn_imap_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 400 "mn-imap-mailbox-properties.c"
+#line 394 "mn-imap-mailbox-properties.c"
#define PARENT_HANDLER(___properties) \
((MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)? \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)(___properties): \
@@ -404,7 +398,7 @@ ___6_mn_imap_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox:Properties::get_mailbox"
{
-#line 211 "mn-imap-mailbox-properties.gob"
+#line 205 "mn-imap-mailbox-properties.gob"
Self *self = SELF(properties);
MNIMAPMailboxUseIDLE use_idle;
@@ -423,6 +417,6 @@ ___6_mn_imap_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_
return mailbox;
}}
-#line 427 "mn-imap-mailbox-properties.c"
+#line 421 "mn-imap-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
diff --git a/src/mn-imap-mailbox-properties.gob b/src/mn-imap-mailbox-properties.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -49,26 +49,20 @@ class MN:IMAP:Mailbox:Properties from MN:PI:Mailbox:Properties
property BOOLEAN complete (override)
get
{
- MNPIMailboxProperties *pi = MN_PI_MAILBOX_PROPERTIES(self);
gboolean complete;
- const char *server;
- gboolean other_active;
- const char *mailbox;
- mn_pi_mailbox_properties_get_contents(pi,
- NULL,
- NULL,
- &server,
- NULL);
+ complete = mn_pi_mailbox_properties_is_complete(MN_PI_MAILBOX_PROPERTIES(self));
+ if (complete)
+ {
+ gboolean other_active;
+ const char *mailbox;
- other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
- mailbox = gtk_entry_get_text(GTK_ENTRY(selfp->mailbox_entry));
+ other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
+ mailbox = gtk_entry_get_text(GTK_ENTRY(selfp->mailbox_entry));
- complete = *server && (! other_active || *mailbox);
-#if ! WITH_SSL
- if (complete)
- complete = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pi->conn_radio[MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL]));
-#endif /* WITH_SSL */
+ if (other_active && ! *mailbox)
+ complete = FALSE;
+ }
g_value_set_boolean(VAL, complete);
};
@@ -118,12 +112,12 @@ class MN:IMAP:Mailbox:Properties from MN:PI:Mailbox:Properties
folder_vbox = mn_mailbox_properties_add_general_section(properties, _("IMAP Mailbox"));
selfp->inbox_radio = gtk_radio_button_new_with_mnemonic(NULL, _("In_box"));
- gtk_size_group_add_widget(MN_MAILBOX_PROPERTIES(self)->label_size_group, selfp->inbox_radio);
+ gtk_size_group_add_widget(properties->label_size_group, selfp->inbox_radio);
gtk_box_pack_start(GTK_BOX(folder_vbox), selfp->inbox_radio, FALSE, FALSE, 0);
selfp->other_radio = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(selfp->inbox_radio), _("_Other:"));
- gtk_size_group_add_widget(MN_MAILBOX_PROPERTIES(self)->label_size_group, selfp->other_radio);
+ gtk_size_group_add_widget(properties->label_size_group, selfp->other_radio);
selfp->mailbox_entry = gtk_entry_new();
gtk_widget_set_sensitive(selfp->mailbox_entry, FALSE);
@@ -139,7 +133,7 @@ class MN:IMAP:Mailbox:Properties from MN:PI:Mailbox:Properties
gtk_box_pack_start(GTK_BOX(pi->connection_page), idle_section, FALSE, FALSE, 0);
gtk_widget_show(idle_section);
- self_add_idle_usage(self, GTK_BOX(idle_vbox), MN_IMAP_MAILBOX_USE_IDLE_NEVER, _("_Never"));
+ self_add_idle_usage(self, GTK_BOX(idle_vbox), MN_IMAP_MAILBOX_USE_IDLE_NEVER, Q_("IMAP connection tab|_Never"));
self_add_idle_usage(self, GTK_BOX(idle_vbox), MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT, _("A_utodetect"));
self_add_idle_usage(self, GTK_BOX(idle_vbox), MN_IMAP_MAILBOX_USE_IDLE_ALWAYS, _("Al_ways"));
diff --git a/src/mn-imap-mailbox.c b/src/mn-imap-mailbox.c
@@ -43,8 +43,6 @@
#define IS_BAD(response) IS(response, "BAD")
#define IS_BYE(response) IS(response, "BYE")
-#define REMOVED(self) (g_atomic_int_get(&(self)->_priv->removed))
-
enum
{
STATE_GREETING = MN_CLIENT_SESSION_INITIAL_STATE,
@@ -120,7 +118,7 @@ int mn_imap_mailbox_default_ports[MN_PI_MAILBOX_N_CONNECTION_TYPES] = { 143, 143
/* variable taken from Evolution (camel-utf8.c) */
static char *utf7_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,";
-#line 124 "mn-imap-mailbox.c"
+#line 122 "mn-imap-mailbox.c"
static const GEnumValue _mn_imap_mailbox_use_idle_values[] = {
{ MN_IMAP_MAILBOX_USE_IDLE_NEVER, (char *)"MN_IMAP_MAILBOX_USE_IDLE_NEVER", (char *)"never" },
{ MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT, (char *)"MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT", (char *)"autodetect" },
@@ -201,6 +199,8 @@ static int mn_imap_mailbox_session_handle_search (MNClientSession * session, MNC
static char * mn_imap_mailbox_quote (const char * str) G_GNUC_UNUSED;
static char * mn_imap_mailbox_utf8_to_imap_utf7 (const char * str) G_GNUC_UNUSED;
static void mn_imap_mailbox_imap_utf7_closeb64 (GString * out, guint32 v, guint32 i) G_GNUC_UNUSED;
+static void mn_imap_mailbox_lock (MNIMAPMailbox * self) G_GNUC_UNUSED;
+static void mn_imap_mailbox_unlock (MNIMAPMailbox * self) G_GNUC_UNUSED;
enum {
PROP_0,
@@ -255,6 +255,8 @@ static MNPIMailboxClass *parent_class = NULL;
#define self_utf8_to_imap_utf7 mn_imap_mailbox_utf8_to_imap_utf7
#define self_imap_utf7_closeb64 mn_imap_mailbox_imap_utf7_closeb64
#define self_build_name mn_imap_mailbox_build_name
+#define self_lock mn_imap_mailbox_lock
+#define self_unlock mn_imap_mailbox_unlock
GType
mn_imap_mailbox_get_type (void)
{
@@ -306,19 +308,19 @@ ___finalize(GObject *obj_self)
gpointer priv G_GNUC_UNUSED = self->_priv;
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 156 "mn-imap-mailbox.gob"
+#line 151 "mn-imap-mailbox.gob"
if(self->_priv->mutex) { g_mutex_free ((gpointer) self->_priv->mutex); self->_priv->mutex = NULL; }
-#line 312 "mn-imap-mailbox.c"
-#line 160 "mn-imap-mailbox.gob"
+#line 314 "mn-imap-mailbox.c"
+#line 155 "mn-imap-mailbox.gob"
if(self->mailbox) { g_free ((gpointer) self->mailbox); self->mailbox = NULL; }
-#line 315 "mn-imap-mailbox.c"
+#line 317 "mn-imap-mailbox.c"
}
#undef __GOB_FUNCTION__
-#line 175 "mn-imap-mailbox.gob"
+#line 170 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_class_init (MNIMAPMailboxClass * class G_GNUC_UNUSED)
-#line 322 "mn-imap-mailbox.c"
+#line 324 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -329,15 +331,15 @@ mn_imap_mailbox_class_init (MNIMAPMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_PI_MAILBOX);
-#line 186 "mn-imap-mailbox.gob"
+#line 181 "mn-imap-mailbox.gob"
mn_mailbox_class->seal = ___3_mn_imap_mailbox_seal;
-#line 206 "mn-imap-mailbox.gob"
+#line 210 "mn-imap-mailbox.gob"
mn_mailbox_class->parse_uri = ___4_mn_imap_mailbox_parse_uri;
#line 307 "mn-imap-mailbox.gob"
mn_mailbox_class->removed = ___6_mn_imap_mailbox_removed;
-#line 999 "mn-imap-mailbox.gob"
+#line 993 "mn-imap-mailbox.gob"
mn_authenticated_mailbox_class->authenticated_check = ___1d_mn_imap_mailbox_authenticated_check;
-#line 341 "mn-imap-mailbox.c"
+#line 343 "mn-imap-mailbox.c"
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
g_object_class->set_property = ___object_set_property;
@@ -349,7 +351,7 @@ mn_imap_mailbox_class_init (MNIMAPMailboxClass * class G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
"INBOX" /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_IGNORE_CASE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_PERMANENT | G_PARAM_CONSTRUCT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_IGNORE_CASE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE | G_PARAM_CONSTRUCT));
g_object_class_install_property (g_object_class,
PROP_MAILBOX,
param_spec);
@@ -359,37 +361,37 @@ mn_imap_mailbox_class_init (MNIMAPMailboxClass * class G_GNUC_UNUSED)
NULL /* blurb */,
MN_TYPE_IMAP_MAILBOX_USE_IDLE /* enum_type */,
MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT | G_PARAM_CONSTRUCT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE | G_PARAM_CONSTRUCT));
g_object_class_install_property (g_object_class,
PROP_USE_IDLE_EXTENSION,
param_spec);
}
{
-#line 176 "mn-imap-mailbox.gob"
+#line 171 "mn-imap-mailbox.gob"
MN_MAILBOX_CLASS(class)->type = "imap";
MN_PI_MAILBOX_CLASS(class)->default_ports = mn_imap_mailbox_default_ports;
-#line 374 "mn-imap-mailbox.c"
+#line 376 "mn-imap-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 181 "mn-imap-mailbox.gob"
+#line 176 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_init (MNIMAPMailbox * self G_GNUC_UNUSED)
-#line 381 "mn-imap-mailbox.c"
+#line 383 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_IMAP_MAILBOX,MNIMAPMailboxPrivate);
-#line 156 "mn-imap-mailbox.gob"
+#line 151 "mn-imap-mailbox.gob"
self->_priv->mutex = g_mutex_new();
-#line 387 "mn-imap-mailbox.c"
+#line 389 "mn-imap-mailbox.c"
{
-#line 182 "mn-imap-mailbox.gob"
+#line 177 "mn-imap-mailbox.gob"
mn_mailbox_set_format(MN_MAILBOX(self), "IMAP");
-#line 393 "mn-imap-mailbox.c"
+#line 395 "mn-imap-mailbox.c"
}
}
#undef __GOB_FUNCTION__
@@ -408,16 +410,16 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_MAILBOX:
{
-#line 161 "mn-imap-mailbox.gob"
+#line 156 "mn-imap-mailbox.gob"
{ char *old = self->mailbox; self->mailbox = g_value_dup_string (VAL); g_free (old); }
-#line 414 "mn-imap-mailbox.c"
+#line 416 "mn-imap-mailbox.c"
}
break;
case PROP_USE_IDLE_EXTENSION:
{
-#line 169 "mn-imap-mailbox.gob"
+#line 164 "mn-imap-mailbox.gob"
self->use_idle_extension = g_value_get_enum (VAL);
-#line 421 "mn-imap-mailbox.c"
+#line 423 "mn-imap-mailbox.c"
}
break;
default:
@@ -446,16 +448,16 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_MAILBOX:
{
-#line 161 "mn-imap-mailbox.gob"
+#line 156 "mn-imap-mailbox.gob"
g_value_set_string (VAL, self->mailbox);
-#line 452 "mn-imap-mailbox.c"
+#line 454 "mn-imap-mailbox.c"
}
break;
case PROP_USE_IDLE_EXTENSION:
{
-#line 169 "mn-imap-mailbox.gob"
+#line 164 "mn-imap-mailbox.gob"
g_value_set_enum (VAL, self->use_idle_extension);
-#line 459 "mn-imap-mailbox.c"
+#line 461 "mn-imap-mailbox.c"
}
break;
default:
@@ -472,18 +474,19 @@ g_value_set_enum (VAL, self->use_idle_extension);
-#line 186 "mn-imap-mailbox.gob"
+#line 181 "mn-imap-mailbox.gob"
static void
___3_mn_imap_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 479 "mn-imap-mailbox.c"
+#line 481 "mn-imap-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->seal) \
(* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::seal"
{
-#line 188 "mn-imap-mailbox.gob"
+#line 183 "mn-imap-mailbox.gob"
+ MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
Self *self = SELF(mailbox);
PARENT_HANDLER(mailbox);
@@ -492,15 +495,22 @@ ___3_mn_imap_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
mailbox->runtime_name = self_build_name(MN_AUTHENTICATED_MAILBOX(mailbox)->username,
MN_PI_MAILBOX(mailbox)->hostname,
self->mailbox);
+
+#if WITH_SSL
+ if (MN_PI_MAILBOX(self)->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL)
+ auth_mailbox->keyring_protocol = g_strdup("imaps");
+ else
+#endif
+ auth_mailbox->keyring_protocol = g_strdup("imap");
}}
-#line 497 "mn-imap-mailbox.c"
+#line 507 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 206 "mn-imap-mailbox.gob"
+#line 210 "mn-imap-mailbox.gob"
static MNMailbox *
___4_mn_imap_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * uri)
-#line 504 "mn-imap-mailbox.c"
+#line 514 "mn-imap-mailbox.c"
#define PARENT_HANDLER(___dummy,___uri) \
((MN_MAILBOX_CLASS(parent_class)->parse_uri)? \
(* MN_MAILBOX_CLASS(parent_class)->parse_uri)(___dummy,___uri): \
@@ -508,7 +518,7 @@ ___4_mn_imap_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * ur
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::parse_uri"
{
-#line 208 "mn-imap-mailbox.gob"
+#line 212 "mn-imap-mailbox.gob"
int len;
int buflen;
@@ -531,12 +541,10 @@ ___4_mn_imap_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * ur
char username_buf[buflen];
char authmech_buf[buflen];
char hostname_buf[buflen];
- gboolean has_auth;
gboolean has_path;
- gboolean has_username = FALSE;
gboolean has_authmech = FALSE;
- if (! mn_pi_mailbox_split_uri(uri, len, scheme_buf, auth_buf, location_buf, &has_auth))
+ if (! mn_pi_mailbox_split_uri(uri, len, scheme_buf, auth_buf, location_buf))
return NULL;
if (strcmp(scheme_buf, "imap"))
@@ -545,19 +553,15 @@ ___4_mn_imap_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * ur
if (! self_split_uri_location(location_buf, len, hostport_buf, path_buf, &has_path))
return NULL;
- if (has_auth)
- {
- if (! mn_pi_mailbox_split_uri_auth(auth_buf, len, username_buf, authmech_buf, &has_username, &has_authmech))
- return NULL;
+ if (! mn_pi_mailbox_split_uri_auth(auth_buf, len, username_buf, authmech_buf, &has_authmech))
+ return NULL;
- if (has_authmech && ! strcmp(authmech_buf, "*"))
- has_authmech = FALSE;
- }
+ if (has_authmech && ! strcmp(authmech_buf, "*"))
+ has_authmech = FALSE;
mn_pi_mailbox_split_uri_hostport(hostport_buf, len, hostname_buf, &port);
- if (has_username)
- username = gnome_vfs_unescape_string(username_buf, NULL);
+ username = gnome_vfs_unescape_string(username_buf, NULL);
if (has_authmech)
authmech = gnome_vfs_unescape_string(authmech_buf, NULL);
hostname = gnome_vfs_unescape_string(hostname_buf, NULL);
@@ -570,9 +574,11 @@ ___4_mn_imap_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * ur
"authmech", authmech,
"hostname", hostname,
"port", port,
- "mailbox", path,
NULL);
+ if (path)
+ g_object_set(mailbox, MN_IMAP_MAILBOX_PROP_MAILBOX(path), NULL);
+
g_free(username);
g_free(authmech);
g_free(hostname);
@@ -580,14 +586,14 @@ ___4_mn_imap_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * ur
return mailbox;
}}
-#line 584 "mn-imap-mailbox.c"
+#line 590 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
#line 280 "mn-imap-mailbox.gob"
static gboolean
mn_imap_mailbox_split_uri_location (const char * location, int maxlen, char * hostport, char * path, gboolean * has_path)
-#line 591 "mn-imap-mailbox.c"
+#line 597 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::split_uri_location"
#line 280 "mn-imap-mailbox.gob"
@@ -598,7 +604,7 @@ mn_imap_mailbox_split_uri_location (const char * location, int maxlen, char * ho
g_return_val_if_fail (path != NULL, (gboolean )0);
#line 280 "mn-imap-mailbox.gob"
g_return_val_if_fail (has_path != NULL, (gboolean )0);
-#line 602 "mn-imap-mailbox.c"
+#line 608 "mn-imap-mailbox.c"
{
#line 286 "mn-imap-mailbox.gob"
@@ -621,13 +627,13 @@ mn_imap_mailbox_split_uri_location (const char * location, int maxlen, char * ho
return TRUE;
}}
-#line 625 "mn-imap-mailbox.c"
+#line 631 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
#line 307 "mn-imap-mailbox.gob"
static void
___6_mn_imap_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 631 "mn-imap-mailbox.c"
+#line 637 "mn-imap-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->removed) \
(* MN_MAILBOX_CLASS(parent_class)->removed)(___mailbox); }
@@ -638,34 +644,28 @@ ___6_mn_imap_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
Self *self = SELF(mailbox);
- /*
- * We do not use g_atomic_int_set() yet because it was only added
- * in GLib 2.10.
- */
- g_atomic_int_inc(&selfp->removed);
+ PARENT_HANDLER(mailbox);
- g_mutex_lock(selfp->mutex);
+ self_lock(self);
if (selfp->idle_session)
{
mn_client_session_write(selfp->idle_session->session, "DONE");
selfp->idle_session->idle_state = IDLE_STATE_POST_IDLE;
}
- g_mutex_unlock(selfp->mutex);
-
- PARENT_HANDLER(mailbox);
+ self_unlock(self);
}}
#line 658 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 329 "mn-imap-mailbox.gob"
+#line 323 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
#line 665 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_greeting_cb"
{
-#line 333 "mn-imap-mailbox.gob"
+#line 327 "mn-imap-mailbox.gob"
priv->session = session;
@@ -694,28 +694,28 @@ mn_imap_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionRe
#line 695 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 359 "mn-imap-mailbox.gob"
+#line 353 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_capability_cb (MNClientSession * session, MNClientSessionPrivate * priv)
#line 701 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_capability_cb"
{
-#line 362 "mn-imap-mailbox.gob"
+#line 356 "mn-imap-mailbox.gob"
return self_session_write(priv, "CAPABILITY");
}}
#line 709 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 366 "mn-imap-mailbox.gob"
+#line 360 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_capability_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
#line 715 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_capability_cb"
{
-#line 370 "mn-imap-mailbox.gob"
+#line 364 "mn-imap-mailbox.gob"
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
@@ -749,14 +749,14 @@ mn_imap_mailbox_handle_capability_cb (MNClientSession * session, MNClientSession
#line 750 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 401 "mn-imap-mailbox.gob"
+#line 395 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_starttls_cb (MNClientSession * session, MNClientSessionPrivate * priv)
#line 756 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_starttls_cb"
{
-#line 404 "mn-imap-mailbox.gob"
+#line 398 "mn-imap-mailbox.gob"
#if WITH_SSL
return self_session_write(priv, "STARTTLS");
@@ -768,14 +768,14 @@ mn_imap_mailbox_enter_starttls_cb (MNClientSession * session, MNClientSessionPri
#line 769 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 413 "mn-imap-mailbox.gob"
+#line 407 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_starttls_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
#line 775 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_starttls_cb"
{
-#line 417 "mn-imap-mailbox.gob"
+#line 411 "mn-imap-mailbox.gob"
#if WITH_SSL
if (response->continuation)
@@ -810,14 +810,14 @@ mn_imap_mailbox_handle_starttls_cb (MNClientSession * session, MNClientSessionRe
#line 811 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 449 "mn-imap-mailbox.gob"
+#line 443 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_authenticate_cb (MNClientSession * session, MNClientSessionPrivate * priv)
#line 817 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_authenticate_cb"
{
-#line 452 "mn-imap-mailbox.gob"
+#line 446 "mn-imap-mailbox.gob"
#if WITH_SASL
priv->sasl_mechanism = NULL;
@@ -834,7 +834,7 @@ mn_imap_mailbox_enter_authenticate_cb (MNClientSession * session, MNClientSessio
return self_session_write(priv, "AUTHENTICATE %s", priv->sasl_mechanism);
}
else
- return priv->pi_mailbox->auth_cancelled
+ return priv->auth_mailbox->auth_cancelled
? STATE_LOGOUT
: self_session_authenticate_fallback(priv, FALSE);
@@ -850,14 +850,14 @@ mn_imap_mailbox_enter_authenticate_cb (MNClientSession * session, MNClientSessio
#line 851 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 482 "mn-imap-mailbox.gob"
+#line 476 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_authenticate_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
#line 857 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_authenticate_cb"
{
-#line 486 "mn-imap-mailbox.gob"
+#line 480 "mn-imap-mailbox.gob"
#if WITH_SASL
if (response->tag)
@@ -896,7 +896,7 @@ mn_imap_mailbox_handle_authenticate_cb (MNClientSession * session, MNClientSessi
}
else if (IS_NO(response) || IS_BAD(response))
{
- return priv->pi_mailbox->auth_cancelled
+ return priv->auth_mailbox->auth_cancelled
? STATE_LOGOUT
: self_session_authenticate_fallback(priv, FALSE);
}
@@ -916,14 +916,14 @@ mn_imap_mailbox_handle_authenticate_cb (MNClientSession * session, MNClientSessi
#line 917 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 542 "mn-imap-mailbox.gob"
+#line 536 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_login_cb (MNClientSession * session, MNClientSessionPrivate * priv)
#line 923 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_login_cb"
{
-#line 545 "mn-imap-mailbox.gob"
+#line 539 "mn-imap-mailbox.gob"
if (self_session_has_capability(priv, "LOGINDISABLED"))
{
@@ -937,11 +937,11 @@ mn_imap_mailbox_enter_login_cb (MNClientSession * session, MNClientSessionPrivat
char *quoted_password;
int result;
- if (! mn_pi_mailbox_fill_credentials(priv->pi_mailbox, TRUE, TRUE))
+ if (! mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
return STATE_LOGOUT;
- quoted_username = self_quote(priv->pi_mailbox->runtime_username);
- quoted_password = self_quote(priv->pi_mailbox->runtime_password);
+ quoted_username = self_quote(priv->auth_mailbox->username);
+ quoted_password = self_quote(priv->auth_mailbox->runtime_password);
result = self_session_write(priv, "LOGIN %s %s", quoted_username, quoted_password);
g_free(quoted_username);
g_free(quoted_password);
@@ -952,14 +952,14 @@ mn_imap_mailbox_enter_login_cb (MNClientSession * session, MNClientSessionPrivat
#line 953 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 571 "mn-imap-mailbox.gob"
+#line 565 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_login_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
#line 959 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_login_cb"
{
-#line 575 "mn-imap-mailbox.gob"
+#line 569 "mn-imap-mailbox.gob"
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
@@ -986,14 +986,14 @@ mn_imap_mailbox_handle_login_cb (MNClientSession * session, MNClientSessionRespo
#line 987 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 599 "mn-imap-mailbox.gob"
+#line 593 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_examine_cb (MNClientSession * session, MNClientSessionPrivate * priv)
#line 993 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_examine_cb"
{
-#line 602 "mn-imap-mailbox.gob"
+#line 596 "mn-imap-mailbox.gob"
char *utf7_mailbox;
char *quoted_mailbox;
@@ -1011,14 +1011,14 @@ mn_imap_mailbox_enter_examine_cb (MNClientSession * session, MNClientSessionPriv
#line 1012 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 617 "mn-imap-mailbox.gob"
+#line 611 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_examine_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
#line 1018 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_examine_cb"
{
-#line 621 "mn-imap-mailbox.gob"
+#line 615 "mn-imap-mailbox.gob"
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
@@ -1043,28 +1043,28 @@ mn_imap_mailbox_handle_examine_cb (MNClientSession * session, MNClientSessionRes
#line 1044 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 643 "mn-imap-mailbox.gob"
+#line 637 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_search_unseen_cb (MNClientSession * session, MNClientSessionPrivate * priv)
#line 1050 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_search_unseen_cb"
{
-#line 646 "mn-imap-mailbox.gob"
+#line 640 "mn-imap-mailbox.gob"
return self_session_enter_search(session, priv, "UNSEEN", &priv->unseen_numbers);
}}
#line 1058 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 650 "mn-imap-mailbox.gob"
+#line 644 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_search_unseen_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
#line 1064 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_search_unseen_cb"
{
-#line 654 "mn-imap-mailbox.gob"
+#line 648 "mn-imap-mailbox.gob"
int result = self_session_handle_search(session, response, priv, priv->unseen_numbers);
@@ -1089,28 +1089,28 @@ mn_imap_mailbox_handle_search_unseen_cb (MNClientSession * session, MNClientSess
#line 1090 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 676 "mn-imap-mailbox.gob"
+#line 670 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_search_recent_cb (MNClientSession * session, MNClientSessionPrivate * priv)
#line 1096 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_search_recent_cb"
{
-#line 679 "mn-imap-mailbox.gob"
+#line 673 "mn-imap-mailbox.gob"
return self_session_enter_search(session, priv, "RECENT", &priv->recent_numbers);
}}
#line 1104 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 683 "mn-imap-mailbox.gob"
+#line 677 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_search_recent_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
#line 1110 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_search_recent_cb"
{
-#line 687 "mn-imap-mailbox.gob"
+#line 681 "mn-imap-mailbox.gob"
int result = self_session_handle_search(session, response, priv, priv->recent_numbers);
@@ -1123,14 +1123,14 @@ mn_imap_mailbox_handle_search_recent_cb (MNClientSession * session, MNClientSess
#line 1124 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 697 "mn-imap-mailbox.gob"
+#line 691 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_fetch_cb (MNClientSession * session, MNClientSessionPrivate * priv)
#line 1130 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_fetch_cb"
{
-#line 699 "mn-imap-mailbox.gob"
+#line 693 "mn-imap-mailbox.gob"
GString *string;
int result;
@@ -1155,14 +1155,14 @@ mn_imap_mailbox_enter_fetch_cb (MNClientSession * session, MNClientSessionPrivat
#line 1156 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 721 "mn-imap-mailbox.gob"
+#line 715 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_build_fetch_set_cb (gpointer key, gpointer value, gpointer user_data)
#line 1162 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::build_fetch_set_cb"
{
-#line 723 "mn-imap-mailbox.gob"
+#line 717 "mn-imap-mailbox.gob"
GString *string = user_data;
@@ -1173,14 +1173,14 @@ mn_imap_mailbox_build_fetch_set_cb (gpointer key, gpointer value, gpointer user_
#line 1174 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 731 "mn-imap-mailbox.gob"
+#line 725 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_fetch_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
#line 1180 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_fetch_cb"
{
-#line 735 "mn-imap-mailbox.gob"
+#line 729 "mn-imap-mailbox.gob"
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
@@ -1279,16 +1279,16 @@ mn_imap_mailbox_handle_fetch_cb (MNClientSession * session, MNClientSessionRespo
#line 1280 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 831 "mn-imap-mailbox.gob"
+#line 825 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_idle_cb (MNClientSession * session, MNClientSessionPrivate * priv)
#line 1286 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_idle_cb"
{
-#line 834 "mn-imap-mailbox.gob"
+#line 828 "mn-imap-mailbox.gob"
- if (! REMOVED(priv->self))
+ if (mn_mailbox_get_active(priv->mailbox))
{
if (priv->self->use_idle_extension == MN_IMAP_MAILBOX_USE_IDLE_NEVER)
mn_client_session_notice(session, _("\"Use the IDLE extension\" set to \"never\" in the mailbox properties, logging out"));
@@ -1329,14 +1329,14 @@ mn_imap_mailbox_enter_idle_cb (MNClientSession * session, MNClientSessionPrivate
#line 1330 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 874 "mn-imap-mailbox.gob"
+#line 868 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_idle_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
#line 1336 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_idle_cb"
{
-#line 878 "mn-imap-mailbox.gob"
+#line 872 "mn-imap-mailbox.gob"
switch (priv->idle_state)
{
@@ -1403,7 +1403,7 @@ mn_imap_mailbox_handle_idle_cb (MNClientSession * session, MNClientSessionRespon
{
if (IS_OK(response))
{
- if (REMOVED(priv->self))
+ if (! mn_mailbox_get_active(priv->mailbox))
return STATE_LOGOUT;
else if (priv->idle_inactivity)
return STATE_IDLE; /* anti-inactivity, re-enter */
@@ -1433,28 +1433,28 @@ mn_imap_mailbox_handle_idle_cb (MNClientSession * session, MNClientSessionRespon
#line 1434 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 972 "mn-imap-mailbox.gob"
+#line 966 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_enter_logout_cb (MNClientSession * session, MNClientSessionPrivate * priv)
#line 1440 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::enter_logout_cb"
{
-#line 975 "mn-imap-mailbox.gob"
+#line 969 "mn-imap-mailbox.gob"
return self_session_write(priv, "LOGOUT");
}}
#line 1448 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 979 "mn-imap-mailbox.gob"
+#line 973 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_handle_logout_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
#line 1454 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::handle_logout_cb"
{
-#line 983 "mn-imap-mailbox.gob"
+#line 977 "mn-imap-mailbox.gob"
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
@@ -1473,7 +1473,7 @@ mn_imap_mailbox_handle_logout_cb (MNClientSession * session, MNClientSessionResp
#line 1474 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 999 "mn-imap-mailbox.gob"
+#line 993 "mn-imap-mailbox.gob"
static void
___1d_mn_imap_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_UNUSED)
#line 1480 "mn-imap-mailbox.c"
@@ -1483,7 +1483,7 @@ ___1d_mn_imap_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GN
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::authenticated_check"
{
-#line 1001 "mn-imap-mailbox.gob"
+#line 995 "mn-imap-mailbox.gob"
Self *self = SELF(mailbox);
static const MNClientSessionState states[] = {
@@ -1515,11 +1515,13 @@ ___1d_mn_imap_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GN
#if WITH_SASL
mn_pi_mailbox_sasl_get_credentials_cb,
#endif
+#if WITH_SSL
+ mn_pi_mailbox_ssl_trust_server_cb,
+#endif
};
MNClientSessionPrivate priv;
gboolean status;
GError *err = NULL;
- gboolean again;
PARENT_HANDLER(mailbox);
@@ -1527,56 +1529,52 @@ ___1d_mn_imap_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GN
if (! mn_mailbox_get_poll(MN_MAILBOX(self)))
return;
- do
- {
- g_clear_error(&err);
- again = FALSE;
+ again:
+ g_clear_error(&err);
- memset(&priv, 0, sizeof(priv));
- mn_pi_mailbox_session_private_init(MN_PI_MAILBOX(self), &priv);
- priv.self = self;
- priv.server_software_supports_idle = TRUE; /* assume it does */
+ memset(&priv, 0, sizeof(priv));
+ mn_pi_mailbox_session_private_init(MN_PI_MAILBOX(self), &priv);
+ priv.self = self;
+ priv.server_software_supports_idle = TRUE; /* assume it does */
- status = mn_client_session_run(states,
- &callbacks,
+ status = mn_client_session_run(states,
+ &callbacks,
#if WITH_SSL
- priv.pi_mailbox->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL,
+ priv.pi_mailbox->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL,
#endif
- priv.pi_mailbox->hostname,
- priv.pi_mailbox->runtime_port,
- &priv,
- &err);
+ priv.pi_mailbox->hostname,
+ priv.pi_mailbox->runtime_port,
+ &priv,
+ &err);
- g_strfreev(priv.capabilities);
- eel_g_slist_free_deep(priv.auth_mechanisms);
+ g_strfreev(priv.capabilities);
+ eel_g_slist_free_deep(priv.auth_mechanisms);
- if (priv.unseen_numbers)
- g_hash_table_destroy(priv.unseen_numbers);
- if (priv.recent_numbers)
- g_hash_table_destroy(priv.recent_numbers);
- if (priv.received_numbers)
- g_hash_table_destroy(priv.received_numbers);
+ if (priv.unseen_numbers)
+ g_hash_table_destroy(priv.unseen_numbers);
+ if (priv.recent_numbers)
+ g_hash_table_destroy(priv.recent_numbers);
+ if (priv.received_numbers)
+ g_hash_table_destroy(priv.received_numbers);
- mn_g_object_slist_free(priv.messages);
+ mn_g_object_slist_free(priv.messages);
#if WITH_SASL
- g_slist_free(priv.sasl_remaining_mechanisms);
+ g_slist_free(priv.sasl_remaining_mechanisms);
#endif
- if (priv.could_idle && ! REMOVED(self))
+ if (priv.could_idle && mn_mailbox_get_active(priv.mailbox))
+ {
+ if (status)
+ goto again;
+ /* some servers abruptly disconnect for inactivity */
+ else if (g_error_matches(err, MN_CLIENT_SESSION_ERROR, MN_CLIENT_SESSION_ERROR_CONNECTION_LOST))
{
- if (status)
- again = TRUE;
- /* some servers abruptly disconnect for inactivity */
- else if (g_error_matches(err, MN_CLIENT_SESSION_ERROR, MN_CLIENT_SESSION_ERROR_CONNECTION_LOST))
- {
- /* g_log() escapes unsafe and non UTF-8 characters, so this is safe */
- mn_mailbox_notice(priv.mailbox, "%s", err->message);
- again = TRUE;
- }
+ /* g_log() escapes unsafe and non UTF-8 characters, so this is safe */
+ mn_mailbox_notice(priv.mailbox, "%s", err->message);
+ goto again;
}
}
- while (again);
GDK_THREADS_ENTER();
@@ -1595,18 +1593,18 @@ ___1d_mn_imap_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GN
gdk_flush();
GDK_THREADS_LEAVE();
}}
-#line 1599 "mn-imap-mailbox.c"
+#line 1597 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 1113 "mn-imap-mailbox.gob"
+#line 1105 "mn-imap-mailbox.gob"
static MNClientSessionResponse *
mn_imap_mailbox_response_new_cb (MNClientSession * session, const char * input, MNClientSessionPrivate * priv)
-#line 1606 "mn-imap-mailbox.c"
+#line 1604 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::response_new_cb"
{
-#line 1117 "mn-imap-mailbox.gob"
+#line 1109 "mn-imap-mailbox.gob"
MNClientSessionResponse *response = NULL;
@@ -1678,17 +1676,17 @@ mn_imap_mailbox_response_new_cb (MNClientSession * session, const char * input,
return response;
}}
-#line 1682 "mn-imap-mailbox.c"
+#line 1680 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1189 "mn-imap-mailbox.gob"
+#line 1181 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 1688 "mn-imap-mailbox.c"
+#line 1686 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::response_free_cb"
{
-#line 1193 "mn-imap-mailbox.gob"
+#line 1185 "mn-imap-mailbox.gob"
g_free(response->continuation);
g_free(response->tag);
@@ -1697,45 +1695,45 @@ mn_imap_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResp
g_free(response->arguments);
g_free(response);
}}
-#line 1701 "mn-imap-mailbox.c"
+#line 1699 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1202 "mn-imap-mailbox.gob"
+#line 1194 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_default_handler (MNClientSessionResponse * response, MNClientSessionPrivate * priv, int error_code_when_bye)
-#line 1707 "mn-imap-mailbox.c"
+#line 1705 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::default_handler"
-#line 1202 "mn-imap-mailbox.gob"
+#line 1194 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 1202 "mn-imap-mailbox.gob"
+#line 1194 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1714 "mn-imap-mailbox.c"
+#line 1712 "mn-imap-mailbox.c"
{
-#line 1206 "mn-imap-mailbox.gob"
+#line 1198 "mn-imap-mailbox.gob"
if (! response->tag && IS_BYE(response))
return mn_client_session_set_error_from_response(priv->session, error_code_when_bye, response->arguments);
else
return MN_CLIENT_SESSION_RESULT_CONTINUE;
}}
-#line 1723 "mn-imap-mailbox.c"
+#line 1721 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1213 "mn-imap-mailbox.gob"
+#line 1205 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_pre_read_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 1729 "mn-imap-mailbox.c"
+#line 1727 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::pre_read_cb"
{
-#line 1216 "mn-imap-mailbox.gob"
+#line 1208 "mn-imap-mailbox.gob"
if (priv->idle_state == IDLE_STATE_IDLE)
{
Self *self = priv->self;
- g_mutex_lock(selfp->mutex);
+ self_lock(self);
selfp->idle_session = priv;
@@ -1744,46 +1742,49 @@ mn_imap_mailbox_pre_read_cb (MNClientSession * session, MNClientSessionPrivate *
g_assert(priv->idle_inactivity_timeout_id == 0);
priv->idle_inactivity_timeout_id = g_timeout_add(60 * 29 * 1000, self_idle_inactivity_timeout_cb, self);
- g_mutex_unlock(selfp->mutex);
+ self_unlock(self);
}
}}
-#line 1751 "mn-imap-mailbox.c"
+#line 1749 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1234 "mn-imap-mailbox.gob"
+#line 1226 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_post_read_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 1757 "mn-imap-mailbox.c"
+#line 1755 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::post_read_cb"
{
-#line 1237 "mn-imap-mailbox.gob"
+#line 1229 "mn-imap-mailbox.gob"
Self *self = priv->self;
- g_mutex_lock(selfp->mutex);
+ self_lock(self);
+
if (priv->idle_state >= IDLE_STATE_IDLE)
{
selfp->idle_session = NULL;
mn_source_clear(&priv->idle_inactivity_timeout_id);
}
- g_mutex_unlock(selfp->mutex);
+
+ self_unlock(self);
}}
#line 1773 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1249 "mn-imap-mailbox.gob"
+#line 1243 "mn-imap-mailbox.gob"
static gboolean
mn_imap_mailbox_idle_inactivity_timeout_cb (gpointer data)
#line 1779 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::idle_inactivity_timeout_cb"
{
-#line 1251 "mn-imap-mailbox.gob"
+#line 1245 "mn-imap-mailbox.gob"
Self *self = data;
- g_mutex_lock(selfp->mutex);
+ self_lock(self);
+
if (selfp->idle_session)
{
mn_client_session_write(selfp->idle_session->session, "DONE");
@@ -1791,26 +1792,27 @@ mn_imap_mailbox_idle_inactivity_timeout_cb (gpointer data)
selfp->idle_session->idle_inactivity = TRUE;
}
selfp->idle_session->idle_inactivity_timeout_id = 0;
- g_mutex_unlock(selfp->mutex);
+
+ self_unlock(self);
return FALSE;
}}
-#line 1799 "mn-imap-mailbox.c"
+#line 1801 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1267 "mn-imap-mailbox.gob"
+#line 1263 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_session_write (MNClientSessionPrivate * priv, const char * format, ...)
-#line 1805 "mn-imap-mailbox.c"
+#line 1807 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_write"
-#line 1267 "mn-imap-mailbox.gob"
+#line 1263 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1267 "mn-imap-mailbox.gob"
+#line 1263 "mn-imap-mailbox.gob"
g_return_val_if_fail (format != NULL, (int )0);
-#line 1812 "mn-imap-mailbox.c"
+#line 1814 "mn-imap-mailbox.c"
{
-#line 1271 "mn-imap-mailbox.gob"
+#line 1267 "mn-imap-mailbox.gob"
va_list args;
char *command;
@@ -1829,22 +1831,22 @@ mn_imap_mailbox_session_write (MNClientSessionPrivate * priv, const char * forma
return result;
}}
-#line 1833 "mn-imap-mailbox.c"
+#line 1835 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1290 "mn-imap-mailbox.gob"
+#line 1286 "mn-imap-mailbox.gob"
static gboolean
mn_imap_mailbox_session_handle_capability_code (MNClientSessionPrivate * priv, MNClientSessionResponse * response)
-#line 1839 "mn-imap-mailbox.c"
+#line 1841 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_handle_capability_code"
-#line 1290 "mn-imap-mailbox.gob"
+#line 1286 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (gboolean )0);
-#line 1290 "mn-imap-mailbox.gob"
+#line 1286 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (gboolean )0);
-#line 1846 "mn-imap-mailbox.c"
+#line 1848 "mn-imap-mailbox.c"
{
-#line 1293 "mn-imap-mailbox.gob"
+#line 1289 "mn-imap-mailbox.gob"
if (response->code)
{
@@ -1862,20 +1864,20 @@ mn_imap_mailbox_session_handle_capability_code (MNClientSessionPrivate * priv, M
return FALSE;
}}
-#line 1866 "mn-imap-mailbox.c"
+#line 1868 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1311 "mn-imap-mailbox.gob"
+#line 1307 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_session_parse_capabilities (MNClientSessionPrivate * priv, const char * capabilities)
-#line 1872 "mn-imap-mailbox.c"
+#line 1874 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_parse_capabilities"
-#line 1311 "mn-imap-mailbox.gob"
+#line 1307 "mn-imap-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 1877 "mn-imap-mailbox.c"
+#line 1879 "mn-imap-mailbox.c"
{
-#line 1314 "mn-imap-mailbox.gob"
+#line 1310 "mn-imap-mailbox.gob"
g_strfreev(priv->capabilities);
priv->capabilities = NULL;
@@ -1899,22 +1901,22 @@ mn_imap_mailbox_session_parse_capabilities (MNClientSessionPrivate * priv, const
else
priv->capabilities = g_new0(char *, 1);
}}
-#line 1903 "mn-imap-mailbox.c"
+#line 1905 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1338 "mn-imap-mailbox.gob"
+#line 1334 "mn-imap-mailbox.gob"
static gboolean
mn_imap_mailbox_session_has_capability (MNClientSessionPrivate * priv, const char * capability)
-#line 1909 "mn-imap-mailbox.c"
+#line 1911 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_has_capability"
-#line 1338 "mn-imap-mailbox.gob"
+#line 1334 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (gboolean )0);
-#line 1338 "mn-imap-mailbox.gob"
+#line 1334 "mn-imap-mailbox.gob"
g_return_val_if_fail (capability != NULL, (gboolean )0);
-#line 1916 "mn-imap-mailbox.c"
+#line 1918 "mn-imap-mailbox.c"
{
-#line 1341 "mn-imap-mailbox.gob"
+#line 1337 "mn-imap-mailbox.gob"
int i;
@@ -1926,20 +1928,20 @@ mn_imap_mailbox_session_has_capability (MNClientSessionPrivate * priv, const cha
return FALSE;
}}
-#line 1930 "mn-imap-mailbox.c"
+#line 1932 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1353 "mn-imap-mailbox.gob"
+#line 1349 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_session_after_capability (MNClientSessionPrivate * priv)
-#line 1936 "mn-imap-mailbox.c"
+#line 1938 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_after_capability"
-#line 1353 "mn-imap-mailbox.gob"
+#line 1349 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1941 "mn-imap-mailbox.c"
+#line 1943 "mn-imap-mailbox.c"
{
-#line 1355 "mn-imap-mailbox.gob"
+#line 1351 "mn-imap-mailbox.gob"
if (priv->authenticated)
return STATE_EXAMINE;
@@ -1961,20 +1963,20 @@ mn_imap_mailbox_session_after_capability (MNClientSessionPrivate * priv)
return self_session_authenticate(priv);
}
}}
-#line 1965 "mn-imap-mailbox.c"
+#line 1967 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1377 "mn-imap-mailbox.gob"
+#line 1373 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_session_authenticate (MNClientSessionPrivate * priv)
-#line 1971 "mn-imap-mailbox.c"
+#line 1973 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_authenticate"
-#line 1377 "mn-imap-mailbox.gob"
+#line 1373 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1976 "mn-imap-mailbox.c"
+#line 1978 "mn-imap-mailbox.c"
{
-#line 1379 "mn-imap-mailbox.gob"
+#line 1375 "mn-imap-mailbox.gob"
#if WITH_SASL
g_slist_free(priv->sasl_remaining_mechanisms);
@@ -2012,20 +2014,20 @@ mn_imap_mailbox_session_authenticate (MNClientSessionPrivate * priv)
return STATE_LOGIN;
}
}}
-#line 2016 "mn-imap-mailbox.c"
+#line 2018 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1417 "mn-imap-mailbox.gob"
+#line 1413 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gboolean tried_login)
-#line 2022 "mn-imap-mailbox.c"
+#line 2024 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_authenticate_fallback"
-#line 1417 "mn-imap-mailbox.gob"
+#line 1413 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 2027 "mn-imap-mailbox.c"
+#line 2029 "mn-imap-mailbox.c"
{
-#line 1420 "mn-imap-mailbox.gob"
+#line 1416 "mn-imap-mailbox.gob"
if (! priv->pi_mailbox->authmech)
{
@@ -2057,9 +2059,9 @@ mn_imap_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gb
}
}
- if (priv->pi_mailbox->auth_prompted)
+ if (priv->auth_mailbox->auth_prompted)
{
- mn_pi_mailbox_auth_failed(priv->pi_mailbox);
+ mn_authenticated_mailbox_auth_failed(priv->auth_mailbox);
return self_session_authenticate(priv);
}
else
@@ -2068,24 +2070,24 @@ mn_imap_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gb
return STATE_LOGOUT;
}
}}
-#line 2072 "mn-imap-mailbox.c"
+#line 2074 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1463 "mn-imap-mailbox.gob"
+#line 1459 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_session_detect_imapd (MNClientSession * session, MNClientSessionResponse * greeting_response, MNClientSessionPrivate * priv)
-#line 2078 "mn-imap-mailbox.c"
+#line 2080 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_detect_imapd"
-#line 1463 "mn-imap-mailbox.gob"
+#line 1459 "mn-imap-mailbox.gob"
g_return_if_fail (session != NULL);
-#line 1463 "mn-imap-mailbox.gob"
+#line 1459 "mn-imap-mailbox.gob"
g_return_if_fail (greeting_response != NULL);
-#line 1463 "mn-imap-mailbox.gob"
+#line 1459 "mn-imap-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 2087 "mn-imap-mailbox.c"
+#line 2089 "mn-imap-mailbox.c"
{
-#line 1467 "mn-imap-mailbox.gob"
+#line 1463 "mn-imap-mailbox.gob"
if (greeting_response->arguments)
{
@@ -2105,26 +2107,26 @@ mn_imap_mailbox_session_detect_imapd (MNClientSession * session, MNClientSession
}
}
}}
-#line 2109 "mn-imap-mailbox.c"
+#line 2111 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1487 "mn-imap-mailbox.gob"
+#line 1483 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_session_enter_search (MNClientSession * session, MNClientSessionPrivate * priv, const char * what, GHashTable ** numbers)
-#line 2115 "mn-imap-mailbox.c"
+#line 2117 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_enter_search"
-#line 1487 "mn-imap-mailbox.gob"
+#line 1483 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 1487 "mn-imap-mailbox.gob"
+#line 1483 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1487 "mn-imap-mailbox.gob"
+#line 1483 "mn-imap-mailbox.gob"
g_return_val_if_fail (what != NULL, (int )0);
-#line 1487 "mn-imap-mailbox.gob"
+#line 1483 "mn-imap-mailbox.gob"
g_return_val_if_fail (numbers != NULL, (int )0);
-#line 2126 "mn-imap-mailbox.c"
+#line 2128 "mn-imap-mailbox.c"
{
-#line 1492 "mn-imap-mailbox.gob"
+#line 1488 "mn-imap-mailbox.gob"
if (*numbers)
g_hash_table_destroy(*numbers);
@@ -2132,26 +2134,26 @@ mn_imap_mailbox_session_enter_search (MNClientSession * session, MNClientSession
return self_session_write(priv, "SEARCH %s", what);
}}
-#line 2136 "mn-imap-mailbox.c"
+#line 2138 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1500 "mn-imap-mailbox.gob"
+#line 1496 "mn-imap-mailbox.gob"
static int
mn_imap_mailbox_session_handle_search (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv, GHashTable * numbers)
-#line 2142 "mn-imap-mailbox.c"
+#line 2144 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::session_handle_search"
-#line 1500 "mn-imap-mailbox.gob"
+#line 1496 "mn-imap-mailbox.gob"
g_return_val_if_fail (session != NULL, (int )0);
-#line 1500 "mn-imap-mailbox.gob"
+#line 1496 "mn-imap-mailbox.gob"
g_return_val_if_fail (response != NULL, (int )0);
-#line 1500 "mn-imap-mailbox.gob"
+#line 1496 "mn-imap-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1500 "mn-imap-mailbox.gob"
+#line 1496 "mn-imap-mailbox.gob"
g_return_val_if_fail (numbers != NULL, (int )0);
-#line 2153 "mn-imap-mailbox.c"
+#line 2155 "mn-imap-mailbox.c"
{
-#line 1505 "mn-imap-mailbox.gob"
+#line 1501 "mn-imap-mailbox.gob"
if (response->continuation)
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
@@ -2199,7 +2201,7 @@ mn_imap_mailbox_session_handle_search (MNClientSession * session, MNClientSessio
return self_default_handler(response, priv, MN_CLIENT_SESSION_ERROR_OTHER);
}}
-#line 2203 "mn-imap-mailbox.c"
+#line 2205 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
/**
@@ -2210,17 +2212,17 @@ mn_imap_mailbox_session_handle_search (MNClientSession * session, MNClientSessio
*
* Return value: the quoted string.
**/
-#line 1561 "mn-imap-mailbox.gob"
+#line 1557 "mn-imap-mailbox.gob"
static char *
mn_imap_mailbox_quote (const char * str)
-#line 2217 "mn-imap-mailbox.c"
+#line 2219 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::quote"
-#line 1561 "mn-imap-mailbox.gob"
+#line 1557 "mn-imap-mailbox.gob"
g_return_val_if_fail (str != NULL, (char * )0);
-#line 2222 "mn-imap-mailbox.c"
+#line 2224 "mn-imap-mailbox.c"
{
-#line 1563 "mn-imap-mailbox.gob"
+#line 1559 "mn-imap-mailbox.gob"
GString *quoted;
int i;
@@ -2235,7 +2237,7 @@ mn_imap_mailbox_quote (const char * str)
return g_string_free(quoted, FALSE);
}}
-#line 2239 "mn-imap-mailbox.c"
+#line 2241 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
/**
@@ -2246,17 +2248,17 @@ mn_imap_mailbox_quote (const char * str)
*
* Return value: the string converted to modified UTF-7.
**/
-#line 1586 "mn-imap-mailbox.gob"
+#line 1582 "mn-imap-mailbox.gob"
static char *
mn_imap_mailbox_utf8_to_imap_utf7 (const char * str)
-#line 2253 "mn-imap-mailbox.c"
+#line 2255 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::utf8_to_imap_utf7"
-#line 1586 "mn-imap-mailbox.gob"
+#line 1582 "mn-imap-mailbox.gob"
g_return_val_if_fail (str != NULL, (char * )0);
-#line 2258 "mn-imap-mailbox.c"
+#line 2260 "mn-imap-mailbox.c"
{
-#line 1588 "mn-imap-mailbox.gob"
+#line 1584 "mn-imap-mailbox.gob"
gunichar c;
guint32 x, v = 0;
@@ -2313,20 +2315,20 @@ mn_imap_mailbox_utf8_to_imap_utf7 (const char * str)
return g_string_free(out, FALSE);
}}
-#line 2317 "mn-imap-mailbox.c"
+#line 2319 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1645 "mn-imap-mailbox.gob"
+#line 1641 "mn-imap-mailbox.gob"
static void
mn_imap_mailbox_imap_utf7_closeb64 (GString * out, guint32 v, guint32 i)
-#line 2323 "mn-imap-mailbox.c"
+#line 2325 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::imap_utf7_closeb64"
-#line 1645 "mn-imap-mailbox.gob"
+#line 1641 "mn-imap-mailbox.gob"
g_return_if_fail (out != NULL);
-#line 2328 "mn-imap-mailbox.c"
+#line 2330 "mn-imap-mailbox.c"
{
-#line 1647 "mn-imap-mailbox.gob"
+#line 1643 "mn-imap-mailbox.gob"
/*
* Taken from the Ximian Evolution sources (camel-utf8.c) and
@@ -2343,34 +2345,71 @@ mn_imap_mailbox_imap_utf7_closeb64 (GString * out, guint32 v, guint32 i)
g_string_append_c(out, '-');
}}
-#line 2347 "mn-imap-mailbox.c"
+#line 2349 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1664 "mn-imap-mailbox.gob"
+#line 1660 "mn-imap-mailbox.gob"
char *
mn_imap_mailbox_build_name (const char * username, const char * server, const char * mailbox)
-#line 2353 "mn-imap-mailbox.c"
+#line 2355 "mn-imap-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::build_name"
-#line 1664 "mn-imap-mailbox.gob"
+#line 1660 "mn-imap-mailbox.gob"
+ g_return_val_if_fail (username != NULL, (char * )0);
+#line 1660 "mn-imap-mailbox.gob"
g_return_val_if_fail (server != NULL, (char * )0);
-#line 2358 "mn-imap-mailbox.c"
+#line 2362 "mn-imap-mailbox.c"
{
-#line 1668 "mn-imap-mailbox.gob"
+#line 1664 "mn-imap-mailbox.gob"
GString *name;
name = g_string_new(NULL);
- if (username)
- g_string_append_printf(name, "%s@", username);
-
- g_string_append(name, server);
+ g_string_append_printf(name, "%s@%s", username, server);
if (mailbox && mn_utf8_strcasecmp(mailbox, "INBOX"))
g_string_append_printf(name, "/%s", mailbox);
return g_string_free(name, FALSE);
}}
-#line 2376 "mn-imap-mailbox.c"
+#line 2377 "mn-imap-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 1677 "mn-imap-mailbox.gob"
+static void
+mn_imap_mailbox_lock (MNIMAPMailbox * self)
+#line 2383 "mn-imap-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::lock"
+#line 1677 "mn-imap-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 1677 "mn-imap-mailbox.gob"
+ g_return_if_fail (MN_IS_IMAP_MAILBOX (self));
+#line 2390 "mn-imap-mailbox.c"
+{
+#line 1679 "mn-imap-mailbox.gob"
+
+ g_mutex_lock(selfp->mutex);
+ }}
+#line 2396 "mn-imap-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 1683 "mn-imap-mailbox.gob"
+static void
+mn_imap_mailbox_unlock (MNIMAPMailbox * self)
+#line 2402 "mn-imap-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:IMAP:Mailbox::unlock"
+#line 1683 "mn-imap-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 1683 "mn-imap-mailbox.gob"
+ g_return_if_fail (MN_IS_IMAP_MAILBOX (self));
+#line 2409 "mn-imap-mailbox.c"
+{
+#line 1685 "mn-imap-mailbox.gob"
+
+ g_mutex_unlock(selfp->mutex);
+ }}
+#line 2415 "mn-imap-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-imap-mailbox.gob b/src/mn-imap-mailbox.gob
@@ -12,7 +12,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -63,8 +63,6 @@ extern int mn_imap_mailbox_default_ports[MN_PI_MAILBOX_N_CONNECTION_TYPES];
#define IS_BAD(response) IS(response, "BAD")
#define IS_BYE(response) IS(response, "BYE")
-#define REMOVED(self) (g_atomic_int_get(&(self)->_priv->removed))
-
enum
{
STATE_GREETING = MN_CLIENT_SESSION_INITIAL_STATE,
@@ -150,9 +148,6 @@ enum MN_IMAP_MAILBOX_USE_IDLE
class MN:IMAP:Mailbox from MN:PI:Mailbox
{
- private int removed; /* boolean, access with g_atomic_int_ API */
-
- /* lock for synchronization between main thread and check thread */
private GMutex *mutex = {g_mutex_new()} destroywith g_mutex_free;
private MNClientSessionPrivate *idle_session;
@@ -160,7 +155,7 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
public char *mailbox destroywith g_free;
property STRING mailbox (link,
flags = CONSTRUCT
- | MN_MAILBOX_PARAM_PERMANENT
+ | MN_MAILBOX_PARAM_LOAD_SAVE
| MN_MAILBOX_PARAM_REQUIRED
| MN_MAILBOX_PARAM_IGNORE_CASE,
default_value = "INBOX");
@@ -169,7 +164,7 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
property ENUM use_idle_extension (link,
enum_type = MN:IMAP:Mailbox:Use:IDLE,
flags = CONSTRUCT
- | MN_MAILBOX_PARAM_PERMANENT,
+ | MN_MAILBOX_PARAM_LOAD_SAVE,
default_value = MN_IMAP_MAILBOX_USE_IDLE_AUTODETECT);
class_init (class)
@@ -186,6 +181,7 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
override (MN:Mailbox) void
seal (MNMailbox *mailbox)
{
+ MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
Self *self = SELF(mailbox);
PARENT_HANDLER(mailbox);
@@ -194,6 +190,13 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
mailbox->runtime_name = self_build_name(MN_AUTHENTICATED_MAILBOX(mailbox)->username,
MN_PI_MAILBOX(mailbox)->hostname,
self->mailbox);
+
+#if WITH_SSL
+ if (MN_PI_MAILBOX(self)->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL)
+ auth_mailbox->keyring_protocol = g_strdup("imaps");
+ else
+#endif
+ auth_mailbox->keyring_protocol = g_strdup("imap");
}
/*
@@ -201,7 +204,8 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
*
* Note: we only handle a subset of the RFC 2192 specification,
* since mailbox lists, message lists and message parts have no
- * meaning in Mail Notification.
+ * meaning in Mail Notification. Furthermore, Mail Notification
+ * requires an username.
*/
override (MN:Mailbox) MNMailbox *
parse_uri (MNMailbox *dummy, const char *uri)
@@ -227,12 +231,10 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
char username_buf[buflen];
char authmech_buf[buflen];
char hostname_buf[buflen];
- gboolean has_auth;
gboolean has_path;
- gboolean has_username = FALSE;
gboolean has_authmech = FALSE;
- if (! mn_pi_mailbox_split_uri(uri, len, scheme_buf, auth_buf, location_buf, &has_auth))
+ if (! mn_pi_mailbox_split_uri(uri, len, scheme_buf, auth_buf, location_buf))
return NULL;
if (strcmp(scheme_buf, "imap"))
@@ -241,19 +243,15 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
if (! self_split_uri_location(location_buf, len, hostport_buf, path_buf, &has_path))
return NULL;
- if (has_auth)
- {
- if (! mn_pi_mailbox_split_uri_auth(auth_buf, len, username_buf, authmech_buf, &has_username, &has_authmech))
- return NULL;
+ if (! mn_pi_mailbox_split_uri_auth(auth_buf, len, username_buf, authmech_buf, &has_authmech))
+ return NULL;
- if (has_authmech && ! strcmp(authmech_buf, "*"))
- has_authmech = FALSE;
- }
+ if (has_authmech && ! strcmp(authmech_buf, "*"))
+ has_authmech = FALSE;
mn_pi_mailbox_split_uri_hostport(hostport_buf, len, hostname_buf, &port);
- if (has_username)
- username = gnome_vfs_unescape_string(username_buf, NULL);
+ username = gnome_vfs_unescape_string(username_buf, NULL);
if (has_authmech)
authmech = gnome_vfs_unescape_string(authmech_buf, NULL);
hostname = gnome_vfs_unescape_string(hostname_buf, NULL);
@@ -266,9 +264,11 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
"authmech", authmech,
"hostname", hostname,
"port", port,
- "mailbox", path,
NULL);
+ if (path)
+ g_object_set(mailbox, MN_IMAP_MAILBOX_PROP_MAILBOX(path), NULL);
+
g_free(username);
g_free(authmech);
g_free(hostname);
@@ -309,21 +309,15 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
{
Self *self = SELF(mailbox);
- /*
- * We do not use g_atomic_int_set() yet because it was only added
- * in GLib 2.10.
- */
- g_atomic_int_inc(&selfp->removed);
+ PARENT_HANDLER(mailbox);
- g_mutex_lock(selfp->mutex);
+ self_lock(self);
if (selfp->idle_session)
{
mn_client_session_write(selfp->idle_session->session, "DONE");
selfp->idle_session->idle_state = IDLE_STATE_POST_IDLE;
}
- g_mutex_unlock(selfp->mutex);
-
- PARENT_HANDLER(mailbox);
+ self_unlock(self);
}
private int
@@ -465,7 +459,7 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
return self_session_write(priv, "AUTHENTICATE %s", priv->sasl_mechanism);
}
else
- return priv->pi_mailbox->auth_cancelled
+ return priv->auth_mailbox->auth_cancelled
? STATE_LOGOUT
: self_session_authenticate_fallback(priv, FALSE);
@@ -521,7 +515,7 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
}
else if (IS_NO(response) || IS_BAD(response))
{
- return priv->pi_mailbox->auth_cancelled
+ return priv->auth_mailbox->auth_cancelled
? STATE_LOGOUT
: self_session_authenticate_fallback(priv, FALSE);
}
@@ -555,11 +549,11 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
char *quoted_password;
int result;
- if (! mn_pi_mailbox_fill_credentials(priv->pi_mailbox, TRUE, TRUE))
+ if (! mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
return STATE_LOGOUT;
- quoted_username = self_quote(priv->pi_mailbox->runtime_username);
- quoted_password = self_quote(priv->pi_mailbox->runtime_password);
+ quoted_username = self_quote(priv->auth_mailbox->username);
+ quoted_password = self_quote(priv->auth_mailbox->runtime_password);
result = self_session_write(priv, "LOGIN %s %s", quoted_username, quoted_password);
g_free(quoted_username);
g_free(quoted_password);
@@ -832,7 +826,7 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
enter_idle_cb (MNClientSession *session,
MNClientSessionPrivate *priv)
{
- if (! REMOVED(priv->self))
+ if (mn_mailbox_get_active(priv->mailbox))
{
if (priv->self->use_idle_extension == MN_IMAP_MAILBOX_USE_IDLE_NEVER)
mn_client_session_notice(session, _("\"Use the IDLE extension\" set to \"never\" in the mailbox properties, logging out"));
@@ -941,7 +935,7 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
{
if (IS_OK(response))
{
- if (REMOVED(priv->self))
+ if (! mn_mailbox_get_active(priv->mailbox))
return STATE_LOGOUT;
else if (priv->idle_inactivity)
return STATE_IDLE; /* anti-inactivity, re-enter */
@@ -1029,11 +1023,13 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
#if WITH_SASL
mn_pi_mailbox_sasl_get_credentials_cb,
#endif
+#if WITH_SSL
+ mn_pi_mailbox_ssl_trust_server_cb,
+#endif
};
MNClientSessionPrivate priv;
gboolean status;
GError *err = NULL;
- gboolean again;
PARENT_HANDLER(mailbox);
@@ -1041,56 +1037,52 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
if (! mn_mailbox_get_poll(MN_MAILBOX(self)))
return;
- do
- {
- g_clear_error(&err);
- again = FALSE;
+ again:
+ g_clear_error(&err);
- memset(&priv, 0, sizeof(priv));
- mn_pi_mailbox_session_private_init(MN_PI_MAILBOX(self), &priv);
- priv.self = self;
- priv.server_software_supports_idle = TRUE; /* assume it does */
+ memset(&priv, 0, sizeof(priv));
+ mn_pi_mailbox_session_private_init(MN_PI_MAILBOX(self), &priv);
+ priv.self = self;
+ priv.server_software_supports_idle = TRUE; /* assume it does */
- status = mn_client_session_run(states,
- &callbacks,
+ status = mn_client_session_run(states,
+ &callbacks,
#if WITH_SSL
- priv.pi_mailbox->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL,
+ priv.pi_mailbox->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL,
#endif
- priv.pi_mailbox->hostname,
- priv.pi_mailbox->runtime_port,
- &priv,
- &err);
+ priv.pi_mailbox->hostname,
+ priv.pi_mailbox->runtime_port,
+ &priv,
+ &err);
- g_strfreev(priv.capabilities);
- eel_g_slist_free_deep(priv.auth_mechanisms);
+ g_strfreev(priv.capabilities);
+ eel_g_slist_free_deep(priv.auth_mechanisms);
- if (priv.unseen_numbers)
- g_hash_table_destroy(priv.unseen_numbers);
- if (priv.recent_numbers)
- g_hash_table_destroy(priv.recent_numbers);
- if (priv.received_numbers)
- g_hash_table_destroy(priv.received_numbers);
+ if (priv.unseen_numbers)
+ g_hash_table_destroy(priv.unseen_numbers);
+ if (priv.recent_numbers)
+ g_hash_table_destroy(priv.recent_numbers);
+ if (priv.received_numbers)
+ g_hash_table_destroy(priv.received_numbers);
- mn_g_object_slist_free(priv.messages);
+ mn_g_object_slist_free(priv.messages);
#if WITH_SASL
- g_slist_free(priv.sasl_remaining_mechanisms);
+ g_slist_free(priv.sasl_remaining_mechanisms);
#endif
- if (priv.could_idle && ! REMOVED(self))
+ if (priv.could_idle && mn_mailbox_get_active(priv.mailbox))
+ {
+ if (status)
+ goto again;
+ /* some servers abruptly disconnect for inactivity */
+ else if (g_error_matches(err, MN_CLIENT_SESSION_ERROR, MN_CLIENT_SESSION_ERROR_CONNECTION_LOST))
{
- if (status)
- again = TRUE;
- /* some servers abruptly disconnect for inactivity */
- else if (g_error_matches(err, MN_CLIENT_SESSION_ERROR, MN_CLIENT_SESSION_ERROR_CONNECTION_LOST))
- {
- /* g_log() escapes unsafe and non UTF-8 characters, so this is safe */
- mn_mailbox_notice(priv.mailbox, "%s", err->message);
- again = TRUE;
- }
+ /* g_log() escapes unsafe and non UTF-8 characters, so this is safe */
+ mn_mailbox_notice(priv.mailbox, "%s", err->message);
+ goto again;
}
}
- while (again);
GDK_THREADS_ENTER();
@@ -1218,7 +1210,7 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
{
Self *self = priv->self;
- g_mutex_lock(selfp->mutex);
+ self_lock(self);
selfp->idle_session = priv;
@@ -1227,7 +1219,7 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
g_assert(priv->idle_inactivity_timeout_id == 0);
priv->idle_inactivity_timeout_id = g_timeout_add(60 * 29 * 1000, self_idle_inactivity_timeout_cb, self);
- g_mutex_unlock(selfp->mutex);
+ self_unlock(self);
}
}
@@ -1237,13 +1229,15 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
{
Self *self = priv->self;
- g_mutex_lock(selfp->mutex);
+ self_lock(self);
+
if (priv->idle_state >= IDLE_STATE_IDLE)
{
selfp->idle_session = NULL;
mn_source_clear(&priv->idle_inactivity_timeout_id);
}
- g_mutex_unlock(selfp->mutex);
+
+ self_unlock(self);
}
private gboolean
@@ -1251,7 +1245,8 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
{
Self *self = data;
- g_mutex_lock(selfp->mutex);
+ self_lock(self);
+
if (selfp->idle_session)
{
mn_client_session_write(selfp->idle_session->session, "DONE");
@@ -1259,7 +1254,8 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
selfp->idle_session->idle_inactivity = TRUE;
}
selfp->idle_session->idle_inactivity_timeout_id = 0;
- g_mutex_unlock(selfp->mutex);
+
+ self_unlock(self);
return FALSE;
}
@@ -1448,9 +1444,9 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
}
}
- if (priv->pi_mailbox->auth_prompted)
+ if (priv->auth_mailbox->auth_prompted)
{
- mn_pi_mailbox_auth_failed(priv->pi_mailbox);
+ mn_authenticated_mailbox_auth_failed(priv->auth_mailbox);
return self_session_authenticate(priv);
}
else
@@ -1662,7 +1658,7 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
}
public char *
- build_name (const char *username,
+ build_name (const char *username (check null),
const char *server (check null),
const char *mailbox)
{
@@ -1670,14 +1666,23 @@ class MN:IMAP:Mailbox from MN:PI:Mailbox
name = g_string_new(NULL);
- if (username)
- g_string_append_printf(name, "%s@", username);
-
- g_string_append(name, server);
+ g_string_append_printf(name, "%s@%s", username, server);
if (mailbox && mn_utf8_strcasecmp(mailbox, "INBOX"))
g_string_append_printf(name, "/%s", mailbox);
return g_string_free(name, FALSE);
}
+
+ private void
+ lock (self)
+ {
+ g_mutex_lock(selfp->mutex);
+ }
+
+ private void
+ unlock (self)
+ {
+ g_mutex_unlock(selfp->mutex);
+ }
}
diff --git a/src/mn-keyring.c b/src/mn-keyring.c
@@ -0,0 +1,259 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+#include "mn-keyring.h"
+
+/*** types *******************************************************************/
+
+typedef struct
+{
+ GMutex *mutex;
+ GCond *cond;
+ gboolean done;
+} Request;
+
+typedef struct
+{
+ Request request;
+
+ const char *username;
+ const char *domain;
+ const char *server;
+ const char *protocol;
+ const char *authtype;
+ int port;
+
+ MNKeyringRequestCallback request_callback;
+ gpointer data;
+
+ char *password;
+} GetPasswordInfo;
+
+typedef struct
+{
+ Request request;
+
+ const char *keyring;
+ const char *username;
+ const char *domain;
+ const char *server;
+ const char *protocol;
+ const char *authtype;
+ int port;
+ const char *password;
+
+ MNKeyringRequestCallback request_callback;
+ gpointer data;
+
+ GnomeKeyringResult result;
+ guint32 item_id;
+} SetPasswordInfo;
+
+/*** implementation **********************************************************/
+
+static void
+request_perform (Request *request, GSourceFunc perform_callback, gpointer data)
+{
+ g_return_if_fail(request != NULL);
+ g_return_if_fail(perform_callback != NULL);
+
+ request->mutex = g_mutex_new();
+ request->cond = g_cond_new();
+ request->done = FALSE;
+
+ /*
+ * Work around http://bugzilla.gnome.org/show_bug.cgi?id=474695 by
+ * calling the gnome-keyring async function from a main loop
+ * callback.
+ */
+ g_idle_add(perform_callback, data);
+
+ g_mutex_lock(request->mutex);
+
+ if (! request->done)
+ g_cond_wait(request->cond, request->mutex);
+
+ g_mutex_unlock(request->mutex);
+
+ g_mutex_free(request->mutex);
+ g_cond_free(request->cond);
+}
+
+static void
+request_signal (Request *request)
+{
+ g_return_if_fail(request != NULL);
+
+ g_mutex_lock(request->mutex);
+
+ request->done = TRUE;
+ g_cond_signal(request->cond);
+
+ g_mutex_unlock(request->mutex);
+}
+
+static void
+get_password_sync_cb (GnomeKeyringResult result,
+ GList *list,
+ gpointer data)
+{
+ GetPasswordInfo *info = data;
+
+ info->request_callback(NULL, info->data);
+
+ if (result == GNOME_KEYRING_RESULT_OK && list)
+ {
+ GnomeKeyringNetworkPasswordData *data = list->data;
+ info->password = g_strdup(data->password);
+ }
+
+ request_signal(&info->request);
+}
+
+static gboolean
+get_password_sync_perform_cb (gpointer data)
+{
+ GetPasswordInfo *info = data;
+ gpointer request;
+
+ request = gnome_keyring_find_network_password(info->username,
+ info->domain,
+ info->server,
+ NULL,
+ info->protocol,
+ info->authtype,
+ info->port,
+ get_password_sync_cb,
+ info,
+ NULL);
+
+ info->request_callback(request, info->data);
+
+ return FALSE; /* remove source */
+}
+
+char *
+mn_keyring_get_password_sync (const char *username,
+ const char *domain,
+ const char *server,
+ const char *protocol,
+ const char *authtype,
+ int port,
+ MNKeyringRequestCallback request_callback,
+ gpointer data)
+{
+ GetPasswordInfo info;
+
+ g_return_val_if_fail(request_callback != NULL, NULL);
+
+ info.username = username;
+ info.domain = domain;
+ info.server = server;
+ info.protocol = protocol;
+ info.authtype = authtype;
+ info.port = port;
+
+ info.request_callback = request_callback;
+ info.data = data;
+
+ info.password = NULL;
+
+ request_perform(&info.request, get_password_sync_perform_cb, &info);
+
+ return info.password;
+}
+
+static void
+set_password_sync_cb (GnomeKeyringResult result,
+ guint32 item_id,
+ gpointer data)
+{
+ SetPasswordInfo *info = data;
+
+ info->request_callback(NULL, info->data);
+
+ info->result = result;
+ info->item_id = item_id;
+
+ request_signal(&info->request);
+}
+
+static gboolean
+set_password_sync_perform_cb (gpointer data)
+{
+ SetPasswordInfo *info = data;
+ gpointer request;
+
+ request = gnome_keyring_set_network_password(info->keyring,
+ info->username,
+ info->domain,
+ info->server,
+ NULL,
+ info->protocol,
+ info->authtype,
+ info->port,
+ info->password,
+ set_password_sync_cb,
+ info,
+ NULL);
+
+ info->request_callback(request, info->data);
+
+ return FALSE; /* remove source */
+}
+
+GnomeKeyringResult
+mn_keyring_set_password_sync (const char *keyring,
+ const char *username,
+ const char *domain,
+ const char *server,
+ const char *protocol,
+ const char *authtype,
+ int port,
+ const char *password,
+ guint32 *item_id,
+ MNKeyringRequestCallback request_callback,
+ gpointer data)
+{
+ SetPasswordInfo info;
+
+ g_return_val_if_fail(password != NULL, GNOME_KEYRING_RESULT_BAD_ARGUMENTS);
+ g_return_val_if_fail(item_id != NULL, GNOME_KEYRING_RESULT_BAD_ARGUMENTS);
+ g_return_val_if_fail(request_callback != NULL, GNOME_KEYRING_RESULT_BAD_ARGUMENTS);
+
+ info.keyring = keyring;
+ info.username = username;
+ info.domain = domain;
+ info.server = server;
+ info.protocol = protocol;
+ info.authtype = authtype;
+ info.port = port;
+ info.password = password;
+
+ info.request_callback = request_callback;
+ info.data = data;
+
+ request_perform(&info.request, set_password_sync_perform_cb, &info);
+
+ if (info.result == GNOME_KEYRING_RESULT_OK)
+ *item_id = info.item_id;
+
+ return info.result;
+}
diff --git a/src/mn-keyring.h b/src/mn-keyring.h
@@ -0,0 +1,58 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _MN_KEYRING_H
+#define _MN_KEYRING_H
+
+#include <gnome-keyring.h>
+
+/*
+ * These functions augment the gnome-keyring sync API by taking a
+ * callback parameter which is invoked when the request is started and
+ * completed. This allows another thread to call
+ * gnome_keyring_cancel_request() while the calling thread performs
+ * the request. The provided callback is executed in the thread that
+ * runs the GLib main loop, with the GDK lock not held.
+ */
+
+typedef void (*MNKeyringRequestCallback) (gpointer request, gpointer data);
+
+/* returns NULL if not found */
+char *mn_keyring_get_password_sync (const char *username,
+ const char *domain,
+ const char *server,
+ const char *protocol,
+ const char *authtype,
+ int port,
+ MNKeyringRequestCallback request_callback,
+ gpointer data);
+
+GnomeKeyringResult mn_keyring_set_password_sync (const char *keyring,
+ const char *username,
+ const char *domain,
+ const char *server,
+ const char *protocol,
+ const char *authtype,
+ int port,
+ const char *password,
+ guint32 *item_id,
+ MNKeyringRequestCallback request_callback,
+ gpointer data);
+
+#endif /* _MN_KEYRING_H */
diff --git a/src/mn-locked-callback.c b/src/mn-locked-callback.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -454,6 +454,11 @@ mn_gnome_vfs_monitor_add_locked (GnomeVFSMonitorHandle **handle,
g_return_val_if_fail(text_uri != NULL, GNOME_VFS_ERROR_BAD_PARAMETERS);
g_return_val_if_fail(callback != NULL, GNOME_VFS_ERROR_BAD_PARAMETERS);
+ /*
+ * We need a global monitor hash table because
+ * gnome_vfs_monitor_add() has no destroy_data parameter.
+ */
+
G_LOCK(vfs_monitors);
result = gnome_vfs_monitor_add(&_handle, text_uri, monitor_type, mn_locked_gnome_vfs_monitor_cb, user_data);
if (result == GNOME_VFS_OK)
diff --git a/src/mn-locked-callback.h b/src/mn-locked-callback.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-mail-icon-private.h b/src/mn-mail-icon-private.h
@@ -10,19 +10,23 @@ extern "C" {
#endif /* __cplusplus */
-#line 28 "mn-mail-icon.gob"
+#line 33 "mn-mail-icon.gob"
#include "mn-tooltips.h"
#line 18 "mn-mail-icon-private.h"
struct _MNMailIconPrivate {
-#line 42 "mn-mail-icon.gob"
+#line 48 "mn-mail-icon.gob"
MNTooltips * tooltips;
-#line 43 "mn-mail-icon.gob"
- GtkWidget * event_box;
-#line 46 "mn-mail-icon.gob"
+#line 49 "mn-mail-icon.gob"
+ GtkWidget * widget;
+#line 51 "mn-mail-icon.gob"
+ char * stock_id;
+#line 52 "mn-mail-icon.gob"
+ int size;
+#line 54 "mn-mail-icon.gob"
GtkWidget * menu;
-#line 26 "mn-mail-icon-private.h"
+#line 30 "mn-mail-icon-private.h"
};
#ifdef __cplusplus
diff --git a/src/mn-mail-icon-widget-private.h b/src/mn-mail-icon-widget-private.h
@@ -0,0 +1,40 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_MAIL_ICON_WIDGET_PRIVATE_H__
+#define __MN_MAIL_ICON_WIDGET_PRIVATE_H__
+
+#include "mn-mail-icon-widget.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#line 26 "mn-mail-icon-widget.gob"
+
+#include "mn-locked-callback.h"
+
+#line 18 "mn-mail-icon-widget-private.h"
+struct _MNMailIconWidgetPrivate {
+#line 46 "mn-mail-icon-widget.gob"
+ gboolean blinking;
+#line 73 "mn-mail-icon-widget.gob"
+ PangoLayout * count_layout;
+#line 75 "mn-mail-icon-widget.gob"
+ int count;
+#line 92 "mn-mail-icon-widget.gob"
+ MNLockedGSource * blink_timeout_source;
+#line 93 "mn-mail-icon-widget.gob"
+ gboolean is_on;
+#line 95 "mn-mail-icon-widget.gob"
+ char * stock_id;
+#line 96 "mn-mail-icon-widget.gob"
+ GtkIconSize icon_size;
+#line 34 "mn-mail-icon-widget-private.h"
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-mail-icon-widget.c b/src/mn-mail-icon-widget.c
@@ -0,0 +1,712 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-mail-icon-widget.h"
+
+#include "mn-mail-icon-widget-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 30 "mn-mail-icon-widget.gob"
+
+#include "config.h"
+#include <math.h>
+
+#define ICON_XALIGN 0.5
+#define ICON_YALIGN 0.5
+
+#define COUNT_BOX_XPAD 3
+#define COUNT_BOX_YPAD 3
+
+#define COUNT_BOX_XMARGIN 0
+#define COUNT_BOX_YMARGIN 0
+
+#line 40 "mn-mail-icon-widget.c"
+/* self casting macros */
+#define SELF(x) MN_MAIL_ICON_WIDGET(x)
+#define SELF_CONST(x) MN_MAIL_ICON_WIDGET_CONST(x)
+#define IS_SELF(x) MN_IS_MAIL_ICON_WIDGET(x)
+#define TYPE_SELF MN_TYPE_MAIL_ICON_WIDGET
+#define SELF_CLASS(x) MN_MAIL_ICON_WIDGET_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_MAIL_ICON_WIDGET_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNMailIconWidget Self;
+typedef MNMailIconWidgetClass SelfClass;
+
+/* here are local prototypes */
+static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void mn_mail_icon_widget_class_init (MNMailIconWidgetClass * c) G_GNUC_UNUSED;
+static void mn_mail_icon_widget_init (MNMailIconWidget * self) G_GNUC_UNUSED;
+static void ___6_mn_mail_icon_widget_dispose (GObject * object) G_GNUC_UNUSED;
+static void ___7_mn_mail_icon_widget_size_request (GtkWidget * widget, GtkRequisition * requisition) G_GNUC_UNUSED;
+static gboolean ___8_mn_mail_icon_widget_expose_event (GtkWidget * widget, GdkEventExpose * event) G_GNUC_UNUSED;
+static GdkPixbuf * mn_mail_icon_widget_render_icon (MNMailIconWidget * self) G_GNUC_UNUSED;
+static void mn_mail_icon_widget_context_changed (MNMailIconWidget * self) G_GNUC_UNUSED;
+static void mn_mail_icon_widget_invalidate_count_layout (MNMailIconWidget * self) G_GNUC_UNUSED;
+static void mn_mail_icon_widget_redraw (MNMailIconWidget * self) G_GNUC_UNUSED;
+static gboolean mn_mail_icon_widget_blink_timeout_cb (gpointer data) G_GNUC_UNUSED;
+
+enum {
+ PROP_0,
+ PROP_BLINKING,
+ PROP_COUNT
+};
+
+/* pointer to the class of our parent */
+static GtkDrawingAreaClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_get_blinking mn_mail_icon_widget_get_blinking
+#define self_set_blinking mn_mail_icon_widget_set_blinking
+#define self_get_count mn_mail_icon_widget_get_count
+#define self_set_count mn_mail_icon_widget_set_count
+#define self_render_icon mn_mail_icon_widget_render_icon
+#define self_context_changed mn_mail_icon_widget_context_changed
+#define self_invalidate_count_layout mn_mail_icon_widget_invalidate_count_layout
+#define self_redraw mn_mail_icon_widget_redraw
+#define self_blink_timeout_cb mn_mail_icon_widget_blink_timeout_cb
+#define self_new mn_mail_icon_widget_new
+#define self_set_from_stock mn_mail_icon_widget_set_from_stock
+GType
+mn_mail_icon_widget_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNMailIconWidgetClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_mail_icon_widget_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNMailIconWidget),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_mail_icon_widget_init,
+ NULL
+ };
+
+ type = g_type_register_static (GTK_TYPE_DRAWING_AREA, "MNMailIconWidget", &info, (GTypeFlags)0);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNMailIconWidget *)g_object_new(mn_mail_icon_widget_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNMailIconWidget * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNMailIconWidget *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNMailIconWidget *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNMailIconWidget *)g_object_new_valist (mn_mail_icon_widget_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+
+static void
+___dispose (GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::dispose"
+ MNMailIconWidget *self G_GNUC_UNUSED = MN_MAIL_ICON_WIDGET (obj_self);
+#line 109 "mn-mail-icon-widget.gob"
+ ___6_mn_mail_icon_widget_dispose(obj_self);
+#line 139 "mn-mail-icon-widget.c"
+#line 73 "mn-mail-icon-widget.gob"
+ if(self->_priv->count_layout) { g_object_unref ((gpointer) self->_priv->count_layout); self->_priv->count_layout = NULL; }
+#line 142 "mn-mail-icon-widget.c"
+}
+#undef __GOB_FUNCTION__
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::finalize"
+ MNMailIconWidget *self G_GNUC_UNUSED = MN_MAIL_ICON_WIDGET (obj_self);
+ gpointer priv G_GNUC_UNUSED = self->_priv;
+ if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
+#line 95 "mn-mail-icon-widget.gob"
+ if(self->_priv->stock_id) { g_free ((gpointer) self->_priv->stock_id); self->_priv->stock_id = NULL; }
+#line 157 "mn-mail-icon-widget.c"
+}
+#undef __GOB_FUNCTION__
+
+static void
+mn_mail_icon_widget_class_init (MNMailIconWidgetClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::class_init"
+ GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+ GtkWidgetClass *gtk_widget_class = (GtkWidgetClass *)c;
+
+ g_type_class_add_private(c,sizeof(MNMailIconWidgetPrivate));
+
+ parent_class = g_type_class_ref (GTK_TYPE_DRAWING_AREA);
+
+#line 109 "mn-mail-icon-widget.gob"
+ g_object_class->dispose = ___dispose;
+#line 119 "mn-mail-icon-widget.gob"
+ gtk_widget_class->size_request = ___7_mn_mail_icon_widget_size_request;
+#line 141 "mn-mail-icon-widget.gob"
+ gtk_widget_class->expose_event = ___8_mn_mail_icon_widget_expose_event;
+#line 178 "mn-mail-icon-widget.c"
+ g_object_class->finalize = ___finalize;
+ g_object_class->get_property = ___object_get_property;
+ g_object_class->set_property = ___object_set_property;
+ {
+ GParamSpec *param_spec;
+
+ param_spec = g_param_spec_boolean
+ ("blinking" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ FALSE /* default_value */,
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_class_install_property (g_object_class,
+ PROP_BLINKING,
+ param_spec);
+ param_spec = g_param_spec_int
+ ("count" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ G_MININT /* minimum */,
+ G_MAXINT /* maximum */,
+ 0 /* default_value */,
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_class_install_property (g_object_class,
+ PROP_COUNT,
+ param_spec);
+ }
+}
+#undef __GOB_FUNCTION__
+#line 98 "mn-mail-icon-widget.gob"
+static void
+mn_mail_icon_widget_init (MNMailIconWidget * self G_GNUC_UNUSED)
+#line 211 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::init"
+ self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_MAIL_ICON_WIDGET,MNMailIconWidgetPrivate);
+#line 88 "mn-mail-icon-widget.gob"
+ self->_priv->is_on = TRUE;
+#line 217 "mn-mail-icon-widget.c"
+ {
+#line 99 "mn-mail-icon-widget.gob"
+
+ gtk_widget_set_name(GTK_WIDGET(self), "mn-mail-icon");
+
+ g_object_connect(self,
+ "swapped-signal::size-allocate", self_invalidate_count_layout, self,
+ "swapped-signal::style-set", self_context_changed, self,
+ "swapped-signal::direction-changed", self_context_changed, self,
+ NULL);
+
+#line 229 "mn-mail-icon-widget.c"
+ }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_set_property (GObject *object,
+ guint property_id,
+ const GValue *VAL G_GNUC_UNUSED,
+ GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::set_property"
+{
+ MNMailIconWidget *self G_GNUC_UNUSED;
+
+ self = MN_MAIL_ICON_WIDGET (object);
+
+ switch (property_id) {
+ case PROP_BLINKING:
+ {
+#line 49 "mn-mail-icon-widget.gob"
+
+ gboolean blinking = g_value_get_boolean(VAL);
+ if (blinking != selfp->blinking)
+ {
+ selfp->blinking = blinking;
+ if (blinking)
+ {
+ g_assert(selfp->blink_timeout_source == NULL);
+ selfp->blink_timeout_source = mn_g_timeout_add_gdk_locked(500, self_blink_timeout_cb, self);
+ }
+ else
+ {
+ g_assert(selfp->blink_timeout_source != NULL);
+ mn_locked_g_source_clear(&selfp->blink_timeout_source);
+ selfp->is_on = TRUE;
+ gtk_widget_queue_draw(GTK_WIDGET(self));
+ }
+ }
+
+#line 268 "mn-mail-icon-widget.c"
+ }
+ break;
+ case PROP_COUNT:
+ {
+#line 78 "mn-mail-icon-widget.gob"
+
+ int count = g_value_get_int(VAL);
+ if (count != selfp->count)
+ {
+ selfp->count = count;
+ self_invalidate_count_layout(self);
+ gtk_widget_queue_draw(GTK_WIDGET(self));
+ }
+
+#line 283 "mn-mail-icon-widget.c"
+ }
+ break;
+ default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+# undef G_STRLOC
+# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_get_property (GObject *object,
+ guint property_id,
+ GValue *VAL G_GNUC_UNUSED,
+ GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::get_property"
+{
+ MNMailIconWidget *self G_GNUC_UNUSED;
+
+ self = MN_MAIL_ICON_WIDGET (object);
+
+ switch (property_id) {
+ case PROP_BLINKING:
+ {
+#line 69 "mn-mail-icon-widget.gob"
+
+ g_value_set_boolean(VAL, selfp->blinking);
+
+#line 316 "mn-mail-icon-widget.c"
+ }
+ break;
+ case PROP_COUNT:
+ {
+#line 88 "mn-mail-icon-widget.gob"
+
+ g_value_set_int(VAL, selfp->count);
+
+#line 325 "mn-mail-icon-widget.c"
+ }
+ break;
+ default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+# undef G_STRLOC
+# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+#undef __GOB_FUNCTION__
+
+
+#line 69 "mn-mail-icon-widget.gob"
+gboolean
+mn_mail_icon_widget_get_blinking (MNMailIconWidget * self)
+#line 344 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::get_blinking"
+{
+#line 47 "mn-mail-icon-widget.gob"
+ gboolean val; g_object_get (G_OBJECT (self), "blinking", &val, NULL); return val;
+}}
+#line 351 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+
+#line 49 "mn-mail-icon-widget.gob"
+void
+mn_mail_icon_widget_set_blinking (MNMailIconWidget * self, gboolean val)
+#line 357 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::set_blinking"
+{
+#line 47 "mn-mail-icon-widget.gob"
+ g_object_set (G_OBJECT (self), "blinking", val, NULL);
+}}
+#line 364 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+
+#line 88 "mn-mail-icon-widget.gob"
+gint
+mn_mail_icon_widget_get_count (MNMailIconWidget * self)
+#line 370 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::get_count"
+{
+#line 76 "mn-mail-icon-widget.gob"
+ gint val; g_object_get (G_OBJECT (self), "count", &val, NULL); return val;
+}}
+#line 377 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+
+#line 78 "mn-mail-icon-widget.gob"
+void
+mn_mail_icon_widget_set_count (MNMailIconWidget * self, gint val)
+#line 383 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::set_count"
+{
+#line 76 "mn-mail-icon-widget.gob"
+ g_object_set (G_OBJECT (self), "count", val, NULL);
+}}
+#line 390 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+
+
+#line 109 "mn-mail-icon-widget.gob"
+static void
+___6_mn_mail_icon_widget_dispose (GObject * object G_GNUC_UNUSED)
+#line 397 "mn-mail-icon-widget.c"
+#define PARENT_HANDLER(___object) \
+ { if(G_OBJECT_CLASS(parent_class)->dispose) \
+ (* G_OBJECT_CLASS(parent_class)->dispose)(___object); }
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::dispose"
+{
+#line 111 "mn-mail-icon-widget.gob"
+
+ Self *self = SELF(object);
+
+ mn_locked_g_source_clear(&selfp->blink_timeout_source);
+
+ PARENT_HANDLER(object);
+ }}
+#line 412 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 119 "mn-mail-icon-widget.gob"
+static void
+___7_mn_mail_icon_widget_size_request (GtkWidget * widget G_GNUC_UNUSED, GtkRequisition * requisition)
+#line 419 "mn-mail-icon-widget.c"
+#define PARENT_HANDLER(___widget,___requisition) \
+ { if(GTK_WIDGET_CLASS(parent_class)->size_request) \
+ (* GTK_WIDGET_CLASS(parent_class)->size_request)(___widget,___requisition); }
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::size_request"
+{
+#line 121 "mn-mail-icon-widget.gob"
+
+ Self *self = SELF(widget);
+ GdkPixbuf *pixbuf;
+
+ pixbuf = self_render_icon(self);
+
+ if (pixbuf)
+ {
+ requisition->width = gdk_pixbuf_get_width(pixbuf);
+ requisition->height = gdk_pixbuf_get_height(pixbuf);
+
+ g_object_unref(pixbuf);
+ }
+ else
+ {
+ requisition->width = 0;
+ requisition->height = 0;
+ }
+ }}
+#line 446 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 141 "mn-mail-icon-widget.gob"
+static gboolean
+___8_mn_mail_icon_widget_expose_event (GtkWidget * widget G_GNUC_UNUSED, GdkEventExpose * event)
+#line 453 "mn-mail-icon-widget.c"
+#define PARENT_HANDLER(___widget,___event) \
+ ((GTK_WIDGET_CLASS(parent_class)->expose_event)? \
+ (* GTK_WIDGET_CLASS(parent_class)->expose_event)(___widget,___event): \
+ ((gboolean )0))
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::expose_event"
+{
+#line 143 "mn-mail-icon-widget.gob"
+
+ Self *self = SELF(widget);
+
+ self_redraw(self);
+
+ return FALSE; /* propagate event */
+ }}
+#line 469 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 151 "mn-mail-icon-widget.gob"
+static GdkPixbuf *
+mn_mail_icon_widget_render_icon (MNMailIconWidget * self)
+#line 476 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::render_icon"
+#line 151 "mn-mail-icon-widget.gob"
+ g_return_val_if_fail (self != NULL, (GdkPixbuf * )0);
+#line 151 "mn-mail-icon-widget.gob"
+ g_return_val_if_fail (MN_IS_MAIL_ICON_WIDGET (self), (GdkPixbuf * )0);
+#line 483 "mn-mail-icon-widget.c"
+{
+#line 153 "mn-mail-icon-widget.gob"
+
+ if (selfp->stock_id)
+ return gtk_widget_render_icon(GTK_WIDGET(self),
+ selfp->stock_id,
+ selfp->icon_size,
+ NULL);
+ else
+ return NULL;
+ }}
+#line 495 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+
+#line 163 "mn-mail-icon-widget.gob"
+static void
+mn_mail_icon_widget_context_changed (MNMailIconWidget * self)
+#line 501 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::context_changed"
+#line 163 "mn-mail-icon-widget.gob"
+ g_return_if_fail (self != NULL);
+#line 163 "mn-mail-icon-widget.gob"
+ g_return_if_fail (MN_IS_MAIL_ICON_WIDGET (self));
+#line 508 "mn-mail-icon-widget.c"
+{
+#line 165 "mn-mail-icon-widget.gob"
+
+ if (selfp->count_layout)
+ {
+ pango_layout_context_changed(selfp->count_layout);
+ gtk_widget_queue_draw(GTK_WIDGET(self));
+ }
+ }}
+#line 518 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+
+#line 173 "mn-mail-icon-widget.gob"
+static void
+mn_mail_icon_widget_invalidate_count_layout (MNMailIconWidget * self)
+#line 524 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::invalidate_count_layout"
+#line 173 "mn-mail-icon-widget.gob"
+ g_return_if_fail (self != NULL);
+#line 173 "mn-mail-icon-widget.gob"
+ g_return_if_fail (MN_IS_MAIL_ICON_WIDGET (self));
+#line 531 "mn-mail-icon-widget.c"
+{
+#line 175 "mn-mail-icon-widget.gob"
+
+ if (selfp->count_layout)
+ {
+ g_object_unref(selfp->count_layout);
+ selfp->count_layout = NULL;
+ }
+ }}
+#line 541 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+
+#line 183 "mn-mail-icon-widget.gob"
+static void
+mn_mail_icon_widget_redraw (MNMailIconWidget * self)
+#line 547 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::redraw"
+#line 183 "mn-mail-icon-widget.gob"
+ g_return_if_fail (self != NULL);
+#line 183 "mn-mail-icon-widget.gob"
+ g_return_if_fail (MN_IS_MAIL_ICON_WIDGET (self));
+#line 554 "mn-mail-icon-widget.c"
+{
+#line 185 "mn-mail-icon-widget.gob"
+
+ GtkWidget *widget = GTK_WIDGET(self);
+
+ if (! GTK_WIDGET_MAPPED(widget))
+ return;
+
+ if (! selfp->stock_id)
+ return;
+
+ if (selfp->is_on)
+ {
+ GdkPixbuf *pixbuf;
+ int x;
+ int y;
+
+ pixbuf = self_render_icon(self);
+
+ x = floor(widget->allocation.x + ((widget->allocation.width - widget->requisition.width) * ICON_XALIGN));
+ y = floor(widget->allocation.y + ((widget->allocation.height - widget->requisition.height) * ICON_YALIGN));
+
+ gdk_draw_pixbuf(widget->window,
+ widget->style->black_gc,
+ pixbuf,
+ 0,
+ 0,
+ x,
+ y,
+ -1,
+ -1,
+ GDK_RGB_DITHER_NORMAL,
+ 0,
+ 0);
+
+ g_object_unref(pixbuf);
+ }
+ else
+ gdk_window_clear(widget->window);
+
+ if (selfp->count)
+ {
+ PangoRectangle count_rect;
+ int count_x;
+ int count_y;
+ int box_x;
+ int box_y;
+ int box_width;
+ int box_height;
+
+ if (! selfp->count_layout)
+ {
+ const char *size;
+ char *markup;
+
+ if (widget->allocation.height < 32)
+ size = "small";
+ else
+ size = "medium";
+
+ selfp->count_layout = gtk_widget_create_pango_layout(widget, NULL);
+
+ markup = g_strdup_printf("<span size=\"%s\">%i</span>", size, selfp->count);
+ pango_layout_set_markup(selfp->count_layout, markup, -1);
+ g_free(markup);
+ }
+
+ pango_layout_get_pixel_extents(selfp->count_layout, &count_rect, NULL);
+
+ box_width = count_rect.width + COUNT_BOX_XPAD * 2;
+ box_height = count_rect.height + COUNT_BOX_YPAD * 2;
+
+ box_x = widget->allocation.width - box_width - COUNT_BOX_XMARGIN;
+ box_y = widget->allocation.height - box_height - COUNT_BOX_YMARGIN;
+
+ count_x = box_x - count_rect.x + COUNT_BOX_XPAD;
+ count_y = box_y - count_rect.y + COUNT_BOX_YPAD;
+
+ gtk_paint_box(widget->style,
+ widget->window,
+ GTK_WIDGET_STATE(widget),
+ GTK_SHADOW_OUT,
+ NULL,
+ widget,
+ NULL,
+ box_x,
+ box_y,
+ box_width,
+ box_height);
+
+ gdk_draw_layout(widget->window,
+ widget->style->text_gc[GTK_WIDGET_STATE(widget)],
+ count_x,
+ count_y,
+ selfp->count_layout);
+ }
+ }}
+#line 652 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+
+#line 281 "mn-mail-icon-widget.gob"
+static gboolean
+mn_mail_icon_widget_blink_timeout_cb (gpointer data)
+#line 658 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::blink_timeout_cb"
+{
+#line 283 "mn-mail-icon-widget.gob"
+
+ Self *self = data;
+
+ selfp->is_on = ! selfp->is_on;
+
+ gtk_widget_queue_draw(GTK_WIDGET(self));
+
+ return TRUE;
+ }}
+#line 672 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+
+#line 293 "mn-mail-icon-widget.gob"
+GtkWidget *
+mn_mail_icon_widget_new (void)
+#line 678 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::new"
+{
+#line 295 "mn-mail-icon-widget.gob"
+
+ return GTK_WIDGET(GET_NEW);
+ }}
+#line 686 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
+
+#line 299 "mn-mail-icon-widget.gob"
+void
+mn_mail_icon_widget_set_from_stock (MNMailIconWidget * self, const char * stock_id, GtkIconSize icon_size)
+#line 692 "mn-mail-icon-widget.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon:Widget::set_from_stock"
+#line 299 "mn-mail-icon-widget.gob"
+ g_return_if_fail (self != NULL);
+#line 299 "mn-mail-icon-widget.gob"
+ g_return_if_fail (MN_IS_MAIL_ICON_WIDGET (self));
+#line 299 "mn-mail-icon-widget.gob"
+ g_return_if_fail (stock_id != NULL);
+#line 701 "mn-mail-icon-widget.c"
+{
+#line 303 "mn-mail-icon-widget.gob"
+
+ g_free(selfp->stock_id);
+ selfp->stock_id = g_strdup(stock_id);
+ selfp->icon_size = icon_size;
+
+ /* affects the size request: call queue_resize(), not queue_draw() */
+ gtk_widget_queue_resize(GTK_WIDGET(self));
+ }}
+#line 712 "mn-mail-icon-widget.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-mail-icon-widget.gob b/src/mn-mail-icon-widget.gob
@@ -0,0 +1,311 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%headertop{
+#include <gtk/gtk.h>
+%}
+
+%privateheader{
+#include "mn-locked-callback.h"
+%}
+
+%{
+#include "config.h"
+#include <math.h>
+
+#define ICON_XALIGN 0.5
+#define ICON_YALIGN 0.5
+
+#define COUNT_BOX_XPAD 3
+#define COUNT_BOX_YPAD 3
+
+#define COUNT_BOX_XMARGIN 0
+#define COUNT_BOX_YMARGIN 0
+%}
+
+class MN:Mail:Icon:Widget from Gtk:Drawing:Area
+{
+ private gboolean blinking;
+ property BOOLEAN blinking (export)
+ set
+ {
+ gboolean blinking = g_value_get_boolean(VAL);
+ if (blinking != selfp->blinking)
+ {
+ selfp->blinking = blinking;
+ if (blinking)
+ {
+ g_assert(selfp->blink_timeout_source == NULL);
+ selfp->blink_timeout_source = mn_g_timeout_add_gdk_locked(500, self_blink_timeout_cb, self);
+ }
+ else
+ {
+ g_assert(selfp->blink_timeout_source != NULL);
+ mn_locked_g_source_clear(&selfp->blink_timeout_source);
+ selfp->is_on = TRUE;
+ gtk_widget_queue_draw(GTK_WIDGET(self));
+ }
+ }
+ }
+ get
+ {
+ g_value_set_boolean(VAL, selfp->blinking);
+ };
+
+ private PangoLayout *count_layout unrefwith g_object_unref;
+
+ private int count;
+ property INT count (export)
+ set
+ {
+ int count = g_value_get_int(VAL);
+ if (count != selfp->count)
+ {
+ selfp->count = count;
+ self_invalidate_count_layout(self);
+ gtk_widget_queue_draw(GTK_WIDGET(self));
+ }
+ }
+ get
+ {
+ g_value_set_int(VAL, selfp->count);
+ };
+
+ private MNLockedGSource *blink_timeout_source;
+ private gboolean is_on = TRUE; /* is currently displaying the image? */
+
+ private char *stock_id destroywith g_free;
+ private GtkIconSize icon_size;
+
+ init (self)
+ {
+ gtk_widget_set_name(GTK_WIDGET(self), "mn-mail-icon");
+
+ g_object_connect(self,
+ "swapped-signal::size-allocate", self_invalidate_count_layout, self,
+ "swapped-signal::style-set", self_context_changed, self,
+ "swapped-signal::direction-changed", self_context_changed, self,
+ NULL);
+ }
+
+ override (G:Object) void
+ dispose (GObject *object)
+ {
+ Self *self = SELF(object);
+
+ mn_locked_g_source_clear(&selfp->blink_timeout_source);
+
+ PARENT_HANDLER(object);
+ }
+
+ override (Gtk:Widget) void
+ size_request (GtkWidget *widget, GtkRequisition *requisition)
+ {
+ Self *self = SELF(widget);
+ GdkPixbuf *pixbuf;
+
+ pixbuf = self_render_icon(self);
+
+ if (pixbuf)
+ {
+ requisition->width = gdk_pixbuf_get_width(pixbuf);
+ requisition->height = gdk_pixbuf_get_height(pixbuf);
+
+ g_object_unref(pixbuf);
+ }
+ else
+ {
+ requisition->width = 0;
+ requisition->height = 0;
+ }
+ }
+
+ override (Gtk:Widget) gboolean
+ expose_event (GtkWidget *widget, GdkEventExpose *event)
+ {
+ Self *self = SELF(widget);
+
+ self_redraw(self);
+
+ return FALSE; /* propagate event */
+ }
+
+ private GdkPixbuf *
+ render_icon (self)
+ {
+ if (selfp->stock_id)
+ return gtk_widget_render_icon(GTK_WIDGET(self),
+ selfp->stock_id,
+ selfp->icon_size,
+ NULL);
+ else
+ return NULL;
+ }
+
+ private void
+ context_changed (self)
+ {
+ if (selfp->count_layout)
+ {
+ pango_layout_context_changed(selfp->count_layout);
+ gtk_widget_queue_draw(GTK_WIDGET(self));
+ }
+ }
+
+ private void
+ invalidate_count_layout (self)
+ {
+ if (selfp->count_layout)
+ {
+ g_object_unref(selfp->count_layout);
+ selfp->count_layout = NULL;
+ }
+ }
+
+ private void
+ redraw (self)
+ {
+ GtkWidget *widget = GTK_WIDGET(self);
+
+ if (! GTK_WIDGET_MAPPED(widget))
+ return;
+
+ if (! selfp->stock_id)
+ return;
+
+ if (selfp->is_on)
+ {
+ GdkPixbuf *pixbuf;
+ int x;
+ int y;
+
+ pixbuf = self_render_icon(self);
+
+ x = floor(widget->allocation.x + ((widget->allocation.width - widget->requisition.width) * ICON_XALIGN));
+ y = floor(widget->allocation.y + ((widget->allocation.height - widget->requisition.height) * ICON_YALIGN));
+
+ gdk_draw_pixbuf(widget->window,
+ widget->style->black_gc,
+ pixbuf,
+ 0,
+ 0,
+ x,
+ y,
+ -1,
+ -1,
+ GDK_RGB_DITHER_NORMAL,
+ 0,
+ 0);
+
+ g_object_unref(pixbuf);
+ }
+ else
+ gdk_window_clear(widget->window);
+
+ if (selfp->count)
+ {
+ PangoRectangle count_rect;
+ int count_x;
+ int count_y;
+ int box_x;
+ int box_y;
+ int box_width;
+ int box_height;
+
+ if (! selfp->count_layout)
+ {
+ const char *size;
+ char *markup;
+
+ if (widget->allocation.height < 32)
+ size = "small";
+ else
+ size = "medium";
+
+ selfp->count_layout = gtk_widget_create_pango_layout(widget, NULL);
+
+ markup = g_strdup_printf("<span size=\"%s\">%i</span>", size, selfp->count);
+ pango_layout_set_markup(selfp->count_layout, markup, -1);
+ g_free(markup);
+ }
+
+ pango_layout_get_pixel_extents(selfp->count_layout, &count_rect, NULL);
+
+ box_width = count_rect.width + COUNT_BOX_XPAD * 2;
+ box_height = count_rect.height + COUNT_BOX_YPAD * 2;
+
+ box_x = widget->allocation.width - box_width - COUNT_BOX_XMARGIN;
+ box_y = widget->allocation.height - box_height - COUNT_BOX_YMARGIN;
+
+ count_x = box_x - count_rect.x + COUNT_BOX_XPAD;
+ count_y = box_y - count_rect.y + COUNT_BOX_YPAD;
+
+ gtk_paint_box(widget->style,
+ widget->window,
+ GTK_WIDGET_STATE(widget),
+ GTK_SHADOW_OUT,
+ NULL,
+ widget,
+ NULL,
+ box_x,
+ box_y,
+ box_width,
+ box_height);
+
+ gdk_draw_layout(widget->window,
+ widget->style->text_gc[GTK_WIDGET_STATE(widget)],
+ count_x,
+ count_y,
+ selfp->count_layout);
+ }
+ }
+
+ private gboolean
+ blink_timeout_cb (gpointer data)
+ {
+ Self *self = data;
+
+ selfp->is_on = ! selfp->is_on;
+
+ gtk_widget_queue_draw(GTK_WIDGET(self));
+
+ return TRUE;
+ }
+
+ public GtkWidget *
+ new (void)
+ {
+ return GTK_WIDGET(GET_NEW);
+ }
+
+ public void
+ set_from_stock (self,
+ const char *stock_id (check null),
+ GtkIconSize icon_size)
+ {
+ g_free(selfp->stock_id);
+ selfp->stock_id = g_strdup(stock_id);
+ selfp->icon_size = icon_size;
+
+ /* affects the size request: call queue_resize(), not queue_draw() */
+ gtk_widget_queue_resize(GTK_WIDGET(self));
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-mail-icon-widget.gob.stamp
diff --git a/src/mn-mail-icon-widget.h b/src/mn-mail-icon-widget.h
@@ -0,0 +1,88 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include <gtk/gtk.h>
+
+#ifndef __MN_MAIL_ICON_WIDGET_H__
+#define __MN_MAIL_ICON_WIDGET_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_MAIL_ICON_WIDGET (mn_mail_icon_widget_get_type())
+#define MN_MAIL_ICON_WIDGET(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mail_icon_widget_get_type(), MNMailIconWidget)
+#define MN_MAIL_ICON_WIDGET_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_mail_icon_widget_get_type(), MNMailIconWidget const)
+#define MN_MAIL_ICON_WIDGET_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_mail_icon_widget_get_type(), MNMailIconWidgetClass)
+#define MN_IS_MAIL_ICON_WIDGET(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_mail_icon_widget_get_type ())
+
+#define MN_MAIL_ICON_WIDGET_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_mail_icon_widget_get_type(), MNMailIconWidgetClass)
+
+/* Private structure type */
+typedef struct _MNMailIconWidgetPrivate MNMailIconWidgetPrivate;
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_MAIL_ICON_WIDGET__
+#define __TYPEDEF_MN_MAIL_ICON_WIDGET__
+typedef struct _MNMailIconWidget MNMailIconWidget;
+#endif
+struct _MNMailIconWidget {
+ GtkDrawingArea __parent__;
+ /*< private >*/
+ MNMailIconWidgetPrivate *_priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNMailIconWidgetClass MNMailIconWidgetClass;
+struct _MNMailIconWidgetClass {
+ GtkDrawingAreaClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_mail_icon_widget_get_type (void);
+gboolean mn_mail_icon_widget_get_blinking (MNMailIconWidget * self);
+void mn_mail_icon_widget_set_blinking (MNMailIconWidget * self,
+ gboolean val);
+gint mn_mail_icon_widget_get_count (MNMailIconWidget * self);
+void mn_mail_icon_widget_set_count (MNMailIconWidget * self,
+ gint val);
+GtkWidget * mn_mail_icon_widget_new (void);
+void mn_mail_icon_widget_set_from_stock (MNMailIconWidget * self,
+ const char * stock_id,
+ GtkIconSize icon_size);
+
+/*
+ * Argument wrapping macros
+ */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_MAIL_ICON_WIDGET_PROP_BLINKING(arg) "blinking", __extension__ ({gboolean z = (arg); z;})
+#define MN_MAIL_ICON_WIDGET_GET_PROP_BLINKING(arg) "blinking", __extension__ ({gboolean *z = (arg); z;})
+#define MN_MAIL_ICON_WIDGET_PROP_COUNT(arg) "count", __extension__ ({gint z = (arg); z;})
+#define MN_MAIL_ICON_WIDGET_GET_PROP_COUNT(arg) "count", __extension__ ({gint *z = (arg); z;})
+#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_MAIL_ICON_WIDGET_PROP_BLINKING(arg) "blinking",(gboolean )(arg)
+#define MN_MAIL_ICON_WIDGET_GET_PROP_BLINKING(arg) "blinking",(gboolean *)(arg)
+#define MN_MAIL_ICON_WIDGET_PROP_COUNT(arg) "count",(gint )(arg)
+#define MN_MAIL_ICON_WIDGET_GET_PROP_COUNT(arg) "count",(gint *)(arg)
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-mail-icon.c b/src/mn-mail-icon.c
@@ -22,15 +22,16 @@
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */
-#line 32 "mn-mail-icon.gob"
+#line 37 "mn-mail-icon.gob"
#include "config.h"
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
#include "mn-stock.h"
#include "mn-util.h"
+#include "mn-mail-icon-widget.h"
-#line 34 "mn-mail-icon.c"
+#line 35 "mn-mail-icon.c"
/* self casting macros */
#define SELF(x) MN_MAIL_ICON(x)
#define SELF_CONST(x) MN_MAIL_ICON_CONST(x)
@@ -45,20 +46,22 @@ typedef MNMailIcon Self;
typedef MNMailIconClass SelfClass;
/* here are local prototypes */
+static void mn_mail_icon_class_init (MNMailIconClass * c) G_GNUC_UNUSED;
static void mn_mail_icon_activate (MNMailIcon * self) G_GNUC_UNUSED;
static void mn_mail_icon_activate_mail_reader (MNMailIcon * self) G_GNUC_UNUSED;
static void mn_mail_icon_activate_open_latest_message (MNMailIcon * self) G_GNUC_UNUSED;
+static void mn_mail_icon_activate_consider_new_mail_as_read (MNMailIcon * self) G_GNUC_UNUSED;
static void mn_mail_icon_activate_update (MNMailIcon * self) G_GNUC_UNUSED;
static void mn_mail_icon_activate_properties (MNMailIcon * self) G_GNUC_UNUSED;
static void mn_mail_icon_activate_help (MNMailIcon * self) G_GNUC_UNUSED;
static void mn_mail_icon_activate_about (MNMailIcon * self) G_GNUC_UNUSED;
static void mn_mail_icon_activate_remove (MNMailIcon * self) G_GNUC_UNUSED;
-static void mn_mail_icon_class_init (MNMailIconClass * class) G_GNUC_UNUSED;
static void mn_mail_icon_init (MNMailIcon * self) G_GNUC_UNUSED;
-static gboolean mn_mail_icon_show_help_h (GtkWidget * widget, GtkWidgetHelpType help_type, gpointer user_data) G_GNUC_UNUSED;
+static void mn_mail_icon_size_allocate_h (GtkWidget * widget, GtkAllocation * allocation, gpointer user_data) G_GNUC_UNUSED;
+static GtkIconSize mn_mail_icon_find_icon_size (GtkWidget * widget, int pixel_size) G_GNUC_UNUSED;
+static void mn_mail_icon_update_image (MNMailIcon * self) G_GNUC_UNUSED;
static gboolean mn_mail_icon_button_press_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data) G_GNUC_UNUSED;
static gboolean mn_mail_icon_button_release_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data) G_GNUC_UNUSED;
-static gboolean mn_mail_icon_popup_menu_h (GtkWidget * widget, gpointer user_data) G_GNUC_UNUSED;
static void mn_mail_icon_popup_menu_position_cb (GtkMenu * menu, int * x, int * y, gboolean * push_in, gpointer user_data) G_GNUC_UNUSED;
/*
@@ -73,6 +76,9 @@ static void mn_mail_icon_popup_menu_position_cb (GtkMenu * menu, int * x, int *
#define self_connect__activate_open_latest_message(object,func,data) mn_mail_icon_connect__activate_open_latest_message((object),(func),(data))
#define self_connect_after__activate_open_latest_message(object,func,data) mn_mail_icon_connect_after__activate_open_latest_message((object),(func),(data))
#define self_connect_data__activate_open_latest_message(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_open_latest_message((object),(func),(data),(destroy_data),(flags))
+#define self_connect__activate_consider_new_mail_as_read(object,func,data) mn_mail_icon_connect__activate_consider_new_mail_as_read((object),(func),(data))
+#define self_connect_after__activate_consider_new_mail_as_read(object,func,data) mn_mail_icon_connect_after__activate_consider_new_mail_as_read((object),(func),(data))
+#define self_connect_data__activate_consider_new_mail_as_read(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_consider_new_mail_as_read((object),(func),(data),(destroy_data),(flags))
#define self_connect__activate_update(object,func,data) mn_mail_icon_connect__activate_update((object),(func),(data))
#define self_connect_after__activate_update(object,func,data) mn_mail_icon_connect_after__activate_update((object),(func),(data))
#define self_connect_data__activate_update(object,func,data,destroy_data,flags) mn_mail_icon_connect_data__activate_update((object),(func),(data),(destroy_data),(flags))
@@ -93,6 +99,7 @@ enum {
ACTIVATE_SIGNAL,
ACTIVATE_MAIL_READER_SIGNAL,
ACTIVATE_OPEN_LATEST_MESSAGE_SIGNAL,
+ ACTIVATE_CONSIDER_NEW_MAIL_AS_READ_SIGNAL,
ACTIVATE_UPDATE_SIGNAL,
ACTIVATE_PROPERTIES_SIGNAL,
ACTIVATE_HELP_SIGNAL,
@@ -110,16 +117,21 @@ static EggTrayIconClass *parent_class = NULL;
#define self_activate mn_mail_icon_activate
#define self_activate_mail_reader mn_mail_icon_activate_mail_reader
#define self_activate_open_latest_message mn_mail_icon_activate_open_latest_message
+#define self_activate_consider_new_mail_as_read mn_mail_icon_activate_consider_new_mail_as_read
#define self_activate_update mn_mail_icon_activate_update
#define self_activate_properties mn_mail_icon_activate_properties
#define self_activate_help mn_mail_icon_activate_help
#define self_activate_about mn_mail_icon_activate_about
#define self_activate_remove mn_mail_icon_activate_remove
-#define self_show_help_h mn_mail_icon_show_help_h
+#define self_size_allocate_h mn_mail_icon_size_allocate_h
+#define self_find_icon_size mn_mail_icon_find_icon_size
+#define self_update_image mn_mail_icon_update_image
#define self_button_press_event_h mn_mail_icon_button_press_event_h
#define self_button_release_event_h mn_mail_icon_button_release_event_h
-#define self_popup_menu_h mn_mail_icon_popup_menu_h
#define self_popup_menu_position_cb mn_mail_icon_popup_menu_position_cb
+#define self_set_from_stock mn_mail_icon_set_from_stock
+#define self_set_blinking mn_mail_icon_set_blinking
+#define self_set_count mn_mail_icon_set_count
#define self_set_tip mn_mail_icon_set_tip
#define self_set_tip_widget mn_mail_icon_set_tip_widget
#define self_new mn_mail_icon_new
@@ -173,9 +185,9 @@ ___dispose (GObject *obj_self)
MNMailIcon *self G_GNUC_UNUSED = MN_MAIL_ICON (obj_self);
if (G_OBJECT_CLASS (parent_class)->dispose) \
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 42 "mn-mail-icon.gob"
+#line 48 "mn-mail-icon.gob"
if(self->_priv->tooltips) { g_object_unref ((gpointer) self->_priv->tooltips); self->_priv->tooltips = NULL; }
-#line 179 "mn-mail-icon.c"
+#line 191 "mn-mail-icon.c"
}
#undef __GOB_FUNCTION__
@@ -188,21 +200,22 @@ ___finalize(GObject *obj_self)
gpointer priv G_GNUC_UNUSED = self->_priv;
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 46 "mn-mail-icon.gob"
+#line 51 "mn-mail-icon.gob"
+ if(self->_priv->stock_id) { g_free ((gpointer) self->_priv->stock_id); self->_priv->stock_id = NULL; }
+#line 206 "mn-mail-icon.c"
+#line 54 "mn-mail-icon.gob"
if(self->_priv->menu) { gtk_widget_destroy ((gpointer) self->_priv->menu); self->_priv->menu = NULL; }
-#line 194 "mn-mail-icon.c"
+#line 209 "mn-mail-icon.c"
}
#undef __GOB_FUNCTION__
-#line 68 "mn-mail-icon.gob"
static void
-mn_mail_icon_class_init (MNMailIconClass * class G_GNUC_UNUSED)
-#line 201 "mn-mail-icon.c"
+mn_mail_icon_class_init (MNMailIconClass * c G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
+ GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
- g_type_class_add_private(class,sizeof(MNMailIconPrivate));
+ g_type_class_add_private(c,sizeof(MNMailIconPrivate));
parent_class = g_type_class_ref (EGG_TYPE_TRAY_ICON);
@@ -230,6 +243,14 @@ mn_mail_icon_class_init (MNMailIconClass * class G_GNUC_UNUSED)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ object_signals[ACTIVATE_CONSIDER_NEW_MAIL_AS_READ_SIGNAL] =
+ g_signal_new ("activate_consider_new_mail_as_read",
+ G_TYPE_FROM_CLASS (g_object_class),
+ (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
+ G_STRUCT_OFFSET (MNMailIconClass, activate_consider_new_mail_as_read),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
object_signals[ACTIVATE_UPDATE_SIGNAL] =
g_signal_new ("activate_update",
G_TYPE_FROM_CLASS (g_object_class),
@@ -271,53 +292,37 @@ mn_mail_icon_class_init (MNMailIconClass * class G_GNUC_UNUSED)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- class->activate = NULL;
- class->activate_mail_reader = NULL;
- class->activate_open_latest_message = NULL;
- class->activate_update = NULL;
- class->activate_properties = NULL;
- class->activate_help = NULL;
- class->activate_about = NULL;
- class->activate_remove = NULL;
+ c->activate = NULL;
+ c->activate_mail_reader = NULL;
+ c->activate_open_latest_message = NULL;
+ c->activate_consider_new_mail_as_read = NULL;
+ c->activate_update = NULL;
+ c->activate_properties = NULL;
+ c->activate_help = NULL;
+ c->activate_about = NULL;
+ c->activate_remove = NULL;
g_object_class->dispose = ___dispose;
g_object_class->finalize = ___finalize;
- {
-#line 69 "mn-mail-icon.gob"
-
- GtkBindingSet *binding_set;
-
- binding_set = gtk_binding_set_by_class(class);
-
- /* HIG 2.0 key bindings */
-
- gtk_binding_entry_add_signal(binding_set, GDK_space, 0, "activate", 0);
-
- gtk_binding_entry_add_signal(binding_set, GDK_Return, GDK_MOD1_MASK, "activate-properties", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_ISO_Enter, GDK_MOD1_MASK, "activate-properties", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_KP_Enter, GDK_MOD1_MASK, "activate-properties", 0);
-
-#line 300 "mn-mail-icon.c"
- }
}
#undef __GOB_FUNCTION__
-#line 83 "mn-mail-icon.gob"
+#line 79 "mn-mail-icon.gob"
static void
mn_mail_icon_init (MNMailIcon * self G_GNUC_UNUSED)
-#line 307 "mn-mail-icon.c"
+#line 312 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_MAIL_ICON,MNMailIconPrivate);
-#line 42 "mn-mail-icon.gob"
+#line 48 "mn-mail-icon.gob"
self->_priv->tooltips = mn_tooltips_new();
-#line 313 "mn-mail-icon.c"
-#line 44 "mn-mail-icon.gob"
- self->image = mn_blinking_image_new();
-#line 316 "mn-mail-icon.c"
-#line 46 "mn-mail-icon.gob"
+#line 318 "mn-mail-icon.c"
+#line 49 "mn-mail-icon.gob"
+ self->_priv->widget = mn_mail_icon_widget_new();
+#line 321 "mn-mail-icon.c"
+#line 54 "mn-mail-icon.gob"
self->_priv->menu = gtk_menu_new();
-#line 319 "mn-mail-icon.c"
+#line 324 "mn-mail-icon.c"
{
-#line 84 "mn-mail-icon.gob"
+#line 80 "mn-mail-icon.gob"
GtkMenuShell *shell;
GtkWidget *properties_item;
@@ -330,51 +335,57 @@ mn_mail_icon_init (MNMailIcon * self G_GNUC_UNUSED)
self->mail_reader_item = mn_menu_shell_append(shell, MN_STOCK_MAIL_READER, _("_Mail Reader"));
/* translators: header capitalization */
self->open_latest_message_item = mn_menu_shell_append(shell, MN_STOCK_OPEN_MESSAGE, _("_Open Latest Message"));
+
+ mn_menu_shell_append(shell, NULL, NULL);
+
+ /* translators: header capitalization */
+ self->consider_new_mail_as_read_item = mn_menu_shell_append(shell, MN_STOCK_CONSIDER_NEW_MAIL_AS_READ, _("_Consider New Mail as Read"));
/* translators: header capitalization */
self->update_item = mn_menu_shell_append(shell, GTK_STOCK_REFRESH, _("_Update"));
+
mn_menu_shell_append(shell, NULL, NULL);
+
properties_item = mn_menu_shell_append(shell, GTK_STOCK_PROPERTIES, NULL);
help_item = mn_menu_shell_append(shell, GTK_STOCK_HELP, NULL);
about_item = mn_menu_shell_append(shell, GTK_STOCK_ABOUT, NULL);
+
mn_menu_shell_append(shell, NULL, NULL);
+
/* translators: header capitalization */
remove_item = mn_menu_shell_append(shell, GTK_STOCK_REMOVE, _("R_emove From Notification Area"));
g_signal_connect_swapped(self->mail_reader_item, "activate", G_CALLBACK(self_activate_mail_reader), self);
g_signal_connect_swapped(self->open_latest_message_item, "activate", G_CALLBACK(self_activate_open_latest_message), self);
+ g_signal_connect_swapped(self->consider_new_mail_as_read_item, "activate", G_CALLBACK(self_activate_consider_new_mail_as_read), self);
g_signal_connect_swapped(self->update_item, "activate", G_CALLBACK(self_activate_update), self);
g_signal_connect_swapped(properties_item, "activate", G_CALLBACK(self_activate_properties), self);
g_signal_connect_swapped(help_item, "activate", G_CALLBACK(self_activate_help), self);
g_signal_connect_swapped(about_item, "activate", G_CALLBACK(self_activate_about), self);
g_signal_connect_swapped(remove_item, "activate", G_CALLBACK(self_activate_remove), self);
- selfp->event_box = gtk_event_box_new();
- GTK_WIDGET_SET_FLAGS(selfp->event_box, GTK_CAN_FOCUS);
- gtk_event_box_set_visible_window(GTK_EVENT_BOX(selfp->event_box), FALSE);
- mn_setup_dnd(selfp->event_box);
+ gtk_widget_add_events(GTK_WIDGET(self), GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
- gtk_container_add(GTK_CONTAINER(selfp->event_box), self->image);
- gtk_container_add(GTK_CONTAINER(self), selfp->event_box);
+ gtk_container_add(GTK_CONTAINER(self), selfp->widget);
- g_object_connect(selfp->event_box,
- "signal::show-help", self_show_help_h, self,
+ g_object_connect(self,
"signal::button-press-event", self_button_press_event_h, self,
"signal::button-release-event", self_button_release_event_h, self,
- "signal::popup-menu", self_popup_menu_h, self,
NULL);
- gtk_widget_show(self->image);
- gtk_widget_show(selfp->event_box);
+ g_signal_connect(selfp->widget, "size-allocate", G_CALLBACK(self_size_allocate_h), self);
+
+ gtk_widget_show(selfp->widget);
-#line 370 "mn-mail-icon.c"
+#line 380 "mn-mail-icon.c"
}
}
#undef __GOB_FUNCTION__
-#line 51 "mn-mail-icon.gob"
+
+#line 60 "mn-mail-icon.gob"
static void
mn_mail_icon_activate (MNMailIcon * self)
-#line 378 "mn-mail-icon.c"
+#line 389 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -382,11 +393,11 @@ mn_mail_icon_activate (MNMailIcon * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 51 "mn-mail-icon.gob"
+#line 60 "mn-mail-icon.gob"
g_return_if_fail (self != NULL);
-#line 51 "mn-mail-icon.gob"
+#line 60 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 390 "mn-mail-icon.c"
+#line 401 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -400,10 +411,10 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 53 "mn-mail-icon.gob"
+#line 62 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_mail_reader (MNMailIcon * self)
-#line 407 "mn-mail-icon.c"
+#line 418 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -411,11 +422,11 @@ mn_mail_icon_activate_mail_reader (MNMailIcon * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 53 "mn-mail-icon.gob"
+#line 62 "mn-mail-icon.gob"
g_return_if_fail (self != NULL);
-#line 53 "mn-mail-icon.gob"
+#line 62 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 419 "mn-mail-icon.c"
+#line 430 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -429,10 +440,10 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 55 "mn-mail-icon.gob"
+#line 64 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_open_latest_message (MNMailIcon * self)
-#line 436 "mn-mail-icon.c"
+#line 447 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -440,11 +451,11 @@ mn_mail_icon_activate_open_latest_message (MNMailIcon * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 55 "mn-mail-icon.gob"
+#line 64 "mn-mail-icon.gob"
g_return_if_fail (self != NULL);
-#line 55 "mn-mail-icon.gob"
+#line 64 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 448 "mn-mail-icon.c"
+#line 459 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -458,10 +469,39 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 57 "mn-mail-icon.gob"
+#line 66 "mn-mail-icon.gob"
+static void
+mn_mail_icon_activate_consider_new_mail_as_read (MNMailIcon * self)
+#line 476 "mn-mail-icon.c"
+{
+ GValue ___param_values[1];
+ GValue ___return_val;
+
+memset (&___return_val, 0, sizeof (___return_val));
+memset (&___param_values, 0, sizeof (___param_values));
+
+#line 66 "mn-mail-icon.gob"
+ g_return_if_fail (self != NULL);
+#line 66 "mn-mail-icon.gob"
+ g_return_if_fail (MN_IS_MAIL_ICON (self));
+#line 488 "mn-mail-icon.c"
+
+ ___param_values[0].g_type = 0;
+ g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
+ g_value_set_instance (&___param_values[0], (gpointer) self);
+
+ g_signal_emitv (___param_values,
+ object_signals[ACTIVATE_CONSIDER_NEW_MAIL_AS_READ_SIGNAL],
+ 0 /* detail */,
+ &___return_val);
+
+ g_value_unset (&___param_values[0]);
+}
+
+#line 68 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_update (MNMailIcon * self)
-#line 465 "mn-mail-icon.c"
+#line 505 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -469,11 +509,11 @@ mn_mail_icon_activate_update (MNMailIcon * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 57 "mn-mail-icon.gob"
+#line 68 "mn-mail-icon.gob"
g_return_if_fail (self != NULL);
-#line 57 "mn-mail-icon.gob"
+#line 68 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 477 "mn-mail-icon.c"
+#line 517 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -487,10 +527,10 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 59 "mn-mail-icon.gob"
+#line 70 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_properties (MNMailIcon * self)
-#line 494 "mn-mail-icon.c"
+#line 534 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -498,11 +538,11 @@ mn_mail_icon_activate_properties (MNMailIcon * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 59 "mn-mail-icon.gob"
+#line 70 "mn-mail-icon.gob"
g_return_if_fail (self != NULL);
-#line 59 "mn-mail-icon.gob"
+#line 70 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 506 "mn-mail-icon.c"
+#line 546 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -516,10 +556,10 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 61 "mn-mail-icon.gob"
+#line 72 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_help (MNMailIcon * self)
-#line 523 "mn-mail-icon.c"
+#line 563 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -527,11 +567,11 @@ mn_mail_icon_activate_help (MNMailIcon * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 61 "mn-mail-icon.gob"
+#line 72 "mn-mail-icon.gob"
g_return_if_fail (self != NULL);
-#line 61 "mn-mail-icon.gob"
+#line 72 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 535 "mn-mail-icon.c"
+#line 575 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -545,10 +585,10 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 63 "mn-mail-icon.gob"
+#line 74 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_about (MNMailIcon * self)
-#line 552 "mn-mail-icon.c"
+#line 592 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -556,11 +596,11 @@ mn_mail_icon_activate_about (MNMailIcon * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 63 "mn-mail-icon.gob"
+#line 74 "mn-mail-icon.gob"
g_return_if_fail (self != NULL);
-#line 63 "mn-mail-icon.gob"
+#line 74 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 564 "mn-mail-icon.c"
+#line 604 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -574,10 +614,10 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 65 "mn-mail-icon.gob"
+#line 76 "mn-mail-icon.gob"
static void
mn_mail_icon_activate_remove (MNMailIcon * self)
-#line 581 "mn-mail-icon.c"
+#line 621 "mn-mail-icon.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -585,11 +625,11 @@ mn_mail_icon_activate_remove (MNMailIcon * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 65 "mn-mail-icon.gob"
+#line 76 "mn-mail-icon.gob"
g_return_if_fail (self != NULL);
-#line 65 "mn-mail-icon.gob"
+#line 76 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 593 "mn-mail-icon.c"
+#line 633 "mn-mail-icon.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -604,35 +644,114 @@ memset (&___param_values, 0, sizeof (___param_values));
}
+#line 134 "mn-mail-icon.gob"
+static void
+mn_mail_icon_size_allocate_h (GtkWidget * widget, GtkAllocation * allocation, gpointer user_data)
+#line 651 "mn-mail-icon.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon::size_allocate_h"
+{
+#line 138 "mn-mail-icon.gob"
+
+ Self *self = user_data;
+ GtkOrientation orientation;
+ int size;
-#line 133 "mn-mail-icon.gob"
-static gboolean
-mn_mail_icon_show_help_h (GtkWidget * widget, GtkWidgetHelpType help_type, gpointer user_data)
-#line 612 "mn-mail-icon.c"
+ orientation = egg_tray_icon_get_orientation(EGG_TRAY_ICON(self));
+
+ if (orientation == GTK_ORIENTATION_HORIZONTAL)
+ size = allocation->height;
+ else
+ size = allocation->width;
+
+ if (selfp->size != size)
+ {
+ selfp->size = size;
+ self_update_image(self);
+ }
+ }}
+#line 674 "mn-mail-icon.c"
+#undef __GOB_FUNCTION__
+
+#line 157 "mn-mail-icon.gob"
+static GtkIconSize
+mn_mail_icon_find_icon_size (GtkWidget * widget, int pixel_size)
+#line 680 "mn-mail-icon.c"
{
-#define __GOB_FUNCTION__ "MN:Mail:Icon::show_help_h"
+#define __GOB_FUNCTION__ "MN:Mail:Icon::find_icon_size"
+#line 157 "mn-mail-icon.gob"
+ g_return_val_if_fail (widget != NULL, (GtkIconSize )0);
+#line 157 "mn-mail-icon.gob"
+ g_return_val_if_fail (GTK_IS_WIDGET (widget), (GtkIconSize )0);
+#line 687 "mn-mail-icon.c"
{
-#line 137 "mn-mail-icon.gob"
+#line 159 "mn-mail-icon.gob"
- if (help_type == GTK_WIDGET_HELP_TOOLTIP)
+ GdkScreen *screen;
+ GtkSettings *settings;
+ GtkIconSize s, size;
+ int w, h, d, dist;
+
+ screen = gtk_widget_get_screen(widget);
+
+ if (! screen)
+ return GTK_ICON_SIZE_MENU;
+
+ settings = gtk_settings_get_for_screen(screen);
+
+ dist = G_MAXINT;
+ size = GTK_ICON_SIZE_MENU;
+
+ for (s = GTK_ICON_SIZE_MENU; s < GTK_ICON_SIZE_DIALOG; s++)
{
- mn_tooltips_toggle_keyboard_mode(widget);
- return TRUE;
+ if (gtk_icon_size_lookup_for_settings(settings, s, &w, &h)
+ && w <= pixel_size
+ && h <= pixel_size)
+ {
+ d = MAX(pixel_size - w, pixel_size - h);
+ if (d < dist)
+ {
+ dist = d;
+ size = s;
+ }
+ }
}
- else
- return FALSE;
+
+ return size;
}}
-#line 626 "mn-mail-icon.c"
+#line 723 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
-#line 147 "mn-mail-icon.gob"
+#line 193 "mn-mail-icon.gob"
+static void
+mn_mail_icon_update_image (MNMailIcon * self)
+#line 729 "mn-mail-icon.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon::update_image"
+#line 193 "mn-mail-icon.gob"
+ g_return_if_fail (self != NULL);
+#line 193 "mn-mail-icon.gob"
+ g_return_if_fail (MN_IS_MAIL_ICON (self));
+#line 736 "mn-mail-icon.c"
+{
+#line 195 "mn-mail-icon.gob"
+
+ GtkIconSize size;
+
+ size = self_find_icon_size(selfp->widget, selfp->size);
+ mn_mail_icon_widget_set_from_stock(MN_MAIL_ICON_WIDGET(selfp->widget), selfp->stock_id, size);
+ }}
+#line 745 "mn-mail-icon.c"
+#undef __GOB_FUNCTION__
+
+#line 202 "mn-mail-icon.gob"
static gboolean
mn_mail_icon_button_press_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
-#line 632 "mn-mail-icon.c"
+#line 751 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::button_press_event_h"
{
-#line 151 "mn-mail-icon.gob"
+#line 206 "mn-mail-icon.gob"
Self *self = user_data;
@@ -646,17 +765,17 @@ mn_mail_icon_button_press_event_h (GtkWidget * widget, GdkEventButton * event, g
return FALSE; /* propagate event */
}}
-#line 650 "mn-mail-icon.c"
+#line 769 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
-#line 165 "mn-mail-icon.gob"
+#line 220 "mn-mail-icon.gob"
static gboolean
mn_mail_icon_button_release_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
-#line 656 "mn-mail-icon.c"
+#line 775 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::button_release_event_h"
{
-#line 169 "mn-mail-icon.gob"
+#line 224 "mn-mail-icon.gob"
Self *self = user_data;
@@ -668,36 +787,17 @@ mn_mail_icon_button_release_event_h (GtkWidget * widget, GdkEventButton * event,
return FALSE; /* propagate event */
}}
-#line 672 "mn-mail-icon.c"
+#line 791 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
-#line 181 "mn-mail-icon.gob"
-static gboolean
-mn_mail_icon_popup_menu_h (GtkWidget * widget, gpointer user_data)
-#line 678 "mn-mail-icon.c"
-{
-#define __GOB_FUNCTION__ "MN:Mail:Icon::popup_menu_h"
-{
-#line 183 "mn-mail-icon.gob"
-
- Self *self = user_data;
-
- gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, self_popup_menu_position_cb, self, 0, gtk_get_current_event_time());
- gtk_menu_shell_select_first(GTK_MENU_SHELL(selfp->menu), FALSE);
-
- return TRUE; /* a menu was activated */
- }}
-#line 691 "mn-mail-icon.c"
-#undef __GOB_FUNCTION__
-
-#line 192 "mn-mail-icon.gob"
+#line 236 "mn-mail-icon.gob"
static void
mn_mail_icon_popup_menu_position_cb (GtkMenu * menu, int * x, int * y, gboolean * push_in, gpointer user_data)
-#line 697 "mn-mail-icon.c"
+#line 797 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::popup_menu_position_cb"
{
-#line 198 "mn-mail-icon.gob"
+#line 242 "mn-mail-icon.gob"
GtkWidget *widget = user_data;
@@ -718,57 +818,117 @@ mn_mail_icon_popup_menu_position_cb (GtkMenu * menu, int * x, int * y, gboolean
*push_in = TRUE;
}}
-#line 722 "mn-mail-icon.c"
+#line 822 "mn-mail-icon.c"
+#undef __GOB_FUNCTION__
+
+#line 263 "mn-mail-icon.gob"
+void
+mn_mail_icon_set_from_stock (MNMailIcon * self, const char * stock_id)
+#line 828 "mn-mail-icon.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon::set_from_stock"
+#line 263 "mn-mail-icon.gob"
+ g_return_if_fail (self != NULL);
+#line 263 "mn-mail-icon.gob"
+ g_return_if_fail (MN_IS_MAIL_ICON (self));
+#line 835 "mn-mail-icon.c"
+{
+#line 265 "mn-mail-icon.gob"
+
+ g_free(selfp->stock_id);
+ selfp->stock_id = g_strdup(stock_id);
+
+ self_update_image(self);
+ }}
+#line 844 "mn-mail-icon.c"
+#undef __GOB_FUNCTION__
+
+#line 272 "mn-mail-icon.gob"
+void
+mn_mail_icon_set_blinking (MNMailIcon * self, gboolean blinking)
+#line 850 "mn-mail-icon.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon::set_blinking"
+#line 272 "mn-mail-icon.gob"
+ g_return_if_fail (self != NULL);
+#line 272 "mn-mail-icon.gob"
+ g_return_if_fail (MN_IS_MAIL_ICON (self));
+#line 857 "mn-mail-icon.c"
+{
+#line 274 "mn-mail-icon.gob"
+
+ mn_mail_icon_widget_set_blinking(MN_MAIL_ICON_WIDGET(selfp->widget), blinking);
+ }}
+#line 863 "mn-mail-icon.c"
+#undef __GOB_FUNCTION__
+
+#line 278 "mn-mail-icon.gob"
+void
+mn_mail_icon_set_count (MNMailIcon * self, int count)
+#line 869 "mn-mail-icon.c"
+{
+#define __GOB_FUNCTION__ "MN:Mail:Icon::set_count"
+#line 278 "mn-mail-icon.gob"
+ g_return_if_fail (self != NULL);
+#line 278 "mn-mail-icon.gob"
+ g_return_if_fail (MN_IS_MAIL_ICON (self));
+#line 876 "mn-mail-icon.c"
+{
+#line 280 "mn-mail-icon.gob"
+
+ mn_mail_icon_widget_set_count(MN_MAIL_ICON_WIDGET(selfp->widget), count);
+ }}
+#line 882 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
-#line 219 "mn-mail-icon.gob"
+#line 284 "mn-mail-icon.gob"
void
mn_mail_icon_set_tip (MNMailIcon * self, const char * tip)
-#line 728 "mn-mail-icon.c"
+#line 888 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::set_tip"
-#line 219 "mn-mail-icon.gob"
+#line 284 "mn-mail-icon.gob"
g_return_if_fail (self != NULL);
-#line 219 "mn-mail-icon.gob"
+#line 284 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 735 "mn-mail-icon.c"
+#line 895 "mn-mail-icon.c"
{
-#line 221 "mn-mail-icon.gob"
+#line 286 "mn-mail-icon.gob"
- mn_tooltips_set_tip(selfp->tooltips, selfp->event_box, tip);
+ mn_tooltips_set_tip(selfp->tooltips, GTK_WIDGET(self), tip);
}}
-#line 741 "mn-mail-icon.c"
+#line 901 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
-#line 225 "mn-mail-icon.gob"
+#line 290 "mn-mail-icon.gob"
void
mn_mail_icon_set_tip_widget (MNMailIcon * self, GtkWidget * tip_widget)
-#line 747 "mn-mail-icon.c"
+#line 907 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::set_tip_widget"
-#line 225 "mn-mail-icon.gob"
+#line 290 "mn-mail-icon.gob"
g_return_if_fail (self != NULL);
-#line 225 "mn-mail-icon.gob"
+#line 290 "mn-mail-icon.gob"
g_return_if_fail (MN_IS_MAIL_ICON (self));
-#line 754 "mn-mail-icon.c"
+#line 914 "mn-mail-icon.c"
{
-#line 227 "mn-mail-icon.gob"
+#line 292 "mn-mail-icon.gob"
- mn_tooltips_set_tip_widget(selfp->tooltips, selfp->event_box, tip_widget);
+ mn_tooltips_set_tip_widget(selfp->tooltips, GTK_WIDGET(self), tip_widget);
}}
-#line 760 "mn-mail-icon.c"
+#line 920 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
-#line 231 "mn-mail-icon.gob"
+#line 296 "mn-mail-icon.gob"
GtkWidget *
mn_mail_icon_new (void)
-#line 766 "mn-mail-icon.c"
+#line 926 "mn-mail-icon.c"
{
#define __GOB_FUNCTION__ "MN:Mail:Icon::new"
{
-#line 233 "mn-mail-icon.gob"
+#line 298 "mn-mail-icon.gob"
return GTK_WIDGET(GET_NEW_VARG("title", _("Mail Notification"), NULL));
}}
-#line 774 "mn-mail-icon.c"
+#line 934 "mn-mail-icon.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-mail-icon.gob b/src/mn-mail-icon.gob
@@ -1,10 +1,16 @@
/*
+ * Size adjustment code (size_allocate_h(), find_icon_size()) taken
+ * from GtkStatusIcon,
+ * Copyright (C) 2003 Sun Microsystems, Inc.
+ * Copyright (C) 2005 Hans Breuer <hans@breuer.org>
+ * Copyright (C) 2005 Novell, Inc.
+ *
* Mail Notification
* Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -22,7 +28,6 @@ requires 2.0.14
%headertop{
#include <gtk/gtk.h>
#include "eggtrayicon.h"
-#include "mn-blinking-image.h"
%}
%privateheader{
@@ -35,18 +40,22 @@ requires 2.0.14
#include <gdk/gdkkeysyms.h>
#include "mn-stock.h"
#include "mn-util.h"
+#include "mn-mail-icon-widget.h"
%}
class MN:Mail:Icon from Egg:Tray:Icon
{
private MNTooltips *tooltips = {mn_tooltips_new()} unrefwith g_object_unref;
- private GtkWidget *event_box;
- public GtkWidget *image = {mn_blinking_image_new()};
+ private GtkWidget *widget = {mn_mail_icon_widget_new()};
+
+ private char *stock_id destroywith g_free;
+ private int size;
private GtkWidget *menu = {gtk_menu_new()} destroywith gtk_widget_destroy;
public GtkWidget *mail_reader_item;
public GtkWidget *open_latest_message_item;
public GtkWidget *update_item;
+ public GtkWidget *consider_new_mail_as_read_item;
signal (ACTION) private NONE (NONE)
void activate (self);
@@ -55,6 +64,8 @@ class MN:Mail:Icon from Egg:Tray:Icon
signal (ACTION) private NONE (NONE)
void activate_open_latest_message (self);
signal (ACTION) private NONE (NONE)
+ void activate_consider_new_mail_as_read (self);
+ signal (ACTION) private NONE (NONE)
void activate_update (self);
signal (ACTION) private NONE (NONE)
void activate_properties (self);
@@ -65,21 +76,6 @@ class MN:Mail:Icon from Egg:Tray:Icon
signal (ACTION) private NONE (NONE)
void activate_remove (self);
- class_init (class)
- {
- GtkBindingSet *binding_set;
-
- binding_set = gtk_binding_set_by_class(class);
-
- /* HIG 2.0 key bindings */
-
- gtk_binding_entry_add_signal(binding_set, GDK_space, 0, "activate", 0);
-
- gtk_binding_entry_add_signal(binding_set, GDK_Return, GDK_MOD1_MASK, "activate-properties", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_ISO_Enter, GDK_MOD1_MASK, "activate-properties", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_KP_Enter, GDK_MOD1_MASK, "activate-properties", 0);
- }
-
init (self)
{
GtkMenuShell *shell;
@@ -93,55 +89,114 @@ class MN:Mail:Icon from Egg:Tray:Icon
self->mail_reader_item = mn_menu_shell_append(shell, MN_STOCK_MAIL_READER, _("_Mail Reader"));
/* translators: header capitalization */
self->open_latest_message_item = mn_menu_shell_append(shell, MN_STOCK_OPEN_MESSAGE, _("_Open Latest Message"));
+
+ mn_menu_shell_append(shell, NULL, NULL);
+
+ /* translators: header capitalization */
+ self->consider_new_mail_as_read_item = mn_menu_shell_append(shell, MN_STOCK_CONSIDER_NEW_MAIL_AS_READ, _("_Consider New Mail as Read"));
/* translators: header capitalization */
self->update_item = mn_menu_shell_append(shell, GTK_STOCK_REFRESH, _("_Update"));
+
mn_menu_shell_append(shell, NULL, NULL);
+
properties_item = mn_menu_shell_append(shell, GTK_STOCK_PROPERTIES, NULL);
help_item = mn_menu_shell_append(shell, GTK_STOCK_HELP, NULL);
about_item = mn_menu_shell_append(shell, GTK_STOCK_ABOUT, NULL);
+
mn_menu_shell_append(shell, NULL, NULL);
+
/* translators: header capitalization */
remove_item = mn_menu_shell_append(shell, GTK_STOCK_REMOVE, _("R_emove From Notification Area"));
g_signal_connect_swapped(self->mail_reader_item, "activate", G_CALLBACK(self_activate_mail_reader), self);
g_signal_connect_swapped(self->open_latest_message_item, "activate", G_CALLBACK(self_activate_open_latest_message), self);
+ g_signal_connect_swapped(self->consider_new_mail_as_read_item, "activate", G_CALLBACK(self_activate_consider_new_mail_as_read), self);
g_signal_connect_swapped(self->update_item, "activate", G_CALLBACK(self_activate_update), self);
g_signal_connect_swapped(properties_item, "activate", G_CALLBACK(self_activate_properties), self);
g_signal_connect_swapped(help_item, "activate", G_CALLBACK(self_activate_help), self);
g_signal_connect_swapped(about_item, "activate", G_CALLBACK(self_activate_about), self);
g_signal_connect_swapped(remove_item, "activate", G_CALLBACK(self_activate_remove), self);
- selfp->event_box = gtk_event_box_new();
- GTK_WIDGET_SET_FLAGS(selfp->event_box, GTK_CAN_FOCUS);
- gtk_event_box_set_visible_window(GTK_EVENT_BOX(selfp->event_box), FALSE);
- mn_setup_dnd(selfp->event_box);
+ gtk_widget_add_events(GTK_WIDGET(self), GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
- gtk_container_add(GTK_CONTAINER(selfp->event_box), self->image);
- gtk_container_add(GTK_CONTAINER(self), selfp->event_box);
+ gtk_container_add(GTK_CONTAINER(self), selfp->widget);
- g_object_connect(selfp->event_box,
- "signal::show-help", self_show_help_h, self,
+ g_object_connect(self,
"signal::button-press-event", self_button_press_event_h, self,
"signal::button-release-event", self_button_release_event_h, self,
- "signal::popup-menu", self_popup_menu_h, self,
NULL);
- gtk_widget_show(self->image);
- gtk_widget_show(selfp->event_box);
+ g_signal_connect(selfp->widget, "size-allocate", G_CALLBACK(self_size_allocate_h), self);
+
+ gtk_widget_show(selfp->widget);
}
- private gboolean
- show_help_h (GtkWidget *widget,
- GtkWidgetHelpType help_type,
- gpointer user_data)
+ private void
+ size_allocate_h (GtkWidget *widget,
+ GtkAllocation *allocation,
+ gpointer user_data)
{
- if (help_type == GTK_WIDGET_HELP_TOOLTIP)
+ Self *self = user_data;
+ GtkOrientation orientation;
+ int size;
+
+ orientation = egg_tray_icon_get_orientation(EGG_TRAY_ICON(self));
+
+ if (orientation == GTK_ORIENTATION_HORIZONTAL)
+ size = allocation->height;
+ else
+ size = allocation->width;
+
+ if (selfp->size != size)
{
- mn_tooltips_toggle_keyboard_mode(widget);
- return TRUE;
+ selfp->size = size;
+ self_update_image(self);
}
- else
- return FALSE;
+ }
+
+ private GtkIconSize
+ find_icon_size (Gtk:Widget *widget (check null type), int pixel_size)
+ {
+ GdkScreen *screen;
+ GtkSettings *settings;
+ GtkIconSize s, size;
+ int w, h, d, dist;
+
+ screen = gtk_widget_get_screen(widget);
+
+ if (! screen)
+ return GTK_ICON_SIZE_MENU;
+
+ settings = gtk_settings_get_for_screen(screen);
+
+ dist = G_MAXINT;
+ size = GTK_ICON_SIZE_MENU;
+
+ for (s = GTK_ICON_SIZE_MENU; s < GTK_ICON_SIZE_DIALOG; s++)
+ {
+ if (gtk_icon_size_lookup_for_settings(settings, s, &w, &h)
+ && w <= pixel_size
+ && h <= pixel_size)
+ {
+ d = MAX(pixel_size - w, pixel_size - h);
+ if (d < dist)
+ {
+ dist = d;
+ size = s;
+ }
+ }
+ }
+
+ return size;
+ }
+
+ private void
+ update_image (self)
+ {
+ GtkIconSize size;
+
+ size = self_find_icon_size(selfp->widget, selfp->size);
+ mn_mail_icon_widget_set_from_stock(MN_MAIL_ICON_WIDGET(selfp->widget), selfp->stock_id, size);
}
private gboolean
@@ -178,17 +233,6 @@ class MN:Mail:Icon from Egg:Tray:Icon
return FALSE; /* propagate event */
}
- private gboolean
- popup_menu_h (GtkWidget *widget, gpointer user_data)
- {
- Self *self = user_data;
-
- gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, self_popup_menu_position_cb, self, 0, gtk_get_current_event_time());
- gtk_menu_shell_select_first(GTK_MENU_SHELL(selfp->menu), FALSE);
-
- return TRUE; /* a menu was activated */
- }
-
private void
popup_menu_position_cb (GtkMenu *menu,
int *x,
@@ -217,15 +261,36 @@ class MN:Mail:Icon from Egg:Tray:Icon
}
public void
+ set_from_stock (self, const char *stock_id)
+ {
+ g_free(selfp->stock_id);
+ selfp->stock_id = g_strdup(stock_id);
+
+ self_update_image(self);
+ }
+
+ public void
+ set_blinking (self, gboolean blinking)
+ {
+ mn_mail_icon_widget_set_blinking(MN_MAIL_ICON_WIDGET(selfp->widget), blinking);
+ }
+
+ public void
+ set_count (self, int count)
+ {
+ mn_mail_icon_widget_set_count(MN_MAIL_ICON_WIDGET(selfp->widget), count);
+ }
+
+ public void
set_tip (self, const char *tip)
{
- mn_tooltips_set_tip(selfp->tooltips, selfp->event_box, tip);
+ mn_tooltips_set_tip(selfp->tooltips, GTK_WIDGET(self), tip);
}
public void
set_tip_widget (self, Gtk:Widget *tip_widget)
{
- mn_tooltips_set_tip_widget(selfp->tooltips, selfp->event_box, tip_widget);
+ mn_tooltips_set_tip_widget(selfp->tooltips, GTK_WIDGET(self), tip_widget);
}
public GtkWidget *
diff --git a/src/mn-mail-icon.h b/src/mn-mail-icon.h
@@ -6,7 +6,6 @@
#include <gtk/gtk.h>
#include "eggtrayicon.h"
-#include "mn-blinking-image.h"
#ifndef __MN_MAIL_ICON_H__
#define __MN_MAIL_ICON_H__
@@ -40,10 +39,10 @@ typedef struct _MNMailIcon MNMailIcon;
struct _MNMailIcon {
EggTrayIcon __parent__;
/*< public >*/
- GtkWidget * image;
GtkWidget * mail_reader_item;
GtkWidget * open_latest_message_item;
GtkWidget * update_item;
+ GtkWidget * consider_new_mail_as_read_item;
/*< private >*/
MNMailIconPrivate *_priv;
};
@@ -57,6 +56,7 @@ struct _MNMailIconClass {
/*signal*/void (* activate) (MNMailIcon * self);
/*signal*/void (* activate_mail_reader) (MNMailIcon * self);
/*signal*/void (* activate_open_latest_message) (MNMailIcon * self);
+ /*signal*/void (* activate_consider_new_mail_as_read) (MNMailIcon * self);
/*signal*/void (* activate_update) (MNMailIcon * self);
/*signal*/void (* activate_properties) (MNMailIcon * self);
/*signal*/void (* activate_help) (MNMailIcon * self);
@@ -69,6 +69,12 @@ struct _MNMailIconClass {
* Public methods
*/
GType mn_mail_icon_get_type (void);
+void mn_mail_icon_set_from_stock (MNMailIcon * self,
+ const char * stock_id);
+void mn_mail_icon_set_blinking (MNMailIcon * self,
+ gboolean blinking);
+void mn_mail_icon_set_count (MNMailIcon * self,
+ int count);
void mn_mail_icon_set_tip (MNMailIcon * self,
const char * tip);
void mn_mail_icon_set_tip_widget (MNMailIcon * self,
@@ -88,6 +94,9 @@ GtkWidget * mn_mail_icon_new (void);
#define mn_mail_icon_connect__activate_open_latest_message(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_open_latest_message",(GCallback) __extension__ ({void (* ___activate_open_latest_message) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_open_latest_message; }), (data))
#define mn_mail_icon_connect_after__activate_open_latest_message(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_open_latest_message",(GCallback) __extension__ ({void (* ___activate_open_latest_message) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_open_latest_message; }), (data))
#define mn_mail_icon_connect_data__activate_open_latest_message(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_open_latest_message",(GCallback) __extension__ ({void (* ___activate_open_latest_message) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_open_latest_message; }), (data), (destroy_data), (GConnectFlags)(flags))
+#define mn_mail_icon_connect__activate_consider_new_mail_as_read(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_consider_new_mail_as_read",(GCallback) __extension__ ({void (* ___activate_consider_new_mail_as_read) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_consider_new_mail_as_read; }), (data))
+#define mn_mail_icon_connect_after__activate_consider_new_mail_as_read(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_consider_new_mail_as_read",(GCallback) __extension__ ({void (* ___activate_consider_new_mail_as_read) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_consider_new_mail_as_read; }), (data))
+#define mn_mail_icon_connect_data__activate_consider_new_mail_as_read(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_consider_new_mail_as_read",(GCallback) __extension__ ({void (* ___activate_consider_new_mail_as_read) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_consider_new_mail_as_read; }), (data), (destroy_data), (GConnectFlags)(flags))
#define mn_mail_icon_connect__activate_update(object,func,data) g_signal_connect(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_update",(GCallback) __extension__ ({void (* ___activate_update) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_update; }), (data))
#define mn_mail_icon_connect_after__activate_update(object,func,data) g_signal_connect_after(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_update",(GCallback) __extension__ ({void (* ___activate_update) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_update; }), (data))
#define mn_mail_icon_connect_data__activate_update(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(__extension__ ({MNMailIcon *___object = (object); ___object; })),"activate_update",(GCallback) __extension__ ({void (* ___activate_update) (MNMailIcon * ___fake___self, gpointer ___data ) = (func); ___activate_update; }), (data), (destroy_data), (GConnectFlags)(flags))
@@ -113,6 +122,9 @@ GtkWidget * mn_mail_icon_new (void);
#define mn_mail_icon_connect__activate_open_latest_message(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_open_latest_message",(GCallback)(func),(data))
#define mn_mail_icon_connect_after__activate_open_latest_message(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_open_latest_message",(GCallback)(func),(data))
#define mn_mail_icon_connect_data__activate_open_latest_message(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_open_latest_message",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
+#define mn_mail_icon_connect__activate_consider_new_mail_as_read(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_consider_new_mail_as_read",(GCallback)(func),(data))
+#define mn_mail_icon_connect_after__activate_consider_new_mail_as_read(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_consider_new_mail_as_read",(GCallback)(func),(data))
+#define mn_mail_icon_connect_data__activate_consider_new_mail_as_read(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_consider_new_mail_as_read",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
#define mn_mail_icon_connect__activate_update(object,func,data) g_signal_connect(MN_MAIL_ICON(object),"activate_update",(GCallback)(func),(data))
#define mn_mail_icon_connect_after__activate_update(object,func,data) g_signal_connect_after(MN_MAIL_ICON(object),"activate_update",(GCallback)(func),(data))
#define mn_mail_icon_connect_data__activate_update(object,func,data,destroy_data,flags) g_signal_connect_data(MN_MAIL_ICON(object),"activate_update",(GCallback)(func),(data),(destroy_data),(GConnectFlags)(flags))
diff --git a/src/mn-mailbox-private.h b/src/mn-mailbox-private.h
@@ -17,8 +17,14 @@ extern "C" {
typedef enum
{
+ /* load from mailboxes.xml */
+ MN_MAILBOX_PARAM_LOAD = MN_XML_PARAM_IMPORT,
+
/* save to mailboxes.xml */
- MN_MAILBOX_PARAM_PERMANENT = MN_XML_PARAM_IMPORT_EXPORT,
+ MN_MAILBOX_PARAM_SAVE = MN_XML_PARAM_EXPORT,
+
+ /* load from and save to mailboxes.xml */
+ MN_MAILBOX_PARAM_LOAD_SAVE = MN_MAILBOX_PARAM_LOAD | MN_MAILBOX_PARAM_SAVE,
/* ignore the case of a string property when checking if it has the default value */
MN_MAILBOX_PARAM_IGNORE_CASE = MN_XML_PARAM_IGNORE_CASE,
@@ -27,23 +33,26 @@ typedef enum
MN_MAILBOX_PARAM_REQUIRED = 1 << (MN_XML_PARAM_USER_SHIFT + 0),
} MNMailboxParamFlags;
-#line 31 "mn-mailbox-private.h"
+#line 37 "mn-mailbox-private.h"
struct _MNMailboxPrivate {
-#line 99 "mn-mailbox.gob"
- gboolean added;
-#line 153 "mn-mailbox.gob"
+#line 126 "mn-mailbox.gob"
+ gboolean _active;
+#line 194 "mn-mailbox.gob"
MNLockedGSource * check_timeout_source;
-#line 162 "mn-mailbox.gob"
+#line 203 "mn-mailbox.gob"
gboolean poll;
-#line 195 "mn-mailbox.gob"
+#line 250 "mn-mailbox.gob"
GSList * unfiltered_messages;
-#line 197 "mn-mailbox.gob"
- GHashTable * messages_marked_as_read;
-#line 219 "mn-mailbox.gob"
+#line 252 "mn-mailbox.gob"
+ GHashTable * messages_considered_as_read;
+#line 274 "mn-mailbox.gob"
GHashTable * messages_hash_table;
-#line 45 "mn-mailbox-private.h"
+#line 1031 "mn-mailbox.gob"
+ gboolean checking_enabled;
+#line 53 "mn-mailbox-private.h"
};
void mn_mailbox_set_error (MNMailbox * self, const char * format, ...);
+void mn_mailbox_enable_checking (MNMailbox * self);
void mn_mailbox_notice (MNMailbox * self, const char * format, ...);
void mn_mailbox_warning (MNMailbox * self, const char * format, ...);
diff --git a/src/mn-mailbox-properties-dialog-private.h b/src/mn-mailbox-properties-dialog-private.h
@@ -16,51 +16,51 @@ extern "C" {
#line 18 "mn-mailbox-properties-dialog-private.h"
struct _MNMailboxPropertiesDialogPrivate {
-#line 69 "mn-mailbox-properties-dialog.gob"
+#line 75 "mn-mailbox-properties-dialog.gob"
GtkWindow * dialog_parent;
-#line 72 "mn-mailbox-properties-dialog.gob"
+#line 78 "mn-mailbox-properties-dialog.gob"
MNMailbox * mailbox;
-#line 107 "mn-mailbox-properties-dialog.gob"
+#line 113 "mn-mailbox-properties-dialog.gob"
GtkWidget * mailbox_type_label;
-#line 108 "mn-mailbox-properties-dialog.gob"
+#line 114 "mn-mailbox-properties-dialog.gob"
GtkWidget * mailbox_type_combo;
-#line 109 "mn-mailbox-properties-dialog.gob"
+#line 115 "mn-mailbox-properties-dialog.gob"
GtkWidget * mailbox_name_label;
-#line 110 "mn-mailbox-properties-dialog.gob"
+#line 116 "mn-mailbox-properties-dialog.gob"
GtkWidget * mailbox_name_entry;
-#line 111 "mn-mailbox-properties-dialog.gob"
+#line 117 "mn-mailbox-properties-dialog.gob"
GtkWidget * mailbox_name_default_button;
-#line 112 "mn-mailbox-properties-dialog.gob"
+#line 118 "mn-mailbox-properties-dialog.gob"
GtkWidget * delay_label;
-#line 113 "mn-mailbox-properties-dialog.gob"
+#line 119 "mn-mailbox-properties-dialog.gob"
GtkWidget * delay_hbox;
-#line 114 "mn-mailbox-properties-dialog.gob"
+#line 120 "mn-mailbox-properties-dialog.gob"
GtkWidget * minutes_spin;
-#line 115 "mn-mailbox-properties-dialog.gob"
+#line 121 "mn-mailbox-properties-dialog.gob"
GtkWidget * minutes_label;
-#line 116 "mn-mailbox-properties-dialog.gob"
+#line 122 "mn-mailbox-properties-dialog.gob"
GtkWidget * seconds_spin;
-#line 117 "mn-mailbox-properties-dialog.gob"
+#line 123 "mn-mailbox-properties-dialog.gob"
GtkWidget * seconds_label;
-#line 118 "mn-mailbox-properties-dialog.gob"
+#line 124 "mn-mailbox-properties-dialog.gob"
GtkWidget * delay_default_button;
-#line 120 "mn-mailbox-properties-dialog.gob"
+#line 126 "mn-mailbox-properties-dialog.gob"
GtkWidget * apply_button;
-#line 121 "mn-mailbox-properties-dialog.gob"
+#line 127 "mn-mailbox-properties-dialog.gob"
GtkWidget * accept_button;
-#line 123 "mn-mailbox-properties-dialog.gob"
+#line 129 "mn-mailbox-properties-dialog.gob"
GtkListStore * store;
-#line 125 "mn-mailbox-properties-dialog.gob"
+#line 131 "mn-mailbox-properties-dialog.gob"
char * default_name;
-#line 126 "mn-mailbox-properties-dialog.gob"
+#line 132 "mn-mailbox-properties-dialog.gob"
gboolean has_custom_name;
-#line 128 "mn-mailbox-properties-dialog.gob"
+#line 134 "mn-mailbox-properties-dialog.gob"
int default_check_delay;
-#line 129 "mn-mailbox-properties-dialog.gob"
+#line 135 "mn-mailbox-properties-dialog.gob"
gboolean has_custom_check_delay;
-#line 131 "mn-mailbox-properties-dialog.gob"
+#line 137 "mn-mailbox-properties-dialog.gob"
GSList * entries;
-#line 133 "mn-mailbox-properties-dialog.gob"
+#line 139 "mn-mailbox-properties-dialog.gob"
MNMailboxProperties * active_properties;
#line 66 "mn-mailbox-properties-dialog-private.h"
};
@@ -68,7 +68,7 @@ void mn_mailbox_properties_dialog_set_help_section (GtkWidget * page, const cha
void mn_mailbox_properties_dialog_type_changed_h (MNMailboxPropertiesDialog * self, GtkComboBox * combobox);
void mn_mailbox_properties_dialog_name_changed_h (MNMailboxPropertiesDialog * self, GtkEditable * editable);
void mn_mailbox_properties_dialog_name_default_button_clicked_h (MNMailboxPropertiesDialog * self, GtkButton * button);
-void mn_mailbox_properties_dialog_delay_changed_h (MNMailboxPropertiesDialog * self, GtkEditable * editable);
+void mn_mailbox_properties_dialog_delay_changed_h (MNMailboxPropertiesDialog * self, GtkSpinButton * button);
void mn_mailbox_properties_dialog_delay_default_button_clicked_h (MNMailboxPropertiesDialog * self, GtkButton * button);
void mn_mailbox_properties_dialog_entry_activate_h (MNMailboxPropertiesDialog * self, GtkEntry * entry);
diff --git a/src/mn-mailbox-properties-dialog.c b/src/mn-mailbox-properties-dialog.c
@@ -39,6 +39,12 @@
#if WITH_GMAIL
#include "mn-gmail-mailbox-properties.h"
#endif
+#if WITH_YAHOO
+#include "mn-yahoo-mailbox-properties.h"
+#endif
+#if WITH_HOTMAIL
+#include "mn-hotmail-mailbox-properties.h"
+#endif
#if WITH_EVOLUTION
#include "mn-evolution-mailbox-properties.h"
#endif
@@ -57,7 +63,7 @@ enum {
static GType selected_type = 0;
-#line 61 "mn-mailbox-properties-dialog.c"
+#line 67 "mn-mailbox-properties-dialog.c"
/* self casting macros */
#define SELF(x) MN_MAILBOX_PROPERTIES_DIALOG(x)
#define SELF_CONST(x) MN_MAILBOX_PROPERTIES_DIALOG_CONST(x)
@@ -168,15 +174,15 @@ ___dispose (GObject *obj_self)
MNMailboxPropertiesDialog *self G_GNUC_UNUSED = MN_MAILBOX_PROPERTIES_DIALOG (obj_self);
if (G_OBJECT_CLASS (parent_class)->dispose) \
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 72 "mn-mailbox-properties-dialog.gob"
+#line 78 "mn-mailbox-properties-dialog.gob"
if(self->_priv->mailbox) { g_object_unref ((gpointer) self->_priv->mailbox); self->_priv->mailbox = NULL; }
-#line 174 "mn-mailbox-properties-dialog.c"
-#line 123 "mn-mailbox-properties-dialog.gob"
+#line 180 "mn-mailbox-properties-dialog.c"
+#line 129 "mn-mailbox-properties-dialog.gob"
if(self->_priv->store) { g_object_unref ((gpointer) self->_priv->store); self->_priv->store = NULL; }
-#line 177 "mn-mailbox-properties-dialog.c"
-#line 133 "mn-mailbox-properties-dialog.gob"
+#line 183 "mn-mailbox-properties-dialog.c"
+#line 139 "mn-mailbox-properties-dialog.gob"
if(self->_priv->active_properties) { g_object_unref ((gpointer) self->_priv->active_properties); self->_priv->active_properties = NULL; }
-#line 180 "mn-mailbox-properties-dialog.c"
+#line 186 "mn-mailbox-properties-dialog.c"
}
#undef __GOB_FUNCTION__
@@ -189,12 +195,12 @@ ___finalize(GObject *obj_self)
gpointer priv G_GNUC_UNUSED = self->_priv;
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 125 "mn-mailbox-properties-dialog.gob"
- if(self->_priv->default_name) { g_free ((gpointer) self->_priv->default_name); self->_priv->default_name = NULL; }
-#line 195 "mn-mailbox-properties-dialog.c"
#line 131 "mn-mailbox-properties-dialog.gob"
+ if(self->_priv->default_name) { g_free ((gpointer) self->_priv->default_name); self->_priv->default_name = NULL; }
+#line 201 "mn-mailbox-properties-dialog.c"
+#line 137 "mn-mailbox-properties-dialog.gob"
if(self->_priv->entries) { g_slist_free ((gpointer) self->_priv->entries); self->_priv->entries = NULL; }
-#line 198 "mn-mailbox-properties-dialog.c"
+#line 204 "mn-mailbox-properties-dialog.c"
}
#undef __GOB_FUNCTION__
@@ -215,9 +221,9 @@ mn_mailbox_properties_dialog_class_init (MNMailboxPropertiesDialogClass * c G_GN
parent_class = g_type_class_ref (MN_TYPE_DIALOG);
-#line 135 "mn-mailbox-properties-dialog.gob"
+#line 141 "mn-mailbox-properties-dialog.gob"
g_object_class->constructor = ___3_mn_mailbox_properties_dialog_constructor;
-#line 221 "mn-mailbox-properties-dialog.c"
+#line 227 "mn-mailbox-properties-dialog.c"
g_object_class->dispose = ___dispose;
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
@@ -260,14 +266,14 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_DIALOG_PARENT:
{
-#line 70 "mn-mailbox-properties-dialog.gob"
+#line 76 "mn-mailbox-properties-dialog.gob"
self->_priv->dialog_parent = g_value_get_pointer (VAL);
-#line 266 "mn-mailbox-properties-dialog.c"
+#line 272 "mn-mailbox-properties-dialog.c"
}
break;
case PROP_MAILBOX:
{
-#line 78 "mn-mailbox-properties-dialog.gob"
+#line 84 "mn-mailbox-properties-dialog.gob"
GObject *object;
@@ -290,7 +296,7 @@ self->_priv->dialog_parent = g_value_get_pointer (VAL);
g_free(title);
}
-#line 294 "mn-mailbox-properties-dialog.c"
+#line 300 "mn-mailbox-properties-dialog.c"
}
break;
default:
@@ -319,18 +325,18 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_DIALOG_PARENT:
{
-#line 70 "mn-mailbox-properties-dialog.gob"
+#line 76 "mn-mailbox-properties-dialog.gob"
g_value_set_pointer (VAL, self->_priv->dialog_parent);
-#line 325 "mn-mailbox-properties-dialog.c"
+#line 331 "mn-mailbox-properties-dialog.c"
}
break;
case PROP_MAILBOX:
{
-#line 101 "mn-mailbox-properties-dialog.gob"
+#line 107 "mn-mailbox-properties-dialog.gob"
g_value_set_object(VAL, selfp->mailbox);
-#line 334 "mn-mailbox-properties-dialog.c"
+#line 340 "mn-mailbox-properties-dialog.c"
}
break;
default:
@@ -347,36 +353,36 @@ g_value_set_pointer (VAL, self->_priv->dialog_parent);
-#line 101 "mn-mailbox-properties-dialog.gob"
+#line 107 "mn-mailbox-properties-dialog.gob"
MNMailbox *
mn_mailbox_properties_dialog_get_mailbox (MNMailboxPropertiesDialog * self)
-#line 354 "mn-mailbox-properties-dialog.c"
+#line 360 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::get_mailbox"
{
-#line 73 "mn-mailbox-properties-dialog.gob"
+#line 79 "mn-mailbox-properties-dialog.gob"
MNMailbox* val; g_object_get (G_OBJECT (self), "mailbox", &val, NULL); return val;
}}
-#line 361 "mn-mailbox-properties-dialog.c"
+#line 367 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 78 "mn-mailbox-properties-dialog.gob"
+#line 84 "mn-mailbox-properties-dialog.gob"
void
mn_mailbox_properties_dialog_set_mailbox (MNMailboxPropertiesDialog * self, MNMailbox * val)
-#line 367 "mn-mailbox-properties-dialog.c"
+#line 373 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::set_mailbox"
{
-#line 73 "mn-mailbox-properties-dialog.gob"
+#line 79 "mn-mailbox-properties-dialog.gob"
g_object_set (G_OBJECT (self), "mailbox", val, NULL);
}}
-#line 374 "mn-mailbox-properties-dialog.c"
+#line 380 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 135 "mn-mailbox-properties-dialog.gob"
+#line 141 "mn-mailbox-properties-dialog.gob"
static GObject *
___3_mn_mailbox_properties_dialog_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
-#line 380 "mn-mailbox-properties-dialog.c"
+#line 386 "mn-mailbox-properties-dialog.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -384,7 +390,7 @@ ___3_mn_mailbox_properties_dialog_constructor (GType type G_GNUC_UNUSED, unsigne
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::constructor"
{
-#line 137 "mn-mailbox-properties-dialog.gob"
+#line 143 "mn-mailbox-properties-dialog.gob"
GObject *object;
Self *self;
@@ -396,7 +402,7 @@ ___3_mn_mailbox_properties_dialog_constructor (GType type G_GNUC_UNUSED, unsigne
self = SELF(object);
mn_container_create_interface(GTK_CONTAINER(self),
- UIDIR G_DIR_SEPARATOR_S "mailbox-properties-dialog.glade",
+ PKGDATADIR G_DIR_SEPARATOR_S "mailbox-properties-dialog.glade",
"notebook",
"mn_mailbox_properties_dialog_",
"notebook", &self->notebook,
@@ -450,10 +456,18 @@ ___3_mn_mailbox_properties_dialog_constructor (GType type G_GNUC_UNUSED, unsigne
#if WITH_GMAIL
self_add_type(self, MN_TYPE_GMAIL_MAILBOX_PROPERTIES);
#endif
+#if WITH_YAHOO
+ self_add_type(self, MN_TYPE_YAHOO_MAILBOX_PROPERTIES);
+#endif
+#if WITH_HOTMAIL
+ self_add_type(self, MN_TYPE_HOTMAIL_MAILBOX_PROPERTIES);
+#endif
#if WITH_EVOLUTION
self_add_type(self, MN_TYPE_EVOLUTION_MAILBOX_PROPERTIES);
#endif
+ gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(selfp->store), COLUMN_LABEL, GTK_SORT_ASCENDING);
+
renderer = gtk_cell_renderer_pixbuf_new();
g_object_set(renderer, "stock-size", GTK_ICON_SIZE_MENU, NULL);
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(selfp->mailbox_type_combo), renderer, FALSE);
@@ -526,18 +540,18 @@ ___3_mn_mailbox_properties_dialog_constructor (GType type G_GNUC_UNUSED, unsigne
return object;
}}
-#line 530 "mn-mailbox-properties-dialog.c"
+#line 544 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 279 "mn-mailbox-properties-dialog.gob"
+#line 293 "mn-mailbox-properties-dialog.gob"
static void
mn_mailbox_properties_dialog_response_h (GtkDialog * dialog, int response, gpointer user_data)
-#line 537 "mn-mailbox-properties-dialog.c"
+#line 551 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::response_h"
{
-#line 281 "mn-mailbox-properties-dialog.gob"
+#line 295 "mn-mailbox-properties-dialog.gob"
Self *self = SELF(dialog);
@@ -560,24 +574,24 @@ mn_mailbox_properties_dialog_response_h (GtkDialog * dialog, int response, gpoin
/* other responses are handled by the client */
}}
-#line 564 "mn-mailbox-properties-dialog.c"
+#line 578 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 304 "mn-mailbox-properties-dialog.gob"
+#line 318 "mn-mailbox-properties-dialog.gob"
static void
mn_mailbox_properties_dialog_add_type (MNMailboxPropertiesDialog * self, GType type)
-#line 570 "mn-mailbox-properties-dialog.c"
+#line 584 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::add_type"
-#line 304 "mn-mailbox-properties-dialog.gob"
+#line 318 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 304 "mn-mailbox-properties-dialog.gob"
+#line 318 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 304 "mn-mailbox-properties-dialog.gob"
+#line 318 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (type != 0);
-#line 579 "mn-mailbox-properties-dialog.c"
+#line 593 "mn-mailbox-properties-dialog.c"
{
-#line 306 "mn-mailbox-properties-dialog.gob"
+#line 320 "mn-mailbox-properties-dialog.gob"
MNMailboxProperties *properties;
MNMailboxPropertiesClass *p_class;
@@ -606,26 +620,26 @@ mn_mailbox_properties_dialog_add_type (MNMailboxPropertiesDialog * self, GType t
g_object_unref(properties); /* now it belongs to the store */
}}
-#line 610 "mn-mailbox-properties-dialog.c"
+#line 624 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 335 "mn-mailbox-properties-dialog.gob"
+#line 349 "mn-mailbox-properties-dialog.gob"
static void
mn_mailbox_properties_dialog_set_active_properties (MNMailboxPropertiesDialog * self, MNMailboxProperties * properties)
-#line 616 "mn-mailbox-properties-dialog.c"
+#line 630 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::set_active_properties"
-#line 335 "mn-mailbox-properties-dialog.gob"
+#line 349 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 335 "mn-mailbox-properties-dialog.gob"
+#line 349 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 335 "mn-mailbox-properties-dialog.gob"
+#line 349 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (properties != NULL);
-#line 335 "mn-mailbox-properties-dialog.gob"
+#line 349 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (properties));
-#line 627 "mn-mailbox-properties-dialog.c"
+#line 641 "mn-mailbox-properties-dialog.c"
{
-#line 338 "mn-mailbox-properties-dialog.gob"
+#line 352 "mn-mailbox-properties-dialog.gob"
gboolean valid;
GtkTreeIter iter;
@@ -644,22 +658,22 @@ mn_mailbox_properties_dialog_set_active_properties (MNMailboxPropertiesDialog *
}
}
}}
-#line 648 "mn-mailbox-properties-dialog.c"
+#line 662 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 357 "mn-mailbox-properties-dialog.gob"
+#line 371 "mn-mailbox-properties-dialog.gob"
static MNMailboxProperties *
mn_mailbox_properties_dialog_get_active_properties (MNMailboxPropertiesDialog * self)
-#line 654 "mn-mailbox-properties-dialog.c"
+#line 668 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::get_active_properties"
-#line 357 "mn-mailbox-properties-dialog.gob"
+#line 371 "mn-mailbox-properties-dialog.gob"
g_return_val_if_fail (self != NULL, (MNMailboxProperties * )0);
-#line 357 "mn-mailbox-properties-dialog.gob"
+#line 371 "mn-mailbox-properties-dialog.gob"
g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self), (MNMailboxProperties * )0);
-#line 661 "mn-mailbox-properties-dialog.c"
+#line 675 "mn-mailbox-properties-dialog.c"
{
-#line 359 "mn-mailbox-properties-dialog.gob"
+#line 373 "mn-mailbox-properties-dialog.gob"
GtkTreeIter iter;
MNMailboxProperties *properties = NULL;
@@ -669,24 +683,24 @@ mn_mailbox_properties_dialog_get_active_properties (MNMailboxPropertiesDialog *
return properties;
}}
-#line 673 "mn-mailbox-properties-dialog.c"
+#line 687 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 369 "mn-mailbox-properties-dialog.gob"
+#line 383 "mn-mailbox-properties-dialog.gob"
static MNMailboxProperties *
mn_mailbox_properties_dialog_get_properties_by_type (MNMailboxPropertiesDialog * self, const char * type)
-#line 679 "mn-mailbox-properties-dialog.c"
+#line 693 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::get_properties_by_type"
-#line 369 "mn-mailbox-properties-dialog.gob"
+#line 383 "mn-mailbox-properties-dialog.gob"
g_return_val_if_fail (self != NULL, (MNMailboxProperties * )0);
-#line 369 "mn-mailbox-properties-dialog.gob"
+#line 383 "mn-mailbox-properties-dialog.gob"
g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self), (MNMailboxProperties * )0);
-#line 369 "mn-mailbox-properties-dialog.gob"
+#line 383 "mn-mailbox-properties-dialog.gob"
g_return_val_if_fail (type != NULL, (MNMailboxProperties * )0);
-#line 688 "mn-mailbox-properties-dialog.c"
+#line 702 "mn-mailbox-properties-dialog.c"
{
-#line 371 "mn-mailbox-properties-dialog.gob"
+#line 385 "mn-mailbox-properties-dialog.gob"
gboolean valid;
GtkTreeIter iter;
@@ -708,24 +722,24 @@ mn_mailbox_properties_dialog_get_properties_by_type (MNMailboxPropertiesDialog *
return NULL;
}}
-#line 712 "mn-mailbox-properties-dialog.c"
+#line 726 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 393 "mn-mailbox-properties-dialog.gob"
+#line 407 "mn-mailbox-properties-dialog.gob"
static MNMailboxProperties *
mn_mailbox_properties_dialog_get_properties_by_g_type (MNMailboxPropertiesDialog * self, GType type)
-#line 718 "mn-mailbox-properties-dialog.c"
+#line 732 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::get_properties_by_g_type"
-#line 393 "mn-mailbox-properties-dialog.gob"
+#line 407 "mn-mailbox-properties-dialog.gob"
g_return_val_if_fail (self != NULL, (MNMailboxProperties * )0);
-#line 393 "mn-mailbox-properties-dialog.gob"
+#line 407 "mn-mailbox-properties-dialog.gob"
g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self), (MNMailboxProperties * )0);
-#line 393 "mn-mailbox-properties-dialog.gob"
+#line 407 "mn-mailbox-properties-dialog.gob"
g_return_val_if_fail (type != 0, (MNMailboxProperties * )0);
-#line 727 "mn-mailbox-properties-dialog.c"
+#line 741 "mn-mailbox-properties-dialog.c"
{
-#line 395 "mn-mailbox-properties-dialog.gob"
+#line 409 "mn-mailbox-properties-dialog.gob"
gboolean valid;
GtkTreeIter iter;
@@ -744,22 +758,22 @@ mn_mailbox_properties_dialog_get_properties_by_g_type (MNMailboxPropertiesDialog
return NULL;
}}
-#line 748 "mn-mailbox-properties-dialog.c"
+#line 762 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 414 "mn-mailbox-properties-dialog.gob"
+#line 428 "mn-mailbox-properties-dialog.gob"
MNMailbox *
mn_mailbox_properties_dialog_get_current_mailbox (MNMailboxPropertiesDialog * self)
-#line 754 "mn-mailbox-properties-dialog.c"
+#line 768 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::get_current_mailbox"
-#line 414 "mn-mailbox-properties-dialog.gob"
+#line 428 "mn-mailbox-properties-dialog.gob"
g_return_val_if_fail (self != NULL, (MNMailbox * )0);
-#line 414 "mn-mailbox-properties-dialog.gob"
+#line 428 "mn-mailbox-properties-dialog.gob"
g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self), (MNMailbox * )0);
-#line 761 "mn-mailbox-properties-dialog.c"
+#line 775 "mn-mailbox-properties-dialog.c"
{
-#line 416 "mn-mailbox-properties-dialog.gob"
+#line 430 "mn-mailbox-properties-dialog.gob"
MNMailboxProperties *properties;
MNMailbox *mailbox;
@@ -783,22 +797,22 @@ mn_mailbox_properties_dialog_get_current_mailbox (MNMailboxPropertiesDialog * se
return mailbox;
}}
-#line 787 "mn-mailbox-properties-dialog.c"
+#line 801 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 440 "mn-mailbox-properties-dialog.gob"
+#line 454 "mn-mailbox-properties-dialog.gob"
void
mn_mailbox_properties_dialog_apply (MNMailboxPropertiesDialog * self)
-#line 793 "mn-mailbox-properties-dialog.c"
+#line 807 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::apply"
-#line 440 "mn-mailbox-properties-dialog.gob"
+#line 454 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 440 "mn-mailbox-properties-dialog.gob"
+#line 454 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 800 "mn-mailbox-properties-dialog.c"
+#line 814 "mn-mailbox-properties-dialog.c"
{
-#line 442 "mn-mailbox-properties-dialog.gob"
+#line 456 "mn-mailbox-properties-dialog.gob"
MNMailbox *new_mailbox;
@@ -813,22 +827,22 @@ mn_mailbox_properties_dialog_apply (MNMailboxPropertiesDialog * self)
self_set_mailbox(self, new_mailbox);
g_object_unref(new_mailbox);
}}
-#line 817 "mn-mailbox-properties-dialog.c"
+#line 831 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 457 "mn-mailbox-properties-dialog.gob"
+#line 471 "mn-mailbox-properties-dialog.gob"
static void
mn_mailbox_properties_dialog_update_complete (MNMailboxPropertiesDialog * self)
-#line 823 "mn-mailbox-properties-dialog.c"
+#line 837 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::update_complete"
-#line 457 "mn-mailbox-properties-dialog.gob"
+#line 471 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 457 "mn-mailbox-properties-dialog.gob"
+#line 471 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 830 "mn-mailbox-properties-dialog.c"
+#line 844 "mn-mailbox-properties-dialog.c"
{
-#line 459 "mn-mailbox-properties-dialog.gob"
+#line 473 "mn-mailbox-properties-dialog.gob"
MNMailboxProperties *properties;
@@ -854,22 +868,22 @@ mn_mailbox_properties_dialog_update_complete (MNMailboxPropertiesDialog * self)
gtk_widget_set_sensitive(selfp->accept_button, complete);
}
}}
-#line 858 "mn-mailbox-properties-dialog.c"
+#line 872 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 485 "mn-mailbox-properties-dialog.gob"
+#line 499 "mn-mailbox-properties-dialog.gob"
static void
mn_mailbox_properties_dialog_update_default_name (MNMailboxPropertiesDialog * self)
-#line 864 "mn-mailbox-properties-dialog.c"
+#line 878 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::update_default_name"
-#line 485 "mn-mailbox-properties-dialog.gob"
+#line 499 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 485 "mn-mailbox-properties-dialog.gob"
+#line 499 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 871 "mn-mailbox-properties-dialog.c"
+#line 885 "mn-mailbox-properties-dialog.c"
{
-#line 487 "mn-mailbox-properties-dialog.gob"
+#line 501 "mn-mailbox-properties-dialog.gob"
MNMailboxProperties *properties;
@@ -877,40 +891,41 @@ mn_mailbox_properties_dialog_update_default_name (MNMailboxPropertiesDialog * se
if (properties)
{
gboolean complete;
- const char *default_name;
-
- g_free(selfp->default_name);
g_object_get(G_OBJECT(properties),
MN_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(&complete),
- MN_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(&selfp->default_name),
NULL);
- g_object_unref(properties);
- default_name = complete ? selfp->default_name : NULL;
- if (! default_name)
- default_name = "";
+ g_free(selfp->default_name);
+ if (complete)
+ g_object_get(G_OBJECT(properties),
+ MN_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(&selfp->default_name),
+ NULL);
+ else
+ selfp->default_name = NULL;
+
+ g_object_unref(properties);
- gtk_entry_set_text(GTK_ENTRY(selfp->mailbox_name_entry), default_name);
+ gtk_entry_set_text(GTK_ENTRY(selfp->mailbox_name_entry), selfp->default_name ? selfp->default_name : "");
gtk_widget_set_sensitive(selfp->mailbox_name_default_button, selfp->has_custom_name = FALSE);
}
}}
-#line 899 "mn-mailbox-properties-dialog.c"
+#line 914 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 513 "mn-mailbox-properties-dialog.gob"
+#line 528 "mn-mailbox-properties-dialog.gob"
static void
mn_mailbox_properties_dialog_update_default_check_delay (MNMailboxPropertiesDialog * self)
-#line 905 "mn-mailbox-properties-dialog.c"
+#line 920 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::update_default_check_delay"
-#line 513 "mn-mailbox-properties-dialog.gob"
+#line 528 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 513 "mn-mailbox-properties-dialog.gob"
+#line 528 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 912 "mn-mailbox-properties-dialog.c"
+#line 927 "mn-mailbox-properties-dialog.c"
{
-#line 515 "mn-mailbox-properties-dialog.gob"
+#line 530 "mn-mailbox-properties-dialog.gob"
MNMailboxProperties *properties;
@@ -937,59 +952,59 @@ mn_mailbox_properties_dialog_update_default_check_delay (MNMailboxPropertiesDial
gtk_widget_set_sensitive(selfp->delay_default_button, selfp->has_custom_check_delay = FALSE);
}
}}
-#line 941 "mn-mailbox-properties-dialog.c"
+#line 956 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 542 "mn-mailbox-properties-dialog.gob"
+#line 557 "mn-mailbox-properties-dialog.gob"
void
mn_mailbox_properties_dialog_set_help_section (GtkWidget * page, const char * section)
-#line 947 "mn-mailbox-properties-dialog.c"
+#line 962 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::set_help_section"
-#line 542 "mn-mailbox-properties-dialog.gob"
+#line 557 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (page != NULL);
-#line 542 "mn-mailbox-properties-dialog.gob"
+#line 557 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (GTK_IS_WIDGET (page));
-#line 542 "mn-mailbox-properties-dialog.gob"
+#line 557 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (section != NULL);
-#line 956 "mn-mailbox-properties-dialog.c"
+#line 971 "mn-mailbox-properties-dialog.c"
{
-#line 545 "mn-mailbox-properties-dialog.gob"
+#line 560 "mn-mailbox-properties-dialog.gob"
g_object_set_data_full(G_OBJECT(page), HELP_SECTION, g_strdup(section), g_free);
}}
-#line 962 "mn-mailbox-properties-dialog.c"
+#line 977 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 549 "mn-mailbox-properties-dialog.gob"
+#line 564 "mn-mailbox-properties-dialog.gob"
GtkWidget *
mn_mailbox_properties_dialog_new (GtkWindow * parent, MNMailbox * mailbox)
-#line 968 "mn-mailbox-properties-dialog.c"
+#line 983 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::new"
{
-#line 551 "mn-mailbox-properties-dialog.gob"
+#line 566 "mn-mailbox-properties-dialog.gob"
return GTK_WIDGET(GET_NEW_VARG(MN_MAILBOX_PROPERTIES_DIALOG_PROP_DIALOG_PARENT(parent),
MN_MAILBOX_PROPERTIES_DIALOG_PROP_MAILBOX(mailbox),
NULL));
}}
-#line 978 "mn-mailbox-properties-dialog.c"
+#line 993 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 559 "mn-mailbox-properties-dialog.gob"
+#line 574 "mn-mailbox-properties-dialog.gob"
void
mn_mailbox_properties_dialog_type_changed_h (MNMailboxPropertiesDialog * self, GtkComboBox * combobox)
-#line 984 "mn-mailbox-properties-dialog.c"
+#line 999 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::type_changed_h"
-#line 559 "mn-mailbox-properties-dialog.gob"
+#line 574 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 559 "mn-mailbox-properties-dialog.gob"
+#line 574 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 991 "mn-mailbox-properties-dialog.c"
+#line 1006 "mn-mailbox-properties-dialog.c"
{
-#line 561 "mn-mailbox-properties-dialog.gob"
+#line 576 "mn-mailbox-properties-dialog.gob"
if (selfp->active_properties)
{
@@ -1021,22 +1036,22 @@ mn_mailbox_properties_dialog_type_changed_h (MNMailboxPropertiesDialog * self, G
self_update_default_name(self);
self_update_default_check_delay(self);
}}
-#line 1025 "mn-mailbox-properties-dialog.c"
+#line 1040 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 593 "mn-mailbox-properties-dialog.gob"
+#line 608 "mn-mailbox-properties-dialog.gob"
void
mn_mailbox_properties_dialog_name_changed_h (MNMailboxPropertiesDialog * self, GtkEditable * editable)
-#line 1031 "mn-mailbox-properties-dialog.c"
+#line 1046 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::name_changed_h"
-#line 593 "mn-mailbox-properties-dialog.gob"
+#line 608 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 593 "mn-mailbox-properties-dialog.gob"
+#line 608 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1038 "mn-mailbox-properties-dialog.c"
+#line 1053 "mn-mailbox-properties-dialog.c"
{
-#line 595 "mn-mailbox-properties-dialog.gob"
+#line 610 "mn-mailbox-properties-dialog.gob"
const char *name;
@@ -1045,41 +1060,41 @@ mn_mailbox_properties_dialog_name_changed_h (MNMailboxPropertiesDialog * self, G
gtk_widget_set_sensitive(selfp->mailbox_name_default_button, selfp->has_custom_name);
}}
-#line 1049 "mn-mailbox-properties-dialog.c"
+#line 1064 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 604 "mn-mailbox-properties-dialog.gob"
+#line 619 "mn-mailbox-properties-dialog.gob"
void
mn_mailbox_properties_dialog_name_default_button_clicked_h (MNMailboxPropertiesDialog * self, GtkButton * button)
-#line 1055 "mn-mailbox-properties-dialog.c"
+#line 1070 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::name_default_button_clicked_h"
-#line 604 "mn-mailbox-properties-dialog.gob"
+#line 619 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 604 "mn-mailbox-properties-dialog.gob"
+#line 619 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1062 "mn-mailbox-properties-dialog.c"
+#line 1077 "mn-mailbox-properties-dialog.c"
{
-#line 606 "mn-mailbox-properties-dialog.gob"
+#line 621 "mn-mailbox-properties-dialog.gob"
self_update_default_name(self);
}}
-#line 1068 "mn-mailbox-properties-dialog.c"
+#line 1083 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 610 "mn-mailbox-properties-dialog.gob"
+#line 625 "mn-mailbox-properties-dialog.gob"
void
-mn_mailbox_properties_dialog_delay_changed_h (MNMailboxPropertiesDialog * self, GtkEditable * editable)
-#line 1074 "mn-mailbox-properties-dialog.c"
+mn_mailbox_properties_dialog_delay_changed_h (MNMailboxPropertiesDialog * self, GtkSpinButton * button)
+#line 1089 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::delay_changed_h"
-#line 610 "mn-mailbox-properties-dialog.gob"
+#line 625 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 610 "mn-mailbox-properties-dialog.gob"
+#line 625 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1081 "mn-mailbox-properties-dialog.c"
+#line 1096 "mn-mailbox-properties-dialog.c"
{
-#line 612 "mn-mailbox-properties-dialog.gob"
+#line 627 "mn-mailbox-properties-dialog.gob"
int minutes;
int seconds;
@@ -1090,41 +1105,41 @@ mn_mailbox_properties_dialog_delay_changed_h (MNMailboxPropertiesDialog * self,
selfp->has_custom_check_delay = minutes * 60 + seconds != selfp->default_check_delay;
gtk_widget_set_sensitive(selfp->delay_default_button, selfp->has_custom_check_delay);
}}
-#line 1094 "mn-mailbox-properties-dialog.c"
+#line 1109 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 623 "mn-mailbox-properties-dialog.gob"
+#line 638 "mn-mailbox-properties-dialog.gob"
void
mn_mailbox_properties_dialog_delay_default_button_clicked_h (MNMailboxPropertiesDialog * self, GtkButton * button)
-#line 1100 "mn-mailbox-properties-dialog.c"
+#line 1115 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::delay_default_button_clicked_h"
-#line 623 "mn-mailbox-properties-dialog.gob"
+#line 638 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 623 "mn-mailbox-properties-dialog.gob"
+#line 638 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1107 "mn-mailbox-properties-dialog.c"
+#line 1122 "mn-mailbox-properties-dialog.c"
{
-#line 625 "mn-mailbox-properties-dialog.gob"
+#line 640 "mn-mailbox-properties-dialog.gob"
self_update_default_check_delay(self);
}}
-#line 1113 "mn-mailbox-properties-dialog.c"
+#line 1128 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 629 "mn-mailbox-properties-dialog.gob"
+#line 644 "mn-mailbox-properties-dialog.gob"
void
mn_mailbox_properties_dialog_entry_activate_h (MNMailboxPropertiesDialog * self, GtkEntry * entry)
-#line 1119 "mn-mailbox-properties-dialog.c"
+#line 1134 "mn-mailbox-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties:Dialog::entry_activate_h"
-#line 629 "mn-mailbox-properties-dialog.gob"
+#line 644 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 629 "mn-mailbox-properties-dialog.gob"
+#line 644 "mn-mailbox-properties-dialog.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (self));
-#line 1126 "mn-mailbox-properties-dialog.c"
+#line 1141 "mn-mailbox-properties-dialog.c"
{
-#line 631 "mn-mailbox-properties-dialog.gob"
+#line 646 "mn-mailbox-properties-dialog.gob"
if (GTK_WIDGET_IS_SENSITIVE(GTK_WINDOW(self)->default_widget))
gtk_window_activate_default(GTK_WINDOW(self));
@@ -1166,5 +1181,5 @@ mn_mailbox_properties_dialog_entry_activate_h (MNMailboxPropertiesDialog * self,
gtk_widget_grab_focus(next);
}
}}
-#line 1170 "mn-mailbox-properties-dialog.c"
+#line 1185 "mn-mailbox-properties-dialog.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-mailbox-properties-dialog.gob b/src/mn-mailbox-properties-dialog.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -44,6 +44,12 @@ requires 2.0.14
#if WITH_GMAIL
#include "mn-gmail-mailbox-properties.h"
#endif
+#if WITH_YAHOO
+#include "mn-yahoo-mailbox-properties.h"
+#endif
+#if WITH_HOTMAIL
+#include "mn-hotmail-mailbox-properties.h"
+#endif
#if WITH_EVOLUTION
#include "mn-evolution-mailbox-properties.h"
#endif
@@ -145,7 +151,7 @@ class MN:Mailbox:Properties:Dialog from MN:Dialog
self = SELF(object);
mn_container_create_interface(GTK_CONTAINER(self),
- UIDIR G_DIR_SEPARATOR_S "mailbox-properties-dialog.glade",
+ PKGDATADIR G_DIR_SEPARATOR_S "mailbox-properties-dialog.glade",
"notebook",
"mn_mailbox_properties_dialog_",
"notebook", &self->notebook,
@@ -199,10 +205,18 @@ class MN:Mailbox:Properties:Dialog from MN:Dialog
#if WITH_GMAIL
self_add_type(self, MN_TYPE_GMAIL_MAILBOX_PROPERTIES);
#endif
+#if WITH_YAHOO
+ self_add_type(self, MN_TYPE_YAHOO_MAILBOX_PROPERTIES);
+#endif
+#if WITH_HOTMAIL
+ self_add_type(self, MN_TYPE_HOTMAIL_MAILBOX_PROPERTIES);
+#endif
#if WITH_EVOLUTION
self_add_type(self, MN_TYPE_EVOLUTION_MAILBOX_PROPERTIES);
#endif
+ gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(selfp->store), COLUMN_LABEL, GTK_SORT_ASCENDING);
+
renderer = gtk_cell_renderer_pixbuf_new();
g_object_set(renderer, "stock-size", GTK_ICON_SIZE_MENU, NULL);
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(selfp->mailbox_type_combo), renderer, FALSE);
@@ -491,21 +505,22 @@ class MN:Mailbox:Properties:Dialog from MN:Dialog
if (properties)
{
gboolean complete;
- const char *default_name;
-
- g_free(selfp->default_name);
g_object_get(G_OBJECT(properties),
MN_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(&complete),
- MN_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(&selfp->default_name),
NULL);
- g_object_unref(properties);
- default_name = complete ? selfp->default_name : NULL;
- if (! default_name)
- default_name = "";
+ g_free(selfp->default_name);
+ if (complete)
+ g_object_get(G_OBJECT(properties),
+ MN_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(&selfp->default_name),
+ NULL);
+ else
+ selfp->default_name = NULL;
+
+ g_object_unref(properties);
- gtk_entry_set_text(GTK_ENTRY(selfp->mailbox_name_entry), default_name);
+ gtk_entry_set_text(GTK_ENTRY(selfp->mailbox_name_entry), selfp->default_name ? selfp->default_name : "");
gtk_widget_set_sensitive(selfp->mailbox_name_default_button, selfp->has_custom_name = FALSE);
}
}
@@ -608,7 +623,7 @@ class MN:Mailbox:Properties:Dialog from MN:Dialog
}
protected void
- delay_changed_h (self, GtkEditable *editable)
+ delay_changed_h (self, GtkSpinButton *button)
{
int minutes;
int seconds;
diff --git a/src/mn-mailbox-properties.c b/src/mn-mailbox-properties.c
@@ -181,11 +181,11 @@ mn_mailbox_properties_class_init (MNMailboxPropertiesClass * c G_GNUC_UNUSED)
c->activate = NULL;
c->deactivate = NULL;
c->set_mailbox = NULL;
-#line 80 "mn-mailbox-properties.gob"
+#line 76 "mn-mailbox-properties.gob"
c->get_mailbox = ___real_mn_mailbox_properties_get_mailbox;
-#line 100 "mn-mailbox-properties.gob"
+#line 96 "mn-mailbox-properties.gob"
mn_mailbox_properties_class->activate = ___6_mn_mailbox_properties_activate;
-#line 110 "mn-mailbox-properties.gob"
+#line 106 "mn-mailbox-properties.gob"
mn_mailbox_properties_class->deactivate = ___7_mn_mailbox_properties_deactivate;
#line 191 "mn-mailbox-properties.c"
g_object_class->dispose = ___dispose;
@@ -304,17 +304,13 @@ g_value_set_pointer (VAL, self->dialog);
{
#line 59 "mn-mailbox-properties.gob"
- GType mailbox_type;
MNMailboxClass *class;
- mailbox_type = mn_mailbox_get_type_from_name(SELF_GET_CLASS(self)->type);
- g_assert(mailbox_type != 0);
-
- class = g_type_class_ref(mailbox_type);
+ class = mn_mailbox_get_class_from_name(SELF_GET_CLASS(self)->type);
g_value_set_int(VAL, class->default_check_delay);
g_type_class_unref(class);
-#line 318 "mn-mailbox-properties.c"
+#line 314 "mn-mailbox-properties.c"
}
break;
default:
@@ -331,68 +327,68 @@ g_value_set_pointer (VAL, self->dialog);
-#line 71 "mn-mailbox-properties.gob"
+#line 67 "mn-mailbox-properties.gob"
void
mn_mailbox_properties_activate (MNMailboxProperties * self)
-#line 338 "mn-mailbox-properties.c"
+#line 334 "mn-mailbox-properties.c"
{
MNMailboxPropertiesClass *klass;
-#line 71 "mn-mailbox-properties.gob"
+#line 67 "mn-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 71 "mn-mailbox-properties.gob"
+#line 67 "mn-mailbox-properties.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 345 "mn-mailbox-properties.c"
+#line 341 "mn-mailbox-properties.c"
klass = MN_MAILBOX_PROPERTIES_GET_CLASS(self);
if(klass->activate)
(*klass->activate)(self);
}
-#line 74 "mn-mailbox-properties.gob"
+#line 70 "mn-mailbox-properties.gob"
void
mn_mailbox_properties_deactivate (MNMailboxProperties * self)
-#line 355 "mn-mailbox-properties.c"
+#line 351 "mn-mailbox-properties.c"
{
MNMailboxPropertiesClass *klass;
-#line 74 "mn-mailbox-properties.gob"
+#line 70 "mn-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 74 "mn-mailbox-properties.gob"
+#line 70 "mn-mailbox-properties.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 362 "mn-mailbox-properties.c"
+#line 358 "mn-mailbox-properties.c"
klass = MN_MAILBOX_PROPERTIES_GET_CLASS(self);
if(klass->deactivate)
(*klass->deactivate)(self);
}
-#line 77 "mn-mailbox-properties.gob"
+#line 73 "mn-mailbox-properties.gob"
void
mn_mailbox_properties_set_mailbox (MNMailboxProperties * self, MNMailbox * mailbox)
-#line 372 "mn-mailbox-properties.c"
+#line 368 "mn-mailbox-properties.c"
{
MNMailboxPropertiesClass *klass;
-#line 77 "mn-mailbox-properties.gob"
+#line 73 "mn-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 77 "mn-mailbox-properties.gob"
+#line 73 "mn-mailbox-properties.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 379 "mn-mailbox-properties.c"
+#line 375 "mn-mailbox-properties.c"
klass = MN_MAILBOX_PROPERTIES_GET_CLASS(self);
if(klass->set_mailbox)
(*klass->set_mailbox)(self,mailbox);
}
-#line 80 "mn-mailbox-properties.gob"
+#line 76 "mn-mailbox-properties.gob"
MNMailbox *
mn_mailbox_properties_get_mailbox (MNMailboxProperties * self)
-#line 389 "mn-mailbox-properties.c"
+#line 385 "mn-mailbox-properties.c"
{
MNMailboxPropertiesClass *klass;
-#line 80 "mn-mailbox-properties.gob"
+#line 76 "mn-mailbox-properties.gob"
g_return_val_if_fail (self != NULL, (MNMailbox * )0);
-#line 80 "mn-mailbox-properties.gob"
+#line 76 "mn-mailbox-properties.gob"
g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (MNMailbox * )0);
-#line 396 "mn-mailbox-properties.c"
+#line 392 "mn-mailbox-properties.c"
klass = MN_MAILBOX_PROPERTIES_GET_CLASS(self);
if(klass->get_mailbox)
@@ -400,35 +396,35 @@ mn_mailbox_properties_get_mailbox (MNMailboxProperties * self)
else
return (MNMailbox * )(0);
}
-#line 80 "mn-mailbox-properties.gob"
+#line 76 "mn-mailbox-properties.gob"
static MNMailbox *
___real_mn_mailbox_properties_get_mailbox (MNMailboxProperties * self G_GNUC_UNUSED)
-#line 407 "mn-mailbox-properties.c"
+#line 403 "mn-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties::get_mailbox"
{
-#line 82 "mn-mailbox-properties.gob"
+#line 78 "mn-mailbox-properties.gob"
return mn_mailbox_new(SELF_GET_CLASS(self)->type, NULL);
}}
-#line 415 "mn-mailbox-properties.c"
+#line 411 "mn-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 86 "mn-mailbox-properties.gob"
+#line 82 "mn-mailbox-properties.gob"
GtkWidget *
mn_mailbox_properties_add_general_section (MNMailboxProperties * self, const char * title)
-#line 421 "mn-mailbox-properties.c"
+#line 417 "mn-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties::add_general_section"
-#line 86 "mn-mailbox-properties.gob"
+#line 82 "mn-mailbox-properties.gob"
g_return_val_if_fail (self != NULL, (GtkWidget * )0);
-#line 86 "mn-mailbox-properties.gob"
+#line 82 "mn-mailbox-properties.gob"
g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (GtkWidget * )0);
-#line 86 "mn-mailbox-properties.gob"
+#line 82 "mn-mailbox-properties.gob"
g_return_val_if_fail (title != NULL, (GtkWidget * )0);
-#line 430 "mn-mailbox-properties.c"
+#line 426 "mn-mailbox-properties.c"
{
-#line 88 "mn-mailbox-properties.gob"
+#line 84 "mn-mailbox-properties.gob"
GtkWidget *section;
GtkWidget *vbox;
@@ -440,20 +436,20 @@ mn_mailbox_properties_add_general_section (MNMailboxProperties * self, const cha
selfp->general_sections = g_slist_append(selfp->general_sections, section);
return vbox;
}}
-#line 444 "mn-mailbox-properties.c"
+#line 440 "mn-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 100 "mn-mailbox-properties.gob"
+#line 96 "mn-mailbox-properties.gob"
static void
___6_mn_mailbox_properties_activate (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 450 "mn-mailbox-properties.c"
+#line 446 "mn-mailbox-properties.c"
#define PARENT_HANDLER(___properties) \
{ if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->activate) \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->activate)(___properties); }
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties::activate"
{
-#line 102 "mn-mailbox-properties.gob"
+#line 98 "mn-mailbox-properties.gob"
Self *self = SELF(properties);
GSList *l;
@@ -461,21 +457,21 @@ ___6_mn_mailbox_properties_activate (MNMailboxProperties * properties G_GNUC_UNU
MN_LIST_FOREACH(l, selfp->general_sections)
gtk_box_pack_start(GTK_BOX(MN_MAILBOX_PROPERTIES_DIALOG(properties->dialog)->general_vbox), l->data, FALSE, FALSE, 0);
}}
-#line 465 "mn-mailbox-properties.c"
+#line 461 "mn-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 110 "mn-mailbox-properties.gob"
+#line 106 "mn-mailbox-properties.gob"
static void
___7_mn_mailbox_properties_deactivate (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 472 "mn-mailbox-properties.c"
+#line 468 "mn-mailbox-properties.c"
#define PARENT_HANDLER(___properties) \
{ if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->deactivate) \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->deactivate)(___properties); }
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties::deactivate"
{
-#line 112 "mn-mailbox-properties.gob"
+#line 108 "mn-mailbox-properties.gob"
Self *self = SELF(properties);
GSList *l;
@@ -483,63 +479,63 @@ ___7_mn_mailbox_properties_deactivate (MNMailboxProperties * properties G_GNUC_U
MN_LIST_FOREACH(l, selfp->general_sections)
gtk_container_remove(GTK_CONTAINER(MN_MAILBOX_PROPERTIES_DIALOG(properties->dialog)->general_vbox), l->data);
}}
-#line 487 "mn-mailbox-properties.c"
+#line 483 "mn-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 120 "mn-mailbox-properties.gob"
+#line 116 "mn-mailbox-properties.gob"
void
mn_mailbox_properties_notify_complete (MNMailboxProperties * self)
-#line 494 "mn-mailbox-properties.c"
+#line 490 "mn-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties::notify_complete"
-#line 120 "mn-mailbox-properties.gob"
+#line 116 "mn-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 120 "mn-mailbox-properties.gob"
+#line 116 "mn-mailbox-properties.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 501 "mn-mailbox-properties.c"
+#line 497 "mn-mailbox-properties.c"
{
-#line 122 "mn-mailbox-properties.gob"
+#line 118 "mn-mailbox-properties.gob"
g_object_notify(G_OBJECT(self), "complete");
}}
-#line 507 "mn-mailbox-properties.c"
+#line 503 "mn-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 126 "mn-mailbox-properties.gob"
+#line 122 "mn-mailbox-properties.gob"
void
mn_mailbox_properties_notify_default_name (MNMailboxProperties * self)
-#line 513 "mn-mailbox-properties.c"
+#line 509 "mn-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties::notify_default_name"
-#line 126 "mn-mailbox-properties.gob"
+#line 122 "mn-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 126 "mn-mailbox-properties.gob"
+#line 122 "mn-mailbox-properties.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 520 "mn-mailbox-properties.c"
+#line 516 "mn-mailbox-properties.c"
{
-#line 128 "mn-mailbox-properties.gob"
+#line 124 "mn-mailbox-properties.gob"
g_object_notify(G_OBJECT(self), "default-name");
}}
-#line 526 "mn-mailbox-properties.c"
+#line 522 "mn-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 132 "mn-mailbox-properties.gob"
+#line 128 "mn-mailbox-properties.gob"
void
mn_mailbox_properties_notify_default_check_delay (MNMailboxProperties * self)
-#line 532 "mn-mailbox-properties.c"
+#line 528 "mn-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:Properties::notify_default_check_delay"
-#line 132 "mn-mailbox-properties.gob"
+#line 128 "mn-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 132 "mn-mailbox-properties.gob"
+#line 128 "mn-mailbox-properties.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES (self));
-#line 539 "mn-mailbox-properties.c"
+#line 535 "mn-mailbox-properties.c"
{
-#line 134 "mn-mailbox-properties.gob"
+#line 130 "mn-mailbox-properties.gob"
g_object_notify(G_OBJECT(self), "default-check-delay");
}}
-#line 545 "mn-mailbox-properties.c"
+#line 541 "mn-mailbox-properties.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-mailbox-properties.gob b/src/mn-mailbox-properties.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -57,13 +57,9 @@ class MN:Mailbox:Properties from G:Object (abstract)
property INT default_check_delay
get
{
- GType mailbox_type;
MNMailboxClass *class;
- mailbox_type = mn_mailbox_get_type_from_name(SELF_GET_CLASS(self)->type);
- g_assert(mailbox_type != 0);
-
- class = g_type_class_ref(mailbox_type);
+ class = mn_mailbox_get_class_from_name(SELF_GET_CLASS(self)->type);
g_value_set_int(VAL, class->default_check_delay);
g_type_class_unref(class);
};
diff --git a/src/mn-mailbox-view.c b/src/mn-mailbox-view.c
@@ -55,7 +55,7 @@ enum
typedef struct
{
- gboolean has_polled;
+ gboolean has_manually_checkable;
gboolean has_selection;
} SensitivityInfo;
@@ -254,7 +254,7 @@ ___finalize(GObject *obj_self)
}
#undef __GOB_FUNCTION__
-#line 263 "mn-mailbox-view.gob"
+#line 264 "mn-mailbox-view.gob"
static void
mn_mailbox_view_class_init (MNMailboxViewClass * class G_GNUC_UNUSED)
#line 261 "mn-mailbox-view.c"
@@ -325,22 +325,22 @@ mn_mailbox_view_class_init (MNMailboxViewClass * class G_GNUC_UNUSED)
#line 86 "mn-mailbox-view.gob"
class->activate_update = ___real_mn_mailbox_view_activate_update;
-#line 108 "mn-mailbox-view.gob"
+#line 109 "mn-mailbox-view.gob"
class->activate_properties = ___real_mn_mailbox_view_activate_properties;
-#line 148 "mn-mailbox-view.gob"
+#line 149 "mn-mailbox-view.gob"
class->activate_add = ___real_mn_mailbox_view_activate_add;
-#line 163 "mn-mailbox-view.gob"
+#line 164 "mn-mailbox-view.gob"
class->activate_remove = ___real_mn_mailbox_view_activate_remove;
-#line 169 "mn-mailbox-view.gob"
+#line 170 "mn-mailbox-view.gob"
class->activate_cut = ___real_mn_mailbox_view_activate_cut;
-#line 176 "mn-mailbox-view.gob"
+#line 177 "mn-mailbox-view.gob"
class->activate_copy = ___real_mn_mailbox_view_activate_copy;
-#line 182 "mn-mailbox-view.gob"
+#line 183 "mn-mailbox-view.gob"
class->activate_paste = ___real_mn_mailbox_view_activate_paste;
#line 341 "mn-mailbox-view.c"
g_object_class->finalize = ___finalize;
{
-#line 264 "mn-mailbox-view.gob"
+#line 265 "mn-mailbox-view.gob"
GtkBindingSet *binding_set;
int i;
@@ -375,7 +375,7 @@ mn_mailbox_view_class_init (MNMailboxViewClass * class G_GNUC_UNUSED)
}
}
#undef __GOB_FUNCTION__
-#line 295 "mn-mailbox-view.gob"
+#line 296 "mn-mailbox-view.gob"
static void
mn_mailbox_view_init (MNMailboxView * self G_GNUC_UNUSED)
#line 382 "mn-mailbox-view.c"
@@ -386,7 +386,7 @@ mn_mailbox_view_init (MNMailboxView * self G_GNUC_UNUSED)
self->_priv->menu = gtk_menu_new();
#line 388 "mn-mailbox-view.c"
{
-#line 296 "mn-mailbox-view.gob"
+#line 297 "mn-mailbox-view.gob"
GtkMenuShell *shell;
GtkWidget *add_item;
@@ -414,7 +414,7 @@ mn_mailbox_view_init (MNMailboxView * self G_GNUC_UNUSED)
selfp->copy_item = mn_menu_shell_append(shell, GTK_STOCK_COPY, NULL);
selfp->paste_item = mn_menu_shell_append(shell, GTK_STOCK_PASTE, NULL);
mn_menu_shell_append(shell, NULL, NULL);
- select_all_item = mn_menu_shell_append(shell, MN_STOCK_SELECT_ALL, NULL);
+ select_all_item = mn_menu_shell_append(shell, GTK_STOCK_SELECT_ALL, NULL);
g_signal_connect_swapped(selfp->properties_item, "activate", G_CALLBACK(self_activate_properties), self);
g_signal_connect_swapped(selfp->update_item, "activate", G_CALLBACK(self_activate_update), self);
@@ -487,8 +487,7 @@ mn_mailbox_view_init (MNMailboxView * self G_GNUC_UNUSED)
mn_shell->mailboxes,
"signal::mailbox-added", self_mailbox_added_h, self,
"signal::mailbox-notify::stock-id", self_mailbox_notify_h, self,
- "signal::mailbox-notify::poll", self_mailbox_notify_h, self,
- "swapped-signal::mailbox-notify::poll", self_update_sensitivity, self,
+ "swapped-signal::mailbox-notify::manually-checkable", self_update_sensitivity, self,
"signal::mailbox-notify::format", self_mailbox_notify_h, self,
"signal::mailbox-notify::error", self_mailbox_notify_h, self,
"signal::mailbox-removed", self_mailbox_removed_h, self,
@@ -502,7 +501,7 @@ mn_mailbox_view_init (MNMailboxView * self G_GNUC_UNUSED)
"signal::row-activated", self_row_activated_h, NULL,
NULL);
-#line 506 "mn-mailbox-view.c"
+#line 505 "mn-mailbox-view.c"
}
}
#undef __GOB_FUNCTION__
@@ -510,7 +509,7 @@ mn_mailbox_view_init (MNMailboxView * self G_GNUC_UNUSED)
#line 86 "mn-mailbox-view.gob"
void
mn_mailbox_view_activate_update (MNMailboxView * self)
-#line 514 "mn-mailbox-view.c"
+#line 513 "mn-mailbox-view.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -522,7 +521,7 @@ memset (&___param_values, 0, sizeof (___param_values));
g_return_if_fail (self != NULL);
#line 86 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 526 "mn-mailbox-view.c"
+#line 525 "mn-mailbox-view.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -538,7 +537,7 @@ memset (&___param_values, 0, sizeof (___param_values));
#line 86 "mn-mailbox-view.gob"
static void
___real_mn_mailbox_view_activate_update (MNMailboxView * self G_GNUC_UNUSED)
-#line 542 "mn-mailbox-view.c"
+#line 541 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_update"
{
@@ -549,13 +548,13 @@ ___real_mn_mailbox_view_activate_update (MNMailboxView * self G_GNUC_UNUSED)
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
gtk_tree_selection_selected_foreach(selection, self_activate_update_cb, self);
}}
-#line 553 "mn-mailbox-view.c"
+#line 552 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
#line 95 "mn-mailbox-view.gob"
static void
mn_mailbox_view_activate_update_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
-#line 559 "mn-mailbox-view.c"
+#line 558 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_update_cb"
{
@@ -564,13 +563,14 @@ mn_mailbox_view_activate_update_cb (GtkTreeModel * model, GtkTreePath * path, Gt
MNMailbox *mailbox;
gtk_tree_model_get(model, iter, COLUMN_MAILBOX, &mailbox, -1);
- mn_mailbox_check(mailbox);
+ if (mn_mailbox_get_manually_checkable(mailbox))
+ mn_mailbox_check(mailbox);
g_object_unref(mailbox);
}}
#line 571 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 108 "mn-mailbox-view.gob"
+#line 109 "mn-mailbox-view.gob"
void
mn_mailbox_view_activate_properties (MNMailboxView * self)
#line 577 "mn-mailbox-view.c"
@@ -581,9 +581,9 @@ mn_mailbox_view_activate_properties (MNMailboxView * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 108 "mn-mailbox-view.gob"
+#line 109 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 108 "mn-mailbox-view.gob"
+#line 109 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
#line 589 "mn-mailbox-view.c"
@@ -598,14 +598,14 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 108 "mn-mailbox-view.gob"
+#line 109 "mn-mailbox-view.gob"
static void
___real_mn_mailbox_view_activate_properties (MNMailboxView * self G_GNUC_UNUSED)
#line 605 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_properties"
{
-#line 110 "mn-mailbox-view.gob"
+#line 111 "mn-mailbox-view.gob"
GtkTreeSelection *selection;
@@ -615,14 +615,14 @@ ___real_mn_mailbox_view_activate_properties (MNMailboxView * self G_GNUC_UNUSED)
#line 616 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 117 "mn-mailbox-view.gob"
+#line 118 "mn-mailbox-view.gob"
static void
mn_mailbox_view_activate_properties_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
#line 622 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_properties_cb"
{
-#line 122 "mn-mailbox-view.gob"
+#line 123 "mn-mailbox-view.gob"
Self *self = data;
MNMailbox *mailbox;
@@ -632,7 +632,7 @@ mn_mailbox_view_activate_properties_cb (GtkTreeModel * model, GtkTreePath * path
dialog = (GtkWidget *) mn_shell_get_mailbox_properties_dialog(mn_shell, mailbox);
if (dialog)
- gtk_window_present(GTK_WINDOW(dialog));
+ mn_window_present_from_event(GTK_WINDOW(dialog));
else
{
dialog = mn_mailbox_properties_dialog_new(mn_widget_get_parent_window(GTK_WIDGET(self)), mailbox);
@@ -651,7 +651,7 @@ mn_mailbox_view_activate_properties_cb (GtkTreeModel * model, GtkTreePath * path
#line 652 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 148 "mn-mailbox-view.gob"
+#line 149 "mn-mailbox-view.gob"
void
mn_mailbox_view_activate_add (MNMailboxView * self)
#line 658 "mn-mailbox-view.c"
@@ -662,9 +662,9 @@ mn_mailbox_view_activate_add (MNMailboxView * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 148 "mn-mailbox-view.gob"
+#line 149 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 148 "mn-mailbox-view.gob"
+#line 149 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
#line 670 "mn-mailbox-view.c"
@@ -679,14 +679,14 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 148 "mn-mailbox-view.gob"
+#line 149 "mn-mailbox-view.gob"
static void
___real_mn_mailbox_view_activate_add (MNMailboxView * self G_GNUC_UNUSED)
#line 686 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_add"
{
-#line 150 "mn-mailbox-view.gob"
+#line 151 "mn-mailbox-view.gob"
GtkWidget *dialog;
@@ -702,7 +702,7 @@ ___real_mn_mailbox_view_activate_add (MNMailboxView * self G_GNUC_UNUSED)
#line 703 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 163 "mn-mailbox-view.gob"
+#line 164 "mn-mailbox-view.gob"
void
mn_mailbox_view_activate_remove (MNMailboxView * self)
#line 709 "mn-mailbox-view.c"
@@ -713,9 +713,9 @@ mn_mailbox_view_activate_remove (MNMailboxView * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 163 "mn-mailbox-view.gob"
+#line 164 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 163 "mn-mailbox-view.gob"
+#line 164 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
#line 721 "mn-mailbox-view.c"
@@ -730,21 +730,21 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 163 "mn-mailbox-view.gob"
+#line 164 "mn-mailbox-view.gob"
static void
___real_mn_mailbox_view_activate_remove (MNMailboxView * self G_GNUC_UNUSED)
#line 737 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_remove"
{
-#line 165 "mn-mailbox-view.gob"
+#line 166 "mn-mailbox-view.gob"
self_remove_mailbox(self);
}}
#line 745 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 169 "mn-mailbox-view.gob"
+#line 170 "mn-mailbox-view.gob"
void
mn_mailbox_view_activate_cut (MNMailboxView * self)
#line 751 "mn-mailbox-view.c"
@@ -755,9 +755,9 @@ mn_mailbox_view_activate_cut (MNMailboxView * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 169 "mn-mailbox-view.gob"
+#line 170 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 169 "mn-mailbox-view.gob"
+#line 170 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
#line 763 "mn-mailbox-view.c"
@@ -772,14 +772,14 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 169 "mn-mailbox-view.gob"
+#line 170 "mn-mailbox-view.gob"
static void
___real_mn_mailbox_view_activate_cut (MNMailboxView * self G_GNUC_UNUSED)
#line 779 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_cut"
{
-#line 171 "mn-mailbox-view.gob"
+#line 172 "mn-mailbox-view.gob"
self_copy_mailbox(self);
self_remove_mailbox(self);
@@ -787,7 +787,7 @@ ___real_mn_mailbox_view_activate_cut (MNMailboxView * self G_GNUC_UNUSED)
#line 788 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 176 "mn-mailbox-view.gob"
+#line 177 "mn-mailbox-view.gob"
void
mn_mailbox_view_activate_copy (MNMailboxView * self)
#line 794 "mn-mailbox-view.c"
@@ -798,9 +798,9 @@ mn_mailbox_view_activate_copy (MNMailboxView * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 176 "mn-mailbox-view.gob"
+#line 177 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 176 "mn-mailbox-view.gob"
+#line 177 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
#line 806 "mn-mailbox-view.c"
@@ -815,21 +815,21 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 176 "mn-mailbox-view.gob"
+#line 177 "mn-mailbox-view.gob"
static void
___real_mn_mailbox_view_activate_copy (MNMailboxView * self G_GNUC_UNUSED)
#line 822 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_copy"
{
-#line 178 "mn-mailbox-view.gob"
+#line 179 "mn-mailbox-view.gob"
self_copy_mailbox(self);
}}
#line 830 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 182 "mn-mailbox-view.gob"
+#line 183 "mn-mailbox-view.gob"
void
mn_mailbox_view_activate_paste (MNMailboxView * self)
#line 836 "mn-mailbox-view.c"
@@ -840,9 +840,9 @@ mn_mailbox_view_activate_paste (MNMailboxView * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 182 "mn-mailbox-view.gob"
+#line 183 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 182 "mn-mailbox-view.gob"
+#line 183 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
#line 848 "mn-mailbox-view.c"
@@ -857,14 +857,14 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 182 "mn-mailbox-view.gob"
+#line 183 "mn-mailbox-view.gob"
static void
___real_mn_mailbox_view_activate_paste (MNMailboxView * self G_GNUC_UNUSED)
#line 864 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::activate_paste"
{
-#line 184 "mn-mailbox-view.gob"
+#line 185 "mn-mailbox-view.gob"
GtkSelectionData *data;
@@ -1150,7 +1150,6 @@ mn_mailbox_view_update_iter (MNMailboxView * self, GtkTreeIter * iter, MNMailbox
GtkTreeModel *model;
char *status;
- const char *stock_id = NULL;
const char *emblem_stock_id = NULL;
GdkPixbuf *emblem = NULL;
char *markup;
@@ -1164,30 +1163,22 @@ mn_mailbox_view_update_iter (MNMailboxView * self, GtkTreeIter * iter, MNMailbox
emblem_stock_id = MN_STOCK_ERROR;
}
else
- {
- status = g_strdup_printf(_("%s mailbox"), mailbox->format);
- if (mn_mailbox_get_poll(mailbox))
- emblem_stock_id = MN_STOCK_POLLED;
- }
+ status = g_strdup_printf(_("%s mailbox"), mailbox->format);
}
else
{
if (mailbox->error)
{
status = g_strdup(mailbox->error);
- if (strcmp(mailbox->stock_id, MN_STOCK_UNKNOWN))
- emblem_stock_id = MN_STOCK_UNKNOWN;
+ emblem_stock_id = MN_STOCK_ERROR;
}
else
{
status = g_strdup(_("detecting mailbox type..."));
- stock_id = GTK_STOCK_EXECUTE;
+ emblem_stock_id = GTK_STOCK_EXECUTE;
}
}
- if (! stock_id)
- stock_id = mailbox->stock_id;
-
if (emblem_stock_id)
emblem = gtk_widget_render_icon(GTK_WIDGET(self),
emblem_stock_id,
@@ -1203,7 +1194,7 @@ mn_mailbox_view_update_iter (MNMailboxView * self, GtkTreeIter * iter, MNMailbox
model = gtk_tree_view_get_model(GTK_TREE_VIEW(self));
gtk_list_store_set(GTK_LIST_STORE(model), iter,
COLUMN_MAILBOX, mailbox,
- COLUMN_ICON, stock_id,
+ COLUMN_ICON, mailbox->stock_id,
COLUMN_EMBLEM, emblem,
COLUMN_PIXBUF, NULL,
COLUMN_LABEL, markup,
@@ -1216,28 +1207,28 @@ mn_mailbox_view_update_iter (MNMailboxView * self, GtkTreeIter * iter, MNMailbox
g_free(markup);
g_free(text);
}}
-#line 1220 "mn-mailbox-view.c"
+#line 1211 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 623 "mn-mailbox-view.gob"
+#line 614 "mn-mailbox-view.gob"
static gboolean
mn_mailbox_view_find_mailbox (MNMailboxView * self, MNMailbox * mailbox, GtkTreeIter * iter)
-#line 1226 "mn-mailbox-view.c"
+#line 1217 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::find_mailbox"
-#line 623 "mn-mailbox-view.gob"
+#line 614 "mn-mailbox-view.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 623 "mn-mailbox-view.gob"
+#line 614 "mn-mailbox-view.gob"
g_return_val_if_fail (MN_IS_MAILBOX_VIEW (self), (gboolean )0);
-#line 623 "mn-mailbox-view.gob"
+#line 614 "mn-mailbox-view.gob"
g_return_val_if_fail (mailbox != NULL, (gboolean )0);
-#line 623 "mn-mailbox-view.gob"
+#line 614 "mn-mailbox-view.gob"
g_return_val_if_fail (MN_IS_MAILBOX (mailbox), (gboolean )0);
-#line 623 "mn-mailbox-view.gob"
+#line 614 "mn-mailbox-view.gob"
g_return_val_if_fail (iter != NULL, (gboolean )0);
-#line 1239 "mn-mailbox-view.c"
+#line 1230 "mn-mailbox-view.c"
{
-#line 627 "mn-mailbox-view.gob"
+#line 618 "mn-mailbox-view.gob"
GtkTreeModel *model;
GtkTreeIter our_iter;
@@ -1263,22 +1254,22 @@ mn_mailbox_view_find_mailbox (MNMailboxView * self, MNMailbox * mailbox, GtkTree
return FALSE;
}}
-#line 1267 "mn-mailbox-view.c"
+#line 1258 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 653 "mn-mailbox-view.gob"
+#line 644 "mn-mailbox-view.gob"
static void
mn_mailbox_view_update_sensitivity (MNMailboxView * self)
-#line 1273 "mn-mailbox-view.c"
+#line 1264 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::update_sensitivity"
-#line 653 "mn-mailbox-view.gob"
+#line 644 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 653 "mn-mailbox-view.gob"
+#line 644 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1280 "mn-mailbox-view.c"
+#line 1271 "mn-mailbox-view.c"
{
-#line 655 "mn-mailbox-view.gob"
+#line 646 "mn-mailbox-view.gob"
GtkTreeSelection *selection;
SensitivityInfo info = { FALSE, FALSE };
@@ -1287,69 +1278,69 @@ mn_mailbox_view_update_sensitivity (MNMailboxView * self)
gtk_tree_selection_selected_foreach(selection, self_update_sensitivity_cb, &info);
gtk_widget_set_sensitive(selfp->properties_item, info.has_selection);
- gtk_widget_set_sensitive(selfp->update_item, info.has_polled);
+ gtk_widget_set_sensitive(selfp->update_item, info.has_manually_checkable);
gtk_widget_set_sensitive(selfp->remove_item, info.has_selection);
gtk_widget_set_sensitive(selfp->cut_item, info.has_selection);
gtk_widget_set_sensitive(selfp->copy_item, info.has_selection);
}}
-#line 1296 "mn-mailbox-view.c"
+#line 1287 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 669 "mn-mailbox-view.gob"
+#line 660 "mn-mailbox-view.gob"
static void
mn_mailbox_view_update_sensitivity_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
-#line 1302 "mn-mailbox-view.c"
+#line 1293 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::update_sensitivity_cb"
{
-#line 674 "mn-mailbox-view.gob"
+#line 665 "mn-mailbox-view.gob"
SensitivityInfo *info = data;
info->has_selection = TRUE;
- if (! info->has_polled)
+ if (! info->has_manually_checkable)
{
MNMailbox *mailbox;
gtk_tree_model_get(model, iter, COLUMN_MAILBOX, &mailbox, -1);
- if (mn_mailbox_get_poll(mailbox))
- info->has_polled = TRUE;
+ if (mn_mailbox_get_manually_checkable(mailbox))
+ info->has_manually_checkable = TRUE;
g_object_unref(mailbox);
}
}}
-#line 1321 "mn-mailbox-view.c"
+#line 1312 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 689 "mn-mailbox-view.gob"
+#line 680 "mn-mailbox-view.gob"
static void
mn_mailbox_view_remove_mailbox (MNMailboxView * self)
-#line 1327 "mn-mailbox-view.c"
+#line 1318 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::remove_mailbox"
-#line 689 "mn-mailbox-view.gob"
+#line 680 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 689 "mn-mailbox-view.gob"
+#line 680 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1334 "mn-mailbox-view.c"
+#line 1325 "mn-mailbox-view.c"
{
-#line 691 "mn-mailbox-view.gob"
+#line 682 "mn-mailbox-view.gob"
GtkTreeSelection *selection;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
gtk_tree_selection_selected_foreach(selection, self_remove_mailbox_cb, NULL);
}}
-#line 1343 "mn-mailbox-view.c"
+#line 1334 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 698 "mn-mailbox-view.gob"
+#line 689 "mn-mailbox-view.gob"
static void
mn_mailbox_view_remove_mailbox_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
-#line 1349 "mn-mailbox-view.c"
+#line 1340 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::remove_mailbox_cb"
{
-#line 703 "mn-mailbox-view.gob"
+#line 694 "mn-mailbox-view.gob"
MNMailbox *mailbox;
@@ -1357,22 +1348,22 @@ mn_mailbox_view_remove_mailbox_cb (GtkTreeModel * model, GtkTreePath * path, Gtk
mn_mailboxes_queue_remove(mn_shell->mailboxes, mailbox);
g_object_unref(mailbox);
}}
-#line 1361 "mn-mailbox-view.c"
+#line 1352 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 711 "mn-mailbox-view.gob"
+#line 702 "mn-mailbox-view.gob"
static void
mn_mailbox_view_copy_mailbox (MNMailboxView * self)
-#line 1367 "mn-mailbox-view.c"
+#line 1358 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::copy_mailbox"
-#line 711 "mn-mailbox-view.gob"
+#line 702 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 711 "mn-mailbox-view.gob"
+#line 702 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1374 "mn-mailbox-view.c"
+#line 1365 "mn-mailbox-view.c"
{
-#line 713 "mn-mailbox-view.gob"
+#line 704 "mn-mailbox-view.gob"
GSList *configurations = NULL;
GtkTreeSelection *selection;
@@ -1392,36 +1383,48 @@ mn_mailbox_view_copy_mailbox (MNMailboxView * self)
configurations);
g_assert(status == TRUE);
}}
-#line 1396 "mn-mailbox-view.c"
+#line 1387 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 733 "mn-mailbox-view.gob"
+#line 724 "mn-mailbox-view.gob"
static void
mn_mailbox_view_copy_mailbox_cb (GtkTreeModel * model, GtkTreePath * path, GtkTreeIter * iter, gpointer data)
-#line 1402 "mn-mailbox-view.c"
+#line 1393 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::copy_mailbox_cb"
{
-#line 738 "mn-mailbox-view.gob"
+#line 729 "mn-mailbox-view.gob"
GSList **configurations = data;
MNMailbox *mailbox;
+ /*
+ * Note that the MNMailboxConfiguration object returned by
+ * mn_mailbox_get_configuration() does not include the keyring
+ * password. This is not a problem unless the user copies a
+ * mailbox, removes the password from the keyring and then pastes
+ * the mailbox: the pasted mailbox will have no password.
+ *
+ * Including the password in MNMailboxConfiguration would require
+ * to cope with the fact that gnome-keyring requests can block the
+ * UI. It's really not worth the effort.
+ */
+
gtk_tree_model_get(model, iter, COLUMN_MAILBOX, &mailbox, -1);
*configurations = g_slist_append(*configurations, mn_mailbox_get_configuration(mailbox));
g_object_unref(mailbox);
}}
-#line 1415 "mn-mailbox-view.c"
+#line 1418 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 747 "mn-mailbox-view.gob"
+#line 750 "mn-mailbox-view.gob"
static void
mn_mailbox_view_get_clipboard_cb (GtkClipboard * clipboard, GtkSelectionData * selection_data, unsigned int info, gpointer user_data_or_owner)
-#line 1421 "mn-mailbox-view.c"
+#line 1424 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::get_clipboard_cb"
{
-#line 752 "mn-mailbox-view.gob"
+#line 755 "mn-mailbox-view.gob"
const GSList *configurations = user_data_or_owner;
unsigned char buf[sizeof(configurations)];
@@ -1433,55 +1436,55 @@ mn_mailbox_view_get_clipboard_cb (GtkClipboard * clipboard, GtkSelectionData * s
buf,
sizeof(buf));
}}
-#line 1437 "mn-mailbox-view.c"
+#line 1440 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 764 "mn-mailbox-view.gob"
+#line 767 "mn-mailbox-view.gob"
static void
mn_mailbox_view_clear_clipboard_cb (GtkClipboard * clipboard, gpointer user_data_or_owner)
-#line 1443 "mn-mailbox-view.c"
+#line 1446 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::clear_clipboard_cb"
{
-#line 766 "mn-mailbox-view.gob"
+#line 769 "mn-mailbox-view.gob"
GSList *configurations = user_data_or_owner;
eel_g_slist_free_deep_custom(configurations, (GFunc) mn_mailbox_configuration_free, NULL);
}}
-#line 1453 "mn-mailbox-view.c"
+#line 1456 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 772 "mn-mailbox-view.gob"
+#line 775 "mn-mailbox-view.gob"
static void
mn_mailbox_view_select_all (MNMailboxView * self)
-#line 1459 "mn-mailbox-view.c"
+#line 1462 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::select_all"
-#line 772 "mn-mailbox-view.gob"
+#line 775 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 772 "mn-mailbox-view.gob"
+#line 775 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1466 "mn-mailbox-view.c"
+#line 1469 "mn-mailbox-view.c"
{
-#line 774 "mn-mailbox-view.gob"
+#line 777 "mn-mailbox-view.gob"
GtkTreeSelection *selection;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(self));
gtk_tree_selection_select_all(selection);
}}
-#line 1475 "mn-mailbox-view.c"
+#line 1478 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 781 "mn-mailbox-view.gob"
+#line 784 "mn-mailbox-view.gob"
static void
mn_mailbox_view_properties_add_response_h (GtkDialog * dialog, int response, gpointer user_data)
-#line 1481 "mn-mailbox-view.c"
+#line 1484 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::properties_add_response_h"
{
-#line 785 "mn-mailbox-view.gob"
+#line 788 "mn-mailbox-view.gob"
if (response == GTK_RESPONSE_CANCEL)
gtk_widget_destroy(GTK_WIDGET(dialog));
@@ -1499,54 +1502,54 @@ mn_mailbox_view_properties_add_response_h (GtkDialog * dialog, int response, gpo
gtk_widget_destroy(GTK_WIDGET(dialog));
}
}}
-#line 1503 "mn-mailbox-view.c"
+#line 1506 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 803 "mn-mailbox-view.gob"
+#line 806 "mn-mailbox-view.gob"
static void
mn_mailbox_view_properties_edit_response_h (GtkDialog * dialog, int response, gpointer user_data)
-#line 1509 "mn-mailbox-view.c"
+#line 1512 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::properties_edit_response_h"
{
-#line 807 "mn-mailbox-view.gob"
+#line 810 "mn-mailbox-view.gob"
if (response == GTK_RESPONSE_APPLY || response == GTK_RESPONSE_OK)
mn_mailbox_properties_dialog_apply(MN_MAILBOX_PROPERTIES_DIALOG(dialog));
if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_OK)
gtk_widget_destroy(GTK_WIDGET(dialog));
}}
-#line 1520 "mn-mailbox-view.c"
+#line 1523 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 814 "mn-mailbox-view.gob"
+#line 817 "mn-mailbox-view.gob"
static void
mn_mailbox_view_popup_menu (MNMailboxView * self, unsigned int button, guint32 activate_time)
-#line 1526 "mn-mailbox-view.c"
+#line 1529 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::popup_menu"
-#line 814 "mn-mailbox-view.gob"
+#line 817 "mn-mailbox-view.gob"
g_return_if_fail (self != NULL);
-#line 814 "mn-mailbox-view.gob"
+#line 817 "mn-mailbox-view.gob"
g_return_if_fail (MN_IS_MAILBOX_VIEW (self));
-#line 1533 "mn-mailbox-view.c"
+#line 1536 "mn-mailbox-view.c"
{
-#line 816 "mn-mailbox-view.gob"
+#line 819 "mn-mailbox-view.gob"
gtk_clipboard_request_targets(global_clipboard, self_popup_menu_targets_received_cb, self);
gtk_menu_popup(GTK_MENU(selfp->menu), NULL, NULL, NULL, NULL, button, activate_time);
}}
-#line 1540 "mn-mailbox-view.c"
+#line 1543 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 821 "mn-mailbox-view.gob"
+#line 824 "mn-mailbox-view.gob"
static void
mn_mailbox_view_popup_menu_targets_received_cb (GtkClipboard * clipboard, GdkAtom * atoms, int n_atoms, gpointer data)
-#line 1546 "mn-mailbox-view.c"
+#line 1549 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::popup_menu_targets_received_cb"
{
-#line 826 "mn-mailbox-view.gob"
+#line 829 "mn-mailbox-view.gob"
Self *self = data;
int i;
@@ -1562,17 +1565,17 @@ mn_mailbox_view_popup_menu_targets_received_cb (GtkClipboard * clipboard, GdkAto
gtk_widget_set_sensitive(selfp->paste_item, can_paste);
}}
-#line 1566 "mn-mailbox-view.c"
+#line 1569 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 842 "mn-mailbox-view.gob"
+#line 845 "mn-mailbox-view.gob"
static gboolean
mn_mailbox_view_popup_menu_h (GtkWidget * widget, gpointer user_data)
-#line 1572 "mn-mailbox-view.c"
+#line 1575 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::popup_menu_h"
{
-#line 844 "mn-mailbox-view.gob"
+#line 847 "mn-mailbox-view.gob"
Self *self = SELF(widget);
@@ -1581,51 +1584,51 @@ mn_mailbox_view_popup_menu_h (GtkWidget * widget, gpointer user_data)
return TRUE; /* a menu was activated */
}}
-#line 1585 "mn-mailbox-view.c"
+#line 1588 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 853 "mn-mailbox-view.gob"
+#line 856 "mn-mailbox-view.gob"
static gboolean
mn_mailbox_view_button_press_event_h (GtkWidget * widget, GdkEventButton * event, gpointer user_data)
-#line 1591 "mn-mailbox-view.c"
+#line 1594 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::button_press_event_h"
{
-#line 857 "mn-mailbox-view.gob"
+#line 860 "mn-mailbox-view.gob"
if (event->button == 3)
self_popup_menu(SELF(widget), event->button, event->time);
return FALSE; /* propagate event */
}}
-#line 1602 "mn-mailbox-view.c"
+#line 1605 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 864 "mn-mailbox-view.gob"
+#line 867 "mn-mailbox-view.gob"
static void
mn_mailbox_view_row_activated_h (GtkTreeView * treeview, GtkTreePath * path, GtkTreeViewColumn * column, gpointer user_data)
-#line 1608 "mn-mailbox-view.c"
+#line 1611 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::row_activated_h"
{
-#line 869 "mn-mailbox-view.gob"
+#line 872 "mn-mailbox-view.gob"
self_activate_properties(SELF(treeview));
}}
-#line 1616 "mn-mailbox-view.c"
+#line 1619 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
-#line 873 "mn-mailbox-view.gob"
+#line 876 "mn-mailbox-view.gob"
GtkWidget *
mn_mailbox_view_new (void)
-#line 1622 "mn-mailbox-view.c"
+#line 1625 "mn-mailbox-view.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox:View::new"
{
-#line 875 "mn-mailbox-view.gob"
+#line 878 "mn-mailbox-view.gob"
g_return_val_if_fail(mn_shell != NULL, NULL);
return GTK_WIDGET(GET_NEW);
}}
-#line 1631 "mn-mailbox-view.c"
+#line 1634 "mn-mailbox-view.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-mailbox-view.gob b/src/mn-mailbox-view.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -57,7 +57,7 @@ enum
typedef struct
{
- gboolean has_polled;
+ gboolean has_manually_checkable;
gboolean has_selection;
} SensitivityInfo;
@@ -101,7 +101,8 @@ class MN:Mailbox:View from Gtk:Tree:View
MNMailbox *mailbox;
gtk_tree_model_get(model, iter, COLUMN_MAILBOX, &mailbox, -1);
- mn_mailbox_check(mailbox);
+ if (mn_mailbox_get_manually_checkable(mailbox))
+ mn_mailbox_check(mailbox);
g_object_unref(mailbox);
}
@@ -128,7 +129,7 @@ class MN:Mailbox:View from Gtk:Tree:View
dialog = (GtkWidget *) mn_shell_get_mailbox_properties_dialog(mn_shell, mailbox);
if (dialog)
- gtk_window_present(GTK_WINDOW(dialog));
+ mn_window_present_from_event(GTK_WINDOW(dialog));
else
{
dialog = mn_mailbox_properties_dialog_new(mn_widget_get_parent_window(GTK_WIDGET(self)), mailbox);
@@ -320,7 +321,7 @@ class MN:Mailbox:View from Gtk:Tree:View
selfp->copy_item = mn_menu_shell_append(shell, GTK_STOCK_COPY, NULL);
selfp->paste_item = mn_menu_shell_append(shell, GTK_STOCK_PASTE, NULL);
mn_menu_shell_append(shell, NULL, NULL);
- select_all_item = mn_menu_shell_append(shell, MN_STOCK_SELECT_ALL, NULL);
+ select_all_item = mn_menu_shell_append(shell, GTK_STOCK_SELECT_ALL, NULL);
g_signal_connect_swapped(selfp->properties_item, "activate", G_CALLBACK(self_activate_properties), self);
g_signal_connect_swapped(selfp->update_item, "activate", G_CALLBACK(self_activate_update), self);
@@ -393,8 +394,7 @@ class MN:Mailbox:View from Gtk:Tree:View
mn_shell->mailboxes,
"signal::mailbox-added", self_mailbox_added_h, self,
"signal::mailbox-notify::stock-id", self_mailbox_notify_h, self,
- "signal::mailbox-notify::poll", self_mailbox_notify_h, self,
- "swapped-signal::mailbox-notify::poll", self_update_sensitivity, self,
+ "swapped-signal::mailbox-notify::manually-checkable", self_update_sensitivity, self,
"signal::mailbox-notify::format", self_mailbox_notify_h, self,
"signal::mailbox-notify::error", self_mailbox_notify_h, self,
"signal::mailbox-removed", self_mailbox_removed_h, self,
@@ -553,7 +553,6 @@ class MN:Mailbox:View from Gtk:Tree:View
{
GtkTreeModel *model;
char *status;
- const char *stock_id = NULL;
const char *emblem_stock_id = NULL;
GdkPixbuf *emblem = NULL;
char *markup;
@@ -567,30 +566,22 @@ class MN:Mailbox:View from Gtk:Tree:View
emblem_stock_id = MN_STOCK_ERROR;
}
else
- {
- status = g_strdup_printf(_("%s mailbox"), mailbox->format);
- if (mn_mailbox_get_poll(mailbox))
- emblem_stock_id = MN_STOCK_POLLED;
- }
+ status = g_strdup_printf(_("%s mailbox"), mailbox->format);
}
else
{
if (mailbox->error)
{
status = g_strdup(mailbox->error);
- if (strcmp(mailbox->stock_id, MN_STOCK_UNKNOWN))
- emblem_stock_id = MN_STOCK_UNKNOWN;
+ emblem_stock_id = MN_STOCK_ERROR;
}
else
{
status = g_strdup(_("detecting mailbox type..."));
- stock_id = GTK_STOCK_EXECUTE;
+ emblem_stock_id = GTK_STOCK_EXECUTE;
}
}
- if (! stock_id)
- stock_id = mailbox->stock_id;
-
if (emblem_stock_id)
emblem = gtk_widget_render_icon(GTK_WIDGET(self),
emblem_stock_id,
@@ -606,7 +597,7 @@ class MN:Mailbox:View from Gtk:Tree:View
model = gtk_tree_view_get_model(GTK_TREE_VIEW(self));
gtk_list_store_set(GTK_LIST_STORE(model), iter,
COLUMN_MAILBOX, mailbox,
- COLUMN_ICON, stock_id,
+ COLUMN_ICON, mailbox->stock_id,
COLUMN_EMBLEM, emblem,
COLUMN_PIXBUF, NULL,
COLUMN_LABEL, markup,
@@ -660,7 +651,7 @@ class MN:Mailbox:View from Gtk:Tree:View
gtk_tree_selection_selected_foreach(selection, self_update_sensitivity_cb, &info);
gtk_widget_set_sensitive(selfp->properties_item, info.has_selection);
- gtk_widget_set_sensitive(selfp->update_item, info.has_polled);
+ gtk_widget_set_sensitive(selfp->update_item, info.has_manually_checkable);
gtk_widget_set_sensitive(selfp->remove_item, info.has_selection);
gtk_widget_set_sensitive(selfp->cut_item, info.has_selection);
gtk_widget_set_sensitive(selfp->copy_item, info.has_selection);
@@ -675,13 +666,13 @@ class MN:Mailbox:View from Gtk:Tree:View
SensitivityInfo *info = data;
info->has_selection = TRUE;
- if (! info->has_polled)
+ if (! info->has_manually_checkable)
{
MNMailbox *mailbox;
gtk_tree_model_get(model, iter, COLUMN_MAILBOX, &mailbox, -1);
- if (mn_mailbox_get_poll(mailbox))
- info->has_polled = TRUE;
+ if (mn_mailbox_get_manually_checkable(mailbox))
+ info->has_manually_checkable = TRUE;
g_object_unref(mailbox);
}
}
@@ -739,6 +730,18 @@ class MN:Mailbox:View from Gtk:Tree:View
GSList **configurations = data;
MNMailbox *mailbox;
+ /*
+ * Note that the MNMailboxConfiguration object returned by
+ * mn_mailbox_get_configuration() does not include the keyring
+ * password. This is not a problem unless the user copies a
+ * mailbox, removes the password from the keyring and then pastes
+ * the mailbox: the pasted mailbox will have no password.
+ *
+ * Including the password in MNMailboxConfiguration would require
+ * to cope with the fact that gnome-keyring requests can block the
+ * UI. It's really not worth the effort.
+ */
+
gtk_tree_model_get(model, iter, COLUMN_MAILBOX, &mailbox, -1);
*configurations = g_slist_append(*configurations, mn_mailbox_get_configuration(mailbox));
g_object_unref(mailbox);
diff --git a/src/mn-mailbox.c b/src/mn-mailbox.c
@@ -22,7 +22,7 @@
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */
-#line 53 "mn-mailbox.gob"
+#line 59 "mn-mailbox.gob"
#include "config.h"
#include <glib/gi18n.h>
@@ -41,6 +41,12 @@
#if WITH_GMAIL
#include "mn-gmail-mailbox.h"
#endif
+#if WITH_YAHOO
+#include "mn-yahoo-mailbox.h"
+#endif
+#if WITH_HOTMAIL
+#include "mn-hotmail-mailbox.h"
+#endif
#if WITH_EVOLUTION
#include "mn-evolution-mailbox.h"
#endif
@@ -63,7 +69,7 @@ typedef struct
gboolean changed;
} CompareMessagesInfo;
-#line 67 "mn-mailbox.c"
+#line 73 "mn-mailbox.c"
/* self casting macros */
#define SELF(x) MN_MAILBOX(x)
#define SELF_CONST(x) MN_MAILBOX_CONST(x)
@@ -81,16 +87,17 @@ typedef MNMailboxClass SelfClass;
static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void mn_mailbox_class_init (MNMailboxClass * c) G_GNUC_UNUSED;
+static void mn_mailbox_set_active (MNMailbox * self, gboolean value) G_GNUC_UNUSED;
static void ___real_mn_mailbox_added (MNMailbox * self);
static void ___real_mn_mailbox_removed (MNMailbox * self);
static void mn_mailbox_update_check_timeout (MNMailbox * self) G_GNUC_UNUSED;
static void mn_mailbox_filter_messages (MNMailbox * self) G_GNUC_UNUSED;
-static gboolean mn_mailbox_clean_messages_marked_as_read_cb (const char * id, MNMessage * message, GHashTable * messages) G_GNUC_UNUSED;
+static gboolean mn_mailbox_clean_messages_considered_as_read_cb (const char * id, MNMessage * message, GHashTable * messages) G_GNUC_UNUSED;
static gboolean mn_mailbox_compare_messages (GHashTable * messages1, GHashTable * messages2) G_GNUC_UNUSED;
static void mn_mailbox_compare_messages_cb (const char * id, MNMessage * message, CompareMessagesInfo * info) G_GNUC_UNUSED;
static void mn_mailbox_messages_changed (MNMailbox * self, gboolean has_new) G_GNUC_UNUSED;
static void mn_mailbox_init (MNMailbox * self) G_GNUC_UNUSED;
-static void ___15_mn_mailbox_finalize (GObject * object) G_GNUC_UNUSED;
+static void ___19_mn_mailbox_finalize (GObject * object) G_GNUC_UNUSED;
static void mn_mailbox_notify_display_seen_messages_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
static MNMailbox * mn_mailbox_parse_obsolete_uri (const char * uri) G_GNUC_UNUSED;
static gboolean mn_mailbox_check_timeout_cb (gpointer data) G_GNUC_UNUSED;
@@ -98,6 +105,7 @@ static gboolean mn_mailbox_validate (MNMailbox * self, GError ** err) G_GNUC_UNU
static void ___real_mn_mailbox_seal (MNMailbox * self);
static MNMailbox * mn_mailbox_parse_uri (MNMailbox * self, const char * uri) G_GNUC_UNUSED;
static void ___real_mn_mailbox_check (MNMailbox * self);
+static void mn_mailbox_consider_as_read_real (MNMailbox * self, MNMessage * message) G_GNUC_UNUSED;
/*
* Signal connection wrapper macro shortcuts
@@ -162,6 +170,7 @@ enum {
PROP_FORMAT,
PROP_CHECK_DELAY,
PROP_POLL,
+ PROP_MANUALLY_CHECKABLE,
PROP_MESSAGES,
PROP_ERROR
};
@@ -172,6 +181,8 @@ static guint object_signals[LAST_SIGNAL] = {0};
static GObjectClass *parent_class = NULL;
/* Short form macros */
+#define self_get_active mn_mailbox_get_active
+#define self_set_active mn_mailbox_set_active
#define self_added mn_mailbox_added
#define self_removed mn_mailbox_removed
#define self_get_stock_id mn_mailbox_get_stock_id
@@ -180,16 +191,18 @@ static GObjectClass *parent_class = NULL;
#define self_set_format mn_mailbox_set_format
#define self_get_poll mn_mailbox_get_poll
#define self_set_poll mn_mailbox_set_poll
+#define self_get_manually_checkable mn_mailbox_get_manually_checkable
#define self_update_check_timeout mn_mailbox_update_check_timeout
#define self_get_messages mn_mailbox_get_messages
#define self_set_messages mn_mailbox_set_messages
#define self_filter_messages mn_mailbox_filter_messages
-#define self_clean_messages_marked_as_read_cb mn_mailbox_clean_messages_marked_as_read_cb
+#define self_clean_messages_considered_as_read_cb mn_mailbox_clean_messages_considered_as_read_cb
#define self_compare_messages mn_mailbox_compare_messages
#define self_compare_messages_cb mn_mailbox_compare_messages_cb
#define self_messages_changed mn_mailbox_messages_changed
#define self_set_error mn_mailbox_set_error
#define self_init_types mn_mailbox_init_types
+#define self_get_class_from_name mn_mailbox_get_class_from_name
#define self_get_type_from_name mn_mailbox_get_type_from_name
#define self_notify_display_seen_messages_cb mn_mailbox_notify_display_seen_messages_cb
#define self_new mn_mailbox_new
@@ -206,9 +219,12 @@ static GObjectClass *parent_class = NULL;
#define self_seal mn_mailbox_seal
#define self_parse_uri mn_mailbox_parse_uri
#define self_check mn_mailbox_check
+#define self_enable_checking mn_mailbox_enable_checking
#define self_notice mn_mailbox_notice
#define self_warning mn_mailbox_warning
-#define self_mark_as_read mn_mailbox_mark_as_read
+#define self_consider_as_read_real mn_mailbox_consider_as_read_real
+#define self_consider_as_read mn_mailbox_consider_as_read
+#define self_consider_as_read_list mn_mailbox_consider_as_read_list
#define self_get_command mn_mailbox_get_command
#define self_has_command mn_mailbox_has_command
GType
@@ -260,48 +276,48 @@ ___finalize(GObject *obj_self)
#define __GOB_FUNCTION__ "MN:Mailbox::finalize"
MNMailbox *self G_GNUC_UNUSED = MN_MAILBOX (obj_self);
gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 453 "mn-mailbox.gob"
- ___15_mn_mailbox_finalize(obj_self);
-#line 266 "mn-mailbox.c"
-#line 130 "mn-mailbox.gob"
+#line 519 "mn-mailbox.gob"
+ ___19_mn_mailbox_finalize(obj_self);
+#line 282 "mn-mailbox.c"
+#line 171 "mn-mailbox.gob"
if(self->runtime_name) { g_free ((gpointer) self->runtime_name); self->runtime_name = NULL; }
-#line 269 "mn-mailbox.c"
-#line 132 "mn-mailbox.gob"
+#line 285 "mn-mailbox.c"
+#line 173 "mn-mailbox.gob"
if(self->name) { g_free ((gpointer) self->name); self->name = NULL; }
-#line 272 "mn-mailbox.c"
-#line 135 "mn-mailbox.gob"
+#line 288 "mn-mailbox.c"
+#line 176 "mn-mailbox.gob"
if(self->open_command) { g_free ((gpointer) self->open_command); self->open_command = NULL; }
-#line 275 "mn-mailbox.c"
-#line 138 "mn-mailbox.gob"
+#line 291 "mn-mailbox.c"
+#line 179 "mn-mailbox.gob"
if(self->mark_as_read_command) { g_free ((gpointer) self->mark_as_read_command); self->mark_as_read_command = NULL; }
-#line 278 "mn-mailbox.c"
-#line 141 "mn-mailbox.gob"
+#line 294 "mn-mailbox.c"
+#line 182 "mn-mailbox.gob"
if(self->mark_as_spam_command) { g_free ((gpointer) self->mark_as_spam_command); self->mark_as_spam_command = NULL; }
-#line 281 "mn-mailbox.c"
-#line 144 "mn-mailbox.gob"
+#line 297 "mn-mailbox.c"
+#line 185 "mn-mailbox.gob"
if(self->delete_command) { g_free ((gpointer) self->delete_command); self->delete_command = NULL; }
-#line 284 "mn-mailbox.c"
-#line 147 "mn-mailbox.gob"
+#line 300 "mn-mailbox.c"
+#line 188 "mn-mailbox.gob"
if(self->stock_id) { g_free ((gpointer) self->stock_id); self->stock_id = NULL; }
-#line 287 "mn-mailbox.c"
-#line 150 "mn-mailbox.gob"
+#line 303 "mn-mailbox.c"
+#line 191 "mn-mailbox.gob"
if(self->format) { g_free ((gpointer) self->format); self->format = NULL; }
-#line 290 "mn-mailbox.c"
-#line 195 "mn-mailbox.gob"
+#line 306 "mn-mailbox.c"
+#line 250 "mn-mailbox.gob"
if(self->_priv->unfiltered_messages) { mn_g_object_slist_free ((gpointer) self->_priv->unfiltered_messages); self->_priv->unfiltered_messages = NULL; }
-#line 293 "mn-mailbox.c"
-#line 197 "mn-mailbox.gob"
- if(self->_priv->messages_marked_as_read) { g_hash_table_destroy ((gpointer) self->_priv->messages_marked_as_read); self->_priv->messages_marked_as_read = NULL; }
-#line 296 "mn-mailbox.c"
-#line 200 "mn-mailbox.gob"
+#line 309 "mn-mailbox.c"
+#line 252 "mn-mailbox.gob"
+ if(self->_priv->messages_considered_as_read) { g_hash_table_destroy ((gpointer) self->_priv->messages_considered_as_read); self->_priv->messages_considered_as_read = NULL; }
+#line 312 "mn-mailbox.c"
+#line 255 "mn-mailbox.gob"
if(self->messages) { mn_g_object_slist_free ((gpointer) self->messages); self->messages = NULL; }
-#line 299 "mn-mailbox.c"
-#line 219 "mn-mailbox.gob"
+#line 315 "mn-mailbox.c"
+#line 274 "mn-mailbox.gob"
if(self->_priv->messages_hash_table) { g_hash_table_destroy ((gpointer) self->_priv->messages_hash_table); self->_priv->messages_hash_table = NULL; }
-#line 302 "mn-mailbox.c"
-#line 365 "mn-mailbox.gob"
+#line 318 "mn-mailbox.c"
+#line 420 "mn-mailbox.gob"
if(self->error) { g_free ((gpointer) self->error); self->error = NULL; }
-#line 305 "mn-mailbox.c"
+#line 321 "mn-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -312,9 +328,12 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
g_type_class_add_private(c,sizeof(MNMailboxPrivate));
-#line 53 "mn-mailbox.gob"
+#line 59 "mn-mailbox.gob"
c->default_check_delay = -1;
-#line 318 "mn-mailbox.c"
+#line 334 "mn-mailbox.c"
+#line 59 "mn-mailbox.gob"
+ c->enable_checking_when_added = TRUE;
+#line 337 "mn-mailbox.c"
parent_class = g_type_class_ref (G_TYPE_OBJECT);
@@ -344,24 +363,24 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
G_TYPE_NONE, 1,
G_TYPE_BOOLEAN);
if ___GOB_UNLIKELY(sizeof(gboolean ) != sizeof(gboolean ) || parent_class == NULL /* avoid warning */) {
- g_error("mn-mailbox.gob line 362: Type mismatch of \"messages_changed\" signal signature");
+ g_error("mn-mailbox.gob line 417: Type mismatch of \"messages_changed\" signal signature");
}
-#line 108 "mn-mailbox.gob"
+#line 147 "mn-mailbox.gob"
c->added = ___real_mn_mailbox_added;
-#line 124 "mn-mailbox.gob"
+#line 163 "mn-mailbox.gob"
c->removed = ___real_mn_mailbox_removed;
-#line 355 "mn-mailbox.c"
+#line 374 "mn-mailbox.c"
c->messages_changed = NULL;
-#line 453 "mn-mailbox.gob"
+#line 519 "mn-mailbox.gob"
g_object_class->finalize = ___finalize;
-#line 919 "mn-mailbox.gob"
+#line 1000 "mn-mailbox.gob"
c->seal = ___real_mn_mailbox_seal;
-#line 361 "mn-mailbox.c"
+#line 380 "mn-mailbox.c"
c->parse_uri = NULL;
-#line 936 "mn-mailbox.gob"
+#line 1017 "mn-mailbox.gob"
c->check = ___real_mn_mailbox_check;
-#line 365 "mn-mailbox.c"
+#line 384 "mn-mailbox.c"
g_object_class->get_property = ___object_get_property;
g_object_class->set_property = ___object_set_property;
{
@@ -372,7 +391,7 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_NAME,
param_spec);
@@ -381,7 +400,7 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_OPEN_COMMAND,
param_spec);
@@ -390,7 +409,7 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_MARK_AS_READ_COMMAND,
param_spec);
@@ -399,7 +418,7 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_MARK_AS_SPAM_COMMAND,
param_spec);
@@ -408,7 +427,7 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_DELETE_COMMAND,
param_spec);
@@ -437,7 +456,7 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
G_MININT /* minimum */,
G_MAXINT /* maximum */,
-1 /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT | G_PARAM_CONSTRUCT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE | G_PARAM_CONSTRUCT));
g_object_class_install_property (g_object_class,
PROP_CHECK_DELAY,
param_spec);
@@ -450,6 +469,15 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
g_object_class_install_property (g_object_class,
PROP_POLL,
param_spec);
+ param_spec = g_param_spec_boolean
+ ("manually_checkable" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ FALSE /* default_value */,
+ (GParamFlags)(G_PARAM_READABLE));
+ g_object_class_install_property (g_object_class,
+ PROP_MANUALLY_CHECKABLE,
+ param_spec);
param_spec = g_param_spec_pointer
("messages" /* name */,
NULL /* nick */,
@@ -470,25 +498,25 @@ mn_mailbox_class_init (MNMailboxClass * c G_GNUC_UNUSED)
}
}
#undef __GOB_FUNCTION__
-#line 448 "mn-mailbox.gob"
+#line 514 "mn-mailbox.gob"
static void
mn_mailbox_init (MNMailbox * self G_GNUC_UNUSED)
-#line 477 "mn-mailbox.c"
+#line 505 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_MAILBOX,MNMailboxPrivate);
-#line 126 "mn-mailbox.gob"
+#line 165 "mn-mailbox.gob"
self->_priv->poll = TRUE;
-#line 483 "mn-mailbox.c"
-#line 197 "mn-mailbox.gob"
- self->_priv->messages_marked_as_read = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_object_unref);
-#line 486 "mn-mailbox.c"
+#line 511 "mn-mailbox.c"
+#line 252 "mn-mailbox.gob"
+ self->_priv->messages_considered_as_read = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_object_unref);
+#line 514 "mn-mailbox.c"
{
-#line 449 "mn-mailbox.gob"
+#line 515 "mn-mailbox.gob"
mn_g_object_gconf_notification_add_gdk_locked(self, MN_CONF_DISPLAY_SEEN_MAIL, self_notify_display_seen_messages_cb, self);
-#line 492 "mn-mailbox.c"
+#line 520 "mn-mailbox.c"
}
}
#undef __GOB_FUNCTION__
@@ -507,63 +535,63 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_NAME:
{
-#line 133 "mn-mailbox.gob"
+#line 174 "mn-mailbox.gob"
{ char *old = self->name; self->name = g_value_dup_string (VAL); g_free (old); }
-#line 513 "mn-mailbox.c"
+#line 541 "mn-mailbox.c"
}
break;
case PROP_OPEN_COMMAND:
{
-#line 136 "mn-mailbox.gob"
+#line 177 "mn-mailbox.gob"
{ char *old = self->open_command; self->open_command = g_value_dup_string (VAL); g_free (old); }
-#line 520 "mn-mailbox.c"
+#line 548 "mn-mailbox.c"
}
break;
case PROP_MARK_AS_READ_COMMAND:
{
-#line 139 "mn-mailbox.gob"
+#line 180 "mn-mailbox.gob"
{ char *old = self->mark_as_read_command; self->mark_as_read_command = g_value_dup_string (VAL); g_free (old); }
-#line 527 "mn-mailbox.c"
+#line 555 "mn-mailbox.c"
}
break;
case PROP_MARK_AS_SPAM_COMMAND:
{
-#line 142 "mn-mailbox.gob"
+#line 183 "mn-mailbox.gob"
{ char *old = self->mark_as_spam_command; self->mark_as_spam_command = g_value_dup_string (VAL); g_free (old); }
-#line 534 "mn-mailbox.c"
+#line 562 "mn-mailbox.c"
}
break;
case PROP_DELETE_COMMAND:
{
-#line 145 "mn-mailbox.gob"
+#line 186 "mn-mailbox.gob"
{ char *old = self->delete_command; self->delete_command = g_value_dup_string (VAL); g_free (old); }
-#line 541 "mn-mailbox.c"
+#line 569 "mn-mailbox.c"
}
break;
case PROP_STOCK_ID:
{
-#line 148 "mn-mailbox.gob"
+#line 189 "mn-mailbox.gob"
{ char *old = self->stock_id; self->stock_id = g_value_dup_string (VAL); g_free (old); }
-#line 548 "mn-mailbox.c"
+#line 576 "mn-mailbox.c"
}
break;
case PROP_FORMAT:
{
-#line 151 "mn-mailbox.gob"
+#line 192 "mn-mailbox.gob"
{ char *old = self->format; self->format = g_value_dup_string (VAL); g_free (old); }
-#line 555 "mn-mailbox.c"
+#line 583 "mn-mailbox.c"
}
break;
case PROP_CHECK_DELAY:
{
-#line 158 "mn-mailbox.gob"
+#line 199 "mn-mailbox.gob"
self->check_delay = g_value_get_int (VAL);
-#line 562 "mn-mailbox.c"
+#line 590 "mn-mailbox.c"
}
break;
case PROP_POLL:
{
-#line 165 "mn-mailbox.gob"
+#line 206 "mn-mailbox.gob"
gboolean new_poll = g_value_get_boolean(VAL);
@@ -574,37 +602,32 @@ self->check_delay = g_value_get_int (VAL);
if (new_poll != selfp->poll)
{
selfp->poll = new_poll;
- if (selfp->added)
+ if (self_get_active(self) && selfp->checking_enabled)
self_update_check_timeout(self);
+
+ g_object_notify(G_OBJECT(self), "manually-checkable");
}
-#line 582 "mn-mailbox.c"
+#line 612 "mn-mailbox.c"
}
break;
case PROP_MESSAGES:
{
-#line 208 "mn-mailbox.gob"
+#line 263 "mn-mailbox.gob"
mn_g_object_slist_free(selfp->unfiltered_messages);
selfp->unfiltered_messages = mn_g_object_slist_copy(g_value_get_pointer(VAL));
self_filter_messages(self);
-#line 594 "mn-mailbox.c"
+#line 624 "mn-mailbox.c"
}
break;
case PROP_ERROR:
{
-#line 368 "mn-mailbox.gob"
-
- g_free(self->error);
- self->error = g_value_dup_string(VAL);
-
- /* if an error is set, we unset messages */
- if (self->error)
- self_set_messages(self, NULL);
-
-#line 608 "mn-mailbox.c"
+#line 421 "mn-mailbox.gob"
+{ char *old = self->error; self->error = g_value_dup_string (VAL); g_free (old); }
+#line 631 "mn-mailbox.c"
}
break;
default:
@@ -633,85 +656,92 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_NAME:
{
-#line 133 "mn-mailbox.gob"
+#line 174 "mn-mailbox.gob"
g_value_set_string (VAL, self->name);
-#line 639 "mn-mailbox.c"
+#line 662 "mn-mailbox.c"
}
break;
case PROP_OPEN_COMMAND:
{
-#line 136 "mn-mailbox.gob"
+#line 177 "mn-mailbox.gob"
g_value_set_string (VAL, self->open_command);
-#line 646 "mn-mailbox.c"
+#line 669 "mn-mailbox.c"
}
break;
case PROP_MARK_AS_READ_COMMAND:
{
-#line 139 "mn-mailbox.gob"
+#line 180 "mn-mailbox.gob"
g_value_set_string (VAL, self->mark_as_read_command);
-#line 653 "mn-mailbox.c"
+#line 676 "mn-mailbox.c"
}
break;
case PROP_MARK_AS_SPAM_COMMAND:
{
-#line 142 "mn-mailbox.gob"
+#line 183 "mn-mailbox.gob"
g_value_set_string (VAL, self->mark_as_spam_command);
-#line 660 "mn-mailbox.c"
+#line 683 "mn-mailbox.c"
}
break;
case PROP_DELETE_COMMAND:
{
-#line 145 "mn-mailbox.gob"
+#line 186 "mn-mailbox.gob"
g_value_set_string (VAL, self->delete_command);
-#line 667 "mn-mailbox.c"
+#line 690 "mn-mailbox.c"
}
break;
case PROP_STOCK_ID:
{
-#line 148 "mn-mailbox.gob"
+#line 189 "mn-mailbox.gob"
g_value_set_string (VAL, self->stock_id);
-#line 674 "mn-mailbox.c"
+#line 697 "mn-mailbox.c"
}
break;
case PROP_FORMAT:
{
-#line 151 "mn-mailbox.gob"
+#line 192 "mn-mailbox.gob"
g_value_set_string (VAL, self->format);
-#line 681 "mn-mailbox.c"
+#line 704 "mn-mailbox.c"
}
break;
case PROP_CHECK_DELAY:
{
-#line 158 "mn-mailbox.gob"
+#line 199 "mn-mailbox.gob"
g_value_set_int (VAL, self->check_delay);
-#line 688 "mn-mailbox.c"
+#line 711 "mn-mailbox.c"
}
break;
case PROP_POLL:
{
-#line 180 "mn-mailbox.gob"
+#line 223 "mn-mailbox.gob"
g_value_set_boolean(VAL, selfp->poll);
-#line 697 "mn-mailbox.c"
+#line 720 "mn-mailbox.c"
+ }
+ break;
+ case PROP_MANUALLY_CHECKABLE:
+ {
+#line 234 "mn-mailbox.gob"
+
+ g_value_set_boolean(VAL, selfp->checking_enabled && selfp->poll);
+
+#line 729 "mn-mailbox.c"
}
break;
case PROP_MESSAGES:
{
-#line 215 "mn-mailbox.gob"
+#line 270 "mn-mailbox.gob"
g_value_set_pointer(VAL, self->messages);
-#line 706 "mn-mailbox.c"
+#line 738 "mn-mailbox.c"
}
break;
case PROP_ERROR:
{
-#line 377 "mn-mailbox.gob"
-
- g_value_set_string(VAL, self->error);
-
-#line 715 "mn-mailbox.c"
+#line 421 "mn-mailbox.gob"
+g_value_set_string (VAL, self->error);
+#line 745 "mn-mailbox.c"
}
break;
default:
@@ -727,17 +757,55 @@ g_value_set_int (VAL, self->check_delay);
#undef __GOB_FUNCTION__
+#line 128 "mn-mailbox.gob"
+gboolean
+mn_mailbox_get_active (MNMailbox * self)
+#line 764 "mn-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Mailbox::get_active"
+#line 128 "mn-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 128 "mn-mailbox.gob"
+ g_return_val_if_fail (MN_IS_MAILBOX (self), (gboolean )0);
+#line 771 "mn-mailbox.c"
+{
+#line 130 "mn-mailbox.gob"
+
+ return g_atomic_int_get(&selfp->_active);
+ }}
+#line 777 "mn-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 134 "mn-mailbox.gob"
+static void
+mn_mailbox_set_active (MNMailbox * self, gboolean value)
+#line 783 "mn-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Mailbox::set_active"
+#line 134 "mn-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 134 "mn-mailbox.gob"
+ g_return_if_fail (MN_IS_MAILBOX (self));
+#line 790 "mn-mailbox.c"
+{
+#line 136 "mn-mailbox.gob"
+
+ g_atomic_int_set(&selfp->_active, value);
+ }}
+#line 796 "mn-mailbox.c"
+#undef __GOB_FUNCTION__
+
/**
* mn_mailbox_added:
* @self: the object which received the signal
*
- * This signal gets emitted after the mailbox is removed from the
+ * This signal gets emitted after the mailbox is added to the
* mailboxes list.
**/
-#line 108 "mn-mailbox.gob"
+#line 147 "mn-mailbox.gob"
void
mn_mailbox_added (MNMailbox * self)
-#line 741 "mn-mailbox.c"
+#line 809 "mn-mailbox.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -745,11 +813,11 @@ mn_mailbox_added (MNMailbox * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 108 "mn-mailbox.gob"
+#line 147 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 108 "mn-mailbox.gob"
+#line 147 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 753 "mn-mailbox.c"
+#line 821 "mn-mailbox.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -762,21 +830,21 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 108 "mn-mailbox.gob"
+#line 147 "mn-mailbox.gob"
static void
___real_mn_mailbox_added (MNMailbox * self G_GNUC_UNUSED)
-#line 769 "mn-mailbox.c"
+#line 837 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::added"
{
-#line 110 "mn-mailbox.gob"
+#line 149 "mn-mailbox.gob"
- selfp->added = TRUE;
+ self_set_active(self, TRUE);
- self_update_check_timeout(self);
- self_check(self);
+ if (SELF_GET_CLASS(self)->enable_checking_when_added)
+ self_enable_checking(self);
}}
-#line 780 "mn-mailbox.c"
+#line 848 "mn-mailbox.c"
#undef __GOB_FUNCTION__
/**
@@ -786,10 +854,10 @@ ___real_mn_mailbox_added (MNMailbox * self G_GNUC_UNUSED)
* This signal gets emitted after the mailbox is removed from the
* mailboxes list.
**/
-#line 124 "mn-mailbox.gob"
+#line 163 "mn-mailbox.gob"
void
mn_mailbox_removed (MNMailbox * self)
-#line 793 "mn-mailbox.c"
+#line 861 "mn-mailbox.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -797,11 +865,11 @@ mn_mailbox_removed (MNMailbox * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 124 "mn-mailbox.gob"
+#line 163 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 124 "mn-mailbox.gob"
+#line 163 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 805 "mn-mailbox.c"
+#line 873 "mn-mailbox.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -814,169 +882,185 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 124 "mn-mailbox.gob"
+#line 163 "mn-mailbox.gob"
static void
___real_mn_mailbox_removed (MNMailbox * self G_GNUC_UNUSED)
-#line 821 "mn-mailbox.c"
+#line 889 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::removed"
{
-#line 126 "mn-mailbox.gob"
+#line 165 "mn-mailbox.gob"
+ self_set_active(self, FALSE);
+
mn_locked_g_source_clear(&selfp->check_timeout_source);
}}
-#line 829 "mn-mailbox.c"
+#line 899 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 148 "mn-mailbox.gob"
+#line 189 "mn-mailbox.gob"
gchar *
mn_mailbox_get_stock_id (MNMailbox * self)
-#line 835 "mn-mailbox.c"
+#line 905 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::get_stock_id"
{
-#line 148 "mn-mailbox.gob"
+#line 189 "mn-mailbox.gob"
gchar* val; g_object_get (G_OBJECT (self), "stock_id", &val, NULL); return val;
}}
-#line 842 "mn-mailbox.c"
+#line 912 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 148 "mn-mailbox.gob"
+#line 189 "mn-mailbox.gob"
void
mn_mailbox_set_stock_id (MNMailbox * self, gchar * val)
-#line 848 "mn-mailbox.c"
+#line 918 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::set_stock_id"
{
-#line 148 "mn-mailbox.gob"
+#line 189 "mn-mailbox.gob"
g_object_set (G_OBJECT (self), "stock_id", val, NULL);
}}
-#line 855 "mn-mailbox.c"
+#line 925 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 151 "mn-mailbox.gob"
+#line 192 "mn-mailbox.gob"
gchar *
mn_mailbox_get_format (MNMailbox * self)
-#line 861 "mn-mailbox.c"
+#line 931 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::get_format"
{
-#line 151 "mn-mailbox.gob"
+#line 192 "mn-mailbox.gob"
gchar* val; g_object_get (G_OBJECT (self), "format", &val, NULL); return val;
}}
-#line 868 "mn-mailbox.c"
+#line 938 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 151 "mn-mailbox.gob"
+#line 192 "mn-mailbox.gob"
void
mn_mailbox_set_format (MNMailbox * self, gchar * val)
-#line 874 "mn-mailbox.c"
+#line 944 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::set_format"
{
-#line 151 "mn-mailbox.gob"
+#line 192 "mn-mailbox.gob"
g_object_set (G_OBJECT (self), "format", val, NULL);
}}
-#line 881 "mn-mailbox.c"
+#line 951 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 180 "mn-mailbox.gob"
+#line 223 "mn-mailbox.gob"
gboolean
mn_mailbox_get_poll (MNMailbox * self)
-#line 887 "mn-mailbox.c"
+#line 957 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::get_poll"
{
-#line 163 "mn-mailbox.gob"
+#line 204 "mn-mailbox.gob"
gboolean val; g_object_get (G_OBJECT (self), "poll", &val, NULL); return val;
}}
-#line 894 "mn-mailbox.c"
+#line 964 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 165 "mn-mailbox.gob"
+#line 206 "mn-mailbox.gob"
void
mn_mailbox_set_poll (MNMailbox * self, gboolean val)
-#line 900 "mn-mailbox.c"
+#line 970 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::set_poll"
{
-#line 163 "mn-mailbox.gob"
+#line 204 "mn-mailbox.gob"
g_object_set (G_OBJECT (self), "poll", val, NULL);
}}
-#line 907 "mn-mailbox.c"
+#line 977 "mn-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 234 "mn-mailbox.gob"
+gboolean
+mn_mailbox_get_manually_checkable (MNMailbox * self)
+#line 983 "mn-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Mailbox::get_manually_checkable"
+{
+#line 232 "mn-mailbox.gob"
+ gboolean val; g_object_get (G_OBJECT (self), "manually_checkable", &val, NULL); return val;
+}}
+#line 990 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 184 "mn-mailbox.gob"
+#line 238 "mn-mailbox.gob"
static void
mn_mailbox_update_check_timeout (MNMailbox * self)
-#line 913 "mn-mailbox.c"
+#line 996 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::update_check_timeout"
-#line 184 "mn-mailbox.gob"
+#line 238 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 184 "mn-mailbox.gob"
+#line 238 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 920 "mn-mailbox.c"
+#line 1003 "mn-mailbox.c"
{
-#line 186 "mn-mailbox.gob"
+#line 240 "mn-mailbox.gob"
- g_assert(selfp->added == TRUE);
+ g_assert(self_get_active(self) == TRUE);
+ g_assert(selfp->checking_enabled == TRUE);
mn_locked_g_source_clear(&selfp->check_timeout_source);
if (selfp->poll && self->runtime_check_delay > 0)
selfp->check_timeout_source = mn_g_timeout_add_gdk_locked(self->runtime_check_delay * 1000, self_check_timeout_cb, self);
}}
-#line 930 "mn-mailbox.c"
+#line 1014 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 215 "mn-mailbox.gob"
+#line 270 "mn-mailbox.gob"
const GSList *
mn_mailbox_get_messages (MNMailbox * self)
-#line 936 "mn-mailbox.c"
+#line 1020 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::get_messages"
{
-#line 206 "mn-mailbox.gob"
+#line 261 "mn-mailbox.gob"
const GSList* val; g_object_get (G_OBJECT (self), "messages", &val, NULL); return val;
}}
-#line 943 "mn-mailbox.c"
+#line 1027 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 208 "mn-mailbox.gob"
+#line 263 "mn-mailbox.gob"
void
mn_mailbox_set_messages (MNMailbox * self, const GSList * val)
-#line 949 "mn-mailbox.c"
+#line 1033 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::set_messages"
{
-#line 206 "mn-mailbox.gob"
+#line 261 "mn-mailbox.gob"
g_object_set (G_OBJECT (self), "messages", val, NULL);
}}
-#line 956 "mn-mailbox.c"
+#line 1040 "mn-mailbox.c"
#undef __GOB_FUNCTION__
/**
* mn_mailbox_filter_messages:
* @self: the mailbox to act upon
*
- * Filter @self->unfiltered_messages with the "seen mail" filter and
- * @selfp->messages_marked_as_read, and store the resulting list in
- * @self->messages. Additionally, if @self->messages has changed,
- * emit the "messages-changed" signal.
+ * Filters @self->unfiltered_messages with the "seen mail" filter
+ * and @selfp->messages_considered_as_read, and stores the resulting
+ * list in @self->messages. Additionally, if @self->messages has
+ * changed, emits the "messages-changed" signal.
**/
-#line 230 "mn-mailbox.gob"
+#line 285 "mn-mailbox.gob"
static void
mn_mailbox_filter_messages (MNMailbox * self)
-#line 971 "mn-mailbox.c"
+#line 1055 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::filter_messages"
-#line 230 "mn-mailbox.gob"
+#line 285 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 230 "mn-mailbox.gob"
+#line 285 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 978 "mn-mailbox.c"
+#line 1062 "mn-mailbox.c"
{
-#line 232 "mn-mailbox.gob"
+#line 287 "mn-mailbox.gob"
gboolean display_seen_mail;
GSList *messages = NULL;
@@ -1004,7 +1088,7 @@ mn_mailbox_filter_messages (MNMailbox * self)
if ((display_seen_mail
|| message->error
|| (message->flags & MN_MESSAGE_NEW) != 0)
- && ! g_hash_table_lookup(selfp->messages_marked_as_read, message->id))
+ && ! g_hash_table_lookup(selfp->messages_considered_as_read, message->id))
{
self->n_messages++;
if (message->sent_time > self->timestamp)
@@ -1015,8 +1099,8 @@ mn_mailbox_filter_messages (MNMailbox * self)
}
}
- /* remove stale messages from messages_marked_as_read */
- g_hash_table_foreach_remove(selfp->messages_marked_as_read, (GHRFunc) self_clean_messages_marked_as_read_cb, all_messages_hash_table);
+ /* remove stale messages from messages_considered_as_read */
+ g_hash_table_foreach_remove(selfp->messages_considered_as_read, (GHRFunc) self_clean_messages_considered_as_read_cb, all_messages_hash_table);
g_hash_table_destroy(all_messages_hash_table);
if (! messages)
@@ -1044,21 +1128,21 @@ mn_mailbox_filter_messages (MNMailbox * self)
if (changed)
self_messages_changed(self, has_new);
}}
-#line 1048 "mn-mailbox.c"
+#line 1132 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 300 "mn-mailbox.gob"
+#line 355 "mn-mailbox.gob"
static gboolean
-mn_mailbox_clean_messages_marked_as_read_cb (const char * id, MNMessage * message, GHashTable * messages)
-#line 1054 "mn-mailbox.c"
+mn_mailbox_clean_messages_considered_as_read_cb (const char * id, MNMessage * message, GHashTable * messages)
+#line 1138 "mn-mailbox.c"
{
-#define __GOB_FUNCTION__ "MN:Mailbox::clean_messages_marked_as_read_cb"
+#define __GOB_FUNCTION__ "MN:Mailbox::clean_messages_considered_as_read_cb"
{
-#line 304 "mn-mailbox.gob"
+#line 359 "mn-mailbox.gob"
return g_hash_table_lookup(messages, id) == NULL;
}}
-#line 1062 "mn-mailbox.c"
+#line 1146 "mn-mailbox.c"
#undef __GOB_FUNCTION__
/**
@@ -1071,14 +1155,14 @@ mn_mailbox_clean_messages_marked_as_read_cb (const char * id, MNMessage * messag
* Return value: %TRUE if @messages1 contains messages not present
* in @messages2, %FALSE otherwise.
**/
-#line 318 "mn-mailbox.gob"
+#line 373 "mn-mailbox.gob"
static gboolean
mn_mailbox_compare_messages (GHashTable * messages1, GHashTable * messages2)
-#line 1078 "mn-mailbox.c"
+#line 1162 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::compare_messages"
{
-#line 320 "mn-mailbox.gob"
+#line 375 "mn-mailbox.gob"
if (messages1)
{
@@ -1098,28 +1182,28 @@ mn_mailbox_compare_messages (GHashTable * messages1, GHashTable * messages2)
else
return FALSE;
}}
-#line 1102 "mn-mailbox.c"
+#line 1186 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 340 "mn-mailbox.gob"
+#line 395 "mn-mailbox.gob"
static void
mn_mailbox_compare_messages_cb (const char * id, MNMessage * message, CompareMessagesInfo * info)
-#line 1108 "mn-mailbox.c"
+#line 1192 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::compare_messages_cb"
{
-#line 344 "mn-mailbox.gob"
+#line 399 "mn-mailbox.gob"
if (! info->changed && ! g_hash_table_lookup(info->other, id))
info->changed = TRUE;
}}
-#line 1117 "mn-mailbox.c"
+#line 1201 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 362 "mn-mailbox.gob"
+#line 417 "mn-mailbox.gob"
static void
mn_mailbox_messages_changed (MNMailbox * self, gboolean has_new)
-#line 1123 "mn-mailbox.c"
+#line 1207 "mn-mailbox.c"
{
GValue ___param_values[2];
GValue ___return_val;
@@ -1127,11 +1211,11 @@ mn_mailbox_messages_changed (MNMailbox * self, gboolean has_new)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 362 "mn-mailbox.gob"
+#line 417 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 362 "mn-mailbox.gob"
+#line 417 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1135 "mn-mailbox.c"
+#line 1219 "mn-mailbox.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -1150,19 +1234,19 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[1]);
}
-#line 381 "mn-mailbox.gob"
+#line 423 "mn-mailbox.gob"
void
mn_mailbox_set_error (MNMailbox * self, const char * format, ...)
-#line 1157 "mn-mailbox.c"
+#line 1241 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::set_error"
-#line 381 "mn-mailbox.gob"
+#line 423 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 381 "mn-mailbox.gob"
+#line 423 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1164 "mn-mailbox.c"
+#line 1248 "mn-mailbox.c"
{
-#line 383 "mn-mailbox.gob"
+#line 425 "mn-mailbox.gob"
va_list args;
char *error = NULL;
@@ -1177,17 +1261,17 @@ mn_mailbox_set_error (MNMailbox * self, const char * format, ...)
g_object_set(G_OBJECT(self), MN_MAILBOX_PROP_ERROR(error), NULL);
g_free(error);
}}
-#line 1181 "mn-mailbox.c"
+#line 1265 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 398 "mn-mailbox.gob"
+#line 440 "mn-mailbox.gob"
void
mn_mailbox_init_types (void)
-#line 1187 "mn-mailbox.c"
+#line 1271 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::init_types"
{
-#line 400 "mn-mailbox.gob"
+#line 442 "mn-mailbox.gob"
int i = 0;
@@ -1209,55 +1293,86 @@ mn_mailbox_init_types (void)
#if WITH_GMAIL
mn_mailbox_types[i++] = MN_TYPE_GMAIL_MAILBOX;
#endif
+#if WITH_YAHOO
+ mn_mailbox_types[i++] = MN_TYPE_YAHOO_MAILBOX;
+#endif
+#if WITH_HOTMAIL
+ mn_mailbox_types[i++] = MN_TYPE_HOTMAIL_MAILBOX;
+#endif
#if WITH_EVOLUTION
mn_mailbox_types[i++] = MN_TYPE_EVOLUTION_MAILBOX;
#endif
mn_mailbox_types[i] = 0;
}}
-#line 1218 "mn-mailbox.c"
+#line 1308 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 427 "mn-mailbox.gob"
-GType
-mn_mailbox_get_type_from_name (const char * type)
-#line 1224 "mn-mailbox.c"
+#line 476 "mn-mailbox.gob"
+MNMailboxClass *
+mn_mailbox_get_class_from_name (const char * type)
+#line 1314 "mn-mailbox.c"
{
-#define __GOB_FUNCTION__ "MN:Mailbox::get_type_from_name"
+#define __GOB_FUNCTION__ "MN:Mailbox::get_class_from_name"
{
-#line 429 "mn-mailbox.gob"
+#line 478 "mn-mailbox.gob"
int i;
for (i = 0; mn_mailbox_types[i]; i++)
{
SelfClass *class;
- gboolean found;
class = g_type_class_ref(mn_mailbox_types[i]);
- found = ! strcmp(class->type, type);
+ if (! strcmp(class->type, type))
+ return class;
+
g_type_class_unref(class);
+ }
+
+ return NULL;
+ }}
+#line 1335 "mn-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 495 "mn-mailbox.gob"
+GType
+mn_mailbox_get_type_from_name (const char * type)
+#line 1341 "mn-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Mailbox::get_type_from_name"
+{
+#line 497 "mn-mailbox.gob"
+
+ SelfClass *class;
- if (found)
- return mn_mailbox_types[i];
+ class = self_get_class_from_name(type);
+ if (class)
+ {
+ GType type;
+
+ type = G_OBJECT_CLASS_TYPE(class);
+ g_type_class_unref(class);
+
+ return type;
}
return 0;
}}
-#line 1247 "mn-mailbox.c"
+#line 1362 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 453 "mn-mailbox.gob"
+#line 519 "mn-mailbox.gob"
static void
-___15_mn_mailbox_finalize (GObject * object G_GNUC_UNUSED)
-#line 1254 "mn-mailbox.c"
+___19_mn_mailbox_finalize (GObject * object G_GNUC_UNUSED)
+#line 1369 "mn-mailbox.c"
#define PARENT_HANDLER(___object) \
{ if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
{
#define __GOB_FUNCTION__ "MN:Mailbox::finalize"
{
-#line 455 "mn-mailbox.gob"
+#line 521 "mn-mailbox.gob"
Self *self = SELF(object);
@@ -1271,37 +1386,37 @@ ___15_mn_mailbox_finalize (GObject * object G_GNUC_UNUSED)
PARENT_HANDLER(object);
}}
-#line 1275 "mn-mailbox.c"
+#line 1390 "mn-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 469 "mn-mailbox.gob"
+#line 535 "mn-mailbox.gob"
static void
mn_mailbox_notify_display_seen_messages_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-#line 1282 "mn-mailbox.c"
+#line 1397 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::notify_display_seen_messages_cb"
{
-#line 474 "mn-mailbox.gob"
+#line 540 "mn-mailbox.gob"
Self *self = user_data;
self_filter_messages(self);
}}
-#line 1292 "mn-mailbox.c"
+#line 1407 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 480 "mn-mailbox.gob"
+#line 546 "mn-mailbox.gob"
MNMailbox *
mn_mailbox_new (const char * type, const char * first, ...)
-#line 1298 "mn-mailbox.c"
+#line 1413 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::new"
-#line 480 "mn-mailbox.gob"
+#line 546 "mn-mailbox.gob"
g_return_val_if_fail (type != NULL, (MNMailbox * )0);
-#line 1303 "mn-mailbox.c"
+#line 1418 "mn-mailbox.c"
{
-#line 482 "mn-mailbox.gob"
+#line 548 "mn-mailbox.gob"
va_list args;
GType type_id;
@@ -1317,20 +1432,20 @@ mn_mailbox_new (const char * type, const char * first, ...)
return SELF(object);
}}
-#line 1321 "mn-mailbox.c"
+#line 1436 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 498 "mn-mailbox.gob"
+#line 564 "mn-mailbox.gob"
MNMailbox *
mn_mailbox_new_from_xml_node (xmlNode * node, GError ** err)
-#line 1327 "mn-mailbox.c"
+#line 1442 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::new_from_xml_node"
-#line 498 "mn-mailbox.gob"
+#line 564 "mn-mailbox.gob"
g_return_val_if_fail (node != NULL, (MNMailbox * )0);
-#line 1332 "mn-mailbox.c"
+#line 1447 "mn-mailbox.c"
{
-#line 500 "mn-mailbox.gob"
+#line 566 "mn-mailbox.gob"
char *type;
Self *self = NULL;
@@ -1361,22 +1476,22 @@ mn_mailbox_new_from_xml_node (xmlNode * node, GError ** err)
g_free(type);
return self;
}}
-#line 1365 "mn-mailbox.c"
+#line 1480 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 531 "mn-mailbox.gob"
+#line 597 "mn-mailbox.gob"
xmlNode *
mn_mailbox_xml_node_new (MNMailbox * self)
-#line 1371 "mn-mailbox.c"
+#line 1486 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::xml_node_new"
-#line 531 "mn-mailbox.gob"
+#line 597 "mn-mailbox.gob"
g_return_val_if_fail (self != NULL, (xmlNode * )0);
-#line 531 "mn-mailbox.gob"
+#line 597 "mn-mailbox.gob"
g_return_val_if_fail (MN_IS_MAILBOX (self), (xmlNode * )0);
-#line 1378 "mn-mailbox.c"
+#line 1493 "mn-mailbox.c"
{
-#line 533 "mn-mailbox.gob"
+#line 599 "mn-mailbox.gob"
xmlNode *node;
@@ -1386,20 +1501,20 @@ mn_mailbox_xml_node_new (MNMailbox * self)
return node;
}}
-#line 1390 "mn-mailbox.c"
+#line 1505 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 543 "mn-mailbox.gob"
+#line 609 "mn-mailbox.gob"
MNMailbox *
mn_mailbox_new_from_uri (const char * uri)
-#line 1396 "mn-mailbox.c"
+#line 1511 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::new_from_uri"
-#line 543 "mn-mailbox.gob"
+#line 609 "mn-mailbox.gob"
g_return_val_if_fail (uri != NULL, (MNMailbox * )0);
-#line 1401 "mn-mailbox.c"
+#line 1516 "mn-mailbox.c"
{
-#line 545 "mn-mailbox.gob"
+#line 611 "mn-mailbox.gob"
int i;
@@ -1418,39 +1533,39 @@ mn_mailbox_new_from_uri (const char * uri)
return NULL;
}}
-#line 1422 "mn-mailbox.c"
+#line 1537 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 564 "mn-mailbox.gob"
+#line 630 "mn-mailbox.gob"
MNMailbox *
mn_mailbox_new_from_configuration (MNMailboxConfiguration * config)
-#line 1428 "mn-mailbox.c"
+#line 1543 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::new_from_configuration"
-#line 564 "mn-mailbox.gob"
+#line 630 "mn-mailbox.gob"
g_return_val_if_fail (config != NULL, (MNMailbox * )0);
-#line 1433 "mn-mailbox.c"
+#line 1548 "mn-mailbox.c"
{
-#line 566 "mn-mailbox.gob"
+#line 632 "mn-mailbox.gob"
return g_object_newv(config->type, config->n_parameters, config->parameters);
}}
-#line 1439 "mn-mailbox.c"
+#line 1554 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 570 "mn-mailbox.gob"
+#line 636 "mn-mailbox.gob"
MNMailboxConfiguration *
mn_mailbox_get_configuration (MNMailbox * self)
-#line 1445 "mn-mailbox.c"
+#line 1560 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::get_configuration"
-#line 570 "mn-mailbox.gob"
+#line 636 "mn-mailbox.gob"
g_return_val_if_fail (self != NULL, (MNMailboxConfiguration * )0);
-#line 570 "mn-mailbox.gob"
+#line 636 "mn-mailbox.gob"
g_return_val_if_fail (MN_IS_MAILBOX (self), (MNMailboxConfiguration * )0);
-#line 1452 "mn-mailbox.c"
+#line 1567 "mn-mailbox.c"
{
-#line 572 "mn-mailbox.gob"
+#line 638 "mn-mailbox.gob"
GObject *object = G_OBJECT(self);
GArray *parameters;
@@ -1463,7 +1578,7 @@ mn_mailbox_get_configuration (MNMailbox * self)
properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(self), &n_properties);
for (i = 0; i < n_properties; i++)
- if ((properties[i]->flags & MN_MAILBOX_PARAM_PERMANENT) != 0)
+ if ((properties[i]->flags & MN_MAILBOX_PARAM_SAVE) != 0)
{
GParameter parameter = { NULL, { 0, } };
@@ -1483,20 +1598,20 @@ mn_mailbox_get_configuration (MNMailbox * self)
return config;
}}
-#line 1487 "mn-mailbox.c"
+#line 1602 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 605 "mn-mailbox.gob"
+#line 671 "mn-mailbox.gob"
void
mn_mailbox_configuration_free (MNMailboxConfiguration * config)
-#line 1493 "mn-mailbox.c"
+#line 1608 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::configuration_free"
-#line 605 "mn-mailbox.gob"
+#line 671 "mn-mailbox.gob"
g_return_if_fail (config != NULL);
-#line 1498 "mn-mailbox.c"
+#line 1613 "mn-mailbox.c"
{
-#line 607 "mn-mailbox.gob"
+#line 673 "mn-mailbox.gob"
int i;
@@ -1506,20 +1621,20 @@ mn_mailbox_configuration_free (MNMailboxConfiguration * config)
g_free(config->parameters);
g_free(config);
}}
-#line 1510 "mn-mailbox.c"
+#line 1625 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 617 "mn-mailbox.gob"
+#line 683 "mn-mailbox.gob"
MNMailbox *
mn_mailbox_new_from_obsolete_uri (const char * uri)
-#line 1516 "mn-mailbox.c"
+#line 1631 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::new_from_obsolete_uri"
-#line 617 "mn-mailbox.gob"
+#line 683 "mn-mailbox.gob"
g_return_val_if_fail (uri != NULL, (MNMailbox * )0);
-#line 1521 "mn-mailbox.c"
+#line 1636 "mn-mailbox.c"
{
-#line 619 "mn-mailbox.gob"
+#line 685 "mn-mailbox.gob"
char *real_uri;
char *scheme;
@@ -1551,20 +1666,20 @@ mn_mailbox_new_from_obsolete_uri (const char * uri)
return self;
}}
-#line 1555 "mn-mailbox.c"
+#line 1670 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 651 "mn-mailbox.gob"
+#line 717 "mn-mailbox.gob"
static MNMailbox *
mn_mailbox_parse_obsolete_uri (const char * uri)
-#line 1561 "mn-mailbox.c"
+#line 1676 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::parse_obsolete_uri"
-#line 651 "mn-mailbox.gob"
+#line 717 "mn-mailbox.gob"
g_return_val_if_fail (uri != NULL, (MNMailbox * )0);
-#line 1566 "mn-mailbox.c"
+#line 1681 "mn-mailbox.c"
{
-#line 653 "mn-mailbox.gob"
+#line 719 "mn-mailbox.gob"
int len;
int buflen;
@@ -1757,9 +1872,11 @@ mn_mailbox_parse_obsolete_uri (const char * uri)
"authmech", authmech,
"hostname", hostname,
"port", port,
- "mailbox", path,
NULL);
+ if (path)
+ g_object_set(self, MN_IMAP_MAILBOX_PROP_MAILBOX(path), NULL);
+
if (queries && eel_g_strv_find(queries, "noidle") != -1)
g_object_set(G_OBJECT(self), MN_IMAP_MAILBOX_PROP_USE_IDLE_EXTENSION(MN_IMAP_MAILBOX_USE_IDLE_NEVER), NULL);
#endif
@@ -1784,17 +1901,17 @@ mn_mailbox_parse_obsolete_uri (const char * uri)
return self;
}}
-#line 1788 "mn-mailbox.c"
+#line 1905 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 873 "mn-mailbox.gob"
+#line 941 "mn-mailbox.gob"
static gboolean
mn_mailbox_check_timeout_cb (gpointer data)
-#line 1794 "mn-mailbox.c"
+#line 1911 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::check_timeout_cb"
{
-#line 875 "mn-mailbox.gob"
+#line 943 "mn-mailbox.gob"
Self *self = data;
@@ -1802,26 +1919,27 @@ mn_mailbox_check_timeout_cb (gpointer data)
return TRUE; /* continue */
}}
-#line 1806 "mn-mailbox.c"
+#line 1923 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 883 "mn-mailbox.gob"
+#line 951 "mn-mailbox.gob"
static gboolean
mn_mailbox_validate (MNMailbox * self, GError ** err)
-#line 1812 "mn-mailbox.c"
+#line 1929 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::validate"
-#line 883 "mn-mailbox.gob"
+#line 951 "mn-mailbox.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 883 "mn-mailbox.gob"
+#line 951 "mn-mailbox.gob"
g_return_val_if_fail (MN_IS_MAILBOX (self), (gboolean )0);
-#line 1819 "mn-mailbox.c"
+#line 1936 "mn-mailbox.c"
{
-#line 885 "mn-mailbox.gob"
+#line 953 "mn-mailbox.gob"
GParamSpec **properties;
unsigned int n_properties;
int i;
+ gboolean status = TRUE;
properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(self), &n_properties);
for (i = 0; i < n_properties; i++)
@@ -1844,40 +1962,52 @@ mn_mailbox_validate (MNMailbox * self, GError ** err)
if (is_empty)
{
g_set_error(err, 0, 0, _("property \"%s\" has no value"), g_param_spec_get_name(properties[i]));
- return FALSE;
+ status = FALSE;
+ break;
}
}
g_free(properties);
- return TRUE;
+ return status;
}}
-#line 1855 "mn-mailbox.c"
+#line 1974 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 919 "mn-mailbox.gob"
+/**
+ * mn_mailbox_seal:
+ * @self: a mailbox
+ *
+ * Seals the mailbox before it is made operational by being added to
+ * the mailboxes list. The point of this function is to allow
+ * subclasses to perform initialization which needs to consult the
+ * value of properties loaded from mailboxes.xml or set by the
+ * properties dialog. That would not be possible from init(), since
+ * these properties are only set after the mailbox is constructed.
+ **/
+#line 1000 "mn-mailbox.gob"
void
mn_mailbox_seal (MNMailbox * self)
-#line 1861 "mn-mailbox.c"
+#line 1991 "mn-mailbox.c"
{
MNMailboxClass *klass;
-#line 919 "mn-mailbox.gob"
+#line 1000 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 919 "mn-mailbox.gob"
+#line 1000 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1868 "mn-mailbox.c"
+#line 1998 "mn-mailbox.c"
klass = MN_MAILBOX_GET_CLASS(self);
if(klass->seal)
(*klass->seal)(self);
}
-#line 919 "mn-mailbox.gob"
+#line 1000 "mn-mailbox.gob"
static void
___real_mn_mailbox_seal (MNMailbox * self G_GNUC_UNUSED)
-#line 1877 "mn-mailbox.c"
+#line 2007 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::seal"
{
-#line 921 "mn-mailbox.gob"
+#line 1002 "mn-mailbox.gob"
if (self->name)
{
@@ -1889,20 +2019,20 @@ ___real_mn_mailbox_seal (MNMailbox * self G_GNUC_UNUSED)
? self->check_delay
: SELF_GET_CLASS(self)->default_check_delay;
}}
-#line 1893 "mn-mailbox.c"
+#line 2023 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 933 "mn-mailbox.gob"
+#line 1014 "mn-mailbox.gob"
static MNMailbox *
mn_mailbox_parse_uri (MNMailbox * self, const char * uri)
-#line 1899 "mn-mailbox.c"
+#line 2029 "mn-mailbox.c"
{
MNMailboxClass *klass;
-#line 933 "mn-mailbox.gob"
+#line 1014 "mn-mailbox.gob"
g_return_val_if_fail (self != NULL, (MNMailbox * )0);
-#line 933 "mn-mailbox.gob"
+#line 1014 "mn-mailbox.gob"
g_return_val_if_fail (MN_IS_MAILBOX (self), (MNMailbox * )0);
-#line 1906 "mn-mailbox.c"
+#line 2036 "mn-mailbox.c"
klass = MN_MAILBOX_GET_CLASS(self);
if(klass->parse_uri)
@@ -1911,134 +2041,225 @@ mn_mailbox_parse_uri (MNMailbox * self, const char * uri)
return (MNMailbox * )(0);
}
-#line 936 "mn-mailbox.gob"
+#line 1017 "mn-mailbox.gob"
void
mn_mailbox_check (MNMailbox * self)
-#line 1918 "mn-mailbox.c"
+#line 2048 "mn-mailbox.c"
{
MNMailboxClass *klass;
-#line 936 "mn-mailbox.gob"
+#line 1017 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 936 "mn-mailbox.gob"
+#line 1017 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 1925 "mn-mailbox.c"
+#line 2055 "mn-mailbox.c"
klass = MN_MAILBOX_GET_CLASS(self);
if(klass->check)
(*klass->check)(self);
}
-#line 936 "mn-mailbox.gob"
+#line 1017 "mn-mailbox.gob"
static void
___real_mn_mailbox_check (MNMailbox * self G_GNUC_UNUSED)
-#line 1934 "mn-mailbox.c"
+#line 2064 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::check"
{
-#line 938 "mn-mailbox.gob"
+#line 1019 "mn-mailbox.gob"
- g_assert(selfp->added == TRUE);
+ g_assert(self_get_active(self) == TRUE);
+ g_assert(selfp->checking_enabled == TRUE);
}}
-#line 1942 "mn-mailbox.c"
+#line 2073 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 942 "mn-mailbox.gob"
+#line 1033 "mn-mailbox.gob"
+void
+mn_mailbox_enable_checking (MNMailbox * self)
+#line 2079 "mn-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Mailbox::enable_checking"
+#line 1033 "mn-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 1033 "mn-mailbox.gob"
+ g_return_if_fail (MN_IS_MAILBOX (self));
+#line 2086 "mn-mailbox.c"
+{
+#line 1035 "mn-mailbox.gob"
+
+ selfp->checking_enabled = TRUE;
+ g_object_notify(G_OBJECT(self), "manually-checkable");
+
+ self_update_check_timeout(self);
+ self_check(self);
+ }}
+#line 2096 "mn-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 1043 "mn-mailbox.gob"
void
mn_mailbox_notice (MNMailbox * self, const char * format, ...)
-#line 1948 "mn-mailbox.c"
+#line 2102 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::notice"
-#line 942 "mn-mailbox.gob"
+#line 1043 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 942 "mn-mailbox.gob"
+#line 1043 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 942 "mn-mailbox.gob"
+#line 1043 "mn-mailbox.gob"
g_return_if_fail (format != NULL);
-#line 1957 "mn-mailbox.c"
+#line 2111 "mn-mailbox.c"
{
-#line 944 "mn-mailbox.gob"
+#line 1045 "mn-mailbox.gob"
va_list args;
char *message;
+ /*
+ * Disregard messages sent by a threaded check still in progress
+ * after the mailbox has been removed.
+ */
+ if (! self_get_active(self))
+ return;
+
va_start(args, format);
message = g_strdup_vprintf(format, args);
va_end(args);
- mn_info("%s: %s", self->runtime_name, message);
+ mn_info(_("%s: %s"), self->runtime_name, message);
g_free(message);
}}
-#line 1971 "mn-mailbox.c"
+#line 2132 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 956 "mn-mailbox.gob"
+#line 1064 "mn-mailbox.gob"
void
mn_mailbox_warning (MNMailbox * self, const char * format, ...)
-#line 1977 "mn-mailbox.c"
+#line 2138 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::warning"
-#line 956 "mn-mailbox.gob"
+#line 1064 "mn-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 956 "mn-mailbox.gob"
+#line 1064 "mn-mailbox.gob"
g_return_if_fail (MN_IS_MAILBOX (self));
-#line 956 "mn-mailbox.gob"
+#line 1064 "mn-mailbox.gob"
g_return_if_fail (format != NULL);
-#line 1986 "mn-mailbox.c"
+#line 2147 "mn-mailbox.c"
{
-#line 958 "mn-mailbox.gob"
+#line 1066 "mn-mailbox.gob"
va_list args;
char *message;
+ /*
+ * Disregard messages sent by a threaded check still in progress
+ * after the mailbox has been removed.
+ */
+ if (! self_get_active(self))
+ return;
+
va_start(args, format);
message = g_strdup_vprintf(format, args);
va_end(args);
- g_warning("%s: %s", self->runtime_name, message);
+ g_warning(_("%s: %s"), self->runtime_name, message);
g_free(message);
}}
-#line 2000 "mn-mailbox.c"
+#line 2168 "mn-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 1085 "mn-mailbox.gob"
+static void
+mn_mailbox_consider_as_read_real (MNMailbox * self, MNMessage * message)
+#line 2174 "mn-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Mailbox::consider_as_read_real"
+#line 1085 "mn-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 1085 "mn-mailbox.gob"
+ g_return_if_fail (MN_IS_MAILBOX (self));
+#line 1085 "mn-mailbox.gob"
+ g_return_if_fail (message != NULL);
+#line 1085 "mn-mailbox.gob"
+ g_return_if_fail (MN_IS_MESSAGE (message));
+#line 2185 "mn-mailbox.c"
+{
+#line 1087 "mn-mailbox.gob"
+
+ g_hash_table_replace(selfp->messages_considered_as_read, message->id, g_object_ref(message));
+ }}
+#line 2191 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 976 "mn-mailbox.gob"
+#line 1101 "mn-mailbox.gob"
void
-mn_mailbox_mark_as_read (gpointer _message)
-#line 2006 "mn-mailbox.c"
+mn_mailbox_consider_as_read (gpointer _message)
+#line 2197 "mn-mailbox.c"
{
-#define __GOB_FUNCTION__ "MN:Mailbox::mark_as_read"
+#define __GOB_FUNCTION__ "MN:Mailbox::consider_as_read"
{
-#line 978 "mn-mailbox.gob"
+#line 1103 "mn-mailbox.gob"
- MNMessage *message;
+ MNMessage *message = MN_MESSAGE(_message);
Self *self;
- message = MN_MESSAGE(_message);
- g_return_if_fail(message != NULL);
-
self = message->mailbox;
g_assert(self != NULL);
- g_hash_table_replace(selfp->messages_marked_as_read, message->id, g_object_ref(message));
+ self_consider_as_read_real(self, message);
self_filter_messages(self);
}}
-#line 2025 "mn-mailbox.c"
+#line 2213 "mn-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 1120 "mn-mailbox.gob"
+void
+mn_mailbox_consider_as_read_list (const GSList * messages)
+#line 2219 "mn-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Mailbox::consider_as_read_list"
+{
+#line 1122 "mn-mailbox.gob"
+
+ Self *self = NULL;
+ const GSList *l;
+
+ MN_LIST_FOREACH(l, messages)
+ {
+ MNMessage *message = l->data;
+
+ if (self)
+ g_assert(self == message->mailbox);
+ else
+ {
+ self = message->mailbox;
+ g_assert(self != NULL);
+ }
+
+ self_consider_as_read_real(self, message);
+ }
+
+ if (self) /* non empty list */
+ self_filter_messages(self);
+ }}
+#line 2246 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 993 "mn-mailbox.gob"
+#line 1145 "mn-mailbox.gob"
char *
mn_mailbox_get_command (MNMailbox * self, const char * id)
-#line 2031 "mn-mailbox.c"
+#line 2252 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::get_command"
-#line 993 "mn-mailbox.gob"
+#line 1145 "mn-mailbox.gob"
g_return_val_if_fail (self != NULL, (char * )0);
-#line 993 "mn-mailbox.gob"
+#line 1145 "mn-mailbox.gob"
g_return_val_if_fail (MN_IS_MAILBOX (self), (char * )0);
-#line 993 "mn-mailbox.gob"
+#line 1145 "mn-mailbox.gob"
g_return_val_if_fail (id != NULL, (char * )0);
-#line 2040 "mn-mailbox.c"
+#line 2261 "mn-mailbox.c"
{
-#line 995 "mn-mailbox.gob"
+#line 1147 "mn-mailbox.gob"
char *prop;
char *command;
@@ -2055,24 +2276,24 @@ mn_mailbox_get_command (MNMailbox * self, const char * id)
return command;
}}
-#line 2059 "mn-mailbox.c"
+#line 2280 "mn-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1012 "mn-mailbox.gob"
+#line 1164 "mn-mailbox.gob"
gboolean
mn_mailbox_has_command (MNMailbox * self, const char * id)
-#line 2065 "mn-mailbox.c"
+#line 2286 "mn-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Mailbox::has_command"
-#line 1012 "mn-mailbox.gob"
+#line 1164 "mn-mailbox.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 1012 "mn-mailbox.gob"
+#line 1164 "mn-mailbox.gob"
g_return_val_if_fail (MN_IS_MAILBOX (self), (gboolean )0);
-#line 1012 "mn-mailbox.gob"
+#line 1164 "mn-mailbox.gob"
g_return_val_if_fail (id != NULL, (gboolean )0);
-#line 2074 "mn-mailbox.c"
+#line 2295 "mn-mailbox.c"
{
-#line 1014 "mn-mailbox.gob"
+#line 1166 "mn-mailbox.gob"
char *command;
gboolean has;
@@ -2083,5 +2304,5 @@ mn_mailbox_has_command (MNMailbox * self, const char * id)
return has;
}}
-#line 2087 "mn-mailbox.c"
+#line 2308 "mn-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-mailbox.gob b/src/mn-mailbox.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -27,7 +27,7 @@ requires 2.0.14
%}
%h{
-#define MN_MAILBOX_MAX_TYPES 6
+#define MN_MAILBOX_MAX_TYPES 8
extern GType mn_mailbox_types[MN_MAILBOX_MAX_TYPES + 1];
typedef struct _MNMailboxConfiguration MNMailboxConfiguration;
@@ -39,8 +39,14 @@ typedef struct _MNMailboxConfiguration MNMailboxConfiguration;
typedef enum
{
+ /* load from mailboxes.xml */
+ MN_MAILBOX_PARAM_LOAD = MN_XML_PARAM_IMPORT,
+
/* save to mailboxes.xml */
- MN_MAILBOX_PARAM_PERMANENT = MN_XML_PARAM_IMPORT_EXPORT,
+ MN_MAILBOX_PARAM_SAVE = MN_XML_PARAM_EXPORT,
+
+ /* load from and save to mailboxes.xml */
+ MN_MAILBOX_PARAM_LOAD_SAVE = MN_MAILBOX_PARAM_LOAD | MN_MAILBOX_PARAM_SAVE,
/* ignore the case of a string property when checking if it has the default value */
MN_MAILBOX_PARAM_IGNORE_CASE = MN_XML_PARAM_IGNORE_CASE,
@@ -68,6 +74,12 @@ typedef enum
#if WITH_GMAIL
#include "mn-gmail-mailbox.h"
#endif
+#if WITH_YAHOO
+#include "mn-yahoo-mailbox.h"
+#endif
+#if WITH_HOTMAIL
+#include "mn-hotmail-mailbox.h"
+#endif
#if WITH_EVOLUTION
#include "mn-evolution-mailbox.h"
#endif
@@ -96,22 +108,49 @@ class MN:Mailbox from G:Object (abstract)
classwide const char *type;
classwide int default_check_delay = -1;
- private gboolean added;
+ /*
+ * If enabled, the base MNMailbox implementation of added() will
+ * call mn_mailbox_enable_checking().
+ */
+ classwide gboolean enable_checking_when_added = TRUE;
+
+ /*
+ * Whether the mailbox is in the mailboxes list (a mailbox can be
+ * removed from the mailboxes list without being finalized
+ * immediately if a threaded check is in progress).
+ *
+ * Used for performance (testing it is faster than searching the
+ * list) and for thread safety. Do not access directly, use the
+ * accessors.
+ */
+ private gboolean _active;
+
+ public gboolean
+ get_active (self)
+ {
+ return g_atomic_int_get(&selfp->_active);
+ }
+
+ private void
+ set_active (self, gboolean value)
+ {
+ g_atomic_int_set(&selfp->_active, value);
+ }
/**
* added:
* @self: the object which received the signal
*
- * This signal gets emitted after the mailbox is removed from the
+ * This signal gets emitted after the mailbox is added to the
* mailboxes list.
**/
signal NONE (NONE)
void added (self)
{
- selfp->added = TRUE;
+ self_set_active(self, TRUE);
- self_update_check_timeout(self);
- self_check(self);
+ if (SELF_GET_CLASS(self)->enable_checking_when_added)
+ self_enable_checking(self);
}
/**
@@ -124,25 +163,27 @@ class MN:Mailbox from G:Object (abstract)
signal NONE (NONE)
void removed (self)
{
+ self_set_active(self, FALSE);
+
mn_locked_g_source_clear(&selfp->check_timeout_source);
}
public char *runtime_name destroywith g_free;
public char *name destroywith g_free;
- property STRING name (link, flags = MN_MAILBOX_PARAM_PERMANENT);
+ property STRING name (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE);
public char *open_command destroywith g_free;
- property STRING open_command (link, flags = MN_MAILBOX_PARAM_PERMANENT);
+ property STRING open_command (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE);
public char *mark_as_read_command destroywith g_free;
- property STRING mark_as_read_command (link, flags = MN_MAILBOX_PARAM_PERMANENT);
+ property STRING mark_as_read_command (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE);
public char *mark_as_spam_command destroywith g_free;
- property STRING mark_as_spam_command (link, flags = MN_MAILBOX_PARAM_PERMANENT);
+ property STRING mark_as_spam_command (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE);
public char *delete_command destroywith g_free;
- property STRING delete_command (link, flags = MN_MAILBOX_PARAM_PERMANENT);
+ property STRING delete_command (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE);
public char *stock_id destroywith g_free;
property STRING stock_id (link, export);
@@ -156,7 +197,7 @@ class MN:Mailbox from G:Object (abstract)
public int check_delay;
property INT check_delay (link,
- flags = CONSTRUCT | MN_MAILBOX_PARAM_PERMANENT,
+ flags = CONSTRUCT | MN_MAILBOX_PARAM_LOAD_SAVE,
default_value = -1);
private gboolean poll = TRUE;
@@ -172,8 +213,10 @@ class MN:Mailbox from G:Object (abstract)
if (new_poll != selfp->poll)
{
selfp->poll = new_poll;
- if (selfp->added)
+ if (self_get_active(self) && selfp->checking_enabled)
self_update_check_timeout(self);
+
+ g_object_notify(G_OBJECT(self), "manually-checkable");
}
}
get
@@ -181,10 +224,22 @@ class MN:Mailbox from G:Object (abstract)
g_value_set_boolean(VAL, selfp->poll);
};
+ /*
+ * Whether the user can initiate a check manually (for instance by
+ * clicking on an Update menu item or by running mail-notification
+ * --update).
+ */
+ property BOOLEAN manually_checkable (export)
+ get
+ {
+ g_value_set_boolean(VAL, selfp->checking_enabled && selfp->poll);
+ };
+
private void
update_check_timeout (self)
{
- g_assert(selfp->added == TRUE);
+ g_assert(self_get_active(self) == TRUE);
+ g_assert(selfp->checking_enabled == TRUE);
mn_locked_g_source_clear(&selfp->check_timeout_source);
if (selfp->poll && self->runtime_check_delay > 0)
@@ -194,7 +249,7 @@ class MN:Mailbox from G:Object (abstract)
/* all unread (unseen and seen) messages */
private GSList *unfiltered_messages destroywith mn_g_object_slist_free;
- private GHashTable *messages_marked_as_read = {g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_object_unref)} destroywith g_hash_table_destroy;
+ private GHashTable *messages_considered_as_read = {g_hash_table_new_full(g_str_hash, g_str_equal, NULL, (GDestroyNotify) g_object_unref)} destroywith g_hash_table_destroy;
/* unfiltered_messages after applying the "seen messages" filter */
public GSList *messages destroywith mn_g_object_slist_free;
@@ -222,10 +277,10 @@ class MN:Mailbox from G:Object (abstract)
* filter_messages:
* @self: the mailbox to act upon
*
- * Filter @self->unfiltered_messages with the "seen mail" filter and
- * @selfp->messages_marked_as_read, and store the resulting list in
- * @self->messages. Additionally, if @self->messages has changed,
- * emit the "messages-changed" signal.
+ * Filters @self->unfiltered_messages with the "seen mail" filter
+ * and @selfp->messages_considered_as_read, and stores the resulting
+ * list in @self->messages. Additionally, if @self->messages has
+ * changed, emits the "messages-changed" signal.
**/
private void
filter_messages (self)
@@ -256,7 +311,7 @@ class MN:Mailbox from G:Object (abstract)
if ((display_seen_mail
|| message->error
|| (message->flags & MN_MESSAGE_NEW) != 0)
- && ! g_hash_table_lookup(selfp->messages_marked_as_read, message->id))
+ && ! g_hash_table_lookup(selfp->messages_considered_as_read, message->id))
{
self->n_messages++;
if (message->sent_time > self->timestamp)
@@ -267,8 +322,8 @@ class MN:Mailbox from G:Object (abstract)
}
}
- /* remove stale messages from messages_marked_as_read */
- g_hash_table_foreach_remove(selfp->messages_marked_as_read, (GHRFunc) self_clean_messages_marked_as_read_cb, all_messages_hash_table);
+ /* remove stale messages from messages_considered_as_read */
+ g_hash_table_foreach_remove(selfp->messages_considered_as_read, (GHRFunc) self_clean_messages_considered_as_read_cb, all_messages_hash_table);
g_hash_table_destroy(all_messages_hash_table);
if (! messages)
@@ -298,9 +353,9 @@ class MN:Mailbox from G:Object (abstract)
}
private gboolean
- clean_messages_marked_as_read_cb (const char *id,
- MNMessage *message,
- GHashTable *messages)
+ clean_messages_considered_as_read_cb (const char *id,
+ MNMessage *message,
+ GHashTable *messages)
{
return g_hash_table_lookup(messages, id) == NULL;
}
@@ -363,20 +418,7 @@ class MN:Mailbox from G:Object (abstract)
void messages_changed (self, gboolean has_new);
public char *error destroywith g_free;
- property STRING error
- set
- {
- g_free(self->error);
- self->error = g_value_dup_string(VAL);
-
- /* if an error is set, we unset messages */
- if (self->error)
- self_set_messages(self, NULL);
- }
- get
- {
- g_value_set_string(VAL, self->error);
- };
+ property STRING error (link);
protected void
set_error (self, const char *format, ...)
@@ -418,28 +460,52 @@ class MN:Mailbox from G:Object (abstract)
#if WITH_GMAIL
mn_mailbox_types[i++] = MN_TYPE_GMAIL_MAILBOX;
#endif
+#if WITH_YAHOO
+ mn_mailbox_types[i++] = MN_TYPE_YAHOO_MAILBOX;
+#endif
+#if WITH_HOTMAIL
+ mn_mailbox_types[i++] = MN_TYPE_HOTMAIL_MAILBOX;
+#endif
#if WITH_EVOLUTION
mn_mailbox_types[i++] = MN_TYPE_EVOLUTION_MAILBOX;
#endif
mn_mailbox_types[i] = 0;
}
- public GType
- get_type_from_name (const char *type)
+ /* references the returned class */
+ public MNMailboxClass *
+ get_class_from_name (const char *type)
{
int i;
for (i = 0; mn_mailbox_types[i]; i++)
{
SelfClass *class;
- gboolean found;
class = g_type_class_ref(mn_mailbox_types[i]);
- found = ! strcmp(class->type, type);
+ if (! strcmp(class->type, type))
+ return class;
+
g_type_class_unref(class);
+ }
+
+ return NULL;
+ }
+
+ public GType
+ get_type_from_name (const char *type)
+ {
+ SelfClass *class;
- if (found)
- return mn_mailbox_types[i];
+ class = self_get_class_from_name(type);
+ if (class)
+ {
+ GType type;
+
+ type = G_OBJECT_CLASS_TYPE(class);
+ g_type_class_unref(class);
+
+ return type;
}
return 0;
@@ -581,7 +647,7 @@ class MN:Mailbox from G:Object (abstract)
properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(self), &n_properties);
for (i = 0; i < n_properties; i++)
- if ((properties[i]->flags & MN_MAILBOX_PARAM_PERMANENT) != 0)
+ if ((properties[i]->flags & MN_MAILBOX_PARAM_SAVE) != 0)
{
GParameter parameter = { NULL, { 0, } };
@@ -842,9 +908,11 @@ class MN:Mailbox from G:Object (abstract)
"authmech", authmech,
"hostname", hostname,
"port", port,
- "mailbox", path,
NULL);
+ if (path)
+ g_object_set(self, MN_IMAP_MAILBOX_PROP_MAILBOX(path), NULL);
+
if (queries && eel_g_strv_find(queries, "noidle") != -1)
g_object_set(G_OBJECT(self), MN_IMAP_MAILBOX_PROP_USE_IDLE_EXTENSION(MN_IMAP_MAILBOX_USE_IDLE_NEVER), NULL);
#endif
@@ -886,6 +954,7 @@ class MN:Mailbox from G:Object (abstract)
GParamSpec **properties;
unsigned int n_properties;
int i;
+ gboolean status = TRUE;
properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(self), &n_properties);
for (i = 0; i < n_properties; i++)
@@ -908,14 +977,26 @@ class MN:Mailbox from G:Object (abstract)
if (is_empty)
{
g_set_error(err, 0, 0, _("property \"%s\" has no value"), g_param_spec_get_name(properties[i]));
- return FALSE;
+ status = FALSE;
+ break;
}
}
g_free(properties);
- return TRUE;
+ return status;
}
+ /**
+ * seal:
+ * @self: a mailbox
+ *
+ * Seals the mailbox before it is made operational by being added to
+ * the mailboxes list. The point of this function is to allow
+ * subclasses to perform initialization which needs to consult the
+ * value of properties loaded from mailboxes.xml or set by the
+ * properties dialog. That would not be possible from init(), since
+ * these properties are only set after the mailbox is constructed.
+ **/
virtual public void
seal (self)
{
@@ -936,7 +1017,27 @@ class MN:Mailbox from G:Object (abstract)
virtual public void
check (self)
{
- g_assert(selfp->added == TRUE);
+ g_assert(self_get_active(self) == TRUE);
+ g_assert(selfp->checking_enabled == TRUE);
+ }
+
+ /*
+ * Mailboxes start with this property disabled. As long as this
+ * property is disabled, the Update menu items are insensitive, the
+ * periodic poll timeout is not installed, and mn_mailbox_check() is
+ * not called. This allows subclasses to prevent checks while they
+ * are saving the password, etc.
+ */
+ private gboolean checking_enabled;
+
+ protected void
+ enable_checking (self)
+ {
+ selfp->checking_enabled = TRUE;
+ g_object_notify(G_OBJECT(self), "manually-checkable");
+
+ self_update_check_timeout(self);
+ self_check(self);
}
protected void
@@ -945,11 +1046,18 @@ class MN:Mailbox from G:Object (abstract)
va_list args;
char *message;
+ /*
+ * Disregard messages sent by a threaded check still in progress
+ * after the mailbox has been removed.
+ */
+ if (! self_get_active(self))
+ return;
+
va_start(args, format);
message = g_strdup_vprintf(format, args);
va_end(args);
- mn_info("%s: %s", self->runtime_name, message);
+ mn_info(_("%s: %s"), self->runtime_name, message);
g_free(message);
}
@@ -959,37 +1067,81 @@ class MN:Mailbox from G:Object (abstract)
va_list args;
char *message;
+ /*
+ * Disregard messages sent by a threaded check still in progress
+ * after the mailbox has been removed.
+ */
+ if (! self_get_active(self))
+ return;
+
va_start(args, format);
message = g_strdup_vprintf(format, args);
va_end(args);
- g_warning("%s: %s", self->runtime_name, message);
+ g_warning(_("%s: %s"), self->runtime_name, message);
g_free(message);
}
+ private void
+ consider_as_read_real (self, MN:Message *message (check null type))
+ {
+ g_hash_table_replace(selfp->messages_considered_as_read, message->id, g_object_ref(message));
+ }
+
/*
- * There can be a slight (or large if polling is in effect) delay
- * between marking a message as read and having the next mail check
- * catch the change. This function is used to conceal the delay from
- * the user.
+ * This function serves two purposes:
+ *
+ * - there can be a slight (or large if polling is in effect)
+ * delay between marking a message as read and having the next
+ * mail check catch the change. This function is used to conceal
+ * the delay from the user.
+ * - this function is called on each new message when the user
+ * chooses the "Consider new mail as read" action
*/
public void
- mark_as_read (gpointer _message) /* cannot include mn-message.h */
+ consider_as_read (gpointer _message) /* cannot include mn-message.h */
{
- MNMessage *message;
+ MNMessage *message = MN_MESSAGE(_message);
Self *self;
- message = MN_MESSAGE(_message);
- g_return_if_fail(message != NULL);
-
self = message->mailbox;
g_assert(self != NULL);
- g_hash_table_replace(selfp->messages_marked_as_read, message->id, g_object_ref(message));
+ self_consider_as_read_real(self, message);
self_filter_messages(self);
}
+ /*
+ * Atomically considers a list of messages as read (updates the
+ * mailbox message list only once rather than for each message).
+ * Each message in the list must belong to the same mailbox.
+ */
+ public void
+ consider_as_read_list (const GSList *messages)
+ {
+ Self *self = NULL;
+ const GSList *l;
+
+ MN_LIST_FOREACH(l, messages)
+ {
+ MNMessage *message = l->data;
+
+ if (self)
+ g_assert(self == message->mailbox);
+ else
+ {
+ self = message->mailbox;
+ g_assert(self != NULL);
+ }
+
+ self_consider_as_read_real(self, message);
+ }
+
+ if (self) /* non empty list */
+ self_filter_messages(self);
+ }
+
public char *
get_command (self, const char *id (check null))
{
diff --git a/src/mn-mailbox.h b/src/mn-mailbox.h
@@ -18,7 +18,7 @@ extern "C" {
-#define MN_MAILBOX_MAX_TYPES 6
+#define MN_MAILBOX_MAX_TYPES 8
extern GType mn_mailbox_types[MN_MAILBOX_MAX_TYPES + 1];
typedef struct _MNMailboxConfiguration MNMailboxConfiguration;
@@ -80,6 +80,7 @@ struct _MNMailboxClass {
void (* check) (MNMailbox * self);
const char * type;
int default_check_delay;
+ gboolean enable_checking_when_added;
};
@@ -87,6 +88,7 @@ struct _MNMailboxClass {
* Public methods
*/
GType mn_mailbox_get_type (void);
+gboolean mn_mailbox_get_active (MNMailbox * self);
void mn_mailbox_added (MNMailbox * self);
void mn_mailbox_removed (MNMailbox * self);
gchar * mn_mailbox_get_stock_id (MNMailbox * self);
@@ -98,10 +100,12 @@ void mn_mailbox_set_format (MNMailbox * self,
gboolean mn_mailbox_get_poll (MNMailbox * self);
void mn_mailbox_set_poll (MNMailbox * self,
gboolean val);
+gboolean mn_mailbox_get_manually_checkable (MNMailbox * self);
const GSList * mn_mailbox_get_messages (MNMailbox * self);
void mn_mailbox_set_messages (MNMailbox * self,
const GSList * val);
void mn_mailbox_init_types (void);
+MNMailboxClass * mn_mailbox_get_class_from_name (const char * type);
GType mn_mailbox_get_type_from_name (const char * type);
MNMailbox * mn_mailbox_new (const char * type,
const char * first,
@@ -116,7 +120,8 @@ void mn_mailbox_configuration_free (MNMailboxConfiguration * config);
MNMailbox * mn_mailbox_new_from_obsolete_uri (const char * uri);
void mn_mailbox_seal (MNMailbox * self);
void mn_mailbox_check (MNMailbox * self);
-void mn_mailbox_mark_as_read (gpointer _message);
+void mn_mailbox_consider_as_read (gpointer _message);
+void mn_mailbox_consider_as_read_list (const GSList * messages);
char * mn_mailbox_get_command (MNMailbox * self,
const char * id);
gboolean mn_mailbox_has_command (MNMailbox * self,
@@ -170,6 +175,7 @@ gboolean mn_mailbox_has_command (MNMailbox * self,
#define MN_MAILBOX_GET_PROP_CHECK_DELAY(arg) "check_delay", __extension__ ({gint *z = (arg); z;})
#define MN_MAILBOX_PROP_POLL(arg) "poll", __extension__ ({gboolean z = (arg); z;})
#define MN_MAILBOX_GET_PROP_POLL(arg) "poll", __extension__ ({gboolean *z = (arg); z;})
+#define MN_MAILBOX_GET_PROP_MANUALLY_CHECKABLE(arg) "manually_checkable", __extension__ ({gboolean *z = (arg); z;})
#define MN_MAILBOX_PROP_MESSAGES(arg) "messages", __extension__ ({const GSList * z = (arg); z;})
#define MN_MAILBOX_GET_PROP_MESSAGES(arg) "messages", __extension__ ({const GSList * *z = (arg); z;})
#define MN_MAILBOX_PROP_ERROR(arg) "error", __extension__ ({gchar *z = (arg); z;})
@@ -193,6 +199,7 @@ gboolean mn_mailbox_has_command (MNMailbox * self,
#define MN_MAILBOX_GET_PROP_CHECK_DELAY(arg) "check_delay",(gint *)(arg)
#define MN_MAILBOX_PROP_POLL(arg) "poll",(gboolean )(arg)
#define MN_MAILBOX_GET_PROP_POLL(arg) "poll",(gboolean *)(arg)
+#define MN_MAILBOX_GET_PROP_MANUALLY_CHECKABLE(arg) "manually_checkable",(gboolean *)(arg)
#define MN_MAILBOX_PROP_MESSAGES(arg) "messages",(const GSList * )(arg)
#define MN_MAILBOX_GET_PROP_MESSAGES(arg) "messages",(const GSList * *)(arg)
#define MN_MAILBOX_PROP_ERROR(arg) "error",(gchar *)(arg)
diff --git a/src/mn-mailboxes-private.h b/src/mn-mailboxes-private.h
@@ -16,11 +16,11 @@ extern "C" {
#line 18 "mn-mailboxes-private.h"
struct _MNMailboxesPrivate {
-#line 53 "mn-mailboxes.gob"
+#line 56 "mn-mailboxes.gob"
GSList * add_queue;
-#line 54 "mn-mailboxes.gob"
+#line 57 "mn-mailboxes.gob"
GSList * remove_queue;
-#line 55 "mn-mailboxes.gob"
+#line 58 "mn-mailboxes.gob"
MNLockedGSource * queue_idle_source;
#line 26 "mn-mailboxes-private.h"
};
diff --git a/src/mn-mailboxes.c b/src/mn-mailboxes.c
@@ -39,8 +39,9 @@
#include "mn-message.h"
#include "mn-mailbox-private.h"
#include "mn-test-mailbox.h"
+#include "mn-shell.h"
-#line 44 "mn-mailboxes.c"
+#line 45 "mn-mailboxes.c"
/* self casting macros */
#define SELF(x) MN_MAILBOXES(x)
#define SELF_CONST(x) MN_MAILBOXES_CONST(x)
@@ -70,13 +71,15 @@ static int mn_mailboxes_messages_sort_cb (MNMessage * a, MNMessage * b) G_GNUC_U
static void mn_mailboxes_error_changed (MNMailboxes * self) G_GNUC_UNUSED;
static void mn_mailboxes_init (MNMailboxes * self) G_GNUC_UNUSED;
static void ___a_mn_mailboxes_finalize (GObject * object) G_GNUC_UNUSED;
+static void mn_mailboxes_load (MNMailboxes * self) G_GNUC_UNUSED;
static void mn_mailboxes_add_error (GString ** errors, int * n_errors, const char * format, ...) G_GNUC_UNUSED;
static gboolean mn_mailboxes_load_real (MNMailboxes * self, GError ** err) G_GNUC_UNUSED;
+static void mn_mailboxes_save (MNMailboxes * self) G_GNUC_UNUSED;
static gboolean mn_mailboxes_save_real (MNMailboxes * self, GError ** err) G_GNUC_UNUSED;
static void mn_mailboxes_mailbox_messages_changed_h (MNMailbox * mailbox, gboolean has_new, gpointer user_data) G_GNUC_UNUSED;
static void mn_mailboxes_mailbox_notify_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
static void mn_mailboxes_mailbox_notify_error_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
-static void mn_mailboxes_mailbox_notify_poll_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
+static void mn_mailboxes_mailbox_notify_manually_checkable_h (GObject * object, GParamSpec * pspec, gpointer user_data) G_GNUC_UNUSED;
static void mn_mailboxes_add_real (MNMailboxes * self, MNMailbox * mailbox) G_GNUC_UNUSED;
static void mn_mailboxes_remove_real (MNMailboxes * self, MNMailbox * mailbox) G_GNUC_UNUSED;
static gboolean mn_mailboxes_queue_idle_cb (gpointer data) G_GNUC_UNUSED;
@@ -212,7 +215,7 @@ enum {
enum {
PROP_0,
- PROP_POLL
+ PROP_MANUALLY_CHECKABLE
};
static guint object_signals[LAST_SIGNAL] = {0};
@@ -228,7 +231,7 @@ static GObjectClass *parent_class = NULL;
#define self_messages_changed mn_mailboxes_messages_changed
#define self_messages_sort_cb mn_mailboxes_messages_sort_cb
#define self_error_changed mn_mailboxes_error_changed
-#define self_get_poll mn_mailboxes_get_poll
+#define self_get_manually_checkable mn_mailboxes_get_manually_checkable
#define self_load mn_mailboxes_load
#define self_add_error mn_mailboxes_add_error
#define self_load_real mn_mailboxes_load_real
@@ -237,7 +240,7 @@ static GObjectClass *parent_class = NULL;
#define self_mailbox_messages_changed_h mn_mailboxes_mailbox_messages_changed_h
#define self_mailbox_notify_h mn_mailboxes_mailbox_notify_h
#define self_mailbox_notify_error_h mn_mailboxes_mailbox_notify_error_h
-#define self_mailbox_notify_poll_h mn_mailboxes_mailbox_notify_poll_h
+#define self_mailbox_notify_manually_checkable_h mn_mailboxes_mailbox_notify_manually_checkable_h
#define self_check mn_mailboxes_check
#define self_add_real mn_mailboxes_add_real
#define self_add mn_mailboxes_add
@@ -297,21 +300,21 @@ ___finalize(GObject *obj_self)
#define __GOB_FUNCTION__ "MN:Mailboxes::finalize"
MNMailboxes *self G_GNUC_UNUSED = MN_MAILBOXES (obj_self);
gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 249 "mn-mailboxes.gob"
+#line 261 "mn-mailboxes.gob"
___a_mn_mailboxes_finalize(obj_self);
-#line 303 "mn-mailboxes.c"
-#line 50 "mn-mailboxes.gob"
- if(self->list) { eel_g_object_list_free ((gpointer) self->list); self->list = NULL; }
#line 306 "mn-mailboxes.c"
#line 51 "mn-mailboxes.gob"
- if(self->messages) { mn_g_object_slist_free ((gpointer) self->messages); self->messages = NULL; }
+ if(self->list) { eel_g_object_list_free ((gpointer) self->list); self->list = NULL; }
#line 309 "mn-mailboxes.c"
-#line 53 "mn-mailboxes.gob"
- if(self->_priv->add_queue) { mn_g_object_slist_free ((gpointer) self->_priv->add_queue); self->_priv->add_queue = NULL; }
-#line 312 "mn-mailboxes.c"
#line 54 "mn-mailboxes.gob"
- if(self->_priv->remove_queue) { mn_g_object_slist_free ((gpointer) self->_priv->remove_queue); self->_priv->remove_queue = NULL; }
+ if(self->messages) { mn_g_object_slist_free ((gpointer) self->messages); self->messages = NULL; }
+#line 312 "mn-mailboxes.c"
+#line 56 "mn-mailboxes.gob"
+ if(self->_priv->add_queue) { mn_g_object_slist_free ((gpointer) self->_priv->add_queue); self->_priv->add_queue = NULL; }
#line 315 "mn-mailboxes.c"
+#line 57 "mn-mailboxes.gob"
+ if(self->_priv->remove_queue) { mn_g_object_slist_free ((gpointer) self->_priv->remove_queue); self->_priv->remove_queue = NULL; }
+#line 318 "mn-mailboxes.c"
}
#undef __GOB_FUNCTION__
@@ -335,7 +338,7 @@ mn_mailboxes_class_init (MNMailboxesClass * c G_GNUC_UNUSED)
G_TYPE_NONE, 1,
G_TYPE_OBJECT);
if ___GOB_UNLIKELY(sizeof(MNMailbox * ) != sizeof(GObject *) || parent_class == NULL /* avoid warning */) {
- g_error("mn-mailboxes.gob line 64: Type mismatch of \"mailbox_added\" signal signature");
+ g_error("mn-mailboxes.gob line 74: Type mismatch of \"mailbox_added\" signal signature");
}
object_signals[MAILBOX_REMOVED_SIGNAL] =
g_signal_new ("mailbox_removed",
@@ -347,7 +350,7 @@ mn_mailboxes_class_init (MNMailboxesClass * c G_GNUC_UNUSED)
G_TYPE_NONE, 1,
G_TYPE_OBJECT);
if ___GOB_UNLIKELY(sizeof(MNMailbox * ) != sizeof(GObject *) || parent_class == NULL /* avoid warning */) {
- g_error("mn-mailboxes.gob line 87: Type mismatch of \"mailbox_removed\" signal signature");
+ g_error("mn-mailboxes.gob line 97: Type mismatch of \"mailbox_removed\" signal signature");
}
object_signals[MAILBOX_NOTIFY_SIGNAL] =
g_signal_new ("mailbox_notify",
@@ -360,7 +363,7 @@ mn_mailboxes_class_init (MNMailboxesClass * c G_GNUC_UNUSED)
G_TYPE_OBJECT,
G_TYPE_POINTER);
if ___GOB_UNLIKELY(sizeof(MNMailbox * ) != sizeof(GObject *) || sizeof(GParamSpec * ) != sizeof(gpointer ) || parent_class == NULL /* avoid warning */) {
- g_error("mn-mailboxes.gob line 106: Type mismatch of \"mailbox_notify\" signal signature");
+ g_error("mn-mailboxes.gob line 116: Type mismatch of \"mailbox_notify\" signal signature");
}
object_signals[LIST_CHANGED_SIGNAL] =
g_signal_new ("list_changed",
@@ -380,7 +383,7 @@ mn_mailboxes_class_init (MNMailboxesClass * c G_GNUC_UNUSED)
G_TYPE_NONE, 1,
G_TYPE_BOOLEAN);
if ___GOB_UNLIKELY(sizeof(gboolean ) != sizeof(gboolean ) || parent_class == NULL /* avoid warning */) {
- g_error("mn-mailboxes.gob line 140: Type mismatch of \"messages_changed\" signal signature");
+ g_error("mn-mailboxes.gob line 150: Type mismatch of \"messages_changed\" signal signature");
}
object_signals[ERROR_CHANGED_SIGNAL] =
g_signal_new ("error_changed",
@@ -391,50 +394,52 @@ mn_mailboxes_class_init (MNMailboxesClass * c G_GNUC_UNUSED)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-#line 64 "mn-mailboxes.gob"
+#line 74 "mn-mailboxes.gob"
c->mailbox_added = ___real_mn_mailboxes_mailbox_added;
-#line 87 "mn-mailboxes.gob"
+#line 97 "mn-mailboxes.gob"
c->mailbox_removed = ___real_mn_mailboxes_mailbox_removed;
-#line 399 "mn-mailboxes.c"
+#line 402 "mn-mailboxes.c"
c->mailbox_notify = NULL;
-#line 119 "mn-mailboxes.gob"
+#line 129 "mn-mailboxes.gob"
c->list_changed = ___real_mn_mailboxes_list_changed;
-#line 140 "mn-mailboxes.gob"
+#line 150 "mn-mailboxes.gob"
c->messages_changed = ___real_mn_mailboxes_messages_changed;
-#line 405 "mn-mailboxes.c"
+#line 408 "mn-mailboxes.c"
c->error_changed = NULL;
-#line 249 "mn-mailboxes.gob"
+#line 261 "mn-mailboxes.gob"
g_object_class->finalize = ___finalize;
-#line 409 "mn-mailboxes.c"
+#line 412 "mn-mailboxes.c"
g_object_class->get_property = ___object_get_property;
{
GParamSpec *param_spec;
param_spec = g_param_spec_boolean
- ("poll" /* name */,
+ ("manually_checkable" /* name */,
NULL /* nick */,
NULL /* blurb */,
FALSE /* default_value */,
(GParamFlags)(G_PARAM_READABLE));
g_object_class_install_property (g_object_class,
- PROP_POLL,
+ PROP_MANUALLY_CHECKABLE,
param_spec);
}
}
#undef __GOB_FUNCTION__
-#line 196 "mn-mailboxes.gob"
+#line 206 "mn-mailboxes.gob"
static void
mn_mailboxes_init (MNMailboxes * self G_GNUC_UNUSED)
-#line 429 "mn-mailboxes.c"
+#line 432 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_MAILBOXES,MNMailboxesPrivate);
{
-#line 197 "mn-mailboxes.gob"
+#line 207 "mn-mailboxes.gob"
char *filename;
gboolean exists;
+ mn_shell->mailboxes = self;
+
filename = g_build_filename(mn_conf_dot_dir, "mailboxes.xml", NULL);
exists = g_file_test(filename, G_FILE_TEST_EXISTS);
g_free(filename);
@@ -482,7 +487,7 @@ mn_mailboxes_init (MNMailboxes * self G_GNUC_UNUSED)
eel_g_slist_free_deep(gconf_mailboxes);
}
-#line 486 "mn-mailboxes.c"
+#line 491 "mn-mailboxes.c"
}
}
#undef __GOB_FUNCTION__
@@ -499,27 +504,27 @@ ___object_get_property (GObject *object,
self = MN_MAILBOXES (object);
switch (property_id) {
- case PROP_POLL:
+ case PROP_MANUALLY_CHECKABLE:
{
-#line 178 "mn-mailboxes.gob"
+#line 188 "mn-mailboxes.gob"
- gboolean global_poll = FALSE;
GList *l;
+ gboolean value = FALSE;
MN_LIST_FOREACH(l, self->list)
{
MNMailbox *mailbox = l->data;
- if (mn_mailbox_get_poll(mailbox))
+ if (mn_mailbox_get_manually_checkable(mailbox))
{
- global_poll = TRUE;
+ value = TRUE;
break;
}
}
- g_value_set_boolean(VAL, global_poll);
+ g_value_set_boolean(VAL, value);
-#line 523 "mn-mailboxes.c"
+#line 528 "mn-mailboxes.c"
}
break;
default:
@@ -535,10 +540,10 @@ ___object_get_property (GObject *object,
#undef __GOB_FUNCTION__
-#line 64 "mn-mailboxes.gob"
+#line 74 "mn-mailboxes.gob"
static void
mn_mailboxes_mailbox_added (MNMailboxes * self, MNMailbox * mailbox)
-#line 542 "mn-mailboxes.c"
+#line 547 "mn-mailboxes.c"
{
GValue ___param_values[2];
GValue ___return_val;
@@ -546,15 +551,15 @@ mn_mailboxes_mailbox_added (MNMailboxes * self, MNMailbox * mailbox)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 64 "mn-mailboxes.gob"
+#line 74 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 64 "mn-mailboxes.gob"
+#line 74 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 64 "mn-mailboxes.gob"
+#line 74 "mn-mailboxes.gob"
g_return_if_fail (mailbox != NULL);
-#line 64 "mn-mailboxes.gob"
+#line 74 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 558 "mn-mailboxes.c"
+#line 563 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -572,33 +577,33 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
g_value_unset (&___param_values[1]);
}
-#line 64 "mn-mailboxes.gob"
+#line 74 "mn-mailboxes.gob"
static void
___real_mn_mailboxes_mailbox_added (MNMailboxes * self G_GNUC_UNUSED, MNMailbox * mailbox)
-#line 579 "mn-mailboxes.c"
+#line 584 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_added"
{
-#line 66 "mn-mailboxes.gob"
+#line 76 "mn-mailboxes.gob"
/* connect signals */
g_object_connect(mailbox,
"signal::messages-changed", self_mailbox_messages_changed_h, self,
"signal::notify", self_mailbox_notify_h, self,
"signal::notify::error", self_mailbox_notify_error_h, self,
- "signal::notify::poll", self_mailbox_notify_poll_h, self,
+ "signal::notify::manually-checkable", self_mailbox_notify_manually_checkable_h, self,
NULL);
/* emit the "added" signal on the mailbox */
mn_mailbox_added(mailbox);
}}
-#line 596 "mn-mailboxes.c"
+#line 601 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 87 "mn-mailboxes.gob"
+#line 97 "mn-mailboxes.gob"
static void
mn_mailboxes_mailbox_removed (MNMailboxes * self, MNMailbox * mailbox)
-#line 602 "mn-mailboxes.c"
+#line 607 "mn-mailboxes.c"
{
GValue ___param_values[2];
GValue ___return_val;
@@ -606,15 +611,15 @@ mn_mailboxes_mailbox_removed (MNMailboxes * self, MNMailbox * mailbox)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 87 "mn-mailboxes.gob"
+#line 97 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 87 "mn-mailboxes.gob"
+#line 97 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 87 "mn-mailboxes.gob"
+#line 97 "mn-mailboxes.gob"
g_return_if_fail (mailbox != NULL);
-#line 87 "mn-mailboxes.gob"
+#line 97 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 618 "mn-mailboxes.c"
+#line 623 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -632,21 +637,21 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
g_value_unset (&___param_values[1]);
}
-#line 87 "mn-mailboxes.gob"
+#line 97 "mn-mailboxes.gob"
static void
___real_mn_mailboxes_mailbox_removed (MNMailboxes * self G_GNUC_UNUSED, MNMailbox * mailbox)
-#line 639 "mn-mailboxes.c"
+#line 644 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_removed"
{
-#line 89 "mn-mailboxes.gob"
+#line 99 "mn-mailboxes.gob"
/* disconnect signals */
g_object_disconnect(mailbox,
"any-signal", self_mailbox_messages_changed_h, self,
"any-signal", self_mailbox_notify_h, self,
"any-signal", self_mailbox_notify_error_h, self,
- "any-signal", self_mailbox_notify_poll_h, self,
+ "any-signal", self_mailbox_notify_manually_checkable_h, self,
NULL);
/* emit the "removed" signal on the mailbox */
@@ -656,13 +661,13 @@ ___real_mn_mailboxes_mailbox_removed (MNMailboxes * self G_GNUC_UNUSED, MNMailbo
self_messages_changed(self, FALSE);
self_error_changed(self);
}}
-#line 660 "mn-mailboxes.c"
+#line 665 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 106 "mn-mailboxes.gob"
+#line 116 "mn-mailboxes.gob"
static void
mn_mailboxes_mailbox_notify (MNMailboxes * self, MNMailbox * mailbox, GParamSpec * pspec)
-#line 666 "mn-mailboxes.c"
+#line 671 "mn-mailboxes.c"
{
GValue ___param_values[3];
GValue ___return_val;
@@ -670,17 +675,17 @@ mn_mailboxes_mailbox_notify (MNMailboxes * self, MNMailbox * mailbox, GParamSpec
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 106 "mn-mailboxes.gob"
+#line 116 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 106 "mn-mailboxes.gob"
+#line 116 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 106 "mn-mailboxes.gob"
+#line 116 "mn-mailboxes.gob"
g_return_if_fail (mailbox != NULL);
-#line 106 "mn-mailboxes.gob"
+#line 116 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 106 "mn-mailboxes.gob"
+#line 116 "mn-mailboxes.gob"
g_return_if_fail (pspec != NULL);
-#line 684 "mn-mailboxes.c"
+#line 689 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -704,10 +709,10 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[2]);
}
-#line 119 "mn-mailboxes.gob"
+#line 129 "mn-mailboxes.gob"
static void
mn_mailboxes_list_changed (MNMailboxes * self)
-#line 711 "mn-mailboxes.c"
+#line 716 "mn-mailboxes.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -715,11 +720,11 @@ mn_mailboxes_list_changed (MNMailboxes * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 119 "mn-mailboxes.gob"
+#line 129 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 119 "mn-mailboxes.gob"
+#line 129 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 723 "mn-mailboxes.c"
+#line 728 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -732,25 +737,25 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 119 "mn-mailboxes.gob"
+#line 129 "mn-mailboxes.gob"
static void
___real_mn_mailboxes_list_changed (MNMailboxes * self G_GNUC_UNUSED)
-#line 739 "mn-mailboxes.c"
+#line 744 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::list_changed"
{
-#line 121 "mn-mailboxes.gob"
+#line 131 "mn-mailboxes.gob"
- /* poll has possibly changed */
- g_object_notify(G_OBJECT(self), "poll");
+ /* manually-checkable has possibly changed */
+ g_object_notify(G_OBJECT(self), "manually-checkable");
}}
-#line 748 "mn-mailboxes.c"
+#line 753 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 140 "mn-mailboxes.gob"
+#line 150 "mn-mailboxes.gob"
static void
mn_mailboxes_messages_changed (MNMailboxes * self, gboolean has_new)
-#line 754 "mn-mailboxes.c"
+#line 759 "mn-mailboxes.c"
{
GValue ___param_values[2];
GValue ___return_val;
@@ -758,11 +763,11 @@ mn_mailboxes_messages_changed (MNMailboxes * self, gboolean has_new)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 140 "mn-mailboxes.gob"
+#line 150 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 140 "mn-mailboxes.gob"
+#line 150 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 766 "mn-mailboxes.c"
+#line 771 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -780,14 +785,14 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
g_value_unset (&___param_values[1]);
}
-#line 140 "mn-mailboxes.gob"
+#line 150 "mn-mailboxes.gob"
static void
___real_mn_mailboxes_messages_changed (MNMailboxes * self G_GNUC_UNUSED, gboolean has_new)
-#line 787 "mn-mailboxes.c"
+#line 792 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::messages_changed"
{
-#line 142 "mn-mailboxes.gob"
+#line 152 "mn-mailboxes.gob"
GList *la;
@@ -802,28 +807,28 @@ ___real_mn_mailboxes_messages_changed (MNMailboxes * self G_GNUC_UNUSED, gboolea
self->messages = g_slist_insert_sorted(self->messages, g_object_ref(lb->data), (GCompareFunc) self_messages_sort_cb);
}
}}
-#line 806 "mn-mailboxes.c"
+#line 811 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 157 "mn-mailboxes.gob"
+#line 167 "mn-mailboxes.gob"
static int
mn_mailboxes_messages_sort_cb (MNMessage * a, MNMessage * b)
-#line 812 "mn-mailboxes.c"
+#line 817 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::messages_sort_cb"
{
-#line 159 "mn-mailboxes.gob"
+#line 169 "mn-mailboxes.gob"
/* sort by sent time in descending order */
return b->sent_time - a->sent_time;
}}
-#line 821 "mn-mailboxes.c"
+#line 826 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 173 "mn-mailboxes.gob"
+#line 183 "mn-mailboxes.gob"
static void
mn_mailboxes_error_changed (MNMailboxes * self)
-#line 827 "mn-mailboxes.c"
+#line 832 "mn-mailboxes.c"
{
GValue ___param_values[1];
GValue ___return_val;
@@ -831,11 +836,11 @@ mn_mailboxes_error_changed (MNMailboxes * self)
memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));
-#line 173 "mn-mailboxes.gob"
+#line 183 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 173 "mn-mailboxes.gob"
+#line 183 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 839 "mn-mailboxes.c"
+#line 844 "mn-mailboxes.c"
___param_values[0].g_type = 0;
g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
@@ -849,31 +854,31 @@ memset (&___param_values, 0, sizeof (___param_values));
g_value_unset (&___param_values[0]);
}
-#line 178 "mn-mailboxes.gob"
+#line 188 "mn-mailboxes.gob"
gboolean
-mn_mailboxes_get_poll (MNMailboxes * self)
-#line 856 "mn-mailboxes.c"
+mn_mailboxes_get_manually_checkable (MNMailboxes * self)
+#line 861 "mn-mailboxes.c"
{
-#define __GOB_FUNCTION__ "MN:Mailboxes::get_poll"
+#define __GOB_FUNCTION__ "MN:Mailboxes::get_manually_checkable"
{
-#line 176 "mn-mailboxes.gob"
- gboolean val; g_object_get (G_OBJECT (self), "poll", &val, NULL); return val;
+#line 186 "mn-mailboxes.gob"
+ gboolean val; g_object_get (G_OBJECT (self), "manually_checkable", &val, NULL); return val;
}}
-#line 863 "mn-mailboxes.c"
+#line 868 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 249 "mn-mailboxes.gob"
+#line 261 "mn-mailboxes.gob"
static void
___a_mn_mailboxes_finalize (GObject * object G_GNUC_UNUSED)
-#line 870 "mn-mailboxes.c"
+#line 875 "mn-mailboxes.c"
#define PARENT_HANDLER(___object) \
{ if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
{
#define __GOB_FUNCTION__ "MN:Mailboxes::finalize"
{
-#line 251 "mn-mailboxes.gob"
+#line 263 "mn-mailboxes.gob"
Self *self = SELF(object);
@@ -882,23 +887,23 @@ ___a_mn_mailboxes_finalize (GObject * object G_GNUC_UNUSED)
PARENT_HANDLER(object);
}}
-#line 886 "mn-mailboxes.c"
+#line 891 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 260 "mn-mailboxes.gob"
-void
+#line 272 "mn-mailboxes.gob"
+static void
mn_mailboxes_load (MNMailboxes * self)
-#line 893 "mn-mailboxes.c"
+#line 898 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::load"
-#line 260 "mn-mailboxes.gob"
+#line 272 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 260 "mn-mailboxes.gob"
+#line 272 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 900 "mn-mailboxes.c"
+#line 905 "mn-mailboxes.c"
{
-#line 262 "mn-mailboxes.gob"
+#line 274 "mn-mailboxes.gob"
GError *err = NULL;
@@ -907,23 +912,26 @@ mn_mailboxes_load (MNMailboxes * self)
mn_error_dialog(NULL, _("Unable to load the mailboxes configuration"), "%s", err->message);
g_error_free(err);
}
+
+ if (self->must_save_after_load)
+ self_save(self);
}}
-#line 912 "mn-mailboxes.c"
+#line 920 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 272 "mn-mailboxes.gob"
+#line 287 "mn-mailboxes.gob"
static void
mn_mailboxes_add_error (GString ** errors, int * n_errors, const char * format, ...)
-#line 918 "mn-mailboxes.c"
+#line 926 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::add_error"
-#line 272 "mn-mailboxes.gob"
+#line 287 "mn-mailboxes.gob"
g_return_if_fail (errors != NULL);
-#line 272 "mn-mailboxes.gob"
+#line 287 "mn-mailboxes.gob"
g_return_if_fail (n_errors != NULL);
-#line 925 "mn-mailboxes.c"
+#line 933 "mn-mailboxes.c"
{
-#line 276 "mn-mailboxes.gob"
+#line 291 "mn-mailboxes.gob"
va_list args;
char *message;
@@ -942,22 +950,22 @@ mn_mailboxes_add_error (GString ** errors, int * n_errors, const char * format,
(*n_errors)++;
}}
-#line 946 "mn-mailboxes.c"
+#line 954 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 295 "mn-mailboxes.gob"
+#line 310 "mn-mailboxes.gob"
static gboolean
mn_mailboxes_load_real (MNMailboxes * self, GError ** err)
-#line 952 "mn-mailboxes.c"
+#line 960 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::load_real"
-#line 295 "mn-mailboxes.gob"
+#line 310 "mn-mailboxes.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 295 "mn-mailboxes.gob"
+#line 310 "mn-mailboxes.gob"
g_return_val_if_fail (MN_IS_MAILBOXES (self), (gboolean )0);
-#line 959 "mn-mailboxes.c"
+#line 967 "mn-mailboxes.c"
{
-#line 297 "mn-mailboxes.gob"
+#line 312 "mn-mailboxes.gob"
char *filename;
xmlDoc *doc;
@@ -1005,7 +1013,6 @@ mn_mailboxes_load_real (MNMailboxes * self, GError ** err)
mn_mailbox_seal(mailbox);
self_add_real(self, mailbox);
g_object_unref(mailbox);
-
list_changed = TRUE;
}
else
@@ -1041,22 +1048,22 @@ mn_mailboxes_load_real (MNMailboxes * self, GError ** err)
return status;
}}
-#line 1045 "mn-mailboxes.c"
+#line 1052 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 381 "mn-mailboxes.gob"
-void
+#line 395 "mn-mailboxes.gob"
+static void
mn_mailboxes_save (MNMailboxes * self)
-#line 1051 "mn-mailboxes.c"
+#line 1058 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::save"
-#line 381 "mn-mailboxes.gob"
+#line 395 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 381 "mn-mailboxes.gob"
+#line 395 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 1058 "mn-mailboxes.c"
+#line 1065 "mn-mailboxes.c"
{
-#line 383 "mn-mailboxes.gob"
+#line 397 "mn-mailboxes.gob"
GError *err = NULL;
@@ -1066,22 +1073,22 @@ mn_mailboxes_save (MNMailboxes * self)
g_error_free(err);
}
}}
-#line 1070 "mn-mailboxes.c"
+#line 1077 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 393 "mn-mailboxes.gob"
+#line 407 "mn-mailboxes.gob"
static gboolean
mn_mailboxes_save_real (MNMailboxes * self, GError ** err)
-#line 1076 "mn-mailboxes.c"
+#line 1083 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::save_real"
-#line 393 "mn-mailboxes.gob"
+#line 407 "mn-mailboxes.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 393 "mn-mailboxes.gob"
+#line 407 "mn-mailboxes.gob"
g_return_val_if_fail (MN_IS_MAILBOXES (self), (gboolean )0);
-#line 1083 "mn-mailboxes.c"
+#line 1090 "mn-mailboxes.c"
{
-#line 395 "mn-mailboxes.gob"
+#line 409 "mn-mailboxes.gob"
int indent;
xmlDoc *doc;
@@ -1107,8 +1114,11 @@ mn_mailboxes_save_real (MNMailboxes * self, GError ** err)
MNMailbox *mailbox = l->data;
xmlNode *node;
- node = mn_mailbox_xml_node_new(mailbox);
- xmlAddChild(root, node); /* owns node */
+ if (! MN_IS_TEST_MAILBOX(mailbox))
+ {
+ node = mn_mailbox_xml_node_new(mailbox);
+ xmlAddChild(root, node); /* owns node */
+ }
}
filename = g_build_filename(mn_conf_dot_dir, "mailboxes.xml", NULL);
@@ -1190,17 +1200,17 @@ mn_mailboxes_save_real (MNMailboxes * self, GError ** err)
return status;
}}
-#line 1194 "mn-mailboxes.c"
+#line 1204 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 504 "mn-mailboxes.gob"
+#line 521 "mn-mailboxes.gob"
static void
mn_mailboxes_mailbox_messages_changed_h (MNMailbox * mailbox, gboolean has_new, gpointer user_data)
-#line 1200 "mn-mailboxes.c"
+#line 1210 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_messages_changed_h"
{
-#line 508 "mn-mailboxes.gob"
+#line 525 "mn-mailboxes.gob"
Self *self = user_data;
@@ -1209,17 +1219,17 @@ mn_mailboxes_mailbox_messages_changed_h (MNMailbox * mailbox, gboolean has_new,
self_messages_changed(self, has_new);
}}
-#line 1213 "mn-mailboxes.c"
+#line 1223 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 517 "mn-mailboxes.gob"
+#line 534 "mn-mailboxes.gob"
static void
mn_mailboxes_mailbox_notify_h (GObject * object, GParamSpec * pspec, gpointer user_data)
-#line 1219 "mn-mailboxes.c"
+#line 1229 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_notify_h"
{
-#line 519 "mn-mailboxes.gob"
+#line 536 "mn-mailboxes.gob"
Self *self = user_data;
char *detailed_signal;
@@ -1228,17 +1238,17 @@ mn_mailboxes_mailbox_notify_h (GObject * object, GParamSpec * pspec, gpointer us
g_signal_emit_by_name(self, detailed_signal, object, pspec);
g_free(detailed_signal);
}}
-#line 1232 "mn-mailboxes.c"
+#line 1242 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 528 "mn-mailboxes.gob"
+#line 545 "mn-mailboxes.gob"
static void
mn_mailboxes_mailbox_notify_error_h (GObject * object, GParamSpec * pspec, gpointer user_data)
-#line 1238 "mn-mailboxes.c"
+#line 1248 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_notify_error_h"
{
-#line 532 "mn-mailboxes.gob"
+#line 549 "mn-mailboxes.gob"
Self *self = user_data;
MNMailbox *mailbox = MN_MAILBOX(object);
@@ -1248,39 +1258,39 @@ mn_mailboxes_mailbox_notify_error_h (GObject * object, GParamSpec * pspec, gpoin
self_error_changed(self);
}}
-#line 1252 "mn-mailboxes.c"
+#line 1262 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 542 "mn-mailboxes.gob"
+#line 559 "mn-mailboxes.gob"
static void
-mn_mailboxes_mailbox_notify_poll_h (GObject * object, GParamSpec * pspec, gpointer user_data)
-#line 1258 "mn-mailboxes.c"
+mn_mailboxes_mailbox_notify_manually_checkable_h (GObject * object, GParamSpec * pspec, gpointer user_data)
+#line 1268 "mn-mailboxes.c"
{
-#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_notify_poll_h"
+#define __GOB_FUNCTION__ "MN:Mailboxes::mailbox_notify_manually_checkable_h"
{
-#line 546 "mn-mailboxes.gob"
+#line 563 "mn-mailboxes.gob"
Self *self = user_data;
- /* poll has possibly changed */
- g_object_notify(G_OBJECT(self), "poll");
+ /* manually-checkable has possibly changed */
+ g_object_notify(G_OBJECT(self), "manually-checkable");
}}
-#line 1269 "mn-mailboxes.c"
+#line 1279 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 553 "mn-mailboxes.gob"
+#line 570 "mn-mailboxes.gob"
void
mn_mailboxes_check (MNMailboxes * self)
-#line 1275 "mn-mailboxes.c"
+#line 1285 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::check"
-#line 553 "mn-mailboxes.gob"
+#line 570 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 553 "mn-mailboxes.gob"
+#line 570 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 1282 "mn-mailboxes.c"
+#line 1292 "mn-mailboxes.c"
{
-#line 555 "mn-mailboxes.gob"
+#line 572 "mn-mailboxes.gob"
GList *l;
@@ -1288,81 +1298,82 @@ mn_mailboxes_check (MNMailboxes * self)
{
MNMailbox *mailbox = l->data;
- if (mn_mailbox_get_poll(mailbox))
+ if (mn_mailbox_get_manually_checkable(mailbox))
mn_mailbox_check(mailbox);
}
}}
-#line 1296 "mn-mailboxes.c"
+#line 1306 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 567 "mn-mailboxes.gob"
+#line 584 "mn-mailboxes.gob"
static void
mn_mailboxes_add_real (MNMailboxes * self, MNMailbox * mailbox)
-#line 1302 "mn-mailboxes.c"
+#line 1312 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::add_real"
-#line 567 "mn-mailboxes.gob"
+#line 584 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 567 "mn-mailboxes.gob"
+#line 584 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 567 "mn-mailboxes.gob"
+#line 584 "mn-mailboxes.gob"
g_return_if_fail (mailbox != NULL);
-#line 567 "mn-mailboxes.gob"
+#line 584 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1313 "mn-mailboxes.c"
+#line 1323 "mn-mailboxes.c"
{
-#line 569 "mn-mailboxes.gob"
+#line 586 "mn-mailboxes.gob"
g_object_ref(mailbox);
self->list = g_list_insert_sorted(self->list, mailbox, self_compare_by_name_func);
self_mailbox_added(self, mailbox);
}}
-#line 1321 "mn-mailboxes.c"
+#line 1331 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 575 "mn-mailboxes.gob"
+#line 592 "mn-mailboxes.gob"
void
mn_mailboxes_add (MNMailboxes * self, MNMailbox * mailbox)
-#line 1327 "mn-mailboxes.c"
+#line 1337 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::add"
-#line 575 "mn-mailboxes.gob"
+#line 592 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 575 "mn-mailboxes.gob"
+#line 592 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 575 "mn-mailboxes.gob"
+#line 592 "mn-mailboxes.gob"
g_return_if_fail (mailbox != NULL);
-#line 575 "mn-mailboxes.gob"
+#line 592 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1338 "mn-mailboxes.c"
+#line 1348 "mn-mailboxes.c"
{
-#line 577 "mn-mailboxes.gob"
+#line 594 "mn-mailboxes.gob"
self_add_real(self, mailbox);
self_list_changed(self);
+
if (! MN_IS_TEST_MAILBOX(mailbox))
self_save(self);
}}
-#line 1347 "mn-mailboxes.c"
+#line 1358 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 584 "mn-mailboxes.gob"
+#line 602 "mn-mailboxes.gob"
void
mn_mailboxes_queue_add (MNMailboxes * self, MNMailbox * mailbox)
-#line 1353 "mn-mailboxes.c"
+#line 1364 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::queue_add"
-#line 584 "mn-mailboxes.gob"
+#line 602 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 584 "mn-mailboxes.gob"
+#line 602 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 584 "mn-mailboxes.gob"
+#line 602 "mn-mailboxes.gob"
g_return_if_fail (mailbox != NULL);
-#line 584 "mn-mailboxes.gob"
+#line 602 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1364 "mn-mailboxes.c"
+#line 1375 "mn-mailboxes.c"
{
-#line 586 "mn-mailboxes.gob"
+#line 604 "mn-mailboxes.gob"
g_object_ref(mailbox);
selfp->add_queue = g_slist_append(selfp->add_queue, mailbox);
@@ -1370,77 +1381,77 @@ mn_mailboxes_queue_add (MNMailboxes * self, MNMailbox * mailbox)
if (! selfp->queue_idle_source)
selfp->queue_idle_source = mn_g_idle_add_gdk_locked(self_queue_idle_cb, self);
}}
-#line 1374 "mn-mailboxes.c"
+#line 1385 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 594 "mn-mailboxes.gob"
+#line 612 "mn-mailboxes.gob"
static void
mn_mailboxes_remove_real (MNMailboxes * self, MNMailbox * mailbox)
-#line 1380 "mn-mailboxes.c"
+#line 1391 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::remove_real"
-#line 594 "mn-mailboxes.gob"
+#line 612 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 594 "mn-mailboxes.gob"
+#line 612 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 594 "mn-mailboxes.gob"
+#line 612 "mn-mailboxes.gob"
g_return_if_fail (mailbox != NULL);
-#line 594 "mn-mailboxes.gob"
+#line 612 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1391 "mn-mailboxes.c"
+#line 1402 "mn-mailboxes.c"
{
-#line 596 "mn-mailboxes.gob"
+#line 614 "mn-mailboxes.gob"
self->list = g_list_remove(self->list, mailbox);
self_mailbox_removed(self, mailbox);
g_object_unref(mailbox);
}}
-#line 1399 "mn-mailboxes.c"
+#line 1410 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 602 "mn-mailboxes.gob"
+#line 620 "mn-mailboxes.gob"
void
mn_mailboxes_remove (MNMailboxes * self, MNMailbox * mailbox)
-#line 1405 "mn-mailboxes.c"
+#line 1416 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::remove"
-#line 602 "mn-mailboxes.gob"
+#line 620 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 602 "mn-mailboxes.gob"
+#line 620 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 602 "mn-mailboxes.gob"
+#line 620 "mn-mailboxes.gob"
g_return_if_fail (mailbox != NULL);
-#line 602 "mn-mailboxes.gob"
+#line 620 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1416 "mn-mailboxes.c"
+#line 1427 "mn-mailboxes.c"
{
-#line 604 "mn-mailboxes.gob"
+#line 622 "mn-mailboxes.gob"
self_remove_real(self, mailbox);
self_list_changed(self);
if (! MN_IS_TEST_MAILBOX(mailbox))
self_save(self);
}}
-#line 1425 "mn-mailboxes.c"
+#line 1436 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 611 "mn-mailboxes.gob"
+#line 629 "mn-mailboxes.gob"
void
mn_mailboxes_queue_remove (MNMailboxes * self, MNMailbox * mailbox)
-#line 1431 "mn-mailboxes.c"
+#line 1442 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::queue_remove"
-#line 611 "mn-mailboxes.gob"
+#line 629 "mn-mailboxes.gob"
g_return_if_fail (self != NULL);
-#line 611 "mn-mailboxes.gob"
+#line 629 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOXES (self));
-#line 611 "mn-mailboxes.gob"
+#line 629 "mn-mailboxes.gob"
g_return_if_fail (mailbox != NULL);
-#line 611 "mn-mailboxes.gob"
+#line 629 "mn-mailboxes.gob"
g_return_if_fail (MN_IS_MAILBOX (mailbox));
-#line 1442 "mn-mailboxes.c"
+#line 1453 "mn-mailboxes.c"
{
-#line 613 "mn-mailboxes.gob"
+#line 631 "mn-mailboxes.gob"
g_object_ref(mailbox);
selfp->remove_queue = g_slist_append(selfp->remove_queue, mailbox);
@@ -1448,17 +1459,17 @@ mn_mailboxes_queue_remove (MNMailboxes * self, MNMailbox * mailbox)
if (! selfp->queue_idle_source)
selfp->queue_idle_source = mn_g_idle_add_gdk_locked(self_queue_idle_cb, self);
}}
-#line 1452 "mn-mailboxes.c"
+#line 1463 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 621 "mn-mailboxes.gob"
+#line 639 "mn-mailboxes.gob"
static gboolean
mn_mailboxes_queue_idle_cb (gpointer data)
-#line 1458 "mn-mailboxes.c"
+#line 1469 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::queue_idle_cb"
{
-#line 623 "mn-mailboxes.gob"
+#line 641 "mn-mailboxes.gob"
Self *self = data;
GSList *l;
@@ -1479,36 +1490,36 @@ mn_mailboxes_queue_idle_cb (gpointer data)
selfp->queue_idle_source = NULL;
return FALSE; /* remove */
}}
-#line 1483 "mn-mailboxes.c"
+#line 1494 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 644 "mn-mailboxes.gob"
+#line 662 "mn-mailboxes.gob"
int
mn_mailboxes_compare_by_name_func (gconstpointer a, gconstpointer b)
-#line 1489 "mn-mailboxes.c"
+#line 1500 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::compare_by_name_func"
{
-#line 646 "mn-mailboxes.gob"
+#line 664 "mn-mailboxes.gob"
MNMailbox *mailbox_a = (MNMailbox *) a;
MNMailbox *mailbox_b = (MNMailbox *) b;
return g_utf8_collate(mailbox_a->runtime_name, mailbox_b->runtime_name);
}}
-#line 1500 "mn-mailboxes.c"
+#line 1511 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
-#line 653 "mn-mailboxes.gob"
+#line 671 "mn-mailboxes.gob"
MNMailboxes *
mn_mailboxes_new (void)
-#line 1506 "mn-mailboxes.c"
+#line 1517 "mn-mailboxes.c"
{
#define __GOB_FUNCTION__ "MN:Mailboxes::new"
{
-#line 655 "mn-mailboxes.gob"
+#line 673 "mn-mailboxes.gob"
return GET_NEW;
}}
-#line 1514 "mn-mailboxes.c"
+#line 1525 "mn-mailboxes.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-mailboxes.gob b/src/mn-mailboxes.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -43,17 +43,27 @@ requires 2.0.14
#include "mn-message.h"
#include "mn-mailbox-private.h"
#include "mn-test-mailbox.h"
+#include "mn-shell.h"
%}
class MN:Mailboxes from G:Object
{
public GList *list destroywith eel_g_object_list_free;
+
+ /* sorted by sent time, most recent first */
public GSList *messages destroywith mn_g_object_slist_free;
private GSList *add_queue destroywith mn_g_object_slist_free;
private GSList *remove_queue destroywith mn_g_object_slist_free;
private MNLockedGSource *queue_idle_source;
+ /*
+ * Can be set by mailboxes to indicate that mailboxes.xml must be
+ * saved after having been loaded. Used by MNAuthenticatedMailbox to
+ * remove the plain text passwords saved by older versions of MN.
+ */
+ public gboolean must_save_after_load;
+
/**
* mailbox-added:
* @self: the object which received the signal
@@ -69,7 +79,7 @@ class MN:Mailboxes from G:Object
"signal::messages-changed", self_mailbox_messages_changed_h, self,
"signal::notify", self_mailbox_notify_h, self,
"signal::notify::error", self_mailbox_notify_error_h, self,
- "signal::notify::poll", self_mailbox_notify_poll_h, self,
+ "signal::notify::manually-checkable", self_mailbox_notify_manually_checkable_h, self,
NULL);
/* emit the "added" signal on the mailbox */
@@ -92,7 +102,7 @@ class MN:Mailboxes from G:Object
"any-signal", self_mailbox_messages_changed_h, self,
"any-signal", self_mailbox_notify_h, self,
"any-signal", self_mailbox_notify_error_h, self,
- "any-signal", self_mailbox_notify_poll_h, self,
+ "any-signal", self_mailbox_notify_manually_checkable_h, self,
NULL);
/* emit the "removed" signal on the mailbox */
@@ -119,8 +129,8 @@ class MN:Mailboxes from G:Object
signal first private NONE (NONE)
void list_changed (self)
{
- /* poll has possibly changed */
- g_object_notify(G_OBJECT(self), "poll");
+ /* manually-checkable has possibly changed */
+ g_object_notify(G_OBJECT(self), "manually-checkable");
}
/**
@@ -173,24 +183,24 @@ class MN:Mailboxes from G:Object
signal private NONE (NONE)
void error_changed (self);
- property BOOLEAN poll (export)
+ property BOOLEAN manually_checkable (export)
get
{
- gboolean global_poll = FALSE;
GList *l;
+ gboolean value = FALSE;
MN_LIST_FOREACH(l, self->list)
{
MNMailbox *mailbox = l->data;
- if (mn_mailbox_get_poll(mailbox))
+ if (mn_mailbox_get_manually_checkable(mailbox))
{
- global_poll = TRUE;
+ value = TRUE;
break;
}
}
- g_value_set_boolean(VAL, global_poll);
+ g_value_set_boolean(VAL, value);
};
init (self)
@@ -198,6 +208,8 @@ class MN:Mailboxes from G:Object
char *filename;
gboolean exists;
+ mn_shell->mailboxes = self;
+
filename = g_build_filename(mn_conf_dot_dir, "mailboxes.xml", NULL);
exists = g_file_test(filename, G_FILE_TEST_EXISTS);
g_free(filename);
@@ -257,7 +269,7 @@ class MN:Mailboxes from G:Object
PARENT_HANDLER(object);
}
- public void
+ private void
load (self)
{
GError *err = NULL;
@@ -267,6 +279,9 @@ class MN:Mailboxes from G:Object
mn_error_dialog(NULL, _("Unable to load the mailboxes configuration"), "%s", err->message);
g_error_free(err);
}
+
+ if (self->must_save_after_load)
+ self_save(self);
}
private void
@@ -341,7 +356,6 @@ class MN:Mailboxes from G:Object
mn_mailbox_seal(mailbox);
self_add_real(self, mailbox);
g_object_unref(mailbox);
-
list_changed = TRUE;
}
else
@@ -378,7 +392,7 @@ class MN:Mailboxes from G:Object
return status;
}
- public void
+ private void
save (self)
{
GError *err = NULL;
@@ -417,8 +431,11 @@ class MN:Mailboxes from G:Object
MNMailbox *mailbox = l->data;
xmlNode *node;
- node = mn_mailbox_xml_node_new(mailbox);
- xmlAddChild(root, node); /* owns node */
+ if (! MN_IS_TEST_MAILBOX(mailbox))
+ {
+ node = mn_mailbox_xml_node_new(mailbox);
+ xmlAddChild(root, node); /* owns node */
+ }
}
filename = g_build_filename(mn_conf_dot_dir, "mailboxes.xml", NULL);
@@ -540,14 +557,14 @@ class MN:Mailboxes from G:Object
}
private void
- mailbox_notify_poll_h (GObject *object,
- GParamSpec *pspec,
- gpointer user_data)
+ mailbox_notify_manually_checkable_h (GObject *object,
+ GParamSpec *pspec,
+ gpointer user_data)
{
Self *self = user_data;
- /* poll has possibly changed */
- g_object_notify(G_OBJECT(self), "poll");
+ /* manually-checkable has possibly changed */
+ g_object_notify(G_OBJECT(self), "manually-checkable");
}
public void
@@ -559,7 +576,7 @@ class MN:Mailboxes from G:Object
{
MNMailbox *mailbox = l->data;
- if (mn_mailbox_get_poll(mailbox))
+ if (mn_mailbox_get_manually_checkable(mailbox))
mn_mailbox_check(mailbox);
}
}
@@ -577,6 +594,7 @@ class MN:Mailboxes from G:Object
{
self_add_real(self, mailbox);
self_list_changed(self);
+
if (! MN_IS_TEST_MAILBOX(mailbox))
self_save(self);
}
diff --git a/src/mn-mailboxes.h b/src/mn-mailboxes.h
@@ -40,6 +40,7 @@ struct _MNMailboxes {
/*< public >*/
GList * list;
GSList * messages;
+ gboolean must_save_after_load;
/*< private >*/
MNMailboxesPrivate *_priv;
};
@@ -63,9 +64,7 @@ struct _MNMailboxesClass {
* Public methods
*/
GType mn_mailboxes_get_type (void);
-gboolean mn_mailboxes_get_poll (MNMailboxes * self);
-void mn_mailboxes_load (MNMailboxes * self);
-void mn_mailboxes_save (MNMailboxes * self);
+gboolean mn_mailboxes_get_manually_checkable (MNMailboxes * self);
void mn_mailboxes_check (MNMailboxes * self);
void mn_mailboxes_add (MNMailboxes * self,
MNMailbox * mailbox);
@@ -127,9 +126,9 @@ MNMailboxes * mn_mailboxes_new (void);
* Argument wrapping macros
*/
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_MAILBOXES_GET_PROP_POLL(arg) "poll", __extension__ ({gboolean *z = (arg); z;})
+#define MN_MAILBOXES_GET_PROP_MANUALLY_CHECKABLE(arg) "manually_checkable", __extension__ ({gboolean *z = (arg); z;})
#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_MAILBOXES_GET_PROP_POLL(arg) "poll",(gboolean *)(arg)
+#define MN_MAILBOXES_GET_PROP_MANUALLY_CHECKABLE(arg) "manually_checkable",(gboolean *)(arg)
#endif /* __GNUC__ && !__STRICT_ANSI__ */
diff --git a/src/mn-maildir-mailbox-backend.c b/src/mn-maildir-mailbox-backend.c
@@ -33,8 +33,9 @@
#include "mn-vfs.h"
#include "mn-util.h"
#include "mn-message-mime.h"
+#include "mn-maildir-message.h"
-#line 38 "mn-maildir-mailbox-backend.c"
+#line 39 "mn-maildir-mailbox-backend.c"
/* self casting macros */
#define SELF(x) MN_MAILDIR_MAILBOX_BACKEND(x)
#define SELF_CONST(x) MN_MAILDIR_MAILBOX_BACKEND_CONST(x)
@@ -52,20 +53,19 @@ typedef MNMaildirMailboxBackendClass SelfClass;
static void mn_maildir_mailbox_backend_init (MNMaildirMailboxBackend * o) G_GNUC_UNUSED;
static void mn_maildir_mailbox_backend_class_init (MNMaildirMailboxBackendClass * class) G_GNUC_UNUSED;
static void ___2_mn_maildir_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend, const char * info_uri, GnomeVFSMonitorEventType event_type) G_GNUC_UNUSED;
-static gboolean ___3_mn_maildir_mailbox_backend_is (MNVFSMailboxBackend * dummy, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) G_GNUC_UNUSED;
-static void mn_maildir_mailbox_backend_monitor_directory (MNMaildirMailboxBackend * self, unsigned long check_id, const char * dir) G_GNUC_UNUSED;
-static gboolean mn_maildir_mailbox_backend_scan_directory (MNMaildirMailboxBackend * self, unsigned long check_id, const char * dir, gboolean new, GSList ** messages, GError ** err) G_GNUC_UNUSED;
-static void ___6_mn_maildir_mailbox_backend_check (MNVFSMailboxBackend * backend, unsigned long check_id) G_GNUC_UNUSED;
-static int mn_maildir_mailbox_backend_flags_sort_cb (const void * a, const void * b) G_GNUC_UNUSED;
-static gboolean ___8_mn_maildir_mailbox_backend_mark_as_read (MNVFSMailboxBackend * dummy, MNVFSMessage * message, GError ** err) G_GNUC_UNUSED;
+static gboolean mn_maildir_mailbox_backend_dir_exists (MNVFSMailbox * mailbox, const char * name) G_GNUC_UNUSED;
+static gboolean ___4_mn_maildir_mailbox_backend_is (MNVFSMailboxBackend * dummy, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) G_GNUC_UNUSED;
+static void mn_maildir_mailbox_backend_monitor_directory (MNMaildirMailboxBackend * self, int check_id, const char * dir) G_GNUC_UNUSED;
+static gboolean mn_maildir_mailbox_backend_scan_directory (MNMaildirMailboxBackend * self, int check_id, const char * dir, gboolean new, GSList ** messages, GError ** err) G_GNUC_UNUSED;
+static void ___7_mn_maildir_mailbox_backend_check (MNVFSMailboxBackend * backend, int check_id) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static MNVFSMailboxBackendClass *parent_class = NULL;
/* Short form macros */
+#define self_dir_exists mn_maildir_mailbox_backend_dir_exists
#define self_monitor_directory mn_maildir_mailbox_backend_monitor_directory
#define self_scan_directory mn_maildir_mailbox_backend_scan_directory
-#define self_flags_sort_cb mn_maildir_mailbox_backend_flags_sort_cb
GType
mn_maildir_mailbox_backend_get_type (void)
{
@@ -114,7 +114,7 @@ mn_maildir_mailbox_backend_init (MNMaildirMailboxBackend * o G_GNUC_UNUSED)
#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::init"
}
#undef __GOB_FUNCTION__
-#line 42 "mn-maildir-mailbox-backend.gob"
+#line 43 "mn-maildir-mailbox-backend.gob"
static void
mn_maildir_mailbox_backend_class_init (MNMaildirMailboxBackendClass * class G_GNUC_UNUSED)
#line 121 "mn-maildir-mailbox-backend.c"
@@ -124,38 +124,36 @@ mn_maildir_mailbox_backend_class_init (MNMaildirMailboxBackendClass * class G_GN
parent_class = g_type_class_ref (MN_TYPE_VFS_MAILBOX_BACKEND);
-#line 47 "mn-maildir-mailbox-backend.gob"
+#line 48 "mn-maildir-mailbox-backend.gob"
mn_vfs_mailbox_backend_class->monitor_cb = ___2_mn_maildir_mailbox_backend_monitor_cb;
-#line 69 "mn-maildir-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->is = ___3_mn_maildir_mailbox_backend_is;
-#line 190 "mn-maildir-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->check = ___6_mn_maildir_mailbox_backend_check;
-#line 234 "mn-maildir-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->mark_as_read = ___8_mn_maildir_mailbox_backend_mark_as_read;
-#line 136 "mn-maildir-mailbox-backend.c"
+#line 84 "mn-maildir-mailbox-backend.gob"
+ mn_vfs_mailbox_backend_class->is = ___4_mn_maildir_mailbox_backend_is;
+#line 192 "mn-maildir-mailbox-backend.gob"
+ mn_vfs_mailbox_backend_class->check = ___7_mn_maildir_mailbox_backend_check;
+#line 134 "mn-maildir-mailbox-backend.c"
{
-#line 43 "mn-maildir-mailbox-backend.gob"
+#line 44 "mn-maildir-mailbox-backend.gob"
MN_VFS_MAILBOX_BACKEND_CLASS(class)->format = "Maildir";
-#line 142 "mn-maildir-mailbox-backend.c"
+#line 140 "mn-maildir-mailbox-backend.c"
}
}
#undef __GOB_FUNCTION__
-#line 47 "mn-maildir-mailbox-backend.gob"
+#line 48 "mn-maildir-mailbox-backend.gob"
static void
___2_mn_maildir_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend G_GNUC_UNUSED, const char * info_uri, GnomeVFSMonitorEventType event_type)
-#line 152 "mn-maildir-mailbox-backend.c"
+#line 150 "mn-maildir-mailbox-backend.c"
#define PARENT_HANDLER(___backend,___info_uri,___event_type) \
{ if(MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb) \
(* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb)(___backend,___info_uri,___event_type); }
{
#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::monitor_cb"
{
-#line 51 "mn-maildir-mailbox-backend.gob"
+#line 52 "mn-maildir-mailbox-backend.gob"
if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED
|| event_type == GNOME_VFS_MONITOR_EVENT_DELETED
@@ -173,14 +171,42 @@ ___2_mn_maildir_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend G_GNUC
}
}
}}
-#line 177 "mn-maildir-mailbox-backend.c"
+#line 175 "mn-maildir-mailbox-backend.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 69 "mn-maildir-mailbox-backend.gob"
+#line 70 "mn-maildir-mailbox-backend.gob"
+static gboolean
+mn_maildir_mailbox_backend_dir_exists (MNVFSMailbox * mailbox, const char * name)
+#line 182 "mn-maildir-mailbox-backend.c"
+{
+#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::dir_exists"
+#line 70 "mn-maildir-mailbox-backend.gob"
+ g_return_val_if_fail (mailbox != NULL, (gboolean )0);
+#line 70 "mn-maildir-mailbox-backend.gob"
+ g_return_val_if_fail (MN_IS_VFS_MAILBOX (mailbox), (gboolean )0);
+#line 70 "mn-maildir-mailbox-backend.gob"
+ g_return_val_if_fail (name != NULL, (gboolean )0);
+#line 191 "mn-maildir-mailbox-backend.c"
+{
+#line 73 "mn-maildir-mailbox-backend.gob"
+
+ GnomeVFSURI *dir_uri;
+ gboolean exists;
+
+ dir_uri = gnome_vfs_uri_append_path(mailbox->vfs_uri, name);
+ exists = mn_vfs_test(dir_uri, G_FILE_TEST_IS_DIR);
+ gnome_vfs_uri_unref(dir_uri);
+
+ return exists;
+ }}
+#line 204 "mn-maildir-mailbox-backend.c"
+#undef __GOB_FUNCTION__
+
+#line 84 "mn-maildir-mailbox-backend.gob"
static gboolean
-___3_mn_maildir_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox)
-#line 184 "mn-maildir-mailbox-backend.c"
+___4_mn_maildir_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox)
+#line 210 "mn-maildir-mailbox-backend.c"
#define PARENT_HANDLER(___dummy,___class,___mailbox) \
((MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->is)? \
(* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->is)(___dummy,___class,___mailbox): \
@@ -188,45 +214,31 @@ ___3_mn_maildir_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, M
{
#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::is"
{
-#line 73 "mn-maildir-mailbox-backend.gob"
+#line 88 "mn-maildir-mailbox-backend.gob"
- int i;
- static const char *constitutive_dirs[] = { "cur", "new", "tmp" };
- gboolean is = FALSE;
-
- for (i = 0; i < G_N_ELEMENTS(constitutive_dirs); i++)
- {
- GnomeVFSURI *dir_uri;
-
- dir_uri = gnome_vfs_uri_append_path(mailbox->vfs_uri, constitutive_dirs[i]);
- is = mn_vfs_test(dir_uri, G_FILE_TEST_IS_DIR);
- gnome_vfs_uri_unref(dir_uri);
-
- if (! is)
- break;
- }
-
- return is;
+ return self_dir_exists(mailbox, "cur")
+ && self_dir_exists(mailbox, "new")
+ && self_dir_exists(mailbox, "tmp");
}}
-#line 212 "mn-maildir-mailbox-backend.c"
+#line 224 "mn-maildir-mailbox-backend.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 93 "mn-maildir-mailbox-backend.gob"
+#line 94 "mn-maildir-mailbox-backend.gob"
static void
-mn_maildir_mailbox_backend_monitor_directory (MNMaildirMailboxBackend * self, unsigned long check_id, const char * dir)
-#line 219 "mn-maildir-mailbox-backend.c"
+mn_maildir_mailbox_backend_monitor_directory (MNMaildirMailboxBackend * self, int check_id, const char * dir)
+#line 231 "mn-maildir-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::monitor_directory"
-#line 93 "mn-maildir-mailbox-backend.gob"
+#line 94 "mn-maildir-mailbox-backend.gob"
g_return_if_fail (self != NULL);
-#line 93 "mn-maildir-mailbox-backend.gob"
+#line 94 "mn-maildir-mailbox-backend.gob"
g_return_if_fail (MN_IS_MAILDIR_MAILBOX_BACKEND (self));
-#line 93 "mn-maildir-mailbox-backend.gob"
+#line 94 "mn-maildir-mailbox-backend.gob"
g_return_if_fail (dir != NULL);
-#line 228 "mn-maildir-mailbox-backend.c"
+#line 240 "mn-maildir-mailbox-backend.c"
{
-#line 95 "mn-maildir-mailbox-backend.gob"
+#line 96 "mn-maildir-mailbox-backend.gob"
MNVFSMailboxBackend *backend = MN_VFS_MAILBOX_BACKEND(self);
GnomeVFSURI *uri;
@@ -239,26 +251,26 @@ mn_maildir_mailbox_backend_monitor_directory (MNMaildirMailboxBackend * self, un
mn_vfs_mailbox_backend_monitor(backend, check_id, text_uri, GNOME_VFS_MONITOR_DIRECTORY);
g_free(text_uri);
}}
-#line 243 "mn-maildir-mailbox-backend.c"
+#line 255 "mn-maildir-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 108 "mn-maildir-mailbox-backend.gob"
+#line 109 "mn-maildir-mailbox-backend.gob"
static gboolean
-mn_maildir_mailbox_backend_scan_directory (MNMaildirMailboxBackend * self, unsigned long check_id, const char * dir, gboolean new, GSList ** messages, GError ** err)
-#line 249 "mn-maildir-mailbox-backend.c"
+mn_maildir_mailbox_backend_scan_directory (MNMaildirMailboxBackend * self, int check_id, const char * dir, gboolean new, GSList ** messages, GError ** err)
+#line 261 "mn-maildir-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::scan_directory"
-#line 108 "mn-maildir-mailbox-backend.gob"
+#line 109 "mn-maildir-mailbox-backend.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 108 "mn-maildir-mailbox-backend.gob"
+#line 109 "mn-maildir-mailbox-backend.gob"
g_return_val_if_fail (MN_IS_MAILDIR_MAILBOX_BACKEND (self), (gboolean )0);
-#line 108 "mn-maildir-mailbox-backend.gob"
+#line 109 "mn-maildir-mailbox-backend.gob"
g_return_val_if_fail (dir != NULL, (gboolean )0);
-#line 108 "mn-maildir-mailbox-backend.gob"
+#line 109 "mn-maildir-mailbox-backend.gob"
g_return_val_if_fail (messages != NULL, (gboolean )0);
-#line 260 "mn-maildir-mailbox-backend.c"
+#line 272 "mn-maildir-mailbox-backend.c"
{
-#line 115 "mn-maildir-mailbox-backend.gob"
+#line 116 "mn-maildir-mailbox-backend.gob"
MNVFSMailboxBackend *backend = MN_VFS_MAILBOX_BACKEND(self);
GnomeVFSURI *uri;
@@ -306,7 +318,8 @@ mn_maildir_mailbox_backend_scan_directory (MNMaildirMailboxBackend * self, unsig
continue; /* no info, or message seen/trashed: ignore it */
}
- message = mn_vfs_message_new(backend,
+ message = mn_vfs_message_new(MN_TYPE_MAILDIR_MESSAGE,
+ backend,
uri,
file_info->name,
flags,
@@ -333,20 +346,20 @@ mn_maildir_mailbox_backend_scan_directory (MNMaildirMailboxBackend * self, unsig
return FALSE;
}}
-#line 337 "mn-maildir-mailbox-backend.c"
+#line 350 "mn-maildir-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 190 "mn-maildir-mailbox-backend.gob"
+#line 192 "mn-maildir-mailbox-backend.gob"
static void
-___6_mn_maildir_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, unsigned long check_id)
-#line 343 "mn-maildir-mailbox-backend.c"
+___7_mn_maildir_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, int check_id)
+#line 356 "mn-maildir-mailbox-backend.c"
#define PARENT_HANDLER(___backend,___check_id) \
{ if(MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->check) \
(* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->check)(___backend,___check_id); }
{
#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::check"
{
-#line 192 "mn-maildir-mailbox-backend.gob"
+#line 194 "mn-maildir-mailbox-backend.gob"
Self *self = SELF(backend);
GSList *messages = NULL;
@@ -361,7 +374,7 @@ ___6_mn_maildir_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUS
GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
{
if (status)
mn_mailbox_set_messages(MN_MAILBOX(backend->mailbox), messages);
@@ -377,97 +390,6 @@ ___6_mn_maildir_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUS
if (err)
g_error_free(err);
}}
-#line 381 "mn-maildir-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 223 "mn-maildir-mailbox-backend.gob"
-static int
-mn_maildir_mailbox_backend_flags_sort_cb (const void * a, const void * b)
-#line 388 "mn-maildir-mailbox-backend.c"
-{
-#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::flags_sort_cb"
-{
-#line 225 "mn-maildir-mailbox-backend.gob"
-
- char ca = *((char *) a);
- char cb = *((char *) b);
-
- /* sort flags using ASCII order, see http://cr.yp.to/proto/maildir.html */
-
- return ca - cb;
- }}
-#line 401 "mn-maildir-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 234 "mn-maildir-mailbox-backend.gob"
-static gboolean
-___8_mn_maildir_mailbox_backend_mark_as_read (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMessage * message, GError ** err)
-#line 407 "mn-maildir-mailbox-backend.c"
-#define PARENT_HANDLER(___dummy,___message,___err) \
- ((MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->mark_as_read)? \
- (* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->mark_as_read)(___dummy,___message,___err): \
- ((gboolean )0))
-{
-#define __GOB_FUNCTION__ "MN:Maildir:Mailbox:Backend::mark_as_read"
-{
-#line 238 "mn-maildir-mailbox-backend.gob"
-
- char *old_flags;
- char *old_filename;
- char *new_filename;
- GnomeVFSURI *dir_uri;
- GnomeVFSURI *new_uri;
- GnomeVFSResult result;
- gboolean status;
-
- /* http://cr.yp.to/proto/maildir.html */
-
- old_filename = gnome_vfs_uri_extract_short_name(message->vfs_uri);
-
- old_flags = strrchr(old_filename, ',');
- if (old_flags)
- {
- char *new_flags;
- int old_len;
- char *base_filename;
-
- /* append the S (seen) flag */
-
- old_flags++;
- g_assert(strchr(old_flags, 'S') == NULL);
-
- old_len = strlen(old_flags);
- new_flags = g_new(char, old_len + 2); /* + space for S and nul */
- memcpy(new_flags, old_flags, old_len);
- new_flags[old_len] = 'S';
- new_flags[old_len + 1] = 0;
- qsort(new_flags, old_len + 1, sizeof(char), self_flags_sort_cb);
-
- base_filename = g_strndup(old_filename, old_flags - old_filename - 1);
- new_filename = g_strdup_printf("%s,%s", base_filename, new_flags);
- g_free(base_filename);
- g_free(new_flags);
- }
- else
- new_filename = g_strconcat(old_filename, ":2,S", NULL);
-
- g_free(old_filename);
-
- dir_uri = gnome_vfs_uri_append_path(MN_VFS_MAILBOX(MN_MESSAGE(message)->mailbox)->vfs_uri, "cur");
- new_uri = gnome_vfs_uri_append_file_name(dir_uri, new_filename);
- gnome_vfs_uri_unref(dir_uri);
- g_free(new_filename);
-
- result = gnome_vfs_move_uri(message->vfs_uri, new_uri, TRUE);
- status = result == GNOME_VFS_OK;
- if (! status)
- g_set_error(err, 0, 0, "%s", gnome_vfs_result_to_string(result));
-
- gnome_vfs_uri_unref(new_uri);
-
- return status;
- }}
-#line 472 "mn-maildir-mailbox-backend.c"
+#line 394 "mn-maildir-mailbox-backend.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
diff --git a/src/mn-maildir-mailbox-backend.gob b/src/mn-maildir-mailbox-backend.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -35,6 +35,7 @@ requires 2.0.14
#include "mn-vfs.h"
#include "mn-util.h"
#include "mn-message-mime.h"
+#include "mn-maildir-message.h"
%}
class MN:Maildir:Mailbox:Backend from MN:VFS:Mailbox:Backend
@@ -66,32 +67,32 @@ class MN:Maildir:Mailbox:Backend from MN:VFS:Mailbox:Backend
}
}
+ private gboolean
+ dir_exists (MN:VFS:Mailbox *mailbox (check null type),
+ const char *name (check null))
+ {
+ GnomeVFSURI *dir_uri;
+ gboolean exists;
+
+ dir_uri = gnome_vfs_uri_append_path(mailbox->vfs_uri, name);
+ exists = mn_vfs_test(dir_uri, G_FILE_TEST_IS_DIR);
+ gnome_vfs_uri_unref(dir_uri);
+
+ return exists;
+ }
+
override (MN:VFS:Mailbox:Backend) gboolean
is (MNVFSMailboxBackend *dummy,
MNVFSMailboxBackendClass *class,
MNVFSMailbox *mailbox)
{
- int i;
- static const char *constitutive_dirs[] = { "cur", "new", "tmp" };
- gboolean is = FALSE;
-
- for (i = 0; i < G_N_ELEMENTS(constitutive_dirs); i++)
- {
- GnomeVFSURI *dir_uri;
-
- dir_uri = gnome_vfs_uri_append_path(mailbox->vfs_uri, constitutive_dirs[i]);
- is = mn_vfs_test(dir_uri, G_FILE_TEST_IS_DIR);
- gnome_vfs_uri_unref(dir_uri);
-
- if (! is)
- break;
- }
-
- return is;
+ return self_dir_exists(mailbox, "cur")
+ && self_dir_exists(mailbox, "new")
+ && self_dir_exists(mailbox, "tmp");
}
private void
- monitor_directory (self, unsigned long check_id, const char *dir (check null))
+ monitor_directory (self, int check_id, const char *dir (check null))
{
MNVFSMailboxBackend *backend = MN_VFS_MAILBOX_BACKEND(self);
GnomeVFSURI *uri;
@@ -107,7 +108,7 @@ class MN:Maildir:Mailbox:Backend from MN:VFS:Mailbox:Backend
private gboolean
scan_directory (self,
- unsigned long check_id,
+ int check_id,
const char *dir (check null),
gboolean new,
GSList **messages (check null),
@@ -159,7 +160,8 @@ class MN:Maildir:Mailbox:Backend from MN:VFS:Mailbox:Backend
continue; /* no info, or message seen/trashed: ignore it */
}
- message = mn_vfs_message_new(backend,
+ message = mn_vfs_message_new(MN_TYPE_MAILDIR_MESSAGE,
+ backend,
uri,
file_info->name,
flags,
@@ -188,7 +190,7 @@ class MN:Maildir:Mailbox:Backend from MN:VFS:Mailbox:Backend
}
override (MN:VFS:Mailbox:Backend) void
- check (MNVFSMailboxBackend *backend, unsigned long check_id)
+ check (MNVFSMailboxBackend *backend, int check_id)
{
Self *self = SELF(backend);
GSList *messages = NULL;
@@ -203,7 +205,7 @@ class MN:Maildir:Mailbox:Backend from MN:VFS:Mailbox:Backend
GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
{
if (status)
mn_mailbox_set_messages(MN_MAILBOX(backend->mailbox), messages);
@@ -219,76 +221,4 @@ class MN:Maildir:Mailbox:Backend from MN:VFS:Mailbox:Backend
if (err)
g_error_free(err);
}
-
- private int
- flags_sort_cb (const void *a, const void *b)
- {
- char ca = *((char *) a);
- char cb = *((char *) b);
-
- /* sort flags using ASCII order, see http://cr.yp.to/proto/maildir.html */
-
- return ca - cb;
- }
-
- override (MN:VFS:Mailbox:Backend) gboolean
- mark_as_read (MNVFSMailboxBackend *dummy,
- MNVFSMessage *message,
- GError **err)
- {
- char *old_flags;
- char *old_filename;
- char *new_filename;
- GnomeVFSURI *dir_uri;
- GnomeVFSURI *new_uri;
- GnomeVFSResult result;
- gboolean status;
-
- /* http://cr.yp.to/proto/maildir.html */
-
- old_filename = gnome_vfs_uri_extract_short_name(message->vfs_uri);
-
- old_flags = strrchr(old_filename, ',');
- if (old_flags)
- {
- char *new_flags;
- int old_len;
- char *base_filename;
-
- /* append the S (seen) flag */
-
- old_flags++;
- g_assert(strchr(old_flags, 'S') == NULL);
-
- old_len = strlen(old_flags);
- new_flags = g_new(char, old_len + 2); /* + space for S and nul */
- memcpy(new_flags, old_flags, old_len);
- new_flags[old_len] = 'S';
- new_flags[old_len + 1] = 0;
- qsort(new_flags, old_len + 1, sizeof(char), self_flags_sort_cb);
-
- base_filename = g_strndup(old_filename, old_flags - old_filename - 1);
- new_filename = g_strdup_printf("%s,%s", base_filename, new_flags);
- g_free(base_filename);
- g_free(new_flags);
- }
- else
- new_filename = g_strconcat(old_filename, ":2,S", NULL);
-
- g_free(old_filename);
-
- dir_uri = gnome_vfs_uri_append_path(MN_VFS_MAILBOX(MN_MESSAGE(message)->mailbox)->vfs_uri, "cur");
- new_uri = gnome_vfs_uri_append_file_name(dir_uri, new_filename);
- gnome_vfs_uri_unref(dir_uri);
- g_free(new_filename);
-
- result = gnome_vfs_move_uri(message->vfs_uri, new_uri, TRUE);
- status = result == GNOME_VFS_OK;
- if (! status)
- g_set_error(err, 0, 0, "%s", gnome_vfs_result_to_string(result));
-
- gnome_vfs_uri_unref(new_uri);
-
- return status;
- }
}
diff --git a/src/mn-maildir-message-private.h b/src/mn-maildir-message-private.h
@@ -0,0 +1,28 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_MAILDIR_MESSAGE_PRIVATE_H__
+#define __MN_MAILDIR_MESSAGE_PRIVATE_H__
+
+#include "mn-maildir-message.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#line 26 "mn-maildir-message.gob"
+
+#include <gtk/gtk.h>
+
+#line 18 "mn-maildir-message-private.h"
+struct _MNMaildirMessagePrivate {
+#line 41 "mn-maildir-message.gob"
+ GtkWidget * delete_dialog;
+#line 22 "mn-maildir-message-private.h"
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-maildir-message.c b/src/mn-maildir-message.c
@@ -0,0 +1,411 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-maildir-message.h"
+
+#include "mn-maildir-message-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 30 "mn-maildir-message.gob"
+
+#include "config.h"
+#include <glib/gi18n.h>
+#include <eel/eel.h>
+#include "mn-vfs-mailbox.h"
+#include "mn-vfs.h"
+#include "mn-util.h"
+
+#line 35 "mn-maildir-message.c"
+/* self casting macros */
+#define SELF(x) MN_MAILDIR_MESSAGE(x)
+#define SELF_CONST(x) MN_MAILDIR_MESSAGE_CONST(x)
+#define IS_SELF(x) MN_IS_MAILDIR_MESSAGE(x)
+#define TYPE_SELF MN_TYPE_MAILDIR_MESSAGE
+#define SELF_CLASS(x) MN_MAILDIR_MESSAGE_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_MAILDIR_MESSAGE_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNMaildirMessage Self;
+typedef MNMaildirMessageClass SelfClass;
+
+/* here are local prototypes */
+static void mn_maildir_message_init (MNMaildirMessage * o) G_GNUC_UNUSED;
+static void mn_maildir_message_class_init (MNMaildirMessageClass * c) G_GNUC_UNUSED;
+static int mn_maildir_message_flags_sort_cb (const void * a, const void * b) G_GNUC_UNUSED;
+static gboolean ___2_mn_maildir_message_mark_as_read_impl (MNMessage * message, GError ** err) G_GNUC_UNUSED;
+static GnomeVFSURI * mn_maildir_message_get_trash_uri (MNMaildirMessage * self) G_GNUC_UNUSED;
+static gboolean mn_maildir_message_delete_with_prompt (MNMaildirMessage * self, GError ** err, const char * format, ...) G_GNUC_UNUSED;
+static gboolean ___5_mn_maildir_message_delete_impl (MNMessage * message, GError ** err) G_GNUC_UNUSED;
+
+/* pointer to the class of our parent */
+static MNVFSMessageClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_flags_sort_cb mn_maildir_message_flags_sort_cb
+#define self_get_trash_uri mn_maildir_message_get_trash_uri
+#define self_delete_with_prompt mn_maildir_message_delete_with_prompt
+GType
+mn_maildir_message_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNMaildirMessageClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_maildir_message_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNMaildirMessage),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_maildir_message_init,
+ NULL
+ };
+
+ type = g_type_register_static (MN_TYPE_VFS_MESSAGE, "MNMaildirMessage", &info, (GTypeFlags)0);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNMaildirMessage *)g_object_new(mn_maildir_message_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNMaildirMessage * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNMaildirMessage *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNMaildirMessage *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNMaildirMessage *)g_object_new_valist (mn_maildir_message_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+
+static void
+___dispose (GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Maildir:Message::dispose"
+ MNMaildirMessage *self G_GNUC_UNUSED = MN_MAILDIR_MESSAGE (obj_self);
+ if (G_OBJECT_CLASS (parent_class)->dispose) \
+ (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
+#define delete_dialog (self->_priv->delete_dialog)
+#define VAR delete_dialog
+ {
+#line 41 "mn-maildir-message.gob"
+
+ if (VAR != NULL)
+ gtk_dialog_response(GTK_DIALOG(VAR), GTK_RESPONSE_CANCEL);
+ }
+#line 123 "mn-maildir-message.c"
+ memset(&delete_dialog, 0, sizeof(delete_dialog));
+#undef VAR
+#undef delete_dialog
+}
+#undef __GOB_FUNCTION__
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Maildir:Message::finalize"
+ MNMaildirMessage *self G_GNUC_UNUSED = MN_MAILDIR_MESSAGE (obj_self);
+ gpointer priv G_GNUC_UNUSED = self->_priv;
+ if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
+}
+#undef __GOB_FUNCTION__
+
+static void
+mn_maildir_message_init (MNMaildirMessage * o G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Maildir:Message::init"
+ o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_MAILDIR_MESSAGE,MNMaildirMessagePrivate);
+}
+#undef __GOB_FUNCTION__
+static void
+mn_maildir_message_class_init (MNMaildirMessageClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Maildir:Message::class_init"
+ GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+ MNMessageClass *mn_message_class = (MNMessageClass *)c;
+
+ g_type_class_add_private(c,sizeof(MNMaildirMessagePrivate));
+
+ parent_class = g_type_class_ref (MN_TYPE_VFS_MESSAGE);
+
+#line 57 "mn-maildir-message.gob"
+ mn_message_class->mark_as_read_impl = ___2_mn_maildir_message_mark_as_read_impl;
+#line 190 "mn-maildir-message.gob"
+ mn_message_class->delete_impl = ___5_mn_maildir_message_delete_impl;
+#line 164 "mn-maildir-message.c"
+ g_object_class->dispose = ___dispose;
+ g_object_class->finalize = ___finalize;
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 46 "mn-maildir-message.gob"
+static int
+mn_maildir_message_flags_sort_cb (const void * a, const void * b)
+#line 175 "mn-maildir-message.c"
+{
+#define __GOB_FUNCTION__ "MN:Maildir:Message::flags_sort_cb"
+{
+#line 48 "mn-maildir-message.gob"
+
+ char ca = *((char *) a);
+ char cb = *((char *) b);
+
+ /* sort flags using ASCII order, see http://cr.yp.to/proto/maildir.html */
+
+ return ca - cb;
+ }}
+#line 188 "mn-maildir-message.c"
+#undef __GOB_FUNCTION__
+
+#line 57 "mn-maildir-message.gob"
+static gboolean
+___2_mn_maildir_message_mark_as_read_impl (MNMessage * message G_GNUC_UNUSED, GError ** err)
+#line 194 "mn-maildir-message.c"
+#define PARENT_HANDLER(___message,___err) \
+ ((MN_MESSAGE_CLASS(parent_class)->mark_as_read_impl)? \
+ (* MN_MESSAGE_CLASS(parent_class)->mark_as_read_impl)(___message,___err): \
+ ((gboolean )0))
+{
+#define __GOB_FUNCTION__ "MN:Maildir:Message::mark_as_read_impl"
+{
+#line 59 "mn-maildir-message.gob"
+
+ MNVFSMessage *vmessage = MN_VFS_MESSAGE(message);
+ char *old_flags;
+ char *old_filename;
+ char *new_filename;
+ GnomeVFSURI *dir_uri;
+ GnomeVFSURI *new_uri;
+ gboolean status;
+
+ /* http://cr.yp.to/proto/maildir.html */
+
+ old_filename = gnome_vfs_uri_extract_short_name(vmessage->vfs_uri);
+
+ old_flags = strrchr(old_filename, ',');
+ if (old_flags)
+ {
+ char *new_flags;
+ int old_len;
+ char *base_filename;
+
+ /* append the S (seen) flag */
+
+ old_flags++;
+ g_assert(strchr(old_flags, 'S') == NULL);
+
+ old_len = strlen(old_flags);
+ new_flags = g_new(char, old_len + 2); /* + space for S and nul */
+ memcpy(new_flags, old_flags, old_len);
+ new_flags[old_len] = 'S';
+ new_flags[old_len + 1] = 0;
+ qsort(new_flags, old_len + 1, sizeof(char), self_flags_sort_cb);
+
+ base_filename = g_strndup(old_filename, old_flags - old_filename - 1);
+ new_filename = g_strdup_printf("%s,%s", base_filename, new_flags);
+ g_free(base_filename);
+ g_free(new_flags);
+ }
+ else
+ new_filename = g_strconcat(old_filename, ":2,S", NULL);
+
+ g_free(old_filename);
+
+ dir_uri = gnome_vfs_uri_append_path(MN_VFS_MAILBOX(MN_MESSAGE(message)->mailbox)->vfs_uri, "cur");
+ new_uri = gnome_vfs_uri_append_file_name(dir_uri, new_filename);
+ gnome_vfs_uri_unref(dir_uri);
+ g_free(new_filename);
+
+ status = mn_vfs_result_to_g_error(gnome_vfs_move_uri(vmessage->vfs_uri, new_uri, TRUE), err);
+ gnome_vfs_uri_unref(new_uri);
+
+ return status;
+ }}
+#line 255 "mn-maildir-message.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 113 "mn-maildir-message.gob"
+static GnomeVFSURI *
+mn_maildir_message_get_trash_uri (MNMaildirMessage * self)
+#line 262 "mn-maildir-message.c"
+{
+#define __GOB_FUNCTION__ "MN:Maildir:Message::get_trash_uri"
+#line 113 "mn-maildir-message.gob"
+ g_return_val_if_fail (self != NULL, (GnomeVFSURI * )0);
+#line 113 "mn-maildir-message.gob"
+ g_return_val_if_fail (MN_IS_MAILDIR_MESSAGE (self), (GnomeVFSURI * )0);
+#line 269 "mn-maildir-message.c"
+{
+#line 115 "mn-maildir-message.gob"
+
+ MNVFSMessage *vmessage = MN_VFS_MESSAGE(self);
+ GnomeVFSURI *trash_uri;
+
+ /*
+ * Do what is advised in the gnome_vfs_find_directory()
+ * documentation: first pass find_if_needed, then create_if_needed.
+ */
+
+ if (gnome_vfs_find_directory(vmessage->vfs_uri,
+ GNOME_VFS_DIRECTORY_KIND_TRASH,
+ &trash_uri,
+ FALSE,
+ TRUE,
+ 0) == GNOME_VFS_OK)
+ return trash_uri;
+
+ if (gnome_vfs_find_directory(vmessage->vfs_uri,
+ GNOME_VFS_DIRECTORY_KIND_TRASH,
+ &trash_uri,
+ TRUE,
+ FALSE,
+ S_IRUSR | S_IWUSR | S_IXUSR) == GNOME_VFS_OK)
+ return trash_uri;
+
+ return NULL;
+ }}
+#line 299 "mn-maildir-message.c"
+#undef __GOB_FUNCTION__
+
+#line 144 "mn-maildir-message.gob"
+static gboolean
+mn_maildir_message_delete_with_prompt (MNMaildirMessage * self, GError ** err, const char * format, ...)
+#line 305 "mn-maildir-message.c"
+{
+#define __GOB_FUNCTION__ "MN:Maildir:Message::delete_with_prompt"
+#line 144 "mn-maildir-message.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 144 "mn-maildir-message.gob"
+ g_return_val_if_fail (MN_IS_MAILDIR_MESSAGE (self), (gboolean )0);
+#line 312 "mn-maildir-message.c"
+{
+#line 146 "mn-maildir-message.gob"
+
+ MNVFSMessage *vmessage = MN_VFS_MESSAGE(self);
+ GtkWidget *dialog;
+ va_list args;
+ char *prompt;
+ gboolean status;
+
+ g_assert(selfp->delete_dialog == NULL);
+
+ va_start(args, format);
+ prompt = g_strdup_vprintf(format, args);
+ va_end(args);
+
+ selfp->delete_dialog = dialog = mn_alert_dialog_new(NULL,
+ GTK_MESSAGE_WARNING,
+ 0,
+ _("Delete message?"),
+ prompt);
+ g_free(prompt);
+
+ eel_add_weak_pointer(&dialog);
+ eel_add_weak_pointer(&selfp->delete_dialog);
+
+ gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_DELETE, GTK_RESPONSE_OK);
+
+ status = mn_dialog_run_nonmodal(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK;
+
+ /*
+ * At this point @self is no longer valid since it might have been
+ * finalized while the recursive main loop ran in
+ * mn_dialog_run_nonmodal().
+ */
+
+ /* can have been nullified by the weak pointer set above */
+ if (dialog != NULL)
+ gtk_widget_destroy(dialog);
+
+ if (! status)
+ return FALSE;
+
+ return mn_vfs_result_to_g_error(gnome_vfs_unlink_from_uri(vmessage->vfs_uri), err);
+ }}
+#line 358 "mn-maildir-message.c"
+#undef __GOB_FUNCTION__
+
+#line 190 "mn-maildir-message.gob"
+static gboolean
+___5_mn_maildir_message_delete_impl (MNMessage * message G_GNUC_UNUSED, GError ** err)
+#line 364 "mn-maildir-message.c"
+#define PARENT_HANDLER(___message,___err) \
+ ((MN_MESSAGE_CLASS(parent_class)->delete_impl)? \
+ (* MN_MESSAGE_CLASS(parent_class)->delete_impl)(___message,___err): \
+ ((gboolean )0))
+{
+#define __GOB_FUNCTION__ "MN:Maildir:Message::delete_impl"
+{
+#line 192 "mn-maildir-message.gob"
+
+ Self *self = SELF(message);
+ MNVFSMessage *vmessage = MN_VFS_MESSAGE(message);
+ GnomeVFSURI *trash_uri;
+ char *filename;
+ GnomeVFSURI *dest_uri;
+ GnomeVFSResult result;
+
+ trash_uri = self_get_trash_uri(self);
+ if (trash_uri == NULL)
+ return self_delete_with_prompt(self, err, _("The message cannot be moved to the trash. Permanently delete it?"));
+
+ filename = gnome_vfs_uri_extract_short_name(vmessage->vfs_uri);
+ dest_uri = gnome_vfs_uri_append_file_name(trash_uri, filename);
+ gnome_vfs_uri_unref(trash_uri);
+ g_free(filename);
+
+ /*
+ * Use gnome_vfs_xfer_uri() rather than gnome_vfs_move_uri(), in
+ * case the trash resides on a different file system than the
+ * message.
+ */
+ result = gnome_vfs_xfer_uri(vmessage->vfs_uri,
+ dest_uri,
+ GNOME_VFS_XFER_REMOVESOURCE
+ | GNOME_VFS_XFER_FOLLOW_LINKS,
+ GNOME_VFS_XFER_ERROR_MODE_ABORT,
+ GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
+ NULL,
+ NULL);
+ gnome_vfs_uri_unref(dest_uri);
+
+ if (result != GNOME_VFS_OK)
+ return self_delete_with_prompt(self, err, _("The message could not be moved to the trash (%s). Permanently delete it?"), gnome_vfs_result_to_string(result));
+
+ return TRUE;
+ }}
+#line 410 "mn-maildir-message.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
diff --git a/src/mn-maildir-message.gob b/src/mn-maildir-message.gob
@@ -0,0 +1,229 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%headertop{
+#include "mn-vfs-message.h"
+%}
+
+%privateheader{
+#include <gtk/gtk.h>
+%}
+
+%{
+#include "config.h"
+#include <glib/gi18n.h>
+#include <eel/eel.h>
+#include "mn-vfs-mailbox.h"
+#include "mn-vfs.h"
+#include "mn-util.h"
+%}
+
+class MN:Maildir:Message from MN:VFS:Message
+{
+ private GtkWidget *delete_dialog unref {
+ if (VAR != NULL)
+ gtk_dialog_response(GTK_DIALOG(VAR), GTK_RESPONSE_CANCEL);
+ };
+
+ private int
+ flags_sort_cb (const void *a, const void *b)
+ {
+ char ca = *((char *) a);
+ char cb = *((char *) b);
+
+ /* sort flags using ASCII order, see http://cr.yp.to/proto/maildir.html */
+
+ return ca - cb;
+ }
+
+ override (MN:Message) gboolean
+ mark_as_read_impl (MNMessage *message, GError **err)
+ {
+ MNVFSMessage *vmessage = MN_VFS_MESSAGE(message);
+ char *old_flags;
+ char *old_filename;
+ char *new_filename;
+ GnomeVFSURI *dir_uri;
+ GnomeVFSURI *new_uri;
+ gboolean status;
+
+ /* http://cr.yp.to/proto/maildir.html */
+
+ old_filename = gnome_vfs_uri_extract_short_name(vmessage->vfs_uri);
+
+ old_flags = strrchr(old_filename, ',');
+ if (old_flags)
+ {
+ char *new_flags;
+ int old_len;
+ char *base_filename;
+
+ /* append the S (seen) flag */
+
+ old_flags++;
+ g_assert(strchr(old_flags, 'S') == NULL);
+
+ old_len = strlen(old_flags);
+ new_flags = g_new(char, old_len + 2); /* + space for S and nul */
+ memcpy(new_flags, old_flags, old_len);
+ new_flags[old_len] = 'S';
+ new_flags[old_len + 1] = 0;
+ qsort(new_flags, old_len + 1, sizeof(char), self_flags_sort_cb);
+
+ base_filename = g_strndup(old_filename, old_flags - old_filename - 1);
+ new_filename = g_strdup_printf("%s,%s", base_filename, new_flags);
+ g_free(base_filename);
+ g_free(new_flags);
+ }
+ else
+ new_filename = g_strconcat(old_filename, ":2,S", NULL);
+
+ g_free(old_filename);
+
+ dir_uri = gnome_vfs_uri_append_path(MN_VFS_MAILBOX(MN_MESSAGE(message)->mailbox)->vfs_uri, "cur");
+ new_uri = gnome_vfs_uri_append_file_name(dir_uri, new_filename);
+ gnome_vfs_uri_unref(dir_uri);
+ g_free(new_filename);
+
+ status = mn_vfs_result_to_g_error(gnome_vfs_move_uri(vmessage->vfs_uri, new_uri, TRUE), err);
+ gnome_vfs_uri_unref(new_uri);
+
+ return status;
+ }
+
+ /* returns NULL if not supported for the volume where the file resides */
+ private GnomeVFSURI *
+ get_trash_uri (self)
+ {
+ MNVFSMessage *vmessage = MN_VFS_MESSAGE(self);
+ GnomeVFSURI *trash_uri;
+
+ /*
+ * Do what is advised in the gnome_vfs_find_directory()
+ * documentation: first pass find_if_needed, then create_if_needed.
+ */
+
+ if (gnome_vfs_find_directory(vmessage->vfs_uri,
+ GNOME_VFS_DIRECTORY_KIND_TRASH,
+ &trash_uri,
+ FALSE,
+ TRUE,
+ 0) == GNOME_VFS_OK)
+ return trash_uri;
+
+ if (gnome_vfs_find_directory(vmessage->vfs_uri,
+ GNOME_VFS_DIRECTORY_KIND_TRASH,
+ &trash_uri,
+ TRUE,
+ FALSE,
+ S_IRUSR | S_IWUSR | S_IXUSR) == GNOME_VFS_OK)
+ return trash_uri;
+
+ return NULL;
+ }
+
+ /* If the users selects Cancel, returns FALSE without setting @err. */
+ private gboolean
+ delete_with_prompt (self, GError **err, const char *format, ...)
+ {
+ MNVFSMessage *vmessage = MN_VFS_MESSAGE(self);
+ GtkWidget *dialog;
+ va_list args;
+ char *prompt;
+ gboolean status;
+
+ g_assert(selfp->delete_dialog == NULL);
+
+ va_start(args, format);
+ prompt = g_strdup_vprintf(format, args);
+ va_end(args);
+
+ selfp->delete_dialog = dialog = mn_alert_dialog_new(NULL,
+ GTK_MESSAGE_WARNING,
+ 0,
+ _("Delete message?"),
+ prompt);
+ g_free(prompt);
+
+ eel_add_weak_pointer(&dialog);
+ eel_add_weak_pointer(&selfp->delete_dialog);
+
+ gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_DELETE, GTK_RESPONSE_OK);
+
+ status = mn_dialog_run_nonmodal(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK;
+
+ /*
+ * At this point @self is no longer valid since it might have been
+ * finalized while the recursive main loop ran in
+ * mn_dialog_run_nonmodal().
+ */
+
+ /* can have been nullified by the weak pointer set above */
+ if (dialog != NULL)
+ gtk_widget_destroy(dialog);
+
+ if (! status)
+ return FALSE;
+
+ return mn_vfs_result_to_g_error(gnome_vfs_unlink_from_uri(vmessage->vfs_uri), err);
+ }
+
+ override (MN:Message) gboolean
+ delete_impl (MNMessage *message, GError **err)
+ {
+ Self *self = SELF(message);
+ MNVFSMessage *vmessage = MN_VFS_MESSAGE(message);
+ GnomeVFSURI *trash_uri;
+ char *filename;
+ GnomeVFSURI *dest_uri;
+ GnomeVFSResult result;
+
+ trash_uri = self_get_trash_uri(self);
+ if (trash_uri == NULL)
+ return self_delete_with_prompt(self, err, _("The message cannot be moved to the trash. Permanently delete it?"));
+
+ filename = gnome_vfs_uri_extract_short_name(vmessage->vfs_uri);
+ dest_uri = gnome_vfs_uri_append_file_name(trash_uri, filename);
+ gnome_vfs_uri_unref(trash_uri);
+ g_free(filename);
+
+ /*
+ * Use gnome_vfs_xfer_uri() rather than gnome_vfs_move_uri(), in
+ * case the trash resides on a different file system than the
+ * message.
+ */
+ result = gnome_vfs_xfer_uri(vmessage->vfs_uri,
+ dest_uri,
+ GNOME_VFS_XFER_REMOVESOURCE
+ | GNOME_VFS_XFER_FOLLOW_LINKS,
+ GNOME_VFS_XFER_ERROR_MODE_ABORT,
+ GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
+ NULL,
+ NULL);
+ gnome_vfs_uri_unref(dest_uri);
+
+ if (result != GNOME_VFS_OK)
+ return self_delete_with_prompt(self, err, _("The message could not be moved to the trash (%s). Permanently delete it?"), gnome_vfs_result_to_string(result));
+
+ return TRUE;
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-maildir-message.gob.stamp
diff --git a/src/mn-maildir-message.h b/src/mn-maildir-message.h
@@ -0,0 +1,62 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include "mn-vfs-message.h"
+
+#ifndef __MN_MAILDIR_MESSAGE_H__
+#define __MN_MAILDIR_MESSAGE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_MAILDIR_MESSAGE (mn_maildir_message_get_type())
+#define MN_MAILDIR_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_maildir_message_get_type(), MNMaildirMessage)
+#define MN_MAILDIR_MESSAGE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_maildir_message_get_type(), MNMaildirMessage const)
+#define MN_MAILDIR_MESSAGE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_maildir_message_get_type(), MNMaildirMessageClass)
+#define MN_IS_MAILDIR_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_maildir_message_get_type ())
+
+#define MN_MAILDIR_MESSAGE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_maildir_message_get_type(), MNMaildirMessageClass)
+
+/* Private structure type */
+typedef struct _MNMaildirMessagePrivate MNMaildirMessagePrivate;
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_MAILDIR_MESSAGE__
+#define __TYPEDEF_MN_MAILDIR_MESSAGE__
+typedef struct _MNMaildirMessage MNMaildirMessage;
+#endif
+struct _MNMaildirMessage {
+ MNVFSMessage __parent__;
+ /*< private >*/
+ MNMaildirMessagePrivate *_priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNMaildirMessageClass MNMaildirMessageClass;
+struct _MNMaildirMessageClass {
+ MNVFSMessageClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_maildir_message_get_type (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-main.c b/src/mn-main.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -30,7 +30,12 @@
#endif
#if WITH_MBOX || WITH_MOZILLA || WITH_MH || WITH_MAILDIR || WITH_SYLPHEED
#include "mn-vfs-mailbox.h"
-#include "mn-vfs-message.h"
+#endif
+#if WITH_MAILDIR
+#include "mn-maildir-message.h"
+#endif
+#if WITH_SYLPHEED
+#include "mn-sylpheed-message.h"
#endif
#if WITH_EVOLUTION
#include "mn-bonobo-unknown.h"
@@ -114,30 +119,28 @@ static void
mn_main_print_version (void)
{
/*
- * Here and everywhere else, we order the backends by descending
- * order of (believed) popularity.
+ * Here and everywhere else, backends and features are sorted
+ * alphabetically.
*/
static const Component mailbox_backends[] = {
- { "mbox", WITH_MBOX },
- { "mh", WITH_MH },
- { "Maildir", WITH_MAILDIR },
- { "POP3", WITH_POP3 },
- { "IMAP", WITH_IMAP },
- { "Gmail", WITH_GMAIL },
{ "Evolution", WITH_EVOLUTION },
+ { "Gmail", WITH_GMAIL },
+ { "IMAP", WITH_IMAP },
+ { "Maildir", WITH_MAILDIR },
+ { "mbox", WITH_MBOX },
+ { "MH", WITH_MH },
{ "Mozilla products", WITH_MOZILLA },
- { "Sylpheed", WITH_SYLPHEED }
+ { "POP3", WITH_POP3 },
+ { "Sylpheed", WITH_SYLPHEED },
+ { "Windows Live Hotmail", WITH_HOTMAIL },
+ { "Yahoo! Mail", WITH_YAHOO }
};
static const Component pi_features[] = {
- { "SSL/TLS", WITH_SSL },
+ { "IPv6", WITH_IPV6 },
{ "SASL", WITH_SASL },
- { "IPv6", WITH_IPV6 }
- };
-
- static const Component sylpheed_features[] = {
- { ".sylpheed_mark locking", WITH_SYLPHEED_LOCKING }
+ { "SSL/TLS", WITH_SSL }
};
g_print(_("%s version %s\n"), _("Mail Notification"), VERSION);
@@ -152,11 +155,6 @@ mn_main_print_version (void)
g_print(_("POP3 and IMAP features:\n"));
mn_main_print_components(pi_features, G_N_ELEMENTS(pi_features));
-
- g_print("\n");
-
- g_print(_("Sylpheed features:\n"));
- mn_main_print_components(sylpheed_features, G_N_ELEMENTS(sylpheed_features));
}
static void
@@ -183,7 +181,12 @@ mn_main_init_classes (void)
#if WITH_MBOX || WITH_MOZILLA || WITH_MH || WITH_MAILDIR || WITH_SYLPHEED
for (i = 0; mn_vfs_mailbox_backend_types[i]; i++)
g_type_class_ref(mn_vfs_mailbox_backend_types[i]);
- g_type_class_ref(MN_TYPE_VFS_MESSAGE);
+#endif
+#if WITH_MAILDIR
+ g_type_class_ref(MN_TYPE_MAILDIR_MESSAGE);
+#endif
+#if WITH_SYLPHEED
+ g_type_class_ref(MN_TYPE_SYLPHEED_MESSAGE);
#endif
#if WITH_EVOLUTION
g_type_class_ref(MN_TYPE_BONOBO_UNKNOWN);
@@ -254,6 +257,7 @@ main (int argc, char **argv)
gboolean arg_version = FALSE;
gboolean arg_display_properties = FALSE;
gboolean arg_display_about = FALSE;
+ gboolean arg_consider_new_mail_as_read = FALSE;
gboolean arg_update = FALSE;
gboolean arg_print_summary = FALSE;
gboolean arg_unset_obsolete_configuration = FALSE;
@@ -296,6 +300,15 @@ main (int argc, char **argv)
NULL
},
{
+ "consider-new-mail-as-read",
+ 'r',
+ 0,
+ G_OPTION_ARG_NONE,
+ &arg_consider_new_mail_as_read,
+ N_("Consider new mail as read"),
+ NULL
+ },
+ {
"update",
'u',
0,
@@ -481,6 +494,11 @@ main (int argc, char **argv)
if (result == Bonobo_ACTIVATION_REG_ALREADY_ACTIVE)
{
+ if (arg_consider_new_mail_as_read)
+ {
+ g_message(_("considering new mail as read"));
+ AUTOMATION_METHOD(considerNewMailAsRead);
+ }
if (arg_update)
{
g_message(_("updating the mail status"));
@@ -497,12 +515,15 @@ main (int argc, char **argv)
if (! (display_properties
|| arg_display_about
+ || arg_consider_new_mail_as_read
|| arg_update
|| arg_print_summary))
g_message(_("Mail Notification is already running"));
}
else
{
+ if (arg_consider_new_mail_as_read)
+ mn_main_report_option_ignored("--consider-new-mail-as-read");
if (arg_update)
mn_main_report_option_ignored("--update");
if (arg_print_summary)
diff --git a/src/mn-mbox-mailbox-backend.gob b/src/mn-mbox-mailbox-backend.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-md5.c b/src/mn-md5.c
@@ -1,351 +1,358 @@
/*
- * mn-md5.c - RSA Data Security, Inc., MD5 message-digest algorithm
+ * MD5 message digest implementation, taken from glibc and edited for
+ * style.
*
- * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- * rights reserved.
+ * The GNU C Library,
+ * Copyright (C) 1995,1996,1997,1999,2000,2001,2005
+ * Free Software Foundation, Inc.
*
- * License to copy and use this software is granted provided that it
- * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- * Algorithm" in all material mentioning or referencing this software
- * or this function.
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
*
- * License is also granted to make and use derivative works provided
- * that such works are identified as "derived from the RSA Data
- * Security, Inc. MD5 Message-Digest Algorithm" in all material
- * mentioning or referencing the derived work.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
*
- * RSA Data Security, Inc. makes no representations concerning either
- * the merchantability of this software or the suitability of this
- * software for any particular purpose. It is provided "as is"
- * without express or implied warranty of any kind.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * These notices must be retained in any copies of any part of this
- * documentation and/or software.
- *
- * This code is the same as the code published by RSA Inc. It has been
- * edited for clarity and style only.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <stdint.h>
+#include "config.h"
+#include <sys/types.h>
#include <string.h>
-#include <glib.h>
#include "mn-md5.h"
-/*** cpp *********************************************************************/
+#ifdef WORDS_BIGENDIAN
+# define SWAP(n) \
+ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
+#else
+# define SWAP(n) (n)
+#endif
-#if defined(i386) || defined(__i386) || defined(__i386__)
-#define mn_md5_encode memcpy
-#define mn_md5_decode memcpy
-#else /* i386 || __i386 || __i386__ */
-/*
- * Encodes input (uint32_t) into output (unsigned char). Assumes len
- * is a multiple of 4.
- */
-static void
-mn_md5_encode (unsigned char *output, uint32_t *input, unsigned int len)
-{
- unsigned int i, j;
+#define HEXCHARS "0123456789abcdef"
- for (i = 0, j = 0; j < len; i++, j += 4)
- {
- output[j] = (unsigned char) (input[i] & 0xff);
- output[j+1] = (unsigned char) ((input[i] >> 8) & 0xff);
- output[j+2] = (unsigned char) ((input[i] >> 16) & 0xff);
- output[j+3] = (unsigned char) ((input[i] >> 24) & 0xff);
- }
-}
+/* This array contains the bytes used to pad the buffer to the next
+ 64-byte boundary. (RFC 1321, 3.1: Step 1) */
+static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
-/*
- * Decodes input (unsigned char) into output (uint32_t). Assumes len
- * is a multiple of 4.
- */
-static void
-mn_md5_decode (uint32_t *output, const unsigned char *input, unsigned int len)
+
+/* Initialize structure containing state of computation.
+ (RFC 1321, 3.3: Step 3) */
+void
+mn_md5_init_ctx (MNMD5Context *ctx)
{
- unsigned int i, j;
+ ctx->A = 0x67452301;
+ ctx->B = 0xefcdab89;
+ ctx->C = 0x98badcfe;
+ ctx->D = 0x10325476;
- for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((uint32_t) input[j]) | (((uint32_t) input[j + 1]) << 8) |
- (((uint32_t) input[j + 2]) << 16) | (((uint32_t) input[j + 3]) << 24);
+ ctx->total[0] = ctx->total[1] = 0;
+ ctx->buflen = 0;
}
-#endif /* i386 || __i386 || __i386__ */
-
-/* F, G, H and I are basic MD5 functions */
-#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
-#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define I(x, y, z) ((y) ^ ((x) | (~z)))
-
-/* ROTATE_LEFT rotates x left n bits */
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
-/*
- * FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
- * Rotation is separate from addition to prevent recomputation.
- */
-#define FF(a, b, c, d, x, s, ac) { \
- (a) += F((b), (c), (d)) + (x) + (uint32_t) (ac); \
- (a) = ROTATE_LEFT((a), (s)); \
- (a) += (b); \
- }
-#define GG(a, b, c, d, x, s, ac) { \
- (a) += G((b), (c), (d)) + (x) + (uint32_t) (ac); \
- (a) = ROTATE_LEFT((a), (s)); \
- (a) += (b); \
- }
-#define HH(a, b, c, d, x, s, ac) { \
- (a) += H((b), (c), (d)) + (x) + (uint32_t) (ac); \
- (a) = ROTATE_LEFT((a), (s)); \
- (a) += (b); \
- }
-#define II(a, b, c, d, x, s, ac) { \
- (a) += I((b), (c), (d)) + (x) + (uint32_t) (ac); \
- (a) = ROTATE_LEFT((a), (s)); \
- (a) += (b); \
- }
-
-#define LENGTH 16
-
-/*** variables ***************************************************************/
-
-static unsigned char PADDING[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-/*** functions ***************************************************************/
-
-static void mn_md5_transform (uint32_t state[4], const unsigned char block[64]);
-
-/*** implementation **********************************************************/
+/* Put result from CTX in first 16 bytes following RESBUF. The result
+ must be in little endian byte order.
-/*
- * MD5 initialization. Begins an MD5 operation, writing a new context.
- */
-void
-mn_md5_init (MNMD5Context *context)
+ IMPORTANT: On some systems it is required that RESBUF is correctly
+ aligned for a 32 bits value. */
+void *
+mn_md5_read_ctx (MNMD5Context *ctx, void *resbuf)
{
- g_return_if_fail(context != NULL);
-
- context->count[0] = context->count[1] = 0;
+ ((uint32_t *) resbuf)[0] = SWAP (ctx->A);
+ ((uint32_t *) resbuf)[1] = SWAP (ctx->B);
+ ((uint32_t *) resbuf)[2] = SWAP (ctx->C);
+ ((uint32_t *) resbuf)[3] = SWAP (ctx->D);
- /* load magic initialization constants */
- context->state[0] = 0x67452301;
- context->state[1] = 0xefcdab89;
- context->state[2] = 0x98badcfe;
- context->state[3] = 0x10325476;
+ return resbuf;
}
-/*
- * MD5 block update operation. Continues an MD5 message-digest
- * operation, processing another message block, and updating the
- * context.
- */
-void
-mn_md5_update (MNMD5Context *context,
- const unsigned char *buf,
- unsigned int len)
+/* Process the remaining bytes in the internal buffer and the usual
+ prolog according to the standard and write the result to RESBUF.
+
+ IMPORTANT: On some systems it is required that RESBUF is correctly
+ aligned for a 32 bits value. */
+void *
+mn_md5_finish_ctx (MNMD5Context *ctx, unsigned char resbuf[16])
{
- unsigned int i;
- unsigned int index;
- unsigned int part_len;
+ /* Take yet unprocessed bytes into account. */
+ uint32_t bytes = ctx->buflen;
+ size_t pad;
- g_return_if_fail(context != NULL);
- g_return_if_fail(buf != NULL);
+ /* Now count remaining bytes. */
+ ctx->total[0] += bytes;
+ if (ctx->total[0] < bytes)
+ ++ctx->total[1];
- /* compute number of bytes mod 64 */
- index = (unsigned int) ((context->count[0] >> 3) & 0x3F);
+ pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes;
+ memcpy (&ctx->buffer[bytes], fillbuf, pad);
- /* update number of bits */
- if ((context->count[0] += ((uint32_t) len << 3)) < ((uint32_t) len << 3))
- context->count[1]++;
- context->count[1] += ((uint32_t) len >> 29);
+ /* Put the 64-bit file length in *bits* at the end of the buffer. */
+ *(uint32_t *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
+ *(uint32_t *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
+ (ctx->total[0] >> 29));
- part_len = 64 - index;
+ /* Process last bytes. */
+ mn_md5_process_block (ctx, ctx->buffer, bytes + pad + 8);
- /* transform as many times as possible */
- if (len >= part_len)
- {
- memcpy(&context->buffer[index], buf, part_len);
- mn_md5_transform(context->state, context->buffer);
+ return mn_md5_read_ctx (ctx, resbuf);
+}
- for (i = part_len; i + 63 < len; i += 64)
- mn_md5_transform(context->state, &buf[i]);
+void
+mn_md5_to_hex (const unsigned char resbuf[16], char hexbuf[33])
+{
+ int i;
- index = 0;
+ for (i = 0; i < 16; i++)
+ {
+ hexbuf[i * 2] = HEXCHARS[resbuf[i] >> 4];
+ hexbuf[i * 2 + 1] = HEXCHARS[resbuf[i] & 0xf];
}
- else
- i = 0;
- /* buffer remaining input */
- memcpy(&context->buffer[index], &buf[i], len - i);
+ hexbuf[32] = 0;
}
-/*
- * MD5 padding. Adds padding followed by original length.
- */
void
-mn_md5_pad (MNMD5Context *context)
+mn_md5_process_bytes (MNMD5Context *ctx, const void *buffer, size_t len)
{
- unsigned char bits[8];
- unsigned int index, pad_len;
-
- g_return_if_fail(context != NULL);
-
- /* Save number of bits */
- mn_md5_encode(bits, context->count, 8);
+ /* When we already have some bits in our internal buffer concatenate
+ both inputs first. */
+ if (ctx->buflen != 0)
+ {
+ size_t left_over = ctx->buflen;
+ size_t add = 128 - left_over > len ? len : 128 - left_over;
- /* Pad out to 56 mod 64. */
- index = (unsigned int) ((context->count[0] >> 3) & 0x3f);
- pad_len = (index < 56) ? (56 - index) : (120 - index);
- mn_md5_update(context, PADDING, pad_len);
+ memcpy (&ctx->buffer[left_over], buffer, add);
+ ctx->buflen += add;
- /* Append length (before padding) */
- mn_md5_update(context, bits, 8);
-}
+ if (ctx->buflen > 64)
+ {
+ mn_md5_process_block (ctx, ctx->buffer, ctx->buflen & ~63);
-/*
- * MD5 finalization. Ends an MD5 message-digest operation, writing the
- * the message digest and zeroizing the context.
- */
-void
-mn_md5_final (unsigned char digest[16], MNMD5Context *context)
-{
- g_return_if_fail(context != NULL);
+ ctx->buflen &= 63;
+ /* The regions in the following copy operation cannot overlap. */
+ memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63],
+ ctx->buflen);
+ }
- /* do padding */
- mn_md5_pad(context);
+ buffer = (const char *) buffer + add;
+ len -= add;
+ }
- /* store state in digest */
- mn_md5_encode(digest, context->state, 16);
+ /* Process available complete blocks. */
+ if (len >= 64)
+ {
+#ifndef STRING_ARCH_UNALIGNED
+/* To check alignment gcc has an appropriate operator. Other
+ compilers don't. */
+# if __GNUC__ >= 2
+# define UNALIGNED_P(p) (((uintptr_t) p) % __alignof__ (uint32_t) != 0)
+# else
+# define UNALIGNED_P(p) (((uintptr_t) p) % sizeof (uint32_t) != 0)
+# endif
+ if (UNALIGNED_P (buffer))
+ while (len > 64)
+ {
+ mn_md5_process_block (ctx, memcpy (ctx->buffer, buffer, 64), 64);
+ buffer = (const char *) buffer + 64;
+ len -= 64;
+ }
+ else
+#endif
+ {
+ mn_md5_process_block (ctx, buffer, len & ~63);
+ buffer = (const char *) buffer + (len & ~63);
+ len &= 63;
+ }
+ }
- /* zeroize sensitive information. */
- memset(context, 0, sizeof(*context));
+ /* Move remaining bytes in internal buffer. */
+ if (len > 0)
+ {
+ size_t left_over = ctx->buflen;
+
+ memcpy (&ctx->buffer[left_over], buffer, len);
+ left_over += len;
+ if (left_over >= 64)
+ {
+ mn_md5_process_block (ctx, ctx->buffer, 64);
+ left_over -= 64;
+ memcpy (ctx->buffer, &ctx->buffer[64], left_over);
+ }
+ ctx->buflen = left_over;
+ }
}
-char *
-mn_md5_end (MNMD5Context *context, char *buf)
-{
- int i;
- unsigned char digest[LENGTH];
- static const char hex[] = "0123456789abcdef";
- if (! buf)
- buf = g_malloc(2 * LENGTH + 1);
+/* These are the four functions used in the four steps of the MD5 algorithm
+ and defined in the RFC 1321. The first function is a little bit optimized
+ (as found in Colin Plumbs public domain implementation). */
+/* #define FF(b, c, d) ((b & c) | (~b & d)) */
+#define FF(b, c, d) (d ^ (b & (c ^ d)))
+#define FG(b, c, d) FF (d, b, c)
+#define FH(b, c, d) (b ^ c ^ d)
+#define FI(b, c, d) (c ^ (b | ~d))
- mn_md5_final(digest, context);
+/* Process LEN bytes of BUFFER, accumulating context into CTX.
+ It is assumed that LEN % 64 == 0. */
- for (i = 0; i < LENGTH; i++)
+void
+mn_md5_process_block (MNMD5Context *ctx, const void *buffer, size_t len)
+{
+ uint32_t correct_words[16];
+ const uint32_t *words = buffer;
+ size_t nwords = len / sizeof (uint32_t);
+ const uint32_t *endp = words + nwords;
+ uint32_t A = ctx->A;
+ uint32_t B = ctx->B;
+ uint32_t C = ctx->C;
+ uint32_t D = ctx->D;
+
+ /* First increment the byte count. RFC 1321 specifies the possible
+ length of the file up to 2^64 bits. Here we only compute the
+ number of bytes. Do a double word increment. */
+ ctx->total[0] += len;
+ if (ctx->total[0] < len)
+ ++ctx->total[1];
+
+ /* Process all bytes in the buffer with 64 bytes in each round of
+ the loop. */
+ while (words < endp)
{
- buf[i + i] = hex[digest[i] >> 4];
- buf[i + i +1] = hex[digest[i] & 0x0f];
- }
- buf[i + i] = '\0';
-
- return buf;
-}
+ uint32_t *cwp = correct_words;
+ uint32_t A_save = A;
+ uint32_t B_save = B;
+ uint32_t C_save = C;
+ uint32_t D_save = D;
+
+ /* First round: using the given function, the context and a constant
+ the next context is computed. Because the algorithms processing
+ unit is a 32-bit word and it is determined to work on words in
+ little endian byte order we perhaps have to change the byte order
+ before the computation. To reduce the work for the next steps
+ we store the swapped words in the array CORRECT_WORDS. */
+
+#define OP(a, b, c, d, s, T) \
+ do \
+ { \
+ a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T; \
+ ++words; \
+ CYCLIC (a, s); \
+ a += b; \
+ } \
+ while (0)
+
+ /* It is unfortunate that C does not provide an operator for
+ cyclic rotation. Hope the C compiler is smart enough. */
+#define CYCLIC(w, s) (w = (w << s) | (w >> (32 - s)))
+
+ /* Before we start, one word to the strange constants.
+ They are defined in RFC 1321 as
+
+ T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64
+ */
+
+ /* Round 1. */
+ OP (A, B, C, D, 7, 0xd76aa478);
+ OP (D, A, B, C, 12, 0xe8c7b756);
+ OP (C, D, A, B, 17, 0x242070db);
+ OP (B, C, D, A, 22, 0xc1bdceee);
+ OP (A, B, C, D, 7, 0xf57c0faf);
+ OP (D, A, B, C, 12, 0x4787c62a);
+ OP (C, D, A, B, 17, 0xa8304613);
+ OP (B, C, D, A, 22, 0xfd469501);
+ OP (A, B, C, D, 7, 0x698098d8);
+ OP (D, A, B, C, 12, 0x8b44f7af);
+ OP (C, D, A, B, 17, 0xffff5bb1);
+ OP (B, C, D, A, 22, 0x895cd7be);
+ OP (A, B, C, D, 7, 0x6b901122);
+ OP (D, A, B, C, 12, 0xfd987193);
+ OP (C, D, A, B, 17, 0xa679438e);
+ OP (B, C, D, A, 22, 0x49b40821);
+
+ /* For the second to fourth round we have the possibly swapped words
+ in CORRECT_WORDS. Redefine the macro to take an additional first
+ argument specifying the function to use. */
+#undef OP
+#define OP(f, a, b, c, d, k, s, T) \
+ do \
+ { \
+ a += f (b, c, d) + correct_words[k] + T; \
+ CYCLIC (a, s); \
+ a += b; \
+ } \
+ while (0)
+
+ /* Round 2. */
+ OP (FG, A, B, C, D, 1, 5, 0xf61e2562);
+ OP (FG, D, A, B, C, 6, 9, 0xc040b340);
+ OP (FG, C, D, A, B, 11, 14, 0x265e5a51);
+ OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa);
+ OP (FG, A, B, C, D, 5, 5, 0xd62f105d);
+ OP (FG, D, A, B, C, 10, 9, 0x02441453);
+ OP (FG, C, D, A, B, 15, 14, 0xd8a1e681);
+ OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8);
+ OP (FG, A, B, C, D, 9, 5, 0x21e1cde6);
+ OP (FG, D, A, B, C, 14, 9, 0xc33707d6);
+ OP (FG, C, D, A, B, 3, 14, 0xf4d50d87);
+ OP (FG, B, C, D, A, 8, 20, 0x455a14ed);
+ OP (FG, A, B, C, D, 13, 5, 0xa9e3e905);
+ OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8);
+ OP (FG, C, D, A, B, 7, 14, 0x676f02d9);
+ OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a);
+
+ /* Round 3. */
+ OP (FH, A, B, C, D, 5, 4, 0xfffa3942);
+ OP (FH, D, A, B, C, 8, 11, 0x8771f681);
+ OP (FH, C, D, A, B, 11, 16, 0x6d9d6122);
+ OP (FH, B, C, D, A, 14, 23, 0xfde5380c);
+ OP (FH, A, B, C, D, 1, 4, 0xa4beea44);
+ OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9);
+ OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60);
+ OP (FH, B, C, D, A, 10, 23, 0xbebfbc70);
+ OP (FH, A, B, C, D, 13, 4, 0x289b7ec6);
+ OP (FH, D, A, B, C, 0, 11, 0xeaa127fa);
+ OP (FH, C, D, A, B, 3, 16, 0xd4ef3085);
+ OP (FH, B, C, D, A, 6, 23, 0x04881d05);
+ OP (FH, A, B, C, D, 9, 4, 0xd9d4d039);
+ OP (FH, D, A, B, C, 12, 11, 0xe6db99e5);
+ OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8);
+ OP (FH, B, C, D, A, 2, 23, 0xc4ac5665);
+
+ /* Round 4. */
+ OP (FI, A, B, C, D, 0, 6, 0xf4292244);
+ OP (FI, D, A, B, C, 7, 10, 0x432aff97);
+ OP (FI, C, D, A, B, 14, 15, 0xab9423a7);
+ OP (FI, B, C, D, A, 5, 21, 0xfc93a039);
+ OP (FI, A, B, C, D, 12, 6, 0x655b59c3);
+ OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92);
+ OP (FI, C, D, A, B, 10, 15, 0xffeff47d);
+ OP (FI, B, C, D, A, 1, 21, 0x85845dd1);
+ OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f);
+ OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0);
+ OP (FI, C, D, A, B, 6, 15, 0xa3014314);
+ OP (FI, B, C, D, A, 13, 21, 0x4e0811a1);
+ OP (FI, A, B, C, D, 4, 6, 0xf7537e82);
+ OP (FI, D, A, B, C, 11, 10, 0xbd3af235);
+ OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb);
+ OP (FI, B, C, D, A, 9, 21, 0xeb86d391);
+
+ /* Add the starting values of the context. */
+ A += A_save;
+ B += B_save;
+ C += C_save;
+ D += D_save;
+ }
-static void
-mn_md5_transform (uint32_t state[4], const unsigned char block[64])
-{
- uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-
- mn_md5_decode(x, block, 64);
-
- /* Round 1 */
-#define S11 7
-#define S12 12
-#define S13 17
-#define S14 22
- FF(a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
- FF(d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
- FF(c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
- FF(b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
- FF(a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
- FF(d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
- FF(c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
- FF(b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
- FF(a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
- FF(d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
- FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
- FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
- FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
- FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
- FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
- FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
-
- /* Round 2 */
-#define S21 5
-#define S22 9
-#define S23 14
-#define S24 20
- GG(a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
- GG(d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
- GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
- GG(b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
- GG(a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
- GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */
- GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
- GG(b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
- GG(a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
- GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
- GG(c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
- GG(b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
- GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
- GG(d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
- GG(c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
- GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
-
- /* Round 3 */
-#define S31 4
-#define S32 11
-#define S33 16
-#define S34 23
- HH(a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
- HH(d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
- HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
- HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
- HH(a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
- HH(d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
- HH(c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
- HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
- HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
- HH(d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
- HH(c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
- HH(b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
- HH(a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
- HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
- HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
- HH(b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
-
- /* Round 4 */
-#define S41 6
-#define S42 10
-#define S43 15
-#define S44 21
- II(a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
- II(d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
- II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
- II(b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
- II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
- II(d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
- II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
- II(b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
- II(a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
- II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
- II(c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
- II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
- II(a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
- II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
- II(c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
- II(b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
-
- /* zeroize sensitive information */
- memset(x, 0, sizeof(x));
+ /* Put checksum in context given as argument. */
+ ctx->A = A;
+ ctx->B = B;
+ ctx->C = C;
+ ctx->D = D;
}
diff --git a/src/mn-md5.h b/src/mn-md5.h
@@ -1,29 +1,27 @@
/*
- * mn-md5.h - RSA Data Security, Inc., MD5 message-digest algorithm
+ * MD5 message digest implementation, taken from glibc and edited for
+ * style.
*
- * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- * rights reserved.
+ * The GNU C Library,
+ * Copyright (C) 1995,1996,1997,1999,2000,2001,2005
+ * Free Software Foundation, Inc.
*
- * License to copy and use this software is granted provided that it
- * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- * Algorithm" in all material mentioning or referencing this software
- * or this function.
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
*
- * License is also granted to make and use derivative works provided
- * that such works are identified as "derived from the RSA Data
- * Security, Inc. MD5 Message-Digest Algorithm" in all material
- * mentioning or referencing the derived work.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
*
- * RSA Data Security, Inc. makes no representations concerning either
- * the merchantability of this software or the suitability of this
- * software for any particular purpose. It is provided "as is"
- * without express or implied warranty of any kind.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * These notices must be retained in any copies of any part of this
- * documentation and/or software.
- *
- * This code is the same as the code published by RSA Inc. It has been
- * edited for clarity and style only.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _MN_MD5_H
@@ -33,17 +31,50 @@
typedef struct
{
- uint32_t state[4]; /* state (ABCD) */
- uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
- unsigned char buffer[64]; /* input buffer */
+ uint32_t A;
+ uint32_t B;
+ uint32_t C;
+ uint32_t D;
+
+ uint32_t total[2];
+ uint32_t buflen;
+ char buffer[128]
+#ifdef __GNUC__
+ __attribute__ ((__aligned__ (__alignof__ (uint32_t))))
+#endif
+ ;
} MNMD5Context;
-void mn_md5_init (MNMD5Context *context);
-void mn_md5_update (MNMD5Context *context,
- const unsigned char *buf,
- unsigned int len);
-void mn_md5_pad (MNMD5Context *context);
-void mn_md5_final (unsigned char digest[16], MNMD5Context *context);
-char *mn_md5_end (MNMD5Context *context, char *buf);
+/* Initialize structure containing state of computation.
+ (RFC 1321, 3.3: Step 3) */
+void mn_md5_init_ctx (MNMD5Context *ctx);
+
+/* Starting with the result of former calls of this function (or the
+ initialization function update the context for the next LEN bytes
+ starting at BUFFER.
+ It is necessary that LEN is a multiple of 64!!! */
+void mn_md5_process_block (MNMD5Context *ctx, const void *buffer, size_t len);
+
+/* Starting with the result of former calls of this function (or the
+ initialization function update the context for the next LEN bytes
+ starting at BUFFER.
+ It is NOT required that LEN is a multiple of 64. */
+void mn_md5_process_bytes (MNMD5Context *ctx, const void *buffer, size_t len);
+
+/* Process the remaining bytes in the buffer and put result from CTX
+ in first 16 bytes following RESBUF. The result is always in little
+ endian byte order, so that a byte-wise output yields to the wanted
+ ASCII representation of the message digest.
+
+ IMPORTANT: On some systems it is required that RESBUF is correctly
+ aligned for a 32 bits value. */
+void *mn_md5_finish_ctx (MNMD5Context *ctx, unsigned char resbuf[16]);
+
+/*
+ * Stores the nul-terminated hexadecimal representation of @resbuf
+ * (which must be the result buffer filled in by mn_md5_finish_ctx())
+ * into @hexbuf.
+ */
+void mn_md5_to_hex (const unsigned char resbuf[16], char hexbuf[33]);
#endif /* _MN_MD5_H */
diff --git a/src/mn-message-mime.c b/src/mn-message-mime.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -106,7 +106,7 @@ mn_message_new_from_mime_message_full (GType type,
char *decoded_subject;
g_return_val_if_fail(type != 0, NULL);
- g_return_val_if_fail(mailbox == NULL || MN_IS_MAILBOX(mailbox), NULL);
+ g_return_val_if_fail(MN_IS_MAILBOX(mailbox), NULL);
g_return_val_if_fail(GMIME_IS_MESSAGE(mime_message), NULL);
if (mn_message_mime_is_spam(mime_message))
@@ -177,7 +177,7 @@ mn_message_new_from_mime_stream_full (GType type,
MNMessage *message;
g_return_val_if_fail(type != 0, NULL);
- g_return_val_if_fail(mailbox == NULL || MN_IS_MAILBOX(mailbox), NULL);
+ g_return_val_if_fail(MN_IS_MAILBOX(mailbox), NULL);
g_return_val_if_fail(GMIME_IS_STREAM(mime_stream), NULL);
parser = g_mime_parser_new_with_stream(mime_stream);
@@ -219,7 +219,7 @@ mn_message_new_from_uri_full (GType type,
GnomeVFSHandle *handle;
g_return_val_if_fail(type != 0, NULL);
- g_return_val_if_fail(mailbox == NULL || MN_IS_MAILBOX(mailbox), NULL);
+ g_return_val_if_fail(MN_IS_MAILBOX(mailbox), NULL);
g_return_val_if_fail(uri != NULL, NULL);
result = gnome_vfs_open_uri(&handle, uri, GNOME_VFS_OPEN_READ | GNOME_VFS_OPEN_RANDOM);
@@ -240,14 +240,8 @@ mn_message_new_from_uri_full (GType type,
g_free(text_uri);
g_object_unref(stream);
- result = gnome_vfs_close(handle);
- if (result == GNOME_VFS_OK)
- return message;
- else
- mn_g_object_null_unref(message); /* message can be null */
+ return message;
}
- else
- gnome_vfs_close(handle);
}
return mn_message_new_from_error(mailbox, gnome_vfs_result_to_string(result), flags);
@@ -263,7 +257,7 @@ mn_message_new_from_buffer (MNMailbox *mailbox,
GMimeStream *stream;
MNMessage *message;
- g_return_val_if_fail(mailbox == NULL || MN_IS_MAILBOX(mailbox), NULL);
+ g_return_val_if_fail(MN_IS_MAILBOX(mailbox), NULL);
g_return_val_if_fail(buffer != NULL, NULL);
stream = g_mime_stream_mem_new_with_buffer(buffer, len);
diff --git a/src/mn-message-mime.h b/src/mn-message-mime.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-message-private.h b/src/mn-message-private.h
@@ -17,7 +17,7 @@ extern "C" {
typedef enum
{
/* include in the XML summary and allow as a command format */
- MN_MESSAGE_PARAM_EXPORT = MN_XML_PARAM_IMPORT_EXPORT,
+ MN_MESSAGE_PARAM_EXPORT = MN_XML_PARAM_EXPORT,
} MNMessageParamFlags;
#line 24 "mn-message-private.h"
diff --git a/src/mn-message-view.gob b/src/mn-message-view.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-message.c b/src/mn-message.c
@@ -51,8 +51,7 @@ static void ___object_get_property (GObject *object, guint property_id, GValue *
static void mn_message_init (MNMessage * o) G_GNUC_UNUSED;
static void mn_message_class_init (MNMessageClass * c) G_GNUC_UNUSED;
static GObject * ___1_mn_message_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
-static gboolean mn_message_get_subst (MNMessage * self, const char * prop_name, char ** result) G_GNUC_UNUSED;
-static char * mn_message_subst_command (MNMessage * self, const char * command, GError ** err) G_GNUC_UNUSED;
+static gboolean mn_message_subst_command_cb (const char * name, char ** value, gpointer data) G_GNUC_UNUSED;
static gboolean mn_message_execute_command_real (MNMessage * self, const char * command, GError ** err) G_GNUC_UNUSED;
static gboolean mn_message_execute_command (MNMessage * self, const char * id, gboolean * status, GError ** err) G_GNUC_UNUSED;
static gboolean ___real_mn_message_can_open_impl (MNMessage * self);
@@ -91,8 +90,7 @@ enum {
static GObjectClass *parent_class = NULL;
/* Short form macros */
-#define self_get_subst mn_message_get_subst
-#define self_subst_command mn_message_subst_command
+#define self_subst_command_cb mn_message_subst_command_cb
#define self_execute_command_real mn_message_execute_command_real
#define self_execute_command mn_message_execute_command
#define self_can_open mn_message_can_open
@@ -167,21 +165,21 @@ ___finalize(GObject *obj_self)
MNMessage *self G_GNUC_UNUSED = MN_MESSAGE (obj_self);
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 68 "mn-message.gob"
+#line 66 "mn-message.gob"
if(self->error) { g_free ((gpointer) self->error); self->error = NULL; }
-#line 173 "mn-message.c"
-#line 76 "mn-message.gob"
+#line 171 "mn-message.c"
+#line 74 "mn-message.gob"
if(self->id) { g_free ((gpointer) self->id); self->id = NULL; }
-#line 176 "mn-message.c"
-#line 80 "mn-message.gob"
+#line 174 "mn-message.c"
+#line 78 "mn-message.gob"
if(self->from) { g_free ((gpointer) self->from); self->from = NULL; }
-#line 179 "mn-message.c"
-#line 84 "mn-message.gob"
+#line 177 "mn-message.c"
+#line 82 "mn-message.gob"
if(self->subject) { g_free ((gpointer) self->subject); self->subject = NULL; }
-#line 182 "mn-message.c"
-#line 88 "mn-message.gob"
+#line 180 "mn-message.c"
+#line 86 "mn-message.gob"
if(self->uri) { g_free ((gpointer) self->uri); self->uri = NULL; }
-#line 185 "mn-message.c"
+#line 183 "mn-message.c"
}
#undef __GOB_FUNCTION__
@@ -199,27 +197,27 @@ mn_message_class_init (MNMessageClass * c G_GNUC_UNUSED)
parent_class = g_type_class_ref (G_TYPE_OBJECT);
-#line 100 "mn-message.gob"
+#line 98 "mn-message.gob"
g_object_class->constructor = ___1_mn_message_constructor;
-#line 327 "mn-message.gob"
+#line 234 "mn-message.gob"
c->can_open_impl = ___real_mn_message_can_open_impl;
-#line 347 "mn-message.gob"
+#line 254 "mn-message.gob"
c->open_impl = ___real_mn_message_open_impl;
-#line 359 "mn-message.gob"
+#line 266 "mn-message.gob"
c->can_mark_as_read_impl = ___real_mn_message_can_mark_as_read_impl;
-#line 211 "mn-message.c"
+#line 209 "mn-message.c"
c->mark_as_read_impl = NULL;
-#line 391 "mn-message.gob"
+#line 298 "mn-message.gob"
c->can_mark_as_spam = ___real_mn_message_can_mark_as_spam;
-#line 397 "mn-message.gob"
+#line 304 "mn-message.gob"
c->can_mark_as_spam_impl = ___real_mn_message_can_mark_as_spam_impl;
-#line 217 "mn-message.c"
+#line 215 "mn-message.c"
c->mark_as_spam_impl = NULL;
-#line 429 "mn-message.gob"
+#line 336 "mn-message.gob"
c->can_delete = ___real_mn_message_can_delete;
-#line 435 "mn-message.gob"
+#line 342 "mn-message.gob"
c->can_delete_impl = ___real_mn_message_can_delete_impl;
-#line 223 "mn-message.c"
+#line 221 "mn-message.c"
c->delete_impl = NULL;
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
@@ -329,58 +327,58 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_MAILBOX:
{
-#line 65 "mn-message.gob"
+#line 63 "mn-message.gob"
self->mailbox = g_value_get_pointer (VAL);
-#line 335 "mn-message.c"
+#line 333 "mn-message.c"
}
break;
case PROP_ERROR:
{
-#line 69 "mn-message.gob"
+#line 67 "mn-message.gob"
{ char *old = self->error; self->error = g_value_dup_string (VAL); g_free (old); }
-#line 342 "mn-message.c"
+#line 340 "mn-message.c"
}
break;
case PROP_SENT_TIME:
{
-#line 73 "mn-message.gob"
+#line 71 "mn-message.gob"
self->sent_time = g_value_get_ulong (VAL);
-#line 349 "mn-message.c"
+#line 347 "mn-message.c"
}
break;
case PROP_ID:
{
-#line 77 "mn-message.gob"
+#line 75 "mn-message.gob"
{ char *old = self->id; self->id = g_value_dup_string (VAL); g_free (old); }
-#line 356 "mn-message.c"
+#line 354 "mn-message.c"
}
break;
case PROP_FROM:
{
-#line 81 "mn-message.gob"
+#line 79 "mn-message.gob"
{ char *old = self->from; self->from = g_value_dup_string (VAL); g_free (old); }
-#line 363 "mn-message.c"
+#line 361 "mn-message.c"
}
break;
case PROP_SUBJECT:
{
-#line 85 "mn-message.gob"
+#line 83 "mn-message.gob"
{ char *old = self->subject; self->subject = g_value_dup_string (VAL); g_free (old); }
-#line 370 "mn-message.c"
+#line 368 "mn-message.c"
}
break;
case PROP_URI:
{
-#line 89 "mn-message.gob"
+#line 87 "mn-message.gob"
{ char *old = self->uri; self->uri = g_value_dup_string (VAL); g_free (old); }
-#line 377 "mn-message.c"
+#line 375 "mn-message.c"
}
break;
case PROP_FLAGS:
{
-#line 98 "mn-message.gob"
+#line 96 "mn-message.gob"
self->flags = g_value_get_uint (VAL);
-#line 384 "mn-message.c"
+#line 382 "mn-message.c"
}
break;
default:
@@ -409,67 +407,67 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_MAILBOX:
{
-#line 65 "mn-message.gob"
+#line 63 "mn-message.gob"
g_value_set_pointer (VAL, self->mailbox);
-#line 415 "mn-message.c"
+#line 413 "mn-message.c"
}
break;
case PROP_ERROR:
{
-#line 69 "mn-message.gob"
+#line 67 "mn-message.gob"
g_value_set_string (VAL, self->error);
-#line 422 "mn-message.c"
+#line 420 "mn-message.c"
}
break;
case PROP_SENT_TIME:
{
-#line 73 "mn-message.gob"
+#line 71 "mn-message.gob"
g_value_set_ulong (VAL, self->sent_time);
-#line 429 "mn-message.c"
+#line 427 "mn-message.c"
}
break;
case PROP_ID:
{
-#line 77 "mn-message.gob"
+#line 75 "mn-message.gob"
g_value_set_string (VAL, self->id);
-#line 436 "mn-message.c"
+#line 434 "mn-message.c"
}
break;
case PROP_FROM:
{
-#line 81 "mn-message.gob"
+#line 79 "mn-message.gob"
g_value_set_string (VAL, self->from);
-#line 443 "mn-message.c"
+#line 441 "mn-message.c"
}
break;
case PROP_SUBJECT:
{
-#line 85 "mn-message.gob"
+#line 83 "mn-message.gob"
g_value_set_string (VAL, self->subject);
-#line 450 "mn-message.c"
+#line 448 "mn-message.c"
}
break;
case PROP_URI:
{
-#line 89 "mn-message.gob"
+#line 87 "mn-message.gob"
g_value_set_string (VAL, self->uri);
-#line 457 "mn-message.c"
+#line 455 "mn-message.c"
}
break;
case PROP_FILENAME:
{
-#line 93 "mn-message.gob"
+#line 91 "mn-message.gob"
g_value_take_string(VAL, self->uri ? gnome_vfs_get_local_path_from_uri(self->uri) : NULL);
-#line 466 "mn-message.c"
+#line 464 "mn-message.c"
}
break;
case PROP_FLAGS:
{
-#line 98 "mn-message.gob"
+#line 96 "mn-message.gob"
g_value_set_uint (VAL, self->flags);
-#line 473 "mn-message.c"
+#line 471 "mn-message.c"
}
break;
default:
@@ -486,10 +484,10 @@ g_value_set_uint (VAL, self->flags);
-#line 100 "mn-message.gob"
+#line 98 "mn-message.gob"
static GObject *
___1_mn_message_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
-#line 493 "mn-message.c"
+#line 491 "mn-message.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -497,7 +495,7 @@ ___1_mn_message_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_
{
#define __GOB_FUNCTION__ "MN:Message::constructor"
{
-#line 102 "mn-message.gob"
+#line 100 "mn-message.gob"
GObject *object;
Self *self;
@@ -547,28 +545,20 @@ ___1_mn_message_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_
return object;
}}
-#line 551 "mn-message.c"
+#line 549 "mn-message.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 152 "mn-message.gob"
+#line 150 "mn-message.gob"
static gboolean
-mn_message_get_subst (MNMessage * self, const char * prop_name, char ** result)
-#line 558 "mn-message.c"
+mn_message_subst_command_cb (const char * name, char ** value, gpointer data)
+#line 556 "mn-message.c"
{
-#define __GOB_FUNCTION__ "MN:Message::get_subst"
-#line 152 "mn-message.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 152 "mn-message.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 152 "mn-message.gob"
- g_return_val_if_fail (prop_name != NULL, (gboolean )0);
-#line 152 "mn-message.gob"
- g_return_val_if_fail (result != NULL, (gboolean )0);
-#line 569 "mn-message.c"
+#define __GOB_FUNCTION__ "MN:Message::subst_command_cb"
{
-#line 156 "mn-message.gob"
+#line 152 "mn-message.gob"
+ Self *self = data;
GParamSpec **properties;
unsigned int n_properties;
gboolean status = FALSE;
@@ -577,15 +567,15 @@ mn_message_get_subst (MNMessage * self, const char * prop_name, char ** result)
properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(self), &n_properties);
for (i = 0; i < n_properties; i++)
if ((properties[i]->flags & MN_MESSAGE_PARAM_EXPORT) != 0
- && ! strcmp(g_param_spec_get_name(properties[i]), prop_name))
+ && ! strcmp(g_param_spec_get_name(properties[i]), name))
{
- GValue value = { 0, };
+ GValue gvalue = { 0, };
- g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(properties[i]));
- g_object_get_property(G_OBJECT(self), prop_name, &value);
+ g_value_init(&gvalue, G_PARAM_SPEC_VALUE_TYPE(properties[i]));
+ g_object_get_property(G_OBJECT(self), name, &gvalue);
- *result = mn_g_value_to_string(&value);
- g_value_unset(&value);
+ *value = mn_g_value_to_string(&gvalue);
+ g_value_unset(&gvalue);
status = TRUE;
break;
@@ -594,134 +584,29 @@ mn_message_get_subst (MNMessage * self, const char * prop_name, char ** result)
return status;
}}
-#line 598 "mn-message.c"
-#undef __GOB_FUNCTION__
-
-#line 183 "mn-message.gob"
-static char *
-mn_message_subst_command (MNMessage * self, const char * command, GError ** err)
-#line 604 "mn-message.c"
-{
-#define __GOB_FUNCTION__ "MN:Message::subst_command"
-#line 183 "mn-message.gob"
- g_return_val_if_fail (self != NULL, (char * )0);
-#line 183 "mn-message.gob"
- g_return_val_if_fail (MN_IS_MESSAGE (self), (char * )0);
-#line 183 "mn-message.gob"
- g_return_val_if_fail (command != NULL, (char * )0);
-#line 613 "mn-message.c"
-{
-#line 185 "mn-message.gob"
-
- GString *result;
- const char *p;
-
- result = g_string_new(NULL);
-
- for (p = command; *p;)
- if (*p == '%')
- {
- char *prop_name = NULL;
-
- if (p[1] == '%')
- {
- g_string_append_c(result, '%');
- p += 2;
- }
- else if (p[1] == '{')
- {
- char *end;
-
- end = strchr(p + 2, '}');
- if (! end)
- {
- g_set_error(err, 0, 0, _("unterminated substitution"));
- goto error;
- }
-
- prop_name = g_strndup(p + 2, end - p - 2);
- p = end + 1;
- }
- else
- {
- const char *end = p + 1;
-
- while (g_ascii_isalnum(*end) || *end == '-' || *end == '_')
- end++;
-
- prop_name = g_strndup(p + 1, end - p - 1);
- p = end;
- }
-
- if (prop_name)
- {
- gboolean ok = FALSE;
-
- if (*prop_name)
- {
- char *value;
-
- if (self_get_subst(self, prop_name, &value))
- {
- char *quoted;
-
- quoted = mn_shell_quote_safe(value ? value : "");
- g_free(value);
-
- g_string_append(result, quoted);
- g_free(quoted);
-
- ok = TRUE;
- }
- else
- g_set_error(err, 0, 0, _("unknown substitution \"%s\""), prop_name);
- }
- else
- g_set_error(err, 0, 0, _("empty substitution"));
-
- g_free(prop_name);
- if (! ok)
- goto error;
- }
- }
- else
- {
- g_string_append_c(result, *p);
- p++;
- }
-
- goto end; /* success */
-
- error:
- g_string_free(result, TRUE);
- result = NULL;
-
- end:
- return result ? g_string_free(result, FALSE) : NULL;
- }}
-#line 703 "mn-message.c"
+#line 588 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 273 "mn-message.gob"
+#line 180 "mn-message.gob"
static gboolean
mn_message_execute_command_real (MNMessage * self, const char * command, GError ** err)
-#line 709 "mn-message.c"
+#line 594 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::execute_command_real"
-#line 273 "mn-message.gob"
+#line 180 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 273 "mn-message.gob"
+#line 180 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 273 "mn-message.gob"
+#line 180 "mn-message.gob"
g_return_val_if_fail (command != NULL, (gboolean )0);
-#line 718 "mn-message.c"
+#line 603 "mn-message.c"
{
-#line 277 "mn-message.gob"
+#line 184 "mn-message.gob"
char *subst;
int status;
- subst = self_subst_command(self, command, err);
+ subst = mn_subst_command(command, self_subst_command_cb, self, err);
if (! subst)
return FALSE;
@@ -736,26 +621,26 @@ mn_message_execute_command_real (MNMessage * self, const char * command, GError
return TRUE;
}}
-#line 740 "mn-message.c"
+#line 625 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 297 "mn-message.gob"
+#line 204 "mn-message.gob"
static gboolean
mn_message_execute_command (MNMessage * self, const char * id, gboolean * status, GError ** err)
-#line 746 "mn-message.c"
+#line 631 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::execute_command"
-#line 297 "mn-message.gob"
+#line 204 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 297 "mn-message.gob"
+#line 204 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 297 "mn-message.gob"
+#line 204 "mn-message.gob"
g_return_val_if_fail (id != NULL, (gboolean )0);
-#line 297 "mn-message.gob"
+#line 204 "mn-message.gob"
g_return_val_if_fail (status != NULL, (gboolean )0);
-#line 757 "mn-message.c"
+#line 642 "mn-message.c"
{
-#line 302 "mn-message.gob"
+#line 209 "mn-message.gob"
char *command;
GError *tmp_err = NULL;
@@ -774,39 +659,39 @@ mn_message_execute_command (MNMessage * self, const char * id, gboolean * status
g_free(command);
return TRUE;
}}
-#line 778 "mn-message.c"
+#line 663 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 321 "mn-message.gob"
+#line 228 "mn-message.gob"
gboolean
mn_message_can_open (MNMessage * self)
-#line 784 "mn-message.c"
+#line 669 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::can_open"
-#line 321 "mn-message.gob"
+#line 228 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 321 "mn-message.gob"
+#line 228 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 791 "mn-message.c"
+#line 676 "mn-message.c"
{
-#line 323 "mn-message.gob"
+#line 230 "mn-message.gob"
return mn_mailbox_has_command(self->mailbox, "open") || self_can_open_impl(self);
}}
-#line 797 "mn-message.c"
+#line 682 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 327 "mn-message.gob"
+#line 234 "mn-message.gob"
static gboolean
mn_message_can_open_impl (MNMessage * self)
-#line 803 "mn-message.c"
+#line 688 "mn-message.c"
{
MNMessageClass *klass;
-#line 327 "mn-message.gob"
+#line 234 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 327 "mn-message.gob"
+#line 234 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 810 "mn-message.c"
+#line 695 "mn-message.c"
klass = MN_MESSAGE_GET_CLASS(self);
if(klass->can_open_impl)
@@ -814,58 +699,58 @@ mn_message_can_open_impl (MNMessage * self)
else
return (gboolean )(0);
}
-#line 327 "mn-message.gob"
+#line 234 "mn-message.gob"
static gboolean
___real_mn_message_can_open_impl (MNMessage * self G_GNUC_UNUSED)
-#line 821 "mn-message.c"
+#line 706 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::can_open_impl"
{
-#line 329 "mn-message.gob"
+#line 236 "mn-message.gob"
return self->uri != NULL;
}}
-#line 829 "mn-message.c"
+#line 714 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 333 "mn-message.gob"
+#line 240 "mn-message.gob"
gboolean
mn_message_open (MNMessage * self, GError ** err)
-#line 835 "mn-message.c"
+#line 720 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::open"
-#line 333 "mn-message.gob"
+#line 240 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 333 "mn-message.gob"
+#line 240 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 842 "mn-message.c"
+#line 727 "mn-message.c"
{
-#line 335 "mn-message.gob"
+#line 242 "mn-message.gob"
gboolean status;
if (self_execute_command(self, "open", &status, err))
{
- mn_mailbox_mark_as_read(self);
+ mn_mailbox_consider_as_read(self);
return status;
}
else
return self_open_impl(self, err);
}}
-#line 856 "mn-message.c"
+#line 741 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 347 "mn-message.gob"
+#line 254 "mn-message.gob"
static gboolean
mn_message_open_impl (MNMessage * self, GError ** err)
-#line 862 "mn-message.c"
+#line 747 "mn-message.c"
{
MNMessageClass *klass;
-#line 347 "mn-message.gob"
+#line 254 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 347 "mn-message.gob"
+#line 254 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 869 "mn-message.c"
+#line 754 "mn-message.c"
klass = MN_MESSAGE_GET_CLASS(self);
if(klass->open_impl)
@@ -873,50 +758,50 @@ mn_message_open_impl (MNMessage * self, GError ** err)
else
return (gboolean )(0);
}
-#line 347 "mn-message.gob"
+#line 254 "mn-message.gob"
static gboolean
___real_mn_message_open_impl (MNMessage * self G_GNUC_UNUSED, GError ** err)
-#line 880 "mn-message.c"
+#line 765 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::open_impl"
{
-#line 349 "mn-message.gob"
+#line 256 "mn-message.gob"
return gnome_url_show(self->uri, err);
}}
-#line 888 "mn-message.c"
+#line 773 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 353 "mn-message.gob"
+#line 260 "mn-message.gob"
gboolean
mn_message_can_mark_as_read (MNMessage * self)
-#line 894 "mn-message.c"
+#line 779 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::can_mark_as_read"
-#line 353 "mn-message.gob"
+#line 260 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 353 "mn-message.gob"
+#line 260 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 901 "mn-message.c"
+#line 786 "mn-message.c"
{
-#line 355 "mn-message.gob"
+#line 262 "mn-message.gob"
return mn_mailbox_has_command(self->mailbox, "mark-as-read") || self_can_mark_as_read_impl(self);
}}
-#line 907 "mn-message.c"
+#line 792 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 359 "mn-message.gob"
+#line 266 "mn-message.gob"
static gboolean
mn_message_can_mark_as_read_impl (MNMessage * self)
-#line 913 "mn-message.c"
+#line 798 "mn-message.c"
{
MNMessageClass *klass;
-#line 359 "mn-message.gob"
+#line 266 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 359 "mn-message.gob"
+#line 266 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 920 "mn-message.c"
+#line 805 "mn-message.c"
klass = MN_MESSAGE_GET_CLASS(self);
if(klass->can_mark_as_read_impl)
@@ -924,33 +809,33 @@ mn_message_can_mark_as_read_impl (MNMessage * self)
else
return (gboolean )(0);
}
-#line 359 "mn-message.gob"
+#line 266 "mn-message.gob"
static gboolean
___real_mn_message_can_mark_as_read_impl (MNMessage * self G_GNUC_UNUSED)
-#line 931 "mn-message.c"
+#line 816 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::can_mark_as_read_impl"
{
-#line 361 "mn-message.gob"
+#line 268 "mn-message.gob"
return SELF_GET_CLASS(self)->mark_as_read_impl != NULL;
}}
-#line 939 "mn-message.c"
+#line 824 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 365 "mn-message.gob"
+#line 272 "mn-message.gob"
static gboolean
mn_message_mark_as_read_real (MNMessage * self, GError ** err)
-#line 945 "mn-message.c"
+#line 830 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::mark_as_read_real"
-#line 365 "mn-message.gob"
+#line 272 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 365 "mn-message.gob"
+#line 272 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 952 "mn-message.c"
+#line 837 "mn-message.c"
{
-#line 367 "mn-message.gob"
+#line 274 "mn-message.gob"
gboolean status;
@@ -959,45 +844,45 @@ mn_message_mark_as_read_real (MNMessage * self, GError ** err)
else
return self_mark_as_read_impl(self, err);
}}
-#line 963 "mn-message.c"
+#line 848 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 376 "mn-message.gob"
+#line 283 "mn-message.gob"
gboolean
mn_message_mark_as_read (MNMessage * self, GError ** err)
-#line 969 "mn-message.c"
+#line 854 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::mark_as_read"
-#line 376 "mn-message.gob"
+#line 283 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 376 "mn-message.gob"
+#line 283 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 976 "mn-message.c"
+#line 861 "mn-message.c"
{
-#line 378 "mn-message.gob"
+#line 285 "mn-message.gob"
if (self_mark_as_read_real(self, err))
{
- mn_mailbox_mark_as_read(self);
+ mn_mailbox_consider_as_read(self);
return TRUE;
}
else
return FALSE;
}}
-#line 988 "mn-message.c"
+#line 873 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 388 "mn-message.gob"
+#line 295 "mn-message.gob"
static gboolean
mn_message_mark_as_read_impl (MNMessage * self, GError ** err)
-#line 994 "mn-message.c"
+#line 879 "mn-message.c"
{
MNMessageClass *klass;
-#line 388 "mn-message.gob"
+#line 295 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 388 "mn-message.gob"
+#line 295 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1001 "mn-message.c"
+#line 886 "mn-message.c"
klass = MN_MESSAGE_GET_CLASS(self);
if(klass->mark_as_read_impl)
@@ -1006,17 +891,17 @@ mn_message_mark_as_read_impl (MNMessage * self, GError ** err)
return (gboolean )(0);
}
-#line 391 "mn-message.gob"
+#line 298 "mn-message.gob"
gboolean
mn_message_can_mark_as_spam (MNMessage * self)
-#line 1013 "mn-message.c"
+#line 898 "mn-message.c"
{
MNMessageClass *klass;
-#line 391 "mn-message.gob"
+#line 298 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 391 "mn-message.gob"
+#line 298 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1020 "mn-message.c"
+#line 905 "mn-message.c"
klass = MN_MESSAGE_GET_CLASS(self);
if(klass->can_mark_as_spam)
@@ -1024,31 +909,31 @@ mn_message_can_mark_as_spam (MNMessage * self)
else
return (gboolean )(0);
}
-#line 391 "mn-message.gob"
+#line 298 "mn-message.gob"
static gboolean
___real_mn_message_can_mark_as_spam (MNMessage * self G_GNUC_UNUSED)
-#line 1031 "mn-message.c"
+#line 916 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::can_mark_as_spam"
{
-#line 393 "mn-message.gob"
+#line 300 "mn-message.gob"
return mn_mailbox_has_command(self->mailbox, "mark-as-spam") || self_can_mark_as_spam_impl(self);
}}
-#line 1039 "mn-message.c"
+#line 924 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 397 "mn-message.gob"
+#line 304 "mn-message.gob"
static gboolean
mn_message_can_mark_as_spam_impl (MNMessage * self)
-#line 1045 "mn-message.c"
+#line 930 "mn-message.c"
{
MNMessageClass *klass;
-#line 397 "mn-message.gob"
+#line 304 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 397 "mn-message.gob"
+#line 304 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1052 "mn-message.c"
+#line 937 "mn-message.c"
klass = MN_MESSAGE_GET_CLASS(self);
if(klass->can_mark_as_spam_impl)
@@ -1056,33 +941,33 @@ mn_message_can_mark_as_spam_impl (MNMessage * self)
else
return (gboolean )(0);
}
-#line 397 "mn-message.gob"
+#line 304 "mn-message.gob"
static gboolean
___real_mn_message_can_mark_as_spam_impl (MNMessage * self G_GNUC_UNUSED)
-#line 1063 "mn-message.c"
+#line 948 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::can_mark_as_spam_impl"
{
-#line 399 "mn-message.gob"
+#line 306 "mn-message.gob"
return SELF_GET_CLASS(self)->mark_as_spam_impl != NULL;
}}
-#line 1071 "mn-message.c"
+#line 956 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 403 "mn-message.gob"
+#line 310 "mn-message.gob"
static gboolean
mn_message_mark_as_spam_real (MNMessage * self, GError ** err)
-#line 1077 "mn-message.c"
+#line 962 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::mark_as_spam_real"
-#line 403 "mn-message.gob"
+#line 310 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 403 "mn-message.gob"
+#line 310 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1084 "mn-message.c"
+#line 969 "mn-message.c"
{
-#line 405 "mn-message.gob"
+#line 312 "mn-message.gob"
gboolean status;
@@ -1091,45 +976,45 @@ mn_message_mark_as_spam_real (MNMessage * self, GError ** err)
else
return self_mark_as_spam_impl(self, err);
}}
-#line 1095 "mn-message.c"
+#line 980 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 414 "mn-message.gob"
+#line 321 "mn-message.gob"
gboolean
mn_message_mark_as_spam (MNMessage * self, GError ** err)
-#line 1101 "mn-message.c"
+#line 986 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::mark_as_spam"
-#line 414 "mn-message.gob"
+#line 321 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 414 "mn-message.gob"
+#line 321 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1108 "mn-message.c"
+#line 993 "mn-message.c"
{
-#line 416 "mn-message.gob"
+#line 323 "mn-message.gob"
if (self_mark_as_spam_real(self, err))
{
- mn_mailbox_mark_as_read(self);
+ mn_mailbox_consider_as_read(self);
return TRUE;
}
else
return FALSE;
}}
-#line 1120 "mn-message.c"
+#line 1005 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 426 "mn-message.gob"
+#line 333 "mn-message.gob"
static gboolean
mn_message_mark_as_spam_impl (MNMessage * self, GError ** err)
-#line 1126 "mn-message.c"
+#line 1011 "mn-message.c"
{
MNMessageClass *klass;
-#line 426 "mn-message.gob"
+#line 333 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 426 "mn-message.gob"
+#line 333 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1133 "mn-message.c"
+#line 1018 "mn-message.c"
klass = MN_MESSAGE_GET_CLASS(self);
if(klass->mark_as_spam_impl)
@@ -1138,17 +1023,17 @@ mn_message_mark_as_spam_impl (MNMessage * self, GError ** err)
return (gboolean )(0);
}
-#line 429 "mn-message.gob"
+#line 336 "mn-message.gob"
gboolean
mn_message_can_delete (MNMessage * self)
-#line 1145 "mn-message.c"
+#line 1030 "mn-message.c"
{
MNMessageClass *klass;
-#line 429 "mn-message.gob"
+#line 336 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 429 "mn-message.gob"
+#line 336 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1152 "mn-message.c"
+#line 1037 "mn-message.c"
klass = MN_MESSAGE_GET_CLASS(self);
if(klass->can_delete)
@@ -1156,31 +1041,31 @@ mn_message_can_delete (MNMessage * self)
else
return (gboolean )(0);
}
-#line 429 "mn-message.gob"
+#line 336 "mn-message.gob"
static gboolean
___real_mn_message_can_delete (MNMessage * self G_GNUC_UNUSED)
-#line 1163 "mn-message.c"
+#line 1048 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::can_delete"
{
-#line 431 "mn-message.gob"
+#line 338 "mn-message.gob"
return mn_mailbox_has_command(self->mailbox, "delete") || self_can_delete_impl(self);
}}
-#line 1171 "mn-message.c"
+#line 1056 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 435 "mn-message.gob"
+#line 342 "mn-message.gob"
static gboolean
mn_message_can_delete_impl (MNMessage * self)
-#line 1177 "mn-message.c"
+#line 1062 "mn-message.c"
{
MNMessageClass *klass;
-#line 435 "mn-message.gob"
+#line 342 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 435 "mn-message.gob"
+#line 342 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1184 "mn-message.c"
+#line 1069 "mn-message.c"
klass = MN_MESSAGE_GET_CLASS(self);
if(klass->can_delete_impl)
@@ -1188,33 +1073,33 @@ mn_message_can_delete_impl (MNMessage * self)
else
return (gboolean )(0);
}
-#line 435 "mn-message.gob"
+#line 342 "mn-message.gob"
static gboolean
___real_mn_message_can_delete_impl (MNMessage * self G_GNUC_UNUSED)
-#line 1195 "mn-message.c"
+#line 1080 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::can_delete_impl"
{
-#line 437 "mn-message.gob"
+#line 344 "mn-message.gob"
return SELF_GET_CLASS(self)->delete_impl != NULL;
}}
-#line 1203 "mn-message.c"
+#line 1088 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 441 "mn-message.gob"
+#line 348 "mn-message.gob"
static gboolean
mn_message_delete_real (MNMessage * self, GError ** err)
-#line 1209 "mn-message.c"
+#line 1094 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::delete_real"
-#line 441 "mn-message.gob"
+#line 348 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 441 "mn-message.gob"
+#line 348 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1216 "mn-message.c"
+#line 1101 "mn-message.c"
{
-#line 443 "mn-message.gob"
+#line 350 "mn-message.gob"
gboolean status;
@@ -1223,45 +1108,45 @@ mn_message_delete_real (MNMessage * self, GError ** err)
else
return self_delete_impl(self, err);
}}
-#line 1227 "mn-message.c"
+#line 1112 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 452 "mn-message.gob"
+#line 360 "mn-message.gob"
gboolean
mn_message_delete (MNMessage * self, GError ** err)
-#line 1233 "mn-message.c"
+#line 1118 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::delete"
-#line 452 "mn-message.gob"
+#line 360 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 452 "mn-message.gob"
+#line 360 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1240 "mn-message.c"
+#line 1125 "mn-message.c"
{
-#line 454 "mn-message.gob"
+#line 362 "mn-message.gob"
if (self_delete_real(self, err))
{
- mn_mailbox_mark_as_read(self);
+ mn_mailbox_consider_as_read(self);
return TRUE;
}
else
return FALSE;
}}
-#line 1252 "mn-message.c"
+#line 1137 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 464 "mn-message.gob"
+#line 372 "mn-message.gob"
static gboolean
mn_message_delete_impl (MNMessage * self, GError ** err)
-#line 1258 "mn-message.c"
+#line 1143 "mn-message.c"
{
MNMessageClass *klass;
-#line 464 "mn-message.gob"
+#line 372 "mn-message.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 464 "mn-message.gob"
+#line 372 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (gboolean )0);
-#line 1265 "mn-message.c"
+#line 1150 "mn-message.c"
klass = MN_MESSAGE_GET_CLASS(self);
if(klass->delete_impl)
@@ -1270,19 +1155,19 @@ mn_message_delete_impl (MNMessage * self, GError ** err)
return (gboolean )(0);
}
-#line 467 "mn-message.gob"
+#line 375 "mn-message.gob"
MNMessage *
mn_message_new (MNMailbox * mailbox, const char * error, time_t sent_time, const char * id, const char * from, const char * subject, const char * uri, MNMessageFlags flags)
-#line 1277 "mn-message.c"
+#line 1162 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::new"
-#line 467 "mn-message.gob"
+#line 375 "mn-message.gob"
g_return_val_if_fail (mailbox != NULL, (MNMessage * )0);
-#line 467 "mn-message.gob"
+#line 375 "mn-message.gob"
g_return_val_if_fail (MN_IS_MAILBOX (mailbox), (MNMessage * )0);
-#line 1284 "mn-message.c"
+#line 1169 "mn-message.c"
{
-#line 476 "mn-message.gob"
+#line 384 "mn-message.gob"
return GET_NEW_VARG(MN_MESSAGE_PROP_MAILBOX(mailbox),
MN_MESSAGE_PROP_ERROR((char *) error),
@@ -1294,43 +1179,43 @@ mn_message_new (MNMailbox * mailbox, const char * error, time_t sent_time, const
MN_MESSAGE_PROP_FLAGS(flags),
NULL);
}}
-#line 1298 "mn-message.c"
+#line 1183 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 488 "mn-message.gob"
+#line 396 "mn-message.gob"
MNMessage *
mn_message_new_from_error (MNMailbox * mailbox, const char * error, MNMessageFlags flags)
-#line 1304 "mn-message.c"
+#line 1189 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::new_from_error"
-#line 488 "mn-message.gob"
+#line 396 "mn-message.gob"
g_return_val_if_fail (mailbox != NULL, (MNMessage * )0);
-#line 488 "mn-message.gob"
+#line 396 "mn-message.gob"
g_return_val_if_fail (MN_IS_MAILBOX (mailbox), (MNMessage * )0);
-#line 488 "mn-message.gob"
+#line 396 "mn-message.gob"
g_return_val_if_fail (error != NULL, (MNMessage * )0);
-#line 1313 "mn-message.c"
+#line 1198 "mn-message.c"
{
-#line 492 "mn-message.gob"
+#line 400 "mn-message.gob"
return self_new(mailbox, error, 0, NULL, NULL, NULL, NULL, flags);
}}
-#line 1319 "mn-message.c"
+#line 1204 "mn-message.c"
#undef __GOB_FUNCTION__
-#line 496 "mn-message.gob"
+#line 404 "mn-message.gob"
xmlNode *
mn_message_xml_node_new (MNMessage * self)
-#line 1325 "mn-message.c"
+#line 1210 "mn-message.c"
{
#define __GOB_FUNCTION__ "MN:Message::xml_node_new"
-#line 496 "mn-message.gob"
+#line 404 "mn-message.gob"
g_return_val_if_fail (self != NULL, (xmlNode * )0);
-#line 496 "mn-message.gob"
+#line 404 "mn-message.gob"
g_return_val_if_fail (MN_IS_MESSAGE (self), (xmlNode * )0);
-#line 1332 "mn-message.c"
+#line 1217 "mn-message.c"
{
-#line 498 "mn-message.gob"
+#line 406 "mn-message.gob"
xmlNode *node;
@@ -1345,5 +1230,5 @@ mn_message_xml_node_new (MNMessage * self)
return node;
}}
-#line 1349 "mn-message.c"
+#line 1234 "mn-message.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-message.gob b/src/mn-message.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -37,7 +37,7 @@ typedef enum
typedef enum
{
/* include in the XML summary and allow as a command format */
- MN_MESSAGE_PARAM_EXPORT = MN_XML_PARAM_IMPORT_EXPORT,
+ MN_MESSAGE_PARAM_EXPORT = MN_XML_PARAM_EXPORT,
} MNMessageParamFlags;
%}
@@ -53,8 +53,6 @@ typedef enum
class MN:Message from G:Object
{
/*
- * May be NULL.
- *
* In order to not create reference cycles, we do not hold a
* reference to the mailbox. The code is arranged so that a message
* cannot survive its containing mailbox (whenever the mailbox is
@@ -150,10 +148,9 @@ class MN:Message from G:Object
}
private gboolean
- get_subst (self,
- const char *prop_name (check null),
- char **result (check null))
+ subst_command_cb (const char *name, char **value, gpointer data)
{
+ Self *self = data;
GParamSpec **properties;
unsigned int n_properties;
gboolean status = FALSE;
@@ -162,15 +159,15 @@ class MN:Message from G:Object
properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(self), &n_properties);
for (i = 0; i < n_properties; i++)
if ((properties[i]->flags & MN_MESSAGE_PARAM_EXPORT) != 0
- && ! strcmp(g_param_spec_get_name(properties[i]), prop_name))
+ && ! strcmp(g_param_spec_get_name(properties[i]), name))
{
- GValue value = { 0, };
+ GValue gvalue = { 0, };
- g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(properties[i]));
- g_object_get_property(G_OBJECT(self), prop_name, &value);
+ g_value_init(&gvalue, G_PARAM_SPEC_VALUE_TYPE(properties[i]));
+ g_object_get_property(G_OBJECT(self), name, &gvalue);
- *result = mn_g_value_to_string(&value);
- g_value_unset(&value);
+ *value = mn_g_value_to_string(&gvalue);
+ g_value_unset(&gvalue);
status = TRUE;
break;
@@ -180,96 +177,6 @@ class MN:Message from G:Object
return status;
}
- private char *
- subst_command (self, const char *command (check null), GError **err)
- {
- GString *result;
- const char *p;
-
- result = g_string_new(NULL);
-
- for (p = command; *p;)
- if (*p == '%')
- {
- char *prop_name = NULL;
-
- if (p[1] == '%')
- {
- g_string_append_c(result, '%');
- p += 2;
- }
- else if (p[1] == '{')
- {
- char *end;
-
- end = strchr(p + 2, '}');
- if (! end)
- {
- g_set_error(err, 0, 0, _("unterminated substitution"));
- goto error;
- }
-
- prop_name = g_strndup(p + 2, end - p - 2);
- p = end + 1;
- }
- else
- {
- const char *end = p + 1;
-
- while (g_ascii_isalnum(*end) || *end == '-' || *end == '_')
- end++;
-
- prop_name = g_strndup(p + 1, end - p - 1);
- p = end;
- }
-
- if (prop_name)
- {
- gboolean ok = FALSE;
-
- if (*prop_name)
- {
- char *value;
-
- if (self_get_subst(self, prop_name, &value))
- {
- char *quoted;
-
- quoted = mn_shell_quote_safe(value ? value : "");
- g_free(value);
-
- g_string_append(result, quoted);
- g_free(quoted);
-
- ok = TRUE;
- }
- else
- g_set_error(err, 0, 0, _("unknown substitution \"%s\""), prop_name);
- }
- else
- g_set_error(err, 0, 0, _("empty substitution"));
-
- g_free(prop_name);
- if (! ok)
- goto error;
- }
- }
- else
- {
- g_string_append_c(result, *p);
- p++;
- }
-
- goto end; /* success */
-
- error:
- g_string_free(result, TRUE);
- result = NULL;
-
- end:
- return result ? g_string_free(result, FALSE) : NULL;
- }
-
private gboolean
execute_command_real (self,
const char *command (check null),
@@ -278,7 +185,7 @@ class MN:Message from G:Object
char *subst;
int status;
- subst = self_subst_command(self, command, err);
+ subst = mn_subst_command(command, self_subst_command_cb, self, err);
if (! subst)
return FALSE;
@@ -337,7 +244,7 @@ class MN:Message from G:Object
if (self_execute_command(self, "open", &status, err))
{
- mn_mailbox_mark_as_read(self);
+ mn_mailbox_consider_as_read(self);
return status;
}
else
@@ -378,7 +285,7 @@ class MN:Message from G:Object
{
if (self_mark_as_read_real(self, err))
{
- mn_mailbox_mark_as_read(self);
+ mn_mailbox_consider_as_read(self);
return TRUE;
}
else
@@ -416,7 +323,7 @@ class MN:Message from G:Object
{
if (self_mark_as_spam_real(self, err))
{
- mn_mailbox_mark_as_read(self);
+ mn_mailbox_consider_as_read(self);
return TRUE;
}
else
@@ -449,12 +356,13 @@ class MN:Message from G:Object
return self_delete_impl(self, err);
}
+ /* If cancelled by the user, returns FALSE but do not sets @err. */
public gboolean
delete (self, GError **err)
{
if (self_delete_real(self, err))
{
- mn_mailbox_mark_as_read(self);
+ mn_mailbox_consider_as_read(self);
return TRUE;
}
else
diff --git a/src/mn-mh-mailbox-backend.c b/src/mn-mh-mailbox-backend.c
@@ -53,9 +53,10 @@ typedef MNMHMailboxBackendClass SelfClass;
/* here are local prototypes */
static void mn_mh_mailbox_backend_init (MNMHMailboxBackend * o) G_GNUC_UNUSED;
static void mn_mh_mailbox_backend_class_init (MNMHMailboxBackendClass * class) G_GNUC_UNUSED;
-static void ___2_mn_mh_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend, const char * info_uri, GnomeVFSMonitorEventType event_type) G_GNUC_UNUSED;
-static gboolean ___3_mn_mh_mailbox_backend_is (MNVFSMailboxBackend * dummy, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) G_GNUC_UNUSED;
-static void ___4_mn_mh_mailbox_backend_check (MNVFSMailboxBackend * backend, unsigned long check_id) G_GNUC_UNUSED;
+static GObject * ___2_mn_mh_mailbox_backend_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static void ___3_mn_mh_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend, const char * info_uri, GnomeVFSMonitorEventType event_type) G_GNUC_UNUSED;
+static gboolean ___4_mn_mh_mailbox_backend_is (MNVFSMailboxBackend * dummy, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) G_GNUC_UNUSED;
+static void ___5_mn_mh_mailbox_backend_check (MNVFSMailboxBackend * backend, int check_id) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static MNVFSMailboxBackendClass *parent_class = NULL;
@@ -111,26 +112,29 @@ mn_mh_mailbox_backend_init (MNMHMailboxBackend * o G_GNUC_UNUSED)
#line 42 "mn-mh-mailbox-backend.gob"
static void
mn_mh_mailbox_backend_class_init (MNMHMailboxBackendClass * class G_GNUC_UNUSED)
-#line 115 "mn-mh-mailbox-backend.c"
+#line 116 "mn-mh-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:MH:Mailbox:Backend::class_init"
+ GObjectClass *g_object_class = (GObjectClass *)class;
MNVFSMailboxBackendClass *mn_vfs_mailbox_backend_class = (MNVFSMailboxBackendClass *)class;
parent_class = g_type_class_ref (MN_TYPE_VFS_MAILBOX_BACKEND);
#line 47 "mn-mh-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->monitor_cb = ___2_mn_mh_mailbox_backend_monitor_cb;
-#line 69 "mn-mh-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->is = ___3_mn_mh_mailbox_backend_is;
-#line 84 "mn-mh-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->check = ___4_mn_mh_mailbox_backend_check;
-#line 128 "mn-mh-mailbox-backend.c"
+ g_object_class->constructor = ___2_mn_mh_mailbox_backend_constructor;
+#line 66 "mn-mh-mailbox-backend.gob"
+ mn_vfs_mailbox_backend_class->monitor_cb = ___3_mn_mh_mailbox_backend_monitor_cb;
+#line 88 "mn-mh-mailbox-backend.gob"
+ mn_vfs_mailbox_backend_class->is = ___4_mn_mh_mailbox_backend_is;
+#line 103 "mn-mh-mailbox-backend.gob"
+ mn_vfs_mailbox_backend_class->check = ___5_mn_mh_mailbox_backend_check;
+#line 132 "mn-mh-mailbox-backend.c"
{
#line 43 "mn-mh-mailbox-backend.gob"
MN_VFS_MAILBOX_BACKEND_CLASS(class)->format = "MH";
-#line 134 "mn-mh-mailbox-backend.c"
+#line 138 "mn-mh-mailbox-backend.c"
}
}
#undef __GOB_FUNCTION__
@@ -138,16 +142,48 @@ mn_mh_mailbox_backend_class_init (MNMHMailboxBackendClass * class G_GNUC_UNUSED)
#line 47 "mn-mh-mailbox-backend.gob"
+static GObject *
+___2_mn_mh_mailbox_backend_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 148 "mn-mh-mailbox-backend.c"
+#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
+ ((G_OBJECT_CLASS(parent_class)->constructor)? \
+ (* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
+ ((GObject * )0))
+{
+#define __GOB_FUNCTION__ "MN:MH:Mailbox:Backend::constructor"
+{
+#line 49 "mn-mh-mailbox-backend.gob"
+
+ GObject *object;
+ MNVFSMailboxBackend *backend;
+
+ object = PARENT_HANDLER(type, n_construct_properties, construct_params);
+ backend = MN_VFS_MAILBOX_BACKEND(object);
+
+ /*
+ * There is no standard way of locking a MH mailbox, so avoid race
+ * conditions by setting a check latency of 3 seconds.
+ */
+
+ backend->check_latency = 3000;
+
+ return object;
+ }}
+#line 173 "mn-mh-mailbox-backend.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 66 "mn-mh-mailbox-backend.gob"
static void
-___2_mn_mh_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend G_GNUC_UNUSED, const char * info_uri, GnomeVFSMonitorEventType event_type)
-#line 144 "mn-mh-mailbox-backend.c"
+___3_mn_mh_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend G_GNUC_UNUSED, const char * info_uri, GnomeVFSMonitorEventType event_type)
+#line 180 "mn-mh-mailbox-backend.c"
#define PARENT_HANDLER(___backend,___info_uri,___event_type) \
{ if(MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb) \
(* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb)(___backend,___info_uri,___event_type); }
{
#define __GOB_FUNCTION__ "MN:MH:Mailbox:Backend::monitor_cb"
{
-#line 51 "mn-mh-mailbox-backend.gob"
+#line 70 "mn-mh-mailbox-backend.gob"
if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED
|| event_type == GNOME_VFS_MONITOR_EVENT_DELETED
@@ -159,20 +195,20 @@ ___2_mn_mh_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend G_GNUC_UNUS
if (filename)
{
if (! strcmp(filename, SEQUENCES_FILE) || mn_str_isnumeric(filename))
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(backend->mailbox));
+ mn_vfs_mailbox_backend_queue_check(backend);
g_free(filename);
}
}
}}
-#line 169 "mn-mh-mailbox-backend.c"
+#line 205 "mn-mh-mailbox-backend.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 69 "mn-mh-mailbox-backend.gob"
+#line 88 "mn-mh-mailbox-backend.gob"
static gboolean
-___3_mn_mh_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox)
-#line 176 "mn-mh-mailbox-backend.c"
+___4_mn_mh_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox)
+#line 212 "mn-mh-mailbox-backend.c"
#define PARENT_HANDLER(___dummy,___class,___mailbox) \
((MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->is)? \
(* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->is)(___dummy,___class,___mailbox): \
@@ -180,7 +216,7 @@ ___3_mn_mh_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSM
{
#define __GOB_FUNCTION__ "MN:MH:Mailbox:Backend::is"
{
-#line 73 "mn-mh-mailbox-backend.gob"
+#line 92 "mn-mh-mailbox-backend.gob"
GnomeVFSURI *sequences_uri;
gboolean is;
@@ -191,21 +227,21 @@ ___3_mn_mh_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSM
return is;
}}
-#line 195 "mn-mh-mailbox-backend.c"
+#line 231 "mn-mh-mailbox-backend.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 84 "mn-mh-mailbox-backend.gob"
+#line 103 "mn-mh-mailbox-backend.gob"
static void
-___4_mn_mh_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, unsigned long check_id)
-#line 202 "mn-mh-mailbox-backend.c"
+___5_mn_mh_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, int check_id)
+#line 238 "mn-mh-mailbox-backend.c"
#define PARENT_HANDLER(___backend,___check_id) \
{ if(MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->check) \
(* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->check)(___backend,___check_id); }
{
#define __GOB_FUNCTION__ "MN:MH:Mailbox:Backend::check"
{
-#line 86 "mn-mh-mailbox-backend.gob"
+#line 105 "mn-mh-mailbox-backend.gob"
GnomeVFSURI *sequences_uri;
GnomeVFSResult result;
@@ -287,7 +323,7 @@ ___4_mn_mh_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, u
GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
{
if (result == GNOME_VFS_ERROR_EOF || result == GNOME_VFS_OK)
{
@@ -307,15 +343,17 @@ ___4_mn_mh_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, u
}
else
{
- GDK_THREADS_ENTER();
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ {
+ GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open %s: %s"), SEQUENCES_FILE, gnome_vfs_result_to_string(result));
+ mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open %s: %s"), SEQUENCES_FILE, gnome_vfs_result_to_string(result));
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
}
}}
-#line 320 "mn-mh-mailbox-backend.c"
+#line 358 "mn-mh-mailbox-backend.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
diff --git a/src/mn-mh-mailbox-backend.gob b/src/mn-mh-mailbox-backend.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -44,6 +44,25 @@ class MN:MH:Mailbox:Backend from MN:VFS:Mailbox:Backend
MN_VFS_MAILBOX_BACKEND_CLASS(class)->format = "MH";
}
+ override (G:Object) GObject *
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
+ {
+ GObject *object;
+ MNVFSMailboxBackend *backend;
+
+ object = PARENT_HANDLER(type, n_construct_properties, construct_params);
+ backend = MN_VFS_MAILBOX_BACKEND(object);
+
+ /*
+ * There is no standard way of locking a MH mailbox, so avoid race
+ * conditions by setting a check latency of 3 seconds.
+ */
+
+ backend->check_latency = 3000;
+
+ return object;
+ }
+
override (MN:VFS:Mailbox:Backend) void
monitor_cb (MNVFSMailboxBackend *backend,
const char *info_uri,
@@ -59,7 +78,7 @@ class MN:MH:Mailbox:Backend from MN:VFS:Mailbox:Backend
if (filename)
{
if (! strcmp(filename, SEQUENCES_FILE) || mn_str_isnumeric(filename))
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(backend->mailbox));
+ mn_vfs_mailbox_backend_queue_check(backend);
g_free(filename);
}
@@ -82,7 +101,7 @@ class MN:MH:Mailbox:Backend from MN:VFS:Mailbox:Backend
}
override (MN:VFS:Mailbox:Backend) void
- check (MNVFSMailboxBackend *backend, unsigned long check_id)
+ check (MNVFSMailboxBackend *backend, int check_id)
{
GnomeVFSURI *sequences_uri;
GnomeVFSResult result;
@@ -164,7 +183,7 @@ class MN:MH:Mailbox:Backend from MN:VFS:Mailbox:Backend
GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
{
if (result == GNOME_VFS_ERROR_EOF || result == GNOME_VFS_OK)
{
@@ -184,13 +203,15 @@ class MN:MH:Mailbox:Backend from MN:VFS:Mailbox:Backend
}
else
{
- GDK_THREADS_ENTER();
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ {
+ GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open %s: %s"), SEQUENCES_FILE, gnome_vfs_result_to_string(result));
+ mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open %s: %s"), SEQUENCES_FILE, gnome_vfs_result_to_string(result));
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
}
}
}
diff --git a/src/mn-mozilla-mailbox-backend.gob b/src/mn-mozilla-mailbox-backend.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-pi-mailbox-private.h b/src/mn-pi-mailbox-private.h
@@ -16,25 +16,23 @@ extern "C" {
#include "mn-client-session.h"
#define MN_PI_MAILBOX_SESSION_PRIVATE \
- MNMailbox *mailbox; \
- MNPIMailbox *pi_mailbox; \
- MNClientSession *session
+ MNMailbox *mailbox; \
+ MNAuthenticatedMailbox *auth_mailbox; \
+ MNPIMailbox *pi_mailbox; \
+ MNClientSession *session
-#line 24 "mn-pi-mailbox-private.h"
+#line 25 "mn-pi-mailbox-private.h"
struct _MNPIMailboxPrivate {
-#line 93 "mn-pi-mailbox.gob"
- GtkWidget * auth_dialog;
-#line 96 "mn-pi-mailbox.gob"
- gboolean auth_failed;
-#line 30 "mn-pi-mailbox-private.h"
+#line 89 "mn-pi-mailbox.gob"
+ GtkWidget * untrusted_dialog;
+#line 29 "mn-pi-mailbox-private.h"
};
-gboolean mn_pi_mailbox_split_uri (const char * uri, int maxlen, char * scheme, char * auth, char * location, gboolean * has_auth);
-gboolean mn_pi_mailbox_split_uri_auth (const char * auth, int maxlen, char * username, char * authmech, gboolean * has_username, gboolean * has_authmech);
+gboolean mn_pi_mailbox_split_uri (const char * uri, int maxlen, char * scheme, char * auth, char * location);
+gboolean mn_pi_mailbox_split_uri_auth (const char * auth, int maxlen, char * username, char * authmech, gboolean * has_authmech);
void mn_pi_mailbox_split_uri_hostport (const char * hostport, int maxlen, char * hostname, int * port);
-void mn_pi_mailbox_auth_failed (MNPIMailbox * self);
-gboolean mn_pi_mailbox_fill_credentials (MNPIMailbox * self, gboolean need_username, gboolean need_password);
void mn_pi_mailbox_session_private_init (MNPIMailbox * self, MNClientSessionPrivate * priv);
gboolean mn_pi_mailbox_sasl_get_credentials_cb (MNClientSession * session, MNClientSessionPrivate * priv, const char ** username, const char ** password);
+gboolean mn_pi_mailbox_ssl_trust_server_cb (MNClientSession * session, const char * server, int port, const char * fingerprint, const char * verify_error, MNClientSessionPrivate * priv);
void mn_pi_mailbox_notice_cb (MNClientSession * session, const char * message, MNClientSessionPrivate * priv);
void mn_pi_mailbox_warning_cb (MNClientSession * session, const char * message, MNClientSessionPrivate * priv);
diff --git a/src/mn-pi-mailbox-properties-private.h b/src/mn-pi-mailbox-properties-private.h
@@ -10,6 +10,7 @@ extern "C" {
#endif /* __cplusplus */
void mn_pi_mailbox_properties_get_contents (MNPIMailboxProperties * self, MNPIMailboxConnectionType * connection_type, char ** authmech, const char ** server, int * port);
+gboolean mn_pi_mailbox_properties_is_complete (MNPIMailboxProperties * self);
#ifdef __cplusplus
}
diff --git a/src/mn-pi-mailbox-properties.c b/src/mn-pi-mailbox-properties.c
@@ -49,6 +49,7 @@ typedef MNPIMailboxProperties Self;
typedef MNPIMailboxPropertiesClass SelfClass;
/* here are local prototypes */
+static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void mn_pi_mailbox_properties_class_init (MNPIMailboxPropertiesClass * class) G_GNUC_UNUSED;
static void mn_pi_mailbox_properties_init (MNPIMailboxProperties * self) G_GNUC_UNUSED;
static void mn_pi_mailbox_properties_add_connection_type (MNPIMailboxProperties * self, GtkBox * type_vbox, MNPIMailboxConnectionType type, const char * mnemonic) G_GNUC_UNUSED;
@@ -59,6 +60,11 @@ static void ___7_mn_pi_mailbox_properties_deactivate (MNMailboxProperties * prop
static void ___8_mn_pi_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED;
static MNMailbox * ___9_mn_pi_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED;
+enum {
+ PROP_0,
+ PROP_COMPLETE
+};
+
/* pointer to the class of our parent */
static MNAuthenticatedMailboxPropertiesClass *parent_class = NULL;
@@ -67,6 +73,7 @@ static MNAuthenticatedMailboxPropertiesClass *parent_class = NULL;
#define self_add_authentication mn_pi_mailbox_properties_add_authentication
#define self_radio_toggled_h mn_pi_mailbox_properties_radio_toggled_h
#define self_get_contents mn_pi_mailbox_properties_get_contents
+#define self_is_complete mn_pi_mailbox_properties_is_complete
GType
mn_pi_mailbox_properties_get_type (void)
{
@@ -119,17 +126,17 @@ ___dispose (GObject *obj_self)
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
#line 43 "mn-pi-mailbox-properties.gob"
if(self->connection_page) { g_object_unref ((gpointer) self->connection_page); self->connection_page = NULL; }
-#line 123 "mn-pi-mailbox-properties.c"
+#line 130 "mn-pi-mailbox-properties.c"
#line 44 "mn-pi-mailbox-properties.gob"
if(self->connection_size_group) { g_object_unref ((gpointer) self->connection_size_group); self->connection_size_group = NULL; }
-#line 126 "mn-pi-mailbox-properties.c"
+#line 133 "mn-pi-mailbox-properties.c"
}
#undef __GOB_FUNCTION__
-#line 49 "mn-pi-mailbox-properties.gob"
+#line 55 "mn-pi-mailbox-properties.gob"
static void
mn_pi_mailbox_properties_class_init (MNPIMailboxPropertiesClass * class G_GNUC_UNUSED)
-#line 133 "mn-pi-mailbox-properties.c"
+#line 140 "mn-pi-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -137,38 +144,44 @@ mn_pi_mailbox_properties_class_init (MNPIMailboxPropertiesClass * class G_GNUC_U
parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES);
-#line 197 "mn-pi-mailbox-properties.gob"
+#line 206 "mn-pi-mailbox-properties.gob"
mn_mailbox_properties_class->activate = ___6_mn_pi_mailbox_properties_activate;
-#line 208 "mn-pi-mailbox-properties.gob"
+#line 217 "mn-pi-mailbox-properties.gob"
mn_mailbox_properties_class->deactivate = ___7_mn_pi_mailbox_properties_deactivate;
-#line 216 "mn-pi-mailbox-properties.gob"
+#line 225 "mn-pi-mailbox-properties.gob"
mn_mailbox_properties_class->set_mailbox = ___8_mn_pi_mailbox_properties_set_mailbox;
-#line 230 "mn-pi-mailbox-properties.gob"
+#line 239 "mn-pi-mailbox-properties.gob"
mn_mailbox_properties_class->get_mailbox = ___9_mn_pi_mailbox_properties_get_mailbox;
-#line 149 "mn-pi-mailbox-properties.c"
+#line 156 "mn-pi-mailbox-properties.c"
g_object_class->dispose = ___dispose;
+ g_object_class->get_property = ___object_get_property;
+ {
+ g_object_class_override_property (g_object_class,
+ PROP_COMPLETE,
+ "complete");
+ }
{
-#line 50 "mn-pi-mailbox-properties.gob"
+#line 56 "mn-pi-mailbox-properties.gob"
MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
p_class->stock_id = MN_STOCK_REMOTE;
-#line 158 "mn-pi-mailbox-properties.c"
+#line 171 "mn-pi-mailbox-properties.c"
}
}
#undef __GOB_FUNCTION__
-#line 56 "mn-pi-mailbox-properties.gob"
+#line 62 "mn-pi-mailbox-properties.gob"
static void
mn_pi_mailbox_properties_init (MNPIMailboxProperties * self G_GNUC_UNUSED)
-#line 165 "mn-pi-mailbox-properties.c"
+#line 178 "mn-pi-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::init"
#line 44 "mn-pi-mailbox-properties.gob"
self->connection_size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
-#line 170 "mn-pi-mailbox-properties.c"
+#line 183 "mn-pi-mailbox-properties.c"
{
-#line 57 "mn-pi-mailbox-properties.gob"
+#line 63 "mn-pi-mailbox-properties.gob"
MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self);
MNAuthenticatedMailboxProperties *auth = MN_AUTHENTICATED_MAILBOX_PROPERTIES(self);
@@ -236,32 +249,68 @@ mn_pi_mailbox_properties_init (MNPIMailboxProperties * self G_GNUC_UNUSED)
"swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
NULL);
- g_signal_connect_swapped(auth->username_entry, "changed", G_CALLBACK(mn_mailbox_properties_notify_default_name), self);
+ g_object_connect(auth->username_entry,
+ "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
+ "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
+ NULL);
-#line 242 "mn-pi-mailbox-properties.c"
+#line 258 "mn-pi-mailbox-properties.c"
}
}
#undef __GOB_FUNCTION__
+static void
+___object_get_property (GObject *object,
+ guint property_id,
+ GValue *VAL G_GNUC_UNUSED,
+ GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::get_property"
+{
+ MNPIMailboxProperties *self G_GNUC_UNUSED;
+
+ self = MN_PI_MAILBOX_PROPERTIES (object);
+
+ switch (property_id) {
+ case PROP_COMPLETE:
+ {
+#line 51 "mn-pi-mailbox-properties.gob"
+
+ g_value_set_boolean(VAL, self_is_complete(self));
+
+#line 281 "mn-pi-mailbox-properties.c"
+ }
+ break;
+ default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+# undef G_STRLOC
+# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+#undef __GOB_FUNCTION__
+
-#line 127 "mn-pi-mailbox-properties.gob"
+#line 136 "mn-pi-mailbox-properties.gob"
static void
mn_pi_mailbox_properties_add_connection_type (MNPIMailboxProperties * self, GtkBox * type_vbox, MNPIMailboxConnectionType type, const char * mnemonic)
-#line 252 "mn-pi-mailbox-properties.c"
+#line 301 "mn-pi-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::add_connection_type"
-#line 127 "mn-pi-mailbox-properties.gob"
+#line 136 "mn-pi-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 127 "mn-pi-mailbox-properties.gob"
+#line 136 "mn-pi-mailbox-properties.gob"
g_return_if_fail (MN_IS_PI_MAILBOX_PROPERTIES (self));
-#line 127 "mn-pi-mailbox-properties.gob"
+#line 136 "mn-pi-mailbox-properties.gob"
g_return_if_fail (type_vbox != NULL);
-#line 127 "mn-pi-mailbox-properties.gob"
+#line 136 "mn-pi-mailbox-properties.gob"
g_return_if_fail (mnemonic != NULL);
-#line 263 "mn-pi-mailbox-properties.c"
+#line 312 "mn-pi-mailbox-properties.c"
{
-#line 132 "mn-pi-mailbox-properties.gob"
+#line 141 "mn-pi-mailbox-properties.gob"
GtkWidget *hbox;
GtkWidget *port_label;
@@ -287,22 +336,22 @@ mn_pi_mailbox_properties_add_connection_type (MNPIMailboxProperties * self, GtkB
g_signal_connect(self->conn_radio[type], "toggled", G_CALLBACK(self_radio_toggled_h), self);
}}
-#line 291 "mn-pi-mailbox-properties.c"
+#line 340 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 158 "mn-pi-mailbox-properties.gob"
+#line 167 "mn-pi-mailbox-properties.gob"
static void
mn_pi_mailbox_properties_add_authentication (MNPIMailboxProperties * self)
-#line 297 "mn-pi-mailbox-properties.c"
+#line 346 "mn-pi-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::add_authentication"
-#line 158 "mn-pi-mailbox-properties.gob"
+#line 167 "mn-pi-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 158 "mn-pi-mailbox-properties.gob"
+#line 167 "mn-pi-mailbox-properties.gob"
g_return_if_fail (MN_IS_PI_MAILBOX_PROPERTIES (self));
-#line 304 "mn-pi-mailbox-properties.c"
+#line 353 "mn-pi-mailbox-properties.c"
{
-#line 160 "mn-pi-mailbox-properties.gob"
+#line 169 "mn-pi-mailbox-properties.gob"
GtkWidget *section;
GtkWidget *vbox;
@@ -326,24 +375,24 @@ mn_pi_mailbox_properties_add_authentication (MNPIMailboxProperties * self)
gtk_size_group_add_widget(self->connection_size_group, label);
}}
-#line 330 "mn-pi-mailbox-properties.c"
+#line 379 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 184 "mn-pi-mailbox-properties.gob"
+#line 193 "mn-pi-mailbox-properties.gob"
static void
mn_pi_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data)
-#line 336 "mn-pi-mailbox-properties.c"
+#line 385 "mn-pi-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::radio_toggled_h"
-#line 184 "mn-pi-mailbox-properties.gob"
+#line 193 "mn-pi-mailbox-properties.gob"
g_return_if_fail (togglebutton != NULL);
-#line 184 "mn-pi-mailbox-properties.gob"
+#line 193 "mn-pi-mailbox-properties.gob"
g_return_if_fail (GTK_IS_TOGGLE_BUTTON (togglebutton));
-#line 184 "mn-pi-mailbox-properties.gob"
+#line 193 "mn-pi-mailbox-properties.gob"
g_return_if_fail (user_data != NULL);
-#line 345 "mn-pi-mailbox-properties.c"
+#line 394 "mn-pi-mailbox-properties.c"
{
-#line 187 "mn-pi-mailbox-properties.gob"
+#line 196 "mn-pi-mailbox-properties.gob"
Self *self = user_data;
int i;
@@ -353,20 +402,20 @@ mn_pi_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpoint
g_object_notify(G_OBJECT(self), "complete");
}}
-#line 357 "mn-pi-mailbox-properties.c"
+#line 406 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
-#line 197 "mn-pi-mailbox-properties.gob"
+#line 206 "mn-pi-mailbox-properties.gob"
static void
___6_mn_pi_mailbox_properties_activate (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 363 "mn-pi-mailbox-properties.c"
+#line 412 "mn-pi-mailbox-properties.c"
#define PARENT_HANDLER(___properties) \
{ if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->activate) \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->activate)(___properties); }
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::activate"
{
-#line 199 "mn-pi-mailbox-properties.gob"
+#line 208 "mn-pi-mailbox-properties.gob"
Self *self = SELF(properties);
@@ -375,41 +424,41 @@ ___6_mn_pi_mailbox_properties_activate (MNMailboxProperties * properties G_GNUC_
gtk_notebook_insert_page(GTK_NOTEBOOK(MN_MAILBOX_PROPERTIES_DIALOG(properties->dialog)->notebook), self->connection_page, NULL, 1);
gtk_notebook_set_tab_label_text(GTK_NOTEBOOK(MN_MAILBOX_PROPERTIES_DIALOG(properties->dialog)->notebook), self->connection_page, _("Connection"));
}}
-#line 379 "mn-pi-mailbox-properties.c"
+#line 428 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 208 "mn-pi-mailbox-properties.gob"
+#line 217 "mn-pi-mailbox-properties.gob"
static void
___7_mn_pi_mailbox_properties_deactivate (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 386 "mn-pi-mailbox-properties.c"
+#line 435 "mn-pi-mailbox-properties.c"
#define PARENT_HANDLER(___properties) \
{ if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->deactivate) \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->deactivate)(___properties); }
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::deactivate"
{
-#line 210 "mn-pi-mailbox-properties.gob"
+#line 219 "mn-pi-mailbox-properties.gob"
PARENT_HANDLER(properties);
gtk_notebook_remove_page(GTK_NOTEBOOK(MN_MAILBOX_PROPERTIES_DIALOG(properties->dialog)->notebook), 1);
}}
-#line 399 "mn-pi-mailbox-properties.c"
+#line 448 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 216 "mn-pi-mailbox-properties.gob"
+#line 225 "mn-pi-mailbox-properties.gob"
static void
___8_mn_pi_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox)
-#line 406 "mn-pi-mailbox-properties.c"
+#line 455 "mn-pi-mailbox-properties.c"
#define PARENT_HANDLER(___properties,___mailbox) \
{ if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox) \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox)(___properties,___mailbox); }
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::set_mailbox"
{
-#line 218 "mn-pi-mailbox-properties.gob"
+#line 227 "mn-pi-mailbox-properties.gob"
Self *self = SELF(properties);
MNPIMailbox *pi_mailbox = MN_PI_MAILBOX(mailbox);
@@ -421,14 +470,14 @@ ___8_mn_pi_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GN
gtk_entry_set_text(GTK_ENTRY(self->server_entry), pi_mailbox->hostname);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(self->port_spin[pi_mailbox->connection_type]), pi_mailbox->runtime_port);
}}
-#line 425 "mn-pi-mailbox-properties.c"
+#line 474 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 230 "mn-pi-mailbox-properties.gob"
+#line 239 "mn-pi-mailbox-properties.gob"
static MNMailbox *
___9_mn_pi_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED)
-#line 432 "mn-pi-mailbox-properties.c"
+#line 481 "mn-pi-mailbox-properties.c"
#define PARENT_HANDLER(___properties) \
((MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)? \
(* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)(___properties): \
@@ -436,7 +485,7 @@ ___9_mn_pi_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GN
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::get_mailbox"
{
-#line 232 "mn-pi-mailbox-properties.gob"
+#line 241 "mn-pi-mailbox-properties.gob"
MNMailbox *mailbox;
MNPIMailboxConnectionType connection_type;
@@ -463,23 +512,23 @@ ___9_mn_pi_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GN
return mailbox;
}}
-#line 467 "mn-pi-mailbox-properties.c"
+#line 516 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 259 "mn-pi-mailbox-properties.gob"
+#line 268 "mn-pi-mailbox-properties.gob"
void
mn_pi_mailbox_properties_get_contents (MNPIMailboxProperties * self, MNPIMailboxConnectionType * connection_type, char ** authmech, const char ** server, int * port)
-#line 474 "mn-pi-mailbox-properties.c"
+#line 523 "mn-pi-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::get_contents"
-#line 259 "mn-pi-mailbox-properties.gob"
+#line 268 "mn-pi-mailbox-properties.gob"
g_return_if_fail (self != NULL);
-#line 259 "mn-pi-mailbox-properties.gob"
+#line 268 "mn-pi-mailbox-properties.gob"
g_return_if_fail (MN_IS_PI_MAILBOX_PROPERTIES (self));
-#line 481 "mn-pi-mailbox-properties.c"
+#line 530 "mn-pi-mailbox-properties.c"
{
-#line 265 "mn-pi-mailbox-properties.gob"
+#line 274 "mn-pi-mailbox-properties.gob"
MNPIMailboxConnectionType _connection_type;
@@ -508,5 +557,38 @@ mn_pi_mailbox_properties_get_contents (MNPIMailboxProperties * self, MNPIMailbox
if (port)
*port = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(self->port_spin[_connection_type]));
}}
-#line 512 "mn-pi-mailbox-properties.c"
+#line 561 "mn-pi-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 303 "mn-pi-mailbox-properties.gob"
+gboolean
+mn_pi_mailbox_properties_is_complete (MNPIMailboxProperties * self)
+#line 567 "mn-pi-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:PI:Mailbox:Properties::is_complete"
+#line 303 "mn-pi-mailbox-properties.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 303 "mn-pi-mailbox-properties.gob"
+ g_return_val_if_fail (MN_IS_PI_MAILBOX_PROPERTIES (self), (gboolean )0);
+#line 574 "mn-pi-mailbox-properties.c"
+{
+#line 305 "mn-pi-mailbox-properties.gob"
+
+ const char *server;
+
+ if (! mn_authenticated_mailbox_properties_is_complete(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self)))
+ return FALSE;
+
+ server = gtk_entry_get_text(GTK_ENTRY(self->server_entry));
+ if (! *server)
+ return FALSE;
+
+#if ! WITH_SSL
+ if (! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pi->conn_radio[MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL])))
+ return FALSE;
+#endif /* WITH_SSL */
+
+ return TRUE;
+ }}
+#line 594 "mn-pi-mailbox-properties.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-pi-mailbox-properties.gob b/src/mn-pi-mailbox-properties.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -46,6 +46,12 @@ class MN:PI:Mailbox:Properties from MN:Authenticated:Mailbox:Properties (abstrac
protected GtkWidget *port_spin[MN_PI_MAILBOX_N_CONNECTION_TYPES];
protected GtkWidget *auth_combo;
+ property BOOLEAN complete (override)
+ get
+ {
+ g_value_set_boolean(VAL, self_is_complete(self));
+ };
+
class_init (class)
{
MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
@@ -121,7 +127,10 @@ class MN:PI:Mailbox:Properties from MN:Authenticated:Mailbox:Properties (abstrac
"swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
NULL);
- g_signal_connect_swapped(auth->username_entry, "changed", G_CALLBACK(mn_mailbox_properties_notify_default_name), self);
+ g_object_connect(auth->username_entry,
+ "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
+ "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
+ NULL);
}
private void
@@ -290,4 +299,24 @@ class MN:PI:Mailbox:Properties from MN:Authenticated:Mailbox:Properties (abstrac
if (port)
*port = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(self->port_spin[_connection_type]));
}
+
+ protected gboolean
+ is_complete (self)
+ {
+ const char *server;
+
+ if (! mn_authenticated_mailbox_properties_is_complete(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self)))
+ return FALSE;
+
+ server = gtk_entry_get_text(GTK_ENTRY(self->server_entry));
+ if (! *server)
+ return FALSE;
+
+#if ! WITH_SSL
+ if (! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pi->conn_radio[MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL])))
+ return FALSE;
+#endif /* WITH_SSL */
+
+ return TRUE;
+ }
}
diff --git a/src/mn-pi-mailbox-properties.h b/src/mn-pi-mailbox-properties.h
@@ -59,6 +59,16 @@ struct _MNPIMailboxPropertiesClass {
*/
GType mn_pi_mailbox_properties_get_type (void);
+/*
+ * Argument wrapping macros
+ */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_PI_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;})
+#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_PI_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg)
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/src/mn-pi-mailbox.c b/src/mn-pi-mailbox.c
@@ -22,25 +22,23 @@
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */
-#line 40 "mn-pi-mailbox.gob"
+#line 41 "mn-pi-mailbox.gob"
#include "config.h"
#include <glib/gi18n.h>
-#include <gnome.h>
#include <eel/eel.h>
+#include "mn-authenticated-mailbox-private.h"
#include "mn-mailbox-private.h"
#include "mn-util.h"
#include "mn-stock.h"
-
-static GHashTable *password_database;
-G_LOCK_DEFINE_STATIC(password_database);
+#include "mn-conf.h"
struct _MNClientSessionPrivate
{
MN_PI_MAILBOX_SESSION_PRIVATE;
};
-#line 44 "mn-pi-mailbox.c"
+#line 42 "mn-pi-mailbox.c"
static const GEnumValue _mn_pi_mailbox_connection_type_values[] = {
{ MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL, (char *)"MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL", (char *)"normal" },
{ MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL, (char *)"MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL", (char *)"inband-ssl" },
@@ -75,13 +73,10 @@ static void ___object_set_property (GObject *object, guint property_id, const GV
static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
static void mn_pi_mailbox_class_init (MNPIMailboxClass * class) G_GNUC_UNUSED;
static void mn_pi_mailbox_init (MNPIMailbox * self) G_GNUC_UNUSED;
-static void ___3_mn_pi_mailbox_removed (MNMailbox * mailbox) G_GNUC_UNUSED;
-static void ___4_mn_pi_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
+static void ___3_mn_pi_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
+static void ___4_mn_pi_mailbox_removed (MNMailbox * mailbox) G_GNUC_UNUSED;
static void ___5_mn_pi_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox) G_GNUC_UNUSED;
-static gboolean mn_pi_mailbox_credentials_prompt (MNPIMailbox * self, char ** username, char ** password, const char * format, ...) G_GNUC_UNUSED;
-static char * mn_pi_mailbox_build_auth_id (MNPIMailbox * self, const char * username) G_GNUC_UNUSED;
-static char * mn_pi_mailbox_get_password (MNPIMailbox * self, const char * username) G_GNUC_UNUSED;
-static void mn_pi_mailbox_set_password (MNPIMailbox * self, const char * username, const char * password) G_GNUC_UNUSED;
+static gboolean mn_pi_mailbox_run_untrusted_dialog (MNPIMailbox * self, const char * server, const char * reason, const char * cert_fingerprint) G_GNUC_UNUSED;
enum {
PROP_0,
@@ -98,14 +93,10 @@ static MNAuthenticatedMailboxClass *parent_class = NULL;
#define self_split_uri mn_pi_mailbox_split_uri
#define self_split_uri_auth mn_pi_mailbox_split_uri_auth
#define self_split_uri_hostport mn_pi_mailbox_split_uri_hostport
-#define self_auth_failed mn_pi_mailbox_auth_failed
-#define self_fill_credentials mn_pi_mailbox_fill_credentials
-#define self_credentials_prompt mn_pi_mailbox_credentials_prompt
-#define self_build_auth_id mn_pi_mailbox_build_auth_id
-#define self_get_password mn_pi_mailbox_get_password
-#define self_set_password mn_pi_mailbox_set_password
#define self_session_private_init mn_pi_mailbox_session_private_init
#define self_sasl_get_credentials_cb mn_pi_mailbox_sasl_get_credentials_cb
+#define self_ssl_trust_server_cb mn_pi_mailbox_ssl_trust_server_cb
+#define self_run_untrusted_dialog mn_pi_mailbox_run_untrusted_dialog
#define self_notice_cb mn_pi_mailbox_notice_cb
#define self_warning_cb mn_pi_mailbox_warning_cb
GType
@@ -159,25 +150,19 @@ ___finalize(GObject *obj_self)
gpointer priv G_GNUC_UNUSED = self->_priv;
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 75 "mn-pi-mailbox.gob"
+#line 74 "mn-pi-mailbox.gob"
if(self->authmech) { g_free ((gpointer) self->authmech); self->authmech = NULL; }
-#line 165 "mn-pi-mailbox.c"
-#line 79 "mn-pi-mailbox.gob"
+#line 156 "mn-pi-mailbox.c"
+#line 78 "mn-pi-mailbox.gob"
if(self->hostname) { g_free ((gpointer) self->hostname); self->hostname = NULL; }
-#line 168 "mn-pi-mailbox.c"
-#line 90 "mn-pi-mailbox.gob"
- if(self->runtime_username) { g_free ((gpointer) self->runtime_username); self->runtime_username = NULL; }
-#line 171 "mn-pi-mailbox.c"
-#line 91 "mn-pi-mailbox.gob"
- if(self->runtime_password) { g_free ((gpointer) self->runtime_password); self->runtime_password = NULL; }
-#line 174 "mn-pi-mailbox.c"
+#line 159 "mn-pi-mailbox.c"
}
#undef __GOB_FUNCTION__
-#line 98 "mn-pi-mailbox.gob"
+#line 91 "mn-pi-mailbox.gob"
static void
mn_pi_mailbox_class_init (MNPIMailboxClass * class G_GNUC_UNUSED)
-#line 181 "mn-pi-mailbox.c"
+#line 166 "mn-pi-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -188,13 +173,13 @@ mn_pi_mailbox_class_init (MNPIMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX);
-#line 114 "mn-pi-mailbox.gob"
- mn_mailbox_class->removed = ___3_mn_pi_mailbox_removed;
+#line 105 "mn-pi-mailbox.gob"
+ mn_mailbox_class->seal = ___3_mn_pi_mailbox_seal;
#line 125 "mn-pi-mailbox.gob"
- mn_mailbox_class->seal = ___4_mn_pi_mailbox_seal;
-#line 141 "mn-pi-mailbox.gob"
+ mn_mailbox_class->removed = ___4_mn_pi_mailbox_removed;
+#line 136 "mn-pi-mailbox.gob"
mn_authenticated_mailbox_class->authenticated_check = ___5_mn_pi_mailbox_authenticated_check;
-#line 198 "mn-pi-mailbox.c"
+#line 183 "mn-pi-mailbox.c"
g_object_class->finalize = ___finalize;
g_object_class->get_property = ___object_get_property;
g_object_class->set_property = ___object_set_property;
@@ -207,7 +192,7 @@ mn_pi_mailbox_class_init (MNPIMailboxClass * class G_GNUC_UNUSED)
NULL /* blurb */,
MN_TYPE_PI_MAILBOX_CONNECTION_TYPE /* enum_type */,
MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT | G_PARAM_CONSTRUCT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE | G_PARAM_CONSTRUCT));
g_object_class_install_property (g_object_class,
PROP_CONNECTION_TYPE,
param_spec);
@@ -216,7 +201,7 @@ mn_pi_mailbox_class_init (MNPIMailboxClass * class G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_AUTHMECH,
param_spec);
@@ -225,7 +210,7 @@ mn_pi_mailbox_class_init (MNPIMailboxClass * class G_GNUC_UNUSED)
NULL /* nick */,
NULL /* blurb */,
NULL /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_HOSTNAME,
param_spec);
@@ -236,15 +221,13 @@ mn_pi_mailbox_class_init (MNPIMailboxClass * class G_GNUC_UNUSED)
0 /* minimum */,
65535 /* maximum */,
0 /* default_value */,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_PERMANENT));
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_LOAD_SAVE));
g_object_class_install_property (g_object_class,
PROP_PORT,
param_spec);
}
{
-#line 99 "mn-pi-mailbox.gob"
-
- password_database = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
+#line 92 "mn-pi-mailbox.gob"
/*
* 5 minutes is a good default check delay for remote POP3/IMAP
@@ -252,23 +235,23 @@ mn_pi_mailbox_class_init (MNPIMailboxClass * class G_GNUC_UNUSED)
*/
MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 5;
-#line 256 "mn-pi-mailbox.c"
+#line 239 "mn-pi-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 109 "mn-pi-mailbox.gob"
+#line 100 "mn-pi-mailbox.gob"
static void
mn_pi_mailbox_init (MNPIMailbox * self G_GNUC_UNUSED)
-#line 263 "mn-pi-mailbox.c"
+#line 246 "mn-pi-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_PI_MAILBOX,MNPIMailboxPrivate);
{
-#line 110 "mn-pi-mailbox.gob"
+#line 101 "mn-pi-mailbox.gob"
mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_REMOTE);
-#line 272 "mn-pi-mailbox.c"
+#line 255 "mn-pi-mailbox.c"
}
}
#undef __GOB_FUNCTION__
@@ -287,30 +270,30 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_CONNECTION_TYPE:
{
-#line 70 "mn-pi-mailbox.gob"
+#line 69 "mn-pi-mailbox.gob"
self->connection_type = g_value_get_enum (VAL);
-#line 293 "mn-pi-mailbox.c"
+#line 276 "mn-pi-mailbox.c"
}
break;
case PROP_AUTHMECH:
{
-#line 76 "mn-pi-mailbox.gob"
+#line 75 "mn-pi-mailbox.gob"
{ char *old = self->authmech; self->authmech = g_value_dup_string (VAL); g_free (old); }
-#line 300 "mn-pi-mailbox.c"
+#line 283 "mn-pi-mailbox.c"
}
break;
case PROP_HOSTNAME:
{
-#line 80 "mn-pi-mailbox.gob"
+#line 79 "mn-pi-mailbox.gob"
{ char *old = self->hostname; self->hostname = g_value_dup_string (VAL); g_free (old); }
-#line 307 "mn-pi-mailbox.c"
+#line 290 "mn-pi-mailbox.c"
}
break;
case PROP_PORT:
{
-#line 83 "mn-pi-mailbox.gob"
+#line 82 "mn-pi-mailbox.gob"
self->port = g_value_get_int (VAL);
-#line 314 "mn-pi-mailbox.c"
+#line 297 "mn-pi-mailbox.c"
}
break;
default:
@@ -339,30 +322,30 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_CONNECTION_TYPE:
{
-#line 70 "mn-pi-mailbox.gob"
+#line 69 "mn-pi-mailbox.gob"
g_value_set_enum (VAL, self->connection_type);
-#line 345 "mn-pi-mailbox.c"
+#line 328 "mn-pi-mailbox.c"
}
break;
case PROP_AUTHMECH:
{
-#line 76 "mn-pi-mailbox.gob"
+#line 75 "mn-pi-mailbox.gob"
g_value_set_string (VAL, self->authmech);
-#line 352 "mn-pi-mailbox.c"
+#line 335 "mn-pi-mailbox.c"
}
break;
case PROP_HOSTNAME:
{
-#line 80 "mn-pi-mailbox.gob"
+#line 79 "mn-pi-mailbox.gob"
g_value_set_string (VAL, self->hostname);
-#line 359 "mn-pi-mailbox.c"
+#line 342 "mn-pi-mailbox.c"
}
break;
case PROP_PORT:
{
-#line 83 "mn-pi-mailbox.gob"
+#line 82 "mn-pi-mailbox.gob"
g_value_set_int (VAL, self->port);
-#line 366 "mn-pi-mailbox.c"
+#line 349 "mn-pi-mailbox.c"
}
break;
default:
@@ -379,38 +362,47 @@ g_value_set_int (VAL, self->port);
-#line 114 "mn-pi-mailbox.gob"
+#line 105 "mn-pi-mailbox.gob"
static void
-___3_mn_pi_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 386 "mn-pi-mailbox.c"
+___3_mn_pi_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
+#line 369 "mn-pi-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
- { if(MN_MAILBOX_CLASS(parent_class)->removed) \
- (* MN_MAILBOX_CLASS(parent_class)->removed)(___mailbox); }
+ { if(MN_MAILBOX_CLASS(parent_class)->seal) \
+ (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::removed"
+#define __GOB_FUNCTION__ "MN:PI:Mailbox::seal"
{
-#line 116 "mn-pi-mailbox.gob"
+#line 107 "mn-pi-mailbox.gob"
+ MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
Self *self = SELF(mailbox);
- if (selfp->auth_dialog)
- gtk_dialog_response(GTK_DIALOG(selfp->auth_dialog), GTK_RESPONSE_CANCEL);
-
PARENT_HANDLER(mailbox);
+
+ /* do not save default port to mailboxes.xml */
+ if (self->port == SELF_GET_CLASS(self)->default_ports[self->connection_type])
+ self->port = 0;
+
+ self->runtime_port = self->port == 0
+ ? SELF_GET_CLASS(self)->default_ports[self->connection_type]
+ : self->port;
+
+ auth_mailbox->keyring_server = g_strdup(self->hostname);
+ auth_mailbox->keyring_port = self->runtime_port;
}}
-#line 402 "mn-pi-mailbox.c"
+#line 394 "mn-pi-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
#line 125 "mn-pi-mailbox.gob"
static void
-___4_mn_pi_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 409 "mn-pi-mailbox.c"
+___4_mn_pi_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
+#line 401 "mn-pi-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
- { if(MN_MAILBOX_CLASS(parent_class)->seal) \
- (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
+ { if(MN_MAILBOX_CLASS(parent_class)->removed) \
+ (* MN_MAILBOX_CLASS(parent_class)->removed)(___mailbox); }
{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::seal"
+#define __GOB_FUNCTION__ "MN:PI:Mailbox::removed"
{
#line 127 "mn-pi-mailbox.gob"
@@ -418,32 +410,25 @@ ___4_mn_pi_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
PARENT_HANDLER(mailbox);
- /* do not save default port to mailboxes.xml */
- if (self->port == SELF_GET_CLASS(self)->default_ports[self->connection_type])
- self->port = 0;
-
- self->runtime_port = self->port == 0
- ? SELF_GET_CLASS(self)->default_ports[self->connection_type]
- : self->port;
+ if (selfp->untrusted_dialog)
+ gtk_dialog_response(GTK_DIALOG(selfp->untrusted_dialog), GTK_RESPONSE_CANCEL);
}}
-#line 430 "mn-pi-mailbox.c"
+#line 417 "mn-pi-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 141 "mn-pi-mailbox.gob"
+#line 136 "mn-pi-mailbox.gob"
static void
___5_mn_pi_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_UNUSED)
-#line 437 "mn-pi-mailbox.c"
+#line 424 "mn-pi-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_AUTHENTICATED_MAILBOX_CLASS(parent_class)->authenticated_check) \
(* MN_AUTHENTICATED_MAILBOX_CLASS(parent_class)->authenticated_check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox::authenticated_check"
{
-#line 143 "mn-pi-mailbox.gob"
+#line 138 "mn-pi-mailbox.gob"
- Self *self = SELF(mailbox);
-
PARENT_HANDLER(mailbox);
#if ! WITH_SSL
@@ -459,33 +444,28 @@ ___5_mn_pi_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_
GDK_THREADS_LEAVE();
}
#endif
-
- self->auth_prompted = FALSE;
- selfp->auth_failed = FALSE;
}}
-#line 467 "mn-pi-mailbox.c"
+#line 449 "mn-pi-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 166 "mn-pi-mailbox.gob"
+#line 156 "mn-pi-mailbox.gob"
gboolean
-mn_pi_mailbox_split_uri (const char * uri, int maxlen, char * scheme, char * auth, char * location, gboolean * has_auth)
-#line 474 "mn-pi-mailbox.c"
+mn_pi_mailbox_split_uri (const char * uri, int maxlen, char * scheme, char * auth, char * location)
+#line 456 "mn-pi-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox::split_uri"
-#line 166 "mn-pi-mailbox.gob"
+#line 156 "mn-pi-mailbox.gob"
g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 166 "mn-pi-mailbox.gob"
+#line 156 "mn-pi-mailbox.gob"
g_return_val_if_fail (scheme != NULL, (gboolean )0);
-#line 166 "mn-pi-mailbox.gob"
+#line 156 "mn-pi-mailbox.gob"
g_return_val_if_fail (auth != NULL, (gboolean )0);
-#line 166 "mn-pi-mailbox.gob"
+#line 156 "mn-pi-mailbox.gob"
g_return_val_if_fail (location != NULL, (gboolean )0);
-#line 166 "mn-pi-mailbox.gob"
- g_return_val_if_fail (has_auth != NULL, (gboolean )0);
-#line 487 "mn-pi-mailbox.c"
+#line 467 "mn-pi-mailbox.c"
{
-#line 173 "mn-pi-mailbox.gob"
+#line 162 "mn-pi-mailbox.gob"
char *pat;
int n;
@@ -494,40 +474,28 @@ mn_pi_mailbox_split_uri (const char * uri, int maxlen, char * scheme, char * aut
n = sscanf(uri, pat, scheme, auth, location);
g_free(pat);
- if (n >= 2)
- {
- *has_auth = n == 3;
-
- if (! *has_auth)
- strcpy(location, auth);
-
- return TRUE;
- }
- else
- return FALSE;
+ return n == 3; /* MN requires an username, hence the auth part */
}}
-#line 510 "mn-pi-mailbox.c"
+#line 480 "mn-pi-mailbox.c"
#undef __GOB_FUNCTION__
-#line 194 "mn-pi-mailbox.gob"
+#line 173 "mn-pi-mailbox.gob"
gboolean
-mn_pi_mailbox_split_uri_auth (const char * auth, int maxlen, char * username, char * authmech, gboolean * has_username, gboolean * has_authmech)
-#line 516 "mn-pi-mailbox.c"
+mn_pi_mailbox_split_uri_auth (const char * auth, int maxlen, char * username, char * authmech, gboolean * has_authmech)
+#line 486 "mn-pi-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox::split_uri_auth"
-#line 194 "mn-pi-mailbox.gob"
+#line 173 "mn-pi-mailbox.gob"
g_return_val_if_fail (auth != NULL, (gboolean )0);
-#line 194 "mn-pi-mailbox.gob"
+#line 173 "mn-pi-mailbox.gob"
g_return_val_if_fail (username != NULL, (gboolean )0);
-#line 194 "mn-pi-mailbox.gob"
+#line 173 "mn-pi-mailbox.gob"
g_return_val_if_fail (authmech != NULL, (gboolean )0);
-#line 194 "mn-pi-mailbox.gob"
- g_return_val_if_fail (has_username != NULL, (gboolean )0);
-#line 194 "mn-pi-mailbox.gob"
+#line 173 "mn-pi-mailbox.gob"
g_return_val_if_fail (has_authmech != NULL, (gboolean )0);
-#line 529 "mn-pi-mailbox.c"
+#line 497 "mn-pi-mailbox.c"
{
-#line 201 "mn-pi-mailbox.gob"
+#line 179 "mn-pi-mailbox.gob"
char *pat;
int n;
@@ -536,48 +504,31 @@ mn_pi_mailbox_split_uri_auth (const char * auth, int maxlen, char * username, ch
n = sscanf(auth, pat, username, authmech);
g_free(pat);
- *has_username = FALSE;
- *has_authmech = FALSE;
-
- if (n >= 1)
- {
- *has_username = TRUE;
-
- if (n == 2)
- *has_authmech = TRUE;
- }
- else
- {
- pat = g_strdup_printf(";AUTH=%%%is", maxlen);
- n = sscanf(auth, pat, authmech);
- g_free(pat);
+ if (n < 1)
+ return FALSE; /* MN requires an username */
- if (n < 1)
- return FALSE;
-
- *has_authmech = TRUE;
- }
+ *has_authmech = n == 2;
return TRUE;
}}
-#line 564 "mn-pi-mailbox.c"
+#line 515 "mn-pi-mailbox.c"
#undef __GOB_FUNCTION__
-#line 234 "mn-pi-mailbox.gob"
+#line 195 "mn-pi-mailbox.gob"
void
mn_pi_mailbox_split_uri_hostport (const char * hostport, int maxlen, char * hostname, int * port)
-#line 570 "mn-pi-mailbox.c"
+#line 521 "mn-pi-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox::split_uri_hostport"
-#line 234 "mn-pi-mailbox.gob"
+#line 195 "mn-pi-mailbox.gob"
g_return_if_fail (hostport != NULL);
-#line 234 "mn-pi-mailbox.gob"
+#line 195 "mn-pi-mailbox.gob"
g_return_if_fail (hostname != NULL);
-#line 234 "mn-pi-mailbox.gob"
+#line 195 "mn-pi-mailbox.gob"
g_return_if_fail (port != NULL);
-#line 579 "mn-pi-mailbox.c"
+#line 530 "mn-pi-mailbox.c"
{
-#line 239 "mn-pi-mailbox.gob"
+#line 200 "mn-pi-mailbox.gob"
char *pat;
int n;
@@ -600,340 +551,229 @@ mn_pi_mailbox_split_uri_hostport (const char * hostport, int maxlen, char * host
if (n < 2)
*port = 0;
}}
-#line 604 "mn-pi-mailbox.c"
+#line 555 "mn-pi-mailbox.c"
#undef __GOB_FUNCTION__
-#line 262 "mn-pi-mailbox.gob"
+#line 223 "mn-pi-mailbox.gob"
void
-mn_pi_mailbox_auth_failed (MNPIMailbox * self)
-#line 610 "mn-pi-mailbox.c"
+mn_pi_mailbox_session_private_init (MNPIMailbox * self, MNClientSessionPrivate * priv)
+#line 561 "mn-pi-mailbox.c"
{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::auth_failed"
-#line 262 "mn-pi-mailbox.gob"
+#define __GOB_FUNCTION__ "MN:PI:Mailbox::session_private_init"
+#line 223 "mn-pi-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 262 "mn-pi-mailbox.gob"
+#line 223 "mn-pi-mailbox.gob"
g_return_if_fail (MN_IS_PI_MAILBOX (self));
-#line 617 "mn-pi-mailbox.c"
+#line 223 "mn-pi-mailbox.gob"
+ g_return_if_fail (priv != NULL);
+#line 570 "mn-pi-mailbox.c"
{
-#line 264 "mn-pi-mailbox.gob"
+#line 225 "mn-pi-mailbox.gob"
- MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(self);
+ priv->mailbox = MN_MAILBOX(self);
+ priv->auth_mailbox = MN_AUTHENTICATED_MAILBOX(self);
+ priv->pi_mailbox = MN_PI_MAILBOX(self);
+ }}
+#line 578 "mn-pi-mailbox.c"
+#undef __GOB_FUNCTION__
- if (! auth_mailbox->password)
- {
- g_free(self->runtime_password);
- self->runtime_password = NULL;
+#line 231 "mn-pi-mailbox.gob"
+gboolean
+mn_pi_mailbox_sasl_get_credentials_cb (MNClientSession * session, MNClientSessionPrivate * priv, const char ** username, const char ** password)
+#line 584 "mn-pi-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:PI:Mailbox::sasl_get_credentials_cb"
+{
+#line 236 "mn-pi-mailbox.gob"
+
+#if WITH_SASL
+ g_return_val_if_fail(username != NULL || password != NULL, FALSE);
- if (self->runtime_username)
- self_set_password(self, self->runtime_username, NULL);
- }
+ if (username)
+ *username = priv->auth_mailbox->username;
- if (! auth_mailbox->username)
+ if (password)
{
- g_free(self->runtime_username);
- self->runtime_username = NULL;
+ if (mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
+ *password = priv->auth_mailbox->runtime_password;
+ else
+ return FALSE;
}
+ else
+ /*
+ * Reset auth_cancelled ourselves since we did not call
+ * mn_authenticated_mailbox_fill_password().
+ */
+ priv->auth_mailbox->auth_cancelled = FALSE;
- selfp->auth_failed = TRUE;
+ return TRUE;
+#else
+ g_assert_not_reached();
+ return FALSE;
+#endif /* WITH_SASL */
}}
-#line 640 "mn-pi-mailbox.c"
+#line 616 "mn-pi-mailbox.c"
#undef __GOB_FUNCTION__
-#line 285 "mn-pi-mailbox.gob"
+#line 264 "mn-pi-mailbox.gob"
gboolean
-mn_pi_mailbox_fill_credentials (MNPIMailbox * self, gboolean need_username, gboolean need_password)
-#line 646 "mn-pi-mailbox.c"
+mn_pi_mailbox_ssl_trust_server_cb (MNClientSession * session, const char * server, int port, const char * fingerprint, const char * verify_error, MNClientSessionPrivate * priv)
+#line 622 "mn-pi-mailbox.c"
{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::fill_credentials"
-#line 285 "mn-pi-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 285 "mn-pi-mailbox.gob"
- g_return_val_if_fail (MN_IS_PI_MAILBOX (self), (gboolean )0);
-#line 653 "mn-pi-mailbox.c"
+#define __GOB_FUNCTION__ "MN:PI:Mailbox::ssl_trust_server_cb"
{
-#line 287 "mn-pi-mailbox.gob"
+#line 271 "mn-pi-mailbox.gob"
- MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(self);
-
- g_return_val_if_fail(need_username || need_password, FALSE);
-
- self->auth_cancelled = FALSE;
+#if WITH_SSL
+ gboolean status = FALSE;
- if (! self->runtime_username)
- self->runtime_username = g_strdup(auth_mailbox->username);
- if (! self->runtime_password)
- self->runtime_password = g_strdup(auth_mailbox->password);
-
- if (self->runtime_username && ! self->runtime_password && need_password)
- self->runtime_password = self_get_password(self, self->runtime_username);
+ if (fingerprint)
+ {
+ GSList *gconf_fingerprints;
- if (self->runtime_username)
- need_username = FALSE;
- if (self->runtime_password)
- need_password = FALSE;
+ gconf_fingerprints = eel_gconf_get_string_list(MN_CONF_TRUSTED_X509_CERTIFICATES);
- if (need_username || need_password)
+ if (mn_g_str_slist_find(gconf_fingerprints, fingerprint))
+ status = TRUE;
+ else
+ if (self_run_untrusted_dialog(priv->pi_mailbox, server, verify_error, fingerprint))
+ {
+ status = TRUE;
+ gconf_fingerprints = g_slist_append(gconf_fingerprints, g_strdup(fingerprint));
+ eel_gconf_set_string_list(MN_CONF_TRUSTED_X509_CERTIFICATES, gconf_fingerprints);
+ }
+
+ eel_g_slist_free_deep(gconf_fingerprints);
+ }
+ else
{
- char *username;
- char *password;
+ char *key;
+ GSList *gconf_servers = NULL;
- GDK_THREADS_ENTER();
+ key = g_strdup_printf("%s:%i", server, port);
+ gconf_servers = eel_gconf_get_string_list(MN_CONF_TRUSTED_SERVERS);
- self->auth_prompted = TRUE;
-
- if (self_credentials_prompt(self,
- need_username ? &username : NULL,
- need_password ? &password : NULL,
- selfp->auth_failed
- ? _("Mail Notification was unable to log into %s mailbox %s, possibly because the credentials you have entered are invalid.\n\nPlease re-enter your credentials.")
- : _("Enter your credentials for %s mailbox %s."),
- MN_MAILBOX(self)->format,
- MN_MAILBOX(self)->runtime_name))
+ if (mn_g_str_slist_find(gconf_servers, key))
+ status = TRUE;
+ else
{
- if (need_username)
- self->runtime_username = username;
- if (need_password)
- self->runtime_password = password;
+ if (self_run_untrusted_dialog(priv->pi_mailbox, server, _("missing certificate"), NULL))
+ {
+ status = TRUE;
+ gconf_servers = g_slist_append(gconf_servers, g_strdup(key));
+ eel_gconf_set_string_list(MN_CONF_TRUSTED_SERVERS, gconf_servers);
+ }
}
- else
- self->auth_cancelled = TRUE;
- gdk_flush();
- GDK_THREADS_LEAVE();
+ g_free(key);
+ eel_g_slist_free_deep(gconf_servers);
}
- if (self->runtime_username && self->runtime_password)
- self_set_password(self, self->runtime_username, self->runtime_password);
-
- return ! self->auth_cancelled;
+ return status;
+#else
+ g_assert_not_reached();
+ return FALSE;
+#endif /* WITH_SSL */
}}
-#line 711 "mn-pi-mailbox.c"
+#line 679 "mn-pi-mailbox.c"
#undef __GOB_FUNCTION__
-#line 343 "mn-pi-mailbox.gob"
+#line 324 "mn-pi-mailbox.gob"
static gboolean
-mn_pi_mailbox_credentials_prompt (MNPIMailbox * self, char ** username, char ** password, const char * format, ...)
-#line 717 "mn-pi-mailbox.c"
+mn_pi_mailbox_run_untrusted_dialog (MNPIMailbox * self, const char * server, const char * reason, const char * cert_fingerprint)
+#line 685 "mn-pi-mailbox.c"
{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::credentials_prompt"
-#line 343 "mn-pi-mailbox.gob"
+#define __GOB_FUNCTION__ "MN:PI:Mailbox::run_untrusted_dialog"
+#line 324 "mn-pi-mailbox.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 343 "mn-pi-mailbox.gob"
+#line 324 "mn-pi-mailbox.gob"
g_return_val_if_fail (MN_IS_PI_MAILBOX (self), (gboolean )0);
-#line 343 "mn-pi-mailbox.gob"
- g_return_val_if_fail (format != NULL, (gboolean )0);
-#line 726 "mn-pi-mailbox.c"
+#line 324 "mn-pi-mailbox.gob"
+ g_return_val_if_fail (server != NULL, (gboolean )0);
+#line 324 "mn-pi-mailbox.gob"
+ g_return_val_if_fail (reason != NULL, (gboolean )0);
+#line 696 "mn-pi-mailbox.c"
{
-#line 349 "mn-pi-mailbox.gob"
+#line 329 "mn-pi-mailbox.gob"
- va_list args;
- char *message;
- gboolean ok;
-
- g_return_val_if_fail(selfp->auth_dialog == NULL, FALSE);
- g_return_val_if_fail(username != NULL || password != NULL, FALSE);
-
- va_start(args, format);
- message = g_strdup_vprintf(format, args);
- va_end(args);
-
- /* keep the title in sync with gnome-authentication-manager */
-
- /* translators: header capitalization */
- selfp->auth_dialog = gnome_password_dialog_new(_("Authentication Required"),
- message,
- self->runtime_username,
- self->runtime_password,
- FALSE);
- g_free(message);
-
- eel_add_weak_pointer(&selfp->auth_dialog);
-
- gnome_password_dialog_set_show_userpass_buttons(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), FALSE);
- gnome_password_dialog_set_readonly_username(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), username == NULL);
- gnome_password_dialog_set_show_password(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), password != NULL);
-
- ok = gnome_password_dialog_run_and_block(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
- if (ok)
+#if WITH_SSL
+ GString *secondary;
+ gboolean status;
+
+ g_return_val_if_fail(server != NULL, FALSE);
+ g_return_val_if_fail(reason != NULL, FALSE);
+
+ secondary = g_string_new(NULL);
+ g_string_printf(secondary,
+ _("Mail Notification was unable to trust \"%s\" "
+ "(%s). It is possible that someone is "
+ "intercepting your communication to obtain "
+ "your confidential information.\n"
+ "\n"
+ "You should only connect to the server if you "
+ "are certain you are connected to \"%s\". "
+ "If you choose to connect to the server, this "
+ "message will not be shown again."),
+ server, reason, server);
+
+ if (cert_fingerprint)
{
- if (username)
- *username = gnome_password_dialog_get_username(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
- if (password)
- *password = gnome_password_dialog_get_password(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
+ g_string_append(secondary, "\n\n");
+ g_string_append_printf(secondary, _("Certificate fingerprint: %s."), cert_fingerprint);
}
- gtk_widget_destroy(selfp->auth_dialog);
-
- return ok;
- }}
-#line 770 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 391 "mn-pi-mailbox.gob"
-static char *
-mn_pi_mailbox_build_auth_id (MNPIMailbox * self, const char * username)
-#line 776 "mn-pi-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::build_auth_id"
-#line 391 "mn-pi-mailbox.gob"
- g_return_val_if_fail (self != NULL, (char * )0);
-#line 391 "mn-pi-mailbox.gob"
- g_return_val_if_fail (MN_IS_PI_MAILBOX (self), (char * )0);
-#line 783 "mn-pi-mailbox.c"
-{
-#line 393 "mn-pi-mailbox.gob"
-
- return g_strdup_printf("%s:%s:%i:%i:%s",
- MN_MAILBOX_GET_CLASS(self)->type,
- self->hostname,
- self->runtime_port,
- self->connection_type,
- username);
- }}
-#line 794 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 402 "mn-pi-mailbox.gob"
-static char *
-mn_pi_mailbox_get_password (MNPIMailbox * self, const char * username)
-#line 800 "mn-pi-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::get_password"
-#line 402 "mn-pi-mailbox.gob"
- g_return_val_if_fail (self != NULL, (char * )0);
-#line 402 "mn-pi-mailbox.gob"
- g_return_val_if_fail (MN_IS_PI_MAILBOX (self), (char * )0);
-#line 402 "mn-pi-mailbox.gob"
- g_return_val_if_fail (username != NULL, (char * )0);
-#line 809 "mn-pi-mailbox.c"
-{
-#line 404 "mn-pi-mailbox.gob"
-
- char *auth_id;
- char *password;
-
- auth_id = self_build_auth_id(self, username);
-
- G_LOCK(password_database);
- password = g_strdup(g_hash_table_lookup(password_database, auth_id));
- G_UNLOCK(password_database);
-
- g_free(auth_id);
-
- return password;
- }}
-#line 826 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 419 "mn-pi-mailbox.gob"
-static void
-mn_pi_mailbox_set_password (MNPIMailbox * self, const char * username, const char * password)
-#line 832 "mn-pi-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::set_password"
-#line 419 "mn-pi-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 419 "mn-pi-mailbox.gob"
- g_return_if_fail (MN_IS_PI_MAILBOX (self));
-#line 419 "mn-pi-mailbox.gob"
- g_return_if_fail (username != NULL);
-#line 841 "mn-pi-mailbox.c"
-{
-#line 421 "mn-pi-mailbox.gob"
-
- char *auth_id;
+ GDK_THREADS_ENTER();
- auth_id = self_build_auth_id(self, username);
+ selfp->untrusted_dialog = mn_alert_dialog_new(NULL,
+ GTK_MESSAGE_WARNING, 0,
+ _("Connect to untrusted server?"),
+ secondary->str);
+ g_string_free(secondary, TRUE);
- G_LOCK(password_database);
- if (password)
- g_hash_table_insert(password_database, g_strdup(auth_id), g_strdup(password));
- else
- g_hash_table_remove(password_database, auth_id);
- G_UNLOCK(password_database);
+ eel_add_weak_pointer(&selfp->untrusted_dialog);
- g_free(auth_id);
- }}
-#line 858 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 436 "mn-pi-mailbox.gob"
-void
-mn_pi_mailbox_session_private_init (MNPIMailbox * self, MNClientSessionPrivate * priv)
-#line 864 "mn-pi-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::session_private_init"
-#line 436 "mn-pi-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 436 "mn-pi-mailbox.gob"
- g_return_if_fail (MN_IS_PI_MAILBOX (self));
-#line 436 "mn-pi-mailbox.gob"
- g_return_if_fail (priv != NULL);
-#line 873 "mn-pi-mailbox.c"
-{
-#line 438 "mn-pi-mailbox.gob"
-
- priv->mailbox = MN_MAILBOX(self);
- priv->pi_mailbox = MN_PI_MAILBOX(self);
- }}
-#line 880 "mn-pi-mailbox.c"
-#undef __GOB_FUNCTION__
+ gtk_dialog_add_button(GTK_DIALOG(selfp->untrusted_dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ gtk_dialog_add_button(GTK_DIALOG(selfp->untrusted_dialog), GTK_STOCK_CONNECT, GTK_RESPONSE_OK);
-#line 443 "mn-pi-mailbox.gob"
-gboolean
-mn_pi_mailbox_sasl_get_credentials_cb (MNClientSession * session, MNClientSessionPrivate * priv, const char ** username, const char ** password)
-#line 886 "mn-pi-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:PI:Mailbox::sasl_get_credentials_cb"
-{
-#line 448 "mn-pi-mailbox.gob"
-
-#if WITH_SASL
- g_return_val_if_fail(username != NULL || password != NULL, FALSE);
+ status = mn_dialog_run_nonmodal(GTK_DIALOG(selfp->untrusted_dialog)) == GTK_RESPONSE_OK;
+ gtk_widget_destroy(selfp->untrusted_dialog);
- if (self_fill_credentials(priv->pi_mailbox, username != NULL, password != NULL))
- {
- if (username)
- *username = priv->pi_mailbox->runtime_username;
- if (password)
- *password = priv->pi_mailbox->runtime_password;
+ gdk_flush();
+ GDK_THREADS_LEAVE();
- return TRUE;
- }
- else
- return FALSE;
+ return status;
#else
g_assert_not_reached();
return FALSE;
-#endif /* WITH_SASL */
+#endif /* WITH_SSL */
}}
-#line 911 "mn-pi-mailbox.c"
+#line 751 "mn-pi-mailbox.c"
#undef __GOB_FUNCTION__
-#line 469 "mn-pi-mailbox.gob"
+#line 382 "mn-pi-mailbox.gob"
void
mn_pi_mailbox_notice_cb (MNClientSession * session, const char * message, MNClientSessionPrivate * priv)
-#line 917 "mn-pi-mailbox.c"
+#line 757 "mn-pi-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox::notice_cb"
{
-#line 473 "mn-pi-mailbox.gob"
+#line 386 "mn-pi-mailbox.gob"
mn_mailbox_notice(priv->mailbox, "%s", message);
}}
-#line 925 "mn-pi-mailbox.c"
+#line 765 "mn-pi-mailbox.c"
#undef __GOB_FUNCTION__
-#line 477 "mn-pi-mailbox.gob"
+#line 390 "mn-pi-mailbox.gob"
void
mn_pi_mailbox_warning_cb (MNClientSession * session, const char * message, MNClientSessionPrivate * priv)
-#line 931 "mn-pi-mailbox.c"
+#line 771 "mn-pi-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:PI:Mailbox::warning_cb"
{
-#line 481 "mn-pi-mailbox.gob"
+#line 394 "mn-pi-mailbox.gob"
mn_mailbox_warning(priv->mailbox, "%s", message);
}}
-#line 939 "mn-pi-mailbox.c"
+#line 779 "mn-pi-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-pi-mailbox.gob b/src/mn-pi-mailbox.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -32,22 +32,21 @@ requires 2.0.14
#include "mn-client-session.h"
#define MN_PI_MAILBOX_SESSION_PRIVATE \
- MNMailbox *mailbox; \
- MNPIMailbox *pi_mailbox; \
- MNClientSession *session
+ MNMailbox *mailbox; \
+ MNAuthenticatedMailbox *auth_mailbox; \
+ MNPIMailbox *pi_mailbox; \
+ MNClientSession *session
%}
%{
#include "config.h"
#include <glib/gi18n.h>
-#include <gnome.h>
#include <eel/eel.h>
+#include "mn-authenticated-mailbox-private.h"
#include "mn-mailbox-private.h"
#include "mn-util.h"
#include "mn-stock.h"
-
-static GHashTable *password_database;
-G_LOCK_DEFINE_STATIC(password_database);
+#include "mn-conf.h"
struct _MNClientSessionPrivate
{
@@ -69,36 +68,28 @@ class MN:PI:Mailbox from MN:Authenticated:Mailbox (abstract)
public MNPIMailboxConnectionType connection_type;
property ENUM connection_type (link,
enum_type = MN:PI:Mailbox:Connection:Type,
- flags = CONSTRUCT | MN_MAILBOX_PARAM_PERMANENT,
+ flags = CONSTRUCT | MN_MAILBOX_PARAM_LOAD_SAVE,
default_value = MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL);
public char *authmech destroywith g_free;
- property STRING authmech (link, flags = MN_MAILBOX_PARAM_PERMANENT);
+ property STRING authmech (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE);
/* named hostname and not server for historical reasons */
public char *hostname destroywith g_free;
- property STRING hostname (link, flags = MN_MAILBOX_PARAM_PERMANENT | MN_MAILBOX_PARAM_REQUIRED);
+ property STRING hostname (link, flags = MN_MAILBOX_PARAM_LOAD_SAVE | MN_MAILBOX_PARAM_REQUIRED);
public int port;
property INT port (link,
- flags = MN_MAILBOX_PARAM_PERMANENT,
+ flags = MN_MAILBOX_PARAM_LOAD_SAVE,
minimum = 0,
maximum = 65535);
public int runtime_port;
- public char *runtime_username destroywith g_free;
- public char *runtime_password destroywith g_free;
-
- private GtkWidget *auth_dialog;
- protected gboolean auth_prompted;
- protected gboolean auth_cancelled;
- private gboolean auth_failed;
+ private GtkWidget *untrusted_dialog;
class_init (class)
{
- password_database = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
-
/*
* 5 minutes is a good default check delay for remote POP3/IMAP
* mailboxes.
@@ -112,19 +103,9 @@ class MN:PI:Mailbox from MN:Authenticated:Mailbox (abstract)
}
override (MN:Mailbox) void
- removed (MNMailbox *mailbox)
- {
- Self *self = SELF(mailbox);
-
- if (selfp->auth_dialog)
- gtk_dialog_response(GTK_DIALOG(selfp->auth_dialog), GTK_RESPONSE_CANCEL);
-
- PARENT_HANDLER(mailbox);
- }
-
- override (MN:Mailbox) void
seal (MNMailbox *mailbox)
{
+ MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
Self *self = SELF(mailbox);
PARENT_HANDLER(mailbox);
@@ -136,15 +117,27 @@ class MN:PI:Mailbox from MN:Authenticated:Mailbox (abstract)
self->runtime_port = self->port == 0
? SELF_GET_CLASS(self)->default_ports[self->connection_type]
: self->port;
+
+ auth_mailbox->keyring_server = g_strdup(self->hostname);
+ auth_mailbox->keyring_port = self->runtime_port;
}
- override (MN:Authenticated:Mailbox) void
- authenticated_check (MNAuthenticatedMailbox *mailbox)
+ override (MN:Mailbox) void
+ removed (MNMailbox *mailbox)
{
Self *self = SELF(mailbox);
PARENT_HANDLER(mailbox);
+ if (selfp->untrusted_dialog)
+ gtk_dialog_response(GTK_DIALOG(selfp->untrusted_dialog), GTK_RESPONSE_CANCEL);
+ }
+
+ override (MN:Authenticated:Mailbox) void
+ authenticated_check (MNAuthenticatedMailbox *mailbox)
+ {
+ PARENT_HANDLER(mailbox);
+
#if ! WITH_SSL
if (self->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_INBAND_SSL
|| self->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL)
@@ -158,9 +151,6 @@ class MN:PI:Mailbox from MN:Authenticated:Mailbox (abstract)
GDK_THREADS_LEAVE();
}
#endif
-
- self->auth_prompted = FALSE;
- selfp->auth_failed = FALSE;
}
protected gboolean
@@ -168,8 +158,7 @@ class MN:PI:Mailbox from MN:Authenticated:Mailbox (abstract)
int maxlen,
char *scheme (check null),
char *auth (check null),
- char *location (check null),
- gboolean *has_auth (check null))
+ char *location (check null))
{
char *pat;
int n;
@@ -178,17 +167,7 @@ class MN:PI:Mailbox from MN:Authenticated:Mailbox (abstract)
n = sscanf(uri, pat, scheme, auth, location);
g_free(pat);
- if (n >= 2)
- {
- *has_auth = n == 3;
-
- if (! *has_auth)
- strcpy(location, auth);
-
- return TRUE;
- }
- else
- return FALSE;
+ return n == 3; /* MN requires an username, hence the auth part */
}
protected gboolean
@@ -196,7 +175,6 @@ class MN:PI:Mailbox from MN:Authenticated:Mailbox (abstract)
int maxlen,
char *username (check null),
char *authmech (check null),
- gboolean *has_username (check null),
gboolean *has_authmech (check null))
{
char *pat;
@@ -206,27 +184,10 @@ class MN:PI:Mailbox from MN:Authenticated:Mailbox (abstract)
n = sscanf(auth, pat, username, authmech);
g_free(pat);
- *has_username = FALSE;
- *has_authmech = FALSE;
-
- if (n >= 1)
- {
- *has_username = TRUE;
-
- if (n == 2)
- *has_authmech = TRUE;
- }
- else
- {
- pat = g_strdup_printf(";AUTH=%%%is", maxlen);
- n = sscanf(auth, pat, authmech);
- g_free(pat);
-
- if (n < 1)
- return FALSE;
+ if (n < 1)
+ return FALSE; /* MN requires an username */
- *has_authmech = TRUE;
- }
+ *has_authmech = n == 2;
return TRUE;
}
@@ -260,210 +221,162 @@ class MN:PI:Mailbox from MN:Authenticated:Mailbox (abstract)
}
protected void
- auth_failed (self)
+ session_private_init (self, MNClientSessionPrivate *priv (check null))
{
- MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(self);
+ priv->mailbox = MN_MAILBOX(self);
+ priv->auth_mailbox = MN_AUTHENTICATED_MAILBOX(self);
+ priv->pi_mailbox = MN_PI_MAILBOX(self);
+ }
- if (! auth_mailbox->password)
- {
- g_free(self->runtime_password);
- self->runtime_password = NULL;
+ protected gboolean
+ sasl_get_credentials_cb (MNClientSession *session,
+ MNClientSessionPrivate *priv,
+ const char **username,
+ const char **password)
+ {
+#if WITH_SASL
+ g_return_val_if_fail(username != NULL || password != NULL, FALSE);
- if (self->runtime_username)
- self_set_password(self, self->runtime_username, NULL);
- }
+ if (username)
+ *username = priv->auth_mailbox->username;
- if (! auth_mailbox->username)
+ if (password)
{
- g_free(self->runtime_username);
- self->runtime_username = NULL;
+ if (mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
+ *password = priv->auth_mailbox->runtime_password;
+ else
+ return FALSE;
}
+ else
+ /*
+ * Reset auth_cancelled ourselves since we did not call
+ * mn_authenticated_mailbox_fill_password().
+ */
+ priv->auth_mailbox->auth_cancelled = FALSE;
- selfp->auth_failed = TRUE;
+ return TRUE;
+#else
+ g_assert_not_reached();
+ return FALSE;
+#endif /* WITH_SASL */
}
protected gboolean
- fill_credentials (self, gboolean need_username, gboolean need_password)
+ ssl_trust_server_cb (MNClientSession *session,
+ const char *server,
+ int port,
+ const char *fingerprint,
+ const char *verify_error,
+ MNClientSessionPrivate *priv)
{
- MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(self);
-
- g_return_val_if_fail(need_username || need_password, FALSE);
-
- self->auth_cancelled = FALSE;
-
- if (! self->runtime_username)
- self->runtime_username = g_strdup(auth_mailbox->username);
- if (! self->runtime_password)
- self->runtime_password = g_strdup(auth_mailbox->password);
+#if WITH_SSL
+ gboolean status = FALSE;
- if (self->runtime_username && ! self->runtime_password && need_password)
- self->runtime_password = self_get_password(self, self->runtime_username);
+ if (fingerprint)
+ {
+ GSList *gconf_fingerprints;
- if (self->runtime_username)
- need_username = FALSE;
- if (self->runtime_password)
- need_password = FALSE;
+ gconf_fingerprints = eel_gconf_get_string_list(MN_CONF_TRUSTED_X509_CERTIFICATES);
- if (need_username || need_password)
+ if (mn_g_str_slist_find(gconf_fingerprints, fingerprint))
+ status = TRUE;
+ else
+ if (self_run_untrusted_dialog(priv->pi_mailbox, server, verify_error, fingerprint))
+ {
+ status = TRUE;
+ gconf_fingerprints = g_slist_append(gconf_fingerprints, g_strdup(fingerprint));
+ eel_gconf_set_string_list(MN_CONF_TRUSTED_X509_CERTIFICATES, gconf_fingerprints);
+ }
+
+ eel_g_slist_free_deep(gconf_fingerprints);
+ }
+ else
{
- char *username;
- char *password;
+ char *key;
+ GSList *gconf_servers = NULL;
- GDK_THREADS_ENTER();
-
- self->auth_prompted = TRUE;
+ key = g_strdup_printf("%s:%i", server, port);
+ gconf_servers = eel_gconf_get_string_list(MN_CONF_TRUSTED_SERVERS);
- if (self_credentials_prompt(self,
- need_username ? &username : NULL,
- need_password ? &password : NULL,
- selfp->auth_failed
- ? _("Mail Notification was unable to log into %s mailbox %s, possibly because the credentials you have entered are invalid.\n\nPlease re-enter your credentials.")
- : _("Enter your credentials for %s mailbox %s."),
- MN_MAILBOX(self)->format,
- MN_MAILBOX(self)->runtime_name))
+ if (mn_g_str_slist_find(gconf_servers, key))
+ status = TRUE;
+ else
{
- if (need_username)
- self->runtime_username = username;
- if (need_password)
- self->runtime_password = password;
+ if (self_run_untrusted_dialog(priv->pi_mailbox, server, _("missing certificate"), NULL))
+ {
+ status = TRUE;
+ gconf_servers = g_slist_append(gconf_servers, g_strdup(key));
+ eel_gconf_set_string_list(MN_CONF_TRUSTED_SERVERS, gconf_servers);
+ }
}
- else
- self->auth_cancelled = TRUE;
- gdk_flush();
- GDK_THREADS_LEAVE();
+ g_free(key);
+ eel_g_slist_free_deep(gconf_servers);
}
- if (self->runtime_username && self->runtime_password)
- self_set_password(self, self->runtime_username, self->runtime_password);
-
- return ! self->auth_cancelled;
+ return status;
+#else
+ g_assert_not_reached();
+ return FALSE;
+#endif /* WITH_SSL */
}
private gboolean
- credentials_prompt (self,
- char **username,
- char **password,
- const char *format (check null),
- ...)
+ run_untrusted_dialog (self,
+ const char *server (check null),
+ const char *reason (check null),
+ const char *cert_fingerprint)
{
- va_list args;
- char *message;
- gboolean ok;
-
- g_return_val_if_fail(selfp->auth_dialog == NULL, FALSE);
- g_return_val_if_fail(username != NULL || password != NULL, FALSE);
-
- va_start(args, format);
- message = g_strdup_vprintf(format, args);
- va_end(args);
-
- /* keep the title in sync with gnome-authentication-manager */
-
- /* translators: header capitalization */
- selfp->auth_dialog = gnome_password_dialog_new(_("Authentication Required"),
- message,
- self->runtime_username,
- self->runtime_password,
- FALSE);
- g_free(message);
-
- eel_add_weak_pointer(&selfp->auth_dialog);
-
- gnome_password_dialog_set_show_userpass_buttons(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), FALSE);
- gnome_password_dialog_set_readonly_username(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), username == NULL);
- gnome_password_dialog_set_show_password(GNOME_PASSWORD_DIALOG(selfp->auth_dialog), password != NULL);
-
- ok = gnome_password_dialog_run_and_block(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
- if (ok)
+#if WITH_SSL
+ GString *secondary;
+ gboolean status;
+
+ g_return_val_if_fail(server != NULL, FALSE);
+ g_return_val_if_fail(reason != NULL, FALSE);
+
+ secondary = g_string_new(NULL);
+ g_string_printf(secondary,
+ _("Mail Notification was unable to trust \"%s\" "
+ "(%s). It is possible that someone is "
+ "intercepting your communication to obtain "
+ "your confidential information.\n"
+ "\n"
+ "You should only connect to the server if you "
+ "are certain you are connected to \"%s\". "
+ "If you choose to connect to the server, this "
+ "message will not be shown again."),
+ server, reason, server);
+
+ if (cert_fingerprint)
{
- if (username)
- *username = gnome_password_dialog_get_username(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
- if (password)
- *password = gnome_password_dialog_get_password(GNOME_PASSWORD_DIALOG(selfp->auth_dialog));
+ g_string_append(secondary, "\n\n");
+ g_string_append_printf(secondary, _("Certificate fingerprint: %s."), cert_fingerprint);
}
- gtk_widget_destroy(selfp->auth_dialog);
-
- return ok;
- }
-
- private char *
- build_auth_id (self, const char *username)
- {
- return g_strdup_printf("%s:%s:%i:%i:%s",
- MN_MAILBOX_GET_CLASS(self)->type,
- self->hostname,
- self->runtime_port,
- self->connection_type,
- username);
- }
-
- private char *
- get_password (self, const char *username (check null))
- {
- char *auth_id;
- char *password;
-
- auth_id = self_build_auth_id(self, username);
-
- G_LOCK(password_database);
- password = g_strdup(g_hash_table_lookup(password_database, auth_id));
- G_UNLOCK(password_database);
+ GDK_THREADS_ENTER();
- g_free(auth_id);
+ selfp->untrusted_dialog = mn_alert_dialog_new(NULL,
+ GTK_MESSAGE_WARNING, 0,
+ _("Connect to untrusted server?"),
+ secondary->str);
+ g_string_free(secondary, TRUE);
- return password;
- }
-
- private void
- set_password (self, const char *username (check null), const char *password)
- {
- char *auth_id;
+ eel_add_weak_pointer(&selfp->untrusted_dialog);
- auth_id = self_build_auth_id(self, username);
+ gtk_dialog_add_button(GTK_DIALOG(selfp->untrusted_dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ gtk_dialog_add_button(GTK_DIALOG(selfp->untrusted_dialog), GTK_STOCK_CONNECT, GTK_RESPONSE_OK);
- G_LOCK(password_database);
- if (password)
- g_hash_table_insert(password_database, g_strdup(auth_id), g_strdup(password));
- else
- g_hash_table_remove(password_database, auth_id);
- G_UNLOCK(password_database);
+ status = mn_dialog_run_nonmodal(GTK_DIALOG(selfp->untrusted_dialog)) == GTK_RESPONSE_OK;
+ gtk_widget_destroy(selfp->untrusted_dialog);
- g_free(auth_id);
- }
+ gdk_flush();
+ GDK_THREADS_LEAVE();
- protected void
- session_private_init (self, MNClientSessionPrivate *priv (check null))
- {
- priv->mailbox = MN_MAILBOX(self);
- priv->pi_mailbox = MN_PI_MAILBOX(self);
- }
-
- protected gboolean
- sasl_get_credentials_cb (MNClientSession *session,
- MNClientSessionPrivate *priv,
- const char **username,
- const char **password)
- {
-#if WITH_SASL
- g_return_val_if_fail(username != NULL || password != NULL, FALSE);
-
- if (self_fill_credentials(priv->pi_mailbox, username != NULL, password != NULL))
- {
- if (username)
- *username = priv->pi_mailbox->runtime_username;
- if (password)
- *password = priv->pi_mailbox->runtime_password;
-
- return TRUE;
- }
- else
- return FALSE;
+ return status;
#else
g_assert_not_reached();
return FALSE;
-#endif /* WITH_SASL */
+#endif /* WITH_SSL */
}
protected void
diff --git a/src/mn-pi-mailbox.h b/src/mn-pi-mailbox.h
@@ -56,11 +56,7 @@ struct _MNPIMailbox {
char * hostname;
int port;
int runtime_port;
- char * runtime_username;
- char * runtime_password;
/*< private >*/
- gboolean auth_prompted; /* protected */
- gboolean auth_cancelled; /* protected */
MNPIMailboxPrivate *_priv;
};
diff --git a/src/mn-pop3-mailbox-properties.c b/src/mn-pop3-mailbox-properties.c
@@ -55,7 +55,6 @@ static void mn_pop3_mailbox_properties_init (MNPOP3MailboxProperties * self) G_G
enum {
PROP_0,
- PROP_COMPLETE,
PROP_DEFAULT_NAME
};
@@ -104,10 +103,10 @@ GET_NEW_VARG (const char *first, ...)
return ret;
}
-#line 80 "mn-pop3-mailbox-properties.gob"
+#line 58 "mn-pop3-mailbox-properties.gob"
static void
mn_pop3_mailbox_properties_class_init (MNPOP3MailboxPropertiesClass * class G_GNUC_UNUSED)
-#line 111 "mn-pop3-mailbox-properties.c"
+#line 110 "mn-pop3-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox:Properties::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -117,32 +116,29 @@ mn_pop3_mailbox_properties_class_init (MNPOP3MailboxPropertiesClass * class G_GN
g_object_class->get_property = ___object_get_property;
{
g_object_class_override_property (g_object_class,
- PROP_COMPLETE,
- "complete");
- g_object_class_override_property (g_object_class,
PROP_DEFAULT_NAME,
"default_name");
}
{
-#line 81 "mn-pop3-mailbox-properties.gob"
+#line 59 "mn-pop3-mailbox-properties.gob"
MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
p_class->type = "pop3";
p_class->combo_label = "POP3";
-#line 135 "mn-pop3-mailbox-properties.c"
+#line 131 "mn-pop3-mailbox-properties.c"
}
}
#undef __GOB_FUNCTION__
-#line 88 "mn-pop3-mailbox-properties.gob"
+#line 66 "mn-pop3-mailbox-properties.gob"
static void
mn_pop3_mailbox_properties_init (MNPOP3MailboxProperties * self G_GNUC_UNUSED)
-#line 142 "mn-pop3-mailbox-properties.c"
+#line 138 "mn-pop3-mailbox-properties.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox:Properties::init"
{
-#line 89 "mn-pop3-mailbox-properties.gob"
+#line 67 "mn-pop3-mailbox-properties.gob"
MNPIMailboxProperties *pi = MN_PI_MAILBOX_PROPERTIES(self);
int i;
@@ -153,7 +149,7 @@ mn_pop3_mailbox_properties_init (MNPOP3MailboxProperties * self G_GNUC_UNUSED)
for (i = 0; i < MN_PI_MAILBOX_N_CONNECTION_TYPES; i++)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(pi->port_spin[i]), mn_pop3_mailbox_default_ports[i]);
-#line 157 "mn-pop3-mailbox-properties.c"
+#line 153 "mn-pop3-mailbox-properties.c"
}
}
#undef __GOB_FUNCTION__
@@ -170,34 +166,9 @@ ___object_get_property (GObject *object,
self = MN_POP3_MAILBOX_PROPERTIES (object);
switch (property_id) {
- case PROP_COMPLETE:
- {
-#line 42 "mn-pop3-mailbox-properties.gob"
-
- MNPIMailboxProperties *pi = MN_PI_MAILBOX_PROPERTIES(self);
- gboolean complete;
- const char *server;
-
- mn_pi_mailbox_properties_get_contents(pi,
- NULL,
- NULL,
- &server,
- NULL);
-
- complete = *server != 0;
-#if ! WITH_SSL
- if (complete)
- complete = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pi->conn_radio[MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL]));
-#endif /* WITH_SSL */
-
- g_value_set_boolean(VAL, complete);
-
-#line 196 "mn-pop3-mailbox-properties.c"
- }
- break;
case PROP_DEFAULT_NAME:
{
-#line 64 "mn-pop3-mailbox-properties.gob"
+#line 42 "mn-pop3-mailbox-properties.gob"
const char *username;
const char *server;
@@ -213,7 +184,7 @@ ___object_get_property (GObject *object,
g_value_take_string(VAL, mn_pop3_mailbox_build_name(username, server));
-#line 217 "mn-pop3-mailbox-properties.c"
+#line 188 "mn-pop3-mailbox-properties.c"
}
break;
default:
diff --git a/src/mn-pop3-mailbox-properties.gob b/src/mn-pop3-mailbox-properties.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -37,28 +37,6 @@ requires 2.0.14
class MN:POP3:Mailbox:Properties from MN:PI:Mailbox:Properties
{
- property BOOLEAN complete (override)
- get
- {
- MNPIMailboxProperties *pi = MN_PI_MAILBOX_PROPERTIES(self);
- gboolean complete;
- const char *server;
-
- mn_pi_mailbox_properties_get_contents(pi,
- NULL,
- NULL,
- &server,
- NULL);
-
- complete = *server != 0;
-#if ! WITH_SSL
- if (complete)
- complete = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(pi->conn_radio[MN_PI_MAILBOX_CONNECTION_TYPE_NORMAL]));
-#endif /* WITH_SSL */
-
- g_value_set_boolean(VAL, complete);
- };
-
property STRING default_name (override)
get
{
diff --git a/src/mn-pop3-mailbox-properties.h b/src/mn-pop3-mailbox-properties.h
@@ -54,10 +54,8 @@ GType mn_pop3_mailbox_properties_get_type (void);
* Argument wrapping macros
*/
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-#define MN_POP3_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;})
#define MN_POP3_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name", __extension__ ({gchar **z = (arg); z;})
#else /* __GNUC__ && !__STRICT_ANSI__ */
-#define MN_POP3_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg)
#define MN_POP3_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name",(gchar **)(arg)
#endif /* __GNUC__ && !__STRICT_ANSI__ */
diff --git a/src/mn-pop3-mailbox.c b/src/mn-pop3-mailbox.c
@@ -252,9 +252,9 @@ mn_pop3_mailbox_class_init (MNPOP3MailboxClass * class G_GNUC_UNUSED)
#line 139 "mn-pop3-mailbox.gob"
mn_mailbox_class->seal = ___3_mn_pop3_mailbox_seal;
-#line 152 "mn-pop3-mailbox.gob"
+#line 161 "mn-pop3-mailbox.gob"
mn_mailbox_class->parse_uri = ___4_mn_pop3_mailbox_parse_uri;
-#line 742 "mn-pop3-mailbox.gob"
+#line 740 "mn-pop3-mailbox.gob"
mn_authenticated_mailbox_class->authenticated_check = ___18_mn_pop3_mailbox_authenticated_check;
#line 260 "mn-pop3-mailbox.c"
g_object_class->finalize = ___finalize;
@@ -299,20 +299,29 @@ ___3_mn_pop3_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
{
#line 141 "mn-pop3-mailbox.gob"
+ MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
+
PARENT_HANDLER(mailbox);
if (! mailbox->runtime_name)
mailbox->runtime_name = self_build_name(MN_AUTHENTICATED_MAILBOX(mailbox)->username,
MN_PI_MAILBOX(mailbox)->hostname);
+
+#if WITH_SSL
+ if (MN_PI_MAILBOX(mailbox)->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL)
+ auth_mailbox->keyring_protocol = g_strdup("pop3s");
+ else
+#endif
+ auth_mailbox->keyring_protocol = g_strdup("pop3");
}}
-#line 309 "mn-pop3-mailbox.c"
+#line 318 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 152 "mn-pop3-mailbox.gob"
+#line 161 "mn-pop3-mailbox.gob"
static MNMailbox *
___4_mn_pop3_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * uri)
-#line 316 "mn-pop3-mailbox.c"
+#line 325 "mn-pop3-mailbox.c"
#define PARENT_HANDLER(___dummy,___uri) \
((MN_MAILBOX_CLASS(parent_class)->parse_uri)? \
(* MN_MAILBOX_CLASS(parent_class)->parse_uri)(___dummy,___uri): \
@@ -320,7 +329,7 @@ ___4_mn_pop3_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * ur
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::parse_uri"
{
-#line 154 "mn-pop3-mailbox.gob"
+#line 163 "mn-pop3-mailbox.gob"
int len;
int buflen;
@@ -340,34 +349,23 @@ ___4_mn_pop3_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * ur
char username_buf[buflen];
char authmech_buf[buflen];
char hostname_buf[buflen];
- gboolean has_auth;
- gboolean has_username = FALSE;
gboolean has_authmech = FALSE;
- if (! mn_pi_mailbox_split_uri(uri, len, scheme_buf, auth_buf, location_buf, &has_auth))
+ if (! mn_pi_mailbox_split_uri(uri, len, scheme_buf, auth_buf, location_buf))
return NULL;
if (strcmp(scheme_buf, "pop"))
return NULL;
- if (has_auth)
- {
- if (! mn_pi_mailbox_split_uri_auth(auth_buf, len, username_buf, authmech_buf, &has_username, &has_authmech))
- return NULL;
+ if (! mn_pi_mailbox_split_uri_auth(auth_buf, len, username_buf, authmech_buf, &has_authmech))
+ return NULL;
- if (has_authmech)
- {
- if (! has_username)
- return NULL; /* see user-auth in RFC 2384 ABNF */
- if (! strcmp(authmech_buf, "*"))
- has_authmech = FALSE;
- }
- }
+ if (has_authmech && ! strcmp(authmech_buf, "*"))
+ has_authmech = FALSE;
mn_pi_mailbox_split_uri_hostport(location_buf, len, hostname_buf, &port);
- if (has_username)
- username = gnome_vfs_unescape_string(username_buf, NULL);
+ username = gnome_vfs_unescape_string(username_buf, NULL);
if (has_authmech)
authmech = gnome_vfs_unescape_string(authmech_buf, NULL);
hostname = gnome_vfs_unescape_string(hostname_buf, NULL);
@@ -386,18 +384,18 @@ ___4_mn_pop3_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * ur
return mailbox;
}}
-#line 390 "mn-pop3-mailbox.c"
+#line 388 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 220 "mn-pop3-mailbox.gob"
+#line 218 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 397 "mn-pop3-mailbox.c"
+#line 395 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_greeting_cb"
{
-#line 224 "mn-pop3-mailbox.gob"
+#line 222 "mn-pop3-mailbox.gob"
priv->session = session;
@@ -427,31 +425,31 @@ mn_pop3_mailbox_handle_greeting_cb (MNClientSession * session, MNClientSessionRe
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 431 "mn-pop3-mailbox.c"
+#line 429 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 254 "mn-pop3-mailbox.gob"
+#line 252 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_capa_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 437 "mn-pop3-mailbox.c"
+#line 435 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_capa_cb"
{
-#line 257 "mn-pop3-mailbox.gob"
+#line 255 "mn-pop3-mailbox.gob"
return mn_client_session_write(session, "CAPA");
}}
-#line 445 "mn-pop3-mailbox.c"
+#line 443 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 261 "mn-pop3-mailbox.gob"
+#line 259 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_capa_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 451 "mn-pop3-mailbox.c"
+#line 449 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_capa_cb"
{
-#line 265 "mn-pop3-mailbox.gob"
+#line 263 "mn-pop3-mailbox.gob"
self_handle_list_response(priv, response, FALSE);
@@ -540,17 +538,17 @@ mn_pop3_mailbox_handle_capa_cb (MNClientSession * session, MNClientSessionRespon
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 544 "mn-pop3-mailbox.c"
+#line 542 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 354 "mn-pop3-mailbox.gob"
+#line 352 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_stls_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 550 "mn-pop3-mailbox.c"
+#line 548 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_stls_cb"
{
-#line 357 "mn-pop3-mailbox.gob"
+#line 355 "mn-pop3-mailbox.gob"
#if WITH_SSL
return mn_client_session_write(session, "STLS");
@@ -559,17 +557,17 @@ mn_pop3_mailbox_enter_stls_cb (MNClientSession * session, MNClientSessionPrivate
return 0;
#endif /* WITH_SSL */
}}
-#line 563 "mn-pop3-mailbox.c"
+#line 561 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 366 "mn-pop3-mailbox.gob"
+#line 364 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_stls_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 569 "mn-pop3-mailbox.c"
+#line 567 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_stls_cb"
{
-#line 370 "mn-pop3-mailbox.gob"
+#line 368 "mn-pop3-mailbox.gob"
#if WITH_SSL
switch (response->type)
@@ -600,17 +598,17 @@ mn_pop3_mailbox_handle_stls_cb (MNClientSession * session, MNClientSessionRespon
return 0;
#endif /* WITH_SSL */
}}
-#line 604 "mn-pop3-mailbox.c"
+#line 602 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 401 "mn-pop3-mailbox.gob"
+#line 399 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_auth_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 610 "mn-pop3-mailbox.c"
+#line 608 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_auth_cb"
{
-#line 404 "mn-pop3-mailbox.gob"
+#line 402 "mn-pop3-mailbox.gob"
#if WITH_SASL
/*
@@ -657,7 +655,7 @@ mn_pop3_mailbox_enter_auth_cb (MNClientSession * session, MNClientSessionPrivate
}
}
else
- return priv->pi_mailbox->auth_cancelled
+ return priv->auth_mailbox->auth_cancelled
? STATE_QUIT
: self_session_authenticate_fallback(priv, FALSE, FALSE);
#else
@@ -665,17 +663,17 @@ mn_pop3_mailbox_enter_auth_cb (MNClientSession * session, MNClientSessionPrivate
return 0;
#endif /* WITH_SASL */
}}
-#line 669 "mn-pop3-mailbox.c"
+#line 667 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 459 "mn-pop3-mailbox.gob"
+#line 457 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_auth_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 675 "mn-pop3-mailbox.c"
+#line 673 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_auth_cb"
{
-#line 463 "mn-pop3-mailbox.gob"
+#line 461 "mn-pop3-mailbox.gob"
#if WITH_SASL
switch (response->type)
@@ -686,7 +684,7 @@ mn_pop3_mailbox_handle_auth_cb (MNClientSession * session, MNClientSessionRespon
: MN_CLIENT_SESSION_RESULT_DISCONNECT;
case RESPONSE_ERR:
- if (priv->pi_mailbox->auth_cancelled)
+ if (priv->auth_mailbox->auth_cancelled)
return STATE_QUIT;
else
{
@@ -717,32 +715,34 @@ mn_pop3_mailbox_handle_auth_cb (MNClientSession * session, MNClientSessionRespon
return 0;
#endif /* WITH_SASL */
}}
-#line 721 "mn-pop3-mailbox.c"
+#line 719 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 505 "mn-pop3-mailbox.gob"
+#line 503 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_apop_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 727 "mn-pop3-mailbox.c"
+#line 725 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_apop_cb"
{
-#line 508 "mn-pop3-mailbox.gob"
+#line 506 "mn-pop3-mailbox.gob"
MNMD5Context context;
- char buf[33];
+ char buf[16];
+ char hexbuf[33];
g_assert(priv->apop_timestamp != NULL);
- if (! mn_pi_mailbox_fill_credentials(priv->pi_mailbox, TRUE, TRUE))
+ if (! mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
return STATE_QUIT;
- mn_md5_init(&context);
- mn_md5_update(&context, priv->apop_timestamp, strlen(priv->apop_timestamp));
- mn_md5_update(&context, priv->pi_mailbox->runtime_password, strlen(priv->pi_mailbox->runtime_password));
- mn_md5_end(&context, buf);
+ mn_md5_init_ctx(&context);
+ mn_md5_process_bytes(&context, priv->apop_timestamp, strlen(priv->apop_timestamp));
+ mn_md5_process_bytes(&context, priv->auth_mailbox->runtime_password, strlen(priv->auth_mailbox->runtime_password));
+ mn_md5_finish_ctx(&context, buf);
+ mn_md5_to_hex(buf, hexbuf);
- return mn_client_session_write(session, "APOP %s %s", priv->pi_mailbox->runtime_username, buf);
+ return mn_client_session_write(session, "APOP %s %s", priv->auth_mailbox->username, hexbuf);
}}
#line 748 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
@@ -792,22 +792,19 @@ mn_pop3_mailbox_enter_user_cb (MNClientSession * session, MNClientSessionPrivate
{
#line 546 "mn-pop3-mailbox.gob"
- if (! mn_pi_mailbox_fill_credentials(priv->pi_mailbox, TRUE, TRUE))
- return STATE_QUIT;
-
- return mn_client_session_write(session, "USER %s", priv->pi_mailbox->runtime_username);
+ return mn_client_session_write(session, "USER %s", priv->auth_mailbox->username);
}}
-#line 801 "mn-pop3-mailbox.c"
+#line 798 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 553 "mn-pop3-mailbox.gob"
+#line 550 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_user_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 807 "mn-pop3-mailbox.c"
+#line 804 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_user_cb"
{
-#line 557 "mn-pop3-mailbox.gob"
+#line 554 "mn-pop3-mailbox.gob"
switch (response->type)
{
@@ -822,33 +819,34 @@ mn_pop3_mailbox_handle_user_cb (MNClientSession * session, MNClientSessionRespon
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 826 "mn-pop3-mailbox.c"
+#line 823 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 572 "mn-pop3-mailbox.gob"
+#line 569 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_pass_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 832 "mn-pop3-mailbox.c"
+#line 829 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_pass_cb"
{
-#line 575 "mn-pop3-mailbox.gob"
+#line 572 "mn-pop3-mailbox.gob"
- g_assert(priv->pi_mailbox->runtime_password != NULL);
+ if (! mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
+ return STATE_QUIT;
- return mn_client_session_write(session, "PASS %s", priv->pi_mailbox->runtime_password);
+ return mn_client_session_write(session, "PASS %s", priv->auth_mailbox->runtime_password);
}}
-#line 842 "mn-pop3-mailbox.c"
+#line 840 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 581 "mn-pop3-mailbox.gob"
+#line 579 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_pass_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 848 "mn-pop3-mailbox.c"
+#line 846 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_pass_cb"
{
-#line 585 "mn-pop3-mailbox.gob"
+#line 583 "mn-pop3-mailbox.gob"
switch (response->type)
{
@@ -862,31 +860,31 @@ mn_pop3_mailbox_handle_pass_cb (MNClientSession * session, MNClientSessionRespon
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 866 "mn-pop3-mailbox.c"
+#line 864 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 599 "mn-pop3-mailbox.gob"
+#line 597 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_list_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 872 "mn-pop3-mailbox.c"
+#line 870 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_list_cb"
{
-#line 602 "mn-pop3-mailbox.gob"
+#line 600 "mn-pop3-mailbox.gob"
return mn_client_session_write(session, "LIST");
}}
-#line 880 "mn-pop3-mailbox.c"
+#line 878 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 606 "mn-pop3-mailbox.gob"
+#line 604 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_list_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 886 "mn-pop3-mailbox.c"
+#line 884 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_list_cb"
{
-#line 610 "mn-pop3-mailbox.gob"
+#line 608 "mn-pop3-mailbox.gob"
self_handle_list_response(priv, response, FALSE);
@@ -918,17 +916,17 @@ mn_pop3_mailbox_handle_list_cb (MNClientSession * session, MNClientSessionRespon
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 922 "mn-pop3-mailbox.c"
+#line 920 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 642 "mn-pop3-mailbox.gob"
+#line 640 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_retr_top_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 928 "mn-pop3-mailbox.c"
+#line 926 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_retr_top_cb"
{
-#line 645 "mn-pop3-mailbox.gob"
+#line 643 "mn-pop3-mailbox.gob"
if (priv->current_message_number)
return mn_client_session_write(session, priv->top_supported ? "TOP %i 0" : "RETR %i", GPOINTER_TO_INT(priv->current_message_number->data));
@@ -952,17 +950,17 @@ mn_pop3_mailbox_enter_retr_top_cb (MNClientSession * session, MNClientSessionPri
return STATE_QUIT;
}
}}
-#line 956 "mn-pop3-mailbox.c"
+#line 954 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 669 "mn-pop3-mailbox.gob"
+#line 667 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_retr_top_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 962 "mn-pop3-mailbox.c"
+#line 960 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_retr_top_cb"
{
-#line 673 "mn-pop3-mailbox.gob"
+#line 671 "mn-pop3-mailbox.gob"
self_handle_list_response(priv, response, TRUE);
@@ -1006,31 +1004,31 @@ mn_pop3_mailbox_handle_retr_top_cb (MNClientSession * session, MNClientSessionRe
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 1010 "mn-pop3-mailbox.c"
+#line 1008 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 717 "mn-pop3-mailbox.gob"
+#line 715 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_enter_quit_cb (MNClientSession * session, MNClientSessionPrivate * priv)
-#line 1016 "mn-pop3-mailbox.c"
+#line 1014 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::enter_quit_cb"
{
-#line 720 "mn-pop3-mailbox.gob"
+#line 718 "mn-pop3-mailbox.gob"
return mn_client_session_write(session, "QUIT");
}}
-#line 1024 "mn-pop3-mailbox.c"
+#line 1022 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 724 "mn-pop3-mailbox.gob"
+#line 722 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_handle_quit_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 1030 "mn-pop3-mailbox.c"
+#line 1028 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_quit_cb"
{
-#line 728 "mn-pop3-mailbox.gob"
+#line 726 "mn-pop3-mailbox.gob"
switch (response->type)
{
@@ -1044,20 +1042,20 @@ mn_pop3_mailbox_handle_quit_cb (MNClientSession * session, MNClientSessionRespon
return MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT;
}
}}
-#line 1048 "mn-pop3-mailbox.c"
+#line 1046 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 742 "mn-pop3-mailbox.gob"
+#line 740 "mn-pop3-mailbox.gob"
static void
___18_mn_pop3_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_UNUSED)
-#line 1054 "mn-pop3-mailbox.c"
+#line 1052 "mn-pop3-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_AUTHENTICATED_MAILBOX_CLASS(parent_class)->authenticated_check) \
(* MN_AUTHENTICATED_MAILBOX_CLASS(parent_class)->authenticated_check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::authenticated_check"
{
-#line 744 "mn-pop3-mailbox.gob"
+#line 742 "mn-pop3-mailbox.gob"
Self *self = SELF(mailbox);
static const MNClientSessionState states[] = {
@@ -1088,6 +1086,9 @@ ___18_mn_pop3_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GN
#if WITH_SASL
mn_pi_mailbox_sasl_get_credentials_cb,
#endif
+#if WITH_SSL
+ mn_pi_mailbox_ssl_trust_server_cb,
+#endif
};
MNClientSessionPrivate priv;
gboolean status;
@@ -1161,18 +1162,18 @@ ___18_mn_pop3_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GN
if (priv.current_message)
g_string_free(priv.current_message, TRUE);
}}
-#line 1165 "mn-pop3-mailbox.c"
+#line 1166 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 848 "mn-pop3-mailbox.gob"
+#line 849 "mn-pop3-mailbox.gob"
static MNClientSessionResponse *
mn_pop3_mailbox_response_new_cb (MNClientSession * session, const char * input, MNClientSessionPrivate * priv)
-#line 1172 "mn-pop3-mailbox.c"
+#line 1173 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::response_new_cb"
{
-#line 852 "mn-pop3-mailbox.gob"
+#line 853 "mn-pop3-mailbox.gob"
MNClientSessionResponse *response = NULL;
@@ -1252,35 +1253,35 @@ mn_pop3_mailbox_response_new_cb (MNClientSession * session, const char * input,
return response;
}}
-#line 1256 "mn-pop3-mailbox.c"
+#line 1257 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 932 "mn-pop3-mailbox.gob"
+#line 933 "mn-pop3-mailbox.gob"
static void
mn_pop3_mailbox_response_free_cb (MNClientSession * session, MNClientSessionResponse * response, MNClientSessionPrivate * priv)
-#line 1262 "mn-pop3-mailbox.c"
+#line 1263 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::response_free_cb"
{
-#line 936 "mn-pop3-mailbox.gob"
+#line 937 "mn-pop3-mailbox.gob"
g_free(response->arguments);
g_free(response);
}}
-#line 1271 "mn-pop3-mailbox.c"
+#line 1272 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 941 "mn-pop3-mailbox.gob"
+#line 942 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_session_authenticate (MNClientSessionPrivate * priv)
-#line 1277 "mn-pop3-mailbox.c"
+#line 1278 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_authenticate"
-#line 941 "mn-pop3-mailbox.gob"
+#line 942 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1282 "mn-pop3-mailbox.c"
+#line 1283 "mn-pop3-mailbox.c"
{
-#line 943 "mn-pop3-mailbox.gob"
+#line 944 "mn-pop3-mailbox.gob"
#if WITH_SASL
g_slist_free(priv->sasl_remaining_mechanisms);
@@ -1331,20 +1332,20 @@ mn_pop3_mailbox_session_authenticate (MNClientSessionPrivate * priv)
return STATE_USER;
}
}}
-#line 1335 "mn-pop3-mailbox.c"
+#line 1336 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 994 "mn-pop3-mailbox.gob"
+#line 995 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gboolean tried_apop, gboolean tried_pass)
-#line 1341 "mn-pop3-mailbox.c"
+#line 1342 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_authenticate_fallback"
-#line 994 "mn-pop3-mailbox.gob"
+#line 995 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1346 "mn-pop3-mailbox.c"
+#line 1347 "mn-pop3-mailbox.c"
{
-#line 998 "mn-pop3-mailbox.gob"
+#line 999 "mn-pop3-mailbox.gob"
if (! priv->pi_mailbox->authmech)
{
@@ -1381,9 +1382,9 @@ mn_pop3_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gb
}
}
- if (priv->pi_mailbox->auth_prompted)
+ if (priv->auth_mailbox->auth_prompted)
{
- mn_pi_mailbox_auth_failed(priv->pi_mailbox);
+ mn_authenticated_mailbox_auth_failed(priv->auth_mailbox);
return self_session_authenticate(priv);
}
else
@@ -1392,20 +1393,20 @@ mn_pop3_mailbox_session_authenticate_fallback (MNClientSessionPrivate * priv, gb
return STATE_QUIT;
}
}}
-#line 1396 "mn-pop3-mailbox.c"
+#line 1397 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1046 "mn-pop3-mailbox.gob"
+#line 1047 "mn-pop3-mailbox.gob"
static int
mn_pop3_mailbox_session_authenticated (MNClientSessionPrivate * priv)
-#line 1402 "mn-pop3-mailbox.c"
+#line 1403 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::session_authenticated"
-#line 1046 "mn-pop3-mailbox.gob"
+#line 1047 "mn-pop3-mailbox.gob"
g_return_val_if_fail (priv != NULL, (int )0);
-#line 1407 "mn-pop3-mailbox.c"
+#line 1408 "mn-pop3-mailbox.c"
{
-#line 1048 "mn-pop3-mailbox.gob"
+#line 1049 "mn-pop3-mailbox.gob"
priv->authenticated = TRUE;
if (priv->self->_priv->login_delay)
@@ -1432,22 +1433,22 @@ mn_pop3_mailbox_session_authenticated (MNClientSessionPrivate * priv)
? STATE_CAPA
: STATE_LIST;
}}
-#line 1436 "mn-pop3-mailbox.c"
+#line 1437 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1075 "mn-pop3-mailbox.gob"
+#line 1076 "mn-pop3-mailbox.gob"
static void
mn_pop3_mailbox_handle_list_response (MNClientSessionPrivate * priv, MNClientSessionResponse * response, gboolean in_retr_top)
-#line 1442 "mn-pop3-mailbox.c"
+#line 1443 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::handle_list_response"
-#line 1075 "mn-pop3-mailbox.gob"
+#line 1076 "mn-pop3-mailbox.gob"
g_return_if_fail (priv != NULL);
-#line 1075 "mn-pop3-mailbox.gob"
+#line 1076 "mn-pop3-mailbox.gob"
g_return_if_fail (response != NULL);
-#line 1449 "mn-pop3-mailbox.c"
+#line 1450 "mn-pop3-mailbox.c"
{
-#line 1079 "mn-pop3-mailbox.gob"
+#line 1080 "mn-pop3-mailbox.gob"
switch (response->type)
{
@@ -1465,24 +1466,24 @@ mn_pop3_mailbox_handle_list_response (MNClientSessionPrivate * priv, MNClientSes
break;
}
}}
-#line 1469 "mn-pop3-mailbox.c"
+#line 1470 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
-#line 1097 "mn-pop3-mailbox.gob"
+#line 1098 "mn-pop3-mailbox.gob"
char *
mn_pop3_mailbox_build_name (const char * username, const char * server)
-#line 1475 "mn-pop3-mailbox.c"
+#line 1476 "mn-pop3-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:POP3:Mailbox::build_name"
-#line 1097 "mn-pop3-mailbox.gob"
+#line 1098 "mn-pop3-mailbox.gob"
+ g_return_val_if_fail (username != NULL, (char * )0);
+#line 1098 "mn-pop3-mailbox.gob"
g_return_val_if_fail (server != NULL, (char * )0);
-#line 1480 "mn-pop3-mailbox.c"
+#line 1483 "mn-pop3-mailbox.c"
{
-#line 1099 "mn-pop3-mailbox.gob"
+#line 1101 "mn-pop3-mailbox.gob"
- return username
- ? g_strdup_printf("%s@%s", username, server)
- : g_strdup(server);
+ return g_strdup_printf("%s@%s", username, server);
}}
-#line 1488 "mn-pop3-mailbox.c"
+#line 1489 "mn-pop3-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-pop3-mailbox.gob b/src/mn-pop3-mailbox.gob
@@ -14,7 +14,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -139,11 +139,20 @@ class MN:POP3:Mailbox from MN:PI:Mailbox
override (MN:Mailbox) void
seal (MNMailbox *mailbox)
{
+ MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
+
PARENT_HANDLER(mailbox);
if (! mailbox->runtime_name)
mailbox->runtime_name = self_build_name(MN_AUTHENTICATED_MAILBOX(mailbox)->username,
MN_PI_MAILBOX(mailbox)->hostname);
+
+#if WITH_SSL
+ if (MN_PI_MAILBOX(mailbox)->connection_type == MN_PI_MAILBOX_CONNECTION_TYPE_SSL)
+ auth_mailbox->keyring_protocol = g_strdup("pop3s");
+ else
+#endif
+ auth_mailbox->keyring_protocol = g_strdup("pop3");
}
/*
@@ -170,34 +179,23 @@ class MN:POP3:Mailbox from MN:PI:Mailbox
char username_buf[buflen];
char authmech_buf[buflen];
char hostname_buf[buflen];
- gboolean has_auth;
- gboolean has_username = FALSE;
gboolean has_authmech = FALSE;
- if (! mn_pi_mailbox_split_uri(uri, len, scheme_buf, auth_buf, location_buf, &has_auth))
+ if (! mn_pi_mailbox_split_uri(uri, len, scheme_buf, auth_buf, location_buf))
return NULL;
if (strcmp(scheme_buf, "pop"))
return NULL;
- if (has_auth)
- {
- if (! mn_pi_mailbox_split_uri_auth(auth_buf, len, username_buf, authmech_buf, &has_username, &has_authmech))
- return NULL;
+ if (! mn_pi_mailbox_split_uri_auth(auth_buf, len, username_buf, authmech_buf, &has_authmech))
+ return NULL;
- if (has_authmech)
- {
- if (! has_username)
- return NULL; /* see user-auth in RFC 2384 ABNF */
- if (! strcmp(authmech_buf, "*"))
- has_authmech = FALSE;
- }
- }
+ if (has_authmech && ! strcmp(authmech_buf, "*"))
+ has_authmech = FALSE;
mn_pi_mailbox_split_uri_hostport(location_buf, len, hostname_buf, &port);
- if (has_username)
- username = gnome_vfs_unescape_string(username_buf, NULL);
+ username = gnome_vfs_unescape_string(username_buf, NULL);
if (has_authmech)
authmech = gnome_vfs_unescape_string(authmech_buf, NULL);
hostname = gnome_vfs_unescape_string(hostname_buf, NULL);
@@ -447,7 +445,7 @@ class MN:POP3:Mailbox from MN:PI:Mailbox
}
}
else
- return priv->pi_mailbox->auth_cancelled
+ return priv->auth_mailbox->auth_cancelled
? STATE_QUIT
: self_session_authenticate_fallback(priv, FALSE, FALSE);
#else
@@ -470,7 +468,7 @@ class MN:POP3:Mailbox from MN:PI:Mailbox
: MN_CLIENT_SESSION_RESULT_DISCONNECT;
case RESPONSE_ERR:
- if (priv->pi_mailbox->auth_cancelled)
+ if (priv->auth_mailbox->auth_cancelled)
return STATE_QUIT;
else
{
@@ -507,19 +505,21 @@ class MN:POP3:Mailbox from MN:PI:Mailbox
MNClientSessionPrivate *priv)
{
MNMD5Context context;
- char buf[33];
+ char buf[16];
+ char hexbuf[33];
g_assert(priv->apop_timestamp != NULL);
- if (! mn_pi_mailbox_fill_credentials(priv->pi_mailbox, TRUE, TRUE))
+ if (! mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
return STATE_QUIT;
- mn_md5_init(&context);
- mn_md5_update(&context, priv->apop_timestamp, strlen(priv->apop_timestamp));
- mn_md5_update(&context, priv->pi_mailbox->runtime_password, strlen(priv->pi_mailbox->runtime_password));
- mn_md5_end(&context, buf);
+ mn_md5_init_ctx(&context);
+ mn_md5_process_bytes(&context, priv->apop_timestamp, strlen(priv->apop_timestamp));
+ mn_md5_process_bytes(&context, priv->auth_mailbox->runtime_password, strlen(priv->auth_mailbox->runtime_password));
+ mn_md5_finish_ctx(&context, buf);
+ mn_md5_to_hex(buf, hexbuf);
- return mn_client_session_write(session, "APOP %s %s", priv->pi_mailbox->runtime_username, buf);
+ return mn_client_session_write(session, "APOP %s %s", priv->auth_mailbox->username, hexbuf);
}
private int
@@ -544,10 +544,7 @@ class MN:POP3:Mailbox from MN:PI:Mailbox
enter_user_cb (MNClientSession *session (check null),
MNClientSessionPrivate *priv (check null))
{
- if (! mn_pi_mailbox_fill_credentials(priv->pi_mailbox, TRUE, TRUE))
- return STATE_QUIT;
-
- return mn_client_session_write(session, "USER %s", priv->pi_mailbox->runtime_username);
+ return mn_client_session_write(session, "USER %s", priv->auth_mailbox->username);
}
private int
@@ -573,9 +570,10 @@ class MN:POP3:Mailbox from MN:PI:Mailbox
enter_pass_cb (MNClientSession *session,
MNClientSessionPrivate *priv)
{
- g_assert(priv->pi_mailbox->runtime_password != NULL);
+ if (! mn_authenticated_mailbox_fill_password(priv->auth_mailbox, TRUE))
+ return STATE_QUIT;
- return mn_client_session_write(session, "PASS %s", priv->pi_mailbox->runtime_password);
+ return mn_client_session_write(session, "PASS %s", priv->auth_mailbox->runtime_password);
}
private int
@@ -771,6 +769,9 @@ class MN:POP3:Mailbox from MN:PI:Mailbox
#if WITH_SASL
mn_pi_mailbox_sasl_get_credentials_cb,
#endif
+#if WITH_SSL
+ mn_pi_mailbox_ssl_trust_server_cb,
+#endif
};
MNClientSessionPrivate priv;
gboolean status;
@@ -1031,9 +1032,9 @@ class MN:POP3:Mailbox from MN:PI:Mailbox
}
}
- if (priv->pi_mailbox->auth_prompted)
+ if (priv->auth_mailbox->auth_prompted)
{
- mn_pi_mailbox_auth_failed(priv->pi_mailbox);
+ mn_authenticated_mailbox_auth_failed(priv->auth_mailbox);
return self_session_authenticate(priv);
}
else
@@ -1095,10 +1096,9 @@ class MN:POP3:Mailbox from MN:PI:Mailbox
}
public char *
- build_name (const char *username, const char *server (check null))
+ build_name (const char *username (check null),
+ const char *server (check null))
{
- return username
- ? g_strdup_printf("%s@%s", username, server)
- : g_strdup(server);
+ return g_strdup_printf("%s@%s", username, server);
}
}
diff --git a/src/mn-popup.c b/src/mn-popup.c
@@ -181,7 +181,7 @@ mn_popup_class_init (MNPopupClass * c G_GNUC_UNUSED)
parent_class = g_type_class_ref (NOTIFY_TYPE_NOTIFICATION);
-#line 49 "mn-popup.gob"
+#line 50 "mn-popup.gob"
g_object_class->constructor = ___1_mn_popup_constructor;
#line 187 "mn-popup.c"
g_object_class->dispose = ___dispose;
@@ -268,7 +268,7 @@ g_value_set_object (VAL, (gpointer)self->_priv->message);
-#line 49 "mn-popup.gob"
+#line 50 "mn-popup.gob"
static GObject *
___1_mn_popup_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
#line 275 "mn-popup.c"
@@ -279,7 +279,7 @@ ___1_mn_popup_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_pr
{
#define __GOB_FUNCTION__ "MN:Popup::constructor"
{
-#line 51 "mn-popup.gob"
+#line 52 "mn-popup.gob"
GObject *object;
Self *self;
@@ -320,17 +320,17 @@ ___1_mn_popup_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_pr
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 88 "mn-popup.gob"
+#line 89 "mn-popup.gob"
static ActionDefinition *
mn_popup_find_action (const char * id)
#line 327 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::find_action"
-#line 88 "mn-popup.gob"
+#line 89 "mn-popup.gob"
g_return_val_if_fail (id != NULL, (ActionDefinition * )0);
#line 332 "mn-popup.c"
{
-#line 90 "mn-popup.gob"
+#line 91 "mn-popup.gob"
static ActionDefinition action_definitions[] = {
{ "open", mn_popup_add_open_cb },
@@ -349,19 +349,19 @@ mn_popup_find_action (const char * id)
#line 350 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 106 "mn-popup.gob"
+#line 107 "mn-popup.gob"
static void
mn_popup_add_actions (MNPopup * self)
#line 356 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::add_actions"
-#line 106 "mn-popup.gob"
+#line 107 "mn-popup.gob"
g_return_if_fail (self != NULL);
-#line 106 "mn-popup.gob"
+#line 107 "mn-popup.gob"
g_return_if_fail (MN_IS_POPUP (self));
#line 363 "mn-popup.c"
{
-#line 108 "mn-popup.gob"
+#line 109 "mn-popup.gob"
GSList *actions;
GSList *l;
@@ -382,7 +382,7 @@ mn_popup_add_actions (MNPopup * self)
if (def)
def->add(self);
else
- g_warning(_("configuration key %s: there is no action named `%s'"), MN_CONF_POPUPS_ACTIONS, id);
+ g_warning(_("configuration key %s: there is no action named \"%s\""), MN_CONF_POPUPS_ACTIONS, id);
}
eel_g_slist_free_deep(actions);
@@ -390,19 +390,19 @@ mn_popup_add_actions (MNPopup * self)
#line 391 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 134 "mn-popup.gob"
+#line 135 "mn-popup.gob"
static void
mn_popup_add_open_cb (MNPopup * self)
#line 397 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::add_open_cb"
-#line 134 "mn-popup.gob"
+#line 135 "mn-popup.gob"
g_return_if_fail (self != NULL);
-#line 134 "mn-popup.gob"
+#line 135 "mn-popup.gob"
g_return_if_fail (MN_IS_POPUP (self));
#line 404 "mn-popup.c"
{
-#line 136 "mn-popup.gob"
+#line 137 "mn-popup.gob"
if (mn_message_can_open(selfp->message))
notify_notification_add_action(NOTIFY_NOTIFICATION(self),
@@ -416,19 +416,19 @@ mn_popup_add_open_cb (MNPopup * self)
#line 417 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 147 "mn-popup.gob"
+#line 148 "mn-popup.gob"
static void
mn_popup_add_mark_as_read_cb (MNPopup * self)
#line 423 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::add_mark_as_read_cb"
-#line 147 "mn-popup.gob"
+#line 148 "mn-popup.gob"
g_return_if_fail (self != NULL);
-#line 147 "mn-popup.gob"
+#line 148 "mn-popup.gob"
g_return_if_fail (MN_IS_POPUP (self));
#line 430 "mn-popup.c"
{
-#line 149 "mn-popup.gob"
+#line 150 "mn-popup.gob"
if (mn_message_can_mark_as_read(selfp->message))
notify_notification_add_action(NOTIFY_NOTIFICATION(self),
@@ -442,19 +442,19 @@ mn_popup_add_mark_as_read_cb (MNPopup * self)
#line 443 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 160 "mn-popup.gob"
+#line 161 "mn-popup.gob"
static void
mn_popup_add_mark_as_spam_cb (MNPopup * self)
#line 449 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::add_mark_as_spam_cb"
-#line 160 "mn-popup.gob"
+#line 161 "mn-popup.gob"
g_return_if_fail (self != NULL);
-#line 160 "mn-popup.gob"
+#line 161 "mn-popup.gob"
g_return_if_fail (MN_IS_POPUP (self));
#line 456 "mn-popup.c"
{
-#line 162 "mn-popup.gob"
+#line 163 "mn-popup.gob"
if (mn_message_can_mark_as_spam(selfp->message))
notify_notification_add_action(NOTIFY_NOTIFICATION(self),
@@ -468,19 +468,19 @@ mn_popup_add_mark_as_spam_cb (MNPopup * self)
#line 469 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 173 "mn-popup.gob"
+#line 174 "mn-popup.gob"
static void
mn_popup_add_delete_cb (MNPopup * self)
#line 475 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::add_delete_cb"
-#line 173 "mn-popup.gob"
+#line 174 "mn-popup.gob"
g_return_if_fail (self != NULL);
-#line 173 "mn-popup.gob"
+#line 174 "mn-popup.gob"
g_return_if_fail (MN_IS_POPUP (self));
#line 482 "mn-popup.c"
{
-#line 175 "mn-popup.gob"
+#line 176 "mn-popup.gob"
if (mn_message_can_delete(selfp->message))
notify_notification_add_action(NOTIFY_NOTIFICATION(self),
@@ -494,14 +494,14 @@ mn_popup_add_delete_cb (MNPopup * self)
#line 495 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 186 "mn-popup.gob"
+#line 187 "mn-popup.gob"
static void
mn_popup_open_cb (NotifyNotification * notification, char * id, gpointer user_data)
#line 501 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::open_cb"
{
-#line 188 "mn-popup.gob"
+#line 189 "mn-popup.gob"
Self *self = SELF(notification);
GError *err = NULL;
@@ -519,14 +519,14 @@ mn_popup_open_cb (NotifyNotification * notification, char * id, gpointer user_da
#line 520 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 203 "mn-popup.gob"
+#line 204 "mn-popup.gob"
static void
mn_popup_mark_as_read_cb (NotifyNotification * notification, char * id, gpointer user_data)
#line 526 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::mark_as_read_cb"
{
-#line 205 "mn-popup.gob"
+#line 206 "mn-popup.gob"
Self *self = SELF(notification);
GError *err = NULL;
@@ -544,14 +544,14 @@ mn_popup_mark_as_read_cb (NotifyNotification * notification, char * id, gpointer
#line 545 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 220 "mn-popup.gob"
+#line 221 "mn-popup.gob"
static void
mn_popup_mark_as_spam_cb (NotifyNotification * notification, char * id, gpointer user_data)
#line 551 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::mark_as_spam_cb"
{
-#line 222 "mn-popup.gob"
+#line 223 "mn-popup.gob"
Self *self = SELF(notification);
GError *err = NULL;
@@ -569,21 +569,21 @@ mn_popup_mark_as_spam_cb (NotifyNotification * notification, char * id, gpointer
#line 570 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 237 "mn-popup.gob"
+#line 238 "mn-popup.gob"
static void
mn_popup_delete_cb (NotifyNotification * notification, char * id, gpointer user_data)
#line 576 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::delete_cb"
{
-#line 239 "mn-popup.gob"
+#line 240 "mn-popup.gob"
Self *self = SELF(notification);
GError *err = NULL;
GDK_THREADS_ENTER();
- if (! mn_message_delete(selfp->message, &err))
+ if (! mn_message_delete(selfp->message, &err) && err != NULL)
{
mn_error_dialog(NULL, _("Unable to delete message"), "%s", err->message);
g_error_free(err);
@@ -594,14 +594,14 @@ mn_popup_delete_cb (NotifyNotification * notification, char * id, gpointer user_
#line 595 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 254 "mn-popup.gob"
+#line 255 "mn-popup.gob"
static void
mn_popup_closed_h (NotifyNotification * notification, gpointer user_data)
#line 601 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::closed_h"
{
-#line 256 "mn-popup.gob"
+#line 257 "mn-popup.gob"
Self *self = SELF(notification);
self->visible = FALSE;
@@ -609,21 +609,21 @@ mn_popup_closed_h (NotifyNotification * notification, gpointer user_data)
#line 610 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 261 "mn-popup.gob"
+#line 262 "mn-popup.gob"
static void
mn_popup_append_row (GString * body, const char * name, const char * value)
#line 616 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::append_row"
-#line 261 "mn-popup.gob"
+#line 262 "mn-popup.gob"
g_return_if_fail (body != NULL);
-#line 261 "mn-popup.gob"
+#line 262 "mn-popup.gob"
g_return_if_fail (name != NULL);
-#line 261 "mn-popup.gob"
+#line 262 "mn-popup.gob"
g_return_if_fail (value != NULL);
#line 625 "mn-popup.c"
{
-#line 265 "mn-popup.gob"
+#line 266 "mn-popup.gob"
char *escaped;
@@ -639,14 +639,14 @@ mn_popup_append_row (GString * body, const char * name, const char * value)
#line 640 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 278 "mn-popup.gob"
+#line 279 "mn-popup.gob"
static int
mn_popup_get_conf_timeout (void)
#line 646 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::get_conf_timeout"
{
-#line 280 "mn-popup.gob"
+#line 281 "mn-popup.gob"
switch (mn_conf_get_enum_value(MN_TYPE_EXPIRATION_ENABLED, MN_CONF_POPUPS_EXPIRATION_ENABLED))
{
@@ -668,22 +668,25 @@ mn_popup_get_conf_timeout (void)
#line 669 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 299 "mn-popup.gob"
+#line 300 "mn-popup.gob"
void
mn_popup_show (MNPopup * self)
#line 675 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::show"
-#line 299 "mn-popup.gob"
+#line 300 "mn-popup.gob"
g_return_if_fail (self != NULL);
-#line 299 "mn-popup.gob"
+#line 300 "mn-popup.gob"
g_return_if_fail (MN_IS_POPUP (self));
#line 682 "mn-popup.c"
{
-#line 301 "mn-popup.gob"
+#line 302 "mn-popup.gob"
GError *err = NULL;
+ if (self->visible)
+ return;
+
if (! notify_notification_show(NOTIFY_NOTIFICATION(self), &err))
{
g_warning(_("unable to show popup: %s"), err->message);
@@ -691,23 +694,24 @@ mn_popup_show (MNPopup * self)
}
self->visible = TRUE;
+ g_get_current_time(&self->show_timestamp);
}}
-#line 696 "mn-popup.c"
+#line 700 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 313 "mn-popup.gob"
+#line 318 "mn-popup.gob"
void
mn_popup_close (MNPopup * self)
-#line 702 "mn-popup.c"
+#line 706 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::close"
-#line 313 "mn-popup.gob"
+#line 318 "mn-popup.gob"
g_return_if_fail (self != NULL);
-#line 313 "mn-popup.gob"
+#line 318 "mn-popup.gob"
g_return_if_fail (MN_IS_POPUP (self));
-#line 709 "mn-popup.c"
+#line 713 "mn-popup.c"
{
-#line 315 "mn-popup.gob"
+#line 320 "mn-popup.gob"
GError *err = NULL;
@@ -720,22 +724,22 @@ mn_popup_close (MNPopup * self)
g_error_free(err);
}
}}
-#line 724 "mn-popup.c"
+#line 728 "mn-popup.c"
#undef __GOB_FUNCTION__
-#line 328 "mn-popup.gob"
+#line 333 "mn-popup.gob"
MNPopup *
mn_popup_new (MNMessage * message)
-#line 730 "mn-popup.c"
+#line 734 "mn-popup.c"
{
#define __GOB_FUNCTION__ "MN:Popup::new"
-#line 328 "mn-popup.gob"
+#line 333 "mn-popup.gob"
g_return_val_if_fail (message != NULL, (MNPopup * )0);
-#line 328 "mn-popup.gob"
+#line 333 "mn-popup.gob"
g_return_val_if_fail (MN_IS_MESSAGE (message), (MNPopup * )0);
-#line 737 "mn-popup.c"
+#line 741 "mn-popup.c"
{
-#line 330 "mn-popup.gob"
+#line 335 "mn-popup.gob"
/* we set the summary here because libnotify requires it */
@@ -744,5 +748,5 @@ mn_popup_new (MNMessage * message)
MN_POPUP_PROP_MESSAGE(message),
NULL);
}}
-#line 748 "mn-popup.c"
+#line 752 "mn-popup.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-popup.gob b/src/mn-popup.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -45,6 +45,7 @@ class MN:Popup from Notify:Notification
property OBJECT message (flags = CONSTRUCT_ONLY, link, object_type = MN:Message, type = MNMessage *);
public gboolean visible;
+ public GTimeVal show_timestamp;
override (G:Object) GObject *
constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
@@ -125,7 +126,7 @@ class MN:Popup from Notify:Notification
if (def)
def->add(self);
else
- g_warning(_("configuration key %s: there is no action named `%s'"), MN_CONF_POPUPS_ACTIONS, id);
+ g_warning(_("configuration key %s: there is no action named \"%s\""), MN_CONF_POPUPS_ACTIONS, id);
}
eel_g_slist_free_deep(actions);
@@ -242,7 +243,7 @@ class MN:Popup from Notify:Notification
GDK_THREADS_ENTER();
- if (! mn_message_delete(selfp->message, &err))
+ if (! mn_message_delete(selfp->message, &err) && err != NULL)
{
mn_error_dialog(NULL, _("Unable to delete message"), "%s", err->message);
g_error_free(err);
@@ -301,6 +302,9 @@ class MN:Popup from Notify:Notification
{
GError *err = NULL;
+ if (self->visible)
+ return;
+
if (! notify_notification_show(NOTIFY_NOTIFICATION(self), &err))
{
g_warning(_("unable to show popup: %s"), err->message);
@@ -308,6 +312,7 @@ class MN:Popup from Notify:Notification
}
self->visible = TRUE;
+ g_get_current_time(&self->show_timestamp);
}
public void
diff --git a/src/mn-popup.h b/src/mn-popup.h
@@ -40,6 +40,7 @@ struct _MNPopup {
NotifyNotification __parent__;
/*< public >*/
gboolean visible;
+ GTimeVal show_timestamp;
/*< private >*/
MNPopupPrivate *_priv;
};
diff --git a/src/mn-popups-private.h b/src/mn-popups-private.h
@@ -10,7 +10,7 @@ extern "C" {
#endif /* __cplusplus */
struct _MNPopupsPrivate {
-#line 36 "mn-popups.gob"
+#line 41 "mn-popups.gob"
GHashTable * popups;
#line 16 "mn-popups-private.h"
};
diff --git a/src/mn-popups.c b/src/mn-popups.c
@@ -51,18 +51,31 @@ typedef MNPopupsClass SelfClass;
/* here are local prototypes */
static void mn_popups_class_init (MNPopupsClass * c) G_GNUC_UNUSED;
static void mn_popups_init (MNPopups * self) G_GNUC_UNUSED;
+static void mn_popups_close_cb (const char * id, MNPopup * popup, gpointer user_data) G_GNUC_UNUSED;
+static void mn_popups_close_popups (MNPopups * self) G_GNUC_UNUSED;
+static void ___4_mn_popups_finalize (GObject * object) G_GNUC_UNUSED;
static void mn_popups_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data) G_GNUC_UNUSED;
static void mn_popups_notify_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-static gboolean mn_popups_clean_cb (const char * id, MNPopup * popup, gpointer user_data) G_GNUC_UNUSED;
+static int mn_popups_popups_show_timestamp_compare_cb (MNPopup * a, MNPopup * b) G_GNUC_UNUSED;
+static void mn_popups_get_visible_popups_cb (const char * id, MNPopup * popup, GSList ** list) G_GNUC_UNUSED;
+static GSList * mn_popups_get_visible_popups (MNPopups * self) G_GNUC_UNUSED;
+static gboolean mn_popups_close_and_remove_cb (const char * id, MNPopup * popup, gpointer user_data) G_GNUC_UNUSED;
+static gboolean mn_popups_close_and_remove_stale_cb (const char * id, MNPopup * popup, GHashTable * messages) G_GNUC_UNUSED;
static void mn_popups_update (MNPopups * self, gboolean reshow_current_popups) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static GObjectClass *parent_class = NULL;
/* Short form macros */
+#define self_close_cb mn_popups_close_cb
+#define self_close_popups mn_popups_close_popups
#define self_messages_changed_h mn_popups_messages_changed_h
#define self_notify_cb mn_popups_notify_cb
-#define self_clean_cb mn_popups_clean_cb
+#define self_popups_show_timestamp_compare_cb mn_popups_popups_show_timestamp_compare_cb
+#define self_get_visible_popups_cb mn_popups_get_visible_popups_cb
+#define self_get_visible_popups mn_popups_get_visible_popups
+#define self_close_and_remove_cb mn_popups_close_and_remove_cb
+#define self_close_and_remove_stale_cb mn_popups_close_and_remove_stale_cb
#define self_update mn_popups_update
#define self_new mn_popups_new
GType
@@ -114,11 +127,12 @@ ___finalize(GObject *obj_self)
#define __GOB_FUNCTION__ "MN:Popups::finalize"
MNPopups *self G_GNUC_UNUSED = MN_POPUPS (obj_self);
gpointer priv G_GNUC_UNUSED = self->_priv;
- if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 36 "mn-popups.gob"
+#line 68 "mn-popups.gob"
+ ___4_mn_popups_finalize(obj_self);
+#line 133 "mn-popups.c"
+#line 41 "mn-popups.gob"
if(self->_priv->popups) { g_hash_table_destroy ((gpointer) self->_priv->popups); self->_priv->popups = NULL; }
-#line 122 "mn-popups.c"
+#line 136 "mn-popups.c"
}
#undef __GOB_FUNCTION__
@@ -132,21 +146,23 @@ mn_popups_class_init (MNPopupsClass * c G_GNUC_UNUSED)
parent_class = g_type_class_ref (G_TYPE_OBJECT);
+#line 68 "mn-popups.gob"
g_object_class->finalize = ___finalize;
+#line 152 "mn-popups.c"
}
#undef __GOB_FUNCTION__
-#line 38 "mn-popups.gob"
+#line 43 "mn-popups.gob"
static void
mn_popups_init (MNPopups * self G_GNUC_UNUSED)
-#line 142 "mn-popups.c"
+#line 158 "mn-popups.c"
{
#define __GOB_FUNCTION__ "MN:Popups::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_POPUPS,MNPopupsPrivate);
-#line 36 "mn-popups.gob"
+#line 41 "mn-popups.gob"
self->_priv->popups = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) mn_g_object_null_unref);
-#line 148 "mn-popups.c"
+#line 164 "mn-popups.c"
{
-#line 39 "mn-popups.gob"
+#line 44 "mn-popups.gob"
if (! notify_is_initted())
return; /* libnotify init failed */
@@ -157,137 +173,349 @@ mn_popups_init (MNPopups * self G_GNUC_UNUSED)
g_signal_connect(mn_shell->mailboxes, "messages-changed", G_CALLBACK(self_messages_changed_h), self);
-#line 161 "mn-popups.c"
+#line 177 "mn-popups.c"
}
}
#undef __GOB_FUNCTION__
-#line 50 "mn-popups.gob"
+#line 55 "mn-popups.gob"
+static void
+mn_popups_close_cb (const char * id, MNPopup * popup, gpointer user_data)
+#line 187 "mn-popups.c"
+{
+#define __GOB_FUNCTION__ "MN:Popups::close_cb"
+{
+#line 57 "mn-popups.gob"
+
+ if (popup)
+ mn_popup_close(popup);
+ }}
+#line 196 "mn-popups.c"
+#undef __GOB_FUNCTION__
+
+#line 62 "mn-popups.gob"
+static void
+mn_popups_close_popups (MNPopups * self)
+#line 202 "mn-popups.c"
+{
+#define __GOB_FUNCTION__ "MN:Popups::close_popups"
+#line 62 "mn-popups.gob"
+ g_return_if_fail (self != NULL);
+#line 62 "mn-popups.gob"
+ g_return_if_fail (MN_IS_POPUPS (self));
+#line 209 "mn-popups.c"
+{
+#line 64 "mn-popups.gob"
+
+ g_hash_table_foreach(selfp->popups, (GHFunc) self_close_cb, NULL);
+ }}
+#line 215 "mn-popups.c"
+#undef __GOB_FUNCTION__
+
+#line 68 "mn-popups.gob"
+static void
+___4_mn_popups_finalize (GObject * object G_GNUC_UNUSED)
+#line 221 "mn-popups.c"
+#define PARENT_HANDLER(___object) \
+ { if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
+{
+#define __GOB_FUNCTION__ "MN:Popups::finalize"
+{
+#line 70 "mn-popups.gob"
+
+ Self *self = SELF(object);
+
+ /* close popups on exit */
+ self_close_popups(self);
+
+ PARENT_HANDLER(object);
+ }}
+#line 237 "mn-popups.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 79 "mn-popups.gob"
static void
mn_popups_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data)
-#line 171 "mn-popups.c"
+#line 244 "mn-popups.c"
{
#define __GOB_FUNCTION__ "MN:Popups::messages_changed_h"
{
-#line 54 "mn-popups.gob"
+#line 83 "mn-popups.gob"
Self *self = user_data;
self_update(self, FALSE);
}}
-#line 181 "mn-popups.c"
+#line 254 "mn-popups.c"
#undef __GOB_FUNCTION__
-#line 60 "mn-popups.gob"
+#line 89 "mn-popups.gob"
static void
mn_popups_notify_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-#line 187 "mn-popups.c"
+#line 260 "mn-popups.c"
{
#define __GOB_FUNCTION__ "MN:Popups::notify_cb"
{
-#line 65 "mn-popups.gob"
+#line 94 "mn-popups.gob"
Self *self = user_data;
self_update(self, TRUE);
}}
-#line 197 "mn-popups.c"
+#line 270 "mn-popups.c"
+#undef __GOB_FUNCTION__
+
+#line 100 "mn-popups.gob"
+static int
+mn_popups_popups_show_timestamp_compare_cb (MNPopup * a, MNPopup * b)
+#line 276 "mn-popups.c"
+{
+#define __GOB_FUNCTION__ "MN:Popups::popups_show_timestamp_compare_cb"
+{
+#line 102 "mn-popups.gob"
+
+ int cmp;
+
+ cmp = a->show_timestamp.tv_sec - b->show_timestamp.tv_sec;
+ if (cmp != 0)
+ return cmp;
+
+ return a->show_timestamp.tv_usec - b->show_timestamp.tv_usec;
+ }}
+#line 290 "mn-popups.c"
+#undef __GOB_FUNCTION__
+
+#line 112 "mn-popups.gob"
+static void
+mn_popups_get_visible_popups_cb (const char * id, MNPopup * popup, GSList ** list)
+#line 296 "mn-popups.c"
+{
+#define __GOB_FUNCTION__ "MN:Popups::get_visible_popups_cb"
+{
+#line 114 "mn-popups.gob"
+
+ if (popup && popup->visible)
+ *list = g_slist_insert_sorted(*list, popup, (GCompareFunc) self_popups_show_timestamp_compare_cb);
+ }}
+#line 305 "mn-popups.c"
+#undef __GOB_FUNCTION__
+
+#line 120 "mn-popups.gob"
+static GSList *
+mn_popups_get_visible_popups (MNPopups * self)
+#line 311 "mn-popups.c"
+{
+#define __GOB_FUNCTION__ "MN:Popups::get_visible_popups"
+#line 120 "mn-popups.gob"
+ g_return_val_if_fail (self != NULL, (GSList * )0);
+#line 120 "mn-popups.gob"
+ g_return_val_if_fail (MN_IS_POPUPS (self), (GSList * )0);
+#line 318 "mn-popups.c"
+{
+#line 122 "mn-popups.gob"
+
+ GSList *popups = NULL;
+
+ g_hash_table_foreach(selfp->popups, (GHFunc) self_get_visible_popups_cb, &popups);
+
+ return popups;
+ }}
+#line 328 "mn-popups.c"
#undef __GOB_FUNCTION__
-#line 71 "mn-popups.gob"
+#line 130 "mn-popups.gob"
static gboolean
-mn_popups_clean_cb (const char * id, MNPopup * popup, gpointer user_data)
-#line 203 "mn-popups.c"
+mn_popups_close_and_remove_cb (const char * id, MNPopup * popup, gpointer user_data)
+#line 334 "mn-popups.c"
{
-#define __GOB_FUNCTION__ "MN:Popups::clean_cb"
+#define __GOB_FUNCTION__ "MN:Popups::close_and_remove_cb"
{
-#line 75 "mn-popups.gob"
+#line 132 "mn-popups.gob"
- GHashTable *messages = user_data;
+ if (popup != NULL)
+ mn_popup_close(popup);
+
+ return TRUE; /* remove */
+ }}
+#line 345 "mn-popups.c"
+#undef __GOB_FUNCTION__
+#line 139 "mn-popups.gob"
+static gboolean
+mn_popups_close_and_remove_stale_cb (const char * id, MNPopup * popup, GHashTable * messages)
+#line 351 "mn-popups.c"
+{
+#define __GOB_FUNCTION__ "MN:Popups::close_and_remove_stale_cb"
+{
+#line 141 "mn-popups.gob"
+
if (! g_hash_table_lookup(messages, id))
{
if (popup != NULL)
mn_popup_close(popup);
+
return TRUE; /* remove */
}
else
return FALSE; /* keep */
}}
-#line 220 "mn-popups.c"
+#line 367 "mn-popups.c"
#undef __GOB_FUNCTION__
-#line 88 "mn-popups.gob"
+#line 153 "mn-popups.gob"
static void
mn_popups_update (MNPopups * self, gboolean reshow_current_popups)
-#line 226 "mn-popups.c"
+#line 373 "mn-popups.c"
{
#define __GOB_FUNCTION__ "MN:Popups::update"
-#line 88 "mn-popups.gob"
+#line 153 "mn-popups.gob"
g_return_if_fail (self != NULL);
-#line 88 "mn-popups.gob"
+#line 153 "mn-popups.gob"
g_return_if_fail (MN_IS_POPUPS (self));
-#line 233 "mn-popups.c"
+#line 380 "mn-popups.c"
{
-#line 90 "mn-popups.gob"
+#line 155 "mn-popups.gob"
- GHashTable *messages;
GSList *l;
- /* remove notifications whose message no longer exists */
-
- messages = g_hash_table_new(g_str_hash, g_str_equal);
- MN_LIST_FOREACH(l, mn_shell->mailboxes->messages)
+ if (reshow_current_popups)
+ /* we have to reshow the popups, so close them */
+ g_hash_table_foreach_remove(selfp->popups, (GHRFunc) self_close_and_remove_cb, NULL);
+ else
{
- MNMessage *message = l->data;
- g_hash_table_insert(messages, message->id, message);
- }
+ GHashTable *messages_hash;
+
+ /* close and remove stale popups */
- g_hash_table_foreach_remove(selfp->popups, (GHRFunc) self_clean_cb, messages);
- g_hash_table_destroy(messages);
+ messages_hash = g_hash_table_new(g_str_hash, g_str_equal);
+ MN_LIST_FOREACH(l, mn_shell->mailboxes->messages)
+ {
+ MNMessage *message = l->data;
+ g_hash_table_insert(messages_hash, message->id, message);
+ }
- /* send notifications for new messages */
+ g_hash_table_foreach_remove(selfp->popups, (GHRFunc) self_close_and_remove_stale_cb, messages_hash);
+ g_hash_table_destroy(messages_hash);
+ }
- MN_LIST_FOREACH(l, mn_shell->mailboxes->messages)
+ if (eel_gconf_get_boolean(MN_CONF_POPUPS_ENABLED))
{
- MNMessage *message = l->data;
- MNPopup *popup = NULL;
- gpointer ptr;
+ GPtrArray *messages; /* for O(1) length retrieval and indexing */
+ GSList *visible_popups;
+ int num_visible_popups;
+ int popup_limit;
+ int new_popup_count;
+ int messages_to_popup; /* the number of messages to popup */
+ int i;
+
+ if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED)
+ /* the popup is attached to the icon: allow at most one popup */
+ popup_limit = 1;
+ else
+ popup_limit = eel_gconf_get_integer(MN_CONF_POPUPS_LIMIT);
+
+ /* build a list of messages which are not already known */
+
+ messages = g_ptr_array_new();
+
+ MN_LIST_FOREACH(l, mn_shell->mailboxes->messages)
+ {
+ MNMessage *message = l->data;
+ gpointer ptr;
+
+ if (! g_hash_table_lookup_extended(selfp->popups, message->id, NULL, &ptr))
+ g_ptr_array_add(messages, message);
+ }
+
+ visible_popups = self_get_visible_popups(self);
+ num_visible_popups = g_slist_length(visible_popups);
+
+ new_popup_count = num_visible_popups + messages->len;
+ if (new_popup_count > popup_limit)
+ {
+ int to_remove;
+
+ /* make room for n new popups by closing the n oldest popups */
+
+ to_remove = new_popup_count - popup_limit;
+ to_remove = MIN(num_visible_popups, to_remove);
+
+ while (to_remove > 0)
+ {
+ MNPopup *oldest;
+
+ g_assert(visible_popups != NULL);
+
+ oldest = visible_popups->data;
+ mn_popup_close(oldest);
+
+ visible_popups = g_slist_delete_link(visible_popups, visible_popups);
+ to_remove--;
+ }
+ }
+
+ g_slist_free(visible_popups);
- if (g_hash_table_lookup_extended(selfp->popups, message->id, NULL, &ptr))
+ messages_to_popup = MIN(messages->len, popup_limit);
+
+ /*
+ * Below we iterate over the messages array backwards because
+ * it is sorted by sent time most recent first, while we want
+ * to popup the oldest messages first.
+ */
+
+ /* register the messages which we will not popup */
+
+ for (i = messages->len - 1; i >= messages_to_popup; i--)
{
- MNPopup *cur_popup = ptr;
+ MNMessage *message = g_ptr_array_index(messages, i);
- if (reshow_current_popups && cur_popup && cur_popup->visible)
- mn_popup_close(cur_popup);
- else
- continue;
+ g_hash_table_replace(selfp->popups, g_strdup(message->id), NULL);
}
- if (eel_gconf_get_boolean(MN_CONF_POPUPS_ENABLED))
+ /* popup the first messages_to_popup messages */
+
+ for (i = messages_to_popup - 1; i >= 0; i--)
{
+ MNMessage *message = g_ptr_array_index(messages, i);
+ MNPopup *popup;
+
popup = mn_popup_new(message);
mn_popup_show(popup);
+
+ g_hash_table_replace(selfp->popups, g_strdup(message->id), popup);
}
- g_hash_table_replace(selfp->popups, g_strdup(message->id), popup);
+ g_ptr_array_free(messages, TRUE);
+ }
+ else
+ {
+ /* register the new messages */
+
+ MN_LIST_FOREACH(l, mn_shell->mailboxes->messages)
+ {
+ MNMessage *message = l->data;
+ g_hash_table_replace(selfp->popups, g_strdup(message->id), NULL);
+ }
}
}}
-#line 279 "mn-popups.c"
+#line 507 "mn-popups.c"
#undef __GOB_FUNCTION__
-#line 134 "mn-popups.gob"
+#line 280 "mn-popups.gob"
MNPopups *
mn_popups_new (void)
-#line 285 "mn-popups.c"
+#line 513 "mn-popups.c"
{
#define __GOB_FUNCTION__ "MN:Popups::new"
{
-#line 136 "mn-popups.gob"
+#line 282 "mn-popups.gob"
return GET_NEW;
}}
-#line 293 "mn-popups.c"
+#line 521 "mn-popups.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-popups.gob b/src/mn-popups.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -33,6 +33,11 @@ requires 2.0.14
class MN:Popups from G:Object
{
+ /*
+ * Maps message IDs to popups. If a message is known but has no
+ * popup (because popups were disabled when that message was first
+ * encountered), the value is NULL.
+ */
private GHashTable *popups = {g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) mn_g_object_null_unref)} destroywith g_hash_table_destroy;
init (self)
@@ -48,6 +53,30 @@ class MN:Popups from G:Object
}
private void
+ close_cb (const char *id, MNPopup *popup, gpointer user_data)
+ {
+ if (popup)
+ mn_popup_close(popup);
+ }
+
+ private void
+ close_popups (self)
+ {
+ g_hash_table_foreach(selfp->popups, (GHFunc) self_close_cb, NULL);
+ }
+
+ override (G:Object) void
+ finalize (GObject *object)
+ {
+ Self *self = SELF(object);
+
+ /* close popups on exit */
+ self_close_popups(self);
+
+ PARENT_HANDLER(object);
+ }
+
+ private void
messages_changed_h (MNMailboxes *mailboxes,
gboolean has_new,
gpointer user_data)
@@ -68,17 +97,53 @@ class MN:Popups from G:Object
self_update(self, TRUE);
}
+ private int
+ popups_show_timestamp_compare_cb (MNPopup *a, MNPopup *b)
+ {
+ int cmp;
+
+ cmp = a->show_timestamp.tv_sec - b->show_timestamp.tv_sec;
+ if (cmp != 0)
+ return cmp;
+
+ return a->show_timestamp.tv_usec - b->show_timestamp.tv_usec;
+ }
+
+ private void
+ get_visible_popups_cb (const char *id, MNPopup *popup, GSList **list)
+ {
+ if (popup && popup->visible)
+ *list = g_slist_insert_sorted(*list, popup, (GCompareFunc) self_popups_show_timestamp_compare_cb);
+ }
+
+ /* returns the visible popups sorted by show timestamp, oldest first */
+ private GSList *
+ get_visible_popups (self)
+ {
+ GSList *popups = NULL;
+
+ g_hash_table_foreach(selfp->popups, (GHFunc) self_get_visible_popups_cb, &popups);
+
+ return popups;
+ }
+
private gboolean
- clean_cb (const char *id,
- MNPopup *popup,
- gpointer user_data)
+ close_and_remove_cb (const char *id, MNPopup *popup, gpointer user_data)
{
- GHashTable *messages = user_data;
+ if (popup != NULL)
+ mn_popup_close(popup);
+ return TRUE; /* remove */
+ }
+
+ private gboolean
+ close_and_remove_stale_cb (const char *id, MNPopup *popup, GHashTable *messages)
+ {
if (! g_hash_table_lookup(messages, id))
{
if (popup != NULL)
mn_popup_close(popup);
+
return TRUE; /* remove */
}
else
@@ -88,46 +153,127 @@ class MN:Popups from G:Object
private void
update (self, gboolean reshow_current_popups)
{
- GHashTable *messages;
GSList *l;
- /* remove notifications whose message no longer exists */
-
- messages = g_hash_table_new(g_str_hash, g_str_equal);
- MN_LIST_FOREACH(l, mn_shell->mailboxes->messages)
+ if (reshow_current_popups)
+ /* we have to reshow the popups, so close them */
+ g_hash_table_foreach_remove(selfp->popups, (GHRFunc) self_close_and_remove_cb, NULL);
+ else
{
- MNMessage *message = l->data;
- g_hash_table_insert(messages, message->id, message);
- }
+ GHashTable *messages_hash;
- g_hash_table_foreach_remove(selfp->popups, (GHRFunc) self_clean_cb, messages);
- g_hash_table_destroy(messages);
+ /* close and remove stale popups */
- /* send notifications for new messages */
+ messages_hash = g_hash_table_new(g_str_hash, g_str_equal);
+ MN_LIST_FOREACH(l, mn_shell->mailboxes->messages)
+ {
+ MNMessage *message = l->data;
+ g_hash_table_insert(messages_hash, message->id, message);
+ }
- MN_LIST_FOREACH(l, mn_shell->mailboxes->messages)
+ g_hash_table_foreach_remove(selfp->popups, (GHRFunc) self_close_and_remove_stale_cb, messages_hash);
+ g_hash_table_destroy(messages_hash);
+ }
+
+ if (eel_gconf_get_boolean(MN_CONF_POPUPS_ENABLED))
{
- MNMessage *message = l->data;
- MNPopup *popup = NULL;
- gpointer ptr;
+ GPtrArray *messages; /* for O(1) length retrieval and indexing */
+ GSList *visible_popups;
+ int num_visible_popups;
+ int popup_limit;
+ int new_popup_count;
+ int messages_to_popup; /* the number of messages to popup */
+ int i;
+
+ if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED)
+ /* the popup is attached to the icon: allow at most one popup */
+ popup_limit = 1;
+ else
+ popup_limit = eel_gconf_get_integer(MN_CONF_POPUPS_LIMIT);
+
+ /* build a list of messages which are not already known */
+
+ messages = g_ptr_array_new();
+
+ MN_LIST_FOREACH(l, mn_shell->mailboxes->messages)
+ {
+ MNMessage *message = l->data;
+ gpointer ptr;
+
+ if (! g_hash_table_lookup_extended(selfp->popups, message->id, NULL, &ptr))
+ g_ptr_array_add(messages, message);
+ }
+
+ visible_popups = self_get_visible_popups(self);
+ num_visible_popups = g_slist_length(visible_popups);
+
+ new_popup_count = num_visible_popups + messages->len;
+ if (new_popup_count > popup_limit)
+ {
+ int to_remove;
+
+ /* make room for n new popups by closing the n oldest popups */
+
+ to_remove = new_popup_count - popup_limit;
+ to_remove = MIN(num_visible_popups, to_remove);
+
+ while (to_remove > 0)
+ {
+ MNPopup *oldest;
- if (g_hash_table_lookup_extended(selfp->popups, message->id, NULL, &ptr))
+ g_assert(visible_popups != NULL);
+
+ oldest = visible_popups->data;
+ mn_popup_close(oldest);
+
+ visible_popups = g_slist_delete_link(visible_popups, visible_popups);
+ to_remove--;
+ }
+ }
+
+ g_slist_free(visible_popups);
+
+ messages_to_popup = MIN(messages->len, popup_limit);
+
+ /*
+ * Below we iterate over the messages array backwards because
+ * it is sorted by sent time most recent first, while we want
+ * to popup the oldest messages first.
+ */
+
+ /* register the messages which we will not popup */
+
+ for (i = messages->len - 1; i >= messages_to_popup; i--)
{
- MNPopup *cur_popup = ptr;
+ MNMessage *message = g_ptr_array_index(messages, i);
- if (reshow_current_popups && cur_popup && cur_popup->visible)
- mn_popup_close(cur_popup);
- else
- continue;
+ g_hash_table_replace(selfp->popups, g_strdup(message->id), NULL);
}
- if (eel_gconf_get_boolean(MN_CONF_POPUPS_ENABLED))
+ /* popup the first messages_to_popup messages */
+
+ for (i = messages_to_popup - 1; i >= 0; i--)
{
+ MNMessage *message = g_ptr_array_index(messages, i);
+ MNPopup *popup;
+
popup = mn_popup_new(message);
mn_popup_show(popup);
+
+ g_hash_table_replace(selfp->popups, g_strdup(message->id), popup);
}
- g_hash_table_replace(selfp->popups, g_strdup(message->id), popup);
+ g_ptr_array_free(messages, TRUE);
+ }
+ else
+ {
+ /* register the new messages */
+
+ MN_LIST_FOREACH(l, mn_shell->mailboxes->messages)
+ {
+ MNMessage *message = l->data;
+ g_hash_table_replace(selfp->popups, g_strdup(message->id), NULL);
+ }
}
}
diff --git a/src/mn-properties-dialog-private.h b/src/mn-properties-dialog-private.h
@@ -16,75 +16,61 @@ extern "C" {
#line 18 "mn-properties-dialog-private.h"
struct _MNPropertiesDialogPrivate {
-#line 44 "mn-properties-dialog.gob"
+#line 46 "mn-properties-dialog.gob"
GtkWidget * notebook;
-#line 47 "mn-properties-dialog.gob"
- GtkWidget * display_seen_mail_check;
-#line 48 "mn-properties-dialog.gob"
- GtkWidget * scrolled;
#line 49 "mn-properties-dialog.gob"
- GtkWidget * list;
+ GtkWidget * play_sound_hbox;
#line 50 "mn-properties-dialog.gob"
- GtkWidget * selected_label;
+ GtkWidget * play_sound_check;
#line 51 "mn-properties-dialog.gob"
- GtkWidget * add;
+ GtkWidget * play_sound_file_chooser_button;
#line 52 "mn-properties-dialog.gob"
- GtkWidget * remove;
+ GtkWidget * scrolled;
#line 53 "mn-properties-dialog.gob"
- GtkWidget * properties;
+ GtkWidget * list;
#line 54 "mn-properties-dialog.gob"
- GtkWidget * command_new_mail_check;
+ GtkWidget * selected_label;
#line 55 "mn-properties-dialog.gob"
- GtkWidget * command_new_mail_entry;
+ GtkWidget * add;
#line 56 "mn-properties-dialog.gob"
- GtkWidget * command_mail_read_check;
+ GtkWidget * remove;
#line 57 "mn-properties-dialog.gob"
- GtkWidget * command_mail_read_entry;
+ GtkWidget * properties;
#line 60 "mn-properties-dialog.gob"
- GtkWidget * icon_blink_check;
+ GtkWidget * icon_action_mail_reader_radio;
#line 61 "mn-properties-dialog.gob"
- GtkWidget * icon_always_display_check;
+ GtkWidget * icon_action_open_latest_message_radio;
#line 62 "mn-properties-dialog.gob"
- GtkWidget * icon_tooltip_mail_summary_standard_radio;
+ GtkWidget * icon_action_consider_new_mail_as_read_radio;
#line 63 "mn-properties-dialog.gob"
- GtkWidget * icon_tooltip_mail_summary_compact_radio;
-#line 64 "mn-properties-dialog.gob"
- GtkWidget * icon_tooltip_mail_summary_none_radio;
-#line 65 "mn-properties-dialog.gob"
- GtkWidget * icon_action_properties_dialog_radio;
-#line 66 "mn-properties-dialog.gob"
- GtkWidget * icon_action_mail_reader_radio;
-#line 67 "mn-properties-dialog.gob"
- GtkWidget * icon_action_open_latest_message_radio;
-#line 68 "mn-properties-dialog.gob"
GtkWidget * icon_action_update_radio;
-#line 71 "mn-properties-dialog.gob"
+#line 66 "mn-properties-dialog.gob"
GtkWidget * popups_enable_check;
-#line 72 "mn-properties-dialog.gob"
+#line 67 "mn-properties-dialog.gob"
GtkWidget * popups_position_section_label;
-#line 73 "mn-properties-dialog.gob"
+#line 68 "mn-properties-dialog.gob"
GtkWidget * popups_position_attached_radio;
-#line 74 "mn-properties-dialog.gob"
+#line 69 "mn-properties-dialog.gob"
GtkWidget * popups_position_free_radio;
-#line 75 "mn-properties-dialog.gob"
+#line 70 "mn-properties-dialog.gob"
GtkWidget * popups_expiration_section_label;
-#line 76 "mn-properties-dialog.gob"
+#line 71 "mn-properties-dialog.gob"
GtkWidget * popups_expiration_default_radio;
-#line 77 "mn-properties-dialog.gob"
+#line 72 "mn-properties-dialog.gob"
GtkWidget * popups_expiration_never_radio;
-#line 78 "mn-properties-dialog.gob"
+#line 73 "mn-properties-dialog.gob"
GtkWidget * popups_expiration_after_radio;
-#line 79 "mn-properties-dialog.gob"
+#line 74 "mn-properties-dialog.gob"
GtkWidget * popups_expiration_minutes_spin;
-#line 80 "mn-properties-dialog.gob"
+#line 75 "mn-properties-dialog.gob"
GtkWidget * popups_expiration_minutes_label;
-#line 81 "mn-properties-dialog.gob"
+#line 76 "mn-properties-dialog.gob"
GtkWidget * popups_expiration_seconds_spin;
-#line 82 "mn-properties-dialog.gob"
+#line 77 "mn-properties-dialog.gob"
GtkWidget * popups_expiration_seconds_label;
-#line 84 "mn-properties-dialog.gob"
+#line 79 "mn-properties-dialog.gob"
MNMailbox * test_mailbox;
-#line 88 "mn-properties-dialog-private.h"
+#line 74 "mn-properties-dialog-private.h"
};
void mn_properties_dialog_toggled_h (MNPropertiesDialog * self, GtkToggleButton * button);
void mn_properties_dialog_add_clicked_h (MNPropertiesDialog * self, GtkButton * button);
diff --git a/src/mn-properties-dialog.c b/src/mn-properties-dialog.c
@@ -32,9 +32,11 @@
#include "mn-util.h"
#include "mn-mailbox-view.h"
#include "mn-shell.h"
+#include "mn-file-chooser-button.h"
+#include "mn-sound-file-chooser-dialog.h"
#include "mn-test-mailbox.h"
-#line 38 "mn-properties-dialog.c"
+#line 40 "mn-properties-dialog.c"
/* self casting macros */
#define SELF(x) MN_PROPERTIES_DIALOG(x)
#define SELF_CONST(x) MN_PROPERTIES_DIALOG_CONST(x)
@@ -51,6 +53,7 @@ typedef MNPropertiesDialogClass SelfClass;
/* here are local prototypes */
static void mn_properties_dialog_class_init (MNPropertiesDialogClass * c) G_GNUC_UNUSED;
static void mn_properties_dialog_init (MNPropertiesDialog * self) G_GNUC_UNUSED;
+static GtkFileChooserDialog * mn_properties_dialog_play_sound_file_chooser_create_dialog_cb (gpointer data) G_GNUC_UNUSED;
static void mn_properties_dialog_test_messages_toggled_h (MNPropertiesDialog * self, GtkToggleButton * button) G_GNUC_UNUSED;
static void mn_properties_dialog_remove_test_mailbox (MNPropertiesDialog * self) G_GNUC_UNUSED;
static void mn_properties_dialog_response_h (MNPropertiesDialog * self, int response, gpointer user_data) G_GNUC_UNUSED;
@@ -61,6 +64,7 @@ static void mn_properties_dialog_update_sensitivity (MNPropertiesDialog * self)
static MNDialogClass *parent_class = NULL;
/* Short form macros */
+#define self_play_sound_file_chooser_create_dialog_cb mn_properties_dialog_play_sound_file_chooser_create_dialog_cb
#define self_test_messages_toggled_h mn_properties_dialog_test_messages_toggled_h
#define self_remove_test_mailbox mn_properties_dialog_remove_test_mailbox
#define self_response_h mn_properties_dialog_response_h
@@ -124,9 +128,9 @@ ___finalize(GObject *obj_self)
#define test_mailbox (self->_priv->test_mailbox)
#define VAR test_mailbox
{
-#line 84 "mn-properties-dialog.gob"
+#line 79 "mn-properties-dialog.gob"
self_remove_test_mailbox(self); }
-#line 130 "mn-properties-dialog.c"
+#line 134 "mn-properties-dialog.c"
memset(&test_mailbox, 0, sizeof(test_mailbox));
#undef VAR
#undef test_mailbox
@@ -146,43 +150,34 @@ mn_properties_dialog_class_init (MNPropertiesDialogClass * c G_GNUC_UNUSED)
g_object_class->finalize = ___finalize;
}
#undef __GOB_FUNCTION__
-#line 86 "mn-properties-dialog.gob"
+#line 81 "mn-properties-dialog.gob"
static void
mn_properties_dialog_init (MNPropertiesDialog * self G_GNUC_UNUSED)
-#line 153 "mn-properties-dialog.c"
+#line 157 "mn-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Properties:Dialog::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_PROPERTIES_DIALOG,MNPropertiesDialogPrivate);
{
-#line 87 "mn-properties-dialog.gob"
+#line 82 "mn-properties-dialog.gob"
- GtkSizeGroup *size_group;
GtkTreeSelection *selection;
GtkWidget *test_messages_check;
mn_container_create_interface(GTK_CONTAINER(self),
- UIDIR G_DIR_SEPARATOR_S "properties-dialog.glade",
+ PKGDATADIR G_DIR_SEPARATOR_S "properties-dialog.glade",
"notebook",
"mn_properties_dialog_",
"notebook", &selfp->notebook,
- "display_seen_mail_check", &selfp->display_seen_mail_check,
+ "play_sound_hbox", &selfp->play_sound_hbox,
+ "play_sound_check", &selfp->play_sound_check,
"scrolled", &selfp->scrolled,
"selected_label", &selfp->selected_label,
"add", &selfp->add,
"remove", &selfp->remove,
"properties", &selfp->properties,
- "command_new_mail_check", &selfp->command_new_mail_check,
- "command_new_mail_entry", &selfp->command_new_mail_entry,
- "command_mail_read_check", &selfp->command_mail_read_check,
- "command_mail_read_entry", &selfp->command_mail_read_entry,
- "icon_blink_check", &selfp->icon_blink_check,
- "icon_always_display_check", &selfp->icon_always_display_check,
- "icon_tooltip_mail_summary_standard_radio", &selfp->icon_tooltip_mail_summary_standard_radio,
- "icon_tooltip_mail_summary_compact_radio", &selfp->icon_tooltip_mail_summary_compact_radio,
- "icon_tooltip_mail_summary_none_radio", &selfp->icon_tooltip_mail_summary_none_radio,
- "icon_action_properties_dialog_radio", &selfp->icon_action_properties_dialog_radio,
"icon_action_mail_reader_radio", &selfp->icon_action_mail_reader_radio,
"icon_action_open_latest_message_radio", &selfp->icon_action_open_latest_message_radio,
+ "icon_action_consider_new_mail_as_read_radio", &selfp->icon_action_consider_new_mail_as_read_radio,
"icon_action_update_radio", &selfp->icon_action_update_radio,
"popups_enable_check", &selfp->popups_enable_check,
"popups_position_section_label", &selfp->popups_position_section_label,
@@ -211,6 +206,10 @@ mn_properties_dialog_init (MNPropertiesDialog * self G_GNUC_UNUSED)
gtk_dialog_add_button(GTK_DIALOG(self), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
+ selfp->play_sound_file_chooser_button = mn_file_chooser_button_new(self_play_sound_file_chooser_create_dialog_cb, NULL);
+ gtk_box_pack_start(GTK_BOX(selfp->play_sound_hbox), selfp->play_sound_file_chooser_button, TRUE, TRUE, 0);
+ gtk_widget_show(selfp->play_sound_file_chooser_button);
+
selfp->list = mn_mailbox_view_new();
gtk_container_add(GTK_CONTAINER(selfp->scrolled), selfp->list);
gtk_widget_show(selfp->list);
@@ -223,34 +222,18 @@ mn_properties_dialog_init (MNPropertiesDialog * self G_GNUC_UNUSED)
mn_setup_dnd(selfp->scrolled);
- size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget(size_group, selfp->command_new_mail_check);
- gtk_size_group_add_widget(size_group, selfp->command_mail_read_check);
- g_object_unref(size_group);
-
mn_conf_link(self, MN_CONF_PROPERTIES_DIALOG,
- selfp->display_seen_mail_check, MN_CONF_DISPLAY_SEEN_MAIL, "active",
- selfp->command_new_mail_check, MN_CONF_COMMANDS_NEW_MAIL_ENABLED, "active",
- selfp->command_new_mail_entry, MN_CONF_COMMANDS_NEW_MAIL_COMMAND, "text",
- selfp->command_mail_read_check, MN_CONF_COMMANDS_MAIL_READ_ENABLED, "active",
- selfp->command_mail_read_entry, MN_CONF_COMMANDS_MAIL_READ_COMMAND, "text",
- selfp->icon_blink_check, MN_CONF_BLINK_ON_ERRORS, "active",
- selfp->icon_always_display_check, MN_CONF_ALWAYS_DISPLAY_ICON, "active",
+ selfp->play_sound_check, MN_CONF_SOUNDS_NEW_MAIL_ENABLED, "active",
+ selfp->play_sound_file_chooser_button, MN_CONF_SOUNDS_NEW_MAIL_FILE, "filename",
selfp->popups_enable_check, MN_CONF_POPUPS_ENABLED, "active",
selfp->popups_expiration_minutes_spin, MN_CONF_POPUPS_EXPIRATION_DELAY_MINUTES,
selfp->popups_expiration_seconds_spin, MN_CONF_POPUPS_EXPIRATION_DELAY_SECONDS,
NULL);
- mn_conf_link_radio_group_to_enum(MN_TYPE_SHELL_TOOLTIP_MAIL_SUMMARY,
- MN_CONF_TOOLTIP_MAIL_SUMMARY,
- selfp->icon_tooltip_mail_summary_standard_radio, MN_SHELL_TOOLTIP_MAIL_SUMMARY_STANDARD,
- selfp->icon_tooltip_mail_summary_compact_radio, MN_SHELL_TOOLTIP_MAIL_SUMMARY_COMPACT,
- selfp->icon_tooltip_mail_summary_none_radio, MN_SHELL_TOOLTIP_MAIL_SUMMARY_NONE,
- NULL);
mn_conf_link_radio_group_to_enum(MN_TYPE_ACTION,
MN_CONF_CLICK_ACTION,
- selfp->icon_action_properties_dialog_radio, MN_ACTION_DISPLAY_PROPERTIES_DIALOG,
selfp->icon_action_mail_reader_radio, MN_ACTION_LAUNCH_MAIL_READER,
selfp->icon_action_open_latest_message_radio, MN_ACTION_OPEN_LATEST_MESSAGE,
+ selfp->icon_action_consider_new_mail_as_read_radio, MN_ACTION_CONSIDER_NEW_MAIL_AS_READ,
selfp->icon_action_update_radio, MN_ACTION_UPDATE_MAIL_STATUS,
NULL);
mn_conf_link_radio_group_to_enum(MN_TYPE_POPUP_POSITION,
@@ -279,26 +262,40 @@ mn_properties_dialog_init (MNPropertiesDialog * self G_GNUC_UNUSED)
g_signal_connect(self, "response", G_CALLBACK(self_response_h), NULL);
-#line 283 "mn-properties-dialog.c"
+#line 266 "mn-properties-dialog.c"
}
}
#undef __GOB_FUNCTION__
-#line 212 "mn-properties-dialog.gob"
+#line 186 "mn-properties-dialog.gob"
+static GtkFileChooserDialog *
+mn_properties_dialog_play_sound_file_chooser_create_dialog_cb (gpointer data)
+#line 276 "mn-properties-dialog.c"
+{
+#define __GOB_FUNCTION__ "MN:Properties:Dialog::play_sound_file_chooser_create_dialog_cb"
+{
+#line 188 "mn-properties-dialog.gob"
+
+ return GTK_FILE_CHOOSER_DIALOG(mn_sound_file_chooser_dialog_new());
+ }}
+#line 284 "mn-properties-dialog.c"
+#undef __GOB_FUNCTION__
+
+#line 192 "mn-properties-dialog.gob"
static void
mn_properties_dialog_test_messages_toggled_h (MNPropertiesDialog * self, GtkToggleButton * button)
-#line 293 "mn-properties-dialog.c"
+#line 290 "mn-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Properties:Dialog::test_messages_toggled_h"
-#line 212 "mn-properties-dialog.gob"
+#line 192 "mn-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 212 "mn-properties-dialog.gob"
+#line 192 "mn-properties-dialog.gob"
g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 300 "mn-properties-dialog.c"
+#line 297 "mn-properties-dialog.c"
{
-#line 214 "mn-properties-dialog.gob"
+#line 194 "mn-properties-dialog.gob"
if (gtk_toggle_button_get_active(button))
{
@@ -312,22 +309,22 @@ mn_properties_dialog_test_messages_toggled_h (MNPropertiesDialog * self, GtkTogg
else
self_remove_test_mailbox(self);
}}
-#line 316 "mn-properties-dialog.c"
+#line 313 "mn-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 228 "mn-properties-dialog.gob"
+#line 208 "mn-properties-dialog.gob"
static void
mn_properties_dialog_remove_test_mailbox (MNPropertiesDialog * self)
-#line 322 "mn-properties-dialog.c"
+#line 319 "mn-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Properties:Dialog::remove_test_mailbox"
-#line 228 "mn-properties-dialog.gob"
+#line 208 "mn-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 228 "mn-properties-dialog.gob"
+#line 208 "mn-properties-dialog.gob"
g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 329 "mn-properties-dialog.c"
+#line 326 "mn-properties-dialog.c"
{
-#line 230 "mn-properties-dialog.gob"
+#line 210 "mn-properties-dialog.gob"
if (selfp->test_mailbox)
{
@@ -336,22 +333,22 @@ mn_properties_dialog_remove_test_mailbox (MNPropertiesDialog * self)
selfp->test_mailbox = NULL;
}
}}
-#line 340 "mn-properties-dialog.c"
+#line 337 "mn-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 239 "mn-properties-dialog.gob"
+#line 219 "mn-properties-dialog.gob"
static void
mn_properties_dialog_response_h (MNPropertiesDialog * self, int response, gpointer user_data)
-#line 346 "mn-properties-dialog.c"
+#line 343 "mn-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Properties:Dialog::response_h"
-#line 239 "mn-properties-dialog.gob"
+#line 219 "mn-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 239 "mn-properties-dialog.gob"
+#line 219 "mn-properties-dialog.gob"
g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 353 "mn-properties-dialog.c"
+#line 350 "mn-properties-dialog.c"
{
-#line 241 "mn-properties-dialog.gob"
+#line 221 "mn-properties-dialog.gob"
switch (response)
{
@@ -376,22 +373,22 @@ mn_properties_dialog_response_h (MNPropertiesDialog * self, int response, gpoint
break;
}
}}
-#line 380 "mn-properties-dialog.c"
+#line 377 "mn-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 266 "mn-properties-dialog.gob"
+#line 246 "mn-properties-dialog.gob"
static void
mn_properties_dialog_update_selected_label (MNPropertiesDialog * self)
-#line 386 "mn-properties-dialog.c"
+#line 383 "mn-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Properties:Dialog::update_selected_label"
-#line 266 "mn-properties-dialog.gob"
+#line 246 "mn-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 266 "mn-properties-dialog.gob"
+#line 246 "mn-properties-dialog.gob"
g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 393 "mn-properties-dialog.c"
+#line 390 "mn-properties-dialog.c"
{
-#line 268 "mn-properties-dialog.gob"
+#line 248 "mn-properties-dialog.gob"
GtkTreeSelection *selection;
int n_rows;
@@ -412,35 +409,32 @@ mn_properties_dialog_update_selected_label (MNPropertiesDialog * self)
g_free(str);
}
}}
-#line 416 "mn-properties-dialog.c"
+#line 413 "mn-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 289 "mn-properties-dialog.gob"
+#line 269 "mn-properties-dialog.gob"
static void
mn_properties_dialog_update_sensitivity (MNPropertiesDialog * self)
-#line 422 "mn-properties-dialog.c"
+#line 419 "mn-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Properties:Dialog::update_sensitivity"
-#line 289 "mn-properties-dialog.gob"
+#line 269 "mn-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 289 "mn-properties-dialog.gob"
+#line 269 "mn-properties-dialog.gob"
g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 429 "mn-properties-dialog.c"
+#line 426 "mn-properties-dialog.c"
{
-#line 291 "mn-properties-dialog.gob"
+#line 271 "mn-properties-dialog.gob"
- gboolean command_new_mail_enabled;
- gboolean command_mail_read_enabled;
+ gboolean play_sound_enabled;
GtkTreeSelection *selection;
gboolean has_selection;
gboolean popups_enabled;
gboolean popups_expiration_after_enabled;
- command_new_mail_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->command_new_mail_check));
- command_mail_read_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->command_mail_read_check));
+ play_sound_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->play_sound_check));
- gtk_widget_set_sensitive(selfp->command_new_mail_entry, command_new_mail_enabled);
- gtk_widget_set_sensitive(selfp->command_mail_read_entry, command_mail_read_enabled);
+ gtk_widget_set_sensitive(selfp->play_sound_file_chooser_button, play_sound_enabled);
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(selfp->list));
has_selection = gtk_tree_selection_count_selected_rows(selection) > 0;
@@ -463,81 +457,81 @@ mn_properties_dialog_update_sensitivity (MNPropertiesDialog * self)
gtk_widget_set_sensitive(selfp->popups_expiration_seconds_spin, popups_enabled && popups_expiration_after_enabled);
gtk_widget_set_sensitive(selfp->popups_expiration_seconds_label, popups_enabled && popups_expiration_after_enabled);
}}
-#line 467 "mn-properties-dialog.c"
+#line 461 "mn-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 329 "mn-properties-dialog.gob"
+#line 306 "mn-properties-dialog.gob"
void
mn_properties_dialog_toggled_h (MNPropertiesDialog * self, GtkToggleButton * button)
-#line 473 "mn-properties-dialog.c"
+#line 467 "mn-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Properties:Dialog::toggled_h"
-#line 329 "mn-properties-dialog.gob"
+#line 306 "mn-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 329 "mn-properties-dialog.gob"
+#line 306 "mn-properties-dialog.gob"
g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 480 "mn-properties-dialog.c"
+#line 474 "mn-properties-dialog.c"
{
-#line 331 "mn-properties-dialog.gob"
+#line 308 "mn-properties-dialog.gob"
self_update_sensitivity(self);
}}
-#line 486 "mn-properties-dialog.c"
+#line 480 "mn-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 335 "mn-properties-dialog.gob"
+#line 312 "mn-properties-dialog.gob"
void
mn_properties_dialog_add_clicked_h (MNPropertiesDialog * self, GtkButton * button)
-#line 492 "mn-properties-dialog.c"
+#line 486 "mn-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Properties:Dialog::add_clicked_h"
-#line 335 "mn-properties-dialog.gob"
+#line 312 "mn-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 335 "mn-properties-dialog.gob"
+#line 312 "mn-properties-dialog.gob"
g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 499 "mn-properties-dialog.c"
+#line 493 "mn-properties-dialog.c"
{
-#line 337 "mn-properties-dialog.gob"
+#line 314 "mn-properties-dialog.gob"
mn_mailbox_view_activate_add(MN_MAILBOX_VIEW(selfp->list));
}}
-#line 505 "mn-properties-dialog.c"
+#line 499 "mn-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 341 "mn-properties-dialog.gob"
+#line 318 "mn-properties-dialog.gob"
void
mn_properties_dialog_remove_clicked_h (MNPropertiesDialog * self, GtkButton * button)
-#line 511 "mn-properties-dialog.c"
+#line 505 "mn-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Properties:Dialog::remove_clicked_h"
-#line 341 "mn-properties-dialog.gob"
+#line 318 "mn-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 341 "mn-properties-dialog.gob"
+#line 318 "mn-properties-dialog.gob"
g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 518 "mn-properties-dialog.c"
+#line 512 "mn-properties-dialog.c"
{
-#line 343 "mn-properties-dialog.gob"
+#line 320 "mn-properties-dialog.gob"
mn_mailbox_view_activate_remove(MN_MAILBOX_VIEW(selfp->list));
}}
-#line 524 "mn-properties-dialog.c"
+#line 518 "mn-properties-dialog.c"
#undef __GOB_FUNCTION__
-#line 347 "mn-properties-dialog.gob"
+#line 324 "mn-properties-dialog.gob"
void
mn_properties_dialog_properties_clicked_h (MNPropertiesDialog * self, GtkButton * button)
-#line 530 "mn-properties-dialog.c"
+#line 524 "mn-properties-dialog.c"
{
#define __GOB_FUNCTION__ "MN:Properties:Dialog::properties_clicked_h"
-#line 347 "mn-properties-dialog.gob"
+#line 324 "mn-properties-dialog.gob"
g_return_if_fail (self != NULL);
-#line 347 "mn-properties-dialog.gob"
+#line 324 "mn-properties-dialog.gob"
g_return_if_fail (MN_IS_PROPERTIES_DIALOG (self));
-#line 537 "mn-properties-dialog.c"
+#line 531 "mn-properties-dialog.c"
{
-#line 349 "mn-properties-dialog.gob"
+#line 326 "mn-properties-dialog.gob"
mn_mailbox_view_activate_properties(MN_MAILBOX_VIEW(selfp->list));
}}
-#line 543 "mn-properties-dialog.c"
+#line 537 "mn-properties-dialog.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-properties-dialog.gob b/src/mn-properties-dialog.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -36,6 +36,8 @@ requires 2.0.14
#include "mn-util.h"
#include "mn-mailbox-view.h"
#include "mn-shell.h"
+#include "mn-file-chooser-button.h"
+#include "mn-sound-file-chooser-dialog.h"
#include "mn-test-mailbox.h"
%}
@@ -44,27 +46,20 @@ class MN:Properties:Dialog from MN:Dialog
private GtkWidget *notebook;
/* general tab */
- private GtkWidget *display_seen_mail_check;
+ private GtkWidget *play_sound_hbox;
+ private GtkWidget *play_sound_check;
+ private GtkWidget *play_sound_file_chooser_button;
private GtkWidget *scrolled;
private GtkWidget *list;
private GtkWidget *selected_label;
private GtkWidget *add;
private GtkWidget *remove;
private GtkWidget *properties;
- private GtkWidget *command_new_mail_check;
- private GtkWidget *command_new_mail_entry;
- private GtkWidget *command_mail_read_check;
- private GtkWidget *command_mail_read_entry;
/* status icon tab */
- private GtkWidget *icon_blink_check;
- private GtkWidget *icon_always_display_check;
- private GtkWidget *icon_tooltip_mail_summary_standard_radio;
- private GtkWidget *icon_tooltip_mail_summary_compact_radio;
- private GtkWidget *icon_tooltip_mail_summary_none_radio;
- private GtkWidget *icon_action_properties_dialog_radio;
private GtkWidget *icon_action_mail_reader_radio;
private GtkWidget *icon_action_open_latest_message_radio;
+ private GtkWidget *icon_action_consider_new_mail_as_read_radio;
private GtkWidget *icon_action_update_radio;
/* message popups tab */
@@ -85,33 +80,24 @@ class MN:Properties:Dialog from MN:Dialog
init (self)
{
- GtkSizeGroup *size_group;
GtkTreeSelection *selection;
GtkWidget *test_messages_check;
mn_container_create_interface(GTK_CONTAINER(self),
- UIDIR G_DIR_SEPARATOR_S "properties-dialog.glade",
+ PKGDATADIR G_DIR_SEPARATOR_S "properties-dialog.glade",
"notebook",
"mn_properties_dialog_",
"notebook", &selfp->notebook,
- "display_seen_mail_check", &selfp->display_seen_mail_check,
+ "play_sound_hbox", &selfp->play_sound_hbox,
+ "play_sound_check", &selfp->play_sound_check,
"scrolled", &selfp->scrolled,
"selected_label", &selfp->selected_label,
"add", &selfp->add,
"remove", &selfp->remove,
"properties", &selfp->properties,
- "command_new_mail_check", &selfp->command_new_mail_check,
- "command_new_mail_entry", &selfp->command_new_mail_entry,
- "command_mail_read_check", &selfp->command_mail_read_check,
- "command_mail_read_entry", &selfp->command_mail_read_entry,
- "icon_blink_check", &selfp->icon_blink_check,
- "icon_always_display_check", &selfp->icon_always_display_check,
- "icon_tooltip_mail_summary_standard_radio", &selfp->icon_tooltip_mail_summary_standard_radio,
- "icon_tooltip_mail_summary_compact_radio", &selfp->icon_tooltip_mail_summary_compact_radio,
- "icon_tooltip_mail_summary_none_radio", &selfp->icon_tooltip_mail_summary_none_radio,
- "icon_action_properties_dialog_radio", &selfp->icon_action_properties_dialog_radio,
"icon_action_mail_reader_radio", &selfp->icon_action_mail_reader_radio,
"icon_action_open_latest_message_radio", &selfp->icon_action_open_latest_message_radio,
+ "icon_action_consider_new_mail_as_read_radio", &selfp->icon_action_consider_new_mail_as_read_radio,
"icon_action_update_radio", &selfp->icon_action_update_radio,
"popups_enable_check", &selfp->popups_enable_check,
"popups_position_section_label", &selfp->popups_position_section_label,
@@ -140,6 +126,10 @@ class MN:Properties:Dialog from MN:Dialog
gtk_dialog_add_button(GTK_DIALOG(self), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
+ selfp->play_sound_file_chooser_button = mn_file_chooser_button_new(self_play_sound_file_chooser_create_dialog_cb, NULL);
+ gtk_box_pack_start(GTK_BOX(selfp->play_sound_hbox), selfp->play_sound_file_chooser_button, TRUE, TRUE, 0);
+ gtk_widget_show(selfp->play_sound_file_chooser_button);
+
selfp->list = mn_mailbox_view_new();
gtk_container_add(GTK_CONTAINER(selfp->scrolled), selfp->list);
gtk_widget_show(selfp->list);
@@ -152,34 +142,18 @@ class MN:Properties:Dialog from MN:Dialog
mn_setup_dnd(selfp->scrolled);
- size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget(size_group, selfp->command_new_mail_check);
- gtk_size_group_add_widget(size_group, selfp->command_mail_read_check);
- g_object_unref(size_group);
-
mn_conf_link(self, MN_CONF_PROPERTIES_DIALOG,
- selfp->display_seen_mail_check, MN_CONF_DISPLAY_SEEN_MAIL, "active",
- selfp->command_new_mail_check, MN_CONF_COMMANDS_NEW_MAIL_ENABLED, "active",
- selfp->command_new_mail_entry, MN_CONF_COMMANDS_NEW_MAIL_COMMAND, "text",
- selfp->command_mail_read_check, MN_CONF_COMMANDS_MAIL_READ_ENABLED, "active",
- selfp->command_mail_read_entry, MN_CONF_COMMANDS_MAIL_READ_COMMAND, "text",
- selfp->icon_blink_check, MN_CONF_BLINK_ON_ERRORS, "active",
- selfp->icon_always_display_check, MN_CONF_ALWAYS_DISPLAY_ICON, "active",
+ selfp->play_sound_check, MN_CONF_SOUNDS_NEW_MAIL_ENABLED, "active",
+ selfp->play_sound_file_chooser_button, MN_CONF_SOUNDS_NEW_MAIL_FILE, "filename",
selfp->popups_enable_check, MN_CONF_POPUPS_ENABLED, "active",
selfp->popups_expiration_minutes_spin, MN_CONF_POPUPS_EXPIRATION_DELAY_MINUTES,
selfp->popups_expiration_seconds_spin, MN_CONF_POPUPS_EXPIRATION_DELAY_SECONDS,
NULL);
- mn_conf_link_radio_group_to_enum(MN_TYPE_SHELL_TOOLTIP_MAIL_SUMMARY,
- MN_CONF_TOOLTIP_MAIL_SUMMARY,
- selfp->icon_tooltip_mail_summary_standard_radio, MN_SHELL_TOOLTIP_MAIL_SUMMARY_STANDARD,
- selfp->icon_tooltip_mail_summary_compact_radio, MN_SHELL_TOOLTIP_MAIL_SUMMARY_COMPACT,
- selfp->icon_tooltip_mail_summary_none_radio, MN_SHELL_TOOLTIP_MAIL_SUMMARY_NONE,
- NULL);
mn_conf_link_radio_group_to_enum(MN_TYPE_ACTION,
MN_CONF_CLICK_ACTION,
- selfp->icon_action_properties_dialog_radio, MN_ACTION_DISPLAY_PROPERTIES_DIALOG,
selfp->icon_action_mail_reader_radio, MN_ACTION_LAUNCH_MAIL_READER,
selfp->icon_action_open_latest_message_radio, MN_ACTION_OPEN_LATEST_MESSAGE,
+ selfp->icon_action_consider_new_mail_as_read_radio, MN_ACTION_CONSIDER_NEW_MAIL_AS_READ,
selfp->icon_action_update_radio, MN_ACTION_UPDATE_MAIL_STATUS,
NULL);
mn_conf_link_radio_group_to_enum(MN_TYPE_POPUP_POSITION,
@@ -209,6 +183,12 @@ class MN:Properties:Dialog from MN:Dialog
g_signal_connect(self, "response", G_CALLBACK(self_response_h), NULL);
}
+ private GtkFileChooserDialog *
+ play_sound_file_chooser_create_dialog_cb (gpointer data)
+ {
+ return GTK_FILE_CHOOSER_DIALOG(mn_sound_file_chooser_dialog_new());
+ }
+
private void
test_messages_toggled_h (self, GtkToggleButton *button)
{
@@ -289,18 +269,15 @@ class MN:Properties:Dialog from MN:Dialog
private void
update_sensitivity (self)
{
- gboolean command_new_mail_enabled;
- gboolean command_mail_read_enabled;
+ gboolean play_sound_enabled;
GtkTreeSelection *selection;
gboolean has_selection;
gboolean popups_enabled;
gboolean popups_expiration_after_enabled;
- command_new_mail_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->command_new_mail_check));
- command_mail_read_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->command_mail_read_check));
+ play_sound_enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->play_sound_check));
- gtk_widget_set_sensitive(selfp->command_new_mail_entry, command_new_mail_enabled);
- gtk_widget_set_sensitive(selfp->command_mail_read_entry, command_mail_read_enabled);
+ gtk_widget_set_sensitive(selfp->play_sound_file_chooser_button, play_sound_enabled);
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(selfp->list));
has_selection = gtk_tree_selection_count_selected_rows(selection) > 0;
diff --git a/src/mn-reentrant-mailbox-private.h b/src/mn-reentrant-mailbox-private.h
@@ -17,20 +17,15 @@ extern "C" {
#line 18 "mn-reentrant-mailbox-private.h"
struct _MNReentrantMailboxPrivate {
#line 45 "mn-reentrant-mailbox.gob"
- GMutex * mutex;
-#line 47 "mn-reentrant-mailbox.gob"
MNLockedGSource * queue_check_source;
-#line 49 "mn-reentrant-mailbox.gob"
- unsigned long check_id;
-#line 50 "mn-reentrant-mailbox.gob"
- unsigned long check_unique_id;
-#line 28 "mn-reentrant-mailbox-private.h"
+#line 47 "mn-reentrant-mailbox.gob"
+ int check_id;
+#line 48 "mn-reentrant-mailbox.gob"
+ int check_unique_id;
+#line 26 "mn-reentrant-mailbox-private.h"
};
void mn_reentrant_mailbox_queue_check (MNReentrantMailbox * self);
-gboolean mn_reentrant_mailbox_check_aborted (MNReentrantMailbox * self, unsigned long check_id);
-gboolean mn_reentrant_mailbox_check_aborted_unlocked (MNReentrantMailbox * self, unsigned long check_id);
-void mn_reentrant_mailbox_lock (MNReentrantMailbox * self);
-void mn_reentrant_mailbox_unlock (MNReentrantMailbox * self);
+gboolean mn_reentrant_mailbox_check_aborted (MNReentrantMailbox * self, int check_id);
#ifdef __cplusplus
}
diff --git a/src/mn-reentrant-mailbox.c b/src/mn-reentrant-mailbox.c
@@ -32,7 +32,7 @@
typedef struct
{
MNReentrantMailbox *self;
- unsigned long check_id;
+ int check_id;
} CheckInfo;
#line 39 "mn-reentrant-mailbox.c"
@@ -57,7 +57,7 @@ static void ___2_mn_reentrant_mailbox_finalize (GObject * object) G_GNUC_UNUSED;
static gboolean mn_reentrant_mailbox_queue_check_cb (gpointer data) G_GNUC_UNUSED;
static void ___5_mn_reentrant_mailbox_check (MNMailbox * mailbox) G_GNUC_UNUSED;
static void mn_reentrant_mailbox_check_thread_cb (CheckInfo * info) G_GNUC_UNUSED;
-static void mn_reentrant_mailbox_reentrant_check (MNReentrantMailbox * self, unsigned long check_id) G_GNUC_UNUSED;
+static void mn_reentrant_mailbox_reentrant_check (MNReentrantMailbox * self, int check_id) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static MNMailboxClass *parent_class = NULL;
@@ -68,9 +68,6 @@ static MNMailboxClass *parent_class = NULL;
#define self_check_thread_cb mn_reentrant_mailbox_check_thread_cb
#define self_reentrant_check mn_reentrant_mailbox_reentrant_check
#define self_check_aborted mn_reentrant_mailbox_check_aborted
-#define self_check_aborted_unlocked mn_reentrant_mailbox_check_aborted_unlocked
-#define self_lock mn_reentrant_mailbox_lock
-#define self_unlock mn_reentrant_mailbox_unlock
GType
mn_reentrant_mailbox_get_type (void)
{
@@ -120,12 +117,9 @@ ___finalize(GObject *obj_self)
#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::finalize"
MNReentrantMailbox *self G_GNUC_UNUSED = MN_REENTRANT_MAILBOX (obj_self);
gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 64 "mn-reentrant-mailbox.gob"
+#line 61 "mn-reentrant-mailbox.gob"
___2_mn_reentrant_mailbox_finalize(obj_self);
-#line 126 "mn-reentrant-mailbox.c"
-#line 45 "mn-reentrant-mailbox.gob"
- if(self->_priv->mutex) { g_mutex_free ((gpointer) self->_priv->mutex); self->_priv->mutex = NULL; }
-#line 129 "mn-reentrant-mailbox.c"
+#line 123 "mn-reentrant-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -134,9 +128,6 @@ mn_reentrant_mailbox_init (MNReentrantMailbox * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::init"
o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_REENTRANT_MAILBOX,MNReentrantMailboxPrivate);
-#line 45 "mn-reentrant-mailbox.gob"
- o->_priv->mutex = g_mutex_new();
-#line 140 "mn-reentrant-mailbox.c"
}
#undef __GOB_FUNCTION__
static void
@@ -150,54 +141,53 @@ mn_reentrant_mailbox_class_init (MNReentrantMailboxClass * c G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_MAILBOX);
-#line 52 "mn-reentrant-mailbox.gob"
+#line 50 "mn-reentrant-mailbox.gob"
mn_mailbox_class->removed = ___1_mn_reentrant_mailbox_removed;
-#line 64 "mn-reentrant-mailbox.gob"
+#line 61 "mn-reentrant-mailbox.gob"
g_object_class->finalize = ___finalize;
-#line 104 "mn-reentrant-mailbox.gob"
+#line 101 "mn-reentrant-mailbox.gob"
mn_mailbox_class->check = ___5_mn_reentrant_mailbox_check;
-#line 160 "mn-reentrant-mailbox.c"
+#line 151 "mn-reentrant-mailbox.c"
c->reentrant_check = NULL;
}
#undef __GOB_FUNCTION__
-#line 52 "mn-reentrant-mailbox.gob"
+#line 50 "mn-reentrant-mailbox.gob"
static void
___1_mn_reentrant_mailbox_removed (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 170 "mn-reentrant-mailbox.c"
+#line 161 "mn-reentrant-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->removed) \
(* MN_MAILBOX_CLASS(parent_class)->removed)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::removed"
{
-#line 54 "mn-reentrant-mailbox.gob"
+#line 52 "mn-reentrant-mailbox.gob"
Self *self = SELF(mailbox);
- self_lock(self);
- selfp->check_id = 0;
- self_unlock(self);
-
PARENT_HANDLER(mailbox);
+
+ /* abort the current check */
+ g_atomic_int_set(&selfp->check_id, 0);
}}
-#line 187 "mn-reentrant-mailbox.c"
+#line 177 "mn-reentrant-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 64 "mn-reentrant-mailbox.gob"
+#line 61 "mn-reentrant-mailbox.gob"
static void
___2_mn_reentrant_mailbox_finalize (GObject * object G_GNUC_UNUSED)
-#line 194 "mn-reentrant-mailbox.c"
+#line 184 "mn-reentrant-mailbox.c"
#define PARENT_HANDLER(___object) \
{ if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
{
#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::finalize"
{
-#line 66 "mn-reentrant-mailbox.gob"
+#line 63 "mn-reentrant-mailbox.gob"
Self *self = SELF(object);
@@ -206,40 +196,40 @@ ___2_mn_reentrant_mailbox_finalize (GObject * object G_GNUC_UNUSED)
PARENT_HANDLER(object);
}}
-#line 210 "mn-reentrant-mailbox.c"
+#line 200 "mn-reentrant-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 84 "mn-reentrant-mailbox.gob"
+#line 81 "mn-reentrant-mailbox.gob"
void
mn_reentrant_mailbox_queue_check (MNReentrantMailbox * self)
-#line 217 "mn-reentrant-mailbox.c"
+#line 207 "mn-reentrant-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::queue_check"
-#line 84 "mn-reentrant-mailbox.gob"
+#line 81 "mn-reentrant-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 84 "mn-reentrant-mailbox.gob"
+#line 81 "mn-reentrant-mailbox.gob"
g_return_if_fail (MN_IS_REENTRANT_MAILBOX (self));
-#line 224 "mn-reentrant-mailbox.c"
+#line 214 "mn-reentrant-mailbox.c"
{
-#line 86 "mn-reentrant-mailbox.gob"
+#line 83 "mn-reentrant-mailbox.gob"
if (selfp->queue_check_source)
mn_locked_g_source_remove(selfp->queue_check_source);
selfp->queue_check_source = mn_g_idle_add_gdk_locked(self_queue_check_cb, self);
}}
-#line 233 "mn-reentrant-mailbox.c"
+#line 223 "mn-reentrant-mailbox.c"
#undef __GOB_FUNCTION__
-#line 93 "mn-reentrant-mailbox.gob"
+#line 90 "mn-reentrant-mailbox.gob"
static gboolean
mn_reentrant_mailbox_queue_check_cb (gpointer data)
-#line 239 "mn-reentrant-mailbox.c"
+#line 229 "mn-reentrant-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::queue_check_cb"
{
-#line 95 "mn-reentrant-mailbox.gob"
+#line 92 "mn-reentrant-mailbox.gob"
Self *self = data;
@@ -248,20 +238,20 @@ mn_reentrant_mailbox_queue_check_cb (gpointer data)
selfp->queue_check_source = NULL;
return FALSE; /* remove source */
}}
-#line 252 "mn-reentrant-mailbox.c"
+#line 242 "mn-reentrant-mailbox.c"
#undef __GOB_FUNCTION__
-#line 104 "mn-reentrant-mailbox.gob"
+#line 101 "mn-reentrant-mailbox.gob"
static void
___5_mn_reentrant_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 258 "mn-reentrant-mailbox.c"
+#line 248 "mn-reentrant-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->check) \
(* MN_MAILBOX_CLASS(parent_class)->check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::check"
{
-#line 106 "mn-reentrant-mailbox.gob"
+#line 103 "mn-reentrant-mailbox.gob"
Self *self = SELF(mailbox);
CheckInfo *info;
@@ -277,33 +267,28 @@ ___5_mn_reentrant_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
info->self = g_object_ref(self);
info->check_id = selfp->check_unique_id;
- self_lock(self);
- selfp->check_id = info->check_id;
- self_unlock(self);
+ g_atomic_int_set(&selfp->check_id, info->check_id);
mn_thread_create((GThreadFunc) self_check_thread_cb, info);
}}
-#line 287 "mn-reentrant-mailbox.c"
+#line 275 "mn-reentrant-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 128 "mn-reentrant-mailbox.gob"
+#line 123 "mn-reentrant-mailbox.gob"
static void
mn_reentrant_mailbox_check_thread_cb (CheckInfo * info)
-#line 294 "mn-reentrant-mailbox.c"
+#line 282 "mn-reentrant-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::check_thread_cb"
{
-#line 130 "mn-reentrant-mailbox.gob"
+#line 125 "mn-reentrant-mailbox.gob"
Self *self = info->self;
self_reentrant_check(self, info->check_id);
- self_lock(self);
- if (selfp->check_id == info->check_id)
- selfp->check_id = 0;
- self_unlock(self);
+ g_atomic_int_compare_and_exchange(&selfp->check_id, info->check_id, 0);
GDK_THREADS_ENTER();
@@ -314,104 +299,41 @@ mn_reentrant_mailbox_check_thread_cb (CheckInfo * info)
g_free(info);
}}
-#line 318 "mn-reentrant-mailbox.c"
+#line 303 "mn-reentrant-mailbox.c"
#undef __GOB_FUNCTION__
-#line 150 "mn-reentrant-mailbox.gob"
+#line 142 "mn-reentrant-mailbox.gob"
static void
-mn_reentrant_mailbox_reentrant_check (MNReentrantMailbox * self, unsigned long check_id)
-#line 324 "mn-reentrant-mailbox.c"
+mn_reentrant_mailbox_reentrant_check (MNReentrantMailbox * self, int check_id)
+#line 309 "mn-reentrant-mailbox.c"
{
MNReentrantMailboxClass *klass;
-#line 150 "mn-reentrant-mailbox.gob"
+#line 142 "mn-reentrant-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 150 "mn-reentrant-mailbox.gob"
+#line 142 "mn-reentrant-mailbox.gob"
g_return_if_fail (MN_IS_REENTRANT_MAILBOX (self));
-#line 331 "mn-reentrant-mailbox.c"
+#line 316 "mn-reentrant-mailbox.c"
klass = MN_REENTRANT_MAILBOX_GET_CLASS(self);
if(klass->reentrant_check)
(*klass->reentrant_check)(self,check_id);
}
-#line 153 "mn-reentrant-mailbox.gob"
+#line 145 "mn-reentrant-mailbox.gob"
gboolean
-mn_reentrant_mailbox_check_aborted (MNReentrantMailbox * self, unsigned long check_id)
-#line 341 "mn-reentrant-mailbox.c"
+mn_reentrant_mailbox_check_aborted (MNReentrantMailbox * self, int check_id)
+#line 326 "mn-reentrant-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::check_aborted"
-#line 153 "mn-reentrant-mailbox.gob"
+#line 145 "mn-reentrant-mailbox.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 153 "mn-reentrant-mailbox.gob"
+#line 145 "mn-reentrant-mailbox.gob"
g_return_val_if_fail (MN_IS_REENTRANT_MAILBOX (self), (gboolean )0);
-#line 348 "mn-reentrant-mailbox.c"
-{
-#line 155 "mn-reentrant-mailbox.gob"
-
- gboolean aborted;
-
- self_lock(self);
- aborted = selfp->check_id != check_id;
- self_unlock(self);
-
- return aborted;
- }}
-#line 360 "mn-reentrant-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 165 "mn-reentrant-mailbox.gob"
-gboolean
-mn_reentrant_mailbox_check_aborted_unlocked (MNReentrantMailbox * self, unsigned long check_id)
-#line 366 "mn-reentrant-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::check_aborted_unlocked"
-#line 165 "mn-reentrant-mailbox.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 165 "mn-reentrant-mailbox.gob"
- g_return_val_if_fail (MN_IS_REENTRANT_MAILBOX (self), (gboolean )0);
-#line 373 "mn-reentrant-mailbox.c"
-{
-#line 167 "mn-reentrant-mailbox.gob"
-
- return selfp->check_id != check_id;
- }}
-#line 379 "mn-reentrant-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 171 "mn-reentrant-mailbox.gob"
-void
-mn_reentrant_mailbox_lock (MNReentrantMailbox * self)
-#line 385 "mn-reentrant-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::lock"
-#line 171 "mn-reentrant-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 171 "mn-reentrant-mailbox.gob"
- g_return_if_fail (MN_IS_REENTRANT_MAILBOX (self));
-#line 392 "mn-reentrant-mailbox.c"
-{
-#line 173 "mn-reentrant-mailbox.gob"
-
- g_mutex_lock(selfp->mutex);
- }}
-#line 398 "mn-reentrant-mailbox.c"
-#undef __GOB_FUNCTION__
-
-#line 177 "mn-reentrant-mailbox.gob"
-void
-mn_reentrant_mailbox_unlock (MNReentrantMailbox * self)
-#line 404 "mn-reentrant-mailbox.c"
-{
-#define __GOB_FUNCTION__ "MN:Reentrant:Mailbox::unlock"
-#line 177 "mn-reentrant-mailbox.gob"
- g_return_if_fail (self != NULL);
-#line 177 "mn-reentrant-mailbox.gob"
- g_return_if_fail (MN_IS_REENTRANT_MAILBOX (self));
-#line 411 "mn-reentrant-mailbox.c"
+#line 333 "mn-reentrant-mailbox.c"
{
-#line 179 "mn-reentrant-mailbox.gob"
+#line 147 "mn-reentrant-mailbox.gob"
- g_mutex_unlock(selfp->mutex);
+ return g_atomic_int_get(&selfp->check_id) != check_id;
}}
-#line 417 "mn-reentrant-mailbox.c"
+#line 339 "mn-reentrant-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-reentrant-mailbox.gob b/src/mn-reentrant-mailbox.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -36,29 +36,26 @@ requires 2.0.14
typedef struct
{
MNReentrantMailbox *self;
- unsigned long check_id;
+ int check_id;
} CheckInfo;
%}
class MN:Reentrant:Mailbox from MN:Mailbox (abstract)
{
- private GMutex *mutex = {g_mutex_new()} destroywith g_mutex_free;
-
private MNLockedGSource *queue_check_source;
- private unsigned long check_id;
- private unsigned long check_unique_id;
+ private int check_id;
+ private int check_unique_id;
override (MN:Mailbox) void
removed (MNMailbox *mailbox)
{
Self *self = SELF(mailbox);
- self_lock(self);
- selfp->check_id = 0;
- self_unlock(self);
-
PARENT_HANDLER(mailbox);
+
+ /* abort the current check */
+ g_atomic_int_set(&selfp->check_id, 0);
}
override (G:Object) void
@@ -76,7 +73,7 @@ class MN:Reentrant:Mailbox from MN:Mailbox (abstract)
* queue_check():
* @self: a mailbox
*
- * Queue a mail check on @self, or replace an already queued check.
+ * Queues a mail check on @self, or replaces an already queued check.
*
* This function is not thread-safe. It is only called from main
* loop callbacks (hence always from the same thread).
@@ -118,9 +115,7 @@ class MN:Reentrant:Mailbox from MN:Mailbox (abstract)
info->self = g_object_ref(self);
info->check_id = selfp->check_unique_id;
- self_lock(self);
- selfp->check_id = info->check_id;
- self_unlock(self);
+ g_atomic_int_set(&selfp->check_id, info->check_id);
mn_thread_create((GThreadFunc) self_check_thread_cb, info);
}
@@ -132,10 +127,7 @@ class MN:Reentrant:Mailbox from MN:Mailbox (abstract)
self_reentrant_check(self, info->check_id);
- self_lock(self);
- if (selfp->check_id == info->check_id)
- selfp->check_id = 0;
- self_unlock(self);
+ g_atomic_int_compare_and_exchange(&selfp->check_id, info->check_id, 0);
GDK_THREADS_ENTER();
@@ -148,35 +140,11 @@ class MN:Reentrant:Mailbox from MN:Mailbox (abstract)
}
virtual private void
- reentrant_check (self, unsigned long check_id);
-
- protected gboolean
- check_aborted (self, unsigned long check_id)
- {
- gboolean aborted;
-
- self_lock(self);
- aborted = selfp->check_id != check_id;
- self_unlock(self);
-
- return aborted;
- }
+ reentrant_check (self, int check_id);
protected gboolean
- check_aborted_unlocked (self, unsigned long check_id)
- {
- return selfp->check_id != check_id;
- }
-
- protected void
- lock (self)
- {
- g_mutex_lock(selfp->mutex);
- }
-
- protected void
- unlock (self)
+ check_aborted (self, int check_id)
{
- g_mutex_unlock(selfp->mutex);
+ return g_atomic_int_get(&selfp->check_id) != check_id;
}
}
diff --git a/src/mn-reentrant-mailbox.h b/src/mn-reentrant-mailbox.h
@@ -47,7 +47,7 @@ struct _MNReentrantMailbox {
typedef struct _MNReentrantMailboxClass MNReentrantMailboxClass;
struct _MNReentrantMailboxClass {
MNMailboxClass __parent__;
- void (* reentrant_check) (MNReentrantMailbox * self, unsigned long check_id);
+ void (* reentrant_check) (MNReentrantMailbox * self, int check_id);
};
diff --git a/src/mn-sasl.c b/src/mn-sasl.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-sasl.h b/src/mn-sasl.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-shell-private.h b/src/mn-shell-private.h
@@ -9,16 +9,24 @@
extern "C" {
#endif /* __cplusplus */
+
+#line 30 "mn-shell.gob"
+
+#include "mn-sound-player.h"
+
+#line 18 "mn-shell-private.h"
struct _MNShellPrivate {
-#line 62 "mn-shell.gob"
+#line 84 "mn-shell.gob"
+ MNSoundPlayer * sound_player;
+#line 86 "mn-shell.gob"
gboolean has_new;
-#line 64 "mn-shell.gob"
+#line 88 "mn-shell.gob"
GtkWidget * properties_dialog;
-#line 65 "mn-shell.gob"
+#line 89 "mn-shell.gob"
GSList * mailbox_properties_dialogs;
-#line 66 "mn-shell.gob"
+#line 90 "mn-shell.gob"
GtkWidget * about_dialog;
-#line 22 "mn-shell-private.h"
+#line 30 "mn-shell-private.h"
};
#ifdef __cplusplus
diff --git a/src/mn-shell.c b/src/mn-shell.c
@@ -22,9 +22,10 @@
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */
-#line 30 "mn-shell.gob"
+#line 34 "mn-shell.gob"
#include "config.h"
+#include <signal.h>
#include <glib/gi18n.h>
#include <eel/eel.h>
#include <libxml/tree.h>
@@ -41,7 +42,23 @@
MNShell *mn_shell = NULL;
-#line 45 "mn-shell.c"
+typedef struct
+{
+ int num;
+ const char *name;
+} UnixSignalInfo;
+
+#define SIGNAL_INFO(name) { name, #name }
+
+static const UnixSignalInfo unix_quit_signals[] = {
+ SIGNAL_INFO(SIGHUP),
+ SIGNAL_INFO(SIGINT),
+ SIGNAL_INFO(SIGTERM),
+ SIGNAL_INFO(SIGUSR1),
+ SIGNAL_INFO(SIGUSR2)
+};
+
+#line 62 "mn-shell.c"
static const GEnumValue _mn_shell_tooltip_mail_summary_values[] = {
{ MN_SHELL_TOOLTIP_MAIL_SUMMARY_STANDARD, (char *)"MN_SHELL_TOOLTIP_MAIL_SUMMARY_STANDARD", (char *)"standard" },
{ MN_SHELL_TOOLTIP_MAIL_SUMMARY_COMPACT, (char *)"MN_SHELL_TOOLTIP_MAIL_SUMMARY_COMPACT", (char *)"compact" },
@@ -74,22 +91,23 @@ typedef MNShellClass SelfClass;
/* here are local prototypes */
static void mn_shell_class_init (MNShellClass * c) G_GNUC_UNUSED;
static void mn_shell_init (MNShell * self) G_GNUC_UNUSED;
-static void ___2_mn_shell_finalize (GObject * object) G_GNUC_UNUSED;
+static void ___2_mn_shell_dispose (GObject * object) G_GNUC_UNUSED;
+static const UnixSignalInfo * mn_shell_lookup_unix_quit_signal (int signum) G_GNUC_UNUSED;
+static void mn_shell_unix_quit_signal_handler (int signum) G_GNUC_UNUSED;
+static void mn_shell_weak_notify_cb (gpointer data, GObject * former_object) G_GNUC_UNUSED;
static void mn_shell_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data) G_GNUC_UNUSED;
+static void mn_shell_play_new_mail_sound (MNShell * self) G_GNUC_UNUSED;
static void mn_shell_mailbox_removed_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_init_icon (MNShell * self) G_GNUC_UNUSED;
-static void mn_shell_notify_blink_on_errors_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
-static void mn_shell_notify_always_display_icon_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
+static void mn_shell_notify_icon_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_notify_mail_reader_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_notify_tooltip_mail_summary_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_icon_activate_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_icon_activate_mail_reader_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_icon_activate_open_latest_message_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
-static void mn_shell_icon_activate_update_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_icon_activate_properties_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_icon_activate_help_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_icon_activate_about_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
-static void mn_shell_icon_activate_remove_h (MNMailIcon * icon, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data) G_GNUC_UNUSED;
static void mn_shell_update_sensitivity (MNShell * self) G_GNUC_UNUSED;
static void mn_shell_update_icon (MNShell * self) G_GNUC_UNUSED;
@@ -98,28 +116,29 @@ static int mn_shell_new_mailboxes_compare_cb (MNMailbox * a, MNMailbox * b) G_GN
static GtkWidget * mn_shell_tooltip_section_new (GtkVBox ** vbox, const char * title) G_GNUC_UNUSED;
static void mn_shell_tooltip_text_section_new (GtkVBox ** vbox, const char * title, const char * text) G_GNUC_UNUSED;
static void mn_shell_open_latest_message (MNShell * self) G_GNUC_UNUSED;
-static void mn_shell_display_window (MNShell * self, GType type, GtkWidget ** ptr) G_GNUC_UNUSED;
+static void mn_shell_display_window (MNShell * self, GType type, GtkWidget ** ptr, guint32 timestamp) G_GNUC_UNUSED;
static void mn_shell_mailbox_properties_dialog_weak_notify_cb (gpointer data, GObject * former_object) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static GObjectClass *parent_class = NULL;
/* Short form macros */
+#define self_lookup_unix_quit_signal mn_shell_lookup_unix_quit_signal
+#define self_unix_quit_signal_handler mn_shell_unix_quit_signal_handler
+#define self_weak_notify_cb mn_shell_weak_notify_cb
#define self_messages_changed_h mn_shell_messages_changed_h
+#define self_play_new_mail_sound mn_shell_play_new_mail_sound
#define self_mailbox_removed_h mn_shell_mailbox_removed_h
#define self_init_icon mn_shell_init_icon
-#define self_notify_blink_on_errors_cb mn_shell_notify_blink_on_errors_cb
-#define self_notify_always_display_icon_cb mn_shell_notify_always_display_icon_cb
+#define self_notify_icon_cb mn_shell_notify_icon_cb
#define self_notify_mail_reader_cb mn_shell_notify_mail_reader_cb
#define self_notify_tooltip_mail_summary_cb mn_shell_notify_tooltip_mail_summary_cb
#define self_icon_activate_h mn_shell_icon_activate_h
#define self_icon_activate_mail_reader_h mn_shell_icon_activate_mail_reader_h
#define self_icon_activate_open_latest_message_h mn_shell_icon_activate_open_latest_message_h
-#define self_icon_activate_update_h mn_shell_icon_activate_update_h
#define self_icon_activate_properties_h mn_shell_icon_activate_properties_h
#define self_icon_activate_help_h mn_shell_icon_activate_help_h
#define self_icon_activate_about_h mn_shell_icon_activate_about_h
-#define self_icon_activate_remove_h mn_shell_icon_activate_remove_h
#define self_icon_destroy_h mn_shell_icon_destroy_h
#define self_update_sensitivity mn_shell_update_sensitivity
#define self_update_icon mn_shell_update_icon
@@ -129,6 +148,9 @@ static GObjectClass *parent_class = NULL;
#define self_tooltip_text_section_new mn_shell_tooltip_text_section_new
#define self_open_latest_message mn_shell_open_latest_message
#define self_new mn_shell_new
+#define self_consider_new_mail_as_read mn_shell_consider_new_mail_as_read
+#define self_update mn_shell_update
+#define self_quit mn_shell_quit
#define self_display_properties_dialog mn_shell_display_properties_dialog
#define self_display_about_dialog mn_shell_display_about_dialog
#define self_display_window mn_shell_display_window
@@ -180,28 +202,13 @@ GET_NEW_VARG (const char *first, ...)
static void
-___dispose (GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Shell::dispose"
- MNShell *self G_GNUC_UNUSED = MN_SHELL (obj_self);
- if (G_OBJECT_CLASS (parent_class)->dispose) \
- (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 58 "mn-shell.gob"
- if(self->mailboxes) { g_object_unref ((gpointer) self->mailboxes); self->mailboxes = NULL; }
-#line 192 "mn-shell.c"
-}
-#undef __GOB_FUNCTION__
-
-
-static void
___finalize(GObject *obj_self)
{
#define __GOB_FUNCTION__ "MN:Shell::finalize"
MNShell *self G_GNUC_UNUSED = MN_SHELL (obj_self);
gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 97 "mn-shell.gob"
- ___2_mn_shell_finalize(obj_self);
-#line 205 "mn-shell.c"
+ if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
}
#undef __GOB_FUNCTION__
@@ -215,35 +222,46 @@ mn_shell_class_init (MNShellClass * c G_GNUC_UNUSED)
parent_class = g_type_class_ref (G_TYPE_OBJECT);
-#line 97 "mn-shell.gob"
+#line 143 "mn-shell.gob"
+ g_object_class->dispose = ___2_mn_shell_dispose;
+#line 228 "mn-shell.c"
g_object_class->finalize = ___finalize;
-#line 221 "mn-shell.c"
- g_object_class->dispose = ___dispose;
}
#undef __GOB_FUNCTION__
-#line 68 "mn-shell.gob"
+#line 92 "mn-shell.gob"
static void
mn_shell_init (MNShell * self G_GNUC_UNUSED)
-#line 228 "mn-shell.c"
+#line 235 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::init"
self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_SHELL,MNShellPrivate);
-#line 58 "mn-shell.gob"
- self->mailboxes = mn_mailboxes_new();
-#line 234 "mn-shell.c"
{
-#line 69 "mn-shell.gob"
+#line 93 "mn-shell.gob"
+
+ int i;
g_assert(mn_shell == NULL);
mn_shell = self;
- eel_add_weak_pointer(&mn_shell);
+ g_object_weak_ref(G_OBJECT(self), self_weak_notify_cb, NULL);
+
+ selfp->sound_player = mn_sound_player_new();
+ eel_add_weak_pointer(&selfp->sound_player);
+
+ /*
+ * self->mailboxes is assigned in MNMailboxes itself, so that
+ * mailboxes can access it even during construction of
+ * MNMailboxes.
+ */
+ mn_mailboxes_new();
+ eel_add_weak_pointer(&self->mailboxes);
self_init_icon(self);
mn_g_object_gconf_notifications_add_gdk_locked(self,
- MN_CONF_BLINK_ON_ERRORS, self_notify_blink_on_errors_cb, self,
- MN_CONF_ALWAYS_DISPLAY_ICON, self_notify_always_display_icon_cb, self,
+ MN_CONF_BLINK_ON_ERRORS, self_notify_icon_cb, self,
+ MN_CONF_ALWAYS_DISPLAY_ICON, self_notify_icon_cb, self,
+ MN_CONF_DISPLAY_MESSAGE_COUNT, self_notify_icon_cb, self,
MN_CONF_GNOME_MAIL_READER_NAMESPACE, self_notify_mail_reader_cb, self,
MN_CONF_TOOLTIP_MAIL_SUMMARY, self_notify_tooltip_mail_summary_cb, self,
NULL);
@@ -251,7 +269,7 @@ mn_shell_init (MNShell * self G_GNUC_UNUSED)
g_object_connect(self->mailboxes,
"signal::messages-changed", self_messages_changed_h, self,
"signal::mailbox-removed", self_mailbox_removed_h, self,
- "swapped-signal::notify::poll", self_update_sensitivity, self,
+ "swapped-signal::notify::manually-checkable", self_update_sensitivity, self,
"swapped-signal::list-changed", self_update_tooltip, self,
"swapped-signal::list-changed", self_update_icon, self,
"swapped-signal::error-changed", self_update_tooltip, self,
@@ -259,41 +277,152 @@ mn_shell_init (MNShell * self G_GNUC_UNUSED)
NULL);
self->popups = mn_popups_new();
+ eel_add_weak_pointer(&self->popups);
+
+ /*
+ * Exit cleanly (by unreferencing our components) when receiving a
+ * UNIX signal.
+ */
+ for (i = 0; i < G_N_ELEMENTS(unix_quit_signals); i++)
+ signal(unix_quit_signals[i].num, self_unix_quit_signal_handler);
-#line 264 "mn-shell.c"
+#line 290 "mn-shell.c"
}
}
#undef __GOB_FUNCTION__
-#line 97 "mn-shell.gob"
+#line 143 "mn-shell.gob"
static void
-___2_mn_shell_finalize (GObject * object G_GNUC_UNUSED)
-#line 274 "mn-shell.c"
+___2_mn_shell_dispose (GObject * object G_GNUC_UNUSED)
+#line 300 "mn-shell.c"
#define PARENT_HANDLER(___object) \
- { if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
+ { if(G_OBJECT_CLASS(parent_class)->dispose) \
+ (* G_OBJECT_CLASS(parent_class)->dispose)(___object); }
{
-#define __GOB_FUNCTION__ "MN:Shell::finalize"
+#define __GOB_FUNCTION__ "MN:Shell::dispose"
{
-#line 99 "mn-shell.gob"
+#line 145 "mn-shell.gob"
- gtk_main_quit();
+ Self *self = SELF(object);
+
+ /*
+ * We explicitly unreference or destroy each component, even
+ * though MN will exit after the shell is finalized. This is done
+ * for the sake of respecting encapsulation: we should not know
+ * whether a particular component has something to do on exit or
+ * not (for instance, MNSoundPlayer must kill the play process).
+ *
+ * Of course, the order in which we get rid of the components
+ * matters: for instance, when destroyed, MNPropertiesDialog might
+ * remove the test mailbox and thus requires a valid MNMailboxes
+ * object. We destroy the components in the inverse order of their
+ * creation.
+ *
+ * Also note that we do not need to nullify the pointers after
+ * destruction since we use eel_add_weak_pointer() at creation
+ * time.
+ */
+
+ g_slist_foreach(selfp->mailbox_properties_dialogs, (GFunc) gtk_widget_destroy, NULL);
+ /* the list is freed in mailbox_properties_dialog_weak_notify_cb() */
+
+ if (selfp->properties_dialog)
+ gtk_widget_destroy(selfp->properties_dialog);
+
+ if (selfp->about_dialog)
+ gtk_widget_destroy(selfp->about_dialog);
+
+ mn_g_object_null_unref(self->popups);
+
+ if (self->icon)
+ {
+ /* do not recreate the icon after we destroy it */
+ g_signal_handlers_disconnect_by_func(self->icon, self_icon_destroy_h, self);
+ gtk_widget_destroy(GTK_WIDGET(self->icon));
+ }
+
+ mn_g_object_null_unref(self->mailboxes);
+
+ mn_g_object_null_unref(selfp->sound_player);
+
PARENT_HANDLER(object);
}}
-#line 286 "mn-shell.c"
+#line 353 "mn-shell.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 104 "mn-shell.gob"
+#line 191 "mn-shell.gob"
+static const UnixSignalInfo *
+mn_shell_lookup_unix_quit_signal (int signum)
+#line 360 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::lookup_unix_quit_signal"
+{
+#line 193 "mn-shell.gob"
+
+ int i;
+
+ for (i = 0; i < G_N_ELEMENTS(unix_quit_signals); i++)
+ if (unix_quit_signals[i].num == signum)
+ return &unix_quit_signals[i];
+
+ g_assert_not_reached();
+ return NULL;
+ }}
+#line 375 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 204 "mn-shell.gob"
+static void
+mn_shell_unix_quit_signal_handler (int signum)
+#line 381 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::unix_quit_signal_handler"
+{
+#line 206 "mn-shell.gob"
+
+ int i;
+ const UnixSignalInfo *info;
+
+ /*
+ * Uninstall signal handlers, in case another signal is received
+ * while we are quitting.
+ */
+ for (i = 0; i < G_N_ELEMENTS(unix_quit_signals); i++)
+ signal(unix_quit_signals[i].num, SIG_DFL);
+
+ info = self_lookup_unix_quit_signal(signum);
+
+ g_message(_("received %s signal, exiting"), info->name);
+ self_quit(mn_shell);
+ }}
+#line 402 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 223 "mn-shell.gob"
+static void
+mn_shell_weak_notify_cb (gpointer data, GObject * former_object)
+#line 408 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::weak_notify_cb"
+{
+#line 225 "mn-shell.gob"
+
+ gtk_main_quit();
+ }}
+#line 416 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 229 "mn-shell.gob"
static void
mn_shell_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer user_data)
-#line 293 "mn-shell.c"
+#line 422 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::messages_changed_h"
{
-#line 108 "mn-shell.gob"
+#line 233 "mn-shell.gob"
Self *self = user_data;
@@ -302,6 +431,8 @@ mn_shell_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer
if (has_new)
{
+ self_play_new_mail_sound(self);
+
if (mn_conf_has_command(MN_CONF_COMMANDS_NEW_MAIL_NAMESPACE))
mn_conf_execute_command(MN_CONF_COMMANDS_NEW_MAIL_COMMAND);
}
@@ -310,17 +441,46 @@ mn_shell_messages_changed_h (MNMailboxes * mailboxes, gboolean has_new, gpointer
self_update_tooltip(self);
self_update_icon(self);
}}
-#line 314 "mn-shell.c"
+#line 445 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 252 "mn-shell.gob"
+static void
+mn_shell_play_new_mail_sound (MNShell * self)
+#line 451 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::play_new_mail_sound"
+#line 252 "mn-shell.gob"
+ g_return_if_fail (self != NULL);
+#line 252 "mn-shell.gob"
+ g_return_if_fail (MN_IS_SHELL (self));
+#line 458 "mn-shell.c"
+{
+#line 254 "mn-shell.gob"
+
+ char *file;
+
+ if (! eel_gconf_get_boolean(MN_CONF_SOUNDS_NEW_MAIL_ENABLED))
+ return;
+
+ file = eel_gconf_get_string(MN_CONF_SOUNDS_NEW_MAIL_FILE);
+
+ if (file && *file)
+ mn_sound_player_play(selfp->sound_player, file, NULL);
+
+ g_free(file);
+ }}
+#line 474 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 125 "mn-shell.gob"
+#line 268 "mn-shell.gob"
static void
mn_shell_mailbox_removed_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpointer user_data)
-#line 320 "mn-shell.c"
+#line 480 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::mailbox_removed_h"
{
-#line 129 "mn-shell.gob"
+#line 272 "mn-shell.gob"
Self *self = user_data;
MNMailboxPropertiesDialog *dialog;
@@ -330,34 +490,36 @@ mn_shell_mailbox_removed_h (MNMailboxes * mailboxes, MNMailbox * mailbox, gpoint
if (dialog)
gtk_widget_destroy(GTK_WIDGET(dialog));
}}
-#line 334 "mn-shell.c"
+#line 494 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 139 "mn-shell.gob"
+#line 282 "mn-shell.gob"
static void
mn_shell_init_icon (MNShell * self)
-#line 340 "mn-shell.c"
+#line 500 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::init_icon"
-#line 139 "mn-shell.gob"
+#line 282 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 139 "mn-shell.gob"
+#line 282 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 347 "mn-shell.c"
+#line 507 "mn-shell.c"
{
-#line 141 "mn-shell.gob"
+#line 284 "mn-shell.gob"
self->icon = MN_MAIL_ICON(mn_mail_icon_new());
+ eel_add_weak_pointer(&self->icon);
g_object_connect(self->icon,
"signal::activate", self_icon_activate_h, self,
"signal::activate-mail-reader", self_icon_activate_mail_reader_h, self,
"signal::activate-open-latest-message", self_icon_activate_open_latest_message_h, self,
- "signal::activate-update", self_icon_activate_update_h, self,
+ "swapped-signal::activate-consider-new-mail-as-read", self_consider_new_mail_as_read, self,
+ "swapped-signal::activate-update", self_update, self,
"signal::activate-properties", self_icon_activate_properties_h, self,
"signal::activate-help", self_icon_activate_help_h, self,
"signal::activate-about", self_icon_activate_about_h, self,
- "signal::activate-remove", self_icon_activate_remove_h, self,
+ "swapped-signal::activate-remove", self_quit, self,
"signal::destroy", self_icon_destroy_h, self,
NULL);
@@ -365,81 +527,65 @@ mn_shell_init_icon (MNShell * self)
self_update_tooltip(self);
self_update_icon(self);
}}
-#line 369 "mn-shell.c"
+#line 531 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 161 "mn-shell.gob"
+#line 306 "mn-shell.gob"
static void
-mn_shell_notify_blink_on_errors_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-#line 375 "mn-shell.c"
+mn_shell_notify_icon_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
+#line 537 "mn-shell.c"
{
-#define __GOB_FUNCTION__ "MN:Shell::notify_blink_on_errors_cb"
+#define __GOB_FUNCTION__ "MN:Shell::notify_icon_cb"
{
-#line 166 "mn-shell.gob"
-
- Self *self = user_data;
-
- self_update_icon(self);
- }}
-#line 385 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 172 "mn-shell.gob"
-static void
-mn_shell_notify_always_display_icon_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-#line 391 "mn-shell.c"
-{
-#define __GOB_FUNCTION__ "MN:Shell::notify_always_display_icon_cb"
-{
-#line 177 "mn-shell.gob"
+#line 311 "mn-shell.gob"
Self *self = user_data;
self_update_icon(self);
}}
-#line 401 "mn-shell.c"
+#line 547 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 183 "mn-shell.gob"
+#line 317 "mn-shell.gob"
static void
mn_shell_notify_mail_reader_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-#line 407 "mn-shell.c"
+#line 553 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::notify_mail_reader_cb"
{
-#line 188 "mn-shell.gob"
+#line 322 "mn-shell.gob"
Self *self = user_data;
self_update_sensitivity(self);
}}
-#line 417 "mn-shell.c"
+#line 563 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 194 "mn-shell.gob"
+#line 328 "mn-shell.gob"
static void
mn_shell_notify_tooltip_mail_summary_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
-#line 423 "mn-shell.c"
+#line 569 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::notify_tooltip_mail_summary_cb"
{
-#line 199 "mn-shell.gob"
+#line 333 "mn-shell.gob"
Self *self = user_data;
self_update_tooltip(self);
}}
-#line 433 "mn-shell.c"
+#line 579 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 205 "mn-shell.gob"
+#line 339 "mn-shell.gob"
static void
mn_shell_icon_activate_h (MNMailIcon * icon, gpointer user_data)
-#line 439 "mn-shell.c"
+#line 585 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_h"
{
-#line 207 "mn-shell.gob"
+#line 341 "mn-shell.gob"
MNShell *self = user_data;
MNAction action;
@@ -448,10 +594,6 @@ mn_shell_icon_activate_h (MNMailIcon * icon, gpointer user_data)
switch (action)
{
- case MN_ACTION_DISPLAY_PROPERTIES_DIALOG:
- self_display_properties_dialog(self);
- break;
-
case MN_ACTION_LAUNCH_MAIL_READER:
if (mn_conf_has_command(MN_CONF_GNOME_MAIL_READER_NAMESPACE))
mn_conf_execute_mail_reader();
@@ -479,6 +621,10 @@ mn_shell_icon_activate_h (MNMailIcon * icon, gpointer user_data)
_("You have no new mail."));
break;
+ case MN_ACTION_CONSIDER_NEW_MAIL_AS_READ:
+ self_consider_new_mail_as_read(self);
+ break;
+
case MN_ACTION_UPDATE_MAIL_STATUS:
mn_mailboxes_check(self->mailboxes);
break;
@@ -487,163 +633,134 @@ mn_shell_icon_activate_h (MNMailIcon * icon, gpointer user_data)
g_assert_not_reached();
}
}}
-#line 491 "mn-shell.c"
+#line 637 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 255 "mn-shell.gob"
+#line 389 "mn-shell.gob"
static void
mn_shell_icon_activate_mail_reader_h (MNMailIcon * icon, gpointer user_data)
-#line 497 "mn-shell.c"
+#line 643 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_mail_reader_h"
{
-#line 257 "mn-shell.gob"
+#line 391 "mn-shell.gob"
mn_conf_execute_mail_reader();
}}
-#line 505 "mn-shell.c"
+#line 651 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 261 "mn-shell.gob"
+#line 395 "mn-shell.gob"
static void
mn_shell_icon_activate_open_latest_message_h (MNMailIcon * icon, gpointer user_data)
-#line 511 "mn-shell.c"
+#line 657 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_open_latest_message_h"
{
-#line 263 "mn-shell.gob"
+#line 397 "mn-shell.gob"
Self *self = user_data;
self_open_latest_message(self);
}}
-#line 520 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 268 "mn-shell.gob"
-static void
-mn_shell_icon_activate_update_h (MNMailIcon * icon, gpointer user_data)
-#line 526 "mn-shell.c"
-{
-#define __GOB_FUNCTION__ "MN:Shell::icon_activate_update_h"
-{
-#line 270 "mn-shell.gob"
-
- Self *self = user_data;
- mn_mailboxes_check(self->mailboxes);
- }}
-#line 535 "mn-shell.c"
+#line 666 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 275 "mn-shell.gob"
+#line 402 "mn-shell.gob"
static void
mn_shell_icon_activate_properties_h (MNMailIcon * icon, gpointer user_data)
-#line 541 "mn-shell.c"
+#line 672 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_properties_h"
{
-#line 277 "mn-shell.gob"
+#line 404 "mn-shell.gob"
Self *self = user_data;
- self_display_properties_dialog(self);
+ self_display_properties_dialog(self, gtk_get_current_event_time());
}}
-#line 550 "mn-shell.c"
+#line 681 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 282 "mn-shell.gob"
+#line 409 "mn-shell.gob"
static void
mn_shell_icon_activate_help_h (MNMailIcon * icon, gpointer user_data)
-#line 556 "mn-shell.c"
+#line 687 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_help_h"
{
-#line 284 "mn-shell.gob"
+#line 411 "mn-shell.gob"
mn_display_help(NULL, NULL);
}}
-#line 564 "mn-shell.c"
+#line 695 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 288 "mn-shell.gob"
+#line 415 "mn-shell.gob"
static void
mn_shell_icon_activate_about_h (MNMailIcon * icon, gpointer user_data)
-#line 570 "mn-shell.c"
+#line 701 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_activate_about_h"
{
-#line 290 "mn-shell.gob"
-
- Self *self = user_data;
- self_display_about_dialog(self);
- }}
-#line 579 "mn-shell.c"
-#undef __GOB_FUNCTION__
-
-#line 295 "mn-shell.gob"
-static void
-mn_shell_icon_activate_remove_h (MNMailIcon * icon, gpointer user_data)
-#line 585 "mn-shell.c"
-{
-#define __GOB_FUNCTION__ "MN:Shell::icon_activate_remove_h"
-{
-#line 297 "mn-shell.gob"
+#line 417 "mn-shell.gob"
Self *self = user_data;
- g_object_unref(self);
+ self_display_about_dialog(self, gtk_get_current_event_time());
}}
-#line 594 "mn-shell.c"
+#line 710 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 302 "mn-shell.gob"
+#line 422 "mn-shell.gob"
static void
mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data)
-#line 600 "mn-shell.c"
+#line 716 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::icon_destroy_h"
{
-#line 304 "mn-shell.gob"
+#line 424 "mn-shell.gob"
Self *self = user_data;
/* The Notification Area applet has been terminated. Recreate the icon. */
self_init_icon(self);
}}
-#line 611 "mn-shell.c"
+#line 727 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 311 "mn-shell.gob"
+#line 431 "mn-shell.gob"
static void
mn_shell_update_sensitivity (MNShell * self)
-#line 617 "mn-shell.c"
+#line 733 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::update_sensitivity"
-#line 311 "mn-shell.gob"
+#line 431 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 311 "mn-shell.gob"
+#line 431 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 624 "mn-shell.c"
+#line 740 "mn-shell.c"
{
-#line 313 "mn-shell.gob"
+#line 433 "mn-shell.gob"
gtk_widget_set_sensitive(self->icon->mail_reader_item, mn_conf_has_command(MN_CONF_GNOME_MAIL_READER_NAMESPACE));
gtk_widget_set_sensitive(self->icon->open_latest_message_item, self->mailboxes->messages && mn_message_can_open(self->mailboxes->messages->data));
- gtk_widget_set_sensitive(self->icon->update_item, mn_mailboxes_get_poll(self->mailboxes));
+ gtk_widget_set_sensitive(self->icon->consider_new_mail_as_read_item, self->mailboxes->messages != NULL);
+ gtk_widget_set_sensitive(self->icon->update_item, mn_mailboxes_get_manually_checkable(self->mailboxes));
}}
-#line 632 "mn-shell.c"
+#line 749 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 319 "mn-shell.gob"
+#line 440 "mn-shell.gob"
static void
mn_shell_update_icon (MNShell * self)
-#line 638 "mn-shell.c"
+#line 755 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::update_icon"
-#line 319 "mn-shell.gob"
+#line 440 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 319 "mn-shell.gob"
+#line 440 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 645 "mn-shell.c"
+#line 762 "mn-shell.c"
{
-#line 321 "mn-shell.gob"
+#line 442 "mn-shell.gob"
GList *l;
gboolean has_new = FALSE;
@@ -669,32 +786,40 @@ mn_shell_update_icon (MNShell * self)
if (has_new || blink || always)
{
- mn_blinking_image_set_from_stock(MN_BLINKING_IMAGE(self->icon->image),
- has_new ? MN_STOCK_MAIL : MN_STOCK_NO_MAIL,
- GTK_ICON_SIZE_LARGE_TOOLBAR);
- mn_blinking_image_set_blinking(MN_BLINKING_IMAGE(self->icon->image),
- blink);
+ int count;
+
+ if (eel_gconf_get_boolean(MN_CONF_DISPLAY_MESSAGE_COUNT))
+ count = g_slist_length(self->mailboxes->messages);
+ else
+ count = 0;
+
+ mn_mail_icon_set_from_stock(self->icon, has_new ? MN_STOCK_MAIL : MN_STOCK_NO_MAIL);
+ mn_mail_icon_set_blinking(self->icon, blink);
+ mn_mail_icon_set_count(self->icon, count);
gtk_widget_show(GTK_WIDGET(self->icon));
}
else
- gtk_widget_hide(GTK_WIDGET(self->icon));
+ {
+ gtk_widget_hide(GTK_WIDGET(self->icon));
+ mn_mail_icon_set_blinking(self->icon, FALSE);
+ }
}}
-#line 683 "mn-shell.c"
+#line 808 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 357 "mn-shell.gob"
+#line 486 "mn-shell.gob"
static void
mn_shell_update_tooltip (MNShell * self)
-#line 689 "mn-shell.c"
+#line 814 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::update_tooltip"
-#line 357 "mn-shell.gob"
+#line 486 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 357 "mn-shell.gob"
+#line 486 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 696 "mn-shell.c"
+#line 821 "mn-shell.c"
{
-#line 359 "mn-shell.gob"
+#line 488 "mn-shell.gob"
GtkVBox *vbox = NULL;
@@ -724,12 +849,12 @@ mn_shell_update_tooltip (MNShell * self)
{
MNMailbox *mailbox = lb->data;
+ g_assert(mailbox->n_messages > 0);
+
if (*string->str)
g_string_append_c(string, '\n');
- g_string_append(string, mailbox->runtime_name);
- if (mailbox->n_messages > 0)
- g_string_append_printf(string, " (%i)", mailbox->n_messages);
+ g_string_append_printf(string, _("%s (%i)"), mailbox->runtime_name, mailbox->n_messages);
}
g_slist_free(new_mailboxes);
@@ -748,7 +873,7 @@ mn_shell_update_tooltip (MNShell * self)
if (*string->str)
g_string_append_c(string, '\n');
- g_string_append_printf(string, "%s: %s", mailbox->runtime_name, mailbox->error);
+ g_string_append_printf(string, _("%s: %s"), mailbox->runtime_name, mailbox->error);
}
g_slist_free(error_mailboxes);
@@ -800,17 +925,17 @@ mn_shell_update_tooltip (MNShell * self)
else
mn_mail_icon_set_tip(self->icon, _("You have no new mail."));
}}
-#line 804 "mn-shell.c"
+#line 929 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 465 "mn-shell.gob"
+#line 594 "mn-shell.gob"
static int
mn_shell_new_mailboxes_compare_cb (MNMailbox * a, MNMailbox * b)
-#line 810 "mn-shell.c"
+#line 935 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::new_mailboxes_compare_cb"
{
-#line 467 "mn-shell.gob"
+#line 596 "mn-shell.gob"
int cmp;
@@ -827,22 +952,22 @@ mn_shell_new_mailboxes_compare_cb (MNMailbox * a, MNMailbox * b)
return cmp;
}}
-#line 831 "mn-shell.c"
+#line 956 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 484 "mn-shell.gob"
+#line 613 "mn-shell.gob"
static GtkWidget *
mn_shell_tooltip_section_new (GtkVBox ** vbox, const char * title)
-#line 837 "mn-shell.c"
+#line 962 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::tooltip_section_new"
-#line 484 "mn-shell.gob"
+#line 613 "mn-shell.gob"
g_return_val_if_fail (vbox != NULL, (GtkWidget * )0);
-#line 484 "mn-shell.gob"
+#line 613 "mn-shell.gob"
g_return_val_if_fail (title != NULL, (GtkWidget * )0);
-#line 844 "mn-shell.c"
+#line 969 "mn-shell.c"
{
-#line 487 "mn-shell.gob"
+#line 616 "mn-shell.gob"
GtkWidget *section;
GtkWidget *label;
@@ -859,24 +984,24 @@ mn_shell_tooltip_section_new (GtkVBox ** vbox, const char * title)
return alignment;
}}
-#line 863 "mn-shell.c"
+#line 988 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 504 "mn-shell.gob"
+#line 633 "mn-shell.gob"
static void
mn_shell_tooltip_text_section_new (GtkVBox ** vbox, const char * title, const char * text)
-#line 869 "mn-shell.c"
+#line 994 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::tooltip_text_section_new"
-#line 504 "mn-shell.gob"
+#line 633 "mn-shell.gob"
g_return_if_fail (vbox != NULL);
-#line 504 "mn-shell.gob"
+#line 633 "mn-shell.gob"
g_return_if_fail (title != NULL);
-#line 504 "mn-shell.gob"
+#line 633 "mn-shell.gob"
g_return_if_fail (text != NULL);
-#line 878 "mn-shell.c"
+#line 1003 "mn-shell.c"
{
-#line 508 "mn-shell.gob"
+#line 637 "mn-shell.gob"
GtkWidget *alignment;
GtkWidget *label;
@@ -889,22 +1014,22 @@ mn_shell_tooltip_text_section_new (GtkVBox ** vbox, const char * title, const ch
gtk_container_add(GTK_CONTAINER(alignment), label);
}}
-#line 893 "mn-shell.c"
+#line 1018 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 521 "mn-shell.gob"
+#line 650 "mn-shell.gob"
static void
mn_shell_open_latest_message (MNShell * self)
-#line 899 "mn-shell.c"
+#line 1024 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::open_latest_message"
-#line 521 "mn-shell.gob"
+#line 650 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 521 "mn-shell.gob"
+#line 650 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 906 "mn-shell.c"
+#line 1031 "mn-shell.c"
{
-#line 523 "mn-shell.gob"
+#line 652 "mn-shell.gob"
MNMessage *message;
GError *err = NULL;
@@ -920,82 +1045,148 @@ mn_shell_open_latest_message (MNShell * self)
g_error_free(err);
}
}}
-#line 924 "mn-shell.c"
+#line 1049 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 539 "mn-shell.gob"
+#line 668 "mn-shell.gob"
MNShell *
mn_shell_new (void)
-#line 930 "mn-shell.c"
+#line 1055 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::new"
{
-#line 541 "mn-shell.gob"
+#line 670 "mn-shell.gob"
return GET_NEW;
}}
-#line 938 "mn-shell.c"
+#line 1063 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 674 "mn-shell.gob"
+void
+mn_shell_consider_new_mail_as_read (MNShell * self)
+#line 1069 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::consider_new_mail_as_read"
+#line 674 "mn-shell.gob"
+ g_return_if_fail (self != NULL);
+#line 674 "mn-shell.gob"
+ g_return_if_fail (MN_IS_SHELL (self));
+#line 1076 "mn-shell.c"
+{
+#line 676 "mn-shell.gob"
+
+ GList *l;
+
+ MN_LIST_FOREACH(l, self->mailboxes->list)
+ {
+ MNMailbox *mailbox = l->data;
+ mn_mailbox_consider_as_read_list(mailbox->messages);
+ }
+ }}
+#line 1088 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 545 "mn-shell.gob"
+#line 686 "mn-shell.gob"
void
-mn_shell_display_properties_dialog (MNShell * self)
-#line 944 "mn-shell.c"
+mn_shell_update (MNShell * self)
+#line 1094 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::update"
+#line 686 "mn-shell.gob"
+ g_return_if_fail (self != NULL);
+#line 686 "mn-shell.gob"
+ g_return_if_fail (MN_IS_SHELL (self));
+#line 1101 "mn-shell.c"
+{
+#line 688 "mn-shell.gob"
+
+ mn_mailboxes_check(self->mailboxes);
+ }}
+#line 1107 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 692 "mn-shell.gob"
+void
+mn_shell_quit (MNShell * self)
+#line 1113 "mn-shell.c"
+{
+#define __GOB_FUNCTION__ "MN:Shell::quit"
+#line 692 "mn-shell.gob"
+ g_return_if_fail (self != NULL);
+#line 692 "mn-shell.gob"
+ g_return_if_fail (MN_IS_SHELL (self));
+#line 1120 "mn-shell.c"
+{
+#line 694 "mn-shell.gob"
+
+ g_object_unref(self);
+ }}
+#line 1126 "mn-shell.c"
+#undef __GOB_FUNCTION__
+
+#line 698 "mn-shell.gob"
+void
+mn_shell_display_properties_dialog (MNShell * self, guint32 timestamp)
+#line 1132 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::display_properties_dialog"
-#line 545 "mn-shell.gob"
+#line 698 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 545 "mn-shell.gob"
+#line 698 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 951 "mn-shell.c"
+#line 1139 "mn-shell.c"
{
-#line 547 "mn-shell.gob"
+#line 700 "mn-shell.gob"
- self_display_window(self, MN_TYPE_PROPERTIES_DIALOG, &selfp->properties_dialog);
+ self_display_window(self, MN_TYPE_PROPERTIES_DIALOG, &selfp->properties_dialog, timestamp);
}}
-#line 957 "mn-shell.c"
+#line 1145 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 551 "mn-shell.gob"
+#line 704 "mn-shell.gob"
void
-mn_shell_display_about_dialog (MNShell * self)
-#line 963 "mn-shell.c"
+mn_shell_display_about_dialog (MNShell * self, guint32 timestamp)
+#line 1151 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::display_about_dialog"
-#line 551 "mn-shell.gob"
+#line 704 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 551 "mn-shell.gob"
+#line 704 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 970 "mn-shell.c"
+#line 1158 "mn-shell.c"
{
-#line 553 "mn-shell.gob"
+#line 706 "mn-shell.gob"
- self_display_window(self, MN_TYPE_ABOUT_DIALOG, &selfp->about_dialog);
+ self_display_window(self, MN_TYPE_ABOUT_DIALOG, &selfp->about_dialog, timestamp);
}}
-#line 976 "mn-shell.c"
+#line 1164 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 557 "mn-shell.gob"
+#line 710 "mn-shell.gob"
static void
-mn_shell_display_window (MNShell * self, GType type, GtkWidget ** ptr)
-#line 982 "mn-shell.c"
+mn_shell_display_window (MNShell * self, GType type, GtkWidget ** ptr, guint32 timestamp)
+#line 1170 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::display_window"
-#line 557 "mn-shell.gob"
+#line 710 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 557 "mn-shell.gob"
+#line 710 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 557 "mn-shell.gob"
+#line 710 "mn-shell.gob"
g_return_if_fail (type != 0);
-#line 557 "mn-shell.gob"
+#line 710 "mn-shell.gob"
g_return_if_fail (ptr != NULL);
-#line 993 "mn-shell.c"
+#line 1181 "mn-shell.c"
{
-#line 561 "mn-shell.gob"
+#line 715 "mn-shell.gob"
if (*ptr)
{
- gtk_window_present(GTK_WINDOW(*ptr));
+ if (timestamp)
+ gtk_window_present_with_time(GTK_WINDOW(*ptr), timestamp);
+ else
+ gtk_window_present(GTK_WINDOW(*ptr));
return;
}
@@ -1004,66 +1195,66 @@ mn_shell_display_window (MNShell * self, GType type, GtkWidget ** ptr)
gtk_widget_show(*ptr);
}}
-#line 1008 "mn-shell.c"
+#line 1199 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 574 "mn-shell.gob"
+#line 731 "mn-shell.gob"
void
mn_shell_add_mailbox_properties_dialog (MNShell * self, MNMailboxPropertiesDialog * dialog)
-#line 1014 "mn-shell.c"
+#line 1205 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::add_mailbox_properties_dialog"
-#line 574 "mn-shell.gob"
+#line 731 "mn-shell.gob"
g_return_if_fail (self != NULL);
-#line 574 "mn-shell.gob"
+#line 731 "mn-shell.gob"
g_return_if_fail (MN_IS_SHELL (self));
-#line 574 "mn-shell.gob"
+#line 731 "mn-shell.gob"
g_return_if_fail (dialog != NULL);
-#line 574 "mn-shell.gob"
+#line 731 "mn-shell.gob"
g_return_if_fail (MN_IS_MAILBOX_PROPERTIES_DIALOG (dialog));
-#line 1025 "mn-shell.c"
+#line 1216 "mn-shell.c"
{
-#line 576 "mn-shell.gob"
+#line 733 "mn-shell.gob"
selfp->mailbox_properties_dialogs = g_slist_append(selfp->mailbox_properties_dialogs, dialog);
g_object_weak_ref(G_OBJECT(dialog), self_mailbox_properties_dialog_weak_notify_cb, self);
}}
-#line 1032 "mn-shell.c"
+#line 1223 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 581 "mn-shell.gob"
+#line 738 "mn-shell.gob"
static void
mn_shell_mailbox_properties_dialog_weak_notify_cb (gpointer data, GObject * former_object)
-#line 1038 "mn-shell.c"
+#line 1229 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::mailbox_properties_dialog_weak_notify_cb"
{
-#line 584 "mn-shell.gob"
+#line 741 "mn-shell.gob"
Self *self = data;
selfp->mailbox_properties_dialogs = g_slist_remove(selfp->mailbox_properties_dialogs, former_object);
}}
-#line 1048 "mn-shell.c"
+#line 1239 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 590 "mn-shell.gob"
+#line 747 "mn-shell.gob"
MNMailboxPropertiesDialog *
mn_shell_get_mailbox_properties_dialog (MNShell * self, MNMailbox * mailbox)
-#line 1054 "mn-shell.c"
+#line 1245 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::get_mailbox_properties_dialog"
-#line 590 "mn-shell.gob"
+#line 747 "mn-shell.gob"
g_return_val_if_fail (self != NULL, (MNMailboxPropertiesDialog * )0);
-#line 590 "mn-shell.gob"
+#line 747 "mn-shell.gob"
g_return_val_if_fail (MN_IS_SHELL (self), (MNMailboxPropertiesDialog * )0);
-#line 590 "mn-shell.gob"
+#line 747 "mn-shell.gob"
g_return_val_if_fail (mailbox != NULL, (MNMailboxPropertiesDialog * )0);
-#line 590 "mn-shell.gob"
+#line 747 "mn-shell.gob"
g_return_val_if_fail (MN_IS_MAILBOX (mailbox), (MNMailboxPropertiesDialog * )0);
-#line 1065 "mn-shell.c"
+#line 1256 "mn-shell.c"
{
-#line 592 "mn-shell.gob"
+#line 749 "mn-shell.gob"
GSList *l;
@@ -1083,22 +1274,22 @@ mn_shell_get_mailbox_properties_dialog (MNShell * self, MNMailbox * mailbox)
return NULL;
}}
-#line 1087 "mn-shell.c"
+#line 1278 "mn-shell.c"
#undef __GOB_FUNCTION__
-#line 612 "mn-shell.gob"
+#line 769 "mn-shell.gob"
char *
mn_shell_get_summary (MNShell * self)
-#line 1093 "mn-shell.c"
+#line 1284 "mn-shell.c"
{
#define __GOB_FUNCTION__ "MN:Shell::get_summary"
-#line 612 "mn-shell.gob"
+#line 769 "mn-shell.gob"
g_return_val_if_fail (self != NULL, (char * )0);
-#line 612 "mn-shell.gob"
+#line 769 "mn-shell.gob"
g_return_val_if_fail (MN_IS_SHELL (self), (char * )0);
-#line 1100 "mn-shell.c"
+#line 1291 "mn-shell.c"
{
-#line 614 "mn-shell.gob"
+#line 771 "mn-shell.gob"
int indent;
xmlDoc *doc;
@@ -1129,12 +1320,12 @@ mn_shell_get_summary (MNShell * self)
return summary;
}}
-#line 1133 "mn-shell.c"
+#line 1324 "mn-shell.c"
#undef __GOB_FUNCTION__
static const GEnumValue _mn_action_values[] = {
- { MN_ACTION_DISPLAY_PROPERTIES_DIALOG, (char *)"MN_ACTION_DISPLAY_PROPERTIES_DIALOG", (char *)"display-properties-dialog" },
{ MN_ACTION_LAUNCH_MAIL_READER, (char *)"MN_ACTION_LAUNCH_MAIL_READER", (char *)"launch-mail-reader" },
{ MN_ACTION_OPEN_LATEST_MESSAGE, (char *)"MN_ACTION_OPEN_LATEST_MESSAGE", (char *)"open-latest-message" },
+ { MN_ACTION_CONSIDER_NEW_MAIL_AS_READ, (char *)"MN_ACTION_CONSIDER_NEW_MAIL_AS_READ", (char *)"consider-new-mail-as-read" },
{ MN_ACTION_UPDATE_MAIL_STATUS, (char *)"MN_ACTION_UPDATE_MAIL_STATUS", (char *)"update-mail-status" },
{ 0, NULL, NULL }
};
diff --git a/src/mn-shell.gob b/src/mn-shell.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -27,8 +27,13 @@ requires 2.0.14
#include "mn-popups.h"
%}
+%privateheader{
+#include "mn-sound-player.h"
+%}
+
%{
#include "config.h"
+#include <signal.h>
#include <glib/gi18n.h>
#include <eel/eel.h>
#include <libxml/tree.h>
@@ -44,6 +49,22 @@ requires 2.0.14
#include "mn-locked-callback.h"
MNShell *mn_shell = NULL;
+
+typedef struct
+{
+ int num;
+ const char *name;
+} UnixSignalInfo;
+
+#define SIGNAL_INFO(name) { name, #name }
+
+static const UnixSignalInfo unix_quit_signals[] = {
+ SIGNAL_INFO(SIGHUP),
+ SIGNAL_INFO(SIGINT),
+ SIGNAL_INFO(SIGTERM),
+ SIGNAL_INFO(SIGUSR1),
+ SIGNAL_INFO(SIGUSR2)
+};
%}
enum MN_SHELL_TOOLTIP_MAIL_SUMMARY
@@ -55,10 +76,13 @@ enum MN_SHELL_TOOLTIP_MAIL_SUMMARY
class MN:Shell from G:Object
{
- public MNMailboxes *mailboxes = {mn_mailboxes_new()} unrefwith g_object_unref;
+ public MNMailboxes *mailboxes;
+
public MNMailIcon *icon;
public MNPopups *popups;
+ private MNSoundPlayer *sound_player;
+
private gboolean has_new;
private GtkWidget *properties_dialog;
@@ -67,16 +91,30 @@ class MN:Shell from G:Object
init (self)
{
+ int i;
+
g_assert(mn_shell == NULL);
mn_shell = self;
- eel_add_weak_pointer(&mn_shell);
+ g_object_weak_ref(G_OBJECT(self), self_weak_notify_cb, NULL);
+
+ selfp->sound_player = mn_sound_player_new();
+ eel_add_weak_pointer(&selfp->sound_player);
+
+ /*
+ * self->mailboxes is assigned in MNMailboxes itself, so that
+ * mailboxes can access it even during construction of
+ * MNMailboxes.
+ */
+ mn_mailboxes_new();
+ eel_add_weak_pointer(&self->mailboxes);
self_init_icon(self);
mn_g_object_gconf_notifications_add_gdk_locked(self,
- MN_CONF_BLINK_ON_ERRORS, self_notify_blink_on_errors_cb, self,
- MN_CONF_ALWAYS_DISPLAY_ICON, self_notify_always_display_icon_cb, self,
+ MN_CONF_BLINK_ON_ERRORS, self_notify_icon_cb, self,
+ MN_CONF_ALWAYS_DISPLAY_ICON, self_notify_icon_cb, self,
+ MN_CONF_DISPLAY_MESSAGE_COUNT, self_notify_icon_cb, self,
MN_CONF_GNOME_MAIL_READER_NAMESPACE, self_notify_mail_reader_cb, self,
MN_CONF_TOOLTIP_MAIL_SUMMARY, self_notify_tooltip_mail_summary_cb, self,
NULL);
@@ -84,7 +122,7 @@ class MN:Shell from G:Object
g_object_connect(self->mailboxes,
"signal::messages-changed", self_messages_changed_h, self,
"signal::mailbox-removed", self_mailbox_removed_h, self,
- "swapped-signal::notify::poll", self_update_sensitivity, self,
+ "swapped-signal::notify::manually-checkable", self_update_sensitivity, self,
"swapped-signal::list-changed", self_update_tooltip, self,
"swapped-signal::list-changed", self_update_icon, self,
"swapped-signal::error-changed", self_update_tooltip, self,
@@ -92,13 +130,100 @@ class MN:Shell from G:Object
NULL);
self->popups = mn_popups_new();
+ eel_add_weak_pointer(&self->popups);
+
+ /*
+ * Exit cleanly (by unreferencing our components) when receiving a
+ * UNIX signal.
+ */
+ for (i = 0; i < G_N_ELEMENTS(unix_quit_signals); i++)
+ signal(unix_quit_signals[i].num, self_unix_quit_signal_handler);
}
override (G:Object) void
- finalize (GObject *object)
+ dispose (GObject *object)
+ {
+ Self *self = SELF(object);
+
+ /*
+ * We explicitly unreference or destroy each component, even
+ * though MN will exit after the shell is finalized. This is done
+ * for the sake of respecting encapsulation: we should not know
+ * whether a particular component has something to do on exit or
+ * not (for instance, MNSoundPlayer must kill the play process).
+ *
+ * Of course, the order in which we get rid of the components
+ * matters: for instance, when destroyed, MNPropertiesDialog might
+ * remove the test mailbox and thus requires a valid MNMailboxes
+ * object. We destroy the components in the inverse order of their
+ * creation.
+ *
+ * Also note that we do not need to nullify the pointers after
+ * destruction since we use eel_add_weak_pointer() at creation
+ * time.
+ */
+
+ g_slist_foreach(selfp->mailbox_properties_dialogs, (GFunc) gtk_widget_destroy, NULL);
+ /* the list is freed in mailbox_properties_dialog_weak_notify_cb() */
+
+ if (selfp->properties_dialog)
+ gtk_widget_destroy(selfp->properties_dialog);
+
+ if (selfp->about_dialog)
+ gtk_widget_destroy(selfp->about_dialog);
+
+ mn_g_object_null_unref(self->popups);
+
+ if (self->icon)
+ {
+ /* do not recreate the icon after we destroy it */
+ g_signal_handlers_disconnect_by_func(self->icon, self_icon_destroy_h, self);
+ gtk_widget_destroy(GTK_WIDGET(self->icon));
+ }
+
+ mn_g_object_null_unref(self->mailboxes);
+
+ mn_g_object_null_unref(selfp->sound_player);
+
+ PARENT_HANDLER(object);
+ }
+
+ private const UnixSignalInfo *
+ lookup_unix_quit_signal (int signum)
+ {
+ int i;
+
+ for (i = 0; i < G_N_ELEMENTS(unix_quit_signals); i++)
+ if (unix_quit_signals[i].num == signum)
+ return &unix_quit_signals[i];
+
+ g_assert_not_reached();
+ return NULL;
+ }
+
+ private void
+ unix_quit_signal_handler (int signum)
+ {
+ int i;
+ const UnixSignalInfo *info;
+
+ /*
+ * Uninstall signal handlers, in case another signal is received
+ * while we are quitting.
+ */
+ for (i = 0; i < G_N_ELEMENTS(unix_quit_signals); i++)
+ signal(unix_quit_signals[i].num, SIG_DFL);
+
+ info = self_lookup_unix_quit_signal(signum);
+
+ g_message(_("received %s signal, exiting"), info->name);
+ self_quit(mn_shell);
+ }
+
+ private void
+ weak_notify_cb (gpointer data, GObject *former_object)
{
gtk_main_quit();
- PARENT_HANDLER(object);
}
private void
@@ -113,6 +238,8 @@ class MN:Shell from G:Object
if (has_new)
{
+ self_play_new_mail_sound(self);
+
if (mn_conf_has_command(MN_CONF_COMMANDS_NEW_MAIL_NAMESPACE))
mn_conf_execute_command(MN_CONF_COMMANDS_NEW_MAIL_COMMAND);
}
@@ -123,6 +250,22 @@ class MN:Shell from G:Object
}
private void
+ play_new_mail_sound (self)
+ {
+ char *file;
+
+ if (! eel_gconf_get_boolean(MN_CONF_SOUNDS_NEW_MAIL_ENABLED))
+ return;
+
+ file = eel_gconf_get_string(MN_CONF_SOUNDS_NEW_MAIL_FILE);
+
+ if (file && *file)
+ mn_sound_player_play(selfp->sound_player, file, NULL);
+
+ g_free(file);
+ }
+
+ private void
mailbox_removed_h (MNMailboxes *mailboxes,
MNMailbox *mailbox,
gpointer user_data)
@@ -140,16 +283,18 @@ class MN:Shell from G:Object
init_icon (self)
{
self->icon = MN_MAIL_ICON(mn_mail_icon_new());
+ eel_add_weak_pointer(&self->icon);
g_object_connect(self->icon,
"signal::activate", self_icon_activate_h, self,
"signal::activate-mail-reader", self_icon_activate_mail_reader_h, self,
"signal::activate-open-latest-message", self_icon_activate_open_latest_message_h, self,
- "signal::activate-update", self_icon_activate_update_h, self,
+ "swapped-signal::activate-consider-new-mail-as-read", self_consider_new_mail_as_read, self,
+ "swapped-signal::activate-update", self_update, self,
"signal::activate-properties", self_icon_activate_properties_h, self,
"signal::activate-help", self_icon_activate_help_h, self,
"signal::activate-about", self_icon_activate_about_h, self,
- "signal::activate-remove", self_icon_activate_remove_h, self,
+ "swapped-signal::activate-remove", self_quit, self,
"signal::destroy", self_icon_destroy_h, self,
NULL);
@@ -159,21 +304,10 @@ class MN:Shell from G:Object
}
private void
- notify_blink_on_errors_cb (GConfClient *client,
- unsigned int cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
- {
- Self *self = user_data;
-
- self_update_icon(self);
- }
-
- private void
- notify_always_display_icon_cb (GConfClient *client,
- unsigned int cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
+ notify_icon_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
Self *self = user_data;
@@ -212,10 +346,6 @@ class MN:Shell from G:Object
switch (action)
{
- case MN_ACTION_DISPLAY_PROPERTIES_DIALOG:
- self_display_properties_dialog(self);
- break;
-
case MN_ACTION_LAUNCH_MAIL_READER:
if (mn_conf_has_command(MN_CONF_GNOME_MAIL_READER_NAMESPACE))
mn_conf_execute_mail_reader();
@@ -243,6 +373,10 @@ class MN:Shell from G:Object
_("You have no new mail."));
break;
+ case MN_ACTION_CONSIDER_NEW_MAIL_AS_READ:
+ self_consider_new_mail_as_read(self);
+ break;
+
case MN_ACTION_UPDATE_MAIL_STATUS:
mn_mailboxes_check(self->mailboxes);
break;
@@ -266,17 +400,10 @@ class MN:Shell from G:Object
}
private void
- icon_activate_update_h (MNMailIcon *icon, gpointer user_data)
- {
- Self *self = user_data;
- mn_mailboxes_check(self->mailboxes);
- }
-
- private void
icon_activate_properties_h (MNMailIcon *icon, gpointer user_data)
{
Self *self = user_data;
- self_display_properties_dialog(self);
+ self_display_properties_dialog(self, gtk_get_current_event_time());
}
private void
@@ -289,14 +416,7 @@ class MN:Shell from G:Object
icon_activate_about_h (MNMailIcon *icon, gpointer user_data)
{
Self *self = user_data;
- self_display_about_dialog(self);
- }
-
- private void
- icon_activate_remove_h (MNMailIcon *icon, gpointer user_data)
- {
- Self *self = user_data;
- g_object_unref(self);
+ self_display_about_dialog(self, gtk_get_current_event_time());
}
private void
@@ -313,7 +433,8 @@ class MN:Shell from G:Object
{
gtk_widget_set_sensitive(self->icon->mail_reader_item, mn_conf_has_command(MN_CONF_GNOME_MAIL_READER_NAMESPACE));
gtk_widget_set_sensitive(self->icon->open_latest_message_item, self->mailboxes->messages && mn_message_can_open(self->mailboxes->messages->data));
- gtk_widget_set_sensitive(self->icon->update_item, mn_mailboxes_get_poll(self->mailboxes));
+ gtk_widget_set_sensitive(self->icon->consider_new_mail_as_read_item, self->mailboxes->messages != NULL);
+ gtk_widget_set_sensitive(self->icon->update_item, mn_mailboxes_get_manually_checkable(self->mailboxes));
}
private void
@@ -343,15 +464,23 @@ class MN:Shell from G:Object
if (has_new || blink || always)
{
- mn_blinking_image_set_from_stock(MN_BLINKING_IMAGE(self->icon->image),
- has_new ? MN_STOCK_MAIL : MN_STOCK_NO_MAIL,
- GTK_ICON_SIZE_LARGE_TOOLBAR);
- mn_blinking_image_set_blinking(MN_BLINKING_IMAGE(self->icon->image),
- blink);
+ int count;
+
+ if (eel_gconf_get_boolean(MN_CONF_DISPLAY_MESSAGE_COUNT))
+ count = g_slist_length(self->mailboxes->messages);
+ else
+ count = 0;
+
+ mn_mail_icon_set_from_stock(self->icon, has_new ? MN_STOCK_MAIL : MN_STOCK_NO_MAIL);
+ mn_mail_icon_set_blinking(self->icon, blink);
+ mn_mail_icon_set_count(self->icon, count);
gtk_widget_show(GTK_WIDGET(self->icon));
}
else
- gtk_widget_hide(GTK_WIDGET(self->icon));
+ {
+ gtk_widget_hide(GTK_WIDGET(self->icon));
+ mn_mail_icon_set_blinking(self->icon, FALSE);
+ }
}
private void
@@ -385,12 +514,12 @@ class MN:Shell from G:Object
{
MNMailbox *mailbox = lb->data;
+ g_assert(mailbox->n_messages > 0);
+
if (*string->str)
g_string_append_c(string, '\n');
- g_string_append(string, mailbox->runtime_name);
- if (mailbox->n_messages > 0)
- g_string_append_printf(string, " (%i)", mailbox->n_messages);
+ g_string_append_printf(string, _("%s (%i)"), mailbox->runtime_name, mailbox->n_messages);
}
g_slist_free(new_mailboxes);
@@ -409,7 +538,7 @@ class MN:Shell from G:Object
if (*string->str)
g_string_append_c(string, '\n');
- g_string_append_printf(string, "%s: %s", mailbox->runtime_name, mailbox->error);
+ g_string_append_printf(string, _("%s: %s"), mailbox->runtime_name, mailbox->error);
}
g_slist_free(error_mailboxes);
@@ -543,25 +672,53 @@ class MN:Shell from G:Object
}
public void
- display_properties_dialog (self)
+ consider_new_mail_as_read (self)
{
- self_display_window(self, MN_TYPE_PROPERTIES_DIALOG, &selfp->properties_dialog);
+ GList *l;
+
+ MN_LIST_FOREACH(l, self->mailboxes->list)
+ {
+ MNMailbox *mailbox = l->data;
+ mn_mailbox_consider_as_read_list(mailbox->messages);
+ }
}
public void
- display_about_dialog (self)
+ update (self)
{
- self_display_window(self, MN_TYPE_ABOUT_DIALOG, &selfp->about_dialog);
+ mn_mailboxes_check(self->mailboxes);
+ }
+
+ public void
+ quit (self)
+ {
+ g_object_unref(self);
+ }
+
+ public void
+ display_properties_dialog (self, guint32 timestamp)
+ {
+ self_display_window(self, MN_TYPE_PROPERTIES_DIALOG, &selfp->properties_dialog, timestamp);
+ }
+
+ public void
+ display_about_dialog (self, guint32 timestamp)
+ {
+ self_display_window(self, MN_TYPE_ABOUT_DIALOG, &selfp->about_dialog, timestamp);
}
private void
display_window (self,
GType type (check != 0),
- GtkWidget **ptr (check null))
+ GtkWidget **ptr (check null),
+ guint32 timestamp)
{
if (*ptr)
{
- gtk_window_present(GTK_WINDOW(*ptr));
+ if (timestamp)
+ gtk_window_present_with_time(GTK_WINDOW(*ptr), timestamp);
+ else
+ gtk_window_present(GTK_WINDOW(*ptr));
return;
}
@@ -654,9 +811,9 @@ extern MNShell *mn_shell;
enum MN_ACTION
{
- DISPLAY_PROPERTIES_DIALOG,
LAUNCH_MAIL_READER,
OPEN_LATEST_MESSAGE,
+ CONSIDER_NEW_MAIL_AS_READ,
UPDATE_MAIL_STATUS
} MN:Action;
diff --git a/src/mn-shell.h b/src/mn-shell.h
@@ -72,8 +72,13 @@ struct _MNShellClass {
*/
GType mn_shell_get_type (void);
MNShell * mn_shell_new (void);
-void mn_shell_display_properties_dialog (MNShell * self);
-void mn_shell_display_about_dialog (MNShell * self);
+void mn_shell_consider_new_mail_as_read (MNShell * self);
+void mn_shell_update (MNShell * self);
+void mn_shell_quit (MNShell * self);
+void mn_shell_display_properties_dialog (MNShell * self,
+ guint32 timestamp);
+void mn_shell_display_about_dialog (MNShell * self,
+ guint32 timestamp);
void mn_shell_add_mailbox_properties_dialog (MNShell * self,
MNMailboxPropertiesDialog * dialog);
MNMailboxPropertiesDialog * mn_shell_get_mailbox_properties_dialog (MNShell * self,
@@ -85,9 +90,9 @@ extern MNShell *mn_shell;
typedef enum {
- MN_ACTION_DISPLAY_PROPERTIES_DIALOG,
MN_ACTION_LAUNCH_MAIL_READER,
MN_ACTION_OPEN_LATEST_MESSAGE,
+ MN_ACTION_CONSIDER_NEW_MAIL_AS_READ,
MN_ACTION_UPDATE_MAIL_STATUS
} MNAction;
#define MN_TYPE_ACTION mn_action_get_type()
diff --git a/src/mn-sound-file-chooser-dialog-private.h b/src/mn-sound-file-chooser-dialog-private.h
@@ -0,0 +1,28 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_SOUND_FILE_CHOOSER_DIALOG_PRIVATE_H__
+#define __MN_SOUND_FILE_CHOOSER_DIALOG_PRIVATE_H__
+
+#include "mn-sound-file-chooser-dialog.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#line 26 "mn-sound-file-chooser-dialog.gob"
+
+#include "mn-sound-player.h"
+
+#line 18 "mn-sound-file-chooser-dialog-private.h"
+struct _MNSoundFileChooserDialogPrivate {
+#line 43 "mn-sound-file-chooser-dialog.gob"
+ MNSoundPlayer * sound_player;
+#line 22 "mn-sound-file-chooser-dialog-private.h"
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-sound-file-chooser-dialog.c b/src/mn-sound-file-chooser-dialog.c
@@ -0,0 +1,312 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-sound-file-chooser-dialog.h"
+
+#include "mn-sound-file-chooser-dialog-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 30 "mn-sound-file-chooser-dialog.gob"
+
+#include "config.h"
+#include <glib/gi18n.h>
+
+enum
+{
+ RESPONSE_PLAY = 1,
+ RESPONSE_STOP
+};
+
+#line 37 "mn-sound-file-chooser-dialog.c"
+/* self casting macros */
+#define SELF(x) MN_SOUND_FILE_CHOOSER_DIALOG(x)
+#define SELF_CONST(x) MN_SOUND_FILE_CHOOSER_DIALOG_CONST(x)
+#define IS_SELF(x) MN_IS_SOUND_FILE_CHOOSER_DIALOG(x)
+#define TYPE_SELF MN_TYPE_SOUND_FILE_CHOOSER_DIALOG
+#define SELF_CLASS(x) MN_SOUND_FILE_CHOOSER_DIALOG_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_SOUND_FILE_CHOOSER_DIALOG_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNSoundFileChooserDialog Self;
+typedef MNSoundFileChooserDialogClass SelfClass;
+
+/* here are local prototypes */
+static void mn_sound_file_chooser_dialog_init (MNSoundFileChooserDialog * o) G_GNUC_UNUSED;
+static void mn_sound_file_chooser_dialog_class_init (MNSoundFileChooserDialogClass * c) G_GNUC_UNUSED;
+static GObject * ___1_mn_sound_file_chooser_dialog_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static void mn_sound_file_chooser_dialog_response_h (GtkDialog * dialog, int response, gpointer user_data) G_GNUC_UNUSED;
+static void mn_sound_file_chooser_dialog_update_sensitivity (MNSoundFileChooserDialog * self) G_GNUC_UNUSED;
+static gboolean mn_sound_file_chooser_dialog_has_selected_file (MNSoundFileChooserDialog * self) G_GNUC_UNUSED;
+
+/* pointer to the class of our parent */
+static GtkFileChooserDialogClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_response_h mn_sound_file_chooser_dialog_response_h
+#define self_update_sensitivity mn_sound_file_chooser_dialog_update_sensitivity
+#define self_has_selected_file mn_sound_file_chooser_dialog_has_selected_file
+#define self_new mn_sound_file_chooser_dialog_new
+GType
+mn_sound_file_chooser_dialog_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNSoundFileChooserDialogClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_sound_file_chooser_dialog_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNSoundFileChooserDialog),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_sound_file_chooser_dialog_init,
+ NULL
+ };
+
+ type = g_type_register_static (GTK_TYPE_FILE_CHOOSER_DIALOG, "MNSoundFileChooserDialog", &info, (GTypeFlags)0);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNSoundFileChooserDialog *)g_object_new(mn_sound_file_chooser_dialog_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNSoundFileChooserDialog * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNSoundFileChooserDialog *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNSoundFileChooserDialog *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNSoundFileChooserDialog *)g_object_new_valist (mn_sound_file_chooser_dialog_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+
+static void
+___dispose (GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::dispose"
+ MNSoundFileChooserDialog *self G_GNUC_UNUSED = MN_SOUND_FILE_CHOOSER_DIALOG (obj_self);
+ if (G_OBJECT_CLASS (parent_class)->dispose) \
+ (* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
+#line 43 "mn-sound-file-chooser-dialog.gob"
+ if(self->_priv->sound_player) { g_object_unref ((gpointer) self->_priv->sound_player); self->_priv->sound_player = NULL; }
+#line 119 "mn-sound-file-chooser-dialog.c"
+}
+#undef __GOB_FUNCTION__
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::finalize"
+ MNSoundFileChooserDialog *self G_GNUC_UNUSED = MN_SOUND_FILE_CHOOSER_DIALOG (obj_self);
+ gpointer priv G_GNUC_UNUSED = self->_priv;
+ if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
+}
+#undef __GOB_FUNCTION__
+
+static void
+mn_sound_file_chooser_dialog_init (MNSoundFileChooserDialog * o G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::init"
+ o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_SOUND_FILE_CHOOSER_DIALOG,MNSoundFileChooserDialogPrivate);
+}
+#undef __GOB_FUNCTION__
+static void
+mn_sound_file_chooser_dialog_class_init (MNSoundFileChooserDialogClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::class_init"
+ GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+
+ g_type_class_add_private(c,sizeof(MNSoundFileChooserDialogPrivate));
+
+ parent_class = g_type_class_ref (GTK_TYPE_FILE_CHOOSER_DIALOG);
+
+#line 45 "mn-sound-file-chooser-dialog.gob"
+ g_object_class->constructor = ___1_mn_sound_file_chooser_dialog_constructor;
+#line 154 "mn-sound-file-chooser-dialog.c"
+ g_object_class->dispose = ___dispose;
+ g_object_class->finalize = ___finalize;
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 45 "mn-sound-file-chooser-dialog.gob"
+static GObject *
+___1_mn_sound_file_chooser_dialog_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
+#line 165 "mn-sound-file-chooser-dialog.c"
+#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
+ ((G_OBJECT_CLASS(parent_class)->constructor)? \
+ (* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
+ ((GObject * )0))
+{
+#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::constructor"
+{
+#line 47 "mn-sound-file-chooser-dialog.gob"
+
+ GObject *object = PARENT_HANDLER(type, n_construct_properties, construct_params);
+ Self *self = SELF(object);
+ GtkFileFilter *filter;
+
+ selfp->sound_player = mn_sound_player_new();
+
+ gtk_window_set_title(GTK_WINDOW(self), _("Select a File"));
+
+ gtk_dialog_add_buttons(GTK_DIALOG(self),
+ GTK_STOCK_MEDIA_PLAY, RESPONSE_PLAY,
+ GTK_STOCK_MEDIA_STOP, RESPONSE_STOP,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+ NULL);
+
+ filter = gtk_file_filter_new();
+ gtk_file_filter_set_name(filter, _("All files"));
+ gtk_file_filter_add_pattern(filter, "*");
+ gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(self), filter);
+
+ filter = gtk_file_filter_new();
+ gtk_file_filter_set_name(filter, _("Audio files"));
+ gtk_file_filter_add_mime_type(filter, "audio/*");
+ gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(self), filter);
+ gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(self), filter);
+
+ g_object_connect(self,
+ "signal::response", self_response_h, NULL,
+ "signal::selection-changed", self_update_sensitivity, NULL,
+ NULL);
+
+ g_object_connect(selfp->sound_player,
+ "swapped-signal::notify::can-play", self_update_sensitivity, self,
+ "swapped-signal::notify::can-stop", self_update_sensitivity, self,
+ NULL);
+
+ self_update_sensitivity(self);
+
+ return object;
+ }}
+#line 215 "mn-sound-file-chooser-dialog.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 89 "mn-sound-file-chooser-dialog.gob"
+static void
+mn_sound_file_chooser_dialog_response_h (GtkDialog * dialog, int response, gpointer user_data)
+#line 222 "mn-sound-file-chooser-dialog.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::response_h"
+{
+#line 91 "mn-sound-file-chooser-dialog.gob"
+
+ Self *self = SELF(dialog);
+
+ if (response == RESPONSE_PLAY)
+ {
+ char *filename;
+
+ filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+ if (filename)
+ {
+ mn_sound_player_play(selfp->sound_player, filename, GTK_WINDOW(dialog));
+ g_free(filename);
+ }
+ }
+ else if (response == RESPONSE_STOP)
+ mn_sound_player_stop(selfp->sound_player);
+ else
+ return;
+
+ /*
+ * Do not pass our internal responses to client code and do not
+ * let the dialog be destroyed.
+ */
+ g_signal_stop_emission_by_name(dialog, "response");
+ }}
+#line 252 "mn-sound-file-chooser-dialog.c"
+#undef __GOB_FUNCTION__
+
+#line 117 "mn-sound-file-chooser-dialog.gob"
+static void
+mn_sound_file_chooser_dialog_update_sensitivity (MNSoundFileChooserDialog * self)
+#line 258 "mn-sound-file-chooser-dialog.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::update_sensitivity"
+#line 117 "mn-sound-file-chooser-dialog.gob"
+ g_return_if_fail (self != NULL);
+#line 117 "mn-sound-file-chooser-dialog.gob"
+ g_return_if_fail (MN_IS_SOUND_FILE_CHOOSER_DIALOG (self));
+#line 265 "mn-sound-file-chooser-dialog.c"
+{
+#line 119 "mn-sound-file-chooser-dialog.gob"
+
+ gtk_dialog_set_response_sensitive(GTK_DIALOG(self), RESPONSE_PLAY, self_has_selected_file(self) && mn_sound_player_get_can_play(selfp->sound_player));
+ gtk_dialog_set_response_sensitive(GTK_DIALOG(self), RESPONSE_STOP, mn_sound_player_get_can_stop(selfp->sound_player));
+ }}
+#line 272 "mn-sound-file-chooser-dialog.c"
+#undef __GOB_FUNCTION__
+
+#line 124 "mn-sound-file-chooser-dialog.gob"
+static gboolean
+mn_sound_file_chooser_dialog_has_selected_file (MNSoundFileChooserDialog * self)
+#line 278 "mn-sound-file-chooser-dialog.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::has_selected_file"
+#line 124 "mn-sound-file-chooser-dialog.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 124 "mn-sound-file-chooser-dialog.gob"
+ g_return_val_if_fail (MN_IS_SOUND_FILE_CHOOSER_DIALOG (self), (gboolean )0);
+#line 285 "mn-sound-file-chooser-dialog.c"
+{
+#line 126 "mn-sound-file-chooser-dialog.gob"
+
+ char *filename;
+ gboolean has;
+
+ filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(self));
+ has = filename && ! g_file_test(filename, G_FILE_TEST_IS_DIR);
+ g_free(filename);
+
+ return has;
+ }}
+#line 298 "mn-sound-file-chooser-dialog.c"
+#undef __GOB_FUNCTION__
+
+#line 137 "mn-sound-file-chooser-dialog.gob"
+GtkWidget *
+mn_sound_file_chooser_dialog_new (void)
+#line 304 "mn-sound-file-chooser-dialog.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:File:Chooser:Dialog::new"
+{
+#line 139 "mn-sound-file-chooser-dialog.gob"
+
+ return GTK_WIDGET(GET_NEW);
+ }}
+#line 312 "mn-sound-file-chooser-dialog.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-sound-file-chooser-dialog.gob b/src/mn-sound-file-chooser-dialog.gob
@@ -0,0 +1,142 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%headertop{
+#include <gtk/gtk.h>
+%}
+
+%privateheader{
+#include "mn-sound-player.h"
+%}
+
+%{
+#include "config.h"
+#include <glib/gi18n.h>
+
+enum
+{
+ RESPONSE_PLAY = 1,
+ RESPONSE_STOP
+};
+%}
+
+class MN:Sound:File:Chooser:Dialog from Gtk:File:Chooser:Dialog
+{
+ private MNSoundPlayer *sound_player unrefwith g_object_unref;
+
+ override (G:Object) GObject *
+ constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
+ {
+ GObject *object = PARENT_HANDLER(type, n_construct_properties, construct_params);
+ Self *self = SELF(object);
+ GtkFileFilter *filter;
+
+ selfp->sound_player = mn_sound_player_new();
+
+ gtk_window_set_title(GTK_WINDOW(self), _("Select a File"));
+
+ gtk_dialog_add_buttons(GTK_DIALOG(self),
+ GTK_STOCK_MEDIA_PLAY, RESPONSE_PLAY,
+ GTK_STOCK_MEDIA_STOP, RESPONSE_STOP,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+ NULL);
+
+ filter = gtk_file_filter_new();
+ gtk_file_filter_set_name(filter, _("All files"));
+ gtk_file_filter_add_pattern(filter, "*");
+ gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(self), filter);
+
+ filter = gtk_file_filter_new();
+ gtk_file_filter_set_name(filter, _("Audio files"));
+ gtk_file_filter_add_mime_type(filter, "audio/*");
+ gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(self), filter);
+ gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(self), filter);
+
+ g_object_connect(self,
+ "signal::response", self_response_h, NULL,
+ "signal::selection-changed", self_update_sensitivity, NULL,
+ NULL);
+
+ g_object_connect(selfp->sound_player,
+ "swapped-signal::notify::can-play", self_update_sensitivity, self,
+ "swapped-signal::notify::can-stop", self_update_sensitivity, self,
+ NULL);
+
+ self_update_sensitivity(self);
+
+ return object;
+ }
+
+ private void
+ response_h (GtkDialog *dialog, int response, gpointer user_data)
+ {
+ Self *self = SELF(dialog);
+
+ if (response == RESPONSE_PLAY)
+ {
+ char *filename;
+
+ filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+ if (filename)
+ {
+ mn_sound_player_play(selfp->sound_player, filename, GTK_WINDOW(dialog));
+ g_free(filename);
+ }
+ }
+ else if (response == RESPONSE_STOP)
+ mn_sound_player_stop(selfp->sound_player);
+ else
+ return;
+
+ /*
+ * Do not pass our internal responses to client code and do not
+ * let the dialog be destroyed.
+ */
+ g_signal_stop_emission_by_name(dialog, "response");
+ }
+
+ private void
+ update_sensitivity (self)
+ {
+ gtk_dialog_set_response_sensitive(GTK_DIALOG(self), RESPONSE_PLAY, self_has_selected_file(self) && mn_sound_player_get_can_play(selfp->sound_player));
+ gtk_dialog_set_response_sensitive(GTK_DIALOG(self), RESPONSE_STOP, mn_sound_player_get_can_stop(selfp->sound_player));
+ }
+
+ private gboolean
+ has_selected_file (self)
+ {
+ char *filename;
+ gboolean has;
+
+ filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(self));
+ has = filename && ! g_file_test(filename, G_FILE_TEST_IS_DIR);
+ g_free(filename);
+
+ return has;
+ }
+
+ public GtkWidget *
+ new (void)
+ {
+ return GTK_WIDGET(GET_NEW);
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-sound-file-chooser-dialog.gob.stamp
diff --git a/src/mn-sound-file-chooser-dialog.h b/src/mn-sound-file-chooser-dialog.h
@@ -0,0 +1,63 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include <gtk/gtk.h>
+
+#ifndef __MN_SOUND_FILE_CHOOSER_DIALOG_H__
+#define __MN_SOUND_FILE_CHOOSER_DIALOG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_SOUND_FILE_CHOOSER_DIALOG (mn_sound_file_chooser_dialog_get_type())
+#define MN_SOUND_FILE_CHOOSER_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sound_file_chooser_dialog_get_type(), MNSoundFileChooserDialog)
+#define MN_SOUND_FILE_CHOOSER_DIALOG_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sound_file_chooser_dialog_get_type(), MNSoundFileChooserDialog const)
+#define MN_SOUND_FILE_CHOOSER_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_sound_file_chooser_dialog_get_type(), MNSoundFileChooserDialogClass)
+#define MN_IS_SOUND_FILE_CHOOSER_DIALOG(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_sound_file_chooser_dialog_get_type ())
+
+#define MN_SOUND_FILE_CHOOSER_DIALOG_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_sound_file_chooser_dialog_get_type(), MNSoundFileChooserDialogClass)
+
+/* Private structure type */
+typedef struct _MNSoundFileChooserDialogPrivate MNSoundFileChooserDialogPrivate;
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_SOUND_FILE_CHOOSER_DIALOG__
+#define __TYPEDEF_MN_SOUND_FILE_CHOOSER_DIALOG__
+typedef struct _MNSoundFileChooserDialog MNSoundFileChooserDialog;
+#endif
+struct _MNSoundFileChooserDialog {
+ GtkFileChooserDialog __parent__;
+ /*< private >*/
+ MNSoundFileChooserDialogPrivate *_priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNSoundFileChooserDialogClass MNSoundFileChooserDialogClass;
+struct _MNSoundFileChooserDialogClass {
+ GtkFileChooserDialogClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_sound_file_chooser_dialog_get_type (void);
+GtkWidget * mn_sound_file_chooser_dialog_new (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-sound-player-private.h b/src/mn-sound-player-private.h
@@ -0,0 +1,26 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_SOUND_PLAYER_PRIVATE_H__
+#define __MN_SOUND_PLAYER_PRIVATE_H__
+
+#include "mn-sound-player.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+struct _MNSoundPlayerPrivate {
+#line 38 "mn-sound-player.gob"
+ gboolean can_play;
+#line 51 "mn-sound-player.gob"
+ GPid pid;
+#line 52 "mn-sound-player.gob"
+ GSource * watch_source;
+#line 20 "mn-sound-player-private.h"
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-sound-player.c b/src/mn-sound-player.c
@@ -0,0 +1,567 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-sound-player.h"
+
+#include "mn-sound-player-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 26 "mn-sound-player.gob"
+
+#include "config.h"
+#include <sys/types.h>
+#include <signal.h>
+#include <glib/gi18n.h>
+#include <gnome.h>
+#include "mn-conf.h"
+#include "mn-locked-callback.h"
+
+#line 36 "mn-sound-player.c"
+/* self casting macros */
+#define SELF(x) MN_SOUND_PLAYER(x)
+#define SELF_CONST(x) MN_SOUND_PLAYER_CONST(x)
+#define IS_SELF(x) MN_IS_SOUND_PLAYER(x)
+#define TYPE_SELF MN_TYPE_SOUND_PLAYER
+#define SELF_CLASS(x) MN_SOUND_PLAYER_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_SOUND_PLAYER_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNSoundPlayer Self;
+typedef MNSoundPlayerClass SelfClass;
+
+/* here are local prototypes */
+static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void mn_sound_player_class_init (MNSoundPlayerClass * c) G_GNUC_UNUSED;
+static void mn_sound_player_init (MNSoundPlayer * self) G_GNUC_UNUSED;
+static void ___4_mn_sound_player_dispose (GObject * object) G_GNUC_UNUSED;
+static void mn_sound_player_notify_play_command_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data) G_GNUC_UNUSED;
+static gboolean mn_sound_player_can_play (MNSoundPlayer * self) G_GNUC_UNUSED;
+static gboolean mn_sound_player_subst_cb (const char * name, char ** value, gpointer data) G_GNUC_UNUSED;
+static void mn_sound_player_stop_real (MNSoundPlayer * self, gboolean notify_can_stop) G_GNUC_UNUSED;
+static void mn_sound_player_watch_abandoned_cb (GPid pid, int status, gpointer data) G_GNUC_UNUSED;
+static void mn_sound_player_watch_cb (GPid pid, int status, gpointer data) G_GNUC_UNUSED;
+
+enum {
+ PROP_0,
+ PROP_CAN_PLAY,
+ PROP_CAN_STOP
+};
+
+/* pointer to the class of our parent */
+static GObjectClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_get_can_play mn_sound_player_get_can_play
+#define self_get_can_stop mn_sound_player_get_can_stop
+#define self_notify_play_command_cb mn_sound_player_notify_play_command_cb
+#define self_can_play mn_sound_player_can_play
+#define self_play mn_sound_player_play
+#define self_subst_cb mn_sound_player_subst_cb
+#define self_stop mn_sound_player_stop
+#define self_stop_real mn_sound_player_stop_real
+#define self_watch_abandoned_cb mn_sound_player_watch_abandoned_cb
+#define self_watch_cb mn_sound_player_watch_cb
+#define self_new mn_sound_player_new
+GType
+mn_sound_player_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNSoundPlayerClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_sound_player_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNSoundPlayer),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_sound_player_init,
+ NULL
+ };
+
+ type = g_type_register_static (G_TYPE_OBJECT, "MNSoundPlayer", &info, (GTypeFlags)0);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNSoundPlayer *)g_object_new(mn_sound_player_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNSoundPlayer * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNSoundPlayer *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNSoundPlayer *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNSoundPlayer *)g_object_new_valist (mn_sound_player_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::finalize"
+ MNSoundPlayer *self G_GNUC_UNUSED = MN_SOUND_PLAYER (obj_self);
+ gpointer priv G_GNUC_UNUSED = self->_priv;
+ if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
+}
+#undef __GOB_FUNCTION__
+
+static void
+mn_sound_player_class_init (MNSoundPlayerClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::class_init"
+ GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+
+ g_type_class_add_private(c,sizeof(MNSoundPlayerPrivate));
+
+ parent_class = g_type_class_ref (G_TYPE_OBJECT);
+
+#line 64 "mn-sound-player.gob"
+ g_object_class->dispose = ___4_mn_sound_player_dispose;
+#line 149 "mn-sound-player.c"
+ g_object_class->finalize = ___finalize;
+ g_object_class->get_property = ___object_get_property;
+ {
+ GParamSpec *param_spec;
+
+ param_spec = g_param_spec_boolean
+ ("can_play" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ FALSE /* default_value */,
+ (GParamFlags)(G_PARAM_READABLE));
+ g_object_class_install_property (g_object_class,
+ PROP_CAN_PLAY,
+ param_spec);
+ param_spec = g_param_spec_boolean
+ ("can_stop" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ FALSE /* default_value */,
+ (GParamFlags)(G_PARAM_READABLE));
+ g_object_class_install_property (g_object_class,
+ PROP_CAN_STOP,
+ param_spec);
+ }
+}
+#undef __GOB_FUNCTION__
+#line 54 "mn-sound-player.gob"
+static void
+mn_sound_player_init (MNSoundPlayer * self G_GNUC_UNUSED)
+#line 179 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::init"
+ self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_SOUND_PLAYER,MNSoundPlayerPrivate);
+ {
+#line 55 "mn-sound-player.gob"
+
+ selfp->can_play = self_can_play(self);
+
+ mn_g_object_gconf_notification_add_gdk_locked(self,
+ MN_CONF_SOUNDS_PLAY_COMMAND,
+ self_notify_play_command_cb,
+ self);
+
+#line 193 "mn-sound-player.c"
+ }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_get_property (GObject *object,
+ guint property_id,
+ GValue *VAL G_GNUC_UNUSED,
+ GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Sound:Player::get_property"
+{
+ MNSoundPlayer *self G_GNUC_UNUSED;
+
+ self = MN_SOUND_PLAYER (object);
+
+ switch (property_id) {
+ case PROP_CAN_PLAY:
+ {
+#line 41 "mn-sound-player.gob"
+
+ g_value_set_boolean(VAL, selfp->can_play);
+
+#line 216 "mn-sound-player.c"
+ }
+ break;
+ case PROP_CAN_STOP:
+ {
+#line 47 "mn-sound-player.gob"
+
+ g_value_set_boolean(VAL, selfp->pid != 0);
+
+#line 225 "mn-sound-player.c"
+ }
+ break;
+ default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+# undef G_STRLOC
+# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+#undef __GOB_FUNCTION__
+
+
+#line 41 "mn-sound-player.gob"
+gboolean
+mn_sound_player_get_can_play (MNSoundPlayer * self)
+#line 244 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::get_can_play"
+{
+#line 39 "mn-sound-player.gob"
+ gboolean val; g_object_get (G_OBJECT (self), "can_play", &val, NULL); return val;
+}}
+#line 251 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
+
+#line 47 "mn-sound-player.gob"
+gboolean
+mn_sound_player_get_can_stop (MNSoundPlayer * self)
+#line 257 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::get_can_stop"
+{
+#line 45 "mn-sound-player.gob"
+ gboolean val; g_object_get (G_OBJECT (self), "can_stop", &val, NULL); return val;
+}}
+#line 264 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
+
+
+#line 64 "mn-sound-player.gob"
+static void
+___4_mn_sound_player_dispose (GObject * object G_GNUC_UNUSED)
+#line 271 "mn-sound-player.c"
+#define PARENT_HANDLER(___object) \
+ { if(G_OBJECT_CLASS(parent_class)->dispose) \
+ (* G_OBJECT_CLASS(parent_class)->dispose)(___object); }
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::dispose"
+{
+#line 66 "mn-sound-player.gob"
+
+ Self *self = SELF(object);
+
+ /* do not emit notify::can-stop at finalization time (pass FALSE) */
+ self_stop_real(self, FALSE);
+
+ PARENT_HANDLER(object);
+ }}
+#line 287 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 75 "mn-sound-player.gob"
+static void
+mn_sound_player_notify_play_command_cb (GConfClient * client, unsigned int cnxn_id, GConfEntry * entry, gpointer user_data)
+#line 294 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::notify_play_command_cb"
+{
+#line 80 "mn-sound-player.gob"
+
+ Self *self = user_data;
+ gboolean can_play;
+
+ can_play = self_can_play(self);
+ if (can_play != selfp->can_play)
+ {
+ selfp->can_play = can_play;
+ g_object_notify(G_OBJECT(self), "can-play");
+ }
+ }}
+#line 310 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
+
+#line 92 "mn-sound-player.gob"
+static gboolean
+mn_sound_player_can_play (MNSoundPlayer * self)
+#line 316 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::can_play"
+#line 92 "mn-sound-player.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 92 "mn-sound-player.gob"
+ g_return_val_if_fail (MN_IS_SOUND_PLAYER (self), (gboolean )0);
+#line 323 "mn-sound-player.c"
+{
+#line 94 "mn-sound-player.gob"
+
+ char *command;
+ gboolean can;
+
+ command = eel_gconf_get_string(MN_CONF_SOUNDS_PLAY_COMMAND);
+ can = command && *command;
+ g_free(command);
+
+ return can;
+ }}
+#line 336 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
+
+#line 105 "mn-sound-player.gob"
+void
+mn_sound_player_play (MNSoundPlayer * self, const char * filename, GtkWindow * parent)
+#line 342 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::play"
+#line 105 "mn-sound-player.gob"
+ g_return_if_fail (self != NULL);
+#line 105 "mn-sound-player.gob"
+ g_return_if_fail (MN_IS_SOUND_PLAYER (self));
+#line 105 "mn-sound-player.gob"
+ g_return_if_fail (filename != NULL);
+#line 351 "mn-sound-player.c"
+{
+#line 107 "mn-sound-player.gob"
+
+ const char *error_message;
+ char *command = NULL;
+ char *subst_command;
+ char *shell;
+ char *argv[4];
+ GError *err = NULL;
+
+ g_return_if_fail(parent == NULL || GTK_IS_WINDOW(parent));
+ g_return_if_fail(selfp->can_play);
+
+ self_stop(self);
+
+ /*
+ * If a parent window is provided, we are normally called because
+ * the user interacted with the UI. Otherwise, we are called because
+ * a background event has occurred, and for clarity we should
+ * mention the originating application in the error message.
+ */
+ if (parent)
+ error_message = N_("Unable to play sound");
+ else
+ error_message = N_("A command error has occurred in Mail Notification");
+
+ command = eel_gconf_get_string(MN_CONF_SOUNDS_PLAY_COMMAND);
+ if (! command || ! *command)
+ goto end;
+
+ subst_command = mn_subst_command(command, self_subst_cb, (gpointer) filename, &err);
+ if (! subst_command)
+ {
+ mn_error_dialog(parent,
+ _(error_message),
+ _("Unable to execute \"%s\": %s."),
+ command,
+ err->message);
+ g_error_free(err);
+ goto end;
+ }
+
+ /*
+ * We cannot use gnome_execute_child() because it does not reap the
+ * child, which is needed for GChildWatch.
+ */
+
+ shell = gnome_util_user_shell();
+
+ argv[0] = shell;
+ argv[1] = "-c";
+ argv[2] = subst_command;
+ argv[3] = NULL;
+
+ if (g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &selfp->pid, &err))
+ {
+ GSource *source;
+
+ g_object_notify(G_OBJECT(self), "can-stop");
+
+ g_assert(selfp->watch_source == NULL);
+
+ source = g_child_watch_source_new(selfp->pid);
+ g_source_set_callback(source, (GSourceFunc) self_watch_cb, self, NULL);
+ g_source_attach(source, NULL);
+ selfp->watch_source = source;
+ }
+ else
+ {
+ mn_error_dialog(parent,
+ _(error_message),
+ _("Unable to execute \"%s\": %s."),
+ command,
+ err->message);
+ g_error_free(err);
+ }
+
+ g_free(subst_command);
+ g_free(shell);
+
+ end:
+ g_free(command);
+ }}
+#line 435 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
+
+#line 189 "mn-sound-player.gob"
+static gboolean
+mn_sound_player_subst_cb (const char * name, char ** value, gpointer data)
+#line 441 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::subst_cb"
+{
+#line 191 "mn-sound-player.gob"
+
+ const char *filename = data;
+
+ if (! strcmp(name, "file"))
+ {
+ *value = g_strdup(filename);
+ return TRUE;
+ }
+
+ return FALSE;
+ }}
+#line 457 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
+
+#line 203 "mn-sound-player.gob"
+void
+mn_sound_player_stop (MNSoundPlayer * self)
+#line 463 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::stop"
+#line 203 "mn-sound-player.gob"
+ g_return_if_fail (self != NULL);
+#line 203 "mn-sound-player.gob"
+ g_return_if_fail (MN_IS_SOUND_PLAYER (self));
+#line 470 "mn-sound-player.c"
+{
+#line 205 "mn-sound-player.gob"
+
+ self_stop_real(self, TRUE);
+ }}
+#line 476 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
+
+#line 209 "mn-sound-player.gob"
+static void
+mn_sound_player_stop_real (MNSoundPlayer * self, gboolean notify_can_stop)
+#line 482 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::stop_real"
+#line 209 "mn-sound-player.gob"
+ g_return_if_fail (self != NULL);
+#line 209 "mn-sound-player.gob"
+ g_return_if_fail (MN_IS_SOUND_PLAYER (self));
+#line 489 "mn-sound-player.c"
+{
+#line 211 "mn-sound-player.gob"
+
+ /*
+ * If we remove the watch, a zombie will be left since GLib will
+ * not have waited for the process, so we just abandon the watch.
+ */
+ if (selfp->watch_source)
+ {
+ g_source_set_callback(selfp->watch_source, (GSourceFunc) self_watch_abandoned_cb, NULL, NULL);
+ g_source_unref(selfp->watch_source);
+ selfp->watch_source = NULL;
+ }
+
+ if (selfp->pid)
+ {
+ kill(selfp->pid, SIGTERM);
+ selfp->pid = 0;
+ if (notify_can_stop)
+ g_object_notify(G_OBJECT(self), "can-stop");
+ }
+ }}
+#line 512 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
+
+#line 232 "mn-sound-player.gob"
+static void
+mn_sound_player_watch_abandoned_cb (GPid pid, int status, gpointer data)
+#line 518 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::watch_abandoned_cb"
+{
+#line 234 "mn-sound-player.gob"
+
+ /* no op */
+ }}
+#line 526 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
+
+#line 238 "mn-sound-player.gob"
+static void
+mn_sound_player_watch_cb (GPid pid, int status, gpointer data)
+#line 532 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::watch_cb"
+{
+#line 240 "mn-sound-player.gob"
+
+ Self *self = data;
+
+ GDK_THREADS_ENTER();
+
+ g_assert(selfp->watch_source != NULL);
+
+ g_source_unref(selfp->watch_source);
+ selfp->watch_source = NULL;
+ selfp->pid = 0;
+
+ g_object_notify(G_OBJECT(self), "can-stop");
+
+ /* do not call gdk_flush(), we're normally in the main thread */
+ GDK_THREADS_LEAVE();
+ }}
+#line 553 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
+
+#line 257 "mn-sound-player.gob"
+MNSoundPlayer *
+mn_sound_player_new (void)
+#line 559 "mn-sound-player.c"
+{
+#define __GOB_FUNCTION__ "MN:Sound:Player::new"
+{
+#line 259 "mn-sound-player.gob"
+
+ return GET_NEW;
+ }}
+#line 567 "mn-sound-player.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-sound-player.gob b/src/mn-sound-player.gob
@@ -0,0 +1,262 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%h{
+#include <gtk/gtk.h>
+%}
+
+%{
+#include "config.h"
+#include <sys/types.h>
+#include <signal.h>
+#include <glib/gi18n.h>
+#include <gnome.h>
+#include "mn-conf.h"
+#include "mn-locked-callback.h"
+%}
+
+class MN:Sound:Player from G:Object
+{
+ private gboolean can_play;
+ property BOOLEAN can_play (export)
+ get
+ {
+ g_value_set_boolean(VAL, selfp->can_play);
+ };
+
+ property BOOLEAN can_stop (export)
+ get
+ {
+ g_value_set_boolean(VAL, selfp->pid != 0);
+ };
+
+ private GPid pid;
+ private GSource *watch_source;
+
+ init (self)
+ {
+ selfp->can_play = self_can_play(self);
+
+ mn_g_object_gconf_notification_add_gdk_locked(self,
+ MN_CONF_SOUNDS_PLAY_COMMAND,
+ self_notify_play_command_cb,
+ self);
+ }
+
+ override (G:Object) void
+ dispose (GObject *object)
+ {
+ Self *self = SELF(object);
+
+ /* do not emit notify::can-stop at finalization time (pass FALSE) */
+ self_stop_real(self, FALSE);
+
+ PARENT_HANDLER(object);
+ }
+
+ private void
+ notify_play_command_cb (GConfClient *client,
+ unsigned int cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
+ {
+ Self *self = user_data;
+ gboolean can_play;
+
+ can_play = self_can_play(self);
+ if (can_play != selfp->can_play)
+ {
+ selfp->can_play = can_play;
+ g_object_notify(G_OBJECT(self), "can-play");
+ }
+ }
+
+ private gboolean
+ can_play (self)
+ {
+ char *command;
+ gboolean can;
+
+ command = eel_gconf_get_string(MN_CONF_SOUNDS_PLAY_COMMAND);
+ can = command && *command;
+ g_free(command);
+
+ return can;
+ }
+
+ public void
+ play (self, const char *filename (check null), GtkWindow *parent)
+ {
+ const char *error_message;
+ char *command = NULL;
+ char *subst_command;
+ char *shell;
+ char *argv[4];
+ GError *err = NULL;
+
+ g_return_if_fail(parent == NULL || GTK_IS_WINDOW(parent));
+ g_return_if_fail(selfp->can_play);
+
+ self_stop(self);
+
+ /*
+ * If a parent window is provided, we are normally called because
+ * the user interacted with the UI. Otherwise, we are called because
+ * a background event has occurred, and for clarity we should
+ * mention the originating application in the error message.
+ */
+ if (parent)
+ error_message = N_("Unable to play sound");
+ else
+ error_message = N_("A command error has occurred in Mail Notification");
+
+ command = eel_gconf_get_string(MN_CONF_SOUNDS_PLAY_COMMAND);
+ if (! command || ! *command)
+ goto end;
+
+ subst_command = mn_subst_command(command, self_subst_cb, (gpointer) filename, &err);
+ if (! subst_command)
+ {
+ mn_error_dialog(parent,
+ _(error_message),
+ _("Unable to execute \"%s\": %s."),
+ command,
+ err->message);
+ g_error_free(err);
+ goto end;
+ }
+
+ /*
+ * We cannot use gnome_execute_child() because it does not reap the
+ * child, which is needed for GChildWatch.
+ */
+
+ shell = gnome_util_user_shell();
+
+ argv[0] = shell;
+ argv[1] = "-c";
+ argv[2] = subst_command;
+ argv[3] = NULL;
+
+ if (g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &selfp->pid, &err))
+ {
+ GSource *source;
+
+ g_object_notify(G_OBJECT(self), "can-stop");
+
+ g_assert(selfp->watch_source == NULL);
+
+ source = g_child_watch_source_new(selfp->pid);
+ g_source_set_callback(source, (GSourceFunc) self_watch_cb, self, NULL);
+ g_source_attach(source, NULL);
+ selfp->watch_source = source;
+ }
+ else
+ {
+ mn_error_dialog(parent,
+ _(error_message),
+ _("Unable to execute \"%s\": %s."),
+ command,
+ err->message);
+ g_error_free(err);
+ }
+
+ g_free(subst_command);
+ g_free(shell);
+
+ end:
+ g_free(command);
+ }
+
+ private gboolean
+ subst_cb (const char *name, char **value, gpointer data)
+ {
+ const char *filename = data;
+
+ if (! strcmp(name, "file"))
+ {
+ *value = g_strdup(filename);
+ return TRUE;
+ }
+
+ return FALSE;
+ }
+
+ public void
+ stop (self)
+ {
+ self_stop_real(self, TRUE);
+ }
+
+ private void
+ stop_real (self, gboolean notify_can_stop)
+ {
+ /*
+ * If we remove the watch, a zombie will be left since GLib will
+ * not have waited for the process, so we just abandon the watch.
+ */
+ if (selfp->watch_source)
+ {
+ g_source_set_callback(selfp->watch_source, (GSourceFunc) self_watch_abandoned_cb, NULL, NULL);
+ g_source_unref(selfp->watch_source);
+ selfp->watch_source = NULL;
+ }
+
+ if (selfp->pid)
+ {
+ kill(selfp->pid, SIGTERM);
+ selfp->pid = 0;
+ if (notify_can_stop)
+ g_object_notify(G_OBJECT(self), "can-stop");
+ }
+ }
+
+ private void
+ watch_abandoned_cb (GPid pid, int status, gpointer data)
+ {
+ /* no op */
+ }
+
+ private void
+ watch_cb (GPid pid, int status, gpointer data)
+ {
+ Self *self = data;
+
+ GDK_THREADS_ENTER();
+
+ g_assert(selfp->watch_source != NULL);
+
+ g_source_unref(selfp->watch_source);
+ selfp->watch_source = NULL;
+ selfp->pid = 0;
+
+ g_object_notify(G_OBJECT(self), "can-stop");
+
+ /* do not call gdk_flush(), we're normally in the main thread */
+ GDK_THREADS_LEAVE();
+ }
+
+ public MNSoundPlayer *
+ new (void)
+ {
+ return GET_NEW;
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-sound-player.gob.stamp
diff --git a/src/mn-sound-player.h b/src/mn-sound-player.h
@@ -0,0 +1,81 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+#ifndef __MN_SOUND_PLAYER_H__
+#define __MN_SOUND_PLAYER_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+
+#include <gtk/gtk.h>
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_SOUND_PLAYER (mn_sound_player_get_type())
+#define MN_SOUND_PLAYER(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sound_player_get_type(), MNSoundPlayer)
+#define MN_SOUND_PLAYER_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sound_player_get_type(), MNSoundPlayer const)
+#define MN_SOUND_PLAYER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_sound_player_get_type(), MNSoundPlayerClass)
+#define MN_IS_SOUND_PLAYER(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_sound_player_get_type ())
+
+#define MN_SOUND_PLAYER_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_sound_player_get_type(), MNSoundPlayerClass)
+
+/* Private structure type */
+typedef struct _MNSoundPlayerPrivate MNSoundPlayerPrivate;
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_SOUND_PLAYER__
+#define __TYPEDEF_MN_SOUND_PLAYER__
+typedef struct _MNSoundPlayer MNSoundPlayer;
+#endif
+struct _MNSoundPlayer {
+ GObject __parent__;
+ /*< private >*/
+ MNSoundPlayerPrivate *_priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNSoundPlayerClass MNSoundPlayerClass;
+struct _MNSoundPlayerClass {
+ GObjectClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_sound_player_get_type (void);
+gboolean mn_sound_player_get_can_play (MNSoundPlayer * self);
+gboolean mn_sound_player_get_can_stop (MNSoundPlayer * self);
+void mn_sound_player_play (MNSoundPlayer * self,
+ const char * filename,
+ GtkWindow * parent);
+void mn_sound_player_stop (MNSoundPlayer * self);
+MNSoundPlayer * mn_sound_player_new (void);
+
+/*
+ * Argument wrapping macros
+ */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_SOUND_PLAYER_GET_PROP_CAN_PLAY(arg) "can_play", __extension__ ({gboolean *z = (arg); z;})
+#define MN_SOUND_PLAYER_GET_PROP_CAN_STOP(arg) "can_stop", __extension__ ({gboolean *z = (arg); z;})
+#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_SOUND_PLAYER_GET_PROP_CAN_PLAY(arg) "can_play",(gboolean *)(arg)
+#define MN_SOUND_PLAYER_GET_PROP_CAN_STOP(arg) "can_stop",(gboolean *)(arg)
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-ssl.c b/src/mn-ssl.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-ssl.h b/src/mn-ssl.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-standard-message-view.gob b/src/mn-standard-message-view.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-stock.c b/src/mn-stock.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -23,15 +23,6 @@
#include "mn-stock.h"
#include "mn-util.h"
-/*** constants ***************************************************************/
-
-static const GtkStockItem items[] = {
- /* translators: header capitalization */
- { MN_STOCK_SELECT_ALL, N_("Select _All"), 0, 0, NULL },
- /* translators: header capitalization */
- { MN_STOCK_CONNECT, N_("Co_nnect"), 0, 0, NULL }
-};
-
/*** implementation **********************************************************/
void
@@ -48,11 +39,16 @@ mn_stock_init (void)
{ MN_STOCK_NO_MAIL, NULL, "stock_inbox" },
{ MN_STOCK_LOCAL, NULL, "stock_folder" },
{ MN_STOCK_REMOTE, NULL, "stock_internet" },
- { MN_STOCK_POLLED, NULL, "stock_timer" },
{ MN_STOCK_UNKNOWN, NULL, "stock_unknown" },
{ MN_STOCK_ERROR, NULL, NULL, GTK_STOCK_DIALOG_ERROR },
#if WITH_GMAIL
- { MN_STOCK_GMAIL, UIDIR G_DIR_SEPARATOR_S "gmail.png" },
+ { MN_STOCK_GMAIL, PKGDATADIR G_DIR_SEPARATOR_S "gmail.png" },
+#endif
+#if WITH_YAHOO
+ { MN_STOCK_YAHOO, PKGDATADIR G_DIR_SEPARATOR_S "yahoo.png" },
+#endif
+#if WITH_HOTMAIL
+ { MN_STOCK_HOTMAIL, PKGDATADIR G_DIR_SEPARATOR_S "hotmail.png" },
#endif
#if WITH_MBOX || WITH_MOZILLA || WITH_MH || WITH_MAILDIR || WITH_SYLPHEED
{ MN_STOCK_SYSTEM_MAILBOX, NULL, "system" },
@@ -60,10 +56,9 @@ mn_stock_init (void)
#if WITH_EVOLUTION
{ MN_STOCK_EVOLUTION_MAILBOX, NULL, "evolution" },
#endif
- { MN_STOCK_SELECT_ALL, NULL, "stock_select-all" },
{ MN_STOCK_MAIL_READER, NULL, "stock_mail-handling" },
{ MN_STOCK_OPEN_MESSAGE, NULL, "stock_mail-open" },
- { MN_STOCK_CONNECT, NULL, NULL, GTK_STOCK_CONNECT }
+ { MN_STOCK_CONSIDER_NEW_MAIL_AS_READ, NULL, "stock_mark" }
};
GtkIconFactory *factory;
GtkIconTheme *icon_theme;
@@ -82,13 +77,8 @@ mn_stock_init (void)
GdkPixbuf *pixbuf;
pixbuf = mn_pixbuf_new(icons[i].filename);
- if (pixbuf)
- {
- icon_set = gtk_icon_set_new_from_pixbuf(pixbuf);
- g_object_unref(pixbuf);
- }
- else
- icon_set = gtk_icon_set_new();
+ icon_set = gtk_icon_set_new_from_pixbuf(pixbuf);
+ g_object_unref(pixbuf);
}
else if (icons[i].icon_name)
{
@@ -113,6 +103,4 @@ mn_stock_init (void)
}
g_object_unref(factory);
-
- gtk_stock_add_static(items, G_N_ELEMENTS(items));
}
diff --git a/src/mn-stock.h b/src/mn-stock.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -26,22 +26,26 @@
#define MN_STOCK_NO_MAIL "mn-no-mail"
#define MN_STOCK_LOCAL "mn-local"
#define MN_STOCK_REMOTE "mn-remote"
-#define MN_STOCK_POLLED "mn-polled"
#define MN_STOCK_UNKNOWN "mn-unknown"
#define MN_STOCK_ERROR "mn-error"
#if WITH_GMAIL
#define MN_STOCK_GMAIL "mn-gmail"
#endif
+#if WITH_YAHOO
+#define MN_STOCK_YAHOO "mn-yahoo"
+#endif
+#if WITH_HOTMAIL
+#define MN_STOCK_HOTMAIL "mn-hotmail"
+#endif
#if WITH_MBOX || WITH_MOZILLA || WITH_MH || WITH_MAILDIR || WITH_SYLPHEED
#define MN_STOCK_SYSTEM_MAILBOX "mn-system-mailbox"
#endif
#if WITH_EVOLUTION
#define MN_STOCK_EVOLUTION_MAILBOX "mn-evolution-mailbox"
#endif
-#define MN_STOCK_SELECT_ALL "mn-select-all"
#define MN_STOCK_MAIL_READER "mn-mail-reader"
#define MN_STOCK_OPEN_MESSAGE "mn-open-message"
-#define MN_STOCK_CONNECT "mn-connect"
+#define MN_STOCK_CONSIDER_NEW_MAIL_AS_READ "mn-consider-new-mail-as-read"
void mn_stock_init (void);
diff --git a/src/mn-sylpheed-mailbox-backend-private.h b/src/mn-sylpheed-mailbox-backend-private.h
@@ -14,14 +14,30 @@ extern "C" {
#include "mn-locked-callback.h"
-#line 18 "mn-sylpheed-mailbox-backend-private.h"
-struct _MNSylpheedMailboxBackendPrivate {
-#line 72 "mn-sylpheed-mailbox-backend.gob"
- MNLockedGSource * monitor_timeout_source;
-#line 73 "mn-sylpheed-mailbox-backend.gob"
- gboolean can_lock_mark_file;
-#line 24 "mn-sylpheed-mailbox-backend-private.h"
-};
+/* taken from procmsg.h in the Sylpheed sources */
+#define SYLPHEED_MSG_NEW (1U << 0)
+#define SYLPHEED_MSG_UNREAD (1U << 1)
+
+/* taken from defs.h in the Sylpheed sources */
+#define SYLPHEED_MARK_FILE ".sylpheed_mark"
+
+typedef struct
+{
+ int num;
+ guint32 flags;
+} MarkEntry;
+
+typedef struct
+{
+ char *data;
+ gsize data_size;
+ GHashTable *table;
+} Marks;
+
+#line 38 "mn-sylpheed-mailbox-backend-private.h"
+Marks * mn_sylpheed_mailbox_backend_marks_new (GnomeVFSURI * mailbox_uri, GError ** err);
+gboolean mn_sylpheed_mailbox_backend_marks_write (GnomeVFSURI * mailbox_uri, Marks * marks, GError ** err);
+void mn_sylpheed_mailbox_backend_marks_free (Marks * marks);
#ifdef __cplusplus
}
diff --git a/src/mn-sylpheed-mailbox-backend.c b/src/mn-sylpheed-mailbox-backend.c
@@ -20,7 +20,7 @@
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */
-#line 30 "mn-sylpheed-mailbox-backend.gob"
+#line 50 "mn-sylpheed-mailbox-backend.gob"
#include "config.h"
#include <stdlib.h>
@@ -32,35 +32,20 @@
#include <eel/eel.h>
#include "mn-mailbox-private.h"
#include "mn-reentrant-mailbox-private.h"
+#include "mn-vfs-mailbox-private.h"
#include "mn-vfs-mailbox-backend-private.h"
#include "mn-vfs.h"
#include "mn-util.h"
#include "mn-message-mime.h"
-
-/* taken from procmsg.h in the Sylpheed sources */
-#define SYLPHEED_MSG_NEW (1U << 0)
-#define SYLPHEED_MSG_UNREAD (1U << 1)
+#include "mn-sylpheed-message.h"
/* taken from defs.h in the Sylpheed sources */
-#define SYLPHEED_MARK_FILE ".sylpheed_mark"
#define SYLPHEED_MARK_VERSION 2
-typedef struct
-{
- int num;
- guint32 flags;
-} MarkEntry;
-
-typedef struct
-{
- char *data;
- gsize data_size;
- GHashTable *table;
-} Marks;
-
-static GStaticMutex timeouts_mutex = G_STATIC_MUTEX_INIT;
+/* taken from defs.h in the Claws Mail sources */
+#define CLAWS_MAIL_CACHE_FILE ".sylpheed_claws_cache"
-#line 64 "mn-sylpheed-mailbox-backend.c"
+#line 49 "mn-sylpheed-mailbox-backend.c"
/* self casting macros */
#define SELF(x) MN_SYLPHEED_MAILBOX_BACKEND(x)
#define SELF_CONST(x) MN_SYLPHEED_MAILBOX_BACKEND_CONST(x)
@@ -77,25 +62,23 @@ typedef MNSylpheedMailboxBackendClass SelfClass;
/* here are local prototypes */
static void mn_sylpheed_mailbox_backend_init (MNSylpheedMailboxBackend * o) G_GNUC_UNUSED;
static void mn_sylpheed_mailbox_backend_class_init (MNSylpheedMailboxBackendClass * class) G_GNUC_UNUSED;
-static GObject * ___2_mn_sylpheed_mailbox_backend_constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
-static void ___3_mn_sylpheed_mailbox_backend_finalize (GObject * object) G_GNUC_UNUSED;
-static void ___4_mn_sylpheed_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend, const char * info_uri, GnomeVFSMonitorEventType event_type) G_GNUC_UNUSED;
-static gboolean mn_sylpheed_mailbox_backend_monitor_timeout_cb (gpointer data) G_GNUC_UNUSED;
-static gboolean ___6_mn_sylpheed_mailbox_backend_is (MNVFSMailboxBackend * dummy, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) G_GNUC_UNUSED;
-static void ___7_mn_sylpheed_mailbox_backend_check (MNVFSMailboxBackend * backend, unsigned long check_id) G_GNUC_UNUSED;
+static void ___2_mn_sylpheed_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend, const char * info_uri, GnomeVFSMonitorEventType event_type) G_GNUC_UNUSED;
+static gboolean ___3_mn_sylpheed_mailbox_backend_is (MNVFSMailboxBackend * dummy, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox) G_GNUC_UNUSED;
+static gboolean mn_sylpheed_mailbox_backend_is_claws_mail_mailbox (MNSylpheedMailboxBackend * self) G_GNUC_UNUSED;
+static gboolean mn_sylpheed_mailbox_backend_has_sylpheed_locking (void) G_GNUC_UNUSED;
+static void mn_sylpheed_mailbox_backend_update_check_latency (MNSylpheedMailboxBackend * self) G_GNUC_UNUSED;
+static void ___7_mn_sylpheed_mailbox_backend_check (MNVFSMailboxBackend * backend, int check_id) G_GNUC_UNUSED;
static gboolean mn_sylpheed_mailbox_backend_read_local_mark_file (const char * filename, gsize * size, char ** contents, GError ** err) G_GNUC_UNUSED;
static gboolean mn_sylpheed_mailbox_backend_read_remote_mark_file (GnomeVFSURI * uri, gsize * size, char ** contents, GError ** err) G_GNUC_UNUSED;
static gboolean mn_sylpheed_mailbox_backend_read_mark_file (GnomeVFSURI * mailbox_uri, gsize * size, char ** contents, GError ** err) G_GNUC_UNUSED;
-static Marks * mn_sylpheed_mailbox_backend_marks_new (GnomeVFSURI * mailbox_uri, GError ** err) G_GNUC_UNUSED;
-static gboolean mn_sylpheed_mailbox_backend_marks_write (GnomeVFSURI * mailbox_uri, Marks * marks, GError ** err) G_GNUC_UNUSED;
-static void mn_sylpheed_mailbox_backend_marks_free (Marks * marks) G_GNUC_UNUSED;
-static gboolean ___e_mn_sylpheed_mailbox_backend_mark_as_read (MNVFSMailboxBackend * dummy, MNVFSMessage * message, GError ** err) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static MNVFSMailboxBackendClass *parent_class = NULL;
/* Short form macros */
-#define self_monitor_timeout_cb mn_sylpheed_mailbox_backend_monitor_timeout_cb
+#define self_is_claws_mail_mailbox mn_sylpheed_mailbox_backend_is_claws_mail_mailbox
+#define self_has_sylpheed_locking mn_sylpheed_mailbox_backend_has_sylpheed_locking
+#define self_update_check_latency mn_sylpheed_mailbox_backend_update_check_latency
#define self_read_local_mark_file mn_sylpheed_mailbox_backend_read_local_mark_file
#define self_read_remote_mark_file mn_sylpheed_mailbox_backend_read_remote_mark_file
#define self_read_mark_file mn_sylpheed_mailbox_backend_read_mark_file
@@ -144,132 +127,52 @@ GET_NEW_VARG (const char *first, ...)
return ret;
}
-
-static void
-___finalize(GObject *obj_self)
-{
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::finalize"
- MNSylpheedMailboxBackend *self G_GNUC_UNUSED = MN_SYLPHEED_MAILBOX_BACKEND (obj_self);
- gpointer priv G_GNUC_UNUSED = self->_priv;
-#line 97 "mn-sylpheed-mailbox-backend.gob"
- ___3_mn_sylpheed_mailbox_backend_finalize(obj_self);
-#line 157 "mn-sylpheed-mailbox-backend.c"
-}
-#undef __GOB_FUNCTION__
-
static void
mn_sylpheed_mailbox_backend_init (MNSylpheedMailboxBackend * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::init"
- o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_SYLPHEED_MAILBOX_BACKEND,MNSylpheedMailboxBackendPrivate);
}
#undef __GOB_FUNCTION__
-#line 75 "mn-sylpheed-mailbox-backend.gob"
+#line 77 "mn-sylpheed-mailbox-backend.gob"
static void
mn_sylpheed_mailbox_backend_class_init (MNSylpheedMailboxBackendClass * class G_GNUC_UNUSED)
-#line 171 "mn-sylpheed-mailbox-backend.c"
+#line 140 "mn-sylpheed-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::class_init"
- GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
MNVFSMailboxBackendClass *mn_vfs_mailbox_backend_class = (MNVFSMailboxBackendClass *)class;
- g_type_class_add_private(class,sizeof(MNSylpheedMailboxBackendPrivate));
-
parent_class = g_type_class_ref (MN_TYPE_VFS_MAILBOX_BACKEND);
-#line 80 "mn-sylpheed-mailbox-backend.gob"
- g_object_class->constructor = ___2_mn_sylpheed_mailbox_backend_constructor;
-#line 97 "mn-sylpheed-mailbox-backend.gob"
- g_object_class->finalize = ___finalize;
-#line 112 "mn-sylpheed-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->monitor_cb = ___4_mn_sylpheed_mailbox_backend_monitor_cb;
-#line 175 "mn-sylpheed-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->is = ___6_mn_sylpheed_mailbox_backend_is;
-#line 190 "mn-sylpheed-mailbox-backend.gob"
+#line 82 "mn-sylpheed-mailbox-backend.gob"
+ mn_vfs_mailbox_backend_class->monitor_cb = ___2_mn_sylpheed_mailbox_backend_monitor_cb;
+#line 109 "mn-sylpheed-mailbox-backend.gob"
+ mn_vfs_mailbox_backend_class->is = ___3_mn_sylpheed_mailbox_backend_is;
+#line 197 "mn-sylpheed-mailbox-backend.gob"
mn_vfs_mailbox_backend_class->check = ___7_mn_sylpheed_mailbox_backend_check;
-#line 481 "mn-sylpheed-mailbox-backend.gob"
- mn_vfs_mailbox_backend_class->mark_as_read = ___e_mn_sylpheed_mailbox_backend_mark_as_read;
-#line 193 "mn-sylpheed-mailbox-backend.c"
+#line 153 "mn-sylpheed-mailbox-backend.c"
{
-#line 76 "mn-sylpheed-mailbox-backend.gob"
+#line 78 "mn-sylpheed-mailbox-backend.gob"
MN_VFS_MAILBOX_BACKEND_CLASS(class)->format = "Sylpheed";
-#line 199 "mn-sylpheed-mailbox-backend.c"
+#line 159 "mn-sylpheed-mailbox-backend.c"
}
}
#undef __GOB_FUNCTION__
-#line 80 "mn-sylpheed-mailbox-backend.gob"
-static GObject *
-___2_mn_sylpheed_mailbox_backend_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
-#line 209 "mn-sylpheed-mailbox-backend.c"
-#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
- ((G_OBJECT_CLASS(parent_class)->constructor)? \
- (* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
- ((GObject * )0))
-{
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::constructor"
-{
#line 82 "mn-sylpheed-mailbox-backend.gob"
-
- GObject *object;
- Self *self;
-
- object = PARENT_HANDLER(type, n_construct_properties, construct_params);
- self = SELF(object);
-
-#if WITH_SYLPHEED_LOCKING
- if (gnome_vfs_uri_is_local(MN_VFS_MAILBOX_BACKEND(self)->mailbox->vfs_uri))
- selfp->can_lock_mark_file = TRUE;
-#endif
-
- return object;
- }}
-#line 232 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 97 "mn-sylpheed-mailbox-backend.gob"
-static void
-___3_mn_sylpheed_mailbox_backend_finalize (GObject * object G_GNUC_UNUSED)
-#line 239 "mn-sylpheed-mailbox-backend.c"
-#define PARENT_HANDLER(___object) \
- { if(G_OBJECT_CLASS(parent_class)->finalize) \
- (* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
-{
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::finalize"
-{
-#line 99 "mn-sylpheed-mailbox-backend.gob"
-
- Self *self = SELF(object);
-
- g_static_mutex_lock(&timeouts_mutex);
-
- if (selfp->monitor_timeout_source)
- mn_locked_g_source_remove(selfp->monitor_timeout_source);
-
- g_static_mutex_unlock(&timeouts_mutex);
-
- PARENT_HANDLER(object);
- }}
-#line 259 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 112 "mn-sylpheed-mailbox-backend.gob"
static void
-___4_mn_sylpheed_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend G_GNUC_UNUSED, const char * info_uri, GnomeVFSMonitorEventType event_type)
-#line 266 "mn-sylpheed-mailbox-backend.c"
+___2_mn_sylpheed_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend G_GNUC_UNUSED, const char * info_uri, GnomeVFSMonitorEventType event_type)
+#line 169 "mn-sylpheed-mailbox-backend.c"
#define PARENT_HANDLER(___backend,___info_uri,___event_type) \
{ if(MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb) \
(* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->monitor_cb)(___backend,___info_uri,___event_type); }
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::monitor_cb"
{
-#line 116 "mn-sylpheed-mailbox-backend.gob"
+#line 86 "mn-sylpheed-mailbox-backend.gob"
if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED
|| event_type == GNOME_VFS_MONITOR_EVENT_DELETED
@@ -280,103 +183,165 @@ ___4_mn_sylpheed_mailbox_backend_monitor_cb (MNVFSMailboxBackend * backend G_GNU
filename = eel_uri_get_basename(info_uri);
if (filename)
{
- if (! strcmp(filename, SYLPHEED_MARK_FILE))
- {
- Self *self = SELF(backend);
-
- if (selfp->can_lock_mark_file)
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(backend->mailbox));
- else
- {
- /*
- * We cannot lock the mark file. To avoid races,
- * delay the check.
- */
-
- /*
- * We do not need to lock timeouts_mutex, because
- * this function and monitor_timeout_cb() are
- * always run in the same thread (from the GLib
- * main loop).
- */
- if (selfp->monitor_timeout_source)
- mn_locked_g_source_remove(selfp->monitor_timeout_source);
-
- selfp->monitor_timeout_source = mn_g_timeout_add_locked(3000,
- self_monitor_timeout_cb,
- self,
- (MNLockFunc) mn_g_static_mutex_lock,
- (MNUnlockFunc) mn_g_static_mutex_unlock,
- &timeouts_mutex);
- }
- }
- else if (mn_str_isnumeric(filename))
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(backend->mailbox));
+ /*
+ * The status of the mailbox can only have changed if the
+ * subject of the event is the mark file or a message file
+ * (having a numbered filename).
+ */
+ if (! strcmp(filename, SYLPHEED_MARK_FILE) || mn_str_isnumeric(filename))
+ mn_vfs_mailbox_backend_queue_check(backend);
g_free(filename);
}
}
}}
-#line 321 "mn-sylpheed-mailbox-backend.c"
+#line 199 "mn-sylpheed-mailbox-backend.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 164 "mn-sylpheed-mailbox-backend.gob"
+#line 109 "mn-sylpheed-mailbox-backend.gob"
static gboolean
-mn_sylpheed_mailbox_backend_monitor_timeout_cb (gpointer data)
-#line 328 "mn-sylpheed-mailbox-backend.c"
+___3_mn_sylpheed_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox)
+#line 206 "mn-sylpheed-mailbox-backend.c"
+#define PARENT_HANDLER(___dummy,___class,___mailbox) \
+ ((MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->is)? \
+ (* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->is)(___dummy,___class,___mailbox): \
+ ((gboolean )0))
{
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::monitor_timeout_cb"
+#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::is"
{
-#line 166 "mn-sylpheed-mailbox-backend.gob"
+#line 113 "mn-sylpheed-mailbox-backend.gob"
- Self *self = data;
+ gboolean is;
+ GnomeVFSURI *uri;
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(MN_VFS_MAILBOX_BACKEND(self)->mailbox));
+ uri = gnome_vfs_uri_append_file_name(mailbox->vfs_uri, SYLPHEED_MARK_FILE);
+ is = mn_vfs_test(uri, G_FILE_TEST_IS_REGULAR);
+ gnome_vfs_uri_unref(uri);
- selfp->monitor_timeout_source = NULL;
- return FALSE; /* remove source */
+ return is;
}}
-#line 341 "mn-sylpheed-mailbox-backend.c"
+#line 225 "mn-sylpheed-mailbox-backend.c"
#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
-#line 175 "mn-sylpheed-mailbox-backend.gob"
+#line 124 "mn-sylpheed-mailbox-backend.gob"
static gboolean
-___6_mn_sylpheed_mailbox_backend_is (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox)
-#line 347 "mn-sylpheed-mailbox-backend.c"
-#define PARENT_HANDLER(___dummy,___class,___mailbox) \
- ((MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->is)? \
- (* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->is)(___dummy,___class,___mailbox): \
- ((gboolean )0))
+mn_sylpheed_mailbox_backend_is_claws_mail_mailbox (MNSylpheedMailboxBackend * self)
+#line 232 "mn-sylpheed-mailbox-backend.c"
{
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::is"
+#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::is_claws_mail_mailbox"
+#line 124 "mn-sylpheed-mailbox-backend.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 124 "mn-sylpheed-mailbox-backend.gob"
+ g_return_val_if_fail (MN_IS_SYLPHEED_MAILBOX_BACKEND (self), (gboolean )0);
+#line 239 "mn-sylpheed-mailbox-backend.c"
{
-#line 179 "mn-sylpheed-mailbox-backend.gob"
+#line 126 "mn-sylpheed-mailbox-backend.gob"
- gboolean is = FALSE;
- GnomeVFSURI *markfile_uri;
+ gboolean is;
+ GnomeVFSURI *uri;
- markfile_uri = gnome_vfs_uri_append_file_name(mailbox->vfs_uri, SYLPHEED_MARK_FILE);
- is = mn_vfs_test(markfile_uri, G_FILE_TEST_IS_REGULAR);
- gnome_vfs_uri_unref(markfile_uri);
+ uri = gnome_vfs_uri_append_file_name(MN_VFS_MAILBOX_BACKEND(self)->mailbox->vfs_uri, CLAWS_MAIL_CACHE_FILE);
+ is = mn_vfs_test(uri, G_FILE_TEST_IS_REGULAR);
+ gnome_vfs_uri_unref(uri);
return is;
}}
-#line 366 "mn-sylpheed-mailbox-backend.c"
+#line 252 "mn-sylpheed-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-#line 190 "mn-sylpheed-mailbox-backend.gob"
+#line 138 "mn-sylpheed-mailbox-backend.gob"
+static gboolean
+mn_sylpheed_mailbox_backend_has_sylpheed_locking (void)
+#line 258 "mn-sylpheed-mailbox-backend.c"
+{
+#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::has_sylpheed_locking"
+{
+#line 140 "mn-sylpheed-mailbox-backend.gob"
+
+ static gboolean checked = FALSE;
+ static gboolean has = FALSE;
+
+ if (! checked)
+ {
+ char *output;
+
+ if (g_spawn_command_line_sync("sylpheed --version", &output, NULL, NULL, NULL))
+ {
+ if (strstr(output, "+locking"))
+ has = TRUE;
+ g_free(output);
+ }
+
+ checked = TRUE;
+ }
+
+ return has;
+ }}
+#line 283 "mn-sylpheed-mailbox-backend.c"
+#undef __GOB_FUNCTION__
+
+#line 161 "mn-sylpheed-mailbox-backend.gob"
static void
-___7_mn_sylpheed_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, unsigned long check_id)
-#line 373 "mn-sylpheed-mailbox-backend.c"
+mn_sylpheed_mailbox_backend_update_check_latency (MNSylpheedMailboxBackend * self)
+#line 289 "mn-sylpheed-mailbox-backend.c"
+{
+#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::update_check_latency"
+#line 161 "mn-sylpheed-mailbox-backend.gob"
+ g_return_if_fail (self != NULL);
+#line 161 "mn-sylpheed-mailbox-backend.gob"
+ g_return_if_fail (MN_IS_SYLPHEED_MAILBOX_BACKEND (self));
+#line 296 "mn-sylpheed-mailbox-backend.c"
+{
+#line 163 "mn-sylpheed-mailbox-backend.gob"
+
+ MNVFSMailboxBackend *backend = MN_VFS_MAILBOX_BACKEND(self);
+
+ mn_vfs_mailbox_lock(backend->mailbox);
+
+ /*
+ * If it is a Claws Mail mailbox, the check_latency can be set to
+ * 0, since Claws Mail does not write the mark file in place but
+ * uses an atomic rename() to move the new mark file over the
+ * previous one.
+ */
+ if (self_is_claws_mail_mailbox(self))
+ backend->check_latency = 0;
+ else
+ {
+ /*
+ * If Sylpheed was compiled with the locking patch and the
+ * mailbox is local, check_latency can be set to 0, since we
+ * lock the mark file while reading it.
+ */
+ if (self_has_sylpheed_locking() && gnome_vfs_uri_is_local(backend->mailbox->vfs_uri))
+ backend->check_latency = 0;
+ else
+ /*
+ * Otherwise, set check_latency to 3 seconds to avoid race
+ * conditions that can occur when Sylpheed writes the mark
+ * file while we read it.
+ */
+ backend->check_latency = 3000;
+ }
+
+ mn_vfs_mailbox_unlock(backend->mailbox);
+ }}
+#line 332 "mn-sylpheed-mailbox-backend.c"
+#undef __GOB_FUNCTION__
+
+#line 197 "mn-sylpheed-mailbox-backend.gob"
+static void
+___7_mn_sylpheed_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNUSED, int check_id)
+#line 338 "mn-sylpheed-mailbox-backend.c"
#define PARENT_HANDLER(___backend,___check_id) \
{ if(MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->check) \
(* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->check)(___backend,___check_id); }
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::check"
{
-#line 192 "mn-sylpheed-mailbox-backend.gob"
+#line 199 "mn-sylpheed-mailbox-backend.gob"
GError *err = NULL;
GnomeVFSResult result;
@@ -386,20 +351,24 @@ ___7_mn_sylpheed_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNU
Marks *marks;
GSList *messages = NULL;
+ self_update_check_latency(SELF(backend));
+
mn_vfs_mailbox_backend_monitor(backend, check_id, backend->mailbox->uri, GNOME_VFS_MONITOR_DIRECTORY);
marks = self_marks_new(backend->mailbox->vfs_uri, &err);
if (! marks)
{
- GDK_THREADS_ENTER();
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ {
+ GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to read %s: %s"), SYLPHEED_MARK_FILE, err->message);
- g_error_free(err);
+ mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to read %s: %s"), SYLPHEED_MARK_FILE, err->message);
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
+ g_error_free(err);
return;
}
@@ -409,13 +378,15 @@ ___7_mn_sylpheed_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNU
result = gnome_vfs_directory_open_from_uri(&handle, backend->mailbox->vfs_uri, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
if (result != GNOME_VFS_OK)
{
- GDK_THREADS_ENTER();
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ {
+ GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open folder: %s"), gnome_vfs_result_to_string(result));
+ mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open folder: %s"), gnome_vfs_result_to_string(result));
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
goto end;
}
@@ -443,7 +414,8 @@ ___7_mn_sylpheed_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNU
* own way (mark file) of differencing seen/unseen
* messages.
*/
- message = mn_vfs_message_new(backend,
+ message = mn_vfs_message_new(MN_TYPE_SYLPHEED_MESSAGE,
+ backend,
backend->mailbox->vfs_uri,
file_info->name,
flags,
@@ -458,7 +430,7 @@ ___7_mn_sylpheed_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNU
finish:
GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
{
if (result == GNOME_VFS_ERROR_EOF || result == GNOME_VFS_OK)
{
@@ -479,25 +451,25 @@ ___7_mn_sylpheed_mailbox_backend_check (MNVFSMailboxBackend * backend G_GNUC_UNU
end:
self_marks_free(marks);
}}
-#line 483 "mn-sylpheed-mailbox-backend.c"
+#line 455 "mn-sylpheed-mailbox-backend.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 295 "mn-sylpheed-mailbox-backend.gob"
+#line 309 "mn-sylpheed-mailbox-backend.gob"
static gboolean
mn_sylpheed_mailbox_backend_read_local_mark_file (const char * filename, gsize * size, char ** contents, GError ** err)
-#line 490 "mn-sylpheed-mailbox-backend.c"
+#line 462 "mn-sylpheed-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::read_local_mark_file"
-#line 295 "mn-sylpheed-mailbox-backend.gob"
+#line 309 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (filename != NULL, (gboolean )0);
-#line 295 "mn-sylpheed-mailbox-backend.gob"
+#line 309 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (size != NULL, (gboolean )0);
-#line 295 "mn-sylpheed-mailbox-backend.gob"
+#line 309 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (contents != NULL, (gboolean )0);
-#line 499 "mn-sylpheed-mailbox-backend.c"
+#line 471 "mn-sylpheed-mailbox-backend.c"
{
-#line 300 "mn-sylpheed-mailbox-backend.gob"
+#line 314 "mn-sylpheed-mailbox-backend.gob"
int fd;
struct flock lock;
@@ -512,13 +484,6 @@ mn_sylpheed_mailbox_backend_read_local_mark_file (const char * filename, gsize *
return FALSE;
}
- /*
- * Even if --enable-sylpheed-locking was not used and we are here
- * after the 3 seconds delay, it does not hurt to obtain a lock,
- * in case the user has a patched Sylpheed but did not use
- * --enable-sylpheed-locking.
- */
-
memset(&lock, 0, sizeof(lock));
lock.l_start = 0; /* from l_whence */
lock.l_len = 0; /* to end of file */
@@ -536,7 +501,7 @@ mn_sylpheed_mailbox_backend_read_local_mark_file (const char * filename, gsize *
}
else
{
- g_set_error(err, 0, 0, "unable to set encoding: %s", tmp_err->message);
+ g_set_error(err, 0, 0, _("unable to set encoding: %s"), tmp_err->message);
g_error_free(tmp_err);
}
@@ -545,24 +510,24 @@ mn_sylpheed_mailbox_backend_read_local_mark_file (const char * filename, gsize *
return status;
}}
-#line 549 "mn-sylpheed-mailbox-backend.c"
+#line 514 "mn-sylpheed-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 348 "mn-sylpheed-mailbox-backend.gob"
+#line 355 "mn-sylpheed-mailbox-backend.gob"
static gboolean
mn_sylpheed_mailbox_backend_read_remote_mark_file (GnomeVFSURI * uri, gsize * size, char ** contents, GError ** err)
-#line 555 "mn-sylpheed-mailbox-backend.c"
+#line 520 "mn-sylpheed-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::read_remote_mark_file"
-#line 348 "mn-sylpheed-mailbox-backend.gob"
+#line 355 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (uri != NULL, (gboolean )0);
-#line 348 "mn-sylpheed-mailbox-backend.gob"
+#line 355 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (size != NULL, (gboolean )0);
-#line 348 "mn-sylpheed-mailbox-backend.gob"
+#line 355 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (contents != NULL, (gboolean )0);
-#line 564 "mn-sylpheed-mailbox-backend.c"
+#line 529 "mn-sylpheed-mailbox-backend.c"
{
-#line 353 "mn-sylpheed-mailbox-backend.gob"
+#line 360 "mn-sylpheed-mailbox-backend.gob"
GnomeVFSResult result;
int _size;
@@ -579,24 +544,24 @@ mn_sylpheed_mailbox_backend_read_remote_mark_file (GnomeVFSURI * uri, gsize * si
return FALSE;
}
}}
-#line 583 "mn-sylpheed-mailbox-backend.c"
+#line 548 "mn-sylpheed-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 370 "mn-sylpheed-mailbox-backend.gob"
+#line 377 "mn-sylpheed-mailbox-backend.gob"
static gboolean
mn_sylpheed_mailbox_backend_read_mark_file (GnomeVFSURI * mailbox_uri, gsize * size, char ** contents, GError ** err)
-#line 589 "mn-sylpheed-mailbox-backend.c"
+#line 554 "mn-sylpheed-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::read_mark_file"
-#line 370 "mn-sylpheed-mailbox-backend.gob"
+#line 377 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (mailbox_uri != NULL, (gboolean )0);
-#line 370 "mn-sylpheed-mailbox-backend.gob"
+#line 377 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (size != NULL, (gboolean )0);
-#line 370 "mn-sylpheed-mailbox-backend.gob"
+#line 377 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (contents != NULL, (gboolean )0);
-#line 598 "mn-sylpheed-mailbox-backend.c"
+#line 563 "mn-sylpheed-mailbox-backend.c"
{
-#line 375 "mn-sylpheed-mailbox-backend.gob"
+#line 382 "mn-sylpheed-mailbox-backend.gob"
GnomeVFSURI *markfile_uri;
char *filename;
@@ -617,20 +582,20 @@ mn_sylpheed_mailbox_backend_read_mark_file (GnomeVFSURI * mailbox_uri, gsize * s
return status;
}}
-#line 621 "mn-sylpheed-mailbox-backend.c"
+#line 586 "mn-sylpheed-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 396 "mn-sylpheed-mailbox-backend.gob"
-static Marks *
+#line 403 "mn-sylpheed-mailbox-backend.gob"
+Marks *
mn_sylpheed_mailbox_backend_marks_new (GnomeVFSURI * mailbox_uri, GError ** err)
-#line 627 "mn-sylpheed-mailbox-backend.c"
+#line 592 "mn-sylpheed-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::marks_new"
-#line 396 "mn-sylpheed-mailbox-backend.gob"
+#line 403 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (mailbox_uri != NULL, (Marks * )0);
-#line 632 "mn-sylpheed-mailbox-backend.c"
+#line 597 "mn-sylpheed-mailbox-backend.c"
{
-#line 398 "mn-sylpheed-mailbox-backend.gob"
+#line 405 "mn-sylpheed-mailbox-backend.gob"
Marks *marks = NULL;
gsize bytes_left;
@@ -683,22 +648,22 @@ mn_sylpheed_mailbox_backend_marks_new (GnomeVFSURI * mailbox_uri, GError ** err)
return marks;
}}
-#line 687 "mn-sylpheed-mailbox-backend.c"
+#line 652 "mn-sylpheed-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 451 "mn-sylpheed-mailbox-backend.gob"
-static gboolean
+#line 458 "mn-sylpheed-mailbox-backend.gob"
+gboolean
mn_sylpheed_mailbox_backend_marks_write (GnomeVFSURI * mailbox_uri, Marks * marks, GError ** err)
-#line 693 "mn-sylpheed-mailbox-backend.c"
+#line 658 "mn-sylpheed-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::marks_write"
-#line 451 "mn-sylpheed-mailbox-backend.gob"
+#line 458 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (mailbox_uri != NULL, (gboolean )0);
-#line 451 "mn-sylpheed-mailbox-backend.gob"
+#line 458 "mn-sylpheed-mailbox-backend.gob"
g_return_val_if_fail (marks != NULL, (gboolean )0);
-#line 700 "mn-sylpheed-mailbox-backend.c"
+#line 665 "mn-sylpheed-mailbox-backend.c"
{
-#line 455 "mn-sylpheed-mailbox-backend.gob"
+#line 462 "mn-sylpheed-mailbox-backend.gob"
GnomeVFSURI *markfile_uri;
gboolean status;
@@ -716,78 +681,24 @@ mn_sylpheed_mailbox_backend_marks_write (GnomeVFSURI * mailbox_uri, Marks * mark
return status;
}}
-#line 720 "mn-sylpheed-mailbox-backend.c"
+#line 685 "mn-sylpheed-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 473 "mn-sylpheed-mailbox-backend.gob"
-static void
+#line 480 "mn-sylpheed-mailbox-backend.gob"
+void
mn_sylpheed_mailbox_backend_marks_free (Marks * marks)
-#line 726 "mn-sylpheed-mailbox-backend.c"
+#line 691 "mn-sylpheed-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::marks_free"
-#line 473 "mn-sylpheed-mailbox-backend.gob"
+#line 480 "mn-sylpheed-mailbox-backend.gob"
g_return_if_fail (marks != NULL);
-#line 731 "mn-sylpheed-mailbox-backend.c"
+#line 696 "mn-sylpheed-mailbox-backend.c"
{
-#line 475 "mn-sylpheed-mailbox-backend.gob"
+#line 482 "mn-sylpheed-mailbox-backend.gob"
g_free(marks->data);
g_hash_table_destroy(marks->table);
g_free(marks);
}}
-#line 739 "mn-sylpheed-mailbox-backend.c"
-#undef __GOB_FUNCTION__
-
-#line 481 "mn-sylpheed-mailbox-backend.gob"
-static gboolean
-___e_mn_sylpheed_mailbox_backend_mark_as_read (MNVFSMailboxBackend * dummy G_GNUC_UNUSED, MNVFSMessage * message, GError ** err)
-#line 745 "mn-sylpheed-mailbox-backend.c"
-#define PARENT_HANDLER(___dummy,___message,___err) \
- ((MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->mark_as_read)? \
- (* MN_VFS_MAILBOX_BACKEND_CLASS(parent_class)->mark_as_read)(___dummy,___message,___err): \
- ((gboolean )0))
-{
-#define __GOB_FUNCTION__ "MN:Sylpheed:Mailbox:Backend::mark_as_read"
-{
-#line 485 "mn-sylpheed-mailbox-backend.gob"
-
- char *filename;
- int num;
- GError *tmp_err = NULL;
- Marks *marks;
- MarkEntry *entry;
- gboolean status;
-
- filename = gnome_vfs_uri_extract_short_name(message->vfs_uri);
- g_assert(mn_str_isnumeric(filename));
- num = atoi(filename);
- g_free(filename);
-
- marks = self_marks_new(MN_VFS_MAILBOX(MN_MESSAGE(message)->mailbox)->vfs_uri, &tmp_err);
- if (! marks)
- {
- g_set_error(err, 0, 0, _("Unable to read %s: %s."), SYLPHEED_MARK_FILE, tmp_err->message);
- g_error_free(tmp_err);
- return FALSE;
- }
-
- entry = g_hash_table_lookup(marks->table, GINT_TO_POINTER(num));
- if (entry)
- entry->flags &= ~(SYLPHEED_MSG_NEW | SYLPHEED_MSG_UNREAD);
- else
- {
- marks->data_size += sizeof(MarkEntry);
- marks->data = g_realloc(marks->data, marks->data_size);
- entry = (MarkEntry *) (marks->data + marks->data_size - sizeof(MarkEntry));
- entry->num = num;
- entry->flags = 0;
- }
-
- status = self_marks_write(MN_VFS_MAILBOX(MN_MESSAGE(message)->mailbox)->vfs_uri, marks, err);
- self_marks_free(marks);
-
- return status;
- }}
-#line 792 "mn-sylpheed-mailbox-backend.c"
+#line 704 "mn-sylpheed-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
diff --git a/src/mn-sylpheed-mailbox-backend.gob b/src/mn-sylpheed-mailbox-backend.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -25,6 +25,26 @@ requires 2.0.14
%privateheader{
#include "mn-locked-callback.h"
+
+/* taken from procmsg.h in the Sylpheed sources */
+#define SYLPHEED_MSG_NEW (1U << 0)
+#define SYLPHEED_MSG_UNREAD (1U << 1)
+
+/* taken from defs.h in the Sylpheed sources */
+#define SYLPHEED_MARK_FILE ".sylpheed_mark"
+
+typedef struct
+{
+ int num;
+ guint32 flags;
+} MarkEntry;
+
+typedef struct
+{
+ char *data;
+ gsize data_size;
+ GHashTable *table;
+} Marks;
%}
%{
@@ -38,77 +58,27 @@ requires 2.0.14
#include <eel/eel.h>
#include "mn-mailbox-private.h"
#include "mn-reentrant-mailbox-private.h"
+#include "mn-vfs-mailbox-private.h"
#include "mn-vfs-mailbox-backend-private.h"
#include "mn-vfs.h"
#include "mn-util.h"
#include "mn-message-mime.h"
-
-/* taken from procmsg.h in the Sylpheed sources */
-#define SYLPHEED_MSG_NEW (1U << 0)
-#define SYLPHEED_MSG_UNREAD (1U << 1)
+#include "mn-sylpheed-message.h"
/* taken from defs.h in the Sylpheed sources */
-#define SYLPHEED_MARK_FILE ".sylpheed_mark"
#define SYLPHEED_MARK_VERSION 2
-typedef struct
-{
- int num;
- guint32 flags;
-} MarkEntry;
-
-typedef struct
-{
- char *data;
- gsize data_size;
- GHashTable *table;
-} Marks;
-
-static GStaticMutex timeouts_mutex = G_STATIC_MUTEX_INIT;
+/* taken from defs.h in the Claws Mail sources */
+#define CLAWS_MAIL_CACHE_FILE ".sylpheed_claws_cache"
%}
class MN:Sylpheed:Mailbox:Backend from MN:VFS:Mailbox:Backend
{
- private MNLockedGSource *monitor_timeout_source;
- private gboolean can_lock_mark_file;
-
class_init (class)
{
MN_VFS_MAILBOX_BACKEND_CLASS(class)->format = "Sylpheed";
}
- override (G:Object) GObject *
- constructor (GType type, unsigned int n_construct_properties, GObjectConstructParam *construct_params)
- {
- GObject *object;
- Self *self;
-
- object = PARENT_HANDLER(type, n_construct_properties, construct_params);
- self = SELF(object);
-
-#if WITH_SYLPHEED_LOCKING
- if (gnome_vfs_uri_is_local(MN_VFS_MAILBOX_BACKEND(self)->mailbox->vfs_uri))
- selfp->can_lock_mark_file = TRUE;
-#endif
-
- return object;
- }
-
- override (G:Object) void
- finalize (GObject *object)
- {
- Self *self = SELF(object);
-
- g_static_mutex_lock(&timeouts_mutex);
-
- if (selfp->monitor_timeout_source)
- mn_locked_g_source_remove(selfp->monitor_timeout_source);
-
- g_static_mutex_unlock(&timeouts_mutex);
-
- PARENT_HANDLER(object);
- }
-
override (MN:VFS:Mailbox:Backend) void
monitor_cb (MNVFSMailboxBackend *backend,
const char *info_uri,
@@ -123,72 +93,109 @@ class MN:Sylpheed:Mailbox:Backend from MN:VFS:Mailbox:Backend
filename = eel_uri_get_basename(info_uri);
if (filename)
{
- if (! strcmp(filename, SYLPHEED_MARK_FILE))
- {
- Self *self = SELF(backend);
-
- if (selfp->can_lock_mark_file)
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(backend->mailbox));
- else
- {
- /*
- * We cannot lock the mark file. To avoid races,
- * delay the check.
- */
-
- /*
- * We do not need to lock timeouts_mutex, because
- * this function and monitor_timeout_cb() are
- * always run in the same thread (from the GLib
- * main loop).
- */
- if (selfp->monitor_timeout_source)
- mn_locked_g_source_remove(selfp->monitor_timeout_source);
-
- selfp->monitor_timeout_source = mn_g_timeout_add_locked(3000,
- self_monitor_timeout_cb,
- self,
- (MNLockFunc) mn_g_static_mutex_lock,
- (MNUnlockFunc) mn_g_static_mutex_unlock,
- &timeouts_mutex);
- }
- }
- else if (mn_str_isnumeric(filename))
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(backend->mailbox));
+ /*
+ * The status of the mailbox can only have changed if the
+ * subject of the event is the mark file or a message file
+ * (having a numbered filename).
+ */
+ if (! strcmp(filename, SYLPHEED_MARK_FILE) || mn_str_isnumeric(filename))
+ mn_vfs_mailbox_backend_queue_check(backend);
g_free(filename);
}
}
}
- private gboolean
- monitor_timeout_cb (gpointer data)
+ override (MN:VFS:Mailbox:Backend) gboolean
+ is (MNVFSMailboxBackend *dummy,
+ MNVFSMailboxBackendClass *class,
+ MNVFSMailbox *mailbox)
{
- Self *self = data;
+ gboolean is;
+ GnomeVFSURI *uri;
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(MN_VFS_MAILBOX_BACKEND(self)->mailbox));
+ uri = gnome_vfs_uri_append_file_name(mailbox->vfs_uri, SYLPHEED_MARK_FILE);
+ is = mn_vfs_test(uri, G_FILE_TEST_IS_REGULAR);
+ gnome_vfs_uri_unref(uri);
- selfp->monitor_timeout_source = NULL;
- return FALSE; /* remove source */
+ return is;
}
- override (MN:VFS:Mailbox:Backend) gboolean
- is (MNVFSMailboxBackend *dummy,
- MNVFSMailboxBackendClass *class,
- MNVFSMailbox *mailbox)
+ private gboolean
+ is_claws_mail_mailbox (self)
{
- gboolean is = FALSE;
- GnomeVFSURI *markfile_uri;
+ gboolean is;
+ GnomeVFSURI *uri;
- markfile_uri = gnome_vfs_uri_append_file_name(mailbox->vfs_uri, SYLPHEED_MARK_FILE);
- is = mn_vfs_test(markfile_uri, G_FILE_TEST_IS_REGULAR);
- gnome_vfs_uri_unref(markfile_uri);
+ uri = gnome_vfs_uri_append_file_name(MN_VFS_MAILBOX_BACKEND(self)->mailbox->vfs_uri, CLAWS_MAIL_CACHE_FILE);
+ is = mn_vfs_test(uri, G_FILE_TEST_IS_REGULAR);
+ gnome_vfs_uri_unref(uri);
return is;
}
+ /* non-reentrant, must be called with a lock held */
+ private gboolean
+ has_sylpheed_locking (void)
+ {
+ static gboolean checked = FALSE;
+ static gboolean has = FALSE;
+
+ if (! checked)
+ {
+ char *output;
+
+ if (g_spawn_command_line_sync("sylpheed --version", &output, NULL, NULL, NULL))
+ {
+ if (strstr(output, "+locking"))
+ has = TRUE;
+ g_free(output);
+ }
+
+ checked = TRUE;
+ }
+
+ return has;
+ }
+
+ private void
+ update_check_latency (self)
+ {
+ MNVFSMailboxBackend *backend = MN_VFS_MAILBOX_BACKEND(self);
+
+ mn_vfs_mailbox_lock(backend->mailbox);
+
+ /*
+ * If it is a Claws Mail mailbox, the check_latency can be set to
+ * 0, since Claws Mail does not write the mark file in place but
+ * uses an atomic rename() to move the new mark file over the
+ * previous one.
+ */
+ if (self_is_claws_mail_mailbox(self))
+ backend->check_latency = 0;
+ else
+ {
+ /*
+ * If Sylpheed was compiled with the locking patch and the
+ * mailbox is local, check_latency can be set to 0, since we
+ * lock the mark file while reading it.
+ */
+ if (self_has_sylpheed_locking() && gnome_vfs_uri_is_local(backend->mailbox->vfs_uri))
+ backend->check_latency = 0;
+ else
+ /*
+ * Otherwise, set check_latency to 3 seconds to avoid race
+ * conditions that can occur when Sylpheed writes the mark
+ * file while we read it.
+ */
+ backend->check_latency = 3000;
+ }
+
+ mn_vfs_mailbox_unlock(backend->mailbox);
+ }
+
override (MN:VFS:Mailbox:Backend) void
- check (MNVFSMailboxBackend *backend, unsigned long check_id)
+ check (MNVFSMailboxBackend *backend, int check_id)
{
GError *err = NULL;
GnomeVFSResult result;
@@ -198,20 +205,24 @@ class MN:Sylpheed:Mailbox:Backend from MN:VFS:Mailbox:Backend
Marks *marks;
GSList *messages = NULL;
+ self_update_check_latency(SELF(backend));
+
mn_vfs_mailbox_backend_monitor(backend, check_id, backend->mailbox->uri, GNOME_VFS_MONITOR_DIRECTORY);
marks = self_marks_new(backend->mailbox->vfs_uri, &err);
if (! marks)
{
- GDK_THREADS_ENTER();
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ {
+ GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to read %s: %s"), SYLPHEED_MARK_FILE, err->message);
- g_error_free(err);
+ mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to read %s: %s"), SYLPHEED_MARK_FILE, err->message);
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
+ g_error_free(err);
return;
}
@@ -221,13 +232,15 @@ class MN:Sylpheed:Mailbox:Backend from MN:VFS:Mailbox:Backend
result = gnome_vfs_directory_open_from_uri(&handle, backend->mailbox->vfs_uri, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
if (result != GNOME_VFS_OK)
{
- GDK_THREADS_ENTER();
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ {
+ GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
- mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open folder: %s"), gnome_vfs_result_to_string(result));
+ mn_mailbox_set_error(MN_MAILBOX(backend->mailbox), _("unable to open folder: %s"), gnome_vfs_result_to_string(result));
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
goto end;
}
@@ -255,7 +268,8 @@ class MN:Sylpheed:Mailbox:Backend from MN:VFS:Mailbox:Backend
* own way (mark file) of differencing seen/unseen
* messages.
*/
- message = mn_vfs_message_new(backend,
+ message = mn_vfs_message_new(MN_TYPE_SYLPHEED_MESSAGE,
+ backend,
backend->mailbox->vfs_uri,
file_info->name,
flags,
@@ -270,7 +284,7 @@ class MN:Sylpheed:Mailbox:Backend from MN:VFS:Mailbox:Backend
finish:
GDK_THREADS_ENTER();
- if (! mn_reentrant_mailbox_check_aborted_unlocked(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
+ if (! mn_reentrant_mailbox_check_aborted(MN_REENTRANT_MAILBOX(backend->mailbox), check_id))
{
if (result == GNOME_VFS_ERROR_EOF || result == GNOME_VFS_OK)
{
@@ -311,13 +325,6 @@ class MN:Sylpheed:Mailbox:Backend from MN:VFS:Mailbox:Backend
return FALSE;
}
- /*
- * Even if --enable-sylpheed-locking was not used and we are here
- * after the 3 seconds delay, it does not hurt to obtain a lock,
- * in case the user has a patched Sylpheed but did not use
- * --enable-sylpheed-locking.
- */
-
memset(&lock, 0, sizeof(lock));
lock.l_start = 0; /* from l_whence */
lock.l_len = 0; /* to end of file */
@@ -335,7 +342,7 @@ class MN:Sylpheed:Mailbox:Backend from MN:VFS:Mailbox:Backend
}
else
{
- g_set_error(err, 0, 0, "unable to set encoding: %s", tmp_err->message);
+ g_set_error(err, 0, 0, _("unable to set encoding: %s"), tmp_err->message);
g_error_free(tmp_err);
}
@@ -393,7 +400,7 @@ class MN:Sylpheed:Mailbox:Backend from MN:VFS:Mailbox:Backend
return status;
}
- private Marks *
+ protected Marks *
marks_new (GnomeVFSURI *mailbox_uri (check null), GError **err)
{
Marks *marks = NULL;
@@ -448,7 +455,7 @@ class MN:Sylpheed:Mailbox:Backend from MN:VFS:Mailbox:Backend
return marks;
}
- private gboolean
+ protected gboolean
marks_write (GnomeVFSURI *mailbox_uri (check null),
Marks *marks (check null),
GError **err)
@@ -470,54 +477,11 @@ class MN:Sylpheed:Mailbox:Backend from MN:VFS:Mailbox:Backend
return status;
}
- private void
+ protected void
marks_free (Marks *marks (check null))
{
g_free(marks->data);
g_hash_table_destroy(marks->table);
g_free(marks);
}
-
- override (MN:VFS:Mailbox:Backend) gboolean
- mark_as_read (MNVFSMailboxBackend *dummy,
- MNVFSMessage *message,
- GError **err)
- {
- char *filename;
- int num;
- GError *tmp_err = NULL;
- Marks *marks;
- MarkEntry *entry;
- gboolean status;
-
- filename = gnome_vfs_uri_extract_short_name(message->vfs_uri);
- g_assert(mn_str_isnumeric(filename));
- num = atoi(filename);
- g_free(filename);
-
- marks = self_marks_new(MN_VFS_MAILBOX(MN_MESSAGE(message)->mailbox)->vfs_uri, &tmp_err);
- if (! marks)
- {
- g_set_error(err, 0, 0, _("Unable to read %s: %s."), SYLPHEED_MARK_FILE, tmp_err->message);
- g_error_free(tmp_err);
- return FALSE;
- }
-
- entry = g_hash_table_lookup(marks->table, GINT_TO_POINTER(num));
- if (entry)
- entry->flags &= ~(SYLPHEED_MSG_NEW | SYLPHEED_MSG_UNREAD);
- else
- {
- marks->data_size += sizeof(MarkEntry);
- marks->data = g_realloc(marks->data, marks->data_size);
- entry = (MarkEntry *) (marks->data + marks->data_size - sizeof(MarkEntry));
- entry->num = num;
- entry->flags = 0;
- }
-
- status = self_marks_write(MN_VFS_MAILBOX(MN_MESSAGE(message)->mailbox)->vfs_uri, marks, err);
- self_marks_free(marks);
-
- return status;
- }
}
diff --git a/src/mn-sylpheed-mailbox-backend.h b/src/mn-sylpheed-mailbox-backend.h
@@ -25,9 +25,6 @@ extern "C" {
#define MN_SYLPHEED_MAILBOX_BACKEND_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_sylpheed_mailbox_backend_get_type(), MNSylpheedMailboxBackendClass)
-/* Private structure type */
-typedef struct _MNSylpheedMailboxBackendPrivate MNSylpheedMailboxBackendPrivate;
-
/*
* Main object structure
*/
@@ -37,8 +34,6 @@ typedef struct _MNSylpheedMailboxBackend MNSylpheedMailboxBackend;
#endif
struct _MNSylpheedMailboxBackend {
MNVFSMailboxBackend __parent__;
- /*< private >*/
- MNSylpheedMailboxBackendPrivate *_priv;
};
/*
diff --git a/src/mn-sylpheed-message-private.h b/src/mn-sylpheed-message-private.h
@@ -0,0 +1,17 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_SYLPHEED_MESSAGE_PRIVATE_H__
+#define __MN_SYLPHEED_MESSAGE_PRIVATE_H__
+
+#include "mn-sylpheed-message.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-sylpheed-message.c b/src/mn-sylpheed-message.c
@@ -0,0 +1,172 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-sylpheed-message.h"
+
+#include "mn-sylpheed-message-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 26 "mn-sylpheed-message.gob"
+
+#include "config.h"
+#include <stdlib.h>
+#include <glib/gi18n.h>
+#include "mn-util.h"
+#include "mn-sylpheed-mailbox-backend-private.h"
+
+#line 34 "mn-sylpheed-message.c"
+/* self casting macros */
+#define SELF(x) MN_SYLPHEED_MESSAGE(x)
+#define SELF_CONST(x) MN_SYLPHEED_MESSAGE_CONST(x)
+#define IS_SELF(x) MN_IS_SYLPHEED_MESSAGE(x)
+#define TYPE_SELF MN_TYPE_SYLPHEED_MESSAGE
+#define SELF_CLASS(x) MN_SYLPHEED_MESSAGE_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_SYLPHEED_MESSAGE_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNSylpheedMessage Self;
+typedef MNSylpheedMessageClass SelfClass;
+
+/* here are local prototypes */
+static void mn_sylpheed_message_init (MNSylpheedMessage * o) G_GNUC_UNUSED;
+static void mn_sylpheed_message_class_init (MNSylpheedMessageClass * c) G_GNUC_UNUSED;
+static gboolean ___1_mn_sylpheed_message_mark_as_read_impl (MNMessage * message, GError ** err) G_GNUC_UNUSED;
+
+/* pointer to the class of our parent */
+static MNVFSMessageClass *parent_class = NULL;
+
+GType
+mn_sylpheed_message_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNSylpheedMessageClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_sylpheed_message_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNSylpheedMessage),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_sylpheed_message_init,
+ NULL
+ };
+
+ type = g_type_register_static (MN_TYPE_VFS_MESSAGE, "MNSylpheedMessage", &info, (GTypeFlags)0);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNSylpheedMessage *)g_object_new(mn_sylpheed_message_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNSylpheedMessage * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNSylpheedMessage *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNSylpheedMessage *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNSylpheedMessage *)g_object_new_valist (mn_sylpheed_message_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+static void
+mn_sylpheed_message_init (MNSylpheedMessage * o G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Sylpheed:Message::init"
+}
+#undef __GOB_FUNCTION__
+static void
+mn_sylpheed_message_class_init (MNSylpheedMessageClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Sylpheed:Message::class_init"
+ MNMessageClass *mn_message_class = (MNMessageClass *)c;
+
+ parent_class = g_type_class_ref (MN_TYPE_VFS_MESSAGE);
+
+#line 36 "mn-sylpheed-message.gob"
+ mn_message_class->mark_as_read_impl = ___1_mn_sylpheed_message_mark_as_read_impl;
+#line 114 "mn-sylpheed-message.c"
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 36 "mn-sylpheed-message.gob"
+static gboolean
+___1_mn_sylpheed_message_mark_as_read_impl (MNMessage * message G_GNUC_UNUSED, GError ** err)
+#line 123 "mn-sylpheed-message.c"
+#define PARENT_HANDLER(___message,___err) \
+ ((MN_MESSAGE_CLASS(parent_class)->mark_as_read_impl)? \
+ (* MN_MESSAGE_CLASS(parent_class)->mark_as_read_impl)(___message,___err): \
+ ((gboolean )0))
+{
+#define __GOB_FUNCTION__ "MN:Sylpheed:Message::mark_as_read_impl"
+{
+#line 38 "mn-sylpheed-message.gob"
+
+ MNVFSMessage *vmessage = MN_VFS_MESSAGE(message);
+ char *filename;
+ int num;
+ GError *tmp_err = NULL;
+ Marks *marks;
+ MarkEntry *entry;
+ gboolean status;
+
+ filename = gnome_vfs_uri_extract_short_name(vmessage->vfs_uri);
+ g_assert(mn_str_isnumeric(filename));
+ num = atoi(filename);
+ g_free(filename);
+
+ marks = mn_sylpheed_mailbox_backend_marks_new(MN_VFS_MAILBOX(message->mailbox)->vfs_uri, &tmp_err);
+ if (! marks)
+ {
+ g_set_error(err, 0, 0, _("Unable to read %s: %s."), SYLPHEED_MARK_FILE, tmp_err->message);
+ g_error_free(tmp_err);
+ return FALSE;
+ }
+
+ entry = g_hash_table_lookup(marks->table, GINT_TO_POINTER(num));
+ if (entry)
+ entry->flags &= ~(SYLPHEED_MSG_NEW | SYLPHEED_MSG_UNREAD);
+ else
+ {
+ marks->data_size += sizeof(MarkEntry);
+ marks->data = g_realloc(marks->data, marks->data_size);
+ entry = (MarkEntry *) (marks->data + marks->data_size - sizeof(MarkEntry));
+ entry->num = num;
+ entry->flags = 0;
+ }
+
+ status = mn_sylpheed_mailbox_backend_marks_write(MN_VFS_MAILBOX(message->mailbox)->vfs_uri, marks, err);
+ mn_sylpheed_mailbox_backend_marks_free(marks);
+
+ return status;
+ }}
+#line 171 "mn-sylpheed-message.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
diff --git a/src/mn-sylpheed-message.gob b/src/mn-sylpheed-message.gob
@@ -0,0 +1,77 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%headertop{
+#include "mn-vfs-message.h"
+%}
+
+%{
+#include "config.h"
+#include <stdlib.h>
+#include <glib/gi18n.h>
+#include "mn-util.h"
+#include "mn-sylpheed-mailbox-backend-private.h"
+%}
+
+class MN:Sylpheed:Message from MN:VFS:Message
+{
+ override (MN:Message) gboolean
+ mark_as_read_impl (MNMessage *message, GError **err)
+ {
+ MNVFSMessage *vmessage = MN_VFS_MESSAGE(message);
+ char *filename;
+ int num;
+ GError *tmp_err = NULL;
+ Marks *marks;
+ MarkEntry *entry;
+ gboolean status;
+
+ filename = gnome_vfs_uri_extract_short_name(vmessage->vfs_uri);
+ g_assert(mn_str_isnumeric(filename));
+ num = atoi(filename);
+ g_free(filename);
+
+ marks = mn_sylpheed_mailbox_backend_marks_new(MN_VFS_MAILBOX(message->mailbox)->vfs_uri, &tmp_err);
+ if (! marks)
+ {
+ g_set_error(err, 0, 0, _("Unable to read %s: %s."), SYLPHEED_MARK_FILE, tmp_err->message);
+ g_error_free(tmp_err);
+ return FALSE;
+ }
+
+ entry = g_hash_table_lookup(marks->table, GINT_TO_POINTER(num));
+ if (entry)
+ entry->flags &= ~(SYLPHEED_MSG_NEW | SYLPHEED_MSG_UNREAD);
+ else
+ {
+ marks->data_size += sizeof(MarkEntry);
+ marks->data = g_realloc(marks->data, marks->data_size);
+ entry = (MarkEntry *) (marks->data + marks->data_size - sizeof(MarkEntry));
+ entry->num = num;
+ entry->flags = 0;
+ }
+
+ status = mn_sylpheed_mailbox_backend_marks_write(MN_VFS_MAILBOX(message->mailbox)->vfs_uri, marks, err);
+ mn_sylpheed_mailbox_backend_marks_free(marks);
+
+ return status;
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-sylpheed-message.gob.stamp
diff --git a/src/mn-sylpheed-message.h b/src/mn-sylpheed-message.h
@@ -0,0 +1,57 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include "mn-vfs-message.h"
+
+#ifndef __MN_SYLPHEED_MESSAGE_H__
+#define __MN_SYLPHEED_MESSAGE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_SYLPHEED_MESSAGE (mn_sylpheed_message_get_type())
+#define MN_SYLPHEED_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sylpheed_message_get_type(), MNSylpheedMessage)
+#define MN_SYLPHEED_MESSAGE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_sylpheed_message_get_type(), MNSylpheedMessage const)
+#define MN_SYLPHEED_MESSAGE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_sylpheed_message_get_type(), MNSylpheedMessageClass)
+#define MN_IS_SYLPHEED_MESSAGE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_sylpheed_message_get_type ())
+
+#define MN_SYLPHEED_MESSAGE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_sylpheed_message_get_type(), MNSylpheedMessageClass)
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_SYLPHEED_MESSAGE__
+#define __TYPEDEF_MN_SYLPHEED_MESSAGE__
+typedef struct _MNSylpheedMessage MNSylpheedMessage;
+#endif
+struct _MNSylpheedMessage {
+ MNVFSMessage __parent__;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNSylpheedMessageClass MNSylpheedMessageClass;
+struct _MNSylpheedMessageClass {
+ MNVFSMessageClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_sylpheed_message_get_type (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-system-vfs-mailbox-properties.gob b/src/mn-system-vfs-mailbox-properties.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-system-vfs-mailbox.c b/src/mn-system-vfs-mailbox.c
@@ -113,52 +113,53 @@ mn_system_vfs_mailbox_class_init (MNSystemVFSMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_VFS_MAILBOX);
-#line 41 "mn-system-vfs-mailbox.gob"
+#line 40 "mn-system-vfs-mailbox.gob"
mn_mailbox_class->seal = ___2_mn_system_vfs_mailbox_seal;
-#line 51 "mn-system-vfs-mailbox.gob"
+#line 52 "mn-system-vfs-mailbox.gob"
mn_mailbox_class->parse_uri = ___3_mn_system_vfs_mailbox_parse_uri;
-#line 64 "mn-system-vfs-mailbox.gob"
+#line 65 "mn-system-vfs-mailbox.gob"
mn_mailbox_class->check = ___4_mn_system_vfs_mailbox_check;
#line 123 "mn-system-vfs-mailbox.c"
{
#line 36 "mn-system-vfs-mailbox.gob"
MN_MAILBOX_CLASS(class)->type = "system-vfs";
- MN_VFS_MAILBOX_CLASS(class)->stock_id = MN_STOCK_SYSTEM_MAILBOX;
-#line 130 "mn-system-vfs-mailbox.c"
+#line 129 "mn-system-vfs-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 41 "mn-system-vfs-mailbox.gob"
+#line 40 "mn-system-vfs-mailbox.gob"
static void
___2_mn_system_vfs_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 140 "mn-system-vfs-mailbox.c"
+#line 139 "mn-system-vfs-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->seal) \
(* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:System:VFS:Mailbox::seal"
{
-#line 43 "mn-system-vfs-mailbox.gob"
+#line 42 "mn-system-vfs-mailbox.gob"
+ mn_mailbox_set_stock_id(mailbox, MN_STOCK_SYSTEM_MAILBOX);
+
MN_VFS_MAILBOX(mailbox)->uri = g_strdup(self_get_uri());
mailbox->runtime_name = g_strdup(_("System mailbox"));
PARENT_HANDLER(mailbox);
}}
-#line 155 "mn-system-vfs-mailbox.c"
+#line 156 "mn-system-vfs-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 51 "mn-system-vfs-mailbox.gob"
+#line 52 "mn-system-vfs-mailbox.gob"
static MNMailbox *
___3_mn_system_vfs_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const char * uri)
-#line 162 "mn-system-vfs-mailbox.c"
+#line 163 "mn-system-vfs-mailbox.c"
#define PARENT_HANDLER(___dummy,___uri) \
((MN_MAILBOX_CLASS(parent_class)->parse_uri)? \
(* MN_MAILBOX_CLASS(parent_class)->parse_uri)(___dummy,___uri): \
@@ -166,7 +167,7 @@ ___3_mn_system_vfs_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const cha
{
#define __GOB_FUNCTION__ "MN:System:VFS:Mailbox::parse_uri"
{
-#line 53 "mn-system-vfs-mailbox.gob"
+#line 54 "mn-system-vfs-mailbox.gob"
const char *system_uri;
MNMailbox *mailbox = NULL;
@@ -177,21 +178,21 @@ ___3_mn_system_vfs_mailbox_parse_uri (MNMailbox * dummy G_GNUC_UNUSED, const cha
return mailbox;
}}
-#line 181 "mn-system-vfs-mailbox.c"
+#line 182 "mn-system-vfs-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 64 "mn-system-vfs-mailbox.gob"
+#line 65 "mn-system-vfs-mailbox.gob"
static void
___4_mn_system_vfs_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 188 "mn-system-vfs-mailbox.c"
+#line 189 "mn-system-vfs-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->check) \
(* MN_MAILBOX_CLASS(parent_class)->check)(___mailbox); }
{
#define __GOB_FUNCTION__ "MN:System:VFS:Mailbox::check"
{
-#line 66 "mn-system-vfs-mailbox.gob"
+#line 67 "mn-system-vfs-mailbox.gob"
if (MN_VFS_MAILBOX(mailbox)->uri)
{
@@ -203,18 +204,18 @@ ___4_mn_system_vfs_mailbox_check (MNMailbox * mailbox G_GNUC_UNUSED)
mn_mailbox_set_poll(mailbox, FALSE); /* disable the mailbox */
}
}}
-#line 207 "mn-system-vfs-mailbox.c"
+#line 208 "mn-system-vfs-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 78 "mn-system-vfs-mailbox.gob"
+#line 79 "mn-system-vfs-mailbox.gob"
const char *
mn_system_vfs_mailbox_get_uri (void)
-#line 214 "mn-system-vfs-mailbox.c"
+#line 215 "mn-system-vfs-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:System:VFS:Mailbox::get_uri"
{
-#line 80 "mn-system-vfs-mailbox.gob"
+#line 81 "mn-system-vfs-mailbox.gob"
static char *global_uri = NULL;
G_LOCK_DEFINE_STATIC(global_uri);
@@ -253,5 +254,5 @@ mn_system_vfs_mailbox_get_uri (void)
return uri;
}}
-#line 257 "mn-system-vfs-mailbox.c"
+#line 258 "mn-system-vfs-mailbox.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-system-vfs-mailbox.gob b/src/mn-system-vfs-mailbox.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -35,12 +35,13 @@ class MN:System:VFS:Mailbox from MN:VFS:Mailbox
class_init (class)
{
MN_MAILBOX_CLASS(class)->type = "system-vfs";
- MN_VFS_MAILBOX_CLASS(class)->stock_id = MN_STOCK_SYSTEM_MAILBOX;
}
override (MN:Mailbox) void
seal (MNMailbox *mailbox)
{
+ mn_mailbox_set_stock_id(mailbox, MN_STOCK_SYSTEM_MAILBOX);
+
MN_VFS_MAILBOX(mailbox)->uri = g_strdup(self_get_uri());
mailbox->runtime_name = g_strdup(_("System mailbox"));
diff --git a/src/mn-test-mailbox.gob b/src/mn-test-mailbox.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-text-table.c b/src/mn-text-table.c
@@ -174,9 +174,9 @@ mn_text_table_class_init (MNTextTableClass * c G_GNUC_UNUSED)
gtk_widget_class->realize = ___4_mn_text_table_realize;
#line 126 "mn-text-table.gob"
gtk_widget_class->expose_event = ___5_mn_text_table_expose_event;
-#line 137 "mn-text-table.gob"
+#line 140 "mn-text-table.gob"
gtk_widget_class->size_request = ___6_mn_text_table_size_request;
-#line 280 "mn-text-table.gob"
+#line 283 "mn-text-table.gob"
c->clear = ___real_mn_text_table_clear;
#line 182 "mn-text-table.c"
g_object_class->finalize = ___finalize;
@@ -289,26 +289,29 @@ ___5_mn_text_table_expose_event (GtkWidget * widget G_GNUC_UNUSED, GdkEventExpos
Self *self = SELF(widget);
- self_relayout(self);
- self_redraw(self);
+ if (GTK_WIDGET_MAPPED(widget))
+ {
+ self_relayout(self);
+ self_redraw(self);
+ }
return FALSE; /* propagate event */
}}
-#line 298 "mn-text-table.c"
+#line 301 "mn-text-table.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 137 "mn-text-table.gob"
+#line 140 "mn-text-table.gob"
static void
___6_mn_text_table_size_request (GtkWidget * widget G_GNUC_UNUSED, GtkRequisition * requisition)
-#line 305 "mn-text-table.c"
+#line 308 "mn-text-table.c"
#define PARENT_HANDLER(___widget,___requisition) \
{ if(GTK_WIDGET_CLASS(parent_class)->size_request) \
(* GTK_WIDGET_CLASS(parent_class)->size_request)(___widget,___requisition); }
{
#define __GOB_FUNCTION__ "MN:Text:Table::size_request"
{
-#line 139 "mn-text-table.gob"
+#line 142 "mn-text-table.gob"
Self *self = SELF(widget);
@@ -317,23 +320,23 @@ ___6_mn_text_table_size_request (GtkWidget * widget G_GNUC_UNUSED, GtkRequisitio
requisition->width = selfp->width;
requisition->height = selfp->height;
}}
-#line 321 "mn-text-table.c"
+#line 324 "mn-text-table.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 148 "mn-text-table.gob"
+#line 151 "mn-text-table.gob"
static void
mn_text_table_set_dirty (MNTextTable * self)
-#line 328 "mn-text-table.c"
+#line 331 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::set_dirty"
-#line 148 "mn-text-table.gob"
+#line 151 "mn-text-table.gob"
g_return_if_fail (self != NULL);
-#line 148 "mn-text-table.gob"
+#line 151 "mn-text-table.gob"
g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 335 "mn-text-table.c"
+#line 338 "mn-text-table.c"
{
-#line 150 "mn-text-table.gob"
+#line 153 "mn-text-table.gob"
if (! selfp->dirty)
{
@@ -341,22 +344,22 @@ mn_text_table_set_dirty (MNTextTable * self)
gtk_widget_queue_resize(GTK_WIDGET(self));
}
}}
-#line 345 "mn-text-table.c"
+#line 348 "mn-text-table.c"
#undef __GOB_FUNCTION__
-#line 158 "mn-text-table.gob"
+#line 161 "mn-text-table.gob"
static void
mn_text_table_context_changed (MNTextTable * self)
-#line 351 "mn-text-table.c"
+#line 354 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::context_changed"
-#line 158 "mn-text-table.gob"
+#line 161 "mn-text-table.gob"
g_return_if_fail (self != NULL);
-#line 158 "mn-text-table.gob"
+#line 161 "mn-text-table.gob"
g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 358 "mn-text-table.c"
+#line 361 "mn-text-table.c"
{
-#line 160 "mn-text-table.gob"
+#line 163 "mn-text-table.gob"
GList *la;
@@ -379,22 +382,22 @@ mn_text_table_context_changed (MNTextTable * self)
self_set_dirty(self);
}}
-#line 383 "mn-text-table.c"
+#line 386 "mn-text-table.c"
#undef __GOB_FUNCTION__
-#line 183 "mn-text-table.gob"
+#line 186 "mn-text-table.gob"
static void
mn_text_table_relayout (MNTextTable * self)
-#line 389 "mn-text-table.c"
+#line 392 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::relayout"
-#line 183 "mn-text-table.gob"
+#line 186 "mn-text-table.gob"
g_return_if_fail (self != NULL);
-#line 183 "mn-text-table.gob"
+#line 186 "mn-text-table.gob"
g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 396 "mn-text-table.c"
+#line 399 "mn-text-table.c"
{
-#line 185 "mn-text-table.gob"
+#line 188 "mn-text-table.gob"
int i;
GList *la;
@@ -453,22 +456,22 @@ mn_text_table_relayout (MNTextTable * self)
selfp->dirty = FALSE;
}}
-#line 457 "mn-text-table.c"
+#line 460 "mn-text-table.c"
#undef __GOB_FUNCTION__
-#line 244 "mn-text-table.gob"
+#line 247 "mn-text-table.gob"
static void
mn_text_table_redraw (MNTextTable * self)
-#line 463 "mn-text-table.c"
+#line 466 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::redraw"
-#line 244 "mn-text-table.gob"
+#line 247 "mn-text-table.gob"
g_return_if_fail (self != NULL);
-#line 244 "mn-text-table.gob"
+#line 247 "mn-text-table.gob"
g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 470 "mn-text-table.c"
+#line 473 "mn-text-table.c"
{
-#line 246 "mn-text-table.gob"
+#line 249 "mn-text-table.gob"
GtkWidget *widget = GTK_WIDGET(self);
GList *la;
@@ -502,33 +505,33 @@ mn_text_table_redraw (MNTextTable * self)
y += VERTICAL_SPACING;
}
}}
-#line 506 "mn-text-table.c"
+#line 509 "mn-text-table.c"
#undef __GOB_FUNCTION__
-#line 280 "mn-text-table.gob"
+#line 283 "mn-text-table.gob"
void
mn_text_table_clear (MNTextTable * self)
-#line 512 "mn-text-table.c"
+#line 515 "mn-text-table.c"
{
MNTextTableClass *klass;
-#line 280 "mn-text-table.gob"
+#line 283 "mn-text-table.gob"
g_return_if_fail (self != NULL);
-#line 280 "mn-text-table.gob"
+#line 283 "mn-text-table.gob"
g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 519 "mn-text-table.c"
+#line 522 "mn-text-table.c"
klass = MN_TEXT_TABLE_GET_CLASS(self);
if(klass->clear)
(*klass->clear)(self);
}
-#line 280 "mn-text-table.gob"
+#line 283 "mn-text-table.gob"
static void
___real_mn_text_table_clear (MNTextTable * self G_GNUC_UNUSED)
-#line 528 "mn-text-table.c"
+#line 531 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::clear"
{
-#line 282 "mn-text-table.gob"
+#line 285 "mn-text-table.gob"
Row *row;
@@ -541,43 +544,43 @@ ___real_mn_text_table_clear (MNTextTable * self G_GNUC_UNUSED)
self_set_dirty(self);
}}
-#line 545 "mn-text-table.c"
+#line 548 "mn-text-table.c"
#undef __GOB_FUNCTION__
-#line 295 "mn-text-table.gob"
+#line 298 "mn-text-table.gob"
MNTextTableCell *
mn_text_table_append_text_cell (MNTextTable * self, const char * text)
-#line 551 "mn-text-table.c"
+#line 554 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::append_text_cell"
-#line 295 "mn-text-table.gob"
+#line 298 "mn-text-table.gob"
g_return_val_if_fail (self != NULL, (MNTextTableCell * )0);
-#line 295 "mn-text-table.gob"
+#line 298 "mn-text-table.gob"
g_return_val_if_fail (MN_IS_TEXT_TABLE (self), (MNTextTableCell * )0);
-#line 558 "mn-text-table.c"
+#line 561 "mn-text-table.c"
{
-#line 297 "mn-text-table.gob"
+#line 300 "mn-text-table.gob"
return self_append_text_cell_from_layout(self, gtk_widget_create_pango_layout(GTK_WIDGET(self), text));
}}
-#line 564 "mn-text-table.c"
+#line 567 "mn-text-table.c"
#undef __GOB_FUNCTION__
-#line 301 "mn-text-table.gob"
+#line 304 "mn-text-table.gob"
MNTextTableCell *
mn_text_table_append_text_cell_from_markup (MNTextTable * self, const char * markup)
-#line 570 "mn-text-table.c"
+#line 573 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::append_text_cell_from_markup"
-#line 301 "mn-text-table.gob"
+#line 304 "mn-text-table.gob"
g_return_val_if_fail (self != NULL, (MNTextTableCell * )0);
-#line 301 "mn-text-table.gob"
+#line 304 "mn-text-table.gob"
g_return_val_if_fail (MN_IS_TEXT_TABLE (self), (MNTextTableCell * )0);
-#line 301 "mn-text-table.gob"
+#line 304 "mn-text-table.gob"
g_return_val_if_fail (markup != NULL, (MNTextTableCell * )0);
-#line 579 "mn-text-table.c"
+#line 582 "mn-text-table.c"
{
-#line 303 "mn-text-table.gob"
+#line 306 "mn-text-table.gob"
PangoLayout *layout;
@@ -586,24 +589,24 @@ mn_text_table_append_text_cell_from_markup (MNTextTable * self, const char * mar
return self_append_text_cell_from_layout(self, layout);
}}
-#line 590 "mn-text-table.c"
+#line 593 "mn-text-table.c"
#undef __GOB_FUNCTION__
-#line 312 "mn-text-table.gob"
+#line 315 "mn-text-table.gob"
MNTextTableCell *
mn_text_table_append_text_cell_from_layout (MNTextTable * self, PangoLayout * layout)
-#line 596 "mn-text-table.c"
+#line 599 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::append_text_cell_from_layout"
-#line 312 "mn-text-table.gob"
+#line 315 "mn-text-table.gob"
g_return_val_if_fail (self != NULL, (MNTextTableCell * )0);
-#line 312 "mn-text-table.gob"
+#line 315 "mn-text-table.gob"
g_return_val_if_fail (MN_IS_TEXT_TABLE (self), (MNTextTableCell * )0);
-#line 312 "mn-text-table.gob"
+#line 315 "mn-text-table.gob"
g_return_val_if_fail (layout != NULL, (MNTextTableCell * )0);
-#line 605 "mn-text-table.c"
+#line 608 "mn-text-table.c"
{
-#line 314 "mn-text-table.gob"
+#line 317 "mn-text-table.gob"
MNTextTableCell *cell;
@@ -615,22 +618,22 @@ mn_text_table_append_text_cell_from_layout (MNTextTable * self, PangoLayout * la
return cell;
}}
-#line 619 "mn-text-table.c"
+#line 622 "mn-text-table.c"
#undef __GOB_FUNCTION__
-#line 326 "mn-text-table.gob"
+#line 329 "mn-text-table.gob"
MNTextTableCell *
mn_text_table_append_blank_cell (MNTextTable * self, int width, int height)
-#line 625 "mn-text-table.c"
+#line 628 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::append_blank_cell"
-#line 326 "mn-text-table.gob"
+#line 329 "mn-text-table.gob"
g_return_val_if_fail (self != NULL, (MNTextTableCell * )0);
-#line 326 "mn-text-table.gob"
+#line 329 "mn-text-table.gob"
g_return_val_if_fail (MN_IS_TEXT_TABLE (self), (MNTextTableCell * )0);
-#line 632 "mn-text-table.c"
+#line 635 "mn-text-table.c"
{
-#line 328 "mn-text-table.gob"
+#line 331 "mn-text-table.gob"
MNTextTableCell *cell;
@@ -644,22 +647,22 @@ mn_text_table_append_blank_cell (MNTextTable * self, int width, int height)
return cell;
}}
-#line 648 "mn-text-table.c"
+#line 651 "mn-text-table.c"
#undef __GOB_FUNCTION__
-#line 342 "mn-text-table.gob"
+#line 345 "mn-text-table.gob"
static void
mn_text_table_append_cell_real (MNTextTable * self, MNTextTableCell * cell)
-#line 654 "mn-text-table.c"
+#line 657 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::append_cell_real"
-#line 342 "mn-text-table.gob"
+#line 345 "mn-text-table.gob"
g_return_if_fail (self != NULL);
-#line 342 "mn-text-table.gob"
+#line 345 "mn-text-table.gob"
g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 661 "mn-text-table.c"
+#line 664 "mn-text-table.c"
{
-#line 344 "mn-text-table.gob"
+#line 347 "mn-text-table.gob"
if (! selfp->row)
{
@@ -673,26 +676,26 @@ mn_text_table_append_cell_real (MNTextTable * self, MNTextTableCell * cell)
self_set_dirty(self);
}}
-#line 677 "mn-text-table.c"
+#line 680 "mn-text-table.c"
#undef __GOB_FUNCTION__
-#line 358 "mn-text-table.gob"
+#line 361 "mn-text-table.gob"
void
mn_text_table_cell_set_text (MNTextTable * self, MNTextTableCell * cell, const char * text)
-#line 683 "mn-text-table.c"
+#line 686 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::cell_set_text"
-#line 358 "mn-text-table.gob"
+#line 361 "mn-text-table.gob"
g_return_if_fail (self != NULL);
-#line 358 "mn-text-table.gob"
+#line 361 "mn-text-table.gob"
g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 358 "mn-text-table.gob"
+#line 361 "mn-text-table.gob"
g_return_if_fail (cell != NULL);
-#line 358 "mn-text-table.gob"
+#line 361 "mn-text-table.gob"
g_return_if_fail (text != NULL);
-#line 694 "mn-text-table.c"
+#line 697 "mn-text-table.c"
{
-#line 362 "mn-text-table.gob"
+#line 365 "mn-text-table.gob"
const char *current_text;
@@ -706,24 +709,24 @@ mn_text_table_cell_set_text (MNTextTable * self, MNTextTableCell * cell, const c
self_set_dirty(self);
}
}}
-#line 710 "mn-text-table.c"
+#line 713 "mn-text-table.c"
#undef __GOB_FUNCTION__
-#line 376 "mn-text-table.gob"
+#line 379 "mn-text-table.gob"
void
mn_text_table_line_break (MNTextTable * self)
-#line 716 "mn-text-table.c"
+#line 719 "mn-text-table.c"
{
#define __GOB_FUNCTION__ "MN:Text:Table::line_break"
-#line 376 "mn-text-table.gob"
+#line 379 "mn-text-table.gob"
g_return_if_fail (self != NULL);
-#line 376 "mn-text-table.gob"
+#line 379 "mn-text-table.gob"
g_return_if_fail (MN_IS_TEXT_TABLE (self));
-#line 723 "mn-text-table.c"
+#line 726 "mn-text-table.c"
{
-#line 378 "mn-text-table.gob"
+#line 381 "mn-text-table.gob"
selfp->row = NULL;
}}
-#line 729 "mn-text-table.c"
+#line 732 "mn-text-table.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-text-table.gob b/src/mn-text-table.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -128,8 +128,11 @@ class MN:Text:Table from Gtk:Drawing:Area
{
Self *self = SELF(widget);
- self_relayout(self);
- self_redraw(self);
+ if (GTK_WIDGET_MAPPED(widget))
+ {
+ self_relayout(self);
+ self_redraw(self);
+ }
return FALSE; /* propagate event */
}
diff --git a/src/mn-tooltips.gob b/src/mn-tooltips.gob
@@ -10,7 +10,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/src/mn-util.c b/src/mn-util.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -32,6 +32,7 @@
#include "mn-util.h"
#include "mn-mailboxes.h"
#include "mn-shell.h"
+#include "mn-conf.h"
/*** types *******************************************************************/
@@ -348,7 +349,7 @@ mn_pixbuf_new (const char *filename)
pixbuf = gdk_pixbuf_new_from_file(filename, &err);
if (! pixbuf)
{
- g_warning(_("error loading image: %s"), err->message);
+ mn_fatal_error_dialog(NULL, _("Unable to load image \"%s\" (%s). Please check your Mail Notification installation."), filename, err->message);
g_error_free(err);
}
@@ -485,6 +486,9 @@ mn_widget_get_parent_window (GtkWidget *widget)
* Allows @dialog to pick a file (%GTK_FILE_CHOOSER_ACTION_OPEN) or
* select a folder (%GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) at the
* same time.
+ *
+ * Can be removed after
+ * http://bugzilla.gnome.org/show_bug.cgi?id=136294 is fixed.
**/
void
mn_file_chooser_dialog_allow_select_folder (GtkFileChooserDialog *dialog,
@@ -1418,6 +1422,102 @@ mn_g_static_mutex_unlock (GStaticMutex *mutex)
g_static_mutex_unlock(mutex);
}
+char *
+mn_subst_command (const char *command,
+ MNSubstCommandFunction subst,
+ gpointer data,
+ GError **err)
+{
+ GString *result;
+ const char *p;
+
+ g_return_val_if_fail(command != NULL, NULL);
+ g_return_val_if_fail(subst != NULL, NULL);
+
+ result = g_string_new(NULL);
+
+ for (p = command; *p;)
+ if (*p == '%')
+ {
+ char *name = NULL;
+
+ if (p[1] == '%')
+ {
+ g_string_append_c(result, '%');
+ p += 2;
+ }
+ else if (p[1] == '{')
+ {
+ char *end;
+
+ end = strchr(p + 2, '}');
+ if (! end)
+ {
+ g_set_error(err, 0, 0, _("unterminated substitution"));
+ goto error;
+ }
+
+ name = g_strndup(p + 2, end - p - 2);
+ p = end + 1;
+ }
+ else
+ {
+ const char *end = p + 1;
+
+ while (g_ascii_isalnum(*end) || *end == '-' || *end == '_')
+ end++;
+
+ name = g_strndup(p + 1, end - p - 1);
+ p = end;
+ }
+
+ if (name)
+ {
+ gboolean ok = FALSE;
+
+ if (*name)
+ {
+ char *value;
+
+ if (subst(name, &value, data))
+ {
+ char *quoted;
+
+ quoted = mn_shell_quote_safe(value ? value : "");
+ g_free(value);
+
+ g_string_append(result, quoted);
+ g_free(quoted);
+
+ ok = TRUE;
+ }
+ else
+ g_set_error(err, 0, 0, _("unknown substitution \"%s\""), name);
+ }
+ else
+ g_set_error(err, 0, 0, _("empty substitution"));
+
+ g_free(name);
+ if (! ok)
+ goto error;
+ }
+ }
+ else
+ {
+ g_string_append_c(result, *p);
+ p++;
+ }
+
+ goto end; /* success */
+
+ error:
+ g_string_free(result, TRUE);
+ result = NULL;
+
+ end:
+ return result ? g_string_free(result, FALSE) : NULL;
+}
+
static void
mn_handle_execute_result (int status, const char *command)
{
@@ -1545,9 +1645,12 @@ mn_g_value_to_string (const GValue *value)
g_return_val_if_fail(G_IS_VALUE(value), NULL);
- if (G_VALUE_HOLDS_BOOLEAN(value))
- str = g_strdup(g_value_get_boolean(value) ? "true" : "false");
- else if (G_VALUE_HOLDS_INT(value))
+ /*
+ * We only handle types which we actually export (grep for
+ * MN_MESSAGE_PARAM_EXPORT and MN_MAILBOX_PARAM.*SAVE).
+ */
+
+ if (G_VALUE_HOLDS_INT(value))
str = g_strdup_printf("%i", g_value_get_int(value));
else if (G_VALUE_HOLDS_ULONG(value))
str = g_strdup_printf("%lu", g_value_get_ulong(value));
@@ -1577,16 +1680,12 @@ mn_g_value_from_string (GValue *value, const char *str)
g_return_val_if_fail(G_IS_VALUE(value), FALSE);
g_return_val_if_fail(str != NULL, FALSE);
- if (G_VALUE_HOLDS_BOOLEAN(value))
- {
- if (! strcmp(str, "false"))
- g_value_set_boolean(value, FALSE);
- else if (! strcmp(str, "true"))
- g_value_set_boolean(value, TRUE);
- else
- return FALSE;
- }
- else if (G_VALUE_HOLDS_INT(value))
+ /*
+ * We only handle types which we actually import (grep for
+ * MN_MAILBOX_PARAM_LOAD).
+ */
+
+ if (G_VALUE_HOLDS_INT(value))
{
int n;
char *endptr;
@@ -1626,3 +1725,11 @@ mn_g_value_from_string (GValue *value, const char *str)
return TRUE;
}
+
+void
+mn_window_present_from_event (GtkWindow *window)
+{
+ g_return_if_fail(GTK_IS_WINDOW(window));
+
+ gtk_window_present_with_time(window, gtk_get_current_event_time());
+}
diff --git a/src/mn-util.h b/src/mn-util.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -178,6 +178,14 @@ void mn_gdk_threads_leave (void);
void mn_g_static_mutex_lock (GStaticMutex *mutex);
void mn_g_static_mutex_unlock (GStaticMutex *mutex);
+typedef gboolean (*MNSubstCommandFunction) (const char *name,
+ char **value,
+ gpointer data);
+char *mn_subst_command (const char *command,
+ MNSubstCommandFunction subst,
+ gpointer data,
+ GError **err);
+
void mn_execute_command (const char *command);
void mn_execute_command_in_terminal (const char *command);
@@ -194,4 +202,6 @@ char *mn_g_value_to_string (const GValue *value);
gboolean mn_g_value_from_string (GValue *value,
const char *str);
+void mn_window_present_from_event (GtkWindow *window);
+
#endif /* _MN_UTIL_H */
diff --git a/src/mn-vfs-mailbox-backend-private.h b/src/mn-vfs-mailbox-backend-private.h
@@ -9,7 +9,19 @@
extern "C" {
#endif /* __cplusplus */
-void mn_vfs_mailbox_backend_monitor (MNVFSMailboxBackend * self, unsigned long check_id, const char * uri, GnomeVFSMonitorType type);
+
+#line 26 "mn-vfs-mailbox-backend.gob"
+
+#include "mn-locked-callback.h"
+
+#line 18 "mn-vfs-mailbox-backend-private.h"
+struct _MNVFSMailboxBackendPrivate {
+#line 54 "mn-vfs-mailbox-backend.gob"
+ MNLockedGSource * queue_check_source;
+#line 22 "mn-vfs-mailbox-backend-private.h"
+};
+void mn_vfs_mailbox_backend_monitor (MNVFSMailboxBackend * self, int check_id, const char * uri, GnomeVFSMonitorType type);
+void mn_vfs_mailbox_backend_queue_check (MNVFSMailboxBackend * self);
#ifdef __cplusplus
}
diff --git a/src/mn-vfs-mailbox-backend.c b/src/mn-vfs-mailbox-backend.c
@@ -22,7 +22,7 @@
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */
-#line 27 "mn-vfs-mailbox-backend.gob"
+#line 30 "mn-vfs-mailbox-backend.gob"
#include "config.h"
#include <glib/gi18n.h>
@@ -56,6 +56,7 @@ static void ___1_mn_vfs_mailbox_backend_finalize (GObject * object) G_GNUC_UNUSE
static void mn_vfs_mailbox_backend_real_monitor_cb (GnomeVFSMonitorHandle * handle, const char * monitor_uri, const char * info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data) G_GNUC_UNUSED;
static void ___real_mn_vfs_mailbox_backend_monitor_cb (MNVFSMailboxBackend * self, const char * info_uri, GnomeVFSMonitorEventType event_type);
static void mn_vfs_mailbox_backend_monitor_cb (MNVFSMailboxBackend * self, const char * info_uri, GnomeVFSMonitorEventType event_type) G_GNUC_UNUSED;
+static gboolean mn_vfs_mailbox_backend_queue_check_cb (gpointer data) G_GNUC_UNUSED;
enum {
PROP_0,
@@ -69,9 +70,10 @@ static GObjectClass *parent_class = NULL;
#define self_monitor mn_vfs_mailbox_backend_monitor
#define self_real_monitor_cb mn_vfs_mailbox_backend_real_monitor_cb
#define self_monitor_cb mn_vfs_mailbox_backend_monitor_cb
+#define self_queue_check mn_vfs_mailbox_backend_queue_check
+#define self_queue_check_cb mn_vfs_mailbox_backend_queue_check_cb
#define self_is mn_vfs_mailbox_backend_is
#define self_check mn_vfs_mailbox_backend_check
-#define self_mark_as_read mn_vfs_mailbox_backend_mark_as_read
GType
mn_vfs_mailbox_backend_get_type (void)
{
@@ -114,10 +116,24 @@ GET_NEW_VARG (const char *first, ...)
return ret;
}
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::finalize"
+ MNVFSMailboxBackend *self G_GNUC_UNUSED = MN_VFS_MAILBOX_BACKEND (obj_self);
+ gpointer priv G_GNUC_UNUSED = self->_priv;
+#line 64 "mn-vfs-mailbox-backend.gob"
+ ___1_mn_vfs_mailbox_backend_finalize(obj_self);
+#line 129 "mn-vfs-mailbox-backend.c"
+}
+#undef __GOB_FUNCTION__
+
static void
mn_vfs_mailbox_backend_init (MNVFSMailboxBackend * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::init"
+ o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_VFS_MAILBOX_BACKEND,MNVFSMailboxBackendPrivate);
}
#undef __GOB_FUNCTION__
static void
@@ -126,16 +142,17 @@ mn_vfs_mailbox_backend_class_init (MNVFSMailboxBackendClass * c G_GNUC_UNUSED)
#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+ g_type_class_add_private(c,sizeof(MNVFSMailboxBackendPrivate));
+
parent_class = g_type_class_ref (G_TYPE_OBJECT);
-#line 51 "mn-vfs-mailbox-backend.gob"
- g_object_class->finalize = ___1_mn_vfs_mailbox_backend_finalize;
-#line 87 "mn-vfs-mailbox-backend.gob"
+#line 64 "mn-vfs-mailbox-backend.gob"
+ g_object_class->finalize = ___finalize;
+#line 103 "mn-vfs-mailbox-backend.gob"
c->monitor_cb = ___real_mn_vfs_mailbox_backend_monitor_cb;
-#line 136 "mn-vfs-mailbox-backend.c"
+#line 154 "mn-vfs-mailbox-backend.c"
c->is = NULL;
c->check = NULL;
- c->mark_as_read = NULL;
g_object_class->get_property = ___object_get_property;
g_object_class->set_property = ___object_set_property;
{
@@ -167,9 +184,9 @@ ___object_set_property (GObject *object,
switch (property_id) {
case PROP_MAILBOX:
{
-#line 49 "mn-vfs-mailbox-backend.gob"
+#line 52 "mn-vfs-mailbox-backend.gob"
self->mailbox = g_value_get_pointer (VAL);
-#line 173 "mn-vfs-mailbox-backend.c"
+#line 190 "mn-vfs-mailbox-backend.c"
}
break;
default:
@@ -198,9 +215,9 @@ ___object_get_property (GObject *object,
switch (property_id) {
case PROP_MAILBOX:
{
-#line 49 "mn-vfs-mailbox-backend.gob"
+#line 52 "mn-vfs-mailbox-backend.gob"
g_value_set_pointer (VAL, self->mailbox);
-#line 204 "mn-vfs-mailbox-backend.c"
+#line 221 "mn-vfs-mailbox-backend.c"
}
break;
default:
@@ -217,20 +234,23 @@ g_value_set_pointer (VAL, self->mailbox);
-#line 51 "mn-vfs-mailbox-backend.gob"
+#line 64 "mn-vfs-mailbox-backend.gob"
static void
___1_mn_vfs_mailbox_backend_finalize (GObject * object G_GNUC_UNUSED)
-#line 224 "mn-vfs-mailbox-backend.c"
+#line 241 "mn-vfs-mailbox-backend.c"
#define PARENT_HANDLER(___object) \
{ if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(___object); }
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::finalize"
{
-#line 53 "mn-vfs-mailbox-backend.gob"
+#line 66 "mn-vfs-mailbox-backend.gob"
Self *self = SELF(object);
+ if (selfp->queue_check_source)
+ mn_locked_g_source_remove(selfp->queue_check_source);
+
/*
* If the calling mailbox is being finalized, there is no need to
* hold its lock. Otherwise, it holds its lock while finalizing us
@@ -240,91 +260,135 @@ ___1_mn_vfs_mailbox_backend_finalize (GObject * object G_GNUC_UNUSED)
PARENT_HANDLER(object);
}}
-#line 244 "mn-vfs-mailbox-backend.c"
+#line 264 "mn-vfs-mailbox-backend.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 66 "mn-vfs-mailbox-backend.gob"
+#line 82 "mn-vfs-mailbox-backend.gob"
void
-mn_vfs_mailbox_backend_monitor (MNVFSMailboxBackend * self, unsigned long check_id, const char * uri, GnomeVFSMonitorType type)
-#line 251 "mn-vfs-mailbox-backend.c"
+mn_vfs_mailbox_backend_monitor (MNVFSMailboxBackend * self, int check_id, const char * uri, GnomeVFSMonitorType type)
+#line 271 "mn-vfs-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::monitor"
-#line 66 "mn-vfs-mailbox-backend.gob"
+#line 82 "mn-vfs-mailbox-backend.gob"
g_return_if_fail (self != NULL);
-#line 66 "mn-vfs-mailbox-backend.gob"
+#line 82 "mn-vfs-mailbox-backend.gob"
g_return_if_fail (MN_IS_VFS_MAILBOX_BACKEND (self));
-#line 66 "mn-vfs-mailbox-backend.gob"
+#line 82 "mn-vfs-mailbox-backend.gob"
g_return_if_fail (uri != NULL);
-#line 260 "mn-vfs-mailbox-backend.c"
+#line 280 "mn-vfs-mailbox-backend.c"
{
-#line 71 "mn-vfs-mailbox-backend.gob"
+#line 87 "mn-vfs-mailbox-backend.gob"
- mn_reentrant_mailbox_lock(MN_REENTRANT_MAILBOX(self->mailbox));
+ mn_vfs_mailbox_lock(self->mailbox);
mn_vfs_mailbox_monitor(self->mailbox, uri, self, type, self_real_monitor_cb, self);
- mn_reentrant_mailbox_unlock(MN_REENTRANT_MAILBOX(self->mailbox));
+ mn_vfs_mailbox_unlock(self->mailbox);
}}
-#line 268 "mn-vfs-mailbox-backend.c"
+#line 288 "mn-vfs-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 77 "mn-vfs-mailbox-backend.gob"
+#line 93 "mn-vfs-mailbox-backend.gob"
static void
mn_vfs_mailbox_backend_real_monitor_cb (GnomeVFSMonitorHandle * handle, const char * monitor_uri, const char * info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data)
-#line 274 "mn-vfs-mailbox-backend.c"
+#line 294 "mn-vfs-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::real_monitor_cb"
{
-#line 83 "mn-vfs-mailbox-backend.gob"
+#line 99 "mn-vfs-mailbox-backend.gob"
self_monitor_cb(user_data, info_uri, event_type);
}}
-#line 282 "mn-vfs-mailbox-backend.c"
+#line 302 "mn-vfs-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 87 "mn-vfs-mailbox-backend.gob"
+#line 103 "mn-vfs-mailbox-backend.gob"
static void
mn_vfs_mailbox_backend_monitor_cb (MNVFSMailboxBackend * self, const char * info_uri, GnomeVFSMonitorEventType event_type)
-#line 288 "mn-vfs-mailbox-backend.c"
+#line 308 "mn-vfs-mailbox-backend.c"
{
MNVFSMailboxBackendClass *klass;
-#line 87 "mn-vfs-mailbox-backend.gob"
+#line 103 "mn-vfs-mailbox-backend.gob"
g_return_if_fail (self != NULL);
-#line 87 "mn-vfs-mailbox-backend.gob"
+#line 103 "mn-vfs-mailbox-backend.gob"
g_return_if_fail (MN_IS_VFS_MAILBOX_BACKEND (self));
-#line 295 "mn-vfs-mailbox-backend.c"
+#line 315 "mn-vfs-mailbox-backend.c"
klass = MN_VFS_MAILBOX_BACKEND_GET_CLASS(self);
if(klass->monitor_cb)
(*klass->monitor_cb)(self,info_uri,event_type);
}
-#line 87 "mn-vfs-mailbox-backend.gob"
+#line 103 "mn-vfs-mailbox-backend.gob"
static void
___real_mn_vfs_mailbox_backend_monitor_cb (MNVFSMailboxBackend * self G_GNUC_UNUSED, const char * info_uri, GnomeVFSMonitorEventType event_type)
-#line 304 "mn-vfs-mailbox-backend.c"
+#line 324 "mn-vfs-mailbox-backend.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::monitor_cb"
{
-#line 91 "mn-vfs-mailbox-backend.gob"
+#line 107 "mn-vfs-mailbox-backend.gob"
if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED
|| event_type == GNOME_VFS_MONITOR_EVENT_DELETED
|| event_type == GNOME_VFS_MONITOR_EVENT_CREATED)
+ self_queue_check(self);
+ }}
+#line 335 "mn-vfs-mailbox-backend.c"
+#undef __GOB_FUNCTION__
+
+#line 124 "mn-vfs-mailbox-backend.gob"
+void
+mn_vfs_mailbox_backend_queue_check (MNVFSMailboxBackend * self)
+#line 341 "mn-vfs-mailbox-backend.c"
+{
+#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::queue_check"
+#line 124 "mn-vfs-mailbox-backend.gob"
+ g_return_if_fail (self != NULL);
+#line 124 "mn-vfs-mailbox-backend.gob"
+ g_return_if_fail (MN_IS_VFS_MAILBOX_BACKEND (self));
+#line 348 "mn-vfs-mailbox-backend.c"
+{
+#line 126 "mn-vfs-mailbox-backend.gob"
+
+ if (selfp->queue_check_source)
+ mn_locked_g_source_clear(&selfp->queue_check_source);
+
+ if (self->check_latency)
+ selfp->queue_check_source = mn_g_timeout_add_gdk_locked(self->check_latency, self_queue_check_cb, self);
+ else
mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(self->mailbox));
}}
-#line 315 "mn-vfs-mailbox-backend.c"
+#line 360 "mn-vfs-mailbox-backend.c"
+#undef __GOB_FUNCTION__
+
+#line 136 "mn-vfs-mailbox-backend.gob"
+static gboolean
+mn_vfs_mailbox_backend_queue_check_cb (gpointer data)
+#line 366 "mn-vfs-mailbox-backend.c"
+{
+#define __GOB_FUNCTION__ "MN:VFS:Mailbox:Backend::queue_check_cb"
+{
+#line 138 "mn-vfs-mailbox-backend.gob"
+
+ Self *self = data;
+
+ mn_mailbox_check(MN_MAILBOX(self->mailbox));
+
+ selfp->queue_check_source = NULL;
+ return FALSE; /* remove source */
+ }}
+#line 379 "mn-vfs-mailbox-backend.c"
#undef __GOB_FUNCTION__
-#line 98 "mn-vfs-mailbox-backend.gob"
+#line 147 "mn-vfs-mailbox-backend.gob"
gboolean
mn_vfs_mailbox_backend_is (MNVFSMailboxBackend * self, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox)
-#line 321 "mn-vfs-mailbox-backend.c"
+#line 385 "mn-vfs-mailbox-backend.c"
{
MNVFSMailboxBackendClass *klass;
-#line 98 "mn-vfs-mailbox-backend.gob"
+#line 147 "mn-vfs-mailbox-backend.gob"
g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 98 "mn-vfs-mailbox-backend.gob"
+#line 147 "mn-vfs-mailbox-backend.gob"
g_return_val_if_fail (MN_IS_VFS_MAILBOX_BACKEND (self), (gboolean )0);
-#line 328 "mn-vfs-mailbox-backend.c"
+#line 392 "mn-vfs-mailbox-backend.c"
klass = MN_VFS_MAILBOX_BACKEND_GET_CLASS(self);
if(klass->is)
@@ -333,38 +397,19 @@ mn_vfs_mailbox_backend_is (MNVFSMailboxBackend * self, MNVFSMailboxBackendClass
return (gboolean )(0);
}
-#line 101 "mn-vfs-mailbox-backend.gob"
+#line 150 "mn-vfs-mailbox-backend.gob"
void
-mn_vfs_mailbox_backend_check (MNVFSMailboxBackend * self, unsigned long check_id)
-#line 340 "mn-vfs-mailbox-backend.c"
+mn_vfs_mailbox_backend_check (MNVFSMailboxBackend * self, int check_id)
+#line 404 "mn-vfs-mailbox-backend.c"
{
MNVFSMailboxBackendClass *klass;
-#line 101 "mn-vfs-mailbox-backend.gob"
+#line 150 "mn-vfs-mailbox-backend.gob"
g_return_if_fail (self != NULL);
-#line 101 "mn-vfs-mailbox-backend.gob"
+#line 150 "mn-vfs-mailbox-backend.gob"
g_return_if_fail (MN_IS_VFS_MAILBOX_BACKEND (self));
-#line 347 "mn-vfs-mailbox-backend.c"
+#line 411 "mn-vfs-mailbox-backend.c"
klass = MN_VFS_MAILBOX_BACKEND_GET_CLASS(self);
if(klass->check)
(*klass->check)(self,check_id);
}
-
-#line 104 "mn-vfs-mailbox-backend.gob"
-gboolean
-mn_vfs_mailbox_backend_mark_as_read (MNVFSMailboxBackend * self, MNVFSMessage * message, GError ** err)
-#line 357 "mn-vfs-mailbox-backend.c"
-{
- MNVFSMailboxBackendClass *klass;
-#line 104 "mn-vfs-mailbox-backend.gob"
- g_return_val_if_fail (self != NULL, (gboolean )0);
-#line 104 "mn-vfs-mailbox-backend.gob"
- g_return_val_if_fail (MN_IS_VFS_MAILBOX_BACKEND (self), (gboolean )0);
-#line 364 "mn-vfs-mailbox-backend.c"
- klass = MN_VFS_MAILBOX_BACKEND_GET_CLASS(self);
-
- if(klass->mark_as_read)
- return (*klass->mark_as_read)(self,message,err);
- else
- return (gboolean )(0);
-}
diff --git a/src/mn-vfs-mailbox-backend.gob b/src/mn-vfs-mailbox-backend.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -21,7 +21,10 @@ requires 2.0.14
%headertop{
#include "mn-vfs-mailbox.h"
-#include "mn-vfs-message.h"
+%}
+
+%privateheader{
+#include "mn-locked-callback.h"
%}
%{
@@ -48,11 +51,24 @@ class MN:VFS:Mailbox:Backend from G:Object (abstract)
protected MNVFSMailbox *mailbox;
property POINTER mailbox (link, flags = CONSTRUCT_ONLY, type = MNVFSMailbox *);
+ private MNLockedGSource *queue_check_source;
+
+ /*
+ * The amount of time to wait between a queue_check() call and the
+ * actual mailbox check, in milliseconds. If 0, the check is
+ * performed immediately. Used to avoid race conditions with mailbox
+ * formats which do not support locking.
+ */
+ protected int check_latency;
+
override (G:Object) void
finalize (GObject *object)
{
Self *self = SELF(object);
+ if (selfp->queue_check_source)
+ mn_locked_g_source_remove(selfp->queue_check_source);
+
/*
* If the calling mailbox is being finalized, there is no need to
* hold its lock. Otherwise, it holds its lock while finalizing us
@@ -65,13 +81,13 @@ class MN:VFS:Mailbox:Backend from G:Object (abstract)
protected void
monitor (self,
- unsigned long check_id,
+ int check_id,
const char *uri (check null),
GnomeVFSMonitorType type)
{
- mn_reentrant_mailbox_lock(MN_REENTRANT_MAILBOX(self->mailbox));
+ mn_vfs_mailbox_lock(self->mailbox);
mn_vfs_mailbox_monitor(self->mailbox, uri, self, type, self_real_monitor_cb, self);
- mn_reentrant_mailbox_unlock(MN_REENTRANT_MAILBOX(self->mailbox));
+ mn_vfs_mailbox_unlock(self->mailbox);
}
private void
@@ -92,15 +108,45 @@ class MN:VFS:Mailbox:Backend from G:Object (abstract)
if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED
|| event_type == GNOME_VFS_MONITOR_EVENT_DELETED
|| event_type == GNOME_VFS_MONITOR_EVENT_CREATED)
+ self_queue_check(self);
+ }
+
+ /**
+ * queue_check():
+ * @self: a backend
+ *
+ * Queues a mail check on the mailbox of @self or replaces an
+ * already queued check. The check_latency member is respected.
+ *
+ * This function is not thread-safe. It is only called from main
+ * loop callbacks (hence always from the same thread).
+ **/
+ protected void
+ queue_check (self)
+ {
+ if (selfp->queue_check_source)
+ mn_locked_g_source_clear(&selfp->queue_check_source);
+
+ if (self->check_latency)
+ selfp->queue_check_source = mn_g_timeout_add_gdk_locked(self->check_latency, self_queue_check_cb, self);
+ else
mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(self->mailbox));
}
+ private gboolean
+ queue_check_cb (gpointer data)
+ {
+ Self *self = data;
+
+ mn_mailbox_check(MN_MAILBOX(self->mailbox));
+
+ selfp->queue_check_source = NULL;
+ return FALSE; /* remove source */
+ }
+
virtual public gboolean
is (self, MNVFSMailboxBackendClass *class, MN:VFS:Mailbox *mailbox);
virtual public void
- check (self, unsigned long check_id);
-
- virtual public gboolean
- mark_as_read (self, MN:VFS:Message *message, GError **err);
+ check (self, int check_id);
}
diff --git a/src/mn-vfs-mailbox-backend.h b/src/mn-vfs-mailbox-backend.h
@@ -5,7 +5,6 @@
#include "mn-vfs-mailbox.h"
-#include "mn-vfs-message.h"
#ifndef __MN_VFS_MAILBOX_BACKEND_H__
#define __MN_VFS_MAILBOX_BACKEND_H__
@@ -26,6 +25,9 @@ extern "C" {
#define MN_VFS_MAILBOX_BACKEND_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_vfs_mailbox_backend_get_type(), MNVFSMailboxBackendClass)
+/* Private structure type */
+typedef struct _MNVFSMailboxBackendPrivate MNVFSMailboxBackendPrivate;
+
/*
* Main object structure
*/
@@ -37,6 +39,8 @@ struct _MNVFSMailboxBackend {
GObject __parent__;
/*< private >*/
MNVFSMailbox * mailbox; /* protected */
+ int check_latency; /* protected */
+ MNVFSMailboxBackendPrivate *_priv;
};
/*
@@ -47,8 +51,7 @@ struct _MNVFSMailboxBackendClass {
GObjectClass __parent__;
void (* monitor_cb) (MNVFSMailboxBackend * self, const char * info_uri, GnomeVFSMonitorEventType event_type);
gboolean (* is) (MNVFSMailboxBackend * self, MNVFSMailboxBackendClass * class, MNVFSMailbox * mailbox);
- void (* check) (MNVFSMailboxBackend * self, unsigned long check_id);
- gboolean (* mark_as_read) (MNVFSMailboxBackend * self, MNVFSMessage * message, GError ** err);
+ void (* check) (MNVFSMailboxBackend * self, int check_id);
const char * format;
};
@@ -61,10 +64,7 @@ gboolean mn_vfs_mailbox_backend_is (MNVFSMailboxBackend * self,
MNVFSMailboxBackendClass * class,
MNVFSMailbox * mailbox);
void mn_vfs_mailbox_backend_check (MNVFSMailboxBackend * self,
- unsigned long check_id);
-gboolean mn_vfs_mailbox_backend_mark_as_read (MNVFSMailboxBackend * self,
- MNVFSMessage * message,
- GError ** err);
+ int check_id);
/*
* Argument wrapping macros
diff --git a/src/mn-vfs-mailbox-private.h b/src/mn-vfs-mailbox-private.h
@@ -17,16 +17,20 @@ extern "C" {
#line 19 "mn-vfs-mailbox-private.h"
struct _MNVFSMailboxPrivate {
-#line 84 "mn-vfs-mailbox.gob"
+#line 83 "mn-vfs-mailbox.gob"
GSList * monitors;
-#line 85 "mn-vfs-mailbox.gob"
+#line 84 "mn-vfs-mailbox.gob"
MNVFSMailboxBackend * backend;
-#line 86 "mn-vfs-mailbox.gob"
+#line 85 "mn-vfs-mailbox.gob"
MNLockedGSource * update_poll_source;
-#line 27 "mn-vfs-mailbox-private.h"
+#line 87 "mn-vfs-mailbox.gob"
+ GMutex * mutex;
+#line 29 "mn-vfs-mailbox-private.h"
};
void mn_vfs_mailbox_monitor (MNVFSMailbox * self, const char * uri, MNVFSMailboxBackend * owner, GnomeVFSMonitorType type, GnomeVFSMonitorCallback callback, gpointer user_data);
void mn_vfs_mailbox_remove_monitors_by_owner (MNVFSMailbox * self, MNVFSMailboxBackend * owner);
+void mn_vfs_mailbox_lock (MNVFSMailbox * self);
+void mn_vfs_mailbox_unlock (MNVFSMailbox * self);
#ifdef __cplusplus
}
diff --git a/src/mn-vfs-mailbox.c b/src/mn-vfs-mailbox.c
@@ -43,6 +43,7 @@
#if WITH_SYLPHEED
#include "mn-sylpheed-mailbox-backend.h"
#endif
+#include "mn-vfs-mailbox-backend-private.h"
#include "mn-vfs.h"
#include "mn-stock.h"
#include "mn-conf.h"
@@ -62,7 +63,7 @@ typedef struct
GnomeVFSMonitorHandle *handle;
} Monitor;
-#line 66 "mn-vfs-mailbox.c"
+#line 67 "mn-vfs-mailbox.c"
/* self casting macros */
#define SELF(x) MN_VFS_MAILBOX(x)
#define SELF_CONST(x) MN_VFS_MAILBOX_CONST(x)
@@ -87,7 +88,7 @@ static void mn_vfs_mailbox_monitor_free (Monitor * monitor) G_GNUC_UNUSED;
static void mn_vfs_mailbox_monitor_cb (GnomeVFSMonitorHandle * handle, const char * monitor_uri, const char * info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data) G_GNUC_UNUSED;
static void mn_vfs_mailbox_queue_update_poll (MNVFSMailbox * self) G_GNUC_UNUSED;
static gboolean mn_vfs_mailbox_update_poll_cb (gpointer data) G_GNUC_UNUSED;
-static void ___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox, unsigned long check_id) G_GNUC_UNUSED;
+static void ___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox, int check_id) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static MNReentrantMailboxClass *parent_class = NULL;
@@ -101,6 +102,8 @@ static MNReentrantMailboxClass *parent_class = NULL;
#define self_remove_monitors_by_owner mn_vfs_mailbox_remove_monitors_by_owner
#define self_queue_update_poll mn_vfs_mailbox_queue_update_poll
#define self_update_poll_cb mn_vfs_mailbox_update_poll_cb
+#define self_lock mn_vfs_mailbox_lock
+#define self_unlock mn_vfs_mailbox_unlock
GType
mn_vfs_mailbox_get_type (void)
{
@@ -151,13 +154,13 @@ ___dispose (GObject *obj_self)
MNVFSMailbox *self G_GNUC_UNUSED = MN_VFS_MAILBOX (obj_self);
#line 145 "mn-vfs-mailbox.gob"
___4_mn_vfs_mailbox_dispose(obj_self);
-#line 155 "mn-vfs-mailbox.c"
-#line 82 "mn-vfs-mailbox.gob"
- if(self->vfs_uri) { gnome_vfs_uri_unref ((gpointer) self->vfs_uri); self->vfs_uri = NULL; }
#line 158 "mn-vfs-mailbox.c"
-#line 85 "mn-vfs-mailbox.gob"
- if(self->_priv->backend) { g_object_unref ((gpointer) self->_priv->backend); self->_priv->backend = NULL; }
+#line 81 "mn-vfs-mailbox.gob"
+ if(self->vfs_uri) { gnome_vfs_uri_unref ((gpointer) self->vfs_uri); self->vfs_uri = NULL; }
#line 161 "mn-vfs-mailbox.c"
+#line 84 "mn-vfs-mailbox.gob"
+ if(self->_priv->backend) { g_object_unref ((gpointer) self->_priv->backend); self->_priv->backend = NULL; }
+#line 164 "mn-vfs-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -170,9 +173,12 @@ ___finalize(GObject *obj_self)
gpointer priv G_GNUC_UNUSED = self->_priv;
if(G_OBJECT_CLASS(parent_class)->finalize) \
(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
-#line 81 "mn-vfs-mailbox.gob"
+#line 80 "mn-vfs-mailbox.gob"
if(self->uri) { g_free ((gpointer) self->uri); self->uri = NULL; }
-#line 176 "mn-vfs-mailbox.c"
+#line 179 "mn-vfs-mailbox.c"
+#line 87 "mn-vfs-mailbox.gob"
+ if(self->_priv->mutex) { g_mutex_free ((gpointer) self->_priv->mutex); self->_priv->mutex = NULL; }
+#line 182 "mn-vfs-mailbox.c"
}
#undef __GOB_FUNCTION__
@@ -181,12 +187,15 @@ mn_vfs_mailbox_init (MNVFSMailbox * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::init"
o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,MN_TYPE_VFS_MAILBOX,MNVFSMailboxPrivate);
+#line 87 "mn-vfs-mailbox.gob"
+ o->_priv->mutex = g_mutex_new();
+#line 193 "mn-vfs-mailbox.c"
}
#undef __GOB_FUNCTION__
-#line 111 "mn-vfs-mailbox.gob"
+#line 118 "mn-vfs-mailbox.gob"
static void
mn_vfs_mailbox_class_init (MNVFSMailboxClass * class G_GNUC_UNUSED)
-#line 190 "mn-vfs-mailbox.c"
+#line 199 "mn-vfs-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
@@ -197,18 +206,18 @@ mn_vfs_mailbox_class_init (MNVFSMailboxClass * class G_GNUC_UNUSED)
parent_class = g_type_class_ref (MN_TYPE_REENTRANT_MAILBOX);
-#line 121 "mn-vfs-mailbox.gob"
+#line 128 "mn-vfs-mailbox.gob"
g_object_class->constructor = ___3_mn_vfs_mailbox_constructor;
#line 145 "mn-vfs-mailbox.gob"
g_object_class->dispose = ___dispose;
#line 160 "mn-vfs-mailbox.gob"
mn_mailbox_class->seal = ___5_mn_vfs_mailbox_seal;
-#line 343 "mn-vfs-mailbox.gob"
+#line 373 "mn-vfs-mailbox.gob"
mn_reentrant_mailbox_class->reentrant_check = ___d_mn_vfs_mailbox_reentrant_check;
-#line 209 "mn-vfs-mailbox.c"
+#line 218 "mn-vfs-mailbox.c"
g_object_class->finalize = ___finalize;
{
-#line 112 "mn-vfs-mailbox.gob"
+#line 119 "mn-vfs-mailbox.gob"
/*
* Most VFS mailboxes will probably be local files, or remote
@@ -217,20 +226,20 @@ mn_vfs_mailbox_class_init (MNVFSMailboxClass * class G_GNUC_UNUSED)
*/
MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 1;
-#line 221 "mn-vfs-mailbox.c"
+#line 230 "mn-vfs-mailbox.c"
}
}
#undef __GOB_FUNCTION__
-#line 88 "mn-vfs-mailbox.gob"
+#line 89 "mn-vfs-mailbox.gob"
void
mn_vfs_mailbox_init_types (void)
-#line 230 "mn-vfs-mailbox.c"
+#line 239 "mn-vfs-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::init_types"
{
-#line 90 "mn-vfs-mailbox.gob"
+#line 91 "mn-vfs-mailbox.gob"
int i = 0;
@@ -240,25 +249,31 @@ mn_vfs_mailbox_init_types (void)
#if WITH_MOZILLA
mn_vfs_mailbox_backend_types[i++] = MN_TYPE_MOZILLA_MAILBOX_BACKEND;
#endif
+ /*
+ * Claws Mail mailboxes contain both a .sylpheed_mark and a
+ * .mh_sequences file. List the Sylpheed backend first, in order
+ * to treat them as Sylpheed mailboxes. This way, the need to use
+ * rcvstore from procmail is removed.
+ */
+#if WITH_SYLPHEED
+ mn_vfs_mailbox_backend_types[i++] = MN_TYPE_SYLPHEED_MAILBOX_BACKEND;
+#endif
#if WITH_MH
mn_vfs_mailbox_backend_types[i++] = MN_TYPE_MH_MAILBOX_BACKEND;
#endif
#if WITH_MAILDIR
mn_vfs_mailbox_backend_types[i++] = MN_TYPE_MAILDIR_MAILBOX_BACKEND;
#endif
-#if WITH_SYLPHEED
- mn_vfs_mailbox_backend_types[i++] = MN_TYPE_SYLPHEED_MAILBOX_BACKEND;
-#endif
mn_vfs_mailbox_backend_types[i] = 0;
}}
-#line 255 "mn-vfs-mailbox.c"
+#line 270 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
-#line 121 "mn-vfs-mailbox.gob"
+#line 128 "mn-vfs-mailbox.gob"
static GObject *
___3_mn_vfs_mailbox_constructor (GType type G_GNUC_UNUSED, unsigned int n_construct_properties, GObjectConstructParam * construct_params)
-#line 262 "mn-vfs-mailbox.c"
+#line 277 "mn-vfs-mailbox.c"
#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
((G_OBJECT_CLASS(parent_class)->constructor)? \
(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
@@ -266,7 +281,7 @@ ___3_mn_vfs_mailbox_constructor (GType type G_GNUC_UNUSED, unsigned int n_constr
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::constructor"
{
-#line 123 "mn-vfs-mailbox.gob"
+#line 130 "mn-vfs-mailbox.gob"
GObject *object;
Self *self;
@@ -279,23 +294,16 @@ ___3_mn_vfs_mailbox_constructor (GType type G_GNUC_UNUSED, unsigned int n_constr
/* set default poll to the most likely value */
mn_mailbox_set_poll(MN_MAILBOX(self), FALSE);
- /*
- * We must do this in constructor() and not init() because
- * class->stock_id is not yet assigned in init().
- */
- if (class->stock_id)
- mn_mailbox_set_stock_id(MN_MAILBOX(self), (char *) class->stock_id);
-
return object;
}}
-#line 292 "mn-vfs-mailbox.c"
+#line 300 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
#line 145 "mn-vfs-mailbox.gob"
static void
___4_mn_vfs_mailbox_dispose (GObject * object G_GNUC_UNUSED)
-#line 299 "mn-vfs-mailbox.c"
+#line 307 "mn-vfs-mailbox.c"
#define PARENT_HANDLER(___object) \
{ if(G_OBJECT_CLASS(parent_class)->dispose) \
(* G_OBJECT_CLASS(parent_class)->dispose)(___object); }
@@ -315,14 +323,14 @@ ___4_mn_vfs_mailbox_dispose (GObject * object G_GNUC_UNUSED)
PARENT_HANDLER(object);
}}
-#line 319 "mn-vfs-mailbox.c"
+#line 327 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
#line 160 "mn-vfs-mailbox.gob"
static void
___5_mn_vfs_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
-#line 326 "mn-vfs-mailbox.c"
+#line 334 "mn-vfs-mailbox.c"
#define PARENT_HANDLER(___mailbox) \
{ if(MN_MAILBOX_CLASS(parent_class)->seal) \
(* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
@@ -339,6 +347,9 @@ ___5_mn_vfs_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
{
self->vfs_uri = gnome_vfs_uri_new(self->uri);
+ if (! mailbox->stock_id && self->vfs_uri && ! gnome_vfs_uri_is_local(self->vfs_uri))
+ mn_mailbox_set_stock_id(mailbox, MN_STOCK_REMOTE);
+
if (! mailbox->runtime_name)
{
char *path;
@@ -355,26 +366,29 @@ ___5_mn_vfs_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
: g_strdup(self->uri);
}
}
+
+ if (! mailbox->stock_id)
+ mn_mailbox_set_stock_id(mailbox, MN_STOCK_LOCAL);
}}
-#line 360 "mn-vfs-mailbox.c"
+#line 374 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
-#line 189 "mn-vfs-mailbox.gob"
+#line 195 "mn-vfs-mailbox.gob"
static Monitor *
mn_vfs_mailbox_find_monitor (MNVFSMailbox * self, const char * uri, MNVFSMailboxBackend * owner, GnomeVFSMonitorType type, GnomeVFSMonitorCallback callback, gpointer user_data)
-#line 367 "mn-vfs-mailbox.c"
+#line 381 "mn-vfs-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::find_monitor"
-#line 189 "mn-vfs-mailbox.gob"
+#line 195 "mn-vfs-mailbox.gob"
g_return_val_if_fail (self != NULL, (Monitor * )0);
-#line 189 "mn-vfs-mailbox.gob"
+#line 195 "mn-vfs-mailbox.gob"
g_return_val_if_fail (MN_IS_VFS_MAILBOX (self), (Monitor * )0);
-#line 189 "mn-vfs-mailbox.gob"
+#line 195 "mn-vfs-mailbox.gob"
g_return_val_if_fail (uri != NULL, (Monitor * )0);
-#line 376 "mn-vfs-mailbox.c"
+#line 390 "mn-vfs-mailbox.c"
{
-#line 196 "mn-vfs-mailbox.gob"
+#line 202 "mn-vfs-mailbox.gob"
GSList *l;
@@ -392,24 +406,24 @@ mn_vfs_mailbox_find_monitor (MNVFSMailbox * self, const char * uri, MNVFSMailbox
return NULL;
}}
-#line 396 "mn-vfs-mailbox.c"
+#line 410 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
-#line 214 "mn-vfs-mailbox.gob"
+#line 220 "mn-vfs-mailbox.gob"
void
mn_vfs_mailbox_monitor (MNVFSMailbox * self, const char * uri, MNVFSMailboxBackend * owner, GnomeVFSMonitorType type, GnomeVFSMonitorCallback callback, gpointer user_data)
-#line 402 "mn-vfs-mailbox.c"
+#line 416 "mn-vfs-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::monitor"
-#line 214 "mn-vfs-mailbox.gob"
+#line 220 "mn-vfs-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 214 "mn-vfs-mailbox.gob"
+#line 220 "mn-vfs-mailbox.gob"
g_return_if_fail (MN_IS_VFS_MAILBOX (self));
-#line 214 "mn-vfs-mailbox.gob"
+#line 220 "mn-vfs-mailbox.gob"
g_return_if_fail (uri != NULL);
-#line 411 "mn-vfs-mailbox.c"
+#line 425 "mn-vfs-mailbox.c"
{
-#line 221 "mn-vfs-mailbox.gob"
+#line 227 "mn-vfs-mailbox.gob"
Monitor *monitor;
@@ -444,20 +458,20 @@ mn_vfs_mailbox_monitor (MNVFSMailbox * self, const char * uri, MNVFSMailboxBacke
}
}
}}
-#line 448 "mn-vfs-mailbox.c"
+#line 462 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
-#line 256 "mn-vfs-mailbox.gob"
+#line 262 "mn-vfs-mailbox.gob"
static void
mn_vfs_mailbox_monitor_free (Monitor * monitor)
-#line 454 "mn-vfs-mailbox.c"
+#line 468 "mn-vfs-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::monitor_free"
-#line 256 "mn-vfs-mailbox.gob"
+#line 262 "mn-vfs-mailbox.gob"
g_return_if_fail (monitor != NULL);
-#line 459 "mn-vfs-mailbox.c"
+#line 473 "mn-vfs-mailbox.c"
{
-#line 258 "mn-vfs-mailbox.gob"
+#line 264 "mn-vfs-mailbox.gob"
g_free(monitor->uri);
@@ -466,42 +480,66 @@ mn_vfs_mailbox_monitor_free (Monitor * monitor)
g_free(monitor);
}}
-#line 470 "mn-vfs-mailbox.c"
+#line 484 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
-#line 267 "mn-vfs-mailbox.gob"
+#line 273 "mn-vfs-mailbox.gob"
static void
mn_vfs_mailbox_monitor_cb (GnomeVFSMonitorHandle * handle, const char * monitor_uri, const char * info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data)
-#line 476 "mn-vfs-mailbox.c"
+#line 490 "mn-vfs-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::monitor_cb"
{
-#line 273 "mn-vfs-mailbox.gob"
+#line 279 "mn-vfs-mailbox.gob"
if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED
|| event_type == GNOME_VFS_MONITOR_EVENT_DELETED
|| event_type == GNOME_VFS_MONITOR_EVENT_CREATED)
{
Self *self = user_data;
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(self));
+ MNVFSMailboxBackend *backend;
+
+ /*
+ * Queue a check to detect if the mailbox type has changed. If
+ * the mailbox has a backend, we must use
+ * mn_vfs_mailbox_backend_queue_check() (which respects the
+ * check_latency member of MNVFSMailboxBackend) in order to
+ * avoid race conditions.
+ */
+
+ self_lock(self);
+
+ backend = selfp->backend;
+ if (backend)
+ mn_vfs_mailbox_backend_queue_check(backend);
+
+ self_unlock(self);
+
+ /*
+ * Note that at this point, we have released the lock and the
+ * backend might have been finalized by another thread: we can
+ * only test the nullity of the pointer.
+ */
+ if (! backend)
+ mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(self));
}
}}
-#line 490 "mn-vfs-mailbox.c"
+#line 528 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
-#line 283 "mn-vfs-mailbox.gob"
+#line 313 "mn-vfs-mailbox.gob"
void
mn_vfs_mailbox_remove_monitors_by_owner (MNVFSMailbox * self, MNVFSMailboxBackend * owner)
-#line 496 "mn-vfs-mailbox.c"
+#line 534 "mn-vfs-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::remove_monitors_by_owner"
-#line 283 "mn-vfs-mailbox.gob"
+#line 313 "mn-vfs-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 283 "mn-vfs-mailbox.gob"
+#line 313 "mn-vfs-mailbox.gob"
g_return_if_fail (MN_IS_VFS_MAILBOX (self));
-#line 503 "mn-vfs-mailbox.c"
+#line 541 "mn-vfs-mailbox.c"
{
-#line 285 "mn-vfs-mailbox.gob"
+#line 315 "mn-vfs-mailbox.gob"
GSList *l;
@@ -520,45 +558,45 @@ mn_vfs_mailbox_remove_monitors_by_owner (MNVFSMailbox * self, MNVFSMailboxBacken
}
}
}}
-#line 524 "mn-vfs-mailbox.c"
+#line 562 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
-#line 304 "mn-vfs-mailbox.gob"
+#line 334 "mn-vfs-mailbox.gob"
static void
mn_vfs_mailbox_queue_update_poll (MNVFSMailbox * self)
-#line 530 "mn-vfs-mailbox.c"
+#line 568 "mn-vfs-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::queue_update_poll"
-#line 304 "mn-vfs-mailbox.gob"
+#line 334 "mn-vfs-mailbox.gob"
g_return_if_fail (self != NULL);
-#line 304 "mn-vfs-mailbox.gob"
+#line 334 "mn-vfs-mailbox.gob"
g_return_if_fail (MN_IS_VFS_MAILBOX (self));
-#line 537 "mn-vfs-mailbox.c"
+#line 575 "mn-vfs-mailbox.c"
{
-#line 306 "mn-vfs-mailbox.gob"
+#line 336 "mn-vfs-mailbox.gob"
if (selfp->update_poll_source)
mn_locked_g_source_remove(selfp->update_poll_source);
selfp->update_poll_source = mn_g_idle_add_gdk_locked(self_update_poll_cb, self);
}}
-#line 546 "mn-vfs-mailbox.c"
+#line 584 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
-#line 313 "mn-vfs-mailbox.gob"
+#line 343 "mn-vfs-mailbox.gob"
static gboolean
mn_vfs_mailbox_update_poll_cb (gpointer data)
-#line 552 "mn-vfs-mailbox.c"
+#line 590 "mn-vfs-mailbox.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::update_poll_cb"
{
-#line 315 "mn-vfs-mailbox.gob"
+#line 345 "mn-vfs-mailbox.gob"
Self *self = data;
gboolean polled = FALSE;
GSList *l;
- mn_reentrant_mailbox_lock(MN_REENTRANT_MAILBOX(self));
+ self_lock(self);
MN_LIST_FOREACH(l, selfp->monitors)
{
@@ -573,27 +611,27 @@ mn_vfs_mailbox_update_poll_cb (gpointer data)
selfp->update_poll_source = NULL;
- mn_reentrant_mailbox_unlock(MN_REENTRANT_MAILBOX(self));
+ self_unlock(self);
if (mn_mailbox_get_poll(MN_MAILBOX(self)) != polled)
mn_mailbox_set_poll(MN_MAILBOX(self), polled);
return FALSE; /* remove source */
}}
-#line 584 "mn-vfs-mailbox.c"
+#line 622 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
-#line 343 "mn-vfs-mailbox.gob"
+#line 373 "mn-vfs-mailbox.gob"
static void
-___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_UNUSED, unsigned long check_id)
-#line 590 "mn-vfs-mailbox.c"
+___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_UNUSED, int check_id)
+#line 628 "mn-vfs-mailbox.c"
#define PARENT_HANDLER(___mailbox,___check_id) \
{ if(MN_REENTRANT_MAILBOX_CLASS(parent_class)->reentrant_check) \
(* MN_REENTRANT_MAILBOX_CLASS(parent_class)->reentrant_check)(___mailbox,___check_id); }
{
#define __GOB_FUNCTION__ "MN:VFS:Mailbox::reentrant_check"
{
-#line 345 "mn-vfs-mailbox.gob"
+#line 375 "mn-vfs-mailbox.gob"
Self *self = SELF(mailbox);
MNVFSMailboxBackend *backend;
@@ -601,15 +639,19 @@ ___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_UNUSED,
GType backend_type = 0;
gboolean exists;
- mn_reentrant_mailbox_lock(mailbox);
+ self_lock(self);
/*
+ * Install the monitors that detect a mailbox type change. These
+ * monitors are not meant to detect if the mail status of a
+ * mailbox changes (it is the responsability of the backend),
+ * although they will do so with some mailbox formats.
+ *
* For properly detecting the new mailbox type when the file or
* directory changes we need install both a file and a directory
* monitor, since depending on the underlying implementation we
* might not get file events if the URI is a directory, etc.
*/
-
self_monitor(self, self->uri, NULL, GNOME_VFS_MONITOR_FILE, self_monitor_cb, self);
self_monitor(self, self->uri, NULL, GNOME_VFS_MONITOR_DIRECTORY, self_monitor_cb, self);
@@ -617,7 +659,7 @@ ___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_UNUSED,
if (backend)
g_object_ref(backend);
- mn_reentrant_mailbox_unlock(mailbox);
+ self_unlock(self);
class = backend ? MN_VFS_MAILBOX_BACKEND_GET_CLASS(backend) : NULL;
if (class && class->is(NULL, class, self))
@@ -648,36 +690,28 @@ ___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_UNUSED,
if (! backend || backend_type != G_OBJECT_TYPE(backend))
{
- gboolean is_local;
MNVFSMailboxBackend *new_backend = NULL;
- is_local = gnome_vfs_uri_is_local(self->vfs_uri);
-
- GDK_THREADS_ENTER();
-
- if (! mn_reentrant_mailbox_check_aborted_unlocked(mailbox, check_id))
+ if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
{
+ GDK_THREADS_ENTER();
+
if (backend_type)
{
new_backend = g_object_new(backend_type, MN_VFS_MAILBOX_BACKEND_PROP_MAILBOX(self), NULL);
-
mn_mailbox_set_format(MN_MAILBOX(self), (char *) MN_VFS_MAILBOX_BACKEND_GET_CLASS(new_backend)->format);
- if (! SELF_GET_CLASS(self)->stock_id)
- mn_mailbox_set_stock_id(MN_MAILBOX(self), is_local ? MN_STOCK_LOCAL : MN_STOCK_REMOTE);
}
else
{
mn_mailbox_set_format(MN_MAILBOX(self), NULL);
- if (! SELF_GET_CLASS(self)->stock_id)
- mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_UNKNOWN);
mn_mailbox_set_error(MN_MAILBOX(self), exists ? _("unknown mailbox format") : _("does not exist"));
}
- }
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
- mn_reentrant_mailbox_lock(mailbox);
+ self_lock(self);
if (backend)
{
@@ -685,7 +719,7 @@ ___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_UNUSED,
backend = NULL;
}
- if (! mn_reentrant_mailbox_check_aborted_unlocked(mailbox, check_id))
+ if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
{
if (selfp->backend)
{
@@ -702,7 +736,7 @@ ___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_UNUSED,
}
}
- mn_reentrant_mailbox_unlock(mailbox);
+ self_unlock(self);
if (new_backend)
g_object_unref(new_backend);
@@ -714,11 +748,49 @@ ___d_mn_vfs_mailbox_reentrant_check (MNReentrantMailbox * mailbox G_GNUC_UNUSED,
end:
if (backend)
{
- mn_reentrant_mailbox_lock(mailbox);
+ self_lock(self);
g_object_unref(backend);
- mn_reentrant_mailbox_unlock(mailbox);
+ self_unlock(self);
}
}}
-#line 723 "mn-vfs-mailbox.c"
+#line 757 "mn-vfs-mailbox.c"
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
+
+#line 497 "mn-vfs-mailbox.gob"
+void
+mn_vfs_mailbox_lock (MNVFSMailbox * self)
+#line 764 "mn-vfs-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:VFS:Mailbox::lock"
+#line 497 "mn-vfs-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 497 "mn-vfs-mailbox.gob"
+ g_return_if_fail (MN_IS_VFS_MAILBOX (self));
+#line 771 "mn-vfs-mailbox.c"
+{
+#line 499 "mn-vfs-mailbox.gob"
+
+ g_mutex_lock(selfp->mutex);
+ }}
+#line 777 "mn-vfs-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 503 "mn-vfs-mailbox.gob"
+void
+mn_vfs_mailbox_unlock (MNVFSMailbox * self)
+#line 783 "mn-vfs-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:VFS:Mailbox::unlock"
+#line 503 "mn-vfs-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 503 "mn-vfs-mailbox.gob"
+ g_return_if_fail (MN_IS_VFS_MAILBOX (self));
+#line 790 "mn-vfs-mailbox.c"
+{
+#line 505 "mn-vfs-mailbox.gob"
+
+ g_mutex_unlock(selfp->mutex);
+ }}
+#line 796 "mn-vfs-mailbox.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-vfs-mailbox.gob b/src/mn-vfs-mailbox.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -54,6 +54,7 @@ extern GType mn_vfs_mailbox_backend_types[MN_VFS_MAILBOX_MAX_BACKEND_TYPES + 1];
#if WITH_SYLPHEED
#include "mn-sylpheed-mailbox-backend.h"
#endif
+#include "mn-vfs-mailbox-backend-private.h"
#include "mn-vfs.h"
#include "mn-stock.h"
#include "mn-conf.h"
@@ -76,8 +77,6 @@ typedef struct
class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
{
- classwide const char *stock_id;
-
public char *uri destroywith g_free;
public GnomeVFSURI *vfs_uri unrefwith gnome_vfs_uri_unref;
@@ -85,6 +84,8 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
private MNVFSMailboxBackend *backend unrefwith g_object_unref;
private MNLockedGSource *update_poll_source;
+ private GMutex *mutex = {g_mutex_new()} destroywith g_mutex_free;
+
public void
init_types (void)
{
@@ -96,15 +97,21 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
#if WITH_MOZILLA
mn_vfs_mailbox_backend_types[i++] = MN_TYPE_MOZILLA_MAILBOX_BACKEND;
#endif
+ /*
+ * Claws Mail mailboxes contain both a .sylpheed_mark and a
+ * .mh_sequences file. List the Sylpheed backend first, in order
+ * to treat them as Sylpheed mailboxes. This way, the need to use
+ * rcvstore from procmail is removed.
+ */
+#if WITH_SYLPHEED
+ mn_vfs_mailbox_backend_types[i++] = MN_TYPE_SYLPHEED_MAILBOX_BACKEND;
+#endif
#if WITH_MH
mn_vfs_mailbox_backend_types[i++] = MN_TYPE_MH_MAILBOX_BACKEND;
#endif
#if WITH_MAILDIR
mn_vfs_mailbox_backend_types[i++] = MN_TYPE_MAILDIR_MAILBOX_BACKEND;
#endif
-#if WITH_SYLPHEED
- mn_vfs_mailbox_backend_types[i++] = MN_TYPE_SYLPHEED_MAILBOX_BACKEND;
-#endif
mn_vfs_mailbox_backend_types[i] = 0;
}
@@ -132,13 +139,6 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
/* set default poll to the most likely value */
mn_mailbox_set_poll(MN_MAILBOX(self), FALSE);
- /*
- * We must do this in constructor() and not init() because
- * class->stock_id is not yet assigned in init().
- */
- if (class->stock_id)
- mn_mailbox_set_stock_id(MN_MAILBOX(self), (char *) class->stock_id);
-
return object;
}
@@ -168,6 +168,9 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
{
self->vfs_uri = gnome_vfs_uri_new(self->uri);
+ if (! mailbox->stock_id && self->vfs_uri && ! gnome_vfs_uri_is_local(self->vfs_uri))
+ mn_mailbox_set_stock_id(mailbox, MN_STOCK_REMOTE);
+
if (! mailbox->runtime_name)
{
char *path;
@@ -184,6 +187,9 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
: g_strdup(self->uri);
}
}
+
+ if (! mailbox->stock_id)
+ mn_mailbox_set_stock_id(mailbox, MN_STOCK_LOCAL);
}
private Monitor *
@@ -276,7 +282,31 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
|| event_type == GNOME_VFS_MONITOR_EVENT_CREATED)
{
Self *self = user_data;
- mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(self));
+ MNVFSMailboxBackend *backend;
+
+ /*
+ * Queue a check to detect if the mailbox type has changed. If
+ * the mailbox has a backend, we must use
+ * mn_vfs_mailbox_backend_queue_check() (which respects the
+ * check_latency member of MNVFSMailboxBackend) in order to
+ * avoid race conditions.
+ */
+
+ self_lock(self);
+
+ backend = selfp->backend;
+ if (backend)
+ mn_vfs_mailbox_backend_queue_check(backend);
+
+ self_unlock(self);
+
+ /*
+ * Note that at this point, we have released the lock and the
+ * backend might have been finalized by another thread: we can
+ * only test the nullity of the pointer.
+ */
+ if (! backend)
+ mn_reentrant_mailbox_queue_check(MN_REENTRANT_MAILBOX(self));
}
}
@@ -317,7 +347,7 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
gboolean polled = FALSE;
GSList *l;
- mn_reentrant_mailbox_lock(MN_REENTRANT_MAILBOX(self));
+ self_lock(self);
MN_LIST_FOREACH(l, selfp->monitors)
{
@@ -332,7 +362,7 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
selfp->update_poll_source = NULL;
- mn_reentrant_mailbox_unlock(MN_REENTRANT_MAILBOX(self));
+ self_unlock(self);
if (mn_mailbox_get_poll(MN_MAILBOX(self)) != polled)
mn_mailbox_set_poll(MN_MAILBOX(self), polled);
@@ -341,7 +371,7 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
}
override (MN:Reentrant:Mailbox) void
- reentrant_check (MNReentrantMailbox *mailbox, unsigned long check_id)
+ reentrant_check (MNReentrantMailbox *mailbox, int check_id)
{
Self *self = SELF(mailbox);
MNVFSMailboxBackend *backend;
@@ -349,15 +379,19 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
GType backend_type = 0;
gboolean exists;
- mn_reentrant_mailbox_lock(mailbox);
+ self_lock(self);
/*
+ * Install the monitors that detect a mailbox type change. These
+ * monitors are not meant to detect if the mail status of a
+ * mailbox changes (it is the responsability of the backend),
+ * although they will do so with some mailbox formats.
+ *
* For properly detecting the new mailbox type when the file or
* directory changes we need install both a file and a directory
* monitor, since depending on the underlying implementation we
* might not get file events if the URI is a directory, etc.
*/
-
self_monitor(self, self->uri, NULL, GNOME_VFS_MONITOR_FILE, self_monitor_cb, self);
self_monitor(self, self->uri, NULL, GNOME_VFS_MONITOR_DIRECTORY, self_monitor_cb, self);
@@ -365,7 +399,7 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
if (backend)
g_object_ref(backend);
- mn_reentrant_mailbox_unlock(mailbox);
+ self_unlock(self);
class = backend ? MN_VFS_MAILBOX_BACKEND_GET_CLASS(backend) : NULL;
if (class && class->is(NULL, class, self))
@@ -396,36 +430,28 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
if (! backend || backend_type != G_OBJECT_TYPE(backend))
{
- gboolean is_local;
MNVFSMailboxBackend *new_backend = NULL;
- is_local = gnome_vfs_uri_is_local(self->vfs_uri);
-
- GDK_THREADS_ENTER();
-
- if (! mn_reentrant_mailbox_check_aborted_unlocked(mailbox, check_id))
+ if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
{
+ GDK_THREADS_ENTER();
+
if (backend_type)
{
new_backend = g_object_new(backend_type, MN_VFS_MAILBOX_BACKEND_PROP_MAILBOX(self), NULL);
-
mn_mailbox_set_format(MN_MAILBOX(self), (char *) MN_VFS_MAILBOX_BACKEND_GET_CLASS(new_backend)->format);
- if (! SELF_GET_CLASS(self)->stock_id)
- mn_mailbox_set_stock_id(MN_MAILBOX(self), is_local ? MN_STOCK_LOCAL : MN_STOCK_REMOTE);
}
else
{
mn_mailbox_set_format(MN_MAILBOX(self), NULL);
- if (! SELF_GET_CLASS(self)->stock_id)
- mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_UNKNOWN);
mn_mailbox_set_error(MN_MAILBOX(self), exists ? _("unknown mailbox format") : _("does not exist"));
}
- }
- gdk_flush();
- GDK_THREADS_LEAVE();
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
- mn_reentrant_mailbox_lock(mailbox);
+ self_lock(self);
if (backend)
{
@@ -433,7 +459,7 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
backend = NULL;
}
- if (! mn_reentrant_mailbox_check_aborted_unlocked(mailbox, check_id))
+ if (! mn_reentrant_mailbox_check_aborted(mailbox, check_id))
{
if (selfp->backend)
{
@@ -450,7 +476,7 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
}
}
- mn_reentrant_mailbox_unlock(mailbox);
+ self_unlock(self);
if (new_backend)
g_object_unref(new_backend);
@@ -462,9 +488,21 @@ class MN:VFS:Mailbox from MN:Reentrant:Mailbox (abstract)
end:
if (backend)
{
- mn_reentrant_mailbox_lock(mailbox);
+ self_lock(self);
g_object_unref(backend);
- mn_reentrant_mailbox_unlock(mailbox);
+ self_unlock(self);
}
}
+
+ protected void
+ lock (self)
+ {
+ g_mutex_lock(selfp->mutex);
+ }
+
+ protected void
+ unlock (self)
+ {
+ g_mutex_unlock(selfp->mutex);
+ }
}
diff --git a/src/mn-vfs-mailbox.h b/src/mn-vfs-mailbox.h
@@ -56,7 +56,6 @@ struct _MNVFSMailbox {
typedef struct _MNVFSMailboxClass MNVFSMailboxClass;
struct _MNVFSMailboxClass {
MNReentrantMailboxClass __parent__;
- const char * stock_id;
};
diff --git a/src/mn-vfs-message.c b/src/mn-vfs-message.c
@@ -45,7 +45,6 @@ typedef MNVFSMessageClass SelfClass;
/* here are local prototypes */
static void mn_vfs_message_init (MNVFSMessage * o) G_GNUC_UNUSED;
static void mn_vfs_message_class_init (MNVFSMessageClass * c) G_GNUC_UNUSED;
-static gboolean ___1_mn_vfs_message_mark_as_read_impl (MNMessage * message, GError ** err) G_GNUC_UNUSED;
/* pointer to the class of our parent */
static MNMessageClass *parent_class = NULL;
@@ -71,7 +70,7 @@ mn_vfs_message_get_type (void)
NULL
};
- type = g_type_register_static (MN_TYPE_MESSAGE, "MNVFSMessage", &info, (GTypeFlags)0);
+ type = g_type_register_static (MN_TYPE_MESSAGE, "MNVFSMessage", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
}
return type;
@@ -102,9 +101,9 @@ ___dispose (GObject *obj_self)
MNVFSMessage *self G_GNUC_UNUSED = MN_VFS_MESSAGE (obj_self);
if (G_OBJECT_CLASS (parent_class)->dispose) \
(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
-#line 36 "mn-vfs-message.gob"
+#line 35 "mn-vfs-message.gob"
if(self->vfs_uri) { gnome_vfs_uri_unref ((gpointer) self->vfs_uri); self->vfs_uri = NULL; }
-#line 108 "mn-vfs-message.c"
+#line 107 "mn-vfs-message.c"
}
#undef __GOB_FUNCTION__
@@ -119,61 +118,28 @@ mn_vfs_message_class_init (MNVFSMessageClass * c G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "MN:VFS:Message::class_init"
GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
- MNMessageClass *mn_message_class = (MNMessageClass *)c;
parent_class = g_type_class_ref (MN_TYPE_MESSAGE);
-#line 38 "mn-vfs-message.gob"
- mn_message_class->mark_as_read_impl = ___1_mn_vfs_message_mark_as_read_impl;
-#line 129 "mn-vfs-message.c"
g_object_class->dispose = ___dispose;
}
#undef __GOB_FUNCTION__
-#line 38 "mn-vfs-message.gob"
-static gboolean
-___1_mn_vfs_message_mark_as_read_impl (MNMessage * message G_GNUC_UNUSED, GError ** err)
-#line 139 "mn-vfs-message.c"
-#define PARENT_HANDLER(___message,___err) \
- ((MN_MESSAGE_CLASS(parent_class)->mark_as_read_impl)? \
- (* MN_MESSAGE_CLASS(parent_class)->mark_as_read_impl)(___message,___err): \
- ((gboolean )0))
-{
-#define __GOB_FUNCTION__ "MN:VFS:Message::mark_as_read_impl"
-{
-#line 40 "mn-vfs-message.gob"
-
- Self *self = SELF(message);
- MNVFSMailboxBackendClass *class;
-
- g_assert(self->backend_type != 0);
- g_assert(self->vfs_uri != NULL);
-
- class = g_type_class_peek(self->backend_type);
- g_assert(class != NULL);
- g_assert(class->mark_as_read != NULL);
-
- return class->mark_as_read(NULL, SELF(message), err);
- }}
-#line 161 "mn-vfs-message.c"
-#undef __GOB_FUNCTION__
-#undef PARENT_HANDLER
-
-#line 58 "mn-vfs-message.gob"
+#line 41 "mn-vfs-message.gob"
MNMessage *
-mn_vfs_message_new (gpointer backend, GnomeVFSURI * dir_uri, const char * filename, MNMessageFlags flags, gboolean handle_status)
-#line 168 "mn-vfs-message.c"
+mn_vfs_message_new (GType type, gpointer backend, GnomeVFSURI * dir_uri, const char * filename, MNMessageFlags flags, gboolean handle_status)
+#line 134 "mn-vfs-message.c"
{
#define __GOB_FUNCTION__ "MN:VFS:Message::new"
-#line 58 "mn-vfs-message.gob"
+#line 41 "mn-vfs-message.gob"
g_return_val_if_fail (dir_uri != NULL, (MNMessage * )0);
-#line 58 "mn-vfs-message.gob"
+#line 41 "mn-vfs-message.gob"
g_return_val_if_fail (filename != NULL, (MNMessage * )0);
-#line 175 "mn-vfs-message.c"
+#line 141 "mn-vfs-message.c"
{
-#line 64 "mn-vfs-message.gob"
+#line 48 "mn-vfs-message.gob"
GnomeVFSURI *message_uri;
MNMessage *message;
@@ -182,18 +148,15 @@ mn_vfs_message_new (gpointer backend, GnomeVFSURI * dir_uri, const char * filena
g_return_val_if_fail(MN_IS_VFS_MAILBOX_BACKEND(backend), NULL);
message_uri = gnome_vfs_uri_append_file_name(dir_uri, filename);
- message = mn_message_new_from_uri_full(MN_TYPE_VFS_MESSAGE, MN_MAILBOX(MN_VFS_MAILBOX_BACKEND(backend)->mailbox), message_uri, flags, handle_status);
+ message = mn_message_new_from_uri_full(type, MN_MAILBOX(MN_VFS_MAILBOX_BACKEND(backend)->mailbox), message_uri, flags, handle_status);
vmessage = MN_VFS_MESSAGE(message);
if (vmessage)
- {
- vmessage->backend_type = G_OBJECT_TYPE(backend);
- vmessage->vfs_uri = gnome_vfs_uri_ref(message_uri);
- }
+ vmessage->vfs_uri = gnome_vfs_uri_ref(message_uri);
gnome_vfs_uri_unref(message_uri);
return message;
}}
-#line 199 "mn-vfs-message.c"
+#line 162 "mn-vfs-message.c"
#undef __GOB_FUNCTION__
diff --git a/src/mn-vfs-message.gob b/src/mn-vfs-message.gob
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -30,33 +30,17 @@ requires 2.0.14
#include "mn-message-mime.h"
%}
-class MN:VFS:Message from MN:Message
+class MN:VFS:Message from MN:Message (abstract)
{
- public GType backend_type;
public GnomeVFSURI *vfs_uri unrefwith gnome_vfs_uri_unref;
- override (MN:Message) gboolean
- mark_as_read_impl (MNMessage *message, GError **err)
- {
- Self *self = SELF(message);
- MNVFSMailboxBackendClass *class;
-
- g_assert(self->backend_type != 0);
- g_assert(self->vfs_uri != NULL);
-
- class = g_type_class_peek(self->backend_type);
- g_assert(class != NULL);
- g_assert(class->mark_as_read != NULL);
-
- return class->mark_as_read(NULL, SELF(message), err);
- }
-
/*
* In case of error a MNMessage is returned, not a MNVFSMessage. A
* NULL pointer can also be returned (see mn-message-mime.h).
*/
public MNMessage *
- new (gpointer backend, /* cannot include mn-vfs-mailbox-backend.h */
+ new (GType type,
+ gpointer backend, /* cannot include mn-vfs-mailbox-backend.h */
GnomeVFSURI *dir_uri (check null),
const char *filename (check null),
MNMessageFlags flags,
@@ -69,14 +53,11 @@ class MN:VFS:Message from MN:Message
g_return_val_if_fail(MN_IS_VFS_MAILBOX_BACKEND(backend), NULL);
message_uri = gnome_vfs_uri_append_file_name(dir_uri, filename);
- message = mn_message_new_from_uri_full(MN_TYPE_VFS_MESSAGE, MN_MAILBOX(MN_VFS_MAILBOX_BACKEND(backend)->mailbox), message_uri, flags, handle_status);
+ message = mn_message_new_from_uri_full(type, MN_MAILBOX(MN_VFS_MAILBOX_BACKEND(backend)->mailbox), message_uri, flags, handle_status);
vmessage = MN_VFS_MESSAGE(message);
if (vmessage)
- {
- vmessage->backend_type = G_OBJECT_TYPE(backend);
- vmessage->vfs_uri = gnome_vfs_uri_ref(message_uri);
- }
+ vmessage->vfs_uri = gnome_vfs_uri_ref(message_uri);
gnome_vfs_uri_unref(message_uri);
diff --git a/src/mn-vfs-message.h b/src/mn-vfs-message.h
@@ -36,7 +36,6 @@ typedef struct _MNVFSMessage MNVFSMessage;
struct _MNVFSMessage {
MNMessage __parent__;
/*< public >*/
- GType backend_type;
GnomeVFSURI * vfs_uri;
};
@@ -53,7 +52,8 @@ struct _MNVFSMessageClass {
* Public methods
*/
GType mn_vfs_message_get_type (void);
-MNMessage * mn_vfs_message_new (gpointer backend,
+MNMessage * mn_vfs_message_new (GType type,
+ gpointer backend,
GnomeVFSURI * dir_uri,
const char * filename,
MNMessageFlags flags,
diff --git a/src/mn-vfs.c b/src/mn-vfs.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -325,3 +325,13 @@ mn_vfs_get_local_path (GnomeVFSURI *uri)
return path;
}
+
+gboolean
+mn_vfs_result_to_g_error (GnomeVFSResult result, GError **err)
+{
+ if (result == GNOME_VFS_OK)
+ return TRUE;
+
+ g_set_error(err, 0, 0, "%s", gnome_vfs_result_to_string(result));
+ return FALSE;
+}
diff --git a/src/mn-vfs.h b/src/mn-vfs.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -52,4 +52,6 @@ GnomeVFSURI *mn_vfs_uri_append_file_suffix (GnomeVFSURI *uri,
char *mn_vfs_get_local_path (GnomeVFSURI *uri);
+gboolean mn_vfs_result_to_g_error (GnomeVFSResult result, GError **err);
+
#endif /* _MN_VFS_H */
diff --git a/src/mn-webmail-mailbox-private.h b/src/mn-webmail-mailbox-private.h
@@ -0,0 +1,23 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_WEBMAIL_MAILBOX_PRIVATE_H__
+#define __MN_WEBMAIL_MAILBOX_PRIVATE_H__
+
+#include "mn-webmail-mailbox.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+void mn_webmail_mailbox_parse_username (MNWebmailMailbox * self, char ** username, char ** domain);
+char * mn_webmail_mailbox_create_spool_file (GError ** err);
+char * mn_webmail_mailbox_write_temporary_file (const char * contents, GError ** err);
+void mn_webmail_mailbox_display_config (MNWebmailMailbox * self, const char * config);
+gboolean mn_webmail_mailbox_run_helper (MNWebmailMailbox * self, const char * name, const char * command, GError ** err);
+gboolean mn_webmail_mailbox_read_spool_file (MNWebmailMailbox * self, const char * spool_file, GError ** err);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-webmail-mailbox-properties-private.h b/src/mn-webmail-mailbox-properties-private.h
@@ -0,0 +1,26 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_WEBMAIL_MAILBOX_PROPERTIES_PRIVATE_H__
+#define __MN_WEBMAIL_MAILBOX_PROPERTIES_PRIVATE_H__
+
+#include "mn-webmail-mailbox-properties.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+struct _MNWebmailMailboxPropertiesPrivate {
+#line 38 "mn-webmail-mailbox-properties.gob"
+ GtkWidget * inbox_radio;
+#line 39 "mn-webmail-mailbox-properties.gob"
+ GtkWidget * other_radio;
+#line 40 "mn-webmail-mailbox-properties.gob"
+ GtkWidget * folder_entry;
+#line 20 "mn-webmail-mailbox-properties-private.h"
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-webmail-mailbox-properties.c b/src/mn-webmail-mailbox-properties.c
@@ -0,0 +1,358 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-webmail-mailbox-properties.h"
+
+#include "mn-webmail-mailbox-properties-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 27 "mn-webmail-mailbox-properties.gob"
+
+#include "config.h"
+#include <glib/gi18n.h>
+#include "mn-webmail-mailbox.h"
+#include "mn-mailbox-properties-private.h"
+#include "mn-authenticated-mailbox-properties-private.h"
+#include "mn-util.h"
+
+#line 35 "mn-webmail-mailbox-properties.c"
+/* self casting macros */
+#define SELF(x) MN_WEBMAIL_MAILBOX_PROPERTIES(x)
+#define SELF_CONST(x) MN_WEBMAIL_MAILBOX_PROPERTIES_CONST(x)
+#define IS_SELF(x) MN_IS_WEBMAIL_MAILBOX_PROPERTIES(x)
+#define TYPE_SELF MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES
+#define SELF_CLASS(x) MN_WEBMAIL_MAILBOX_PROPERTIES_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_WEBMAIL_MAILBOX_PROPERTIES_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNWebmailMailboxProperties Self;
+typedef MNWebmailMailboxPropertiesClass SelfClass;
+
+/* here are local prototypes */
+static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void mn_webmail_mailbox_properties_class_init (MNWebmailMailboxPropertiesClass * c) G_GNUC_UNUSED;
+static void mn_webmail_mailbox_properties_init (MNWebmailMailboxProperties * self) G_GNUC_UNUSED;
+static void mn_webmail_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data) G_GNUC_UNUSED;
+static void ___3_mn_webmail_mailbox_properties_set_mailbox (MNMailboxProperties * properties, MNMailbox * mailbox) G_GNUC_UNUSED;
+static MNMailbox * ___4_mn_webmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties) G_GNUC_UNUSED;
+
+enum {
+ PROP_0,
+ PROP_COMPLETE,
+ PROP_DEFAULT_NAME
+};
+
+/* pointer to the class of our parent */
+static MNAuthenticatedMailboxPropertiesClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_radio_toggled_h mn_webmail_mailbox_properties_radio_toggled_h
+GType
+mn_webmail_mailbox_properties_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNWebmailMailboxPropertiesClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_webmail_mailbox_properties_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNWebmailMailboxProperties),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_webmail_mailbox_properties_init,
+ NULL
+ };
+
+ type = g_type_register_static (MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES, "MNWebmailMailboxProperties", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNWebmailMailboxProperties *)g_object_new(mn_webmail_mailbox_properties_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNWebmailMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNWebmailMailboxProperties *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNWebmailMailboxProperties *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNWebmailMailboxProperties *)g_object_new_valist (mn_webmail_mailbox_properties_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox:Properties::finalize"
+ MNWebmailMailboxProperties *self G_GNUC_UNUSED = MN_WEBMAIL_MAILBOX_PROPERTIES (obj_self);
+ gpointer priv G_GNUC_UNUSED = self->_priv;
+ if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
+}
+#undef __GOB_FUNCTION__
+
+static void
+mn_webmail_mailbox_properties_class_init (MNWebmailMailboxPropertiesClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox:Properties::class_init"
+ GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+ MNMailboxPropertiesClass *mn_mailbox_properties_class = (MNMailboxPropertiesClass *)c;
+
+ g_type_class_add_private(c,sizeof(MNWebmailMailboxPropertiesPrivate));
+
+ parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX_PROPERTIES);
+
+#line 145 "mn-webmail-mailbox-properties.gob"
+ mn_mailbox_properties_class->set_mailbox = ___3_mn_webmail_mailbox_properties_set_mailbox;
+#line 162 "mn-webmail-mailbox-properties.gob"
+ mn_mailbox_properties_class->get_mailbox = ___4_mn_webmail_mailbox_properties_get_mailbox;
+#line 137 "mn-webmail-mailbox-properties.c"
+ g_object_class->finalize = ___finalize;
+ g_object_class->get_property = ___object_get_property;
+ {
+ g_object_class_override_property (g_object_class,
+ PROP_COMPLETE,
+ "complete");
+ g_object_class_override_property (g_object_class,
+ PROP_DEFAULT_NAME,
+ "default_name");
+ }
+}
+#undef __GOB_FUNCTION__
+#line 84 "mn-webmail-mailbox-properties.gob"
+static void
+mn_webmail_mailbox_properties_init (MNWebmailMailboxProperties * self G_GNUC_UNUSED)
+#line 153 "mn-webmail-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox:Properties::init"
+ self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES,MNWebmailMailboxPropertiesPrivate);
+ {
+#line 85 "mn-webmail-mailbox-properties.gob"
+
+ MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self);
+ MNAuthenticatedMailboxProperties *auth = MN_AUTHENTICATED_MAILBOX_PROPERTIES(self);
+ GtkWidget *folder_vbox;
+ GtkWidget *hbox;
+
+ gtk_box_pack_start(GTK_BOX(auth->account_vbox), auth->username_vbox, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(auth->account_vbox), auth->password_vbox, FALSE, FALSE, 0);
+
+ /* translators: header capitalization */
+ folder_vbox = mn_mailbox_properties_add_general_section(properties, _("Folder"));
+
+ selfp->inbox_radio = gtk_radio_button_new_with_mnemonic(NULL, _("In_box"));
+ gtk_size_group_add_widget(properties->label_size_group, selfp->inbox_radio);
+
+ gtk_box_pack_start(GTK_BOX(folder_vbox), selfp->inbox_radio, FALSE, FALSE, 0);
+
+ selfp->other_radio = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(selfp->inbox_radio), _("_Other:"));
+ gtk_size_group_add_widget(properties->label_size_group, selfp->other_radio);
+
+ selfp->folder_entry = gtk_entry_new();
+ gtk_widget_set_sensitive(selfp->folder_entry, FALSE);
+
+ hbox = gtk_hbox_new(FALSE, 12);
+ gtk_box_pack_start(GTK_BOX(hbox), selfp->other_radio, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), selfp->folder_entry, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(folder_vbox), hbox, FALSE, FALSE, 0);
+ gtk_widget_show_all(folder_vbox);
+
+ properties->entries = mn_g_slist_append_elements(properties->entries,
+ auth->username_entry,
+ auth->password_entry,
+ selfp->folder_entry,
+ NULL);
+
+ g_signal_connect(selfp->inbox_radio, "toggled", G_CALLBACK(self_radio_toggled_h), self);
+ g_signal_connect(selfp->other_radio, "toggled", G_CALLBACK(self_radio_toggled_h), self);
+
+ g_object_connect(auth->username_entry,
+ "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
+ "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
+ NULL);
+
+ g_object_connect(selfp->folder_entry,
+ "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
+ "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
+ NULL);
+
+#line 207 "mn-webmail-mailbox-properties.c"
+ }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_get_property (GObject *object,
+ guint property_id,
+ GValue *VAL G_GNUC_UNUSED,
+ GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox:Properties::get_property"
+{
+ MNWebmailMailboxProperties *self G_GNUC_UNUSED;
+
+ self = MN_WEBMAIL_MAILBOX_PROPERTIES (object);
+
+ switch (property_id) {
+ case PROP_COMPLETE:
+ {
+#line 44 "mn-webmail-mailbox-properties.gob"
+
+ gboolean complete;
+
+ complete = mn_authenticated_mailbox_properties_is_complete(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self));
+ if (complete)
+ {
+ gboolean other_active;
+ const char *folder;
+
+ other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
+ folder = gtk_entry_get_text(GTK_ENTRY(selfp->folder_entry));
+
+ if (other_active && ! *folder)
+ complete = FALSE;
+ }
+
+ g_value_set_boolean(VAL, complete);
+
+#line 245 "mn-webmail-mailbox-properties.c"
+ }
+ break;
+ case PROP_DEFAULT_NAME:
+ {
+#line 65 "mn-webmail-mailbox-properties.gob"
+
+ const char *username;
+ gboolean other_active;
+ const char *folder;
+ MNMailboxClass *class;
+
+ username = gtk_entry_get_text(GTK_ENTRY(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self)->username_entry));
+ g_assert(*username != 0);
+
+ other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
+ folder = gtk_entry_get_text(GTK_ENTRY(selfp->folder_entry));
+
+ class = mn_mailbox_get_class_from_name(MN_MAILBOX_PROPERTIES_CLASS(SELF_GET_CLASS(self))->type);
+ g_value_take_string(VAL, mn_webmail_mailbox_build_name(MN_WEBMAIL_MAILBOX_CLASS(class),
+ username,
+ other_active ? folder : NULL));
+ g_type_class_unref(class);
+
+#line 269 "mn-webmail-mailbox-properties.c"
+ }
+ break;
+ default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+# undef G_STRLOC
+# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 134 "mn-webmail-mailbox-properties.gob"
+static void
+mn_webmail_mailbox_properties_radio_toggled_h (GtkToggleButton * togglebutton, gpointer user_data)
+#line 289 "mn-webmail-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox:Properties::radio_toggled_h"
+{
+#line 136 "mn-webmail-mailbox-properties.gob"
+
+ Self *self = user_data;
+
+ gtk_widget_set_sensitive(selfp->folder_entry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio)));
+
+ g_object_notify(G_OBJECT(self), "complete");
+ g_object_notify(G_OBJECT(self), "default-name");
+ }}
+#line 302 "mn-webmail-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 145 "mn-webmail-mailbox-properties.gob"
+static void
+___3_mn_webmail_mailbox_properties_set_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED, MNMailbox * mailbox)
+#line 308 "mn-webmail-mailbox-properties.c"
+#define PARENT_HANDLER(___properties,___mailbox) \
+ { if(MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox) \
+ (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->set_mailbox)(___properties,___mailbox); }
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox:Properties::set_mailbox"
+{
+#line 147 "mn-webmail-mailbox-properties.gob"
+
+ Self *self = SELF(properties);
+ MNWebmailMailbox *webmail_mailbox = MN_WEBMAIL_MAILBOX(mailbox);
+
+ PARENT_HANDLER(properties, mailbox);
+
+ if (! strcmp(webmail_mailbox->folder, "Inbox"))
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->inbox_radio), TRUE);
+ else
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->other_radio), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(selfp->folder_entry), webmail_mailbox->folder);
+ }
+ }}
+#line 330 "mn-webmail-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 162 "mn-webmail-mailbox-properties.gob"
+static MNMailbox *
+___4_mn_webmail_mailbox_properties_get_mailbox (MNMailboxProperties * properties G_GNUC_UNUSED)
+#line 337 "mn-webmail-mailbox-properties.c"
+#define PARENT_HANDLER(___properties) \
+ ((MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)? \
+ (* MN_MAILBOX_PROPERTIES_CLASS(parent_class)->get_mailbox)(___properties): \
+ ((MNMailbox * )0))
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox:Properties::get_mailbox"
+{
+#line 164 "mn-webmail-mailbox-properties.gob"
+
+ Self *self = SELF(properties);
+ MNMailbox *mailbox;
+
+ mailbox = PARENT_HANDLER(properties);
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio)))
+ g_object_set(mailbox, MN_WEBMAIL_MAILBOX_PROP_FOLDER((char *) gtk_entry_get_text(GTK_ENTRY(selfp->folder_entry))), NULL);
+
+ return mailbox;
+ }}
+#line 357 "mn-webmail-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
diff --git a/src/mn-webmail-mailbox-properties.gob b/src/mn-webmail-mailbox-properties.gob
@@ -0,0 +1,175 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%headertop{
+#include <gtk/gtk.h>
+#include "mn-authenticated-mailbox-properties.h"
+%}
+
+%{
+#include "config.h"
+#include <glib/gi18n.h>
+#include "mn-webmail-mailbox.h"
+#include "mn-mailbox-properties-private.h"
+#include "mn-authenticated-mailbox-properties-private.h"
+#include "mn-util.h"
+%}
+
+class MN:Webmail:Mailbox:Properties from MN:Authenticated:Mailbox:Properties (abstract)
+{
+ private GtkWidget *inbox_radio;
+ private GtkWidget *other_radio;
+ private GtkWidget *folder_entry;
+
+ property BOOLEAN complete (override)
+ get
+ {
+ gboolean complete;
+
+ complete = mn_authenticated_mailbox_properties_is_complete(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self));
+ if (complete)
+ {
+ gboolean other_active;
+ const char *folder;
+
+ other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
+ folder = gtk_entry_get_text(GTK_ENTRY(selfp->folder_entry));
+
+ if (other_active && ! *folder)
+ complete = FALSE;
+ }
+
+ g_value_set_boolean(VAL, complete);
+ };
+
+ property STRING default_name (override)
+ get
+ {
+ const char *username;
+ gboolean other_active;
+ const char *folder;
+ MNMailboxClass *class;
+
+ username = gtk_entry_get_text(GTK_ENTRY(MN_AUTHENTICATED_MAILBOX_PROPERTIES(self)->username_entry));
+ g_assert(*username != 0);
+
+ other_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio));
+ folder = gtk_entry_get_text(GTK_ENTRY(selfp->folder_entry));
+
+ class = mn_mailbox_get_class_from_name(MN_MAILBOX_PROPERTIES_CLASS(SELF_GET_CLASS(self))->type);
+ g_value_take_string(VAL, mn_webmail_mailbox_build_name(MN_WEBMAIL_MAILBOX_CLASS(class),
+ username,
+ other_active ? folder : NULL));
+ g_type_class_unref(class);
+ };
+
+ init (self)
+ {
+ MNMailboxProperties *properties = MN_MAILBOX_PROPERTIES(self);
+ MNAuthenticatedMailboxProperties *auth = MN_AUTHENTICATED_MAILBOX_PROPERTIES(self);
+ GtkWidget *folder_vbox;
+ GtkWidget *hbox;
+
+ gtk_box_pack_start(GTK_BOX(auth->account_vbox), auth->username_vbox, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(auth->account_vbox), auth->password_vbox, FALSE, FALSE, 0);
+
+ /* translators: header capitalization */
+ folder_vbox = mn_mailbox_properties_add_general_section(properties, _("Folder"));
+
+ selfp->inbox_radio = gtk_radio_button_new_with_mnemonic(NULL, _("In_box"));
+ gtk_size_group_add_widget(properties->label_size_group, selfp->inbox_radio);
+
+ gtk_box_pack_start(GTK_BOX(folder_vbox), selfp->inbox_radio, FALSE, FALSE, 0);
+
+ selfp->other_radio = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(selfp->inbox_radio), _("_Other:"));
+ gtk_size_group_add_widget(properties->label_size_group, selfp->other_radio);
+
+ selfp->folder_entry = gtk_entry_new();
+ gtk_widget_set_sensitive(selfp->folder_entry, FALSE);
+
+ hbox = gtk_hbox_new(FALSE, 12);
+ gtk_box_pack_start(GTK_BOX(hbox), selfp->other_radio, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(hbox), selfp->folder_entry, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(folder_vbox), hbox, FALSE, FALSE, 0);
+ gtk_widget_show_all(folder_vbox);
+
+ properties->entries = mn_g_slist_append_elements(properties->entries,
+ auth->username_entry,
+ auth->password_entry,
+ selfp->folder_entry,
+ NULL);
+
+ g_signal_connect(selfp->inbox_radio, "toggled", G_CALLBACK(self_radio_toggled_h), self);
+ g_signal_connect(selfp->other_radio, "toggled", G_CALLBACK(self_radio_toggled_h), self);
+
+ g_object_connect(auth->username_entry,
+ "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
+ "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
+ NULL);
+
+ g_object_connect(selfp->folder_entry,
+ "swapped-signal::changed", mn_mailbox_properties_notify_complete, self,
+ "swapped-signal::changed", mn_mailbox_properties_notify_default_name, self,
+ NULL);
+ }
+
+ private void
+ radio_toggled_h (GtkToggleButton *togglebutton, gpointer user_data)
+ {
+ Self *self = user_data;
+
+ gtk_widget_set_sensitive(selfp->folder_entry, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio)));
+
+ g_object_notify(G_OBJECT(self), "complete");
+ g_object_notify(G_OBJECT(self), "default-name");
+ }
+
+ override (MN:Mailbox:Properties) void
+ set_mailbox (MNMailboxProperties *properties, MNMailbox *mailbox)
+ {
+ Self *self = SELF(properties);
+ MNWebmailMailbox *webmail_mailbox = MN_WEBMAIL_MAILBOX(mailbox);
+
+ PARENT_HANDLER(properties, mailbox);
+
+ if (! strcmp(webmail_mailbox->folder, "Inbox"))
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->inbox_radio), TRUE);
+ else
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->other_radio), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(selfp->folder_entry), webmail_mailbox->folder);
+ }
+ }
+
+ override (MN:Mailbox:Properties) MNMailbox *
+ get_mailbox (MNMailboxProperties *properties)
+ {
+ Self *self = SELF(properties);
+ MNMailbox *mailbox;
+
+ mailbox = PARENT_HANDLER(properties);
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->other_radio)))
+ g_object_set(mailbox, MN_WEBMAIL_MAILBOX_PROP_FOLDER((char *) gtk_entry_get_text(GTK_ENTRY(selfp->folder_entry))), NULL);
+
+ return mailbox;
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-webmail-mailbox-properties.gob.stamp
diff --git a/src/mn-webmail-mailbox-properties.h b/src/mn-webmail-mailbox-properties.h
@@ -0,0 +1,75 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include <gtk/gtk.h>
+#include "mn-authenticated-mailbox-properties.h"
+
+#ifndef __MN_WEBMAIL_MAILBOX_PROPERTIES_H__
+#define __MN_WEBMAIL_MAILBOX_PROPERTIES_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES (mn_webmail_mailbox_properties_get_type())
+#define MN_WEBMAIL_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_webmail_mailbox_properties_get_type(), MNWebmailMailboxProperties)
+#define MN_WEBMAIL_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_webmail_mailbox_properties_get_type(), MNWebmailMailboxProperties const)
+#define MN_WEBMAIL_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_webmail_mailbox_properties_get_type(), MNWebmailMailboxPropertiesClass)
+#define MN_IS_WEBMAIL_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_webmail_mailbox_properties_get_type ())
+
+#define MN_WEBMAIL_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_webmail_mailbox_properties_get_type(), MNWebmailMailboxPropertiesClass)
+
+/* Private structure type */
+typedef struct _MNWebmailMailboxPropertiesPrivate MNWebmailMailboxPropertiesPrivate;
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_WEBMAIL_MAILBOX_PROPERTIES__
+#define __TYPEDEF_MN_WEBMAIL_MAILBOX_PROPERTIES__
+typedef struct _MNWebmailMailboxProperties MNWebmailMailboxProperties;
+#endif
+struct _MNWebmailMailboxProperties {
+ MNAuthenticatedMailboxProperties __parent__;
+ /*< private >*/
+ MNWebmailMailboxPropertiesPrivate *_priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNWebmailMailboxPropertiesClass MNWebmailMailboxPropertiesClass;
+struct _MNWebmailMailboxPropertiesClass {
+ MNAuthenticatedMailboxPropertiesClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_webmail_mailbox_properties_get_type (void);
+
+/*
+ * Argument wrapping macros
+ */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_WEBMAIL_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete", __extension__ ({gboolean *z = (arg); z;})
+#define MN_WEBMAIL_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name", __extension__ ({gchar **z = (arg); z;})
+#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_WEBMAIL_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg) "complete",(gboolean *)(arg)
+#define MN_WEBMAIL_MAILBOX_PROPERTIES_GET_PROP_DEFAULT_NAME(arg) "default_name",(gchar **)(arg)
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-webmail-mailbox.c b/src/mn-webmail-mailbox.c
@@ -0,0 +1,746 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-webmail-mailbox.h"
+
+#include "mn-webmail-mailbox-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 26 "mn-webmail-mailbox.gob"
+
+#include "config.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <glib/gi18n.h>
+#include <gmime/gmime.h>
+#include "mn-mailbox-private.h"
+#include "mn-authenticated-mailbox-private.h"
+#include "mn-message-mime.h"
+#include "mn-util.h"
+
+#line 42 "mn-webmail-mailbox.c"
+/* self casting macros */
+#define SELF(x) MN_WEBMAIL_MAILBOX(x)
+#define SELF_CONST(x) MN_WEBMAIL_MAILBOX_CONST(x)
+#define IS_SELF(x) MN_IS_WEBMAIL_MAILBOX(x)
+#define TYPE_SELF MN_TYPE_WEBMAIL_MAILBOX
+#define SELF_CLASS(x) MN_WEBMAIL_MAILBOX_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_WEBMAIL_MAILBOX_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNWebmailMailbox Self;
+typedef MNWebmailMailboxClass SelfClass;
+
+/* here are local prototypes */
+static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void mn_webmail_mailbox_init (MNWebmailMailbox * o) G_GNUC_UNUSED;
+static void mn_webmail_mailbox_class_init (MNWebmailMailboxClass * c) G_GNUC_UNUSED;
+static void ___1_mn_webmail_mailbox_seal (MNMailbox * mailbox) G_GNUC_UNUSED;
+static int mn_webmail_mailbox_create_temporary_file (char ** filename, GError ** err) G_GNUC_UNUSED;
+static char * mn_webmail_mailbox_get_error_message (MNWebmailMailbox * self, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure) G_GNUC_UNUSED;
+static void mn_webmail_mailbox_display_multiline_text (MNWebmailMailbox * self, const char * text, const char * line_prefix) G_GNUC_UNUSED;
+static void mn_webmail_mailbox_display_output (MNWebmailMailbox * self, const char * header, const char * contents) G_GNUC_UNUSED;
+static gboolean mn_webmail_mailbox_webmail_check (MNWebmailMailbox * self, GError ** err) G_GNUC_UNUSED;
+static void ___d_mn_webmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox) G_GNUC_UNUSED;
+
+enum {
+ PROP_0,
+ PROP_FOLDER
+};
+
+/* pointer to the class of our parent */
+static MNAuthenticatedMailboxClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_parse_username mn_webmail_mailbox_parse_username
+#define self_create_temporary_file mn_webmail_mailbox_create_temporary_file
+#define self_create_spool_file mn_webmail_mailbox_create_spool_file
+#define self_write_temporary_file mn_webmail_mailbox_write_temporary_file
+#define self_get_error_message mn_webmail_mailbox_get_error_message
+#define self_display_multiline_text mn_webmail_mailbox_display_multiline_text
+#define self_display_config mn_webmail_mailbox_display_config
+#define self_display_output mn_webmail_mailbox_display_output
+#define self_run_helper mn_webmail_mailbox_run_helper
+#define self_read_spool_file mn_webmail_mailbox_read_spool_file
+#define self_webmail_check mn_webmail_mailbox_webmail_check
+#define self_build_name mn_webmail_mailbox_build_name
+GType
+mn_webmail_mailbox_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNWebmailMailboxClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_webmail_mailbox_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNWebmailMailbox),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_webmail_mailbox_init,
+ NULL
+ };
+
+ type = g_type_register_static (MN_TYPE_AUTHENTICATED_MAILBOX, "MNWebmailMailbox", &info, (GTypeFlags)G_TYPE_FLAG_ABSTRACT);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNWebmailMailbox *)g_object_new(mn_webmail_mailbox_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNWebmailMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNWebmailMailbox *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNWebmailMailbox *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNWebmailMailbox *)g_object_new_valist (mn_webmail_mailbox_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::finalize"
+ MNWebmailMailbox *self G_GNUC_UNUSED = MN_WEBMAIL_MAILBOX (obj_self);
+ if(G_OBJECT_CLASS(parent_class)->finalize) \
+ (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
+#line 46 "mn-webmail-mailbox.gob"
+ if(self->folder) { g_free ((gpointer) self->folder); self->folder = NULL; }
+#line 142 "mn-webmail-mailbox.c"
+}
+#undef __GOB_FUNCTION__
+
+static void
+mn_webmail_mailbox_init (MNWebmailMailbox * o G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::init"
+}
+#undef __GOB_FUNCTION__
+static void
+mn_webmail_mailbox_class_init (MNWebmailMailboxClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::class_init"
+ GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+ MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)c;
+ MNAuthenticatedMailboxClass *mn_authenticated_mailbox_class = (MNAuthenticatedMailboxClass *)c;
+
+ parent_class = g_type_class_ref (MN_TYPE_AUTHENTICATED_MAILBOX);
+
+#line 53 "mn-webmail-mailbox.gob"
+ mn_mailbox_class->seal = ___1_mn_webmail_mailbox_seal;
+#line 164 "mn-webmail-mailbox.c"
+ c->get_error_message = NULL;
+ c->webmail_check = NULL;
+#line 316 "mn-webmail-mailbox.gob"
+ mn_authenticated_mailbox_class->authenticated_check = ___d_mn_webmail_mailbox_authenticated_check;
+#line 169 "mn-webmail-mailbox.c"
+ g_object_class->finalize = ___finalize;
+ g_object_class->get_property = ___object_get_property;
+ g_object_class->set_property = ___object_set_property;
+ {
+ GParamSpec *param_spec;
+
+ param_spec = g_param_spec_string
+ ("folder" /* name */,
+ NULL /* nick */,
+ NULL /* blurb */,
+ "Inbox" /* default_value */,
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | MN_MAILBOX_PARAM_REQUIRED | MN_MAILBOX_PARAM_LOAD_SAVE | G_PARAM_CONSTRUCT));
+ g_object_class_install_property (g_object_class,
+ PROP_FOLDER,
+ param_spec);
+ }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_set_property (GObject *object,
+ guint property_id,
+ const GValue *VAL G_GNUC_UNUSED,
+ GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::set_property"
+{
+ MNWebmailMailbox *self G_GNUC_UNUSED;
+
+ self = MN_WEBMAIL_MAILBOX (object);
+
+ switch (property_id) {
+ case PROP_FOLDER:
+ {
+#line 47 "mn-webmail-mailbox.gob"
+{ char *old = self->folder; self->folder = g_value_dup_string (VAL); g_free (old); }
+#line 205 "mn-webmail-mailbox.c"
+ }
+ break;
+ default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+# undef G_STRLOC
+# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_get_property (GObject *object,
+ guint property_id,
+ GValue *VAL G_GNUC_UNUSED,
+ GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::get_property"
+{
+ MNWebmailMailbox *self G_GNUC_UNUSED;
+
+ self = MN_WEBMAIL_MAILBOX (object);
+
+ switch (property_id) {
+ case PROP_FOLDER:
+ {
+#line 47 "mn-webmail-mailbox.gob"
+g_value_set_string (VAL, self->folder);
+#line 236 "mn-webmail-mailbox.c"
+ }
+ break;
+ default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+# undef G_STRLOC
+# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+ }
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 53 "mn-webmail-mailbox.gob"
+static void
+___1_mn_webmail_mailbox_seal (MNMailbox * mailbox G_GNUC_UNUSED)
+#line 256 "mn-webmail-mailbox.c"
+#define PARENT_HANDLER(___mailbox) \
+ { if(MN_MAILBOX_CLASS(parent_class)->seal) \
+ (* MN_MAILBOX_CLASS(parent_class)->seal)(___mailbox); }
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::seal"
+{
+#line 55 "mn-webmail-mailbox.gob"
+
+ MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
+ Self *self = SELF(mailbox);
+
+ PARENT_HANDLER(mailbox);
+
+ if (! mailbox->runtime_name)
+ mailbox->runtime_name = self_build_name(SELF_GET_CLASS(self), MN_AUTHENTICATED_MAILBOX(mailbox)->username, self->folder);
+
+ if (! auth_mailbox->keyring_domain)
+ auth_mailbox->keyring_domain = g_strdup(MN_WEBMAIL_MAILBOX_CLASS(SELF_GET_CLASS(self))->default_domain);
+ }}
+#line 276 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 68 "mn-webmail-mailbox.gob"
+void
+mn_webmail_mailbox_parse_username (MNWebmailMailbox * self, char ** username, char ** domain)
+#line 283 "mn-webmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::parse_username"
+#line 68 "mn-webmail-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 68 "mn-webmail-mailbox.gob"
+ g_return_if_fail (MN_IS_WEBMAIL_MAILBOX (self));
+#line 68 "mn-webmail-mailbox.gob"
+ g_return_if_fail (username != NULL);
+#line 68 "mn-webmail-mailbox.gob"
+ g_return_if_fail (domain != NULL);
+#line 294 "mn-webmail-mailbox.c"
+{
+#line 70 "mn-webmail-mailbox.gob"
+
+ mn_authenticated_mailbox_parse_username(MN_AUTHENTICATED_MAILBOX(self), username, domain);
+ if (! *domain)
+ *domain = g_strdup(MN_WEBMAIL_MAILBOX_CLASS(SELF_GET_CLASS(self))->default_domain);
+ }}
+#line 302 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 76 "mn-webmail-mailbox.gob"
+static int
+mn_webmail_mailbox_create_temporary_file (char ** filename, GError ** err)
+#line 308 "mn-webmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::create_temporary_file"
+#line 76 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (filename != NULL, (int )0);
+#line 313 "mn-webmail-mailbox.c"
+{
+#line 78 "mn-webmail-mailbox.gob"
+
+ int fd;
+ char *_filename;
+ GError *tmp_err = NULL;
+
+ /* GetLive chokes on the hyphen in "mail-notification", so use "mn" */
+ fd = g_file_open_tmp("mn.XXXXXX", &_filename, &tmp_err);
+ if (fd == -1)
+ {
+ g_set_error(err, 0, 0, _("unable to create a temporary file: %s"), tmp_err->message);
+ g_error_free(tmp_err);
+ return -1;
+ }
+
+ if (fchmod(fd, S_IRUSR | S_IWUSR) < 0)
+ {
+ g_set_error(err, 0, 0, _("unable to change the permissions of the temporary file: %s"), g_strerror(errno));
+ g_free(_filename);
+ close(fd);
+ return -1;
+ }
+
+ *filename = _filename;
+ return fd;
+ }}
+#line 341 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 104 "mn-webmail-mailbox.gob"
+char *
+mn_webmail_mailbox_create_spool_file (GError ** err)
+#line 347 "mn-webmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::create_spool_file"
+{
+#line 106 "mn-webmail-mailbox.gob"
+
+ int fd;
+ char *filename;
+
+ fd = self_create_temporary_file(&filename, err);
+ if (fd == -1)
+ return NULL;
+
+ close(fd);
+
+ return filename;
+ }}
+#line 364 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 119 "mn-webmail-mailbox.gob"
+char *
+mn_webmail_mailbox_write_temporary_file (const char * contents, GError ** err)
+#line 370 "mn-webmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::write_temporary_file"
+#line 119 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (contents != NULL, (char * )0);
+#line 375 "mn-webmail-mailbox.c"
+{
+#line 121 "mn-webmail-mailbox.gob"
+
+ int fd;
+ GError *tmp_err = NULL;
+ char *filename;
+ GIOChannel *channel;
+ gsize bytes_written;
+
+ fd = self_create_temporary_file(&filename, err);
+ if (fd == -1)
+ return NULL;
+
+ channel = g_io_channel_unix_new(fd);
+
+ if (g_io_channel_write_chars(channel, contents, -1, &bytes_written, &tmp_err) != G_IO_STATUS_NORMAL)
+ {
+ g_set_error(err, 0, 0, _("unable to write to %s: %s"), filename, tmp_err->message);
+ goto error;
+ }
+
+ if (g_io_channel_shutdown(channel, TRUE, &tmp_err) != G_IO_STATUS_NORMAL)
+ {
+ g_set_error(err, 0, 0, _("unable to close %s: %s"), filename, tmp_err->message);
+ goto error_noshutdown;
+ }
+
+ g_io_channel_unref(channel);
+
+ return filename;
+
+ error:
+ g_io_channel_shutdown(channel, FALSE, NULL);
+ error_noshutdown:
+ g_io_channel_unref(channel);
+ g_free(filename);
+ return NULL;
+ }}
+#line 414 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 158 "mn-webmail-mailbox.gob"
+static char *
+mn_webmail_mailbox_get_error_message (MNWebmailMailbox * self, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure)
+#line 420 "mn-webmail-mailbox.c"
+{
+ MNWebmailMailboxClass *klass;
+#line 158 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (char * )0);
+#line 158 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (MN_IS_WEBMAIL_MAILBOX (self), (char * )0);
+#line 427 "mn-webmail-mailbox.c"
+ klass = MN_WEBMAIL_MAILBOX_GET_CLASS(self);
+
+ if(klass->get_error_message)
+ return (*klass->get_error_message)(self,helper_stdout,helper_stderr,is_auth_failure);
+ else
+ return (char * )(0);
+}
+
+#line 164 "mn-webmail-mailbox.gob"
+static void
+mn_webmail_mailbox_display_multiline_text (MNWebmailMailbox * self, const char * text, const char * line_prefix)
+#line 439 "mn-webmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::display_multiline_text"
+#line 164 "mn-webmail-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 164 "mn-webmail-mailbox.gob"
+ g_return_if_fail (MN_IS_WEBMAIL_MAILBOX (self));
+#line 164 "mn-webmail-mailbox.gob"
+ g_return_if_fail (text != NULL);
+#line 164 "mn-webmail-mailbox.gob"
+ g_return_if_fail (line_prefix != NULL);
+#line 450 "mn-webmail-mailbox.c"
+{
+#line 168 "mn-webmail-mailbox.gob"
+
+ char **lines;
+ int i;
+
+ lines = g_strsplit(text, "\n", 0);
+ for (i = 0; lines[i]; i++)
+ {
+ // do not display the empty last line
+ if (! lines[i + 1] && ! lines[i][0])
+ break;
+
+ mn_mailbox_notice(MN_MAILBOX(self), "%s%s", line_prefix, lines[i]);
+ }
+ g_strfreev(lines);
+ }}
+#line 468 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 184 "mn-webmail-mailbox.gob"
+void
+mn_webmail_mailbox_display_config (MNWebmailMailbox * self, const char * config)
+#line 474 "mn-webmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::display_config"
+#line 184 "mn-webmail-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 184 "mn-webmail-mailbox.gob"
+ g_return_if_fail (MN_IS_WEBMAIL_MAILBOX (self));
+#line 184 "mn-webmail-mailbox.gob"
+ g_return_if_fail (config != NULL);
+#line 483 "mn-webmail-mailbox.c"
+{
+#line 186 "mn-webmail-mailbox.gob"
+
+ mn_mailbox_notice(MN_MAILBOX(self), _("configuration:"));
+ self_display_multiline_text(self, config, "> ");
+ }}
+#line 490 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 191 "mn-webmail-mailbox.gob"
+static void
+mn_webmail_mailbox_display_output (MNWebmailMailbox * self, const char * header, const char * contents)
+#line 496 "mn-webmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::display_output"
+#line 191 "mn-webmail-mailbox.gob"
+ g_return_if_fail (self != NULL);
+#line 191 "mn-webmail-mailbox.gob"
+ g_return_if_fail (MN_IS_WEBMAIL_MAILBOX (self));
+#line 191 "mn-webmail-mailbox.gob"
+ g_return_if_fail (header != NULL);
+#line 505 "mn-webmail-mailbox.c"
+{
+#line 195 "mn-webmail-mailbox.gob"
+
+ if (! contents || ! *contents)
+ return;
+
+ mn_mailbox_notice(MN_MAILBOX(self), "%s", header);
+ self_display_multiline_text(self, contents, "< ");
+ }}
+#line 515 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 203 "mn-webmail-mailbox.gob"
+gboolean
+mn_webmail_mailbox_run_helper (MNWebmailMailbox * self, const char * name, const char * command, GError ** err)
+#line 521 "mn-webmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::run_helper"
+#line 203 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 203 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (MN_IS_WEBMAIL_MAILBOX (self), (gboolean )0);
+#line 203 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (name != NULL, (gboolean )0);
+#line 203 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (command != NULL, (gboolean )0);
+#line 532 "mn-webmail-mailbox.c"
+{
+#line 208 "mn-webmail-mailbox.gob"
+
+ GError *tmp_err = NULL;
+ char *helper_stdout;
+ char *helper_stderr;
+ int exit_status;
+ gboolean status = FALSE;
+
+ mn_mailbox_notice(MN_MAILBOX(self), _("running %s"), command);
+
+ if (! g_spawn_command_line_sync(command, &helper_stdout, &helper_stderr, &exit_status, &tmp_err))
+ {
+ g_set_error(err, 0, 0, _("cannot execute \"%s\": %s"), name, tmp_err->message);
+ g_error_free(tmp_err);
+ return FALSE;
+ }
+
+ self_display_output(self, _("standard output:"), helper_stdout);
+ self_display_output(self, _("standard error output:"), helper_stderr);
+
+ if (WEXITSTATUS(exit_status) != 0)
+ {
+ char *message;
+ gboolean is_auth_failure = FALSE;
+
+ message = self_get_error_message(self,
+ helper_stdout,
+ helper_stderr,
+ &is_auth_failure);
+ if (message)
+ {
+ g_set_error(err, 0, 0, "%s", message);
+ g_free(message);
+ }
+ else
+ /* translators: %s is a program name, as in "unknown fetchyahoo failure" */
+ g_set_error(err, 0, 0, _("unknown %s failure"), name);
+
+ if (is_auth_failure && MN_AUTHENTICATED_MAILBOX(self)->auth_prompted)
+ mn_authenticated_mailbox_auth_failed(MN_AUTHENTICATED_MAILBOX(self));
+
+ goto end;
+ }
+
+ status = TRUE;
+
+ end:
+ g_free(helper_stdout);
+ g_free(helper_stderr);
+
+ return status;
+ }}
+#line 586 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 260 "mn-webmail-mailbox.gob"
+gboolean
+mn_webmail_mailbox_read_spool_file (MNWebmailMailbox * self, const char * spool_file, GError ** err)
+#line 592 "mn-webmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::read_spool_file"
+#line 260 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 260 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (MN_IS_WEBMAIL_MAILBOX (self), (gboolean )0);
+#line 260 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (spool_file != NULL, (gboolean )0);
+#line 601 "mn-webmail-mailbox.c"
+{
+#line 262 "mn-webmail-mailbox.gob"
+
+ int fd;
+ GMimeStream *stream;
+ GMimeParser *parser;
+ GSList *messages = NULL;
+
+ fd = open(spool_file, O_RDONLY);
+ if (fd < 0)
+ {
+ g_set_error(err, 0, 0, _("unable to open %s: %s"), spool_file, strerror(errno));
+ return FALSE;
+ }
+
+ stream = g_mime_stream_fs_new(fd);
+
+ parser = g_mime_parser_new_with_stream(stream);
+ g_object_unref(stream);
+ g_mime_parser_set_scan_from(parser, TRUE);
+
+ while (! g_mime_parser_eos(parser))
+ {
+ GMimeMessage *mime_message;
+
+ mime_message = g_mime_parser_construct_message(parser);
+ if (mime_message)
+ {
+ MNMessage *message;
+
+ message = mn_message_new_from_mime_message(MN_MAILBOX(self), mime_message, NULL, 0, TRUE);
+ g_object_unref(mime_message);
+
+ if (message)
+ messages = g_slist_prepend(messages, message);
+ }
+ }
+
+ g_object_unref(parser);
+
+ /* the fd is owned by the stream and closed by it */
+
+ GDK_THREADS_ENTER();
+
+ mn_mailbox_set_messages(MN_MAILBOX(self), messages);
+ mn_g_object_slist_free(messages);
+
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+
+ return TRUE;
+ }}
+#line 654 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 313 "mn-webmail-mailbox.gob"
+static gboolean
+mn_webmail_mailbox_webmail_check (MNWebmailMailbox * self, GError ** err)
+#line 660 "mn-webmail-mailbox.c"
+{
+ MNWebmailMailboxClass *klass;
+#line 313 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 313 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (MN_IS_WEBMAIL_MAILBOX (self), (gboolean )0);
+#line 667 "mn-webmail-mailbox.c"
+ klass = MN_WEBMAIL_MAILBOX_GET_CLASS(self);
+
+ if(klass->webmail_check)
+ return (*klass->webmail_check)(self,err);
+ else
+ return (gboolean )(0);
+}
+
+#line 316 "mn-webmail-mailbox.gob"
+static void
+___d_mn_webmail_mailbox_authenticated_check (MNAuthenticatedMailbox * mailbox G_GNUC_UNUSED)
+#line 679 "mn-webmail-mailbox.c"
+#define PARENT_HANDLER(___mailbox) \
+ { if(MN_AUTHENTICATED_MAILBOX_CLASS(parent_class)->authenticated_check) \
+ (* MN_AUTHENTICATED_MAILBOX_CLASS(parent_class)->authenticated_check)(___mailbox); }
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::authenticated_check"
+{
+#line 318 "mn-webmail-mailbox.gob"
+
+ Self *self = SELF(mailbox);
+ GError *err = NULL;
+
+ PARENT_HANDLER(mailbox);
+
+ again:
+ if (! mn_authenticated_mailbox_fill_password(mailbox, TRUE))
+ return;
+
+ if (! self_webmail_check(self, &err))
+ {
+ if (mailbox->auth_prompted && mailbox->auth_failed)
+ {
+ g_clear_error(&err);
+ goto again;
+ }
+
+ GDK_THREADS_ENTER();
+
+ mn_mailbox_set_error(MN_MAILBOX(self), "%s", err->message);
+ g_error_free(err);
+
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
+ }}
+#line 714 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 346 "mn-webmail-mailbox.gob"
+char *
+mn_webmail_mailbox_build_name (MNWebmailMailboxClass * class, const char * username, const char * folder)
+#line 721 "mn-webmail-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Webmail:Mailbox::build_name"
+#line 346 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (class != NULL, (char * )0);
+#line 346 "mn-webmail-mailbox.gob"
+ g_return_val_if_fail (username != NULL, (char * )0);
+#line 728 "mn-webmail-mailbox.c"
+{
+#line 350 "mn-webmail-mailbox.gob"
+
+ GString *name;
+
+ name = g_string_new(NULL);
+
+ if (strchr(username, '@'))
+ g_string_append(name, username);
+ else
+ g_string_append_printf(name, "%s@%s", username, class->default_domain);
+
+ if (folder && strcmp(folder, "Inbox"))
+ g_string_append_printf(name, "/%s", folder);
+
+ return g_string_free(name, FALSE);
+ }}
+#line 746 "mn-webmail-mailbox.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-webmail-mailbox.gob b/src/mn-webmail-mailbox.gob
@@ -0,0 +1,365 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%headertop{
+#include "mn-authenticated-mailbox.h"
+%}
+
+%{
+#include "config.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <glib/gi18n.h>
+#include <gmime/gmime.h>
+#include "mn-mailbox-private.h"
+#include "mn-authenticated-mailbox-private.h"
+#include "mn-message-mime.h"
+#include "mn-util.h"
+%}
+
+class MN:Webmail:Mailbox from MN:Authenticated:Mailbox (abstract)
+{
+ classwide const char *default_domain;
+
+ public char *folder destroywith g_free;
+ property STRING folder (link,
+ flags = CONSTRUCT
+ | MN_MAILBOX_PARAM_LOAD_SAVE
+ | MN_MAILBOX_PARAM_REQUIRED,
+ default_value = "Inbox");
+
+ override (MN:Mailbox) void
+ seal (MNMailbox *mailbox)
+ {
+ MNAuthenticatedMailbox *auth_mailbox = MN_AUTHENTICATED_MAILBOX(mailbox);
+ Self *self = SELF(mailbox);
+
+ PARENT_HANDLER(mailbox);
+
+ if (! mailbox->runtime_name)
+ mailbox->runtime_name = self_build_name(SELF_GET_CLASS(self), MN_AUTHENTICATED_MAILBOX(mailbox)->username, self->folder);
+
+ if (! auth_mailbox->keyring_domain)
+ auth_mailbox->keyring_domain = g_strdup(MN_WEBMAIL_MAILBOX_CLASS(SELF_GET_CLASS(self))->default_domain);
+ }
+
+ protected void
+ parse_username (self, char **username (check null), char **domain (check null))
+ {
+ mn_authenticated_mailbox_parse_username(MN_AUTHENTICATED_MAILBOX(self), username, domain);
+ if (! *domain)
+ *domain = g_strdup(MN_WEBMAIL_MAILBOX_CLASS(SELF_GET_CLASS(self))->default_domain);
+ }
+
+ private int
+ create_temporary_file (char **filename (check null), GError **err)
+ {
+ int fd;
+ char *_filename;
+ GError *tmp_err = NULL;
+
+ /* GetLive chokes on the hyphen in "mail-notification", so use "mn" */
+ fd = g_file_open_tmp("mn.XXXXXX", &_filename, &tmp_err);
+ if (fd == -1)
+ {
+ g_set_error(err, 0, 0, _("unable to create a temporary file: %s"), tmp_err->message);
+ g_error_free(tmp_err);
+ return -1;
+ }
+
+ if (fchmod(fd, S_IRUSR | S_IWUSR) < 0)
+ {
+ g_set_error(err, 0, 0, _("unable to change the permissions of the temporary file: %s"), g_strerror(errno));
+ g_free(_filename);
+ close(fd);
+ return -1;
+ }
+
+ *filename = _filename;
+ return fd;
+ }
+
+ protected char *
+ create_spool_file (GError **err)
+ {
+ int fd;
+ char *filename;
+
+ fd = self_create_temporary_file(&filename, err);
+ if (fd == -1)
+ return NULL;
+
+ close(fd);
+
+ return filename;
+ }
+
+ protected char *
+ write_temporary_file (const char *contents (check null), GError **err)
+ {
+ int fd;
+ GError *tmp_err = NULL;
+ char *filename;
+ GIOChannel *channel;
+ gsize bytes_written;
+
+ fd = self_create_temporary_file(&filename, err);
+ if (fd == -1)
+ return NULL;
+
+ channel = g_io_channel_unix_new(fd);
+
+ if (g_io_channel_write_chars(channel, contents, -1, &bytes_written, &tmp_err) != G_IO_STATUS_NORMAL)
+ {
+ g_set_error(err, 0, 0, _("unable to write to %s: %s"), filename, tmp_err->message);
+ goto error;
+ }
+
+ if (g_io_channel_shutdown(channel, TRUE, &tmp_err) != G_IO_STATUS_NORMAL)
+ {
+ g_set_error(err, 0, 0, _("unable to close %s: %s"), filename, tmp_err->message);
+ goto error_noshutdown;
+ }
+
+ g_io_channel_unref(channel);
+
+ return filename;
+
+ error:
+ g_io_channel_shutdown(channel, FALSE, NULL);
+ error_noshutdown:
+ g_io_channel_unref(channel);
+ g_free(filename);
+ return NULL;
+ }
+
+ virtual private char *
+ get_error_message (self,
+ const char *helper_stdout,
+ const char *helper_stderr,
+ gboolean *is_auth_failure);
+
+ private void
+ display_multiline_text (self,
+ const char *text (check null),
+ const char *line_prefix (check null))
+ {
+ char **lines;
+ int i;
+
+ lines = g_strsplit(text, "\n", 0);
+ for (i = 0; lines[i]; i++)
+ {
+ // do not display the empty last line
+ if (! lines[i + 1] && ! lines[i][0])
+ break;
+
+ mn_mailbox_notice(MN_MAILBOX(self), "%s%s", line_prefix, lines[i]);
+ }
+ g_strfreev(lines);
+ }
+
+ protected void
+ display_config (self, const char *config (check null))
+ {
+ mn_mailbox_notice(MN_MAILBOX(self), _("configuration:"));
+ self_display_multiline_text(self, config, "> ");
+ }
+
+ private void
+ display_output (self,
+ const char *header (check null),
+ const char *contents)
+ {
+ if (! contents || ! *contents)
+ return;
+
+ mn_mailbox_notice(MN_MAILBOX(self), "%s", header);
+ self_display_multiline_text(self, contents, "< ");
+ }
+
+ protected gboolean
+ run_helper (self,
+ const char *name (check null),
+ const char *command (check null),
+ GError **err)
+ {
+ GError *tmp_err = NULL;
+ char *helper_stdout;
+ char *helper_stderr;
+ int exit_status;
+ gboolean status = FALSE;
+
+ mn_mailbox_notice(MN_MAILBOX(self), _("running %s"), command);
+
+ if (! g_spawn_command_line_sync(command, &helper_stdout, &helper_stderr, &exit_status, &tmp_err))
+ {
+ g_set_error(err, 0, 0, _("cannot execute \"%s\": %s"), name, tmp_err->message);
+ g_error_free(tmp_err);
+ return FALSE;
+ }
+
+ self_display_output(self, _("standard output:"), helper_stdout);
+ self_display_output(self, _("standard error output:"), helper_stderr);
+
+ if (WEXITSTATUS(exit_status) != 0)
+ {
+ char *message;
+ gboolean is_auth_failure = FALSE;
+
+ message = self_get_error_message(self,
+ helper_stdout,
+ helper_stderr,
+ &is_auth_failure);
+ if (message)
+ {
+ g_set_error(err, 0, 0, "%s", message);
+ g_free(message);
+ }
+ else
+ /* translators: %s is a program name, as in "unknown fetchyahoo failure" */
+ g_set_error(err, 0, 0, _("unknown %s failure"), name);
+
+ if (is_auth_failure && MN_AUTHENTICATED_MAILBOX(self)->auth_prompted)
+ mn_authenticated_mailbox_auth_failed(MN_AUTHENTICATED_MAILBOX(self));
+
+ goto end;
+ }
+
+ status = TRUE;
+
+ end:
+ g_free(helper_stdout);
+ g_free(helper_stderr);
+
+ return status;
+ }
+
+ protected gboolean
+ read_spool_file (self, const char *spool_file (check null), GError **err)
+ {
+ int fd;
+ GMimeStream *stream;
+ GMimeParser *parser;
+ GSList *messages = NULL;
+
+ fd = open(spool_file, O_RDONLY);
+ if (fd < 0)
+ {
+ g_set_error(err, 0, 0, _("unable to open %s: %s"), spool_file, strerror(errno));
+ return FALSE;
+ }
+
+ stream = g_mime_stream_fs_new(fd);
+
+ parser = g_mime_parser_new_with_stream(stream);
+ g_object_unref(stream);
+ g_mime_parser_set_scan_from(parser, TRUE);
+
+ while (! g_mime_parser_eos(parser))
+ {
+ GMimeMessage *mime_message;
+
+ mime_message = g_mime_parser_construct_message(parser);
+ if (mime_message)
+ {
+ MNMessage *message;
+
+ message = mn_message_new_from_mime_message(MN_MAILBOX(self), mime_message, NULL, 0, TRUE);
+ g_object_unref(mime_message);
+
+ if (message)
+ messages = g_slist_prepend(messages, message);
+ }
+ }
+
+ g_object_unref(parser);
+
+ /* the fd is owned by the stream and closed by it */
+
+ GDK_THREADS_ENTER();
+
+ mn_mailbox_set_messages(MN_MAILBOX(self), messages);
+ mn_g_object_slist_free(messages);
+
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+
+ return TRUE;
+ }
+
+ virtual private gboolean
+ webmail_check (self, GError **err);
+
+ override (MN:Authenticated:Mailbox) void
+ authenticated_check (MNAuthenticatedMailbox *mailbox)
+ {
+ Self *self = SELF(mailbox);
+ GError *err = NULL;
+
+ PARENT_HANDLER(mailbox);
+
+ again:
+ if (! mn_authenticated_mailbox_fill_password(mailbox, TRUE))
+ return;
+
+ if (! self_webmail_check(self, &err))
+ {
+ if (mailbox->auth_prompted && mailbox->auth_failed)
+ {
+ g_clear_error(&err);
+ goto again;
+ }
+
+ GDK_THREADS_ENTER();
+
+ mn_mailbox_set_error(MN_MAILBOX(self), "%s", err->message);
+ g_error_free(err);
+
+ gdk_flush();
+ GDK_THREADS_LEAVE();
+ }
+ }
+
+ public char *
+ build_name (MNWebmailMailboxClass *class (check null),
+ const char *username (check null),
+ const char *folder)
+ {
+ GString *name;
+
+ name = g_string_new(NULL);
+
+ if (strchr(username, '@'))
+ g_string_append(name, username);
+ else
+ g_string_append_printf(name, "%s@%s", username, class->default_domain);
+
+ if (folder && strcmp(folder, "Inbox"))
+ g_string_append_printf(name, "/%s", folder);
+
+ return g_string_free(name, FALSE);
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-webmail-mailbox.gob.stamp
diff --git a/src/mn-webmail-mailbox.h b/src/mn-webmail-mailbox.h
@@ -0,0 +1,77 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include "mn-authenticated-mailbox.h"
+
+#ifndef __MN_WEBMAIL_MAILBOX_H__
+#define __MN_WEBMAIL_MAILBOX_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_WEBMAIL_MAILBOX (mn_webmail_mailbox_get_type())
+#define MN_WEBMAIL_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_webmail_mailbox_get_type(), MNWebmailMailbox)
+#define MN_WEBMAIL_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_webmail_mailbox_get_type(), MNWebmailMailbox const)
+#define MN_WEBMAIL_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_webmail_mailbox_get_type(), MNWebmailMailboxClass)
+#define MN_IS_WEBMAIL_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_webmail_mailbox_get_type ())
+
+#define MN_WEBMAIL_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_webmail_mailbox_get_type(), MNWebmailMailboxClass)
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_WEBMAIL_MAILBOX__
+#define __TYPEDEF_MN_WEBMAIL_MAILBOX__
+typedef struct _MNWebmailMailbox MNWebmailMailbox;
+#endif
+struct _MNWebmailMailbox {
+ MNAuthenticatedMailbox __parent__;
+ /*< public >*/
+ char * folder;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNWebmailMailboxClass MNWebmailMailboxClass;
+struct _MNWebmailMailboxClass {
+ MNAuthenticatedMailboxClass __parent__;
+ char * (* get_error_message) (MNWebmailMailbox * self, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure);
+ gboolean (* webmail_check) (MNWebmailMailbox * self, GError ** err);
+ const char * default_domain;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_webmail_mailbox_get_type (void);
+char * mn_webmail_mailbox_build_name (MNWebmailMailboxClass * class,
+ const char * username,
+ const char * folder);
+
+/*
+ * Argument wrapping macros
+ */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_WEBMAIL_MAILBOX_PROP_FOLDER(arg) "folder", __extension__ ({gchar *z = (arg); z;})
+#define MN_WEBMAIL_MAILBOX_GET_PROP_FOLDER(arg) "folder", __extension__ ({gchar **z = (arg); z;})
+#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_WEBMAIL_MAILBOX_PROP_FOLDER(arg) "folder",(gchar *)(arg)
+#define MN_WEBMAIL_MAILBOX_GET_PROP_FOLDER(arg) "folder",(gchar **)(arg)
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-xml.c b/src/mn-xml.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -37,7 +37,7 @@ mn_xml_import_properties (GObject *object, xmlNode *node)
properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(object), &n_properties);
for (i = 0; i < n_properties; i++)
- if ((properties[i]->flags & MN_XML_PARAM_IMPORT_EXPORT) != 0)
+ if ((properties[i]->flags & MN_XML_PARAM_IMPORT) != 0)
{
char *content;
@@ -73,7 +73,7 @@ mn_xml_export_properties (GObject *object, xmlNode *node)
properties = g_object_class_list_properties(G_OBJECT_GET_CLASS(object), &n_properties);
for (i = 0; i < n_properties; i++)
- if ((properties[i]->flags & MN_XML_PARAM_IMPORT_EXPORT) != 0)
+ if ((properties[i]->flags & MN_XML_PARAM_EXPORT) != 0)
{
GValue value = { 0, };
gboolean is_default;
diff --git a/src/mn-xml.h b/src/mn-xml.h
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -25,14 +25,20 @@
typedef enum
{
- /* import/export this property */
- MN_XML_PARAM_IMPORT_EXPORT = 1 << (G_PARAM_USER_SHIFT + 0),
+ /* import this property in mn_xml_import_properties() */
+ MN_XML_PARAM_IMPORT = 1 << (G_PARAM_USER_SHIFT + 0),
+
+ /* export this property in mn_xml_export_properties() */
+ MN_XML_PARAM_EXPORT = 1 << (G_PARAM_USER_SHIFT + 1),
+
+ /* import and export this property */
+ MN_XML_PARAM_IMPORT_EXPORT = MN_XML_PARAM_IMPORT | MN_XML_PARAM_EXPORT,
/* ignore the case of a string property when checking if it has the default value */
- MN_XML_PARAM_IGNORE_CASE = 1 << (G_PARAM_USER_SHIFT + 1)
+ MN_XML_PARAM_IGNORE_CASE = 1 << (G_PARAM_USER_SHIFT + 2)
} MNXMLParamFlags;
-#define MN_XML_PARAM_USER_SHIFT (G_PARAM_USER_SHIFT + 2)
+#define MN_XML_PARAM_USER_SHIFT (G_PARAM_USER_SHIFT + 3)
void mn_xml_import_properties (GObject *object, xmlNode *node);
void mn_xml_export_properties (GObject *object, xmlNode *node);
diff --git a/src/mn-yahoo-mailbox-private.h b/src/mn-yahoo-mailbox-private.h
@@ -0,0 +1,17 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_YAHOO_MAILBOX_PRIVATE_H__
+#define __MN_YAHOO_MAILBOX_PRIVATE_H__
+
+#include "mn-yahoo-mailbox.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-yahoo-mailbox-properties-private.h b/src/mn-yahoo-mailbox-properties-private.h
@@ -0,0 +1,17 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#ifndef __MN_YAHOO_MAILBOX_PROPERTIES_PRIVATE_H__
+#define __MN_YAHOO_MAILBOX_PROPERTIES_PRIVATE_H__
+
+#include "mn-yahoo-mailbox-properties.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-yahoo-mailbox-properties.c b/src/mn-yahoo-mailbox-properties.c
@@ -0,0 +1,122 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-yahoo-mailbox-properties.h"
+
+#include "mn-yahoo-mailbox-properties-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 26 "mn-yahoo-mailbox-properties.gob"
+
+#include "config.h"
+#include "mn-stock.h"
+
+#line 31 "mn-yahoo-mailbox-properties.c"
+/* self casting macros */
+#define SELF(x) MN_YAHOO_MAILBOX_PROPERTIES(x)
+#define SELF_CONST(x) MN_YAHOO_MAILBOX_PROPERTIES_CONST(x)
+#define IS_SELF(x) MN_IS_YAHOO_MAILBOX_PROPERTIES(x)
+#define TYPE_SELF MN_TYPE_YAHOO_MAILBOX_PROPERTIES
+#define SELF_CLASS(x) MN_YAHOO_MAILBOX_PROPERTIES_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_YAHOO_MAILBOX_PROPERTIES_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNYahooMailboxProperties Self;
+typedef MNYahooMailboxPropertiesClass SelfClass;
+
+/* here are local prototypes */
+static void mn_yahoo_mailbox_properties_init (MNYahooMailboxProperties * o) G_GNUC_UNUSED;
+static void mn_yahoo_mailbox_properties_class_init (MNYahooMailboxPropertiesClass * class) G_GNUC_UNUSED;
+
+/* pointer to the class of our parent */
+static MNWebmailMailboxPropertiesClass *parent_class = NULL;
+
+GType
+mn_yahoo_mailbox_properties_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNYahooMailboxPropertiesClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_yahoo_mailbox_properties_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNYahooMailboxProperties),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_yahoo_mailbox_properties_init,
+ NULL
+ };
+
+ type = g_type_register_static (MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES, "MNYahooMailboxProperties", &info, (GTypeFlags)0);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNYahooMailboxProperties *)g_object_new(mn_yahoo_mailbox_properties_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNYahooMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNYahooMailboxProperties *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNYahooMailboxProperties *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNYahooMailboxProperties *)g_object_new_valist (mn_yahoo_mailbox_properties_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+static void
+mn_yahoo_mailbox_properties_init (MNYahooMailboxProperties * o G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox:Properties::init"
+}
+#undef __GOB_FUNCTION__
+#line 33 "mn-yahoo-mailbox-properties.gob"
+static void
+mn_yahoo_mailbox_properties_class_init (MNYahooMailboxPropertiesClass * class G_GNUC_UNUSED)
+#line 103 "mn-yahoo-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox:Properties::class_init"
+
+ parent_class = g_type_class_ref (MN_TYPE_WEBMAIL_MAILBOX_PROPERTIES);
+
+ {
+#line 34 "mn-yahoo-mailbox-properties.gob"
+
+ MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
+
+ p_class->type = "yahoo";
+ p_class->stock_id = MN_STOCK_YAHOO;
+ p_class->combo_label = "Yahoo! Mail";
+
+#line 118 "mn-yahoo-mailbox-properties.c"
+ }
+}
+#undef __GOB_FUNCTION__
+
+
diff --git a/src/mn-yahoo-mailbox-properties.gob b/src/mn-yahoo-mailbox-properties.gob
@@ -0,0 +1,41 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%headertop{
+#include "mn-webmail-mailbox-properties.h"
+%}
+
+%{
+#include "config.h"
+#include "mn-stock.h"
+%}
+
+class MN:Yahoo:Mailbox:Properties from MN:Webmail:Mailbox:Properties
+{
+ class_init (class)
+ {
+ MNMailboxPropertiesClass *p_class = MN_MAILBOX_PROPERTIES_CLASS(class);
+
+ p_class->type = "yahoo";
+ p_class->stock_id = MN_STOCK_YAHOO;
+ p_class->combo_label = "Yahoo! Mail";
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-yahoo-mailbox-properties.gob.stamp
diff --git a/src/mn-yahoo-mailbox-properties.h b/src/mn-yahoo-mailbox-properties.h
@@ -0,0 +1,57 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include "mn-webmail-mailbox-properties.h"
+
+#ifndef __MN_YAHOO_MAILBOX_PROPERTIES_H__
+#define __MN_YAHOO_MAILBOX_PROPERTIES_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_YAHOO_MAILBOX_PROPERTIES (mn_yahoo_mailbox_properties_get_type())
+#define MN_YAHOO_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_yahoo_mailbox_properties_get_type(), MNYahooMailboxProperties)
+#define MN_YAHOO_MAILBOX_PROPERTIES_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_yahoo_mailbox_properties_get_type(), MNYahooMailboxProperties const)
+#define MN_YAHOO_MAILBOX_PROPERTIES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_yahoo_mailbox_properties_get_type(), MNYahooMailboxPropertiesClass)
+#define MN_IS_YAHOO_MAILBOX_PROPERTIES(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_yahoo_mailbox_properties_get_type ())
+
+#define MN_YAHOO_MAILBOX_PROPERTIES_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_yahoo_mailbox_properties_get_type(), MNYahooMailboxPropertiesClass)
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_YAHOO_MAILBOX_PROPERTIES__
+#define __TYPEDEF_MN_YAHOO_MAILBOX_PROPERTIES__
+typedef struct _MNYahooMailboxProperties MNYahooMailboxProperties;
+#endif
+struct _MNYahooMailboxProperties {
+ MNWebmailMailboxProperties __parent__;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNYahooMailboxPropertiesClass MNYahooMailboxPropertiesClass;
+struct _MNYahooMailboxPropertiesClass {
+ MNWebmailMailboxPropertiesClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_yahoo_mailbox_properties_get_type (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-yahoo-mailbox.c b/src/mn-yahoo-mailbox.c
@@ -0,0 +1,436 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 14
+
+#define selfp (self->_priv)
+
+#include "mn-yahoo-mailbox.h"
+
+#include "mn-yahoo-mailbox-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 26 "mn-yahoo-mailbox.gob"
+
+#include "config.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+#include <glib/gi18n.h>
+#include "mn-webmail-mailbox-private.h"
+#include "mn-stock.h"
+#include "mn-conf.h"
+
+#line 38 "mn-yahoo-mailbox.c"
+/* self casting macros */
+#define SELF(x) MN_YAHOO_MAILBOX(x)
+#define SELF_CONST(x) MN_YAHOO_MAILBOX_CONST(x)
+#define IS_SELF(x) MN_IS_YAHOO_MAILBOX(x)
+#define TYPE_SELF MN_TYPE_YAHOO_MAILBOX
+#define SELF_CLASS(x) MN_YAHOO_MAILBOX_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_YAHOO_MAILBOX_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNYahooMailbox Self;
+typedef MNYahooMailboxClass SelfClass;
+
+/* here are local prototypes */
+static void mn_yahoo_mailbox_class_init (MNYahooMailboxClass * class) G_GNUC_UNUSED;
+static void mn_yahoo_mailbox_init (MNYahooMailbox * self) G_GNUC_UNUSED;
+static char * mn_yahoo_mailbox_create_cookies_file (GError ** err) G_GNUC_UNUSED;
+static char * mn_yahoo_mailbox_create_config_file (MNYahooMailbox * self, const char * spool_file, const char * cookies_file, GError ** err) G_GNUC_UNUSED;
+static char * ___5_mn_yahoo_mailbox_get_error_message (MNWebmailMailbox * mailbox, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure) G_GNUC_UNUSED;
+static gboolean mn_yahoo_mailbox_run_fetchyahoo (MNYahooMailbox * self, const char * config_file, GError ** err) G_GNUC_UNUSED;
+static gboolean ___7_mn_yahoo_mailbox_webmail_check (MNWebmailMailbox * mailbox, GError ** err) G_GNUC_UNUSED;
+
+/* pointer to the class of our parent */
+static MNWebmailMailboxClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_create_cookies_file mn_yahoo_mailbox_create_cookies_file
+#define self_create_config_file mn_yahoo_mailbox_create_config_file
+#define self_run_fetchyahoo mn_yahoo_mailbox_run_fetchyahoo
+GType
+mn_yahoo_mailbox_get_type (void)
+{
+ static GType type = 0;
+
+ if ___GOB_UNLIKELY(type == 0) {
+ static const GTypeInfo info = {
+ sizeof (MNYahooMailboxClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mn_yahoo_mailbox_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL /* class_data */,
+ sizeof (MNYahooMailbox),
+ 0 /* n_preallocs */,
+ (GInstanceInitFunc) mn_yahoo_mailbox_init,
+ NULL
+ };
+
+ type = g_type_register_static (MN_TYPE_WEBMAIL_MAILBOX, "MNYahooMailbox", &info, (GTypeFlags)0);
+ }
+
+ return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNYahooMailbox *)g_object_new(mn_yahoo_mailbox_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNYahooMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNYahooMailbox *
+GET_NEW_VARG (const char *first, ...)
+{
+ MNYahooMailbox *ret;
+ va_list ap;
+ va_start (ap, first);
+ ret = (MNYahooMailbox *)g_object_new_valist (mn_yahoo_mailbox_get_type (), first, ap);
+ va_end (ap);
+ return ret;
+}
+
+#line 42 "mn-yahoo-mailbox.gob"
+static void
+mn_yahoo_mailbox_class_init (MNYahooMailboxClass * class G_GNUC_UNUSED)
+#line 113 "mn-yahoo-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::class_init"
+ MNWebmailMailboxClass *mn_webmail_mailbox_class = (MNWebmailMailboxClass *)class;
+
+ parent_class = g_type_class_ref (MN_TYPE_WEBMAIL_MAILBOX);
+
+#line 167 "mn-yahoo-mailbox.gob"
+ mn_webmail_mailbox_class->get_error_message = ___5_mn_yahoo_mailbox_get_error_message;
+#line 222 "mn-yahoo-mailbox.gob"
+ mn_webmail_mailbox_class->webmail_check = ___7_mn_yahoo_mailbox_webmail_check;
+#line 124 "mn-yahoo-mailbox.c"
+ {
+#line 43 "mn-yahoo-mailbox.gob"
+
+ MN_MAILBOX_CLASS(class)->type = "yahoo";
+
+ /* 5 minutes is a good default */
+ MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 5;
+
+ MN_WEBMAIL_MAILBOX_CLASS(class)->default_domain = "yahoo.com";
+
+#line 135 "mn-yahoo-mailbox.c"
+ }
+}
+#undef __GOB_FUNCTION__
+#line 52 "mn-yahoo-mailbox.gob"
+static void
+mn_yahoo_mailbox_init (MNYahooMailbox * self G_GNUC_UNUSED)
+#line 142 "mn-yahoo-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::init"
+ {
+#line 53 "mn-yahoo-mailbox.gob"
+
+ mn_mailbox_set_format(MN_MAILBOX(self), "Yahoo! Mail");
+ mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_YAHOO);
+
+#line 151 "mn-yahoo-mailbox.c"
+ }
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 58 "mn-yahoo-mailbox.gob"
+static char *
+mn_yahoo_mailbox_create_cookies_file (GError ** err)
+#line 161 "mn-yahoo-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::create_cookies_file"
+{
+#line 60 "mn-yahoo-mailbox.gob"
+
+ char *filename;
+
+ /*
+ * If the file already exists, ensure it has the proper
+ * permissions. Otherwise, create it with the proper permissions.
+ */
+
+ filename = g_build_filename(mn_conf_dot_dir, "yahoo-cookies", NULL);
+ if (g_file_test(filename, G_FILE_TEST_EXISTS))
+ {
+ if (chmod(filename, S_IRUSR | S_IWUSR) < 0)
+ {
+ g_set_error(err, 0, 0, _("unable to change the permissions of %s: %s"), filename, g_strerror(errno));
+ goto error;
+ }
+ }
+ else
+ {
+ int fd;
+
+ fd = open(filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
+ if (fd < 0)
+ {
+ g_set_error(err, 0, 0, _("unable to create %s: %s"), filename, g_strerror(errno));
+ goto error;
+ }
+ close(fd);
+ }
+
+ return filename;
+
+ error:
+ g_free(filename);
+ return NULL;
+ }}
+#line 202 "mn-yahoo-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 97 "mn-yahoo-mailbox.gob"
+static char *
+mn_yahoo_mailbox_create_config_file (MNYahooMailbox * self, const char * spool_file, const char * cookies_file, GError ** err)
+#line 208 "mn-yahoo-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::create_config_file"
+#line 97 "mn-yahoo-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (char * )0);
+#line 97 "mn-yahoo-mailbox.gob"
+ g_return_val_if_fail (MN_IS_YAHOO_MAILBOX (self), (char * )0);
+#line 97 "mn-yahoo-mailbox.gob"
+ g_return_val_if_fail (spool_file != NULL, (char * )0);
+#line 97 "mn-yahoo-mailbox.gob"
+ g_return_val_if_fail (cookies_file != NULL, (char * )0);
+#line 219 "mn-yahoo-mailbox.c"
+{
+#line 102 "mn-yahoo-mailbox.gob"
+
+ GString *contents;
+ char *filename;
+
+ contents = g_string_new(NULL);
+
+ g_string_append_printf(contents,
+ "username = %s\n"
+ "password = %s\n"
+ "folder = %s\n"
+ "spool = %s\n"
+ "cookie-file = %s\n"
+ "new-messages-only = 1\n"
+ "no-delete = 1\n"
+ "leave-unread = 1\n",
+ MN_AUTHENTICATED_MAILBOX(self)->username,
+ MN_AUTHENTICATED_MAILBOX(self)->runtime_password,
+ MN_WEBMAIL_MAILBOX(self)->folder,
+ spool_file,
+ cookies_file);
+
+ if (eel_gconf_get_boolean(MN_CONF_SYSTEM_HTTP_PROXY_USE_HTTP_PROXY))
+ {
+ char *host;
+
+ host = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_HOST);
+ if (host && *host)
+ {
+ g_string_append_printf(contents,
+ "use-proxy = 1\n"
+ "proxy-host = %s\n"
+ "proxy-port = %i\n",
+ host,
+ eel_gconf_get_integer(MN_CONF_SYSTEM_HTTP_PROXY_PORT));
+
+ if (eel_gconf_get_boolean(MN_CONF_SYSTEM_HTTP_PROXY_USE_AUTHENTICATION))
+ {
+ char *user;
+ char *password;
+
+ user = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_USER);
+ password = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_PASSWORD);
+
+ if (user && *user && password && *password)
+ g_string_append_printf(contents,
+ "proxy-username = %s\n"
+ "proxy-password = %s\n",
+ user,
+ password);
+
+ g_free(user);
+ g_free(password);
+ }
+ }
+ g_free(host);
+ }
+
+ mn_webmail_mailbox_display_config(MN_WEBMAIL_MAILBOX(self), contents->str);
+ filename = mn_webmail_mailbox_write_temporary_file(contents->str, err);
+
+ g_string_free(contents, TRUE);
+
+ return filename;
+ }}
+#line 286 "mn-yahoo-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 167 "mn-yahoo-mailbox.gob"
+static char *
+___5_mn_yahoo_mailbox_get_error_message (MNWebmailMailbox * mailbox G_GNUC_UNUSED, const char * helper_stdout, const char * helper_stderr, gboolean * is_auth_failure)
+#line 292 "mn-yahoo-mailbox.c"
+#define PARENT_HANDLER(___mailbox,___helper_stdout,___helper_stderr,___is_auth_failure) \
+ ((MN_WEBMAIL_MAILBOX_CLASS(parent_class)->get_error_message)? \
+ (* MN_WEBMAIL_MAILBOX_CLASS(parent_class)->get_error_message)(___mailbox,___helper_stdout,___helper_stderr,___is_auth_failure): \
+ ((char * )0))
+{
+#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::get_error_message"
+{
+#line 172 "mn-yahoo-mailbox.gob"
+
+ if (helper_stderr)
+ {
+ char **lines;
+ int i;
+ char *message = NULL;
+
+ lines = g_strsplit(helper_stderr, "\n", 0);
+ for (i = 0; lines[i]; i++)
+ if (g_str_has_prefix(lines[i], "Failed: "))
+ {
+ char *escaped;
+
+ if (mn_ascii_strcasestr(lines[i], "wrong password")
+ || mn_ascii_strcasestr(lines[i], "invalid ID")
+ || (mn_ascii_strcasestr(lines[i], "Yahoo user")
+ && mn_ascii_strcasestr(lines[i], "does not exist")))
+ *is_auth_failure = TRUE;
+
+ escaped = mn_utf8_escape(lines[i] + 8);
+ message = g_strdup_printf(_("\"%s\""), escaped);
+ g_free(escaped);
+
+ break;
+ }
+ g_strfreev(lines);
+
+ if (message)
+ return message;
+
+ if (mn_ascii_strcasestr(helper_stderr, "an image of text"))
+ return g_strdup(_("delay between mail checks too small"));
+ }
+
+ return NULL;
+ }}
+#line 337 "mn-yahoo-mailbox.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 209 "mn-yahoo-mailbox.gob"
+static gboolean
+mn_yahoo_mailbox_run_fetchyahoo (MNYahooMailbox * self, const char * config_file, GError ** err)
+#line 344 "mn-yahoo-mailbox.c"
+{
+#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::run_fetchyahoo"
+#line 209 "mn-yahoo-mailbox.gob"
+ g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 209 "mn-yahoo-mailbox.gob"
+ g_return_val_if_fail (MN_IS_YAHOO_MAILBOX (self), (gboolean )0);
+#line 209 "mn-yahoo-mailbox.gob"
+ g_return_val_if_fail (config_file != NULL, (gboolean )0);
+#line 353 "mn-yahoo-mailbox.c"
+{
+#line 211 "mn-yahoo-mailbox.gob"
+
+ char *command;
+ gboolean status;
+
+ command = g_strdup_printf("fetchyahoo --configfile=%s", config_file);
+ status = mn_webmail_mailbox_run_helper(MN_WEBMAIL_MAILBOX(self), "fetchyahoo", command, err);
+ g_free(command);
+
+ return status;
+ }}
+#line 366 "mn-yahoo-mailbox.c"
+#undef __GOB_FUNCTION__
+
+#line 222 "mn-yahoo-mailbox.gob"
+static gboolean
+___7_mn_yahoo_mailbox_webmail_check (MNWebmailMailbox * mailbox G_GNUC_UNUSED, GError ** err)
+#line 372 "mn-yahoo-mailbox.c"
+#define PARENT_HANDLER(___mailbox,___err) \
+ ((MN_WEBMAIL_MAILBOX_CLASS(parent_class)->webmail_check)? \
+ (* MN_WEBMAIL_MAILBOX_CLASS(parent_class)->webmail_check)(___mailbox,___err): \
+ ((gboolean )0))
+{
+#define __GOB_FUNCTION__ "MN:Yahoo:Mailbox::webmail_check"
+{
+#line 224 "mn-yahoo-mailbox.gob"
+
+ Self *self = SELF(mailbox);
+ char *spool_file;
+ char *cookies_file;
+ char *config_file = NULL;
+ gboolean status = FALSE;
+
+ /*
+ * We create an empty spool file beforehand to make sure it is not
+ * world-readable.
+ */
+ spool_file = mn_webmail_mailbox_create_spool_file(err);
+ if (! spool_file)
+ return FALSE;
+
+ /*
+ * Likewise, we create an empty cookies file beforehand to make
+ * sure it is not world-readable.
+ */
+ cookies_file = self_create_cookies_file(err);
+ if (! cookies_file)
+ goto end;
+
+ /*
+ * We create a config file rather than use command line arguments
+ * because for obvious reasons, we must not pass the password on
+ * the command line.
+ */
+ config_file = self_create_config_file(self, spool_file, cookies_file, err);
+ if (! config_file)
+ goto end;
+
+ if (! self_run_fetchyahoo(self, config_file, err))
+ goto end;
+
+ if (! mn_webmail_mailbox_read_spool_file(mailbox, spool_file, err))
+ goto end;
+
+ status = TRUE;
+
+ end:
+ unlink(spool_file);
+ g_free(spool_file);
+
+ g_free(cookies_file);
+
+ if (config_file)
+ {
+ unlink(config_file);
+ g_free(config_file);
+ }
+
+ return status;
+ }}
+#line 435 "mn-yahoo-mailbox.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
diff --git a/src/mn-yahoo-mailbox.gob b/src/mn-yahoo-mailbox.gob
@@ -0,0 +1,278 @@
+/*
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+requires 2.0.14
+
+%headertop{
+#include "mn-webmail-mailbox.h"
+%}
+
+%{
+#include "config.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+#include <glib/gi18n.h>
+#include "mn-webmail-mailbox-private.h"
+#include "mn-stock.h"
+#include "mn-conf.h"
+%}
+
+class MN:Yahoo:Mailbox from MN:Webmail:Mailbox
+{
+ class_init (class)
+ {
+ MN_MAILBOX_CLASS(class)->type = "yahoo";
+
+ /* 5 minutes is a good default */
+ MN_MAILBOX_CLASS(class)->default_check_delay = 60 * 5;
+
+ MN_WEBMAIL_MAILBOX_CLASS(class)->default_domain = "yahoo.com";
+ }
+
+ init (self)
+ {
+ mn_mailbox_set_format(MN_MAILBOX(self), "Yahoo! Mail");
+ mn_mailbox_set_stock_id(MN_MAILBOX(self), MN_STOCK_YAHOO);
+ }
+
+ private char *
+ create_cookies_file (GError **err)
+ {
+ char *filename;
+
+ /*
+ * If the file already exists, ensure it has the proper
+ * permissions. Otherwise, create it with the proper permissions.
+ */
+
+ filename = g_build_filename(mn_conf_dot_dir, "yahoo-cookies", NULL);
+ if (g_file_test(filename, G_FILE_TEST_EXISTS))
+ {
+ if (chmod(filename, S_IRUSR | S_IWUSR) < 0)
+ {
+ g_set_error(err, 0, 0, _("unable to change the permissions of %s: %s"), filename, g_strerror(errno));
+ goto error;
+ }
+ }
+ else
+ {
+ int fd;
+
+ fd = open(filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
+ if (fd < 0)
+ {
+ g_set_error(err, 0, 0, _("unable to create %s: %s"), filename, g_strerror(errno));
+ goto error;
+ }
+ close(fd);
+ }
+
+ return filename;
+
+ error:
+ g_free(filename);
+ return NULL;
+ }
+
+ private char *
+ create_config_file (self,
+ const char *spool_file (check null),
+ const char *cookies_file (check null),
+ GError **err)
+ {
+ GString *contents;
+ char *filename;
+
+ contents = g_string_new(NULL);
+
+ g_string_append_printf(contents,
+ "username = %s\n"
+ "password = %s\n"
+ "folder = %s\n"
+ "spool = %s\n"
+ "cookie-file = %s\n"
+ "new-messages-only = 1\n"
+ "no-delete = 1\n"
+ "leave-unread = 1\n",
+ MN_AUTHENTICATED_MAILBOX(self)->username,
+ MN_AUTHENTICATED_MAILBOX(self)->runtime_password,
+ MN_WEBMAIL_MAILBOX(self)->folder,
+ spool_file,
+ cookies_file);
+
+ if (eel_gconf_get_boolean(MN_CONF_SYSTEM_HTTP_PROXY_USE_HTTP_PROXY))
+ {
+ char *host;
+
+ host = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_HOST);
+ if (host && *host)
+ {
+ g_string_append_printf(contents,
+ "use-proxy = 1\n"
+ "proxy-host = %s\n"
+ "proxy-port = %i\n",
+ host,
+ eel_gconf_get_integer(MN_CONF_SYSTEM_HTTP_PROXY_PORT));
+
+ if (eel_gconf_get_boolean(MN_CONF_SYSTEM_HTTP_PROXY_USE_AUTHENTICATION))
+ {
+ char *user;
+ char *password;
+
+ user = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_USER);
+ password = eel_gconf_get_string(MN_CONF_SYSTEM_HTTP_PROXY_AUTHENTICATION_PASSWORD);
+
+ if (user && *user && password && *password)
+ g_string_append_printf(contents,
+ "proxy-username = %s\n"
+ "proxy-password = %s\n",
+ user,
+ password);
+
+ g_free(user);
+ g_free(password);
+ }
+ }
+ g_free(host);
+ }
+
+ mn_webmail_mailbox_display_config(MN_WEBMAIL_MAILBOX(self), contents->str);
+ filename = mn_webmail_mailbox_write_temporary_file(contents->str, err);
+
+ g_string_free(contents, TRUE);
+
+ return filename;
+ }
+
+ override (MN:Webmail:Mailbox) char *
+ get_error_message (MNWebmailMailbox *mailbox,
+ const char *helper_stdout,
+ const char *helper_stderr,
+ gboolean *is_auth_failure)
+ {
+ if (helper_stderr)
+ {
+ char **lines;
+ int i;
+ char *message = NULL;
+
+ lines = g_strsplit(helper_stderr, "\n", 0);
+ for (i = 0; lines[i]; i++)
+ if (g_str_has_prefix(lines[i], "Failed: "))
+ {
+ char *escaped;
+
+ if (mn_ascii_strcasestr(lines[i], "wrong password")
+ || mn_ascii_strcasestr(lines[i], "invalid ID")
+ || (mn_ascii_strcasestr(lines[i], "Yahoo user")
+ && mn_ascii_strcasestr(lines[i], "does not exist")))
+ *is_auth_failure = TRUE;
+
+ escaped = mn_utf8_escape(lines[i] + 8);
+ message = g_strdup_printf(_("\"%s\""), escaped);
+ g_free(escaped);
+
+ break;
+ }
+ g_strfreev(lines);
+
+ if (message)
+ return message;
+
+ if (mn_ascii_strcasestr(helper_stderr, "an image of text"))
+ return g_strdup(_("delay between mail checks too small"));
+ }
+
+ return NULL;
+ }
+
+ private gboolean
+ run_fetchyahoo (self, const char *config_file (check null), GError **err)
+ {
+ char *command;
+ gboolean status;
+
+ command = g_strdup_printf("fetchyahoo --configfile=%s", config_file);
+ status = mn_webmail_mailbox_run_helper(MN_WEBMAIL_MAILBOX(self), "fetchyahoo", command, err);
+ g_free(command);
+
+ return status;
+ }
+
+ override (MN:Webmail:Mailbox) gboolean
+ webmail_check (MNWebmailMailbox *mailbox, GError **err)
+ {
+ Self *self = SELF(mailbox);
+ char *spool_file;
+ char *cookies_file;
+ char *config_file = NULL;
+ gboolean status = FALSE;
+
+ /*
+ * We create an empty spool file beforehand to make sure it is not
+ * world-readable.
+ */
+ spool_file = mn_webmail_mailbox_create_spool_file(err);
+ if (! spool_file)
+ return FALSE;
+
+ /*
+ * Likewise, we create an empty cookies file beforehand to make
+ * sure it is not world-readable.
+ */
+ cookies_file = self_create_cookies_file(err);
+ if (! cookies_file)
+ goto end;
+
+ /*
+ * We create a config file rather than use command line arguments
+ * because for obvious reasons, we must not pass the password on
+ * the command line.
+ */
+ config_file = self_create_config_file(self, spool_file, cookies_file, err);
+ if (! config_file)
+ goto end;
+
+ if (! self_run_fetchyahoo(self, config_file, err))
+ goto end;
+
+ if (! mn_webmail_mailbox_read_spool_file(mailbox, spool_file, err))
+ goto end;
+
+ status = TRUE;
+
+ end:
+ unlink(spool_file);
+ g_free(spool_file);
+
+ g_free(cookies_file);
+
+ if (config_file)
+ {
+ unlink(config_file);
+ g_free(config_file);
+ }
+
+ return status;
+ }
+}
diff --git a/src/mn-blinking-image.gob.stamp b/src/mn-yahoo-mailbox.gob.stamp
diff --git a/src/mn-yahoo-mailbox.h b/src/mn-yahoo-mailbox.h
@@ -0,0 +1,57 @@
+/* Generated by GOB (v2.0.14) (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include "mn-webmail-mailbox.h"
+
+#ifndef __MN_YAHOO_MAILBOX_H__
+#define __MN_YAHOO_MAILBOX_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_YAHOO_MAILBOX (mn_yahoo_mailbox_get_type())
+#define MN_YAHOO_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_yahoo_mailbox_get_type(), MNYahooMailbox)
+#define MN_YAHOO_MAILBOX_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), mn_yahoo_mailbox_get_type(), MNYahooMailbox const)
+#define MN_YAHOO_MAILBOX_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), mn_yahoo_mailbox_get_type(), MNYahooMailboxClass)
+#define MN_IS_YAHOO_MAILBOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_yahoo_mailbox_get_type ())
+
+#define MN_YAHOO_MAILBOX_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), mn_yahoo_mailbox_get_type(), MNYahooMailboxClass)
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_YAHOO_MAILBOX__
+#define __TYPEDEF_MN_YAHOO_MAILBOX__
+typedef struct _MNYahooMailbox MNYahooMailbox;
+#endif
+struct _MNYahooMailbox {
+ MNWebmailMailbox __parent__;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNYahooMailboxClass MNYahooMailboxClass;
+struct _MNYahooMailboxClass {
+ MNWebmailMailboxClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType mn_yahoo_mailbox_get_type (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/nautilus-cell-renderer-pixbuf-emblem.c b/src/nautilus-cell-renderer-pixbuf-emblem.c
@@ -1,30 +1,26 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
-
- nautilus-cell-renderer-pixbuf-emblem.c: cell renderer which can render
- an emblem on top of a pixbuf (for use in FMListView and FMTreeView)
-
- Copyright (C) 2003 Juerg Billeter
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
- This is based on GtkCellRendererPixbuf written by
- Jonathan Blandford <jrb@redhat.com>
-
- Author: Juerg Billeter <j@bitron.ch>
-*/
+ *
+ * nautilus-cell-renderer-pixbuf-emblem.c: cell renderer which can render
+ * an emblem on top of a pixbuf (for use in FMListView and FMTreeView)
+ * Copyright (C) 2003 Juerg Billeter
+ *
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#include "nautilus-cell-renderer-pixbuf-emblem.h"
diff --git a/src/nautilus-cell-renderer-pixbuf-emblem.h b/src/nautilus-cell-renderer-pixbuf-emblem.h
@@ -1,30 +1,26 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
-
- nautilus-cell-renderer-pixbuf-emblem.h: cell renderer which can render
- an emblem on top of a pixbuf (for use in FMListView and FMTreeView)
-
- Copyright (C) 2003 Juerg Billeter
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
- This is based on GtkCellRendererPixbuf written by
- Jonathan Blandford <jrb@redhat.com>
-
- Author: Juerg Billeter <j@bitron.ch>
-*/
+ *
+ * nautilus-cell-renderer-pixbuf-emblem.h: cell renderer which can render
+ * an emblem on top of a pixbuf (for use in FMListView and FMTreeView)
+ * Copyright (C) 2003 Juerg Billeter
+ *
+ * Mail Notification
+ * Copyright (C) 2003-2007 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#ifndef NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_H
#define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_H
diff --git a/sylpheed-locking.diff b/sylpheed-locking.diff
@@ -1,5 +1,5 @@
--- libsylph/procmsg.c.orig 2007-01-16 07:00:10.000000000 +0100
-+++ libsylph/procmsg.c 2007-06-17 08:44:53.000000000 +0200
++++ libsylph/procmsg.c 2007-08-27 22:48:47.000000000 +0200
@@ -24,6 +24,9 @@
#include <stdio.h>
#include <stdlib.h>
@@ -89,3 +89,14 @@
} else {
/* open with overwrite mode if mark file doesn't exist or
version is different */
+--- src/main.c.orig 2007-01-12 07:14:58.000000000 +0100
++++ src/main.c 2007-08-27 22:50:44.000000000 +0200
+@@ -368,7 +368,7 @@
+ } else if (!strncmp(argv[i], "--send", 6)) {
+ cmd.send = TRUE;
+ } else if (!strncmp(argv[i], "--version", 9)) {
+- puts("Sylpheed version " VERSION);
++ puts("Sylpheed version " VERSION "+locking");
+ exit(0);
+ } else if (!strncmp(argv[i], "--status-full", 13)) {
+ const gchar *p = argv[i + 1];
diff --git a/tests/Makefile.in b/tests/Makefile.in
@@ -43,8 +43,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/evolution-plugin.m4 \
$(top_srcdir)/m4/gnome.m4 $(top_srcdir)/m4/idl.m4 \
$(top_srcdir)/m4/openssl.m4 \
$(top_srcdir)/m4/reentrant-resolver.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sasl2.m4 \
+ $(top_srcdir)/m4/string-arch-unaligned.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -128,11 +129,11 @@ GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_CFLAGS = @GNOME_CFLAGS@
+GNOME_KEYRING_CFLAGS = @GNOME_KEYRING_CFLAGS@
+GNOME_KEYRING_LIBS = @GNOME_KEYRING_LIBS@
GNOME_LIBS = @GNOME_LIBS@
GOB2 = @GOB2@
GREP = @GREP@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_LIBS = @GTK_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -144,14 +145,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_ICONV = @INTLTOOL_ICONV@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
-INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
@@ -163,7 +162,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
@@ -197,6 +195,7 @@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SASL_CFLAGS = @SASL_CFLAGS@
SASL_LIBS = @SASL_LIBS@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
diff --git a/tests/test-vfs-read-line.c b/tests/test-vfs-read-line.c
@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
diff --git a/ui/Makefile.am b/ui/Makefile.am
@@ -1,6 +1,4 @@
-uidir = $(pkgdatadir)/ui
-
-dist_ui_DATA = \
+dist_pkgdata_DATA = \
mailbox-properties-dialog.glade \
properties-dialog.glade
diff --git a/ui/Makefile.in b/ui/Makefile.in
@@ -34,15 +34,16 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = ui
-DIST_COMMON = $(dist_ui_DATA) $(srcdir)/Makefile.am \
+DIST_COMMON = $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/evolution-plugin.m4 \
$(top_srcdir)/m4/gnome.m4 $(top_srcdir)/m4/idl.m4 \
$(top_srcdir)/m4/openssl.m4 \
$(top_srcdir)/m4/reentrant-resolver.m4 \
- $(top_srcdir)/m4/sasl2.m4 $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/sasl2.m4 \
+ $(top_srcdir)/m4/string-arch-unaligned.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -56,9 +57,9 @@ am__vpath_adj = case $$p in \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(uidir)"
-dist_uiDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dist_ui_DATA)
+am__installdirs = "$(DESTDIR)$(pkgdatadir)"
+dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_pkgdata_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
@@ -105,11 +106,11 @@ GMIME_LIBS = @GMIME_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_CFLAGS = @GNOME_CFLAGS@
+GNOME_KEYRING_CFLAGS = @GNOME_KEYRING_CFLAGS@
+GNOME_KEYRING_LIBS = @GNOME_KEYRING_LIBS@
GNOME_LIBS = @GNOME_LIBS@
GOB2 = @GOB2@
GREP = @GREP@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_LIBS = @GTK_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -121,14 +122,12 @@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-INTLTOOL_ICONV = @INTLTOOL_ICONV@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
-INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@
-INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
@@ -140,7 +139,6 @@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
-INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
@@ -174,6 +172,7 @@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
SASL_CFLAGS = @SASL_CFLAGS@
SASL_LIBS = @SASL_LIBS@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -239,8 +238,7 @@ target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-uidir = $(pkgdatadir)/ui
-dist_ui_DATA = \
+dist_pkgdata_DATA = \
mailbox-properties-dialog.glade \
properties-dialog.glade
@@ -286,22 +284,22 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-install-dist_uiDATA: $(dist_ui_DATA)
+install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
@$(NORMAL_INSTALL)
- test -z "$(uidir)" || $(MKDIR_P) "$(DESTDIR)$(uidir)"
- @list='$(dist_ui_DATA)'; for p in $$list; do \
+ test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
+ @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
- echo " $(dist_uiDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(uidir)/$$f'"; \
- $(dist_uiDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(uidir)/$$f"; \
+ echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+ $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
-uninstall-dist_uiDATA:
+uninstall-dist_pkgdataDATA:
@$(NORMAL_UNINSTALL)
- @list='$(dist_ui_DATA)'; for p in $$list; do \
+ @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(uidir)/$$f'"; \
- rm -f "$(DESTDIR)$(uidir)/$$f"; \
+ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
done
tags: TAGS
TAGS:
@@ -340,7 +338,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(uidir)"; do \
+ for dir in "$(DESTDIR)$(pkgdatadir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -385,7 +383,7 @@ info: info-am
info-am:
-install-data-am: install-dist_uiDATA
+install-data-am: install-dist_pkgdataDATA
install-dvi: install-dvi-am
@@ -419,21 +417,21 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-dist_uiDATA
+uninstall-am: uninstall-dist_pkgdataDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dist_uiDATA install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-dist_uiDATA
+ install-data install-data-am install-dist_pkgdataDATA \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am uninstall uninstall-am uninstall-dist_pkgdataDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/ui/mailbox-properties-dialog.glade b/ui/mailbox-properties-dialog.glade
@@ -149,7 +149,7 @@
<property name="adjustment">1 0 1440 1 10 10</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
- <signal name="changed" handler="delay_changed_h"/>
+ <signal name="value_changed" handler="delay_changed_h"/>
<signal name="activate" handler="entry_activate_h"/>
</widget>
<packing>
@@ -176,6 +176,7 @@
<property name="climb_rate">1</property>
<property name="numeric">True</property>
<signal name="changed" handler="delay_changed_h"/>
+ <signal name="value_changed" handler="delay_changed_h"/>
<signal name="activate" handler="entry_activate_h"/>
</widget>
<packing>
diff --git a/ui/properties-dialog.glade b/ui/properties-dialog.glade
@@ -46,17 +46,30 @@
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkCheckButton" id="display_seen_mail_check">
+ <widget class="GtkHBox" id="play_sound_hbox">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Display seen mail</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkCheckButton" id="play_sound_check">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Play a _sound when new mail arrives:</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="toggled_h"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
</child>
</widget>
</child>
@@ -128,6 +141,7 @@
<property name="can_focus">True</property>
<property name="label">gtk-add</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
<signal name="clicked" handler="add_clicked_h"/>
</widget>
</child>
@@ -137,6 +151,7 @@
<property name="can_focus">True</property>
<property name="label">gtk-remove</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
<signal name="clicked" handler="remove_clicked_h"/>
</widget>
<packing>
@@ -149,6 +164,7 @@
<property name="can_focus">True</property>
<property name="label">gtk-properties</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
<signal name="clicked" handler="properties_clicked_h"/>
</widget>
<packing>
@@ -174,109 +190,7 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <widget class="GtkVBox" id="vbox24">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label38">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" comments="translators: header capitalization"><span weight="bold">Commands</span></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkVBox" id="vbox25">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkHBox" id="hbox29">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <child>
- <widget class="GtkCheckButton" id="command_new_mail_check">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">When _new mail arrives:</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="toggled_h"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkEntry" id="command_new_mail_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox30">
- <property name="visible">True</property>
- <property name="spacing">12</property>
- <child>
- <widget class="GtkCheckButton" id="command_mail_read_check">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">When all mail has _been read:</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="toggled_h"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkEntry" id="command_mail_read_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</widget>
- <packing>
- <property name="tab_expand">False</property>
- </packing>
</child>
<child>
<widget class="GtkLabel" id="label25">
@@ -285,7 +199,6 @@
</widget>
<packing>
<property name="type">tab</property>
- <property name="tab_expand">False</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -295,151 +208,6 @@
<property name="border_width">12</property>
<property name="spacing">18</property>
<child>
- <widget class="GtkVBox" id="vbox33">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label46">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" comments="translators: header capitalization"><span weight="bold">General</span></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment11">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkVBox" id="vbox34">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkCheckButton" id="icon_blink_check">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Blink on errors</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="icon_always_display_check">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Always display</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox35">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label47">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" comments="translators: header capitalization"><span weight="bold">Tooltip Mail Summary</span></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment12">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkVBox" id="vbox36">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkRadioButton" id="icon_tooltip_mail_summary_standard_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes" context="yes">icon tooltip's mail summary layout|_Standard</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="icon_tooltip_mail_summary_compact_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes" context="yes">icon tooltip's mail summary layout|Co_mpact</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">icon_tooltip_mail_summary_standard_radio</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkRadioButton" id="icon_tooltip_mail_summary_none_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes" context="yes">_None</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">icon_tooltip_mail_summary_standard_radio</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<widget class="GtkVBox" id="vbox26">
<property name="visible">True</property>
<property name="spacing">6</property>
@@ -464,11 +232,12 @@
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkRadioButton" id="icon_action_properties_dialog_radio">
+ <widget class="GtkRadioButton" id="icon_action_mail_reader_radio">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" context="yes">_Display this dialog</property>
+ <property name="label" translatable="yes" context="yes">_Launch the mail reader</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
@@ -477,27 +246,29 @@
</packing>
</child>
<child>
- <widget class="GtkRadioButton" id="icon_action_mail_reader_radio">
+ <widget class="GtkRadioButton" id="icon_action_open_latest_message_radio">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes" context="yes">_Launch the mail reader</property>
+ <property name="label" translatable="yes" context="yes">_Open the latest message</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="draw_indicator">True</property>
- <property name="group">icon_action_properties_dialog_radio</property>
+ <property name="group">icon_action_mail_reader_radio</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkRadioButton" id="icon_action_open_latest_message_radio">
+ <widget class="GtkRadioButton" id="icon_action_consider_new_mail_as_read_radio">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Open the latest message</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes" context="yes">Co_nsider new mail as read</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
<property name="draw_indicator">True</property>
- <property name="group">icon_action_properties_dialog_radio</property>
+ <property name="group">icon_action_mail_reader_radio</property>
</widget>
<packing>
<property name="position">2</property>
@@ -509,8 +280,9 @@
<property name="can_focus">True</property>
<property name="label" translatable="yes" context="yes">_Update the mail status</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="draw_indicator">True</property>
- <property name="group">icon_action_properties_dialog_radio</property>
+ <property name="group">icon_action_mail_reader_radio</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -529,13 +301,11 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
</packing>
</child>
</widget>
<packing>
<property name="position">1</property>
- <property name="tab_expand">False</property>
</packing>
</child>
<child>
@@ -546,7 +316,6 @@
<packing>
<property name="type">tab</property>
<property name="position">1</property>
- <property name="tab_expand">False</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -585,6 +354,7 @@
<property name="can_focus">True</property>
<property name="label" translatable="yes" context="yes">_Enable message popups</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="toggled_h"/>
</widget>
@@ -635,6 +405,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes" context="yes">_Attached to the status icon</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
</child>
@@ -643,6 +414,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes" context="yes">In the p_opup stack</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="draw_indicator">True</property>
<property name="group">popups_position_attached_radio</property>
</widget>
@@ -693,6 +465,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes" context="yes">_Desktop default</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="toggled_h"/>
</widget>
@@ -700,8 +473,9 @@
<child>
<widget class="GtkRadioButton" id="popups_expiration_never_radio">
<property name="visible">True</property>
- <property name="label" translatable="yes" context="yes">_Never</property>
+ <property name="label" translatable="yes" context="yes">message popups tab|_Never</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="draw_indicator">True</property>
<property name="group">popups_expiration_default_radio</property>
<signal name="toggled" handler="toggled_h"/>
@@ -719,6 +493,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes" context="yes">A_fter:</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="draw_indicator">True</property>
<property name="group">popups_expiration_default_radio</property>
<signal name="toggled" handler="toggled_h"/>
@@ -807,7 +582,6 @@
</widget>
<packing>
<property name="position">2</property>
- <property name="tab_expand">False</property>
</packing>
</child>
<child>
@@ -818,7 +592,6 @@
<packing>
<property name="type">tab</property>
<property name="position">2</property>
- <property name="tab_expand">False</property>
<property name="tab_fill">False</property>
</packing>
</child>