./PaxHeaders.13539/dockmanager-0.1.0 0000644 0001750 0001750 00000000132 11531300354 015071 x ustar 00 0000000 0000000 30 mtime=1298497772.799548914
30 atime=1298497772.639548914
30 ctime=1298497772.799548914
dockmanager-0.1.0/ 0000755 0001750 0001750 00000000000 11531300354 013730 5 ustar 00rico rico 0000000 0000000 dockmanager-0.1.0/PaxHeaders.13539/COPYING 0000644 0001750 0001750 00000000124 11401236436 016052 x ustar 00 0000000 0000000 27 mtime=1275411742.449887
27 atime=1275411742.449887
30 ctime=1298497772.699548914
dockmanager-0.1.0/COPYING 0000644 0001750 0001750 00000104513 11401236436 014774 0 ustar 00rico rico 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
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
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 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 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.
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.
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 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 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
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
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.
Copyright (C)
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, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
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, 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
.
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
.
dockmanager-0.1.0/PaxHeaders.13539/shave 0000644 0001750 0001750 00000000132 11531300354 016042 x ustar 00 0000000 0000000 30 mtime=1298497772.689548914
30 atime=1298497772.659548914
30 ctime=1298497772.689548914
dockmanager-0.1.0/shave/ 0000755 0001750 0001750 00000000000 11531300354 015036 5 ustar 00rico rico 0000000 0000000 dockmanager-0.1.0/shave/PaxHeaders.13539/shave-libtool.in 0000644 0001750 0001750 00000000124 11401371105 021216 x ustar 00 0000000 0000000 27 mtime=1275458117.762453
27 atime=1275458117.762453
30 ctime=1298497772.689548914
dockmanager-0.1.0/shave/shave-libtool.in 0000644 0001750 0001750 00000002505 11401371105 020136 0 ustar 00rico rico 0000000 0000000 #!/bin/sh
# we need sed
SED=@SED@
if test -z "$SED" ; then
SED=sed
fi
lt_unmangle ()
{
last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
}
# the real libtool to use
LIBTOOL="$1"
shift
# if 1, don't print anything, the underlaying wrapper will do it
pass_though=0
# scan the arguments, keep the right ones for libtool, and discover the mode
preserved_args=
while test "$#" -gt 0; do
opt="$1"
shift
case $opt in
--mode=*)
mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
preserved_args="$preserved_args $opt"
;;
-o)
lt_output="$1"
preserved_args="$preserved_args $opt"
;;
*)
preserved_args="$preserved_args $opt"
;;
esac
done
case "$mode" in
compile)
# shave will be called and print the actual CC/CXX/LINK line
preserved_args="$preserved_args --shave-mode=$mode"
pass_though=1
;;
link)
preserved_args="$preserved_args --shave-mode=$mode"
Q=" LINK "
;;
*)
# let's u
# echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
;;
esac
lt_unmangle "$lt_output"
output=$last_result
if test -z $V; then
if test $pass_though -eq 0; then
echo "$Q$output"
fi
$LIBTOOL --silent $preserved_args
else
echo $LIBTOOL $preserved_args
$LIBTOOL $preserved_args
fi
dockmanager-0.1.0/shave/PaxHeaders.13539/shave.in 0000644 0001750 0001750 00000000124 11401425713 017561 x ustar 00 0000000 0000000 27 mtime=1275472843.929014
27 atime=1275472843.929014
30 ctime=1298497772.689548914
dockmanager-0.1.0/shave/shave.in 0000644 0001750 0001750 00000002420 11401425713 016475 0 ustar 00rico rico 0000000 0000000 #!/bin/sh
# we need sed
SED=@SED@
if test -z "$SED" ; then
SED=sed
fi
lt_unmangle ()
{
last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
}
# the tool to wrap (cc, cxx, ar, ranlib, ..)
tool="$1"
shift
# the reel tool (to call)
REEL_TOOL="$1"
shift
pass_through=0
preserved_args=
while test "$#" -gt 0; do
opt="$1"
shift
case $opt in
--shave-mode=*)
mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
;;
-o)
lt_output="$1"
preserved_args="$preserved_args $opt"
;;
-C)
lt_output="`echo $1 | $SED -e 's/\\.vala$/\\.c/'`"
preserved_args="$preserved_args $opt"
;;
*)
preserved_args="$preserved_args $opt"
;;
esac
done
# mode=link is handled in the libtool wrapper
case "$mode,$tool" in
link,*)
pass_through=1
;;
*,cxx)
Q=" CXX "
;;
*,cc)
Q=" CC "
;;
*,fc)
Q=" FC "
;;
*,f77)
Q=" F77 "
;;
*,vala)
Q=" VALAC "
;;
*,*)
# should not happen
Q=" CC "
;;
esac
lt_unmangle "$lt_output"
output=$last_result
if test -z $V; then
if test $pass_through -eq 0; then
echo "$Q$output"
fi
$REEL_TOOL $preserved_args
else
echo $REEL_TOOL $preserved_args
$REEL_TOOL $preserved_args
fi
dockmanager-0.1.0/PaxHeaders.13539/config.h.in 0000644 0001750 0001750 00000000132 11531300330 017026 x ustar 00 0000000 0000000 30 mtime=1298497752.279548923
30 atime=1298497752.279548923
30 ctime=1298497772.679548914
dockmanager-0.1.0/config.h.in 0000644 0001750 0001750 00000003272 11531300330 015751 0 ustar 00rico rico 0000000 0000000 /* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Package base directory */
#undef PKGDATADIR
/* Directory with config schema */
#undef SCHEMAFILEDIR
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
dockmanager-0.1.0/PaxHeaders.13539/Makefile.schemas 0000644 0001750 0001750 00000000124 11401236436 020101 x ustar 00 0000000 0000000 27 mtime=1275411742.449887
27 atime=1275411742.449887
30 ctime=1298497772.799548914
dockmanager-0.1.0/Makefile.schemas 0000644 0001750 0001750 00000001302 11401236436 017013 0 ustar 00rico rico 0000000 0000000 # Usage
# -----
# 1. Set the schema_in_files variable to the schema-ini.in file(s) to install.
# 2. Add install-gconf-schemas to the install-data-local rule dependencies.
if GCONF_SCHEMAS_INSTALL
schemasdir = @GCONF_SCHEMA_FILE_DIR@
schemas_DATA = $(schema_DATA:.schema-ini=.schemas)
%.schemas: %.schema-ini
$(LDA_BINDIR)/lda-schema-to-gconf $< $@
install-gconf-schemas: $(schemas_DATA)
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schemas_DATA)
else
install-gconf-schemas:
endif
schema_DATA = $(schema_in_files:.schema-ini.in=.schema-ini)
schemadir = $(pkgdatadir)/schemas
#@INTLTOOL_SCHEMA_INI_RULE@
# vim: set ft=automake noet ts=8 sts=8 sw=8 :
dockmanager-0.1.0/PaxHeaders.13539/daemon 0000644 0001750 0001750 00000000132 11531300354 016177 x ustar 00 0000000 0000000 30 mtime=1298497772.829548914
30 atime=1298497772.719548914
30 ctime=1298497772.829548914
dockmanager-0.1.0/daemon/ 0000755 0001750 0001750 00000000000 11531300354 015173 5 ustar 00rico rico 0000000 0000000 dockmanager-0.1.0/daemon/PaxHeaders.13539/dockmanager_settings_vala.stamp 0000644 0001750 0001750 00000000132 11531300342 024515 x ustar 00 0000000 0000000 30 mtime=1298497762.059548919
30 atime=1298497762.059548919
30 ctime=1298497772.809548914
dockmanager-0.1.0/daemon/dockmanager_settings_vala.stamp 0000644 0001750 0001750 00000000000 11531300342 023422 0 ustar 00rico rico 0000000 0000000 dockmanager-0.1.0/daemon/PaxHeaders.13539/tile.vala 0000644 0001750 0001750 00000000124 11522625025 020064 x ustar 00 0000000 0000000 27 mtime=1296771605.468202
27 atime=1296771605.468202
30 ctime=1298497772.829548914
dockmanager-0.1.0/daemon/tile.vala 0000644 0001750 0001750 00000016645 11522625025 017016 0 ustar 00rico rico 0000000 0000000 using Gtk;
namespace DockManager
{
public class Tile: Table
{
private Button add_remove_button;
private Box button_box;
private Label title;
private Image tile_image;
private WrapLabel description;
private Label sub_description;
private Image add_image;
private Image remove_image;
private int icon_size;
public unowned TileView owner { get; set; }
public AbstractTileObject owned_object { get; private set; }
public bool last { get; private set; }
public signal void active_changed ();
public Tile (AbstractTileObject obj, int icon_size)
{
GLib.Object (n_rows: 3, n_columns: 3, homogeneous: false);
IconSize isz = IconSize.SMALL_TOOLBAR;
add_image = new Image.from_stock (obj.add_button_stock, isz);
remove_image = new Image.from_stock (obj.remove_button_stock, isz);
owned_object = obj;
owned_object.icon_updated.connect (this.set_image);
owned_object.text_updated.connect (this.set_text);
owned_object.buttons_updated.connect (this.update_buttons);
owned_object.notify["enabled"].connect (this.update_state);
this.icon_size = icon_size;
build_tile ();
}
private void build_tile ()
{
this.border_width = 5;
this.row_spacing = 1;
this.column_spacing = 5;
tile_image = new Image ();
tile_image.yalign = 0.0f;
this.attach (tile_image, 0, 1, 0, 3,
AttachOptions.SHRINK,
AttachOptions.FILL | AttachOptions.EXPAND,
0, 0);
title = new Label ("");
title.xalign = 0.0f;
this.attach (title, 1, 3, 0, 1,
AttachOptions.FILL | AttachOptions.EXPAND,
AttachOptions.FILL | AttachOptions.EXPAND,
0, 0);
title.show ();
description = new WrapLabel ();
this.attach (description, 1, 3, 1, 2,
AttachOptions.FILL | AttachOptions.EXPAND,
AttachOptions.FILL | AttachOptions.EXPAND,
0, 0);
description.show ();
sub_description = new Label ("");
sub_description.xalign = 0.0f;
this.attach (sub_description, 1, 2, 2, 3,
AttachOptions.FILL | AttachOptions.EXPAND,
AttachOptions.FILL | AttachOptions.EXPAND,
0, 4);
sub_description.show ();
set_text ();
button_box = new HBox (false, 3);
add_remove_button = new Button ();
// FIXME: could cause leak!
add_remove_button.clicked.connect (() => { this.active_changed (); });
update_buttons ();
this.attach (button_box, 2, 3, 2, 3,
AttachOptions.SHRINK,
AttachOptions.FILL | AttachOptions.EXPAND,
0, 0);
this.show ();
update_state ();
}
protected override void realize ()
{
this.set_flags (WidgetFlags.NO_WINDOW);
this.set_window (this.parent.get_window ());
base.realize ();
}
protected override bool expose_event (Gdk.EventExpose event)
{
if (this.get_state () == StateType.SELECTED)
{
bool had_focus = Gtk.WidgetFlags.HAS_FOCUS in this.get_flags ();
// fool theme engine to use proper bg color
if (!had_focus) this.set_flags (Gtk.WidgetFlags.HAS_FOCUS);
Gtk.paint_flat_box (this.style, event.window, this.get_state (),
ShadowType.NONE, event.area, this, "cell_odd",
this.allocation.x,
this.allocation.y,
this.allocation.width,
this.allocation.height - (last ? 0 : 1));
if (!had_focus) this.unset_flags (Gtk.WidgetFlags.HAS_FOCUS);
}
if (!last)
{
Gtk.paint_hline (this.style, event.window, StateType.NORMAL,
event.area, this, null,
this.allocation.x,
this.allocation.x + this.allocation.width,
this.allocation.y + this.allocation.height - 1);
}
return base.expose_event (event);
}
public void update_state ()
{
bool enabled = owned_object.enabled;
bool is_selected = this.get_state () == StateType.SELECTED;
bool sensitive = enabled || (!enabled && is_selected);
set_image ();
title.set_sensitive (sensitive);
description.set_sensitive (sensitive);
description.wrap = is_selected;
sub_description.set_visible (is_selected);
add_remove_button.set_image (enabled ? remove_image : add_image);
add_remove_button.set_tooltip_markup (enabled ?
owned_object.remove_button_tooltip : owned_object.add_button_tooltip);
}
public void set_selected (bool selected)
{
this.set_state (selected ? StateType.SELECTED : StateType.NORMAL);
if (selected)
{
button_box.show_all ();
}
else
{
button_box.hide ();
}
button_box.set_state (StateType.NORMAL);
this.update_state ();
this.queue_resize ();
}
private void set_image ()
{
Gdk.Pixbuf pixbuf = null;
if (owned_object.force_pixbuf != null)
{
pixbuf = owned_object.force_pixbuf;
if (pixbuf.get_width () != icon_size
|| pixbuf.get_height () != icon_size)
{
pixbuf = pixbuf.scale_simple (icon_size, icon_size,
Gdk.InterpType.BILINEAR);
}
}
else
{
try
{
#if VALA_0_12
#else
unowned
#endif
Gdk.Pixbuf temp_pb;
unowned IconTheme it = IconTheme.get_default ();
try
{
temp_pb = it.load_icon (owned_object.icon,
icon_size,
IconLookupFlags.FORCE_SIZE);
}
catch (GLib.Error err)
{
temp_pb = it.load_icon (Gtk.STOCK_FILE,
icon_size,
IconLookupFlags.FORCE_SIZE);
}
pixbuf = temp_pb.copy ();
#if VALA_0_12
#else
temp_pb.unref (); // careful here!
#endif
}
catch (Error err)
{
warning ("%s", err.message);
}
}
tile_image.set_sensitive (owned_object.enabled); // monochromatize
tile_image.set_from_pixbuf (pixbuf);
tile_image.show ();
}
private void set_text ()
{
title.set_markup (Markup.printf_escaped ("%s", owned_object.name));
description.set_text (owned_object.description);
if (owned_object.sub_description_title != "" &&
owned_object.sub_description_text != "")
{
sub_description.set_markup (Markup.printf_escaped (
"%s %s",
owned_object.sub_description_title,
owned_object.sub_description_text
)
);
}
}
private void update_buttons ()
{
List children = button_box.get_children ();
foreach (weak Widget w in children)
{
button_box.remove (w);
}
foreach (weak Widget w in owned_object.get_extra_buttons ())
{
button_box.pack_start (w, false, false, 0);
w.show ();
}
if (owned_object.show_action_button && add_remove_button != null)
{
button_box.pack_start (add_remove_button, false, false, 0);
}
}
}
}
dockmanager-0.1.0/daemon/PaxHeaders.13539/dockmanager-daemon.vala 0000644 0001750 0001750 00000000124 11450555474 022655 x ustar 00 0000000 0000000 27 mtime=1285741372.418838
27 atime=1285741372.418838
30 ctime=1298497772.819548914
dockmanager-0.1.0/daemon/dockmanager-daemon.vala 0000644 0001750 0001750 00000041266 11450555474 021604 0 ustar 00rico rico 0000000 0000000 /*
* Copyright (C) 2010 Michal Hruby
*
* 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Authored by Michal Hruby
*
*/
using DBus;
using DesktopAgnostic;
namespace DockManager
{
const string GROUP_NAME = "DockmanagerHelper";
private struct HelperProcessInfo
{
int pid;
uint kill_timer_id;
ulong dbus_appear_id;
ulong dbus_disappear_id;
}
class HelperDaemon : GLib.Object, DaemonInterface
{
private MainLoop main_loop;
private DBusWatcher watcher;
private ValueArray _helper_list = new ValueArray (4);
public unowned ValueArray helper_list
{
get
{
return _helper_list;
}
set
{
_helper_list = value.copy ();
}
}
private HashTable helper_process_info;
private List all_scripts;
private bool dock_running;
public HelperDaemon ()
{
main_loop = new MainLoop ();
helper_process_info =
new HashTable (str_hash, str_equal);
all_scripts = new List ();
watcher = DBusWatcher.get_default ();
dock_running = watcher.name_has_owner ("net.launchpad.DockManager");
watcher.name_appeared["net.launchpad.DockManager"].connect (() =>
{
dock_running = true;
run_helpers ();
});
watcher.name_disappeared["net.launchpad.DockManager"].connect (() =>
{
dock_running = false;
kill_all ();
});
}
public override void constructed ()
{
string schema_filename = "dockmanager-daemon.schema-ini";
string schema_full = Build.SCHEMAFILEDIR + "/" + schema_filename;
Config.Client client = new Config.Client (schema_full);
try
{
client.bind ("DEFAULT", "helper_list",
this, "helper-list", false,
Config.BindMethod.FALLBACK);
}
catch (DesktopAgnostic.Config.Error err)
{
warning (err.message);
}
}
public void run ()
{
try
{
var connection = DBus.Bus.get (DBus.BusType.SESSION);
dynamic DBus.Object bus =
connection.get_object ("org.freedesktop.DBus",
"/org/freedesktop/DBus",
"org.freedesktop.DBus");
uint request_name_result =
bus.request_name (DBUS_UNIQUE_NAME, (uint) NameFlag.DO_NOT_QUEUE);
if (request_name_result == RequestNameReply.PRIMARY_OWNER)
{
connection.register_object (DBUS_OBJECT_PATH_NAME, this);
this.init ();
this.run_helpers ();
main_loop.run ();
this.kill_all ();
}
else
{
error ("Another instance of DockManager daemon is already running!");
}
}
catch (DBus.Error err)
{
warning ("%s", err.message);
}
}
private void init ()
{
string[] prefixes =
{
Build.PKGDATADIR,
Environment.get_user_data_dir () + "/dockmanager"
};
foreach (unowned string prefix in prefixes)
{
string path = prefix + "/scripts";
string metadata_dir = prefix + "/metadata/";
var scripts_dir = DesktopAgnostic.VFS.file_new_for_path (path);
if (!scripts_dir.exists ()) continue;
foreach (var f in scripts_dir.enumerate_children ())
{
var hi = HelperInfo ();
hi.path = f.path;
hi.app_available = true; // probably... we'll set it later
all_scripts.append (hi);
}
foreach (unowned HelperInfo? hi in all_scripts)
{
string metadata = metadata_dir + Path.get_basename (hi.path) + ".info";
var metadata_file = DesktopAgnostic.VFS.file_new_for_path (metadata);
if (!metadata_file.exists ()) continue;
string contents;
size_t length;
metadata_file.load_contents (out contents, out length);
var keyfile = new KeyFile ();
try
{
keyfile.load_from_data (contents, length, KeyFileFlags.NONE);
}
catch (KeyFileError err)
{
warning ("Cannot load %s: %s", metadata, err.message);
continue;
}
try
{
hi.name = keyfile.get_string (GROUP_NAME, "Name");
hi.description = keyfile.get_string (GROUP_NAME, "Description");
}
catch (KeyFileError err)
{
warning ("Required key missing in %s", metadata);
continue;
}
try
{
hi.icon_name = keyfile.get_string (GROUP_NAME, "Icon");
}
catch (KeyFileError err) { }
try
{
hi.app_name = keyfile.get_string (GROUP_NAME, "AppName");
hi.app_available =
Environment.find_program_in_path (hi.app_name) != null;
}
catch (GLib.Error err)
{
warning ("%s", err.message);
}
try
{
hi.dbus_name = keyfile.get_string (GROUP_NAME, "DBusName");
}
catch (KeyFileError err) { }
}
}
}
public void run_helpers ()
{
foreach (Value v in _helper_list)
{
unowned string helper = v.get_string ();
enable_helper (helper);
}
/*
helper_process_info.@foreach ((k, v) =>
{
unowned string key = (string) k;
unowned HelperProcessInfo? val = (HelperProcessInfo?) v;
debug ("%s: %d", key, val.pid);
});
*/
}
private int get_helper_pid (string path)
{
unowned HelperProcessInfo? hpi = helper_process_info.lookup (path);
return hpi != null ? hpi.pid : 0;
}
private string? get_helper_dbus_name (string path)
{
foreach (unowned HelperInfo? hi in all_scripts)
{
if (hi.path == path) return hi.dbus_name;
}
return null;
}
private bool is_helper_enabled (string path)
{
foreach (Value v in _helper_list)
{
if (v.get_string () == path) return true;
}
return false;
}
public void enable_helper (string path) throws DBus.Error
{
Pid child_pid = 0;
string[] argv;
// if the helper is already running we're done
// FIXME: but what if it's disabled and just waiting to be killed?
if (get_helper_pid (path) != 0)
{
return;
}
if (!is_helper_enabled (path))
{
Value p = path;
_helper_list.append (p);
this.notify_property ("helper-list");
}
if (!dock_running)
{
helper_state_changed (path, true, false);
return;
}
string? dbus_name = get_helper_dbus_name (path);
if (dbus_name != null)
{
unowned HelperProcessInfo? hpi = update_helper (path);
if (hpi.dbus_appear_id == 0)
{
hpi.dbus_appear_id = SignalFix.connect (
watcher, "name-appeared::%s".printf (dbus_name), () =>
{
enable_helper (path);
}
);
}
if (hpi.dbus_disappear_id == 0)
{
hpi.dbus_disappear_id = SignalFix.connect (
watcher, "name-disappeared::%s".printf (dbus_name), () =>
{
// give it a moment to exit itself and then kill it
Timeout.add (1000, ()=> { kill_helper (path); return false; });
}
);
}
if (!watcher.name_has_owner (dbus_name))
{
helper_state_changed (path, true, false);
return;
}
}
try
{
Shell.parse_argv (path, out argv);
var flags = SpawnFlags.DO_NOT_REAP_CHILD | SpawnFlags.SEARCH_PATH;
Process.spawn_async (null, argv, null, flags, null, out child_pid);
ChildWatch.add_full (Priority.DEFAULT, child_pid, (pid, status) =>
{
debug ("[%d] \"%s\" exitted", pid, Path.get_basename (path));
unowned HelperProcessInfo? hpi = update_helper (path);
if (hpi.kill_timer_id != 0)
{
Source.remove (hpi.kill_timer_id);
}
hpi.pid = 0;
hpi.kill_timer_id = 0;
Process.close_pid (pid);
helper_state_changed (path, is_helper_enabled (path), false);
});
debug ("Spawned \"%s\" [%d]", path, child_pid);
}
catch (GLib.Error err)
{
warning ("%s", err.message);
throw new DBus.Error.SPAWN_FAILED (err.message);
}
unowned HelperProcessInfo? hpi = update_helper (path);
hpi.pid = (int) child_pid;
helper_state_changed (path, true, child_pid != 0);
}
private unowned HelperProcessInfo? update_helper (string path)
{
unowned HelperProcessInfo? hpi = helper_process_info.lookup (path);
if (hpi != null)
{
return hpi;
}
else
{
var pi = HelperProcessInfo ();
pi.pid = 0;
pi.kill_timer_id = 0;
pi.dbus_appear_id = 0;
pi.dbus_disappear_id = 0;
helper_process_info.insert (path, pi);
return helper_process_info.lookup (path);
}
}
public void disable_helper (string path) throws DBus.Error
{
if (!is_helper_enabled (path)) return;
// update our config list
ValueArray enabled_helpers = new ValueArray (4);
foreach (Value v in _helper_list)
{
if (v.get_string () != path) enabled_helpers.append (v);
}
this.helper_list = enabled_helpers;
unowned HelperProcessInfo? hpi = update_helper (path);
if (hpi.dbus_appear_id != 0)
{
SignalHandler.disconnect (watcher, hpi.dbus_appear_id);
hpi.dbus_appear_id = 0;
}
if (hpi.dbus_disappear_id != 0)
{
SignalHandler.disconnect (watcher, hpi.dbus_disappear_id);
hpi.dbus_disappear_id = 0;
}
if (hpi.pid == 0)
{
helper_state_changed (path, false, false);
return;
}
kill_helper (path);
helper_state_changed (path, false, get_helper_pid (path) != 0);
}
private void kill_helper (string path)
{
unowned HelperProcessInfo? hpi = update_helper (path);
if (hpi.pid == 0) return;
debug ("Sending SIGTERM to %d", hpi.pid);
Posix.kill ((Posix.pid_t)hpi.pid, Posix.SIGTERM);
if (hpi.kill_timer_id == 0)
{
hpi.kill_timer_id = Timeout.add (2000, () =>
{
if (hpi.pid != 0)
{
debug ("Sending SIGKILL to %d", hpi.pid);
Posix.kill ((Posix.pid_t)hpi.pid, Posix.SIGKILL);
}
hpi.kill_timer_id = 0;
return false;
});
}
}
private void kill_all ()
{
foreach (unowned string path in helper_process_info.get_keys ())
{
kill_helper (path);
}
}
public async bool install_helper (string filename) throws DBus.Error
{
debug ("Trying to install %s", filename);
Pid pid;
string[] argv;
// we'll use "tar -tf [filename]" to check if it contains /metadata/*.info
try
{
int standard_output;
bool metadata_file_found = false;
string tar_command = "tar -t -f \"%s\"".printf (filename);
Shell.parse_argv (tar_command, out argv);
Process.spawn_async_with_pipes (null, argv, null,
SpawnFlags.SEARCH_PATH |
SpawnFlags.DO_NOT_REAP_CHILD,
null,
out pid,
null,
out standard_output,
null);
var re = new Regex ("^metadata/.*info$", RegexCompileFlags.OPTIMIZE);
var chan = new IOChannel.unix_new (standard_output);
var src_id = chan.add_watch (IOCondition.IN | IOCondition.HUP,
(src, cond) =>
{
IOStatus io_status = IOStatus.NORMAL;
while (io_status == IOStatus.NORMAL && !metadata_file_found)
{
string? line = null;
io_status = src.read_line (out line, null, null);
if (line != null) metadata_file_found = re.match (line, 0, null);
}
});
ChildWatch.add (pid, (p, status) =>
{
install_helper.callback ();
});
yield;
Source.remove (src_id);
if (!metadata_file_found)
{
warning ("Helper installation failed: %s", "No metadata file found!");
return false;
}
}
catch (GLib.Error err)
{
warning ("Helper installation failed: %s", err.message);
return false;
}
// and now just "tar -C [user_data_dir] -x -f [filename]"
try
{
string extract_command =
"tar -C \"%s\" -x -f \"%s\"".printf (
Environment.get_user_data_dir () + "/dockmanager",
filename
);
Shell.parse_argv (extract_command, out argv);
Process.spawn_async (null, argv, null,
SpawnFlags.SEARCH_PATH |
SpawnFlags.DO_NOT_REAP_CHILD,
null,
out pid);
int untar_status = 0;
ChildWatch.add (pid, (p, status) =>
{
untar_status = status;
install_helper.callback ();
});
yield;
if (untar_status == 0)
{
return true;
}
else
{
warning ("Helper installation failed: tar returned errorcode %d!", untar_status);
}
}
catch (GLib.Error err2)
{
warning ("Helper installation failed: %s", err2.message);
return false;
}
return false;
}
public void show_preferences () throws DBus.Error
{
try
{
Process.spawn_command_line_async ("dockmanager-settings");
}
catch (GLib.SpawnError err)
{
warning ("%s", err.message);
throw new DBus.Error.SPAWN_FAILED (err.message);
}
}
public void embed_preferences (int64 xid,
HashTable hints)
throws DBus.Error
{
string command = "dockmanager-settings -x %lld".printf (xid);
unowned string key;
unowned Value? val;
HashTableIter iter = HashTableIter (hints);
while (iter.next (out key, out val))
{
if (key == "no-install")
{
command = string.join (" ", command, "--no-install", null);
}
}
try
{
Process.spawn_command_line_async (command);
}
catch (GLib.SpawnError err)
{
warning ("%s", err.message);
throw new DBus.Error.SPAWN_FAILED (err.message);
}
}
public HelperInfo[] get_all_helpers ()
{
int i = 0;
HelperInfo[] helpers = new HelperInfo [all_scripts.length ()];
foreach (unowned HelperInfo hi in all_scripts)
{
// our custom copy, dbus doesn't like NULLs
helpers[i].path = hi.path;
helpers[i].name = hi.name != null ? hi.name : "";
helpers[i].description = hi.description != null ? hi.description : "";
helpers[i].icon_name = hi.icon_name != null ? hi.icon_name : "";
helpers[i].app_name = hi.app_name != null ? hi.app_name : "";
helpers[i].app_available = hi.app_available;
helpers[i].enabled = is_helper_enabled (hi.path);
helpers[i].running = get_helper_pid (hi.path) != 0;
helpers[i].dbus_name = hi.dbus_name != null ? hi.dbus_name : "";
i++;
}
return helpers;
}
public void restart_all ()
{
}
public static int main (string[] argv)
{
try
{
DesktopAgnostic.VFS.init ();
var daemon = new HelperDaemon ();
daemon.run ();
DesktopAgnostic.VFS.shutdown ();
}
catch (GLib.Error err)
{
warning ("%s", err.message);
}
return 0;
}
}
}
dockmanager-0.1.0/daemon/PaxHeaders.13539/dbus-helper.vala 0000644 0001750 0001750 00000000124 11432615616 021346 x ustar 00 0000000 0000000 27 mtime=1282087822.640353
27 atime=1282087822.640353
30 ctime=1298497772.819548914
dockmanager-0.1.0/daemon/dbus-helper.vala 0000644 0001750 0001750 00000006363 11432615616 020274 0 ustar 00rico rico 0000000 0000000 /*
* Copyright (C) 2010 Michal Hruby
*
* 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Authored by Michal Hruby
*
*/
using DBus;
namespace DockManager
{
public class DBusWatcher: GLib.Object
{
private static DBusWatcher? instance = null;
public static unowned DBusWatcher get_default ()
{
if (instance == null)
{
instance = new DBusWatcher ();
}
return instance;
}
[Signal (detailed=true)]
public signal void name_appeared (string name);
[Signal (detailed=true)]
public signal void name_disappeared (string name);
private HashTable owned_names;
private dynamic DBus.Object bus_object;
private Regex unnamed_bus_object;
private DBusWatcher ()
{
}
construct
{
owned_names = new HashTable (str_hash, str_equal);
var connection = DBus.Bus.get (DBus.BusType.SESSION);
bus_object = connection.get_object ("org.freedesktop.DBus",
"/org/freedesktop/DBus",
"org.freedesktop.DBus");
bus_object.NameOwnerChanged += this.name_owner_changed;
unnamed_bus_object = new Regex ("^:\\d+.\\d+$");
string[] all_names = bus_object.list_names ();
foreach (var s in all_names)
{
if (unnamed_bus_object.match (s) == false)
{
owned_names.insert (s, 1);
}
}
}
private void name_owner_changed (DBus.Object sender, string name,
string old_owner, string new_owner)
{
if (unnamed_bus_object.match (name) == false)
{
if (new_owner == "")
{
// disappeared
owned_names.replace (name, 0);
if (Quark.try_string (name) != 0)
{
Signal.emit_by_name (this,
"name-disappeared::%s".printf (name),
name);
}
else
{
name_disappeared (name);
}
}
else if (old_owner == "")
{
// appeared
owned_names.replace (name, 1);
if (Quark.try_string (name) != 0)
{
Signal.emit_by_name (this,
"name-appeared::%s".printf (name),
name);
}
else
{
name_appeared (name);
}
}
}
}
public bool name_has_owner (string name)
{
return owned_names.lookup (name) != 0;
}
}
}
dockmanager-0.1.0/daemon/PaxHeaders.13539/search-entry.c 0000644 0001750 0001750 00000000132 11531300342 021021 x ustar 00 0000000 0000000 30 mtime=1298497762.009548919
30 atime=1298497762.009548919
30 ctime=1298497772.809548914
dockmanager-0.1.0/daemon/search-entry.c 0000644 0001750 0001750 00000042507 11531300342 017750 0 ustar 00rico rico 0000000 0000000 /* search-entry.c generated by valac 0.11.6, the Vala compiler
* generated from search-entry.vala, do not modify */
/*
* Copyright (C) 2010 Michal Hruby
*
* 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Authored by Michal Hruby
*
*/
#include
#include
#include
#include
#include
#include
#define DOCK_MANAGER_TYPE_SEARCH_ENTRY (dock_manager_search_entry_get_type ())
#define DOCK_MANAGER_SEARCH_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCK_MANAGER_TYPE_SEARCH_ENTRY, DockManagerSearchEntry))
#define DOCK_MANAGER_SEARCH_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCK_MANAGER_TYPE_SEARCH_ENTRY, DockManagerSearchEntryClass))
#define DOCK_MANAGER_IS_SEARCH_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCK_MANAGER_TYPE_SEARCH_ENTRY))
#define DOCK_MANAGER_IS_SEARCH_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCK_MANAGER_TYPE_SEARCH_ENTRY))
#define DOCK_MANAGER_SEARCH_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCK_MANAGER_TYPE_SEARCH_ENTRY, DockManagerSearchEntryClass))
typedef struct _DockManagerSearchEntry DockManagerSearchEntry;
typedef struct _DockManagerSearchEntryClass DockManagerSearchEntryClass;
typedef struct _DockManagerSearchEntryPrivate DockManagerSearchEntryPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
struct _DockManagerSearchEntry {
GtkEntry parent_instance;
DockManagerSearchEntryPrivate * priv;
};
struct _DockManagerSearchEntryClass {
GtkEntryClass parent_class;
};
struct _DockManagerSearchEntryPrivate {
gboolean _delayed_clear;
gint _search_timeout;
gchar* default_text;
guint search_timeout_id;
gchar* current_search_text;
};
static gpointer dock_manager_search_entry_parent_class = NULL;
GType dock_manager_search_entry_get_type (void) G_GNUC_CONST;
#define DOCK_MANAGER_SEARCH_ENTRY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DOCK_MANAGER_TYPE_SEARCH_ENTRY, DockManagerSearchEntryPrivate))
enum {
DOCK_MANAGER_SEARCH_ENTRY_DUMMY_PROPERTY,
DOCK_MANAGER_SEARCH_ENTRY_DELAYED_CLEAR,
DOCK_MANAGER_SEARCH_ENTRY_SEARCH_TIMEOUT
};
DockManagerSearchEntry* dock_manager_search_entry_new (void);
DockManagerSearchEntry* dock_manager_search_entry_construct (GType object_type);
static gboolean dock_manager_search_entry_focus_in (DockManagerSearchEntry* self);
static gboolean dock_manager_search_entry_focus_out (DockManagerSearchEntry* self);
static void dock_manager_search_entry_realized (DockManagerSearchEntry* self);
static void dock_manager_search_entry_icon_pressed (DockManagerSearchEntry* self, GtkEntryIconPosition pos, GdkEvent* event);
const gchar* dock_manager_search_entry_get_text (DockManagerSearchEntry* self);
static void dock_manager_search_entry_queue_search (DockManagerSearchEntry* self);
gboolean dock_manager_search_entry_get_delayed_clear (DockManagerSearchEntry* self);
gint dock_manager_search_entry_get_search_timeout (DockManagerSearchEntry* self);
static gboolean dock_manager_search_entry_typing_timeout (DockManagerSearchEntry* self);
static gboolean _dock_manager_search_entry_typing_timeout_gsource_func (gpointer self);
void dock_manager_search_entry_set_delayed_clear (DockManagerSearchEntry* self, gboolean value);
void dock_manager_search_entry_set_search_timeout (DockManagerSearchEntry* self, gint value);
static GObject * dock_manager_search_entry_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void _dock_manager_search_entry_queue_search_gtk_editable_changed (GtkEditable* _sender, gpointer self);
static gboolean _dock_manager_search_entry_focus_in_gtk_widget_focus_in_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self);
static gboolean _dock_manager_search_entry_focus_out_gtk_widget_focus_out_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self);
static void _dock_manager_search_entry_realized_gtk_widget_realize (GtkWidget* _sender, gpointer self);
static void _dock_manager_search_entry_icon_pressed_gtk_entry_icon_press (GtkEntry* _sender, GtkEntryIconPosition p0, GdkEvent* p1, gpointer self);
static void dock_manager_search_entry_finalize (GObject* obj);
static void _vala_dock_manager_search_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_dock_manager_search_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
DockManagerSearchEntry* dock_manager_search_entry_construct (GType object_type) {
DockManagerSearchEntry * self = NULL;
self = (DockManagerSearchEntry*) g_object_new (object_type, NULL);
return self;
}
DockManagerSearchEntry* dock_manager_search_entry_new (void) {
return dock_manager_search_entry_construct (DOCK_MANAGER_TYPE_SEARCH_ENTRY);
}
static gboolean dock_manager_search_entry_focus_in (DockManagerSearchEntry* self) {
gboolean result = FALSE;
const gchar* _tmp0_ = NULL;
g_return_val_if_fail (self != NULL, FALSE);
_tmp0_ = gtk_entry_get_text (GTK_ENTRY (self));
if (g_strcmp0 (_tmp0_, self->priv->default_text) == 0) {
gtk_widget_modify_text ((GtkWidget*) self, GTK_STATE_NORMAL, NULL);
gtk_entry_set_text ((GtkEntry*) self, "");
}
result = FALSE;
return result;
}
static gboolean dock_manager_search_entry_focus_out (DockManagerSearchEntry* self) {
gboolean result = FALSE;
const gchar* _tmp0_ = NULL;
g_return_val_if_fail (self != NULL, FALSE);
_tmp0_ = gtk_entry_get_text (GTK_ENTRY (self));
if (g_strcmp0 (_tmp0_, "") == 0) {
GtkStyle* _tmp1_ = NULL;
GdkColor _tmp2_;
_tmp1_ = gtk_widget_get_style ((GtkWidget*) self);
gtk_widget_modify_text ((GtkWidget*) self, GTK_STATE_NORMAL, (_tmp2_ = _tmp1_->text[GTK_STATE_INSENSITIVE], &_tmp2_));
gtk_entry_set_text ((GtkEntry*) self, self->priv->default_text);
}
result = FALSE;
return result;
}
static void dock_manager_search_entry_realized (DockManagerSearchEntry* self) {
gboolean _tmp0_;
g_return_if_fail (self != NULL);
if (!(g_object_get ((GtkWidget*) self, "has-focus", &_tmp0_, NULL), _tmp0_)) {
GtkStyle* _tmp1_ = NULL;
GdkColor _tmp2_;
_tmp1_ = gtk_widget_get_style ((GtkWidget*) self);
gtk_widget_modify_text ((GtkWidget*) self, GTK_STATE_NORMAL, (_tmp2_ = _tmp1_->text[GTK_STATE_INSENSITIVE], &_tmp2_));
}
}
static void dock_manager_search_entry_icon_pressed (DockManagerSearchEntry* self, GtkEntryIconPosition pos, GdkEvent* event) {
gboolean _tmp0_ = FALSE;
g_return_if_fail (self != NULL);
g_return_if_fail (event != NULL);
if (pos == GTK_ENTRY_ICON_SECONDARY) {
const gchar* _tmp1_ = NULL;
_tmp1_ = dock_manager_search_entry_get_text (self);
_tmp0_ = g_strcmp0 (_tmp1_, self->priv->default_text) != 0;
} else {
_tmp0_ = FALSE;
}
if (_tmp0_) {
gboolean _tmp2_;
gtk_entry_set_text ((GtkEntry*) self, "");
if (!(g_object_get ((GtkWidget*) self, "has-focus", &_tmp2_, NULL), _tmp2_)) {
dock_manager_search_entry_focus_out (self);
}
}
}
static gboolean _dock_manager_search_entry_typing_timeout_gsource_func (gpointer self) {
gboolean result;
result = dock_manager_search_entry_typing_timeout (self);
return result;
}
static void dock_manager_search_entry_queue_search (DockManagerSearchEntry* self) {
const gchar* _tmp0_ = NULL;
const gchar* t;
gboolean _tmp1_ = FALSE;
gboolean _tmp2_ = FALSE;
g_return_if_fail (self != NULL);
if (self->priv->search_timeout_id != 0) {
g_source_remove (self->priv->search_timeout_id);
self->priv->search_timeout_id = (guint) 0;
}
_tmp0_ = gtk_entry_get_text (GTK_ENTRY (self));
t = _tmp0_;
if (g_strcmp0 (t, self->priv->default_text) == 0) {
_tmp2_ = TRUE;
} else {
_tmp2_ = g_strcmp0 (t, "") == 0;
}
if (_tmp2_) {
_tmp1_ = !self->priv->_delayed_clear;
} else {
_tmp1_ = FALSE;
}
if (_tmp1_) {
if (g_strcmp0 (self->priv->current_search_text, "") != 0) {
gchar* _tmp3_;
gchar* _tmp4_;
_tmp3_ = g_strdup ("");
_tmp4_ = _tmp3_;
_g_free0 (self->priv->current_search_text);
self->priv->current_search_text = _tmp4_;
g_signal_emit_by_name (self, "clear");
}
} else {
guint _tmp5_;
_tmp5_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) self->priv->_search_timeout, _dock_manager_search_entry_typing_timeout_gsource_func, g_object_ref (self), g_object_unref);
self->priv->search_timeout_id = _tmp5_;
}
}
static gboolean dock_manager_search_entry_typing_timeout (DockManagerSearchEntry* self) {
gboolean result = FALSE;
const gchar* _tmp0_ = NULL;
const gchar* term;
gboolean _tmp1_ = FALSE;
g_return_val_if_fail (self != NULL, FALSE);
_tmp0_ = gtk_entry_get_text (GTK_ENTRY (self));
term = _tmp0_;
if (g_strcmp0 (term, self->priv->default_text) != 0) {
_tmp1_ = g_strcmp0 (term, "") != 0;
} else {
_tmp1_ = FALSE;
}
if (_tmp1_) {
gchar* _tmp2_;
gchar* _tmp3_;
_tmp2_ = g_strdup (term);
_tmp3_ = _tmp2_;
_g_free0 (self->priv->current_search_text);
self->priv->current_search_text = _tmp3_;
g_signal_emit_by_name (self, "search", term);
} else {
if (self->priv->_delayed_clear) {
gchar* _tmp4_;
gchar* _tmp5_;
_tmp4_ = g_strdup ("");
_tmp5_ = _tmp4_;
_g_free0 (self->priv->current_search_text);
self->priv->current_search_text = _tmp5_;
g_signal_emit_by_name (self, "clear");
}
}
self->priv->search_timeout_id = (guint) 0;
result = FALSE;
return result;
}
const gchar* dock_manager_search_entry_get_text (DockManagerSearchEntry* self) {
const gchar* result = NULL;
g_return_val_if_fail (self != NULL, NULL);
result = self->priv->current_search_text;
return result;
}
gboolean dock_manager_search_entry_get_delayed_clear (DockManagerSearchEntry* self) {
gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
result = self->priv->_delayed_clear;
return result;
}
void dock_manager_search_entry_set_delayed_clear (DockManagerSearchEntry* self, gboolean value) {
g_return_if_fail (self != NULL);
self->priv->_delayed_clear = value;
g_object_notify ((GObject *) self, "delayed-clear");
}
gint dock_manager_search_entry_get_search_timeout (DockManagerSearchEntry* self) {
gint result;
g_return_val_if_fail (self != NULL, 0);
result = self->priv->_search_timeout;
return result;
}
void dock_manager_search_entry_set_search_timeout (DockManagerSearchEntry* self, gint value) {
g_return_if_fail (self != NULL);
self->priv->_search_timeout = value;
g_object_notify ((GObject *) self, "search-timeout");
}
static void _dock_manager_search_entry_queue_search_gtk_editable_changed (GtkEditable* _sender, gpointer self) {
dock_manager_search_entry_queue_search (self);
}
static gboolean _dock_manager_search_entry_focus_in_gtk_widget_focus_in_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self) {
gboolean result;
result = dock_manager_search_entry_focus_in (self);
return result;
}
static gboolean _dock_manager_search_entry_focus_out_gtk_widget_focus_out_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self) {
gboolean result;
result = dock_manager_search_entry_focus_out (self);
return result;
}
static void _dock_manager_search_entry_realized_gtk_widget_realize (GtkWidget* _sender, gpointer self) {
dock_manager_search_entry_realized (self);
}
static void _dock_manager_search_entry_icon_pressed_gtk_entry_icon_press (GtkEntry* _sender, GtkEntryIconPosition p0, GdkEvent* p1, gpointer self) {
dock_manager_search_entry_icon_pressed (self, p0, p1);
}
static GObject * dock_manager_search_entry_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
GObject * obj;
GObjectClass * parent_class;
DockManagerSearchEntry * self;
parent_class = G_OBJECT_CLASS (dock_manager_search_entry_parent_class);
obj = parent_class->constructor (type, n_construct_properties, construct_properties);
self = DOCK_MANAGER_SEARCH_ENTRY (obj);
gtk_entry_set_text ((GtkEntry*) self, self->priv->default_text);
g_signal_connect_object ((GtkEditable*) self, "changed", (GCallback) _dock_manager_search_entry_queue_search_gtk_editable_changed, self, 0);
g_signal_connect_object ((GtkWidget*) self, "focus-in-event", (GCallback) _dock_manager_search_entry_focus_in_gtk_widget_focus_in_event, self, 0);
g_signal_connect_object ((GtkWidget*) self, "focus-out-event", (GCallback) _dock_manager_search_entry_focus_out_gtk_widget_focus_out_event, self, 0);
g_signal_connect_object ((GtkWidget*) self, "realize", (GCallback) _dock_manager_search_entry_realized_gtk_widget_realize, self, G_CONNECT_AFTER);
g_signal_connect_object ((GtkEntry*) self, "icon-press", (GCallback) _dock_manager_search_entry_icon_pressed_gtk_entry_icon_press, self, 0);
gtk_entry_set_icon_from_stock ((GtkEntry*) self, GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_FIND);
gtk_entry_set_icon_from_stock ((GtkEntry*) self, GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CLEAR);
return obj;
}
static void dock_manager_search_entry_class_init (DockManagerSearchEntryClass * klass) {
dock_manager_search_entry_parent_class = g_type_class_peek_parent (klass);
g_type_class_add_private (klass, sizeof (DockManagerSearchEntryPrivate));
G_OBJECT_CLASS (klass)->get_property = _vala_dock_manager_search_entry_get_property;
G_OBJECT_CLASS (klass)->set_property = _vala_dock_manager_search_entry_set_property;
G_OBJECT_CLASS (klass)->constructor = dock_manager_search_entry_constructor;
G_OBJECT_CLASS (klass)->finalize = dock_manager_search_entry_finalize;
g_object_class_install_property (G_OBJECT_CLASS (klass), DOCK_MANAGER_SEARCH_ENTRY_DELAYED_CLEAR, g_param_spec_boolean ("delayed-clear", "delayed-clear", "delayed-clear", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), DOCK_MANAGER_SEARCH_ENTRY_SEARCH_TIMEOUT, g_param_spec_int ("search-timeout", "search-timeout", "search-timeout", G_MININT, G_MAXINT, 500, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_signal_new ("search", DOCK_MANAGER_TYPE_SEARCH_ENTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
g_signal_new ("clear", DOCK_MANAGER_TYPE_SEARCH_ENTRY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}
static void dock_manager_search_entry_instance_init (DockManagerSearchEntry * self) {
gchar* _tmp0_;
gchar* _tmp1_;
self->priv = DOCK_MANAGER_SEARCH_ENTRY_GET_PRIVATE (self);
self->priv->_delayed_clear = FALSE;
self->priv->_search_timeout = 500;
_tmp0_ = g_strdup ("Search...");
self->priv->default_text = _tmp0_;
_tmp1_ = g_strdup ("");
self->priv->current_search_text = _tmp1_;
}
static void dock_manager_search_entry_finalize (GObject* obj) {
DockManagerSearchEntry * self;
self = DOCK_MANAGER_SEARCH_ENTRY (obj);
_g_free0 (self->priv->default_text);
_g_free0 (self->priv->current_search_text);
G_OBJECT_CLASS (dock_manager_search_entry_parent_class)->finalize (obj);
}
GType dock_manager_search_entry_get_type (void) {
static volatile gsize dock_manager_search_entry_type_id__volatile = 0;
if (g_once_init_enter (&dock_manager_search_entry_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (DockManagerSearchEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dock_manager_search_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DockManagerSearchEntry), 0, (GInstanceInitFunc) dock_manager_search_entry_instance_init, NULL };
GType dock_manager_search_entry_type_id;
dock_manager_search_entry_type_id = g_type_register_static (GTK_TYPE_ENTRY, "DockManagerSearchEntry", &g_define_type_info, 0);
g_once_init_leave (&dock_manager_search_entry_type_id__volatile, dock_manager_search_entry_type_id);
}
return dock_manager_search_entry_type_id__volatile;
}
static void _vala_dock_manager_search_entry_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
DockManagerSearchEntry * self;
self = DOCK_MANAGER_SEARCH_ENTRY (object);
switch (property_id) {
case DOCK_MANAGER_SEARCH_ENTRY_DELAYED_CLEAR:
g_value_set_boolean (value, dock_manager_search_entry_get_delayed_clear (self));
break;
case DOCK_MANAGER_SEARCH_ENTRY_SEARCH_TIMEOUT:
g_value_set_int (value, dock_manager_search_entry_get_search_timeout (self));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void _vala_dock_manager_search_entry_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
DockManagerSearchEntry * self;
self = DOCK_MANAGER_SEARCH_ENTRY (object);
switch (property_id) {
case DOCK_MANAGER_SEARCH_ENTRY_DELAYED_CLEAR:
dock_manager_search_entry_set_delayed_clear (self, g_value_get_boolean (value));
break;
case DOCK_MANAGER_SEARCH_ENTRY_SEARCH_TIMEOUT:
dock_manager_search_entry_set_search_timeout (self, g_value_get_int (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
dockmanager-0.1.0/daemon/PaxHeaders.13539/search-entry.vala 0000644 0001750 0001750 00000000124 11522625025 021533 x ustar 00 0000000 0000000 27 mtime=1296771605.468202
27 atime=1296771605.468202
30 ctime=1298497772.829548914
dockmanager-0.1.0/daemon/search-entry.vala 0000644 0001750 0001750 00000007364 11522625025 020463 0 ustar 00rico rico 0000000 0000000 /*
* Copyright (C) 2010 Michal Hruby
*
* 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Authored by Michal Hruby
*
*/
using Gtk;
namespace DockManager
{
public class SearchEntry: Entry
{
public bool delayed_clear { get; set; default = false; }
public signal void search (string text);
public signal void clear ();
public int search_timeout { get; set; default = 500; }
// FIXME: once we properly support gettext
//private string default_text = _("Search...");
private string default_text = "Search...";
private uint search_timeout_id;
private string current_search_text = "";
public SearchEntry ()
{
}
construct
{
this.set_text (default_text);
this.changed.connect (this.queue_search);
this.focus_in_event.connect (this.focus_in);
this.focus_out_event.connect (this.focus_out);
this.realize.connect_after (this.realized);
this.icon_press.connect (this.icon_pressed);
this.set_icon_from_stock (EntryIconPosition.PRIMARY, STOCK_FIND);
this.set_icon_from_stock (EntryIconPosition.SECONDARY, STOCK_CLEAR);
}
private bool focus_in ()
{
if (base.get_text () == default_text)
{
this.modify_text (StateType.NORMAL, null);
this.set_text ("");
}
return false;
}
private bool focus_out ()
{
if (base.get_text () == "")
{
this.modify_text (StateType.NORMAL,
this.get_style ().text[StateType.INSENSITIVE]);
this.set_text (this.default_text);
}
return false;
}
private void realized ()
{
if (!has_focus)
{
this.modify_text (StateType.NORMAL,
this.get_style ().text[StateType.INSENSITIVE]);
}
}
private void icon_pressed (EntryIconPosition pos, Gdk.Event event)
{
if (pos == EntryIconPosition.SECONDARY &&
this.get_text () != default_text)
{
this.set_text ("");
if (!has_focus) this.focus_out ();
}
}
private void queue_search ()
{
if (this.search_timeout_id != 0)
{
GLib.Source.remove (this.search_timeout_id);
this.search_timeout_id = 0;
}
unowned string t = base.get_text ();
if ((t == default_text || t == "") && !delayed_clear)
{
if (current_search_text != "")
{
current_search_text = "";
clear ();
}
}
else
{
this.search_timeout_id = Timeout.add (search_timeout,
this.typing_timeout);
}
}
private bool typing_timeout ()
{
unowned string term = base.get_text ();
if (term != default_text && term != "")
{
current_search_text = term;
search (term);
}
else if (delayed_clear)
{
current_search_text = "";
clear ();
}
this.search_timeout_id = 0;
return false;
}
public new unowned string? get_text ()
{
return current_search_text;
}
}
}
dockmanager-0.1.0/daemon/PaxHeaders.13539/dockmanager-daemon.c 0000644 0001750 0001750 00000000132 11531300342 022131 x ustar 00 0000000 0000000 30 mtime=1298497762.709548918
30 atime=1298497762.709548918
30 ctime=1298497772.799548914
dockmanager-0.1.0/daemon/dockmanager-daemon.c 0000644 0001750 0001750 00000266667 11531300342 021077 0 ustar 00rico rico 0000000 0000000 /* dockmanager-daemon.c generated by valac 0.11.6, the Vala compiler
* generated from dockmanager-daemon.vala, do not modify */
/*
* Copyright (C) 2010 Michal Hruby
*
* 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Authored by Michal Hruby
*
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define DOCK_MANAGER_TYPE_HELPER_PROCESS_INFO (dock_manager_helper_process_info_get_type ())
typedef struct _DockManagerHelperProcessInfo DockManagerHelperProcessInfo;
#define DOCK_MANAGER_TYPE_DAEMON_INTERFACE (dock_manager_daemon_interface_get_type ())
#define DOCK_MANAGER_DAEMON_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCK_MANAGER_TYPE_DAEMON_INTERFACE, DockManagerDaemonInterface))
#define DOCK_MANAGER_IS_DAEMON_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCK_MANAGER_TYPE_DAEMON_INTERFACE))
#define DOCK_MANAGER_DAEMON_INTERFACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DOCK_MANAGER_TYPE_DAEMON_INTERFACE, DockManagerDaemonInterfaceIface))
typedef struct _DockManagerDaemonInterface DockManagerDaemonInterface;
typedef struct _DockManagerDaemonInterfaceIface DockManagerDaemonInterfaceIface;
#define DOCK_MANAGER_TYPE_HELPER_INFO (dock_manager_helper_info_get_type ())
typedef struct _DockManagerHelperInfo DockManagerHelperInfo;
#define DOCK_MANAGER_TYPE_HELPER_DAEMON (dock_manager_helper_daemon_get_type ())
#define DOCK_MANAGER_HELPER_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCK_MANAGER_TYPE_HELPER_DAEMON, DockManagerHelperDaemon))
#define DOCK_MANAGER_HELPER_DAEMON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCK_MANAGER_TYPE_HELPER_DAEMON, DockManagerHelperDaemonClass))
#define DOCK_MANAGER_IS_HELPER_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCK_MANAGER_TYPE_HELPER_DAEMON))
#define DOCK_MANAGER_IS_HELPER_DAEMON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCK_MANAGER_TYPE_HELPER_DAEMON))
#define DOCK_MANAGER_HELPER_DAEMON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCK_MANAGER_TYPE_HELPER_DAEMON, DockManagerHelperDaemonClass))
typedef struct _DockManagerHelperDaemon DockManagerHelperDaemon;
typedef struct _DockManagerHelperDaemonClass DockManagerHelperDaemonClass;
typedef struct _DockManagerHelperDaemonPrivate DockManagerHelperDaemonPrivate;
#define DOCK_MANAGER_TYPE_DBUS_WATCHER (dock_manager_dbus_watcher_get_type ())
#define DOCK_MANAGER_DBUS_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCK_MANAGER_TYPE_DBUS_WATCHER, DockManagerDBusWatcher))
#define DOCK_MANAGER_DBUS_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCK_MANAGER_TYPE_DBUS_WATCHER, DockManagerDBusWatcherClass))
#define DOCK_MANAGER_IS_DBUS_WATCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCK_MANAGER_TYPE_DBUS_WATCHER))
#define DOCK_MANAGER_IS_DBUS_WATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCK_MANAGER_TYPE_DBUS_WATCHER))
#define DOCK_MANAGER_DBUS_WATCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCK_MANAGER_TYPE_DBUS_WATCHER, DockManagerDBusWatcherClass))
typedef struct _DockManagerDBusWatcher DockManagerDBusWatcher;
typedef struct _DockManagerDBusWatcherClass DockManagerDBusWatcherClass;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_value_array_free0(var) ((var == NULL) ? NULL : (var = (g_value_array_free (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define __g_list_free__dock_manager_helper_info_free0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__dock_manager_helper_info_free0_ (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _dbus_g_connection_unref0(var) ((var == NULL) ? NULL : (var = (dbus_g_connection_unref (var), NULL)))
typedef struct _DBusObjectVTable _DBusObjectVTable;
#define __g_slist_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free__g_object_unref0_ (var), NULL)))
#define _g_key_file_free0(var) ((var == NULL) ? NULL : (var = (g_key_file_free (var), NULL)))
typedef struct _Block1Data Block1Data;
typedef struct _Block2Data Block2Data;
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
typedef struct _Block3Data Block3Data;
typedef struct _Block4Data Block4Data;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_io_channel_unref0(var) ((var == NULL) ? NULL : (var = (g_io_channel_unref (var), NULL)))
typedef struct _Block5Data Block5Data;
typedef struct _DockManagerHelperDaemonInstallHelperData DockManagerHelperDaemonInstallHelperData;
struct _DockManagerHelperProcessInfo {
gint pid;
guint kill_timer_id;
gulong dbus_appear_id;
gulong dbus_disappear_id;
};
struct _DockManagerHelperInfo {
gchar* path;
gchar* name;
gchar* description;
gchar* icon_name;
gchar* app_name;
gchar* dbus_name;
gboolean app_available;
gboolean enabled;
gboolean running;
};
struct _DockManagerDaemonInterfaceIface {
GTypeInterface parent_iface;
DockManagerHelperInfo* (*get_all_helpers) (DockManagerDaemonInterface* self, int* result_length1, GError** error);
void (*enable_helper) (DockManagerDaemonInterface* self, const gchar* path, GError** error);
void (*disable_helper) (DockManagerDaemonInterface* self, const gchar* path, GError** error);
void (*restart_all) (DockManagerDaemonInterface* self, GError** error);
void (*install_helper) (DockManagerDaemonInterface* self, const gchar* filename, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean (*install_helper_finish) (DockManagerDaemonInterface* self, GAsyncResult* _res_, GError** error);
void (*show_preferences) (DockManagerDaemonInterface* self, GError** error);
void (*embed_preferences) (DockManagerDaemonInterface* self, gint64 xid, GHashTable* hints, GError** error);
};
struct _DockManagerHelperDaemon {
GObject parent_instance;
DockManagerHelperDaemonPrivate * priv;
};
struct _DockManagerHelperDaemonClass {
GObjectClass parent_class;
};
struct _DockManagerHelperDaemonPrivate {
GMainLoop* main_loop;
DockManagerDBusWatcher* watcher;
GValueArray* _helper_list;
GHashTable* helper_process_info;
GList* all_scripts;
gboolean dock_running;
};
struct _DBusObjectVTable {
void (*register_object) (DBusConnection*, const char*, void*);
};
struct _Block1Data {
int _ref_count_;
DockManagerHelperDaemon * self;
gchar* path;
};
struct _Block2Data {
int _ref_count_;
DockManagerHelperDaemon * self;
DockManagerHelperProcessInfo* hpi;
};
struct _Block3Data {
int _ref_count_;
DockManagerHelperDaemon * self;
gpointer _async_data_;
};
struct _Block4Data {
int _ref_count_;
Block3Data * _data3_;
gboolean metadata_file_found;
GRegex* re;
};
struct _Block5Data {
int _ref_count_;
Block3Data * _data3_;
gint untar_status;
};
struct _DockManagerHelperDaemonInstallHelperData {
int _state_;
GObject* _source_object_;
GAsyncResult* _res_;
GSimpleAsyncResult* _async_result;
DockManagerHelperDaemon* self;
gchar* filename;
gboolean result;
Block3Data* _data3_;
GPid pid;
gchar** argv;
gint argv_length1;
gint _argv_size_;
Block4Data* _data4_;
gint standard_output;
gchar* _tmp0_;
gchar* tar_command;
gchar** _tmp1_;
gint _tmp2_;
GPid _tmp3_;
gint _tmp4_;
GRegex* _tmp5_;
GIOChannel* _tmp6_;
GIOChannel* chan;
guint _tmp7_;
guint src_id;
GError * err;
Block5Data* _data5_;
const gchar* _tmp8_;
gchar* _tmp9_;
gchar* _tmp10_;
gchar* _tmp11_;
gchar* extract_command;
gchar** _tmp12_;
gint _tmp13_;
GPid _tmp14_;
GError * err2;
GError * _inner_error_;
};
static gpointer dock_manager_helper_daemon_parent_class = NULL;
static DockManagerDaemonInterfaceIface* dock_manager_helper_daemon_dock_manager_daemon_interface_parent_iface = NULL;
#define DOCK_MANAGER_GROUP_NAME "DockmanagerHelper"
GType dock_manager_helper_process_info_get_type (void) G_GNUC_CONST;
DockManagerHelperProcessInfo* dock_manager_helper_process_info_dup (const DockManagerHelperProcessInfo* self);
void dock_manager_helper_process_info_free (DockManagerHelperProcessInfo* self);
DockManagerDaemonInterface* dock_manager_daemon_interface_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path);
GType dock_manager_helper_info_get_type (void) G_GNUC_CONST;
DockManagerHelperInfo* dock_manager_helper_info_dup (const DockManagerHelperInfo* self);
void dock_manager_helper_info_free (DockManagerHelperInfo* self);
void dock_manager_helper_info_copy (const DockManagerHelperInfo* self, DockManagerHelperInfo* dest);
void dock_manager_helper_info_destroy (DockManagerHelperInfo* self);
GType dock_manager_daemon_interface_get_type (void) G_GNUC_CONST;
GType dock_manager_helper_daemon_get_type (void) G_GNUC_CONST;
GType dock_manager_dbus_watcher_get_type (void) G_GNUC_CONST;
#define DOCK_MANAGER_HELPER_DAEMON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DOCK_MANAGER_TYPE_HELPER_DAEMON, DockManagerHelperDaemonPrivate))
enum {
DOCK_MANAGER_HELPER_DAEMON_DUMMY_PROPERTY,
DOCK_MANAGER_HELPER_DAEMON_HELPER_LIST
};
static void _dock_manager_helper_info_free0_ (gpointer var);
static void _g_list_free__dock_manager_helper_info_free0_ (GList* self);
DockManagerHelperDaemon* dock_manager_helper_daemon_new (void);
DockManagerHelperDaemon* dock_manager_helper_daemon_construct (GType object_type);
static void _g_free0_ (gpointer var);
static void _dock_manager_helper_process_info_free0_ (gpointer var);
DockManagerDBusWatcher* dock_manager_dbus_watcher_get_default (void);
gboolean dock_manager_dbus_watcher_name_has_owner (DockManagerDBusWatcher* self, const gchar* name);
static void _lambda0_ (DockManagerHelperDaemon* self);
void dock_manager_helper_daemon_run_helpers (DockManagerHelperDaemon* self);
static void __lambda0__dock_manager_dbus_watcher_name_appeared (DockManagerDBusWatcher* _sender, const gchar* name, gpointer self);
static void _lambda6_ (DockManagerHelperDaemon* self);
static void dock_manager_helper_daemon_kill_all (DockManagerHelperDaemon* self);
static void __lambda6__dock_manager_dbus_watcher_name_disappeared (DockManagerDBusWatcher* _sender, const gchar* name, gpointer self);
static void dock_manager_helper_daemon_real_constructed (GObject* base);
void dock_manager_helper_daemon_run (DockManagerHelperDaemon* self);
#define DOCK_MANAGER_DBUS_UNIQUE_NAME "net.launchpad.DockManager.Daemon"
static guint _dynamic_request_name0 (DBusGProxy* self, const gchar* param1, guint param2, GError** error);
#define DOCK_MANAGER_DBUS_OBJECT_PATH_NAME "/net/launchpad/DockManager/Daemon"
static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object);
static void _vala_dbus_unregister_object (gpointer connection, GObject* object);
static void dock_manager_helper_daemon_init (DockManagerHelperDaemon* self);
static void _g_object_unref0_ (gpointer var);
static void _g_slist_free__g_object_unref0_ (GSList* self);
void dock_manager_daemon_interface_enable_helper (DockManagerDaemonInterface* self, const gchar* path, GError** error);
static gint dock_manager_helper_daemon_get_helper_pid (DockManagerHelperDaemon* self, const gchar* path);
static gchar* dock_manager_helper_daemon_get_helper_dbus_name (DockManagerHelperDaemon* self, const gchar* path);
static gboolean dock_manager_helper_daemon_is_helper_enabled (DockManagerHelperDaemon* self, const gchar* path);
static void dock_manager_helper_daemon_real_enable_helper (DockManagerDaemonInterface* base, const gchar* path, GError** error);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (Block1Data* _data1_);
static DockManagerHelperProcessInfo* dock_manager_helper_daemon_update_helper (DockManagerHelperDaemon* self, const gchar* path);
static void _lambda1_ (Block1Data* _data1_);
static void __lambda1__gcallback (gpointer self);
static void _lambda2_ (Block1Data* _data1_);
static gboolean _lambda3_ (Block1Data* _data1_);
static void dock_manager_helper_daemon_kill_helper (DockManagerHelperDaemon* self, const gchar* path);
static gboolean __lambda3__gsource_func (gpointer self);
static void __lambda2__gcallback (gpointer self);
static void _lambda5_ (GPid pid, gint status, Block1Data* _data1_);
static void __lambda5__gchild_watch_func (GPid pid, gint status, gpointer self);
static void dock_manager_helper_daemon_real_disable_helper (DockManagerDaemonInterface* base, const gchar* path, GError** error);
void dock_manager_helper_daemon_set_helper_list (DockManagerHelperDaemon* self, GValueArray* value);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (Block2Data* _data2_);
static gboolean _lambda4_ (Block2Data* _data2_);
static gboolean __lambda4__gsource_func (gpointer self);
static void dock_manager_helper_daemon_real_install_helper_data_free (gpointer _data);
static void dock_manager_helper_daemon_real_install_helper (DockManagerDaemonInterface* base, const gchar* filename, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean dock_manager_helper_daemon_real_install_helper_co (DockManagerHelperDaemonInstallHelperData* data);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (Block3Data* _data3_);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (Block4Data* _data4_);
static gboolean _lambda7_ (GIOChannel* src, GIOCondition cond, Block4Data* _data4_);
static gboolean __lambda7__gio_func (GIOChannel* source, GIOCondition condition, gpointer self);
static void _lambda8_ (GPid p, gint status, Block4Data* _data4_);
void dock_manager_daemon_interface_install_helper (DockManagerDaemonInterface* self, const gchar* filename, GAsyncReadyCallback _callback_, gpointer _user_data_);
gboolean dock_manager_daemon_interface_install_helper_finish (DockManagerDaemonInterface* self, GAsyncResult* _res_, GError** error);
static void __lambda8__gchild_watch_func (GPid pid, gint status, gpointer self);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (Block5Data* _data5_);
static void _lambda9_ (GPid p, gint status, Block5Data* _data5_);
static void __lambda9__gchild_watch_func (GPid pid, gint status, gpointer self);
static void dock_manager_helper_daemon_real_show_preferences (DockManagerDaemonInterface* base, GError** error);
static void dock_manager_helper_daemon_real_embed_preferences (DockManagerDaemonInterface* base, gint64 xid, GHashTable* hints, GError** error);
static DockManagerHelperInfo* dock_manager_helper_daemon_real_get_all_helpers (DockManagerDaemonInterface* base, int* result_length1, GError** error);
static void _vala_DockManagerHelperInfo_array_free (DockManagerHelperInfo* array, gint array_length);
static void dock_manager_helper_daemon_real_restart_all (DockManagerDaemonInterface* base, GError** error);
gint dock_manager_helper_daemon_main (gchar** argv, int argv_length1);
GValueArray* dock_manager_helper_daemon_get_helper_list (DockManagerHelperDaemon* self);
static void dock_manager_helper_daemon_finalize (GObject* obj);
void dock_manager_helper_daemon_dbus_register_object (DBusConnection* connection, const char* path, void* object);
void _dock_manager_helper_daemon_dbus_unregister (DBusConnection* connection, void* _user_data_);
DBusHandlerResult dock_manager_helper_daemon_dbus_message (DBusConnection* connection, DBusMessage* message, void* object);
static DBusHandlerResult _dbus_dock_manager_helper_daemon_introspect (DockManagerHelperDaemon* self, DBusConnection* connection, DBusMessage* message);
static void _vala_dock_manager_helper_daemon_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_dock_manager_helper_daemon_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static const DBusObjectPathVTable _dock_manager_helper_daemon_dbus_path_vtable = {_dock_manager_helper_daemon_dbus_unregister, dock_manager_helper_daemon_dbus_message};
static const _DBusObjectVTable _dock_manager_helper_daemon_dbus_vtable = {dock_manager_helper_daemon_dbus_register_object};
DockManagerHelperProcessInfo* dock_manager_helper_process_info_dup (const DockManagerHelperProcessInfo* self) {
DockManagerHelperProcessInfo* dup;
dup = g_new0 (DockManagerHelperProcessInfo, 1);
memcpy (dup, self, sizeof (DockManagerHelperProcessInfo));
return dup;
}
void dock_manager_helper_process_info_free (DockManagerHelperProcessInfo* self) {
g_free (self);
}
GType dock_manager_helper_process_info_get_type (void) {
static volatile gsize dock_manager_helper_process_info_type_id__volatile = 0;
if (g_once_init_enter (&dock_manager_helper_process_info_type_id__volatile)) {
GType dock_manager_helper_process_info_type_id;
dock_manager_helper_process_info_type_id = g_boxed_type_register_static ("DockManagerHelperProcessInfo", (GBoxedCopyFunc) dock_manager_helper_process_info_dup, (GBoxedFreeFunc) dock_manager_helper_process_info_free);
g_once_init_leave (&dock_manager_helper_process_info_type_id__volatile, dock_manager_helper_process_info_type_id);
}
return dock_manager_helper_process_info_type_id__volatile;
}
static void _dock_manager_helper_info_free0_ (gpointer var) {
(var == NULL) ? NULL : (var = (dock_manager_helper_info_free (var), NULL));
}
static void _g_list_free__dock_manager_helper_info_free0_ (GList* self) {
g_list_foreach (self, (GFunc) _dock_manager_helper_info_free0_, NULL);
g_list_free (self);
}
static void _g_free0_ (gpointer var) {
var = (g_free (var), NULL);
}
static void _dock_manager_helper_process_info_free0_ (gpointer var) {
(var == NULL) ? NULL : (var = (dock_manager_helper_process_info_free (var), NULL));
}
static gpointer _g_object_ref0 (gpointer self) {
return self ? g_object_ref (self) : NULL;
}
static void _lambda0_ (DockManagerHelperDaemon* self) {
self->priv->dock_running = TRUE;
dock_manager_helper_daemon_run_helpers (self);
}
static void __lambda0__dock_manager_dbus_watcher_name_appeared (DockManagerDBusWatcher* _sender, const gchar* name, gpointer self) {
_lambda0_ (self);
}
static void _lambda6_ (DockManagerHelperDaemon* self) {
self->priv->dock_running = FALSE;
dock_manager_helper_daemon_kill_all (self);
}
static void __lambda6__dock_manager_dbus_watcher_name_disappeared (DockManagerDBusWatcher* _sender, const gchar* name, gpointer self) {
_lambda6_ (self);
}
DockManagerHelperDaemon* dock_manager_helper_daemon_construct (GType object_type) {
DockManagerHelperDaemon * self = NULL;
GMainLoop* _tmp0_ = NULL;
GMainLoop* _tmp1_;
GHashTable* _tmp2_ = NULL;
GHashTable* _tmp3_;
GList* _tmp4_;
DockManagerDBusWatcher* _tmp5_ = NULL;
DockManagerDBusWatcher* _tmp6_;
DockManagerDBusWatcher* _tmp7_;
gboolean _tmp8_;
self = (DockManagerHelperDaemon*) g_object_new (object_type, NULL);
_tmp0_ = g_main_loop_new (NULL, FALSE);
_tmp1_ = _tmp0_;
_g_main_loop_unref0 (self->priv->main_loop);
self->priv->main_loop = _tmp1_;
_tmp2_ = g_hash_table_new_full (g_str_hash, g_str_equal, _g_free0_, _dock_manager_helper_process_info_free0_);
_tmp3_ = _tmp2_;
_g_hash_table_unref0 (self->priv->helper_process_info);
self->priv->helper_process_info = _tmp3_;
_tmp4_ = NULL;
__g_list_free__dock_manager_helper_info_free0_0 (self->priv->all_scripts);
self->priv->all_scripts = _tmp4_;
_tmp5_ = dock_manager_dbus_watcher_get_default ();
_tmp6_ = _g_object_ref0 (_tmp5_);
_tmp7_ = _tmp6_;
_g_object_unref0 (self->priv->watcher);
self->priv->watcher = _tmp7_;
_tmp8_ = dock_manager_dbus_watcher_name_has_owner (self->priv->watcher, "net.launchpad.DockManager");
self->priv->dock_running = _tmp8_;
g_signal_connect_object (self->priv->watcher, "name-appeared::net.launchpad.DockManager", (GCallback) __lambda0__dock_manager_dbus_watcher_name_appeared, self, 0);
g_signal_connect_object (self->priv->watcher, "name-disappeared::net.launchpad.DockManager", (GCallback) __lambda6__dock_manager_dbus_watcher_name_disappeared, self, 0);
return self;
}
DockManagerHelperDaemon* dock_manager_helper_daemon_new (void) {
return dock_manager_helper_daemon_construct (DOCK_MANAGER_TYPE_HELPER_DAEMON);
}
static void dock_manager_helper_daemon_real_constructed (GObject* base) {
DockManagerHelperDaemon * self;
gchar* _tmp0_;
gchar* schema_filename;
gchar* schema_full;
DesktopAgnosticConfigClient* _tmp1_ = NULL;
DesktopAgnosticConfigClient* client;
GError * _inner_error_ = NULL;
self = (DockManagerHelperDaemon*) base;
_tmp0_ = g_strdup ("dockmanager-daemon.schema-ini");
schema_filename = _tmp0_;
schema_full = g_strconcat (SCHEMAFILEDIR "/", schema_filename, NULL);
_tmp1_ = desktop_agnostic_config_client_new (schema_full);
client = _tmp1_;
desktop_agnostic_config_client_bind (client, "DEFAULT", "helper_list", (GObject*) self, "helper-list", FALSE, DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK, &_inner_error_);
if (_inner_error_ != NULL) {
if (_inner_error_->domain == DESKTOP_AGNOSTIC_CONFIG_ERROR) {
goto __catch0_desktop_agnostic_config_error;
}
_g_object_unref0 (client);
_g_free0 (schema_full);
_g_free0 (schema_filename);
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
goto __finally0;
__catch0_desktop_agnostic_config_error:
{
GError * err;
err = _inner_error_;
_inner_error_ = NULL;
g_warning ("dockmanager-daemon.vala:95: %s", err->message);
_g_error_free0 (err);
}
__finally0:
if (_inner_error_ != NULL) {
_g_object_unref0 (client);
_g_free0 (schema_full);
_g_free0 (schema_filename);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_g_object_unref0 (client);
_g_free0 (schema_full);
_g_free0 (schema_filename);
}
static guint _dynamic_request_name0 (DBusGProxy* self, const gchar* param1, guint param2, GError** error) {
guint result;
dbus_g_proxy_call (self, "RequestName", error, G_TYPE_STRING, param1, G_TYPE_UINT, param2, G_TYPE_INVALID, G_TYPE_UINT, &result, G_TYPE_INVALID);
if (*error) {
return 0U;
}
return result;
}
static void _vala_dbus_register_object (DBusConnection* connection, const char* path, void* object) {
const _DBusObjectVTable * vtable;
vtable = g_type_get_qdata (G_TYPE_FROM_INSTANCE (object), g_quark_from_static_string ("DBusObjectVTable"));
if (vtable) {
vtable->register_object (connection, path, object);
} else {
g_warning ("Object does not implement any D-Bus interface");
}
}
static void _vala_dbus_unregister_object (gpointer connection, GObject* object) {
char* path;
path = g_object_steal_data ((GObject*) object, "dbus_object_path");
dbus_connection_unregister_object_path (connection, path);
g_free (path);
}
void dock_manager_helper_daemon_run (DockManagerHelperDaemon* self) {
DBusGConnection* _tmp0_ = NULL;
DBusGConnection* connection;
DBusGProxy* _tmp1_ = NULL;
DBusGProxy* bus;
guint _tmp2_;
guint request_name_result;
GError * _inner_error_ = NULL;
g_return_if_fail (self != NULL);
_tmp0_ = dbus_g_bus_get (DBUS_BUS_SESSION, &_inner_error_);
connection = _tmp0_;
if (_inner_error_ != NULL) {
if (_inner_error_->domain == DBUS_GERROR) {
goto __catch1_dbus_gerror;
}
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp1_ = dbus_g_proxy_new_for_name (connection, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus");
bus = _tmp1_;
_tmp2_ = _dynamic_request_name0 (bus, DOCK_MANAGER_DBUS_UNIQUE_NAME, (guint) DBUS_NAME_FLAG_DO_NOT_QUEUE, &_inner_error_);
request_name_result = _tmp2_;
if (_inner_error_ != NULL) {
_g_object_unref0 (bus);
_dbus_g_connection_unref0 (connection);
if (_inner_error_->domain == DBUS_GERROR) {
goto __catch1_dbus_gerror;
}
goto __finally1;
}
if (request_name_result == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
_vala_dbus_register_object (dbus_g_connection_get_connection (connection), DOCK_MANAGER_DBUS_OBJECT_PATH_NAME, (GObject*) self);
dock_manager_helper_daemon_init (self);
dock_manager_helper_daemon_run_helpers (self);
g_main_loop_run (self->priv->main_loop);
dock_manager_helper_daemon_kill_all (self);
} else {
g_error ("dockmanager-daemon.vala:124: Another instance of DockManager daemon is" \
" already running!");
}
_g_object_unref0 (bus);
_dbus_g_connection_unref0 (connection);
goto __finally1;
__catch1_dbus_gerror:
{
GError * err;
err = _inner_error_;
_inner_error_ = NULL;
g_warning ("dockmanager-daemon.vala:129: %s", err->message);
_g_error_free0 (err);
}
__finally1:
if (_inner_error_ != NULL) {
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
}
static gpointer _dock_manager_helper_info_dup0 (gpointer self) {
return self ? dock_manager_helper_info_dup (self) : NULL;
}
static void _g_object_unref0_ (gpointer var) {
(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}
static void _g_slist_free__g_object_unref0_ (GSList* self) {
g_slist_foreach (self, (GFunc) _g_object_unref0_, NULL);
g_slist_free (self);
}
static void dock_manager_helper_daemon_init (DockManagerHelperDaemon* self) {
gchar* _tmp0_;
const gchar* _tmp1_ = NULL;
gchar** _tmp2_ = NULL;
gchar** prefixes;
gint prefixes_length1;
gint _prefixes_size_;
GError * _inner_error_ = NULL;
g_return_if_fail (self != NULL);
_tmp0_ = g_strdup (PKGDATADIR);
_tmp1_ = g_get_user_data_dir ();
_tmp2_ = g_new0 (gchar*, 2 + 1);
_tmp2_[0] = _tmp0_;
_tmp2_[1] = g_strconcat (_tmp1_, "/dockmanager", NULL);
prefixes = _tmp2_;
prefixes_length1 = 2;
_prefixes_size_ = 2;
{
gchar** prefix_collection;
int prefix_collection_length1;
int prefix_it;
prefix_collection = prefixes;
prefix_collection_length1 = prefixes_length1;
for (prefix_it = 0; prefix_it < prefixes_length1; prefix_it = prefix_it + 1) {
const gchar* prefix;
prefix = prefix_collection[prefix_it];
{
gchar* path;
gchar* metadata_dir;
DesktopAgnosticVFSFile* _tmp3_ = NULL;
DesktopAgnosticVFSFile* scripts_dir;
gboolean _tmp4_;
GSList* _tmp5_ = NULL;
GSList* _tmp6_;
path = g_strconcat (prefix, "/scripts", NULL);
metadata_dir = g_strconcat (prefix, "/metadata/", NULL);
_tmp3_ = desktop_agnostic_vfs_file_new_for_path (path, &_inner_error_);
scripts_dir = _tmp3_;
if (_inner_error_ != NULL) {
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp4_ = desktop_agnostic_vfs_file_exists (scripts_dir);
if (!_tmp4_) {
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
continue;
}
_tmp5_ = desktop_agnostic_vfs_file_enumerate_children (scripts_dir, &_inner_error_);
_tmp6_ = _tmp5_;
if (_inner_error_ != NULL) {
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
{
GSList* f_collection;
GSList* f_it;
f_collection = _tmp6_;
for (f_it = f_collection; f_it != NULL; f_it = f_it->next) {
DesktopAgnosticVFSFile* _tmp7_;
DesktopAgnosticVFSFile* f;
_tmp7_ = _g_object_ref0 ((DesktopAgnosticVFSFile*) f_it->data);
f = _tmp7_;
{
DockManagerHelperInfo hi = {0};
gchar* _tmp8_ = NULL;
gchar* _tmp9_;
DockManagerHelperInfo* _tmp10_;
memset (&hi, 0, sizeof (DockManagerHelperInfo));
_tmp8_ = desktop_agnostic_vfs_file_get_path (f);
_tmp9_ = _tmp8_;
_g_free0 (hi.path);
hi.path = _tmp9_;
hi.app_available = TRUE;
_tmp10_ = _dock_manager_helper_info_dup0 (&hi);
self->priv->all_scripts = g_list_append (self->priv->all_scripts, _tmp10_);
dock_manager_helper_info_destroy (&hi);
_g_object_unref0 (f);
}
}
__g_slist_free__g_object_unref0_0 (f_collection);
}
{
GList* hi_collection;
GList* hi_it;
hi_collection = self->priv->all_scripts;
for (hi_it = hi_collection; hi_it != NULL; hi_it = hi_it->next) {
DockManagerHelperInfo* hi;
hi = (DockManagerHelperInfo*) hi_it->data;
{
gchar* _tmp11_ = NULL;
gchar* _tmp12_;
gchar* _tmp13_;
gchar* _tmp14_;
gchar* metadata;
DesktopAgnosticVFSFile* _tmp15_ = NULL;
DesktopAgnosticVFSFile* metadata_file;
gboolean _tmp16_;
gchar* contents = NULL;
gsize length = 0UL;
gchar* _tmp17_ = NULL;
gsize _tmp18_;
GKeyFile* _tmp19_ = NULL;
GKeyFile* keyfile;
gchar* _tmp20_ = NULL;
gchar* _tmp21_;
gchar* _tmp22_;
gchar* _tmp23_ = NULL;
gchar* _tmp24_;
gchar* _tmp25_;
gchar* _tmp26_ = NULL;
gchar* _tmp27_;
gchar* _tmp28_;
gchar* _tmp29_ = NULL;
gchar* _tmp30_;
gchar* _tmp31_;
gchar* _tmp32_ = NULL;
gchar* _tmp33_;
gchar* _tmp34_ = NULL;
gchar* _tmp35_;
gchar* _tmp36_;
_tmp11_ = g_path_get_basename ((*hi).path);
_tmp12_ = _tmp11_;
_tmp13_ = g_strconcat (metadata_dir, _tmp12_, NULL);
metadata = (_tmp14_ = g_strconcat (_tmp13_, ".info", NULL), _g_free0 (_tmp13_), _g_free0 (_tmp12_), _tmp14_);
_tmp15_ = desktop_agnostic_vfs_file_new_for_path (metadata, &_inner_error_);
metadata_file = _tmp15_;
if (_inner_error_ != NULL) {
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp16_ = desktop_agnostic_vfs_file_exists (metadata_file);
if (!_tmp16_) {
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
continue;
}
desktop_agnostic_vfs_file_load_contents (metadata_file, &_tmp17_, &_tmp18_, &_inner_error_);
_g_free0 (contents);
contents = _tmp17_;
length = _tmp18_;
if (_inner_error_ != NULL) {
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp19_ = g_key_file_new ();
keyfile = _tmp19_;
g_key_file_load_from_data (keyfile, contents, length, G_KEY_FILE_NONE, &_inner_error_);
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_KEY_FILE_ERROR) {
goto __catch2_g_key_file_error;
}
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
goto __finally2;
__catch2_g_key_file_error:
{
GError * err;
err = _inner_error_;
_inner_error_ = NULL;
g_warning ("dockmanager-daemon.vala:173: Cannot load %s: %s", metadata, err->message);
_g_error_free0 (err);
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
continue;
}
__finally2:
if (_inner_error_ != NULL) {
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp20_ = g_key_file_get_string (keyfile, DOCK_MANAGER_GROUP_NAME, "Name", &_inner_error_);
_tmp21_ = _tmp20_;
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_KEY_FILE_ERROR) {
goto __catch3_g_key_file_error;
}
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp22_ = _tmp21_;
_g_free0 ((*hi).name);
(*hi).name = _tmp22_;
_tmp23_ = g_key_file_get_string (keyfile, DOCK_MANAGER_GROUP_NAME, "Description", &_inner_error_);
_tmp24_ = _tmp23_;
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_KEY_FILE_ERROR) {
goto __catch3_g_key_file_error;
}
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp25_ = _tmp24_;
_g_free0 ((*hi).description);
(*hi).description = _tmp25_;
goto __finally3;
__catch3_g_key_file_error:
{
GError * err;
err = _inner_error_;
_inner_error_ = NULL;
g_warning ("dockmanager-daemon.vala:184: Required key missing in %s", metadata);
_g_error_free0 (err);
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
continue;
}
__finally3:
if (_inner_error_ != NULL) {
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp26_ = g_key_file_get_string (keyfile, DOCK_MANAGER_GROUP_NAME, "Icon", &_inner_error_);
_tmp27_ = _tmp26_;
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_KEY_FILE_ERROR) {
goto __catch4_g_key_file_error;
}
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp28_ = _tmp27_;
_g_free0 ((*hi).icon_name);
(*hi).icon_name = _tmp28_;
goto __finally4;
__catch4_g_key_file_error:
{
GError * err;
err = _inner_error_;
_inner_error_ = NULL;
_g_error_free0 (err);
}
__finally4:
if (_inner_error_ != NULL) {
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp29_ = g_key_file_get_string (keyfile, DOCK_MANAGER_GROUP_NAME, "AppName", &_inner_error_);
_tmp30_ = _tmp29_;
if (_inner_error_ != NULL) {
goto __catch5_g_error;
}
_tmp31_ = _tmp30_;
_g_free0 ((*hi).app_name);
(*hi).app_name = _tmp31_;
_tmp32_ = g_find_program_in_path ((*hi).app_name);
_tmp33_ = _tmp32_;
(*hi).app_available = _tmp33_ != NULL;
_g_free0 (_tmp33_);
goto __finally5;
__catch5_g_error:
{
GError * err;
err = _inner_error_;
_inner_error_ = NULL;
g_warning ("dockmanager-daemon.vala:201: %s", err->message);
_g_error_free0 (err);
}
__finally5:
if (_inner_error_ != NULL) {
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp34_ = g_key_file_get_string (keyfile, DOCK_MANAGER_GROUP_NAME, "DBusName", &_inner_error_);
_tmp35_ = _tmp34_;
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_KEY_FILE_ERROR) {
goto __catch6_g_key_file_error;
}
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_tmp36_ = _tmp35_;
_g_free0 ((*hi).dbus_name);
(*hi).dbus_name = _tmp36_;
goto __finally6;
__catch6_g_key_file_error:
{
GError * err;
err = _inner_error_;
_inner_error_ = NULL;
_g_error_free0 (err);
}
__finally6:
if (_inner_error_ != NULL) {
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
_g_key_file_free0 (keyfile);
_g_free0 (contents);
_g_object_unref0 (metadata_file);
_g_free0 (metadata);
}
}
}
_g_object_unref0 (scripts_dir);
_g_free0 (metadata_dir);
_g_free0 (path);
}
}
}
prefixes = (_vala_array_free (prefixes, prefixes_length1, (GDestroyNotify) g_free), NULL);
}
void dock_manager_helper_daemon_run_helpers (DockManagerHelperDaemon* self) {
GError * _inner_error_ = NULL;
g_return_if_fail (self != NULL);
{
GValueArray* v_collection;
guint v_index;
v_collection = self->priv->_helper_list;
for (v_index = 0; v_index < v_collection->n_values; v_index = v_index + 1) {
GValue _tmp0_ = {0};
GValue v;
v = G_IS_VALUE (g_value_array_get_nth (v_collection, v_index)) ? (g_value_init (&_tmp0_, G_VALUE_TYPE (g_value_array_get_nth (v_collection, v_index))), g_value_copy (g_value_array_get_nth (v_collection, v_index), &_tmp0_), _tmp0_) : (*g_value_array_get_nth (v_collection, v_index));
{
const gchar* _tmp1_ = NULL;
const gchar* helper;
_tmp1_ = g_value_get_string (&v);
helper = _tmp1_;
dock_manager_daemon_interface_enable_helper ((DockManagerDaemonInterface*) self, helper, &_inner_error_);
if (_inner_error_ != NULL) {
G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
}
}
}
}
static gint dock_manager_helper_daemon_get_helper_pid (DockManagerHelperDaemon* self, const gchar* path) {
gint result = 0;
gconstpointer _tmp0_ = NULL;
DockManagerHelperProcessInfo* hpi;
gint _tmp1_ = 0;
g_return_val_if_fail (self != NULL, 0);
g_return_val_if_fail (path != NULL, 0);
_tmp0_ = g_hash_table_lookup (self->priv->helper_process_info, path);
hpi = (DockManagerHelperProcessInfo*) _tmp0_;
if (hpi != NULL) {
_tmp1_ = (*hpi).pid;
} else {
_tmp1_ = 0;
}
result = _tmp1_;
return result;
}
static gchar* dock_manager_helper_daemon_get_helper_dbus_name (DockManagerHelperDaemon* self, const gchar* path) {
gchar* result = NULL;
g_return_val_if_fail (self != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
{
GList* hi_collection;
GList* hi_it;
hi_collection = self->priv->all_scripts;
for (hi_it = hi_collection; hi_it != NULL; hi_it = hi_it->next) {
DockManagerHelperInfo* hi;
hi = (DockManagerHelperInfo*) hi_it->data;
{
if (g_strcmp0 ((*hi).path, path) == 0) {
gchar* _tmp0_;
_tmp0_ = g_strdup ((*hi).dbus_name);
result = _tmp0_;
return result;
}
}
}
}
result = NULL;
return result;
}
static gboolean dock_manager_helper_daemon_is_helper_enabled (DockManagerHelperDaemon* self, const gchar* path) {
gboolean result = FALSE;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (path != NULL, FALSE);
{
GValueArray* v_collection;
guint v_index;
v_collection = self->priv->_helper_list;
for (v_index = 0; v_index < v_collection->n_values; v_index = v_index + 1) {
GValue _tmp0_ = {0};
GValue v;
v = G_IS_VALUE (g_value_array_get_nth (v_collection, v_index)) ? (g_value_init (&_tmp0_, G_VALUE_TYPE (g_value_array_get_nth (v_collection, v_index))), g_value_copy (g_value_array_get_nth (v_collection, v_index), &_tmp0_), _tmp0_) : (*g_value_array_get_nth (v_collection, v_index));
{
const gchar* _tmp1_ = NULL;
_tmp1_ = g_value_get_string (&v);
if (g_strcmp0 (_tmp1_, path) == 0) {
result = TRUE;
G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
return result;
}
G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
}
}
}
result = FALSE;
return result;
}
static Block1Data* block1_data_ref (Block1Data* _data1_) {
g_atomic_int_inc (&_data1_->_ref_count_);
return _data1_;
}
static void block1_data_unref (Block1Data* _data1_) {
if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
_g_object_unref0 (_data1_->self);
_g_free0 (_data1_->path);
g_slice_free (Block1Data, _data1_);
}
}
static void _lambda1_ (Block1Data* _data1_) {
DockManagerHelperDaemon * self;
GError * _inner_error_ = NULL;
self = _data1_->self;
dock_manager_daemon_interface_enable_helper ((DockManagerDaemonInterface*) self, _data1_->path, &_inner_error_);
if (_inner_error_ != NULL) {
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
}
static void __lambda1__gcallback (gpointer self) {
_lambda1_ (self);
}
static gboolean _lambda3_ (Block1Data* _data1_) {
DockManagerHelperDaemon * self;
gboolean result = FALSE;
self = _data1_->self;
dock_manager_helper_daemon_kill_helper (self, _data1_->path);
result = FALSE;
return result;
}
static gboolean __lambda3__gsource_func (gpointer self) {
gboolean result;
result = _lambda3_ (self);
return result;
}
static void _lambda2_ (Block1Data* _data1_) {
DockManagerHelperDaemon * self;
self = _data1_->self;
g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 1000, __lambda3__gsource_func, block1_data_ref (_data1_), block1_data_unref);
}
static void __lambda2__gcallback (gpointer self) {
_lambda2_ (self);
}
static void _lambda5_ (GPid pid, gint status, Block1Data* _data1_) {
DockManagerHelperDaemon * self;
gchar* _tmp0_ = NULL;
gchar* _tmp1_;
DockManagerHelperProcessInfo* _tmp2_ = NULL;
DockManagerHelperProcessInfo* hpi;
gboolean _tmp3_;
self = _data1_->self;
_tmp0_ = g_path_get_basename (_data1_->path);
_tmp1_ = _tmp0_;
g_debug ("dockmanager-daemon.vala:319: [%d] \"%s\" exitted", (gint) pid, _tmp1_);
_g_free0 (_tmp1_);
_tmp2_ = dock_manager_helper_daemon_update_helper (self, _data1_->path);
hpi = _tmp2_;
if ((*hpi).kill_timer_id != 0) {
g_source_remove ((*hpi).kill_timer_id);
}
(*hpi).pid = 0;
(*hpi).kill_timer_id = (guint) 0;
g_spawn_close_pid (pid);
_tmp3_ = dock_manager_helper_daemon_is_helper_enabled (self, _data1_->path);
g_signal_emit_by_name ((DockManagerDaemonInterface*) self, "helper-state-changed", _data1_->path, _tmp3_, FALSE);
}
static void __lambda5__gchild_watch_func (GPid pid, gint status, gpointer self) {
_lambda5_ (pid, status, self);
}
static void dock_manager_helper_daemon_real_enable_helper (DockManagerDaemonInterface* base, const gchar* path, GError** error) {
DockManagerHelperDaemon * self;
Block1Data* _data1_;
GPid child_pid;
gchar** argv = NULL;
gint argv_length1 = 0;
gint _argv_size_ = 0;
gint _tmp0_;
gboolean _tmp1_;
gchar* _tmp3_ = NULL;
gchar* dbus_name;
gchar** _tmp12_ = NULL;
gint _tmp13_;
GSpawnFlags flags;
GPid _tmp14_;
DockManagerHelperProcessInfo* _tmp16_ = NULL;
DockManagerHelperProcessInfo* hpi;
GError * _inner_error_ = NULL;
self = (DockManagerHelperDaemon*) base;
g_return_if_fail (path != NULL);
_data1_ = g_slice_new0 (Block1Data);
_data1_->_ref_count_ = 1;
_data1_->self = g_object_ref (self);
_data1_->path = g_strdup (path);
child_pid = (GPid) 0;
_tmp0_ = dock_manager_helper_daemon_get_helper_pid (self, _data1_->path);
if (_tmp0_ != 0) {
argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
block1_data_unref (_data1_);
_data1_ = NULL;
return;
}
_tmp1_ = dock_manager_helper_daemon_is_helper_enabled (self, _data1_->path);
if (!_tmp1_) {
GValue _tmp2_ = {0};
GValue p;
g_value_init (&_tmp2_, G_TYPE_STRING);
g_value_set_string (&_tmp2_, _data1_->path);
p = _tmp2_;
g_value_array_append (self->priv->_helper_list, &p);
g_object_notify ((GObject*) self, "helper-list");
G_IS_VALUE (&p) ? (g_value_unset (&p), NULL) : NULL;
}
if (!self->priv->dock_running) {
g_signal_emit_by_name ((DockManagerDaemonInterface*) self, "helper-state-changed", _data1_->path, TRUE, FALSE);
argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
block1_data_unref (_data1_);
_data1_ = NULL;
return;
}
_tmp3_ = dock_manager_helper_daemon_get_helper_dbus_name (self, _data1_->path);
dbus_name = _tmp3_;
if (dbus_name != NULL) {
DockManagerHelperProcessInfo* _tmp4_ = NULL;
DockManagerHelperProcessInfo* hpi;
gboolean _tmp11_;
_tmp4_ = dock_manager_helper_daemon_update_helper (self, _data1_->path);
hpi = _tmp4_;
if ((*hpi).dbus_appear_id == 0) {
gchar* _tmp5_ = NULL;
gchar* _tmp6_;
gulong _tmp7_;
_tmp5_ = g_strdup_printf ("name-appeared::%s", dbus_name);
_tmp6_ = _tmp5_;
_tmp7_ = g_signal_connect_data (self->priv->watcher, _tmp6_, __lambda1__gcallback, block1_data_ref (_data1_), block1_data_unref, G_CONNECT_SWAPPED);
(*hpi).dbus_appear_id = _tmp7_;
_g_free0 (_tmp6_);
}
if ((*hpi).dbus_disappear_id == 0) {
gchar* _tmp8_ = NULL;
gchar* _tmp9_;
gulong _tmp10_;
_tmp8_ = g_strdup_printf ("name-disappeared::%s", dbus_name);
_tmp9_ = _tmp8_;
_tmp10_ = g_signal_connect_data (self->priv->watcher, _tmp9_, __lambda2__gcallback, block1_data_ref (_data1_), block1_data_unref, G_CONNECT_SWAPPED);
(*hpi).dbus_disappear_id = _tmp10_;
_g_free0 (_tmp9_);
}
_tmp11_ = dock_manager_dbus_watcher_name_has_owner (self->priv->watcher, dbus_name);
if (!_tmp11_) {
g_signal_emit_by_name ((DockManagerDaemonInterface*) self, "helper-state-changed", _data1_->path, TRUE, FALSE);
_g_free0 (dbus_name);
argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
block1_data_unref (_data1_);
_data1_ = NULL;
return;
}
}
g_shell_parse_argv (_data1_->path, &_tmp13_, &_tmp12_, &_inner_error_);
argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
argv = _tmp12_;
argv_length1 = _tmp13_;
if (_inner_error_ != NULL) {
goto __catch7_g_error;
}
flags = G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH;
g_spawn_async (NULL, argv, NULL, flags, NULL, NULL, &_tmp14_, &_inner_error_);
child_pid = _tmp14_;
if (_inner_error_ != NULL) {
goto __catch7_g_error;
}
g_child_watch_add_full (G_PRIORITY_DEFAULT, child_pid, __lambda5__gchild_watch_func, block1_data_ref (_data1_), block1_data_unref);
g_debug ("dockmanager-daemon.vala:331: Spawned \"%s\" [%d]", _data1_->path, (gint) child_pid);
goto __finally7;
__catch7_g_error:
{
GError * err;
GError* _tmp15_ = NULL;
err = _inner_error_;
_inner_error_ = NULL;
g_warning ("dockmanager-daemon.vala:335: %s", err->message);
_tmp15_ = g_error_new_literal (DBUS_GERROR, DBUS_GERROR_SPAWN_FAILED, err->message);
_inner_error_ = _tmp15_;
_g_error_free0 (err);
goto __finally7;
}
__finally7:
if (_inner_error_ != NULL) {
if (_inner_error_->domain == DBUS_GERROR) {
g_propagate_error (error, _inner_error_);
_g_free0 (dbus_name);
argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
block1_data_unref (_data1_);
_data1_ = NULL;
return;
} else {
_g_free0 (dbus_name);
argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
block1_data_unref (_data1_);
_data1_ = NULL;
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
}
_tmp16_ = dock_manager_helper_daemon_update_helper (self, _data1_->path);
hpi = _tmp16_;
(*hpi).pid = (gint) child_pid;
g_signal_emit_by_name ((DockManagerDaemonInterface*) self, "helper-state-changed", _data1_->path, TRUE, child_pid != 0);
_g_free0 (dbus_name);
argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
block1_data_unref (_data1_);
_data1_ = NULL;
}
static gpointer _dock_manager_helper_process_info_dup0 (gpointer self) {
return self ? dock_manager_helper_process_info_dup (self) : NULL;
}
static DockManagerHelperProcessInfo* dock_manager_helper_daemon_update_helper (DockManagerHelperDaemon* self, const gchar* path) {
DockManagerHelperProcessInfo* result = NULL;
gconstpointer _tmp0_ = NULL;
DockManagerHelperProcessInfo* hpi;
g_return_val_if_fail (self != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
_tmp0_ = g_hash_table_lookup (self->priv->helper_process_info, path);
hpi = (DockManagerHelperProcessInfo*) _tmp0_;
if (hpi != NULL) {
result = hpi;
return result;
} else {
DockManagerHelperProcessInfo pi = {0};
gchar* _tmp1_;
DockManagerHelperProcessInfo* _tmp2_;
gconstpointer _tmp3_ = NULL;
memset (&pi, 0, sizeof (DockManagerHelperProcessInfo));
pi.pid = 0;
pi.kill_timer_id = (guint) 0;
pi.dbus_appear_id = (gulong) 0;
pi.dbus_disappear_id = (gulong) 0;
_tmp1_ = g_strdup (path);
_tmp2_ = _dock_manager_helper_process_info_dup0 (&pi);
g_hash_table_insert (self->priv->helper_process_info, _tmp1_, _tmp2_);
_tmp3_ = g_hash_table_lookup (self->priv->helper_process_info, path);
result = (DockManagerHelperProcessInfo*) _tmp3_;
return result;
}
}
static void dock_manager_helper_daemon_real_disable_helper (DockManagerDaemonInterface* base, const gchar* path, GError** error) {
DockManagerHelperDaemon * self;
gboolean _tmp0_;
GValueArray* _tmp1_ = NULL;
GValueArray* enabled_helpers;
DockManagerHelperProcessInfo* _tmp4_ = NULL;
DockManagerHelperProcessInfo* hpi;
gint _tmp5_;
self = (DockManagerHelperDaemon*) base;
g_return_if_fail (path != NULL);
_tmp0_ = dock_manager_helper_daemon_is_helper_enabled (self, path);
if (!_tmp0_) {
return;
}
_tmp1_ = g_value_array_new ((guint) 4);
enabled_helpers = _tmp1_;
{
GValueArray* v_collection;
guint v_index;
v_collection = self->priv->_helper_list;
for (v_index = 0; v_index < v_collection->n_values; v_index = v_index + 1) {
GValue _tmp2_ = {0};
GValue v;
v = G_IS_VALUE (g_value_array_get_nth (v_collection, v_index)) ? (g_value_init (&_tmp2_, G_VALUE_TYPE (g_value_array_get_nth (v_collection, v_index))), g_value_copy (g_value_array_get_nth (v_collection, v_index), &_tmp2_), _tmp2_) : (*g_value_array_get_nth (v_collection, v_index));
{
const gchar* _tmp3_ = NULL;
_tmp3_ = g_value_get_string (&v);
if (g_strcmp0 (_tmp3_, path) != 0) {
g_value_array_append (enabled_helpers, &v);
}
G_IS_VALUE (&v) ? (g_value_unset (&v), NULL) : NULL;
}
}
}
dock_manager_helper_daemon_set_helper_list (self, enabled_helpers);
_tmp4_ = dock_manager_helper_daemon_update_helper (self, path);
hpi = _tmp4_;
if ((*hpi).dbus_appear_id != 0) {
g_signal_handler_disconnect (self->priv->watcher, (*hpi).dbus_appear_id);
(*hpi).dbus_appear_id = (gulong) 0;
}
if ((*hpi).dbus_disappear_id != 0) {
g_signal_handler_disconnect (self->priv->watcher, (*hpi).dbus_disappear_id);
(*hpi).dbus_disappear_id = (gulong) 0;
}
if ((*hpi).pid == 0) {
g_signal_emit_by_name ((DockManagerDaemonInterface*) self, "helper-state-changed", path, FALSE, FALSE);
_g_value_array_free0 (enabled_helpers);
return;
}
dock_manager_helper_daemon_kill_helper (self, path);
_tmp5_ = dock_manager_helper_daemon_get_helper_pid (self, path);
g_signal_emit_by_name ((DockManagerDaemonInterface*) self, "helper-state-changed", path, FALSE, _tmp5_ != 0);
_g_value_array_free0 (enabled_helpers);
}
static Block2Data* block2_data_ref (Block2Data* _data2_) {
g_atomic_int_inc (&_data2_->_ref_count_);
return _data2_;
}
static void block2_data_unref (Block2Data* _data2_) {
if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
_g_object_unref0 (_data2_->self);
g_slice_free (Block2Data, _data2_);
}
}
static gboolean _lambda4_ (Block2Data* _data2_) {
DockManagerHelperDaemon * self;
gboolean result = FALSE;
self = _data2_->self;
if ((*_data2_->hpi).pid != 0) {
g_debug ("dockmanager-daemon.vala:413: Sending SIGKILL to %d", (*_data2_->hpi).pid);
kill ((pid_t) (*_data2_->hpi).pid, SIGKILL);
}
(*_data2_->hpi).kill_timer_id = (guint) 0;
result = FALSE;
return result;
}
static gboolean __lambda4__gsource_func (gpointer self) {
gboolean result;
result = _lambda4_ (self);
return result;
}
static void dock_manager_helper_daemon_kill_helper (DockManagerHelperDaemon* self, const gchar* path) {
Block2Data* _data2_;
DockManagerHelperProcessInfo* _tmp0_ = NULL;
g_return_if_fail (self != NULL);
g_return_if_fail (path != NULL);
_data2_ = g_slice_new0 (Block2Data);
_data2_->_ref_count_ = 1;
_data2_->self = g_object_ref (self);
_tmp0_ = dock_manager_helper_daemon_update_helper (self, path);
_data2_->hpi = _tmp0_;
if ((*_data2_->hpi).pid == 0) {
block2_data_unref (_data2_);
_data2_ = NULL;
return;
}
g_debug ("dockmanager-daemon.vala:404: Sending SIGTERM to %d", (*_data2_->hpi).pid);
kill ((pid_t) (*_data2_->hpi).pid, SIGTERM);
if ((*_data2_->hpi).kill_timer_id == 0) {
guint _tmp1_;
_tmp1_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 2000, __lambda4__gsource_func, block2_data_ref (_data2_), block2_data_unref);
(*_data2_->hpi).kill_timer_id = _tmp1_;
}
block2_data_unref (_data2_);
_data2_ = NULL;
}
static void dock_manager_helper_daemon_kill_all (DockManagerHelperDaemon* self) {
GList* _tmp0_ = NULL;
g_return_if_fail (self != NULL);
_tmp0_ = g_hash_table_get_keys (self->priv->helper_process_info);
{
GList* path_collection;
GList* path_it;
path_collection = _tmp0_;
for (path_it = path_collection; path_it != NULL; path_it = path_it->next) {
const gchar* path;
path = (const gchar*) path_it->data;
{
dock_manager_helper_daemon_kill_helper (self, path);
}
}
_g_list_free0 (path_collection);
}
}
static void dock_manager_helper_daemon_real_install_helper_data_free (gpointer _data) {
DockManagerHelperDaemonInstallHelperData* data;
data = _data;
_g_free0 (data->filename);
_g_object_unref0 (data->self);
g_slice_free (DockManagerHelperDaemonInstallHelperData, data);
}
static void dock_manager_helper_daemon_real_install_helper (DockManagerDaemonInterface* base, const gchar* filename, GAsyncReadyCallback _callback_, gpointer _user_data_) {
DockManagerHelperDaemon * self;
DockManagerHelperDaemonInstallHelperData* _data_;
self = (DockManagerHelperDaemon*) base;
_data_ = g_slice_new0 (DockManagerHelperDaemonInstallHelperData);
_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, dock_manager_helper_daemon_real_install_helper);
g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, dock_manager_helper_daemon_real_install_helper_data_free);
_data_->self = _g_object_ref0 (self);
_data_->filename = g_strdup (filename);
dock_manager_helper_daemon_real_install_helper_co (_data_);
}
static gboolean dock_manager_helper_daemon_real_install_helper_finish (DockManagerDaemonInterface* base, GAsyncResult* _res_, GError** error) {
gboolean result;
DockManagerHelperDaemonInstallHelperData* _data_;
if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
return FALSE;
}
_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
result = _data_->result;
return result;
}
static Block3Data* block3_data_ref (Block3Data* _data3_) {
g_atomic_int_inc (&_data3_->_ref_count_);
return _data3_;
}
static void block3_data_unref (Block3Data* _data3_) {
if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
_g_object_unref0 (_data3_->self);
g_slice_free (Block3Data, _data3_);
}
}
static Block4Data* block4_data_ref (Block4Data* _data4_) {
g_atomic_int_inc (&_data4_->_ref_count_);
return _data4_;
}
static void block4_data_unref (Block4Data* _data4_) {
if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
block3_data_unref (_data4_->_data3_);
_data4_->_data3_ = NULL;
_g_regex_unref0 (_data4_->re);
g_slice_free (Block4Data, _data4_);
}
}
static gboolean _lambda7_ (GIOChannel* src, GIOCondition cond, Block4Data* _data4_) {
Block3Data* _data3_;
DockManagerHelperDaemon * self;
gboolean result = FALSE;
GIOStatus io_status;
GError * _inner_error_ = NULL;
_data3_ = _data4_->_data3_;
self = _data3_->self;
g_return_val_if_fail (src != NULL, FALSE);
io_status = G_IO_STATUS_NORMAL;
while (TRUE) {
gboolean _tmp0_ = FALSE;
gchar* line;
gchar* _tmp1_ = NULL;
GIOStatus _tmp2_;
GIOStatus _tmp3_;
if (io_status == G_IO_STATUS_NORMAL) {
_tmp0_ = !_data4_->metadata_file_found;
} else {
_tmp0_ = FALSE;
}
if (!_tmp0_) {
break;
}
line = NULL;
_tmp2_ = g_io_channel_read_line (src, &_tmp1_, NULL, NULL, &_inner_error_);
_g_free0 (line);
line = _tmp1_;
_tmp3_ = _tmp2_;
if (_inner_error_ != NULL) {
_g_free0 (line);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return FALSE;
}
io_status = _tmp3_;
if (line != NULL) {
gboolean _tmp4_;
_tmp4_ = g_regex_match (_data4_->re, line, 0, NULL);
_data4_->metadata_file_found = _tmp4_;
}
_g_free0 (line);
}
}
static gboolean __lambda7__gio_func (GIOChannel* source, GIOCondition condition, gpointer self) {
gboolean result;
result = _lambda7_ (source, condition, self);
return result;
}
static void _lambda8_ (GPid p, gint status, Block4Data* _data4_) {
Block3Data* _data3_;
DockManagerHelperDaemon * self;
_data3_ = _data4_->_data3_;
self = _data3_->self;
dock_manager_helper_daemon_real_install_helper_co (_data3_->_async_data_);
}
static void __lambda8__gchild_watch_func (GPid pid, gint status, gpointer self) {
_lambda8_ (pid, status, self);
}
static Block5Data* block5_data_ref (Block5Data* _data5_) {
g_atomic_int_inc (&_data5_->_ref_count_);
return _data5_;
}
static void block5_data_unref (Block5Data* _data5_) {
if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
block3_data_unref (_data5_->_data3_);
_data5_->_data3_ = NULL;
g_slice_free (Block5Data, _data5_);
}
}
static void _lambda9_ (GPid p, gint status, Block5Data* _data5_) {
Block3Data* _data3_;
DockManagerHelperDaemon * self;
_data3_ = _data5_->_data3_;
self = _data3_->self;
_data5_->untar_status = status;
dock_manager_helper_daemon_real_install_helper_co (_data3_->_async_data_);
}
static void __lambda9__gchild_watch_func (GPid pid, gint status, gpointer self) {
_lambda9_ (pid, status, self);
}
static gboolean dock_manager_helper_daemon_real_install_helper_co (DockManagerHelperDaemonInstallHelperData* data) {
switch (data->_state_) {
case 0:
goto _state_0;
case 1:
goto _state_1;
case 2:
goto _state_2;
default:
g_assert_not_reached ();
}
_state_0:
data->_data3_ = g_slice_new0 (Block3Data);
data->_data3_->_ref_count_ = 1;
data->_data3_->self = g_object_ref (data->self);
data->_data3_->_async_data_ = data;
g_debug ("dockmanager-daemon.vala:432: Trying to install %s", data->filename);
data->argv_length1 = 0;
data->_argv_size_ = 0;
data->_data4_ = g_slice_new0 (Block4Data);
data->_data4_->_ref_count_ = 1;
data->_data4_->_data3_ = block3_data_ref (data->_data3_);
data->_data4_->metadata_file_found = FALSE;
data->_tmp0_ = NULL;
data->_tmp0_ = g_strdup_printf ("tar -t -f \"%s\"", data->filename);
data->tar_command = data->_tmp0_;
data->_tmp1_ = NULL;
g_shell_parse_argv (data->tar_command, &data->_tmp2_, &data->_tmp1_, &data->_inner_error_);
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
data->argv = data->_tmp1_;
data->argv_length1 = data->_tmp2_;
if (data->_inner_error_ != NULL) {
_g_free0 (data->tar_command);
block4_data_unref (data->_data4_);
data->_data4_ = NULL;
goto __catch8_g_error;
}
g_spawn_async_with_pipes (NULL, data->argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &data->_tmp3_, NULL, &data->_tmp4_, NULL, &data->_inner_error_);
data->pid = data->_tmp3_;
data->standard_output = data->_tmp4_;
if (data->_inner_error_ != NULL) {
_g_free0 (data->tar_command);
block4_data_unref (data->_data4_);
data->_data4_ = NULL;
goto __catch8_g_error;
}
data->_tmp5_ = NULL;
data->_tmp5_ = g_regex_new ("^metadata/.*info$", G_REGEX_OPTIMIZE, 0, &data->_inner_error_);
data->_data4_->re = data->_tmp5_;
if (data->_inner_error_ != NULL) {
_g_free0 (data->tar_command);
block4_data_unref (data->_data4_);
data->_data4_ = NULL;
goto __catch8_g_error;
}
data->_tmp6_ = NULL;
data->_tmp6_ = g_io_channel_unix_new (data->standard_output);
data->chan = data->_tmp6_;
data->_tmp7_ = g_io_add_watch (data->chan, G_IO_IN | G_IO_HUP, __lambda7__gio_func, data->_data4_);
data->src_id = data->_tmp7_;
g_child_watch_add_full (G_PRIORITY_DEFAULT_IDLE, data->pid, __lambda8__gchild_watch_func, block4_data_ref (data->_data4_), block4_data_unref);
data->_state_ = 1;
return FALSE;
_state_1:
;
g_source_remove (data->src_id);
if (!data->_data4_->metadata_file_found) {
g_warning ("dockmanager-daemon.vala:476: Helper installation failed: %s", "No metadata file found!");
data->result = FALSE;
_g_io_channel_unref0 (data->chan);
_g_free0 (data->tar_command);
block4_data_unref (data->_data4_);
data->_data4_ = NULL;
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
block3_data_unref (data->_data3_);
data->_data3_ = NULL;
if (data->_state_ == 0) {
g_simple_async_result_complete_in_idle (data->_async_result);
} else {
g_simple_async_result_complete (data->_async_result);
}
g_object_unref (data->_async_result);
return FALSE;
}
_g_io_channel_unref0 (data->chan);
_g_free0 (data->tar_command);
block4_data_unref (data->_data4_);
data->_data4_ = NULL;
goto __finally8;
__catch8_g_error:
{
data->err = data->_inner_error_;
data->_inner_error_ = NULL;
g_warning ("dockmanager-daemon.vala:482: Helper installation failed: %s", data->err->message);
data->result = FALSE;
_g_error_free0 (data->err);
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
block3_data_unref (data->_data3_);
data->_data3_ = NULL;
if (data->_state_ == 0) {
g_simple_async_result_complete_in_idle (data->_async_result);
} else {
g_simple_async_result_complete (data->_async_result);
}
g_object_unref (data->_async_result);
return FALSE;
}
__finally8:
if (data->_inner_error_ != NULL) {
if (data->_inner_error_->domain == DBUS_GERROR) {
g_simple_async_result_set_from_error (data->_async_result, data->_inner_error_);
g_error_free (data->_inner_error_);
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
block3_data_unref (data->_data3_);
data->_data3_ = NULL;
if (data->_state_ == 0) {
g_simple_async_result_complete_in_idle (data->_async_result);
} else {
g_simple_async_result_complete (data->_async_result);
}
g_object_unref (data->_async_result);
return FALSE;
} else {
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
block3_data_unref (data->_data3_);
data->_data3_ = NULL;
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code);
g_clear_error (&data->_inner_error_);
return FALSE;
}
}
data->_data5_ = g_slice_new0 (Block5Data);
data->_data5_->_ref_count_ = 1;
data->_data5_->_data3_ = block3_data_ref (data->_data3_);
data->_tmp8_ = NULL;
data->_tmp8_ = g_get_user_data_dir ();
data->_tmp9_ = g_strconcat (data->_tmp8_, "/dockmanager", NULL);
data->_tmp10_ = NULL;
data->_tmp10_ = g_strdup_printf ("tar -C \"%s\" -x -f \"%s\"", data->_tmp9_, data->filename);
data->extract_command = (data->_tmp11_ = data->_tmp10_, _g_free0 (data->_tmp9_), data->_tmp11_);
data->_tmp12_ = NULL;
g_shell_parse_argv (data->extract_command, &data->_tmp13_, &data->_tmp12_, &data->_inner_error_);
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
data->argv = data->_tmp12_;
data->argv_length1 = data->_tmp13_;
if (data->_inner_error_ != NULL) {
_g_free0 (data->extract_command);
block5_data_unref (data->_data5_);
data->_data5_ = NULL;
goto __catch9_g_error;
}
g_spawn_async (NULL, data->argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &data->_tmp14_, &data->_inner_error_);
data->pid = data->_tmp14_;
if (data->_inner_error_ != NULL) {
_g_free0 (data->extract_command);
block5_data_unref (data->_data5_);
data->_data5_ = NULL;
goto __catch9_g_error;
}
data->_data5_->untar_status = 0;
g_child_watch_add_full (G_PRIORITY_DEFAULT_IDLE, data->pid, __lambda9__gchild_watch_func, block5_data_ref (data->_data5_), block5_data_unref);
data->_state_ = 2;
return FALSE;
_state_2:
;
if (data->_data5_->untar_status == 0) {
data->result = TRUE;
_g_free0 (data->extract_command);
block5_data_unref (data->_data5_);
data->_data5_ = NULL;
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
block3_data_unref (data->_data3_);
data->_data3_ = NULL;
if (data->_state_ == 0) {
g_simple_async_result_complete_in_idle (data->_async_result);
} else {
g_simple_async_result_complete (data->_async_result);
}
g_object_unref (data->_async_result);
return FALSE;
} else {
g_warning ("dockmanager-daemon.vala:516: Helper installation failed: tar returned " \
"errorcode %d!", data->_data5_->untar_status);
}
_g_free0 (data->extract_command);
block5_data_unref (data->_data5_);
data->_data5_ = NULL;
goto __finally9;
__catch9_g_error:
{
data->err2 = data->_inner_error_;
data->_inner_error_ = NULL;
g_warning ("dockmanager-daemon.vala:521: Helper installation failed: %s", data->err2->message);
data->result = FALSE;
_g_error_free0 (data->err2);
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
block3_data_unref (data->_data3_);
data->_data3_ = NULL;
if (data->_state_ == 0) {
g_simple_async_result_complete_in_idle (data->_async_result);
} else {
g_simple_async_result_complete (data->_async_result);
}
g_object_unref (data->_async_result);
return FALSE;
}
__finally9:
if (data->_inner_error_ != NULL) {
if (data->_inner_error_->domain == DBUS_GERROR) {
g_simple_async_result_set_from_error (data->_async_result, data->_inner_error_);
g_error_free (data->_inner_error_);
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
block3_data_unref (data->_data3_);
data->_data3_ = NULL;
if (data->_state_ == 0) {
g_simple_async_result_complete_in_idle (data->_async_result);
} else {
g_simple_async_result_complete (data->_async_result);
}
g_object_unref (data->_async_result);
return FALSE;
} else {
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
block3_data_unref (data->_data3_);
data->_data3_ = NULL;
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code);
g_clear_error (&data->_inner_error_);
return FALSE;
}
}
data->result = FALSE;
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
block3_data_unref (data->_data3_);
data->_data3_ = NULL;
if (data->_state_ == 0) {
g_simple_async_result_complete_in_idle (data->_async_result);
} else {
g_simple_async_result_complete (data->_async_result);
}
g_object_unref (data->_async_result);
return FALSE;
data->argv = (_vala_array_free (data->argv, data->argv_length1, (GDestroyNotify) g_free), NULL);
block3_data_unref (data->_data3_);
data->_data3_ = NULL;
if (data->_state_ == 0) {
g_simple_async_result_complete_in_idle (data->_async_result);
} else {
g_simple_async_result_complete (data->_async_result);
}
g_object_unref (data->_async_result);
return FALSE;
}
static void dock_manager_helper_daemon_real_show_preferences (DockManagerDaemonInterface* base, GError** error) {
DockManagerHelperDaemon * self;
GError * _inner_error_ = NULL;
self = (DockManagerHelperDaemon*) base;
g_spawn_command_line_async ("dockmanager-settings", &_inner_error_);
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_SPAWN_ERROR) {
goto __catch10_g_spawn_error;
}
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
goto __finally10;
__catch10_g_spawn_error:
{
GError * err;
GError* _tmp0_ = NULL;
err = _inner_error_;
_inner_error_ = NULL;
g_warning ("dockmanager-daemon.vala:536: %s", err->message);
_tmp0_ = g_error_new_literal (DBUS_GERROR, DBUS_GERROR_SPAWN_FAILED, err->message);
_inner_error_ = _tmp0_;
_g_error_free0 (err);
goto __finally10;
}
__finally10:
if (_inner_error_ != NULL) {
if (_inner_error_->domain == DBUS_GERROR) {
g_propagate_error (error, _inner_error_);
return;
} else {
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
}
}
static void dock_manager_helper_daemon_real_embed_preferences (DockManagerDaemonInterface* base, gint64 xid, GHashTable* hints, GError** error) {
DockManagerHelperDaemon * self;
gchar* _tmp0_ = NULL;
gchar* command;
const gchar* key = NULL;
GValue* val = NULL;
GHashTableIter iter = {0};
GError * _inner_error_ = NULL;
self = (DockManagerHelperDaemon*) base;
g_return_if_fail (hints != NULL);
_tmp0_ = g_strdup_printf ("dockmanager-settings -x %lld", xid);
command = _tmp0_;
g_hash_table_iter_init (&iter, hints);
while (TRUE) {
gconstpointer _tmp1_ = NULL;
gconstpointer _tmp2_ = NULL;
gboolean _tmp3_;
_tmp3_ = g_hash_table_iter_next (&iter, &_tmp1_, &_tmp2_);
key = _tmp1_;
val = _tmp2_;
if (!_tmp3_) {
break;
}
if (g_strcmp0 (key, "no-install") == 0) {
gchar* _tmp4_ = NULL;
gchar* _tmp5_;
_tmp4_ = g_strjoin (" ", command, "--no-install", NULL, NULL);
_tmp5_ = _tmp4_;
_g_free0 (command);
command = _tmp5_;
}
}
g_spawn_command_line_async (command, &_inner_error_);
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_SPAWN_ERROR) {
goto __catch11_g_spawn_error;
}
_g_free0 (command);
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
goto __finally11;
__catch11_g_spawn_error:
{
GError * err;
GError* _tmp6_ = NULL;
err = _inner_error_;
_inner_error_ = NULL;
g_warning ("dockmanager-daemon.vala:564: %s", err->message);
_tmp6_ = g_error_new_literal (DBUS_GERROR, DBUS_GERROR_SPAWN_FAILED, err->message);
_inner_error_ = _tmp6_;
_g_error_free0 (err);
goto __finally11;
}
__finally11:
if (_inner_error_ != NULL) {
if (_inner_error_->domain == DBUS_GERROR) {
g_propagate_error (error, _inner_error_);
_g_free0 (command);
return;
} else {
_g_free0 (command);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
}
_g_free0 (command);
}
static void _vala_DockManagerHelperInfo_array_free (DockManagerHelperInfo* array, gint array_length) {
if (array != NULL) {
int i;
for (i = 0; i < array_length; i = i + 1) {
dock_manager_helper_info_destroy (&array[i]);
}
}
g_free (array);
}
static DockManagerHelperInfo* dock_manager_helper_daemon_real_get_all_helpers (DockManagerDaemonInterface* base, int* result_length1, GError** error) {
DockManagerHelperDaemon * self;
DockManagerHelperInfo* result = NULL;
gint i;
guint _tmp0_;
DockManagerHelperInfo* _tmp1_ = NULL;
DockManagerHelperInfo* helpers;
gint helpers_length1;
gint _helpers_size_;
DockManagerHelperInfo* _tmp21_;
self = (DockManagerHelperDaemon*) base;
i = 0;
_tmp0_ = g_list_length (self->priv->all_scripts);
_tmp1_ = g_new0 (DockManagerHelperInfo, _tmp0_);
helpers = _tmp1_;
helpers_length1 = _tmp0_;
_helpers_size_ = _tmp0_;
{
GList* hi_collection;
GList* hi_it;
hi_collection = self->priv->all_scripts;
for (hi_it = hi_collection; hi_it != NULL; hi_it = hi_it->next) {
DockManagerHelperInfo hi;
hi = *((DockManagerHelperInfo*) hi_it->data);
{
gchar* _tmp2_;
gchar* _tmp3_;
const gchar* _tmp4_ = NULL;
gchar* _tmp5_;
gchar* _tmp6_;
const gchar* _tmp7_ = NULL;
gchar* _tmp8_;
gchar* _tmp9_;
const gchar* _tmp10_ = NULL;
gchar* _tmp11_;
gchar* _tmp12_;
const gchar* _tmp13_ = NULL;
gchar* _tmp14_;
gchar* _tmp15_;
gboolean _tmp16_;
gint _tmp17_;
const gchar* _tmp18_ = NULL;
gchar* _tmp19_;
gchar* _tmp20_;
_tmp2_ = g_strdup (hi.path);
_tmp3_ = _tmp2_;
_g_free0 (helpers[i].path);
helpers[i].path = _tmp3_;
if (hi.name != NULL) {
_tmp4_ = hi.name;
} else {
_tmp4_ = "";
}
_tmp5_ = g_strdup (_tmp4_);
_tmp6_ = _tmp5_;
_g_free0 (helpers[i].name);
helpers[i].name = _tmp6_;
if (hi.description != NULL) {
_tmp7_ = hi.description;
} else {
_tmp7_ = "";
}
_tmp8_ = g_strdup (_tmp7_);
_tmp9_ = _tmp8_;
_g_free0 (helpers[i].description);
helpers[i].description = _tmp9_;
if (hi.icon_name != NULL) {
_tmp10_ = hi.icon_name;
} else {
_tmp10_ = "";
}
_tmp11_ = g_strdup (_tmp10_);
_tmp12_ = _tmp11_;
_g_free0 (helpers[i].icon_name);
helpers[i].icon_name = _tmp12_;
if (hi.app_name != NULL) {
_tmp13_ = hi.app_name;
} else {
_tmp13_ = "";
}
_tmp14_ = g_strdup (_tmp13_);
_tmp15_ = _tmp14_;
_g_free0 (helpers[i].app_name);
helpers[i].app_name = _tmp15_;
helpers[i].app_available = hi.app_available;
_tmp16_ = dock_manager_helper_daemon_is_helper_enabled (self, hi.path);
helpers[i].enabled = _tmp16_;
_tmp17_ = dock_manager_helper_daemon_get_helper_pid (self, hi.path);
helpers[i].running = _tmp17_ != 0;
if (hi.dbus_name != NULL) {
_tmp18_ = hi.dbus_name;
} else {
_tmp18_ = "";
}
_tmp19_ = g_strdup (_tmp18_);
_tmp20_ = _tmp19_;
_g_free0 (helpers[i].dbus_name);
helpers[i].dbus_name = _tmp20_;
i++;
}
}
}
_tmp21_ = helpers;
*result_length1 = helpers_length1;
result = _tmp21_;
return result;
}
static void dock_manager_helper_daemon_real_restart_all (DockManagerDaemonInterface* base, GError** error) {
DockManagerHelperDaemon * self;
self = (DockManagerHelperDaemon*) base;
}
gint dock_manager_helper_daemon_main (gchar** argv, int argv_length1) {
gint result = 0;
DockManagerHelperDaemon* _tmp0_ = NULL;
DockManagerHelperDaemon* daemon;
GError * _inner_error_ = NULL;
desktop_agnostic_vfs_init (&_inner_error_);
if (_inner_error_ != NULL) {
goto __catch12_g_error;
}
_tmp0_ = dock_manager_helper_daemon_new ();
daemon = _tmp0_;
dock_manager_helper_daemon_run (daemon);
desktop_agnostic_vfs_shutdown (&_inner_error_);
if (_inner_error_ != NULL) {
_g_object_unref0 (daemon);
goto __catch12_g_error;
}
_g_object_unref0 (daemon);
goto __finally12;
__catch12_g_error:
{
GError * err;
err = _inner_error_;
_inner_error_ = NULL;
g_warning ("dockmanager-daemon.vala:610: %s", err->message);
_g_error_free0 (err);
}
__finally12:
if (_inner_error_ != NULL) {
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return 0;
}
result = 0;
return result;
}
int main (int argc, char ** argv) {
g_type_init ();
return dock_manager_helper_daemon_main (argv, argc);
}
GValueArray* dock_manager_helper_daemon_get_helper_list (DockManagerHelperDaemon* self) {
GValueArray* result;
g_return_val_if_fail (self != NULL, NULL);
result = self->priv->_helper_list;
return result;
}
void dock_manager_helper_daemon_set_helper_list (DockManagerHelperDaemon* self, GValueArray* value) {
GValueArray* _tmp0_ = NULL;
GValueArray* _tmp1_;
g_return_if_fail (self != NULL);
_tmp0_ = g_value_array_copy (value);
_tmp1_ = _tmp0_;
_g_value_array_free0 (self->priv->_helper_list);
self->priv->_helper_list = _tmp1_;
g_object_notify ((GObject *) self, "helper-list");
}
static void dock_manager_helper_daemon_class_init (DockManagerHelperDaemonClass * klass) {
dock_manager_helper_daemon_parent_class = g_type_class_peek_parent (klass);
g_type_class_add_private (klass, sizeof (DockManagerHelperDaemonPrivate));
G_OBJECT_CLASS (klass)->constructed = dock_manager_helper_daemon_real_constructed;
G_OBJECT_CLASS (klass)->get_property = _vala_dock_manager_helper_daemon_get_property;
G_OBJECT_CLASS (klass)->set_property = _vala_dock_manager_helper_daemon_set_property;
G_OBJECT_CLASS (klass)->finalize = dock_manager_helper_daemon_finalize;
g_object_class_install_property (G_OBJECT_CLASS (klass), DOCK_MANAGER_HELPER_DAEMON_HELPER_LIST, g_param_spec_boxed ("helper-list", "helper-list", "helper-list", G_TYPE_VALUE_ARRAY, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}
static void dock_manager_helper_daemon_dock_manager_daemon_interface_interface_init (DockManagerDaemonInterfaceIface * iface) {
dock_manager_helper_daemon_dock_manager_daemon_interface_parent_iface = g_type_interface_peek_parent (iface);
iface->enable_helper = (void (*)(DockManagerDaemonInterface* ,const gchar* ,GError**)) dock_manager_helper_daemon_real_enable_helper;
iface->disable_helper = (void (*)(DockManagerDaemonInterface* ,const gchar* ,GError**)) dock_manager_helper_daemon_real_disable_helper;
iface->install_helper = (gboolean (*)(DockManagerDaemonInterface* ,const gchar* ,GError**)) dock_manager_helper_daemon_real_install_helper;
iface->install_helper_finish = dock_manager_helper_daemon_real_install_helper_finish;
iface->show_preferences = (void (*)(DockManagerDaemonInterface* ,GError**)) dock_manager_helper_daemon_real_show_preferences;
iface->embed_preferences = (void (*)(DockManagerDaemonInterface* ,gint64 ,GHashTable* ,GError**)) dock_manager_helper_daemon_real_embed_preferences;
iface->get_all_helpers = (DockManagerHelperInfo* (*)(DockManagerDaemonInterface* ,int* ,GError**)) dock_manager_helper_daemon_real_get_all_helpers;
iface->restart_all = (void (*)(DockManagerDaemonInterface* ,GError**)) dock_manager_helper_daemon_real_restart_all;
}
static void dock_manager_helper_daemon_instance_init (DockManagerHelperDaemon * self) {
GValueArray* _tmp0_ = NULL;
self->priv = DOCK_MANAGER_HELPER_DAEMON_GET_PRIVATE (self);
_tmp0_ = g_value_array_new ((guint) 4);
self->priv->_helper_list = _tmp0_;
}
static void dock_manager_helper_daemon_finalize (GObject* obj) {
DockManagerHelperDaemon * self;
self = DOCK_MANAGER_HELPER_DAEMON (obj);
_g_main_loop_unref0 (self->priv->main_loop);
_g_object_unref0 (self->priv->watcher);
_g_value_array_free0 (self->priv->_helper_list);
_g_hash_table_unref0 (self->priv->helper_process_info);
__g_list_free__dock_manager_helper_info_free0_0 (self->priv->all_scripts);
G_OBJECT_CLASS (dock_manager_helper_daemon_parent_class)->finalize (obj);
}
void _dock_manager_helper_daemon_dbus_unregister (DBusConnection* connection, void* _user_data_) {
}
static DBusHandlerResult _dbus_dock_manager_helper_daemon_introspect (DockManagerHelperDaemon* self, DBusConnection* connection, DBusMessage* message) {
DBusMessage* reply;
DBusMessageIter iter;
GString* xml_data;
char** children;
int i;
reply = dbus_message_new_method_return (message);
dbus_message_iter_init_append (reply, &iter);
xml_data = g_string_new ("\n");
g_string_append (xml_data, "\n\n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n");
dbus_connection_list_registered (connection, g_object_get_data ((GObject *) self, "dbus_object_path"), &children);
for (i = 0; children[i]; i++) {
g_string_append_printf (xml_data, "\n", children[i]);
}
dbus_free_string_array (children);
g_string_append (xml_data, "\n");
dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &xml_data->str);
g_string_free (xml_data, TRUE);
if (reply) {
dbus_connection_send (connection, reply, NULL);
dbus_message_unref (reply);
return DBUS_HANDLER_RESULT_HANDLED;
} else {
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
}
DBusHandlerResult dock_manager_helper_daemon_dbus_message (DBusConnection* connection, DBusMessage* message, void* object) {
DBusHandlerResult result;
result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
if (dbus_message_is_method_call (message, "org.freedesktop.DBus.Introspectable", "Introspect")) {
result = _dbus_dock_manager_helper_daemon_introspect (object, connection, message);
}
if (result == DBUS_HANDLER_RESULT_HANDLED) {
return result;
} else if (dock_manager_daemon_interface_dbus_message (connection, message, object) == DBUS_HANDLER_RESULT_HANDLED) {
return DBUS_HANDLER_RESULT_HANDLED;
} else {
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
}
void dock_manager_helper_daemon_dbus_register_object (DBusConnection* connection, const char* path, void* object) {
if (!g_object_get_data (object, "dbus_object_path")) {
g_object_set_data (object, "dbus_object_path", g_strdup (path));
dbus_connection_register_object_path (connection, path, &_dock_manager_helper_daemon_dbus_path_vtable, object);
g_object_weak_ref (object, _vala_dbus_unregister_object, connection);
}
dock_manager_daemon_interface_dbus_register_object (connection, path, object);
}
GType dock_manager_helper_daemon_get_type (void) {
static volatile gsize dock_manager_helper_daemon_type_id__volatile = 0;
if (g_once_init_enter (&dock_manager_helper_daemon_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (DockManagerHelperDaemonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dock_manager_helper_daemon_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DockManagerHelperDaemon), 0, (GInstanceInitFunc) dock_manager_helper_daemon_instance_init, NULL };
static const GInterfaceInfo dock_manager_daemon_interface_info = { (GInterfaceInitFunc) dock_manager_helper_daemon_dock_manager_daemon_interface_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
GType dock_manager_helper_daemon_type_id;
dock_manager_helper_daemon_type_id = g_type_register_static (G_TYPE_OBJECT, "DockManagerHelperDaemon", &g_define_type_info, 0);
g_type_add_interface_static (dock_manager_helper_daemon_type_id, DOCK_MANAGER_TYPE_DAEMON_INTERFACE, &dock_manager_daemon_interface_info);
g_type_set_qdata (dock_manager_helper_daemon_type_id, g_quark_from_static_string ("DBusObjectVTable"), (void*) (&_dock_manager_helper_daemon_dbus_vtable));
g_once_init_leave (&dock_manager_helper_daemon_type_id__volatile, dock_manager_helper_daemon_type_id);
}
return dock_manager_helper_daemon_type_id__volatile;
}
static void _vala_dock_manager_helper_daemon_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
DockManagerHelperDaemon * self;
self = DOCK_MANAGER_HELPER_DAEMON (object);
switch (property_id) {
case DOCK_MANAGER_HELPER_DAEMON_HELPER_LIST:
g_value_set_boxed (value, dock_manager_helper_daemon_get_helper_list (self));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void _vala_dock_manager_helper_daemon_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
DockManagerHelperDaemon * self;
self = DOCK_MANAGER_HELPER_DAEMON (object);
switch (property_id) {
case DOCK_MANAGER_HELPER_DAEMON_HELPER_LIST:
dock_manager_helper_daemon_set_helper_list (self, g_value_get_boxed (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
if ((array != NULL) && (destroy_func != NULL)) {
int i;
for (i = 0; i < array_length; i = i + 1) {
if (((gpointer*) array)[i] != NULL) {
destroy_func (((gpointer*) array)[i]);
}
}
}
}
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
_vala_array_destroy (array, array_length, destroy_func);
g_free (array);
}
dockmanager-0.1.0/daemon/PaxHeaders.13539/dockmanager-daemon.schema-ini.in 0000644 0001750 0001750 00000000124 11401236436 024342 x ustar 00 0000000 0000000 27 mtime=1275411742.449887
27 atime=1275411742.449887
30 ctime=1298497772.789548914
dockmanager-0.1.0/daemon/dockmanager-daemon.schema-ini.in 0000644 0001750 0001750 00000000323 11401236436 023256 0 ustar 00rico rico 0000000 0000000 # DockManager daemon configuration schema
# -------------------------------------------
# schema metadata
[DEFAULT/helper_list]
type=list-string
default=
description=List of active helpers.
# vim: set ft=cfg :
dockmanager-0.1.0/daemon/PaxHeaders.13539/wrap-label.c 0000644 0001750 0001750 00000000132 11531300342 020443 x ustar 00 0000000 0000000 30 mtime=1298497762.049548919
30 atime=1298497762.049548919
30 ctime=1298497772.819548914
dockmanager-0.1.0/daemon/wrap-label.c 0000644 0001750 0001750 00000021612 11531300342 017364 0 ustar 00rico rico 0000000 0000000 /* wrap-label.c generated by valac 0.11.6, the Vala compiler
* generated from wrap-label.vala, do not modify */
#include
#include
#include
#include
#include
#include
#include
#define DOCK_MANAGER_TYPE_WRAP_LABEL (dock_manager_wrap_label_get_type ())
#define DOCK_MANAGER_WRAP_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCK_MANAGER_TYPE_WRAP_LABEL, DockManagerWrapLabel))
#define DOCK_MANAGER_WRAP_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCK_MANAGER_TYPE_WRAP_LABEL, DockManagerWrapLabelClass))
#define DOCK_MANAGER_IS_WRAP_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCK_MANAGER_TYPE_WRAP_LABEL))
#define DOCK_MANAGER_IS_WRAP_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCK_MANAGER_TYPE_WRAP_LABEL))
#define DOCK_MANAGER_WRAP_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCK_MANAGER_TYPE_WRAP_LABEL, DockManagerWrapLabelClass))
typedef struct _DockManagerWrapLabel DockManagerWrapLabel;
typedef struct _DockManagerWrapLabelClass DockManagerWrapLabelClass;
typedef struct _DockManagerWrapLabelPrivate DockManagerWrapLabelPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
struct _DockManagerWrapLabel {
GtkLabel parent_instance;
DockManagerWrapLabelPrivate * priv;
};
struct _DockManagerWrapLabelClass {
GtkLabelClass parent_class;
};
struct _DockManagerWrapLabelPrivate {
gfloat orig_yalign;
gboolean _wrap;
};
static gpointer dock_manager_wrap_label_parent_class = NULL;
GType dock_manager_wrap_label_get_type (void) G_GNUC_CONST;
#define DOCK_MANAGER_WRAP_LABEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DOCK_MANAGER_TYPE_WRAP_LABEL, DockManagerWrapLabelPrivate))
enum {
DOCK_MANAGER_WRAP_LABEL_DUMMY_PROPERTY,
DOCK_MANAGER_WRAP_LABEL_WRAP
};
DockManagerWrapLabel* dock_manager_wrap_label_new (void);
DockManagerWrapLabel* dock_manager_wrap_label_construct (GType object_type);
static void dock_manager_wrap_label_real_size_allocate (GtkWidget* base, GdkRectangle* allocation);
static void dock_manager_wrap_label_real_size_request (GtkWidget* base, GtkRequisition* req);
gboolean dock_manager_wrap_label_get_wrap (DockManagerWrapLabel* self);
void dock_manager_wrap_label_set_wrap (DockManagerWrapLabel* self, gboolean value);
static GObject * dock_manager_wrap_label_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void dock_manager_wrap_label_finalize (GObject* obj);
static void _vala_dock_manager_wrap_label_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_dock_manager_wrap_label_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
DockManagerWrapLabel* dock_manager_wrap_label_construct (GType object_type) {
DockManagerWrapLabel * self = NULL;
self = (DockManagerWrapLabel*) g_object_new (object_type, "xalign", 0.0f, "wrap", FALSE, NULL);
return self;
}
DockManagerWrapLabel* dock_manager_wrap_label_new (void) {
return dock_manager_wrap_label_construct (DOCK_MANAGER_TYPE_WRAP_LABEL);
}
static gpointer _g_object_ref0 (gpointer self) {
return self ? g_object_ref (self) : NULL;
}
static void dock_manager_wrap_label_real_size_allocate (GtkWidget* base, GdkRectangle* allocation) {
DockManagerWrapLabel * self;
PangoLayout* _tmp0_ = NULL;
PangoLayout* _tmp1_;
PangoLayout* layout;
gint lw = 0;
gint lh = 0;
gint _tmp2_;
gint _tmp3_;
self = (DockManagerWrapLabel*) base;
_tmp0_ = gtk_label_get_layout ((GtkLabel*) self);
_tmp1_ = _g_object_ref0 (_tmp0_);
layout = _tmp1_;
pango_layout_set_width (layout, (*allocation).width * PANGO_SCALE);
pango_layout_get_pixel_size (layout, &_tmp2_, &_tmp3_);
lw = _tmp2_;
lh = _tmp3_;
g_object_set ((GtkWidget*) self, "height-request", lh, NULL);
GTK_WIDGET_CLASS (dock_manager_wrap_label_parent_class)->size_allocate ((GtkWidget*) GTK_LABEL (self), allocation);
_g_object_unref0 (layout);
}
static void dock_manager_wrap_label_real_size_request (GtkWidget* base, GtkRequisition* req) {
DockManagerWrapLabel * self;
GtkRequisition _req = {0};
GtkRequisition _tmp0_ = {0};
self = (DockManagerWrapLabel*) base;
GTK_WIDGET_CLASS (dock_manager_wrap_label_parent_class)->size_request ((GtkWidget*) GTK_LABEL (self), &_tmp0_);
_req = _tmp0_;
if (self->priv->_wrap) {
_req.width = 1;
}
if (req) {
*req = _req;
}
}
gboolean dock_manager_wrap_label_get_wrap (DockManagerWrapLabel* self) {
gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
result = self->priv->_wrap;
return result;
}
void dock_manager_wrap_label_set_wrap (DockManagerWrapLabel* self, gboolean value) {
gint _tmp0_ = 0;
PangoEllipsizeMode _tmp1_ = 0;
gfloat _tmp3_ = 0.0F;
g_return_if_fail (self != NULL);
self->priv->_wrap = value;
if (self->priv->_wrap) {
_tmp0_ = -1;
} else {
_tmp0_ = 10;
}
gtk_label_set_max_width_chars ((GtkLabel*) self, _tmp0_);
if (self->priv->_wrap) {
_tmp1_ = PANGO_ELLIPSIZE_NONE;
} else {
_tmp1_ = PANGO_ELLIPSIZE_END;
}
gtk_label_set_ellipsize ((GtkLabel*) self, _tmp1_);
if (!self->priv->_wrap) {
gfloat _tmp2_;
self->priv->orig_yalign = (g_object_get ((GtkMisc*) self, "yalign", &_tmp2_, NULL), _tmp2_);
}
if (self->priv->_wrap) {
_tmp3_ = 0.0f;
} else {
_tmp3_ = self->priv->orig_yalign;
}
g_object_set ((GtkMisc*) self, "yalign", _tmp3_, NULL);
gtk_widget_queue_resize ((GtkWidget*) self);
g_object_notify ((GObject *) self, "wrap");
}
static GObject * dock_manager_wrap_label_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
GObject * obj;
GObjectClass * parent_class;
DockManagerWrapLabel * self;
parent_class = G_OBJECT_CLASS (dock_manager_wrap_label_parent_class);
obj = parent_class->constructor (type, n_construct_properties, construct_properties);
self = DOCK_MANAGER_WRAP_LABEL (obj);
return obj;
}
static void dock_manager_wrap_label_class_init (DockManagerWrapLabelClass * klass) {
dock_manager_wrap_label_parent_class = g_type_class_peek_parent (klass);
g_type_class_add_private (klass, sizeof (DockManagerWrapLabelPrivate));
GTK_WIDGET_CLASS (klass)->size_allocate = dock_manager_wrap_label_real_size_allocate;
GTK_WIDGET_CLASS (klass)->size_request = dock_manager_wrap_label_real_size_request;
G_OBJECT_CLASS (klass)->get_property = _vala_dock_manager_wrap_label_get_property;
G_OBJECT_CLASS (klass)->set_property = _vala_dock_manager_wrap_label_set_property;
G_OBJECT_CLASS (klass)->constructor = dock_manager_wrap_label_constructor;
G_OBJECT_CLASS (klass)->finalize = dock_manager_wrap_label_finalize;
g_object_class_install_property (G_OBJECT_CLASS (klass), DOCK_MANAGER_WRAP_LABEL_WRAP, g_param_spec_boolean ("wrap", "wrap", "wrap", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}
static void dock_manager_wrap_label_instance_init (DockManagerWrapLabel * self) {
self->priv = DOCK_MANAGER_WRAP_LABEL_GET_PRIVATE (self);
self->priv->orig_yalign = 0.5f;
self->priv->_wrap = FALSE;
}
static void dock_manager_wrap_label_finalize (GObject* obj) {
DockManagerWrapLabel * self;
self = DOCK_MANAGER_WRAP_LABEL (obj);
G_OBJECT_CLASS (dock_manager_wrap_label_parent_class)->finalize (obj);
}
GType dock_manager_wrap_label_get_type (void) {
static volatile gsize dock_manager_wrap_label_type_id__volatile = 0;
if (g_once_init_enter (&dock_manager_wrap_label_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (DockManagerWrapLabelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dock_manager_wrap_label_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DockManagerWrapLabel), 0, (GInstanceInitFunc) dock_manager_wrap_label_instance_init, NULL };
GType dock_manager_wrap_label_type_id;
dock_manager_wrap_label_type_id = g_type_register_static (GTK_TYPE_LABEL, "DockManagerWrapLabel", &g_define_type_info, 0);
g_once_init_leave (&dock_manager_wrap_label_type_id__volatile, dock_manager_wrap_label_type_id);
}
return dock_manager_wrap_label_type_id__volatile;
}
static void _vala_dock_manager_wrap_label_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
DockManagerWrapLabel * self;
self = DOCK_MANAGER_WRAP_LABEL (object);
switch (property_id) {
case DOCK_MANAGER_WRAP_LABEL_WRAP:
g_value_set_boolean (value, dock_manager_wrap_label_get_wrap (self));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void _vala_dock_manager_wrap_label_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
DockManagerWrapLabel * self;
self = DOCK_MANAGER_WRAP_LABEL (object);
switch (property_id) {
case DOCK_MANAGER_WRAP_LABEL_WRAP:
dock_manager_wrap_label_set_wrap (self, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
dockmanager-0.1.0/daemon/PaxHeaders.13539/Makefile.in 0000644 0001750 0001750 00000000132 11531300330 020313 x ustar 00 0000000 0000000 30 mtime=1298497752.909548922
30 atime=1298497752.909548922
30 ctime=1298497772.789548914
dockmanager-0.1.0/daemon/Makefile.in 0000644 0001750 0001750 00000150410 11531300330 017233 0 ustar 00rico rico 0000000 0000000 # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Usage
# -----
# 1. Set the schema_in_files variable to the schema-ini.in file(s) to install.
# 2. Add install-gconf-schemas to the install-data-local rule dependencies.
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/dockmanager-daemon.schema-ini.in \
$(srcdir)/dockmanager.service.in \
$(top_srcdir)/Makefile.schemas abstract-tile-object.c \
dbus-helper.c dockmanager-common.c dockmanager-daemon.c \
dockmanager-settings.c dockmanager_daemon_vala.stamp \
dockmanager_settings_vala.stamp search-entry.c tile-view.c \
tile.c wrap-label.c
dockmanager_daemon_PROGRAMS = dockmanager-daemon$(EXEEXT)
dockmanager_gui_PROGRAMS = dockmanager-settings$(EXEEXT)
subdir = daemon
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
$(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/shave.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = dockmanager.service dockmanager-daemon.schema-ini
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(dockmanager_daemondir)" \
"$(DESTDIR)$(dockmanager_guidir)" "$(DESTDIR)$(schemadir)" \
"$(DESTDIR)$(schemasdir)" "$(DESTDIR)$(servicedir)"
PROGRAMS = $(dockmanager_daemon_PROGRAMS) $(dockmanager_gui_PROGRAMS)
am_dockmanager_daemon_OBJECTS = \
dockmanager_daemon-dockmanager-common.$(OBJEXT) \
dockmanager_daemon-dockmanager-daemon.$(OBJEXT) \
dockmanager_daemon-dbus-helper.$(OBJEXT)
dockmanager_daemon_OBJECTS = $(am_dockmanager_daemon_OBJECTS)
am__DEPENDENCIES_1 =
dockmanager_daemon_DEPENDENCIES = $(am__DEPENDENCIES_1)
dockmanager_daemon_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(dockmanager_daemon_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
am_dockmanager_settings_OBJECTS = \
dockmanager_settings-dockmanager-common.$(OBJEXT) \
dockmanager_settings-dockmanager-settings.$(OBJEXT) \
dockmanager_settings-search-entry.$(OBJEXT) \
dockmanager_settings-abstract-tile-object.$(OBJEXT) \
dockmanager_settings-tile.$(OBJEXT) \
dockmanager_settings-tile-view.$(OBJEXT) \
dockmanager_settings-wrap-label.$(OBJEXT)
dockmanager_settings_OBJECTS = $(am_dockmanager_settings_OBJECTS)
dockmanager_settings_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
dockmanager_settings_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(dockmanager_settings_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
VALACOMPILE = $(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS)
LTVALACOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS)
SOURCES = $(dockmanager_daemon_SOURCES) \
$(dockmanager_settings_SOURCES)
DIST_SOURCES = $(dockmanager_daemon_SOURCES) \
$(dockmanager_settings_SOURCES)
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 = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
DATA = $(schema_DATA) $(schemas_DATA) $(service_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BZR_REVNO = @BZR_REVNO@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CYGPATH_W = @CYGPATH_W@
DATADIR = @DATADIR@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOCKMANAGER_DAEMON_CFLAGS = @DOCKMANAGER_DAEMON_CFLAGS@
DOCKMANAGER_DAEMON_LIBS = @DOCKMANAGER_DAEMON_LIBS@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FC = @FC@
FGREP = @FGREP@
GCONFTOOL = @GCONFTOOL@
GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
GTK_CFLAGS = @GTK_CFLAGS@
GTK_LIBS = @GTK_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
LD = @LD@
LDA_BINDIR = @LDA_BINDIR@
LDA_VAPIDIR = @LDA_VAPIDIR@
LDFLAGS = @LDFLAGS@
LIBDIR = @LIBDIR@
LIBEXECDIR = @LIBEXECDIR@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEFLAGS = @MAKEFLAGS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKGDATADIR = @PKGDATADIR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
Q = @Q@
RANLIB = @RANLIB@
SCHEMADIR = @SCHEMADIR@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
V = @V@
VALAC = @VALAC@
VERSION = @VERSION@
VERSION_INFO = @VERSION_INFO@
XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
shavedir = @shavedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@GCONF_SCHEMAS_INSTALL_TRUE@schemasdir = @GCONF_SCHEMA_FILE_DIR@
@GCONF_SCHEMAS_INSTALL_TRUE@schemas_DATA = $(schema_DATA:.schema-ini=.schemas)
schema_DATA = $(schema_in_files:.schema-ini.in=.schema-ini)
schemadir = $(pkgdatadir)/schemas
# config-related
schema_in_files = dockmanager-daemon.schema-ini.in
VALAFLAGS = \
--enable-experimental \
--pkg dbus-glib-1 \
--vapidir=$(LDA_VAPIDIR) \
--pkg desktop-agnostic-cfg \
--pkg gtk+-2.0 \
build.vapi \
signal-fix.vapi \
$(NULL)
dockmanager_daemondir = $(libexecdir)
dockmanager_guidir = $(bindir)
dockmanager_daemon_CFLAGS = $(DOCKMANAGER_DAEMON_CFLAGS)
dockmanager_daemon_LDADD = $(DOCKMANAGER_DAEMON_LIBS)
dockmanager_daemon_SOURCES = \
dockmanager-common.vala \
dockmanager-daemon.vala \
dbus-helper.vala \
$(NULL)
dockmanager_settings_CFLAGS = $(DOCKMANAGER_DAEMON_CFLAGS) $(GTK_CFLAGS)
dockmanager_settings_LDADD = $(DOCKMANAGER_DAEMON_LIBS) $(GTK_LIBS)
dockmanager_settings_SOURCES = \
dockmanager-common.vala \
dockmanager-settings.vala \
search-entry.vala \
abstract-tile-object.vala \
tile.vala \
tile-view.vala \
wrap-label.vala \
$(NULL)
# service file
servicedir = $(datarootdir)/dbus-1/services
service_DATA = dockmanager.service
EXTRA_DIST = dockmanager.service.in
CLEANFILES = \
dockmanager.service \
$(schemas_DATA) \
$(schema_in_DATA) \
$(schema_DATA) \
$(NULL)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.schemas $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign daemon/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign daemon/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
dockmanager.service: $(top_builddir)/config.status $(srcdir)/dockmanager.service.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
dockmanager-daemon.schema-ini: $(top_builddir)/config.status $(srcdir)/dockmanager-daemon.schema-ini.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-dockmanager_daemonPROGRAMS: $(dockmanager_daemon_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(dockmanager_daemondir)" || $(MKDIR_P) "$(DESTDIR)$(dockmanager_daemondir)"
@list='$(dockmanager_daemon_PROGRAMS)'; test -n "$(dockmanager_daemondir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(dockmanager_daemondir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(dockmanager_daemondir)$$dir" || exit $$?; \
} \
; done
uninstall-dockmanager_daemonPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(dockmanager_daemon_PROGRAMS)'; test -n "$(dockmanager_daemondir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(dockmanager_daemondir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(dockmanager_daemondir)" && rm -f $$files
clean-dockmanager_daemonPROGRAMS:
@list='$(dockmanager_daemon_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
install-dockmanager_guiPROGRAMS: $(dockmanager_gui_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(dockmanager_guidir)" || $(MKDIR_P) "$(DESTDIR)$(dockmanager_guidir)"
@list='$(dockmanager_gui_PROGRAMS)'; test -n "$(dockmanager_guidir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(dockmanager_guidir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(dockmanager_guidir)$$dir" || exit $$?; \
} \
; done
uninstall-dockmanager_guiPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(dockmanager_gui_PROGRAMS)'; test -n "$(dockmanager_guidir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(dockmanager_guidir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(dockmanager_guidir)" && rm -f $$files
clean-dockmanager_guiPROGRAMS:
@list='$(dockmanager_gui_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
dockmanager-daemon$(EXEEXT): $(dockmanager_daemon_OBJECTS) $(dockmanager_daemon_DEPENDENCIES)
@rm -f dockmanager-daemon$(EXEEXT)
$(dockmanager_daemon_LINK) $(dockmanager_daemon_OBJECTS) $(dockmanager_daemon_LDADD) $(LIBS)
dockmanager-settings$(EXEEXT): $(dockmanager_settings_OBJECTS) $(dockmanager_settings_DEPENDENCIES)
@rm -f dockmanager-settings$(EXEEXT)
$(dockmanager_settings_LINK) $(dockmanager_settings_OBJECTS) $(dockmanager_settings_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dockmanager_daemon-dbus-helper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dockmanager_daemon-dockmanager-common.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dockmanager_daemon-dockmanager-daemon.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dockmanager_settings-abstract-tile-object.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dockmanager_settings-dockmanager-common.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dockmanager_settings-dockmanager-settings.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dockmanager_settings-search-entry.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dockmanager_settings-tile-view.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dockmanager_settings-tile.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dockmanager_settings-wrap-label.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
dockmanager_daemon-dockmanager-common.o: dockmanager-common.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -MT dockmanager_daemon-dockmanager-common.o -MD -MP -MF $(DEPDIR)/dockmanager_daemon-dockmanager-common.Tpo -c -o dockmanager_daemon-dockmanager-common.o `test -f 'dockmanager-common.c' || echo '$(srcdir)/'`dockmanager-common.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_daemon-dockmanager-common.Tpo $(DEPDIR)/dockmanager_daemon-dockmanager-common.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dockmanager-common.c' object='dockmanager_daemon-dockmanager-common.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -c -o dockmanager_daemon-dockmanager-common.o `test -f 'dockmanager-common.c' || echo '$(srcdir)/'`dockmanager-common.c
dockmanager_daemon-dockmanager-common.obj: dockmanager-common.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -MT dockmanager_daemon-dockmanager-common.obj -MD -MP -MF $(DEPDIR)/dockmanager_daemon-dockmanager-common.Tpo -c -o dockmanager_daemon-dockmanager-common.obj `if test -f 'dockmanager-common.c'; then $(CYGPATH_W) 'dockmanager-common.c'; else $(CYGPATH_W) '$(srcdir)/dockmanager-common.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_daemon-dockmanager-common.Tpo $(DEPDIR)/dockmanager_daemon-dockmanager-common.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dockmanager-common.c' object='dockmanager_daemon-dockmanager-common.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -c -o dockmanager_daemon-dockmanager-common.obj `if test -f 'dockmanager-common.c'; then $(CYGPATH_W) 'dockmanager-common.c'; else $(CYGPATH_W) '$(srcdir)/dockmanager-common.c'; fi`
dockmanager_daemon-dockmanager-daemon.o: dockmanager-daemon.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -MT dockmanager_daemon-dockmanager-daemon.o -MD -MP -MF $(DEPDIR)/dockmanager_daemon-dockmanager-daemon.Tpo -c -o dockmanager_daemon-dockmanager-daemon.o `test -f 'dockmanager-daemon.c' || echo '$(srcdir)/'`dockmanager-daemon.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_daemon-dockmanager-daemon.Tpo $(DEPDIR)/dockmanager_daemon-dockmanager-daemon.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dockmanager-daemon.c' object='dockmanager_daemon-dockmanager-daemon.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -c -o dockmanager_daemon-dockmanager-daemon.o `test -f 'dockmanager-daemon.c' || echo '$(srcdir)/'`dockmanager-daemon.c
dockmanager_daemon-dockmanager-daemon.obj: dockmanager-daemon.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -MT dockmanager_daemon-dockmanager-daemon.obj -MD -MP -MF $(DEPDIR)/dockmanager_daemon-dockmanager-daemon.Tpo -c -o dockmanager_daemon-dockmanager-daemon.obj `if test -f 'dockmanager-daemon.c'; then $(CYGPATH_W) 'dockmanager-daemon.c'; else $(CYGPATH_W) '$(srcdir)/dockmanager-daemon.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_daemon-dockmanager-daemon.Tpo $(DEPDIR)/dockmanager_daemon-dockmanager-daemon.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dockmanager-daemon.c' object='dockmanager_daemon-dockmanager-daemon.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -c -o dockmanager_daemon-dockmanager-daemon.obj `if test -f 'dockmanager-daemon.c'; then $(CYGPATH_W) 'dockmanager-daemon.c'; else $(CYGPATH_W) '$(srcdir)/dockmanager-daemon.c'; fi`
dockmanager_daemon-dbus-helper.o: dbus-helper.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -MT dockmanager_daemon-dbus-helper.o -MD -MP -MF $(DEPDIR)/dockmanager_daemon-dbus-helper.Tpo -c -o dockmanager_daemon-dbus-helper.o `test -f 'dbus-helper.c' || echo '$(srcdir)/'`dbus-helper.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_daemon-dbus-helper.Tpo $(DEPDIR)/dockmanager_daemon-dbus-helper.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-helper.c' object='dockmanager_daemon-dbus-helper.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -c -o dockmanager_daemon-dbus-helper.o `test -f 'dbus-helper.c' || echo '$(srcdir)/'`dbus-helper.c
dockmanager_daemon-dbus-helper.obj: dbus-helper.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -MT dockmanager_daemon-dbus-helper.obj -MD -MP -MF $(DEPDIR)/dockmanager_daemon-dbus-helper.Tpo -c -o dockmanager_daemon-dbus-helper.obj `if test -f 'dbus-helper.c'; then $(CYGPATH_W) 'dbus-helper.c'; else $(CYGPATH_W) '$(srcdir)/dbus-helper.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_daemon-dbus-helper.Tpo $(DEPDIR)/dockmanager_daemon-dbus-helper.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-helper.c' object='dockmanager_daemon-dbus-helper.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_daemon_CFLAGS) $(CFLAGS) -c -o dockmanager_daemon-dbus-helper.obj `if test -f 'dbus-helper.c'; then $(CYGPATH_W) 'dbus-helper.c'; else $(CYGPATH_W) '$(srcdir)/dbus-helper.c'; fi`
dockmanager_settings-dockmanager-common.o: dockmanager-common.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-dockmanager-common.o -MD -MP -MF $(DEPDIR)/dockmanager_settings-dockmanager-common.Tpo -c -o dockmanager_settings-dockmanager-common.o `test -f 'dockmanager-common.c' || echo '$(srcdir)/'`dockmanager-common.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-dockmanager-common.Tpo $(DEPDIR)/dockmanager_settings-dockmanager-common.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dockmanager-common.c' object='dockmanager_settings-dockmanager-common.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-dockmanager-common.o `test -f 'dockmanager-common.c' || echo '$(srcdir)/'`dockmanager-common.c
dockmanager_settings-dockmanager-common.obj: dockmanager-common.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-dockmanager-common.obj -MD -MP -MF $(DEPDIR)/dockmanager_settings-dockmanager-common.Tpo -c -o dockmanager_settings-dockmanager-common.obj `if test -f 'dockmanager-common.c'; then $(CYGPATH_W) 'dockmanager-common.c'; else $(CYGPATH_W) '$(srcdir)/dockmanager-common.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-dockmanager-common.Tpo $(DEPDIR)/dockmanager_settings-dockmanager-common.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dockmanager-common.c' object='dockmanager_settings-dockmanager-common.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-dockmanager-common.obj `if test -f 'dockmanager-common.c'; then $(CYGPATH_W) 'dockmanager-common.c'; else $(CYGPATH_W) '$(srcdir)/dockmanager-common.c'; fi`
dockmanager_settings-dockmanager-settings.o: dockmanager-settings.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-dockmanager-settings.o -MD -MP -MF $(DEPDIR)/dockmanager_settings-dockmanager-settings.Tpo -c -o dockmanager_settings-dockmanager-settings.o `test -f 'dockmanager-settings.c' || echo '$(srcdir)/'`dockmanager-settings.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-dockmanager-settings.Tpo $(DEPDIR)/dockmanager_settings-dockmanager-settings.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dockmanager-settings.c' object='dockmanager_settings-dockmanager-settings.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-dockmanager-settings.o `test -f 'dockmanager-settings.c' || echo '$(srcdir)/'`dockmanager-settings.c
dockmanager_settings-dockmanager-settings.obj: dockmanager-settings.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-dockmanager-settings.obj -MD -MP -MF $(DEPDIR)/dockmanager_settings-dockmanager-settings.Tpo -c -o dockmanager_settings-dockmanager-settings.obj `if test -f 'dockmanager-settings.c'; then $(CYGPATH_W) 'dockmanager-settings.c'; else $(CYGPATH_W) '$(srcdir)/dockmanager-settings.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-dockmanager-settings.Tpo $(DEPDIR)/dockmanager_settings-dockmanager-settings.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dockmanager-settings.c' object='dockmanager_settings-dockmanager-settings.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-dockmanager-settings.obj `if test -f 'dockmanager-settings.c'; then $(CYGPATH_W) 'dockmanager-settings.c'; else $(CYGPATH_W) '$(srcdir)/dockmanager-settings.c'; fi`
dockmanager_settings-search-entry.o: search-entry.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-search-entry.o -MD -MP -MF $(DEPDIR)/dockmanager_settings-search-entry.Tpo -c -o dockmanager_settings-search-entry.o `test -f 'search-entry.c' || echo '$(srcdir)/'`search-entry.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-search-entry.Tpo $(DEPDIR)/dockmanager_settings-search-entry.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='search-entry.c' object='dockmanager_settings-search-entry.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-search-entry.o `test -f 'search-entry.c' || echo '$(srcdir)/'`search-entry.c
dockmanager_settings-search-entry.obj: search-entry.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-search-entry.obj -MD -MP -MF $(DEPDIR)/dockmanager_settings-search-entry.Tpo -c -o dockmanager_settings-search-entry.obj `if test -f 'search-entry.c'; then $(CYGPATH_W) 'search-entry.c'; else $(CYGPATH_W) '$(srcdir)/search-entry.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-search-entry.Tpo $(DEPDIR)/dockmanager_settings-search-entry.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='search-entry.c' object='dockmanager_settings-search-entry.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-search-entry.obj `if test -f 'search-entry.c'; then $(CYGPATH_W) 'search-entry.c'; else $(CYGPATH_W) '$(srcdir)/search-entry.c'; fi`
dockmanager_settings-abstract-tile-object.o: abstract-tile-object.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-abstract-tile-object.o -MD -MP -MF $(DEPDIR)/dockmanager_settings-abstract-tile-object.Tpo -c -o dockmanager_settings-abstract-tile-object.o `test -f 'abstract-tile-object.c' || echo '$(srcdir)/'`abstract-tile-object.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-abstract-tile-object.Tpo $(DEPDIR)/dockmanager_settings-abstract-tile-object.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='abstract-tile-object.c' object='dockmanager_settings-abstract-tile-object.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-abstract-tile-object.o `test -f 'abstract-tile-object.c' || echo '$(srcdir)/'`abstract-tile-object.c
dockmanager_settings-abstract-tile-object.obj: abstract-tile-object.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-abstract-tile-object.obj -MD -MP -MF $(DEPDIR)/dockmanager_settings-abstract-tile-object.Tpo -c -o dockmanager_settings-abstract-tile-object.obj `if test -f 'abstract-tile-object.c'; then $(CYGPATH_W) 'abstract-tile-object.c'; else $(CYGPATH_W) '$(srcdir)/abstract-tile-object.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-abstract-tile-object.Tpo $(DEPDIR)/dockmanager_settings-abstract-tile-object.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='abstract-tile-object.c' object='dockmanager_settings-abstract-tile-object.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-abstract-tile-object.obj `if test -f 'abstract-tile-object.c'; then $(CYGPATH_W) 'abstract-tile-object.c'; else $(CYGPATH_W) '$(srcdir)/abstract-tile-object.c'; fi`
dockmanager_settings-tile.o: tile.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-tile.o -MD -MP -MF $(DEPDIR)/dockmanager_settings-tile.Tpo -c -o dockmanager_settings-tile.o `test -f 'tile.c' || echo '$(srcdir)/'`tile.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-tile.Tpo $(DEPDIR)/dockmanager_settings-tile.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tile.c' object='dockmanager_settings-tile.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-tile.o `test -f 'tile.c' || echo '$(srcdir)/'`tile.c
dockmanager_settings-tile.obj: tile.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-tile.obj -MD -MP -MF $(DEPDIR)/dockmanager_settings-tile.Tpo -c -o dockmanager_settings-tile.obj `if test -f 'tile.c'; then $(CYGPATH_W) 'tile.c'; else $(CYGPATH_W) '$(srcdir)/tile.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-tile.Tpo $(DEPDIR)/dockmanager_settings-tile.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tile.c' object='dockmanager_settings-tile.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-tile.obj `if test -f 'tile.c'; then $(CYGPATH_W) 'tile.c'; else $(CYGPATH_W) '$(srcdir)/tile.c'; fi`
dockmanager_settings-tile-view.o: tile-view.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-tile-view.o -MD -MP -MF $(DEPDIR)/dockmanager_settings-tile-view.Tpo -c -o dockmanager_settings-tile-view.o `test -f 'tile-view.c' || echo '$(srcdir)/'`tile-view.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-tile-view.Tpo $(DEPDIR)/dockmanager_settings-tile-view.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tile-view.c' object='dockmanager_settings-tile-view.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-tile-view.o `test -f 'tile-view.c' || echo '$(srcdir)/'`tile-view.c
dockmanager_settings-tile-view.obj: tile-view.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-tile-view.obj -MD -MP -MF $(DEPDIR)/dockmanager_settings-tile-view.Tpo -c -o dockmanager_settings-tile-view.obj `if test -f 'tile-view.c'; then $(CYGPATH_W) 'tile-view.c'; else $(CYGPATH_W) '$(srcdir)/tile-view.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-tile-view.Tpo $(DEPDIR)/dockmanager_settings-tile-view.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tile-view.c' object='dockmanager_settings-tile-view.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-tile-view.obj `if test -f 'tile-view.c'; then $(CYGPATH_W) 'tile-view.c'; else $(CYGPATH_W) '$(srcdir)/tile-view.c'; fi`
dockmanager_settings-wrap-label.o: wrap-label.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-wrap-label.o -MD -MP -MF $(DEPDIR)/dockmanager_settings-wrap-label.Tpo -c -o dockmanager_settings-wrap-label.o `test -f 'wrap-label.c' || echo '$(srcdir)/'`wrap-label.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-wrap-label.Tpo $(DEPDIR)/dockmanager_settings-wrap-label.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wrap-label.c' object='dockmanager_settings-wrap-label.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-wrap-label.o `test -f 'wrap-label.c' || echo '$(srcdir)/'`wrap-label.c
dockmanager_settings-wrap-label.obj: wrap-label.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -MT dockmanager_settings-wrap-label.obj -MD -MP -MF $(DEPDIR)/dockmanager_settings-wrap-label.Tpo -c -o dockmanager_settings-wrap-label.obj `if test -f 'wrap-label.c'; then $(CYGPATH_W) 'wrap-label.c'; else $(CYGPATH_W) '$(srcdir)/wrap-label.c'; fi`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dockmanager_settings-wrap-label.Tpo $(DEPDIR)/dockmanager_settings-wrap-label.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wrap-label.c' object='dockmanager_settings-wrap-label.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dockmanager_settings_CFLAGS) $(CFLAGS) -c -o dockmanager_settings-wrap-label.obj `if test -f 'wrap-label.c'; then $(CYGPATH_W) 'wrap-label.c'; else $(CYGPATH_W) '$(srcdir)/wrap-label.c'; fi`
$(srcdir)/dockmanager-common.c: $(srcdir)/dockmanager_daemon_vala.stamp
@if test -f $@; then :; else \
rm -f $(srcdir)/dockmanager_daemon_vala.stamp; \
$(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) dockmanager_daemon_vala.stamp; \
fi
$(srcdir)/dockmanager-daemon.c: $(srcdir)/dockmanager_daemon_vala.stamp
@if test -f $@; then :; else \
rm -f $(srcdir)/dockmanager_daemon_vala.stamp; \
$(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) dockmanager_daemon_vala.stamp; \
fi
$(srcdir)/dbus-helper.c: $(srcdir)/dockmanager_daemon_vala.stamp
@if test -f $@; then :; else \
rm -f $(srcdir)/dockmanager_daemon_vala.stamp; \
$(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) dockmanager_daemon_vala.stamp; \
fi
dockmanager_daemon_vala.stamp: $(dockmanager_daemon_SOURCES)
$(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS) -C $(dockmanager_daemon_SOURCES)
touch $@
$(srcdir)/dockmanager-common.c: $(srcdir)/dockmanager_settings_vala.stamp
@if test -f $@; then :; else \
rm -f $(srcdir)/dockmanager_settings_vala.stamp; \
$(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) dockmanager_settings_vala.stamp; \
fi
$(srcdir)/dockmanager-settings.c: $(srcdir)/dockmanager_settings_vala.stamp
@if test -f $@; then :; else \
rm -f $(srcdir)/dockmanager_settings_vala.stamp; \
$(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) dockmanager_settings_vala.stamp; \
fi
$(srcdir)/search-entry.c: $(srcdir)/dockmanager_settings_vala.stamp
@if test -f $@; then :; else \
rm -f $(srcdir)/dockmanager_settings_vala.stamp; \
$(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) dockmanager_settings_vala.stamp; \
fi
$(srcdir)/abstract-tile-object.c: $(srcdir)/dockmanager_settings_vala.stamp
@if test -f $@; then :; else \
rm -f $(srcdir)/dockmanager_settings_vala.stamp; \
$(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) dockmanager_settings_vala.stamp; \
fi
$(srcdir)/tile.c: $(srcdir)/dockmanager_settings_vala.stamp
@if test -f $@; then :; else \
rm -f $(srcdir)/dockmanager_settings_vala.stamp; \
$(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) dockmanager_settings_vala.stamp; \
fi
$(srcdir)/tile-view.c: $(srcdir)/dockmanager_settings_vala.stamp
@if test -f $@; then :; else \
rm -f $(srcdir)/dockmanager_settings_vala.stamp; \
$(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) dockmanager_settings_vala.stamp; \
fi
$(srcdir)/wrap-label.c: $(srcdir)/dockmanager_settings_vala.stamp
@if test -f $@; then :; else \
rm -f $(srcdir)/dockmanager_settings_vala.stamp; \
$(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) dockmanager_settings_vala.stamp; \
fi
dockmanager_settings_vala.stamp: $(dockmanager_settings_SOURCES)
$(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS) -C $(dockmanager_settings_SOURCES)
touch $@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-schemaDATA: $(schema_DATA)
@$(NORMAL_INSTALL)
test -z "$(schemadir)" || $(MKDIR_P) "$(DESTDIR)$(schemadir)"
@list='$(schema_DATA)'; test -n "$(schemadir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(schemadir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(schemadir)" || exit $$?; \
done
uninstall-schemaDATA:
@$(NORMAL_UNINSTALL)
@list='$(schema_DATA)'; test -n "$(schemadir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(schemadir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(schemadir)" && rm -f $$files
install-schemasDATA: $(schemas_DATA)
@$(NORMAL_INSTALL)
test -z "$(schemasdir)" || $(MKDIR_P) "$(DESTDIR)$(schemasdir)"
@list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(schemasdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(schemasdir)" || exit $$?; \
done
uninstall-schemasDATA:
@$(NORMAL_UNINSTALL)
@list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(schemasdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(schemasdir)" && rm -f $$files
install-serviceDATA: $(service_DATA)
@$(NORMAL_INSTALL)
test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)"
@list='$(service_DATA)'; test -n "$(servicedir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(servicedir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(servicedir)" || exit $$?; \
done
uninstall-serviceDATA:
@$(NORMAL_UNINSTALL)
@list='$(service_DATA)'; test -n "$(servicedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(servicedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(servicedir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(dockmanager_daemondir)" "$(DESTDIR)$(dockmanager_guidir)" "$(DESTDIR)$(schemadir)" "$(DESTDIR)$(schemasdir)" "$(DESTDIR)$(servicedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-rm -f abstract-tile-object.c
-rm -f dbus-helper.c
-rm -f dockmanager-common.c
-rm -f dockmanager-daemon.c
-rm -f dockmanager-settings.c
-rm -f dockmanager_daemon_vala.stamp
-rm -f dockmanager_settings_vala.stamp
-rm -f search-entry.c
-rm -f tile-view.c
-rm -f tile.c
-rm -f wrap-label.c
clean: clean-am
clean-am: clean-dockmanager_daemonPROGRAMS \
clean-dockmanager_guiPROGRAMS clean-generic clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-data-local install-dockmanager_daemonPROGRAMS \
install-dockmanager_guiPROGRAMS install-schemaDATA \
install-schemasDATA install-serviceDATA
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-dockmanager_daemonPROGRAMS \
uninstall-dockmanager_guiPROGRAMS uninstall-schemaDATA \
uninstall-schemasDATA uninstall-serviceDATA
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean \
clean-dockmanager_daemonPROGRAMS clean-dockmanager_guiPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-local \
install-dockmanager_daemonPROGRAMS \
install-dockmanager_guiPROGRAMS 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-schemaDATA \
install-schemasDATA install-serviceDATA install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am \
uninstall-dockmanager_daemonPROGRAMS \
uninstall-dockmanager_guiPROGRAMS uninstall-schemaDATA \
uninstall-schemasDATA uninstall-serviceDATA
@GCONF_SCHEMAS_INSTALL_TRUE@%.schemas: %.schema-ini
@GCONF_SCHEMAS_INSTALL_TRUE@ $(LDA_BINDIR)/lda-schema-to-gconf $< $@
@GCONF_SCHEMAS_INSTALL_TRUE@install-gconf-schemas: $(schemas_DATA)
@GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schemas_DATA)
@GCONF_SCHEMAS_INSTALL_FALSE@install-gconf-schemas:
#@INTLTOOL_SCHEMA_INI_RULE@
# vim: set ft=automake noet ts=8 sts=8 sw=8 :
# global
install-data-local: install-gconf-schemas
# 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:
dockmanager-0.1.0/daemon/PaxHeaders.13539/abstract-tile-object.vala 0000644 0001750 0001750 00000000124 11522625025 023131 x ustar 00 0000000 0000000 27 mtime=1296771605.468202
27 atime=1296771605.468202
30 ctime=1298497772.829548914
dockmanager-0.1.0/daemon/abstract-tile-object.vala 0000644 0001750 0001750 00000006014 11522625025 022050 0 ustar 00rico rico 0000000 0000000
namespace DockManager
{
public abstract class AbstractTileObject: Object
{
public signal void icon_updated ();
public signal void text_updated ();
public signal void buttons_updated ();
public virtual signal void active_changed () {}
private List extra_buttons = new List ();
public List get_extra_buttons ()
{
return extra_buttons.copy ();
}
private string _icon;
public string icon
{
get
{
if (_icon == null) _icon = "";
return _icon;
}
set
{
if (_icon == value) return;
// clear forced pixbuf
if (force_pixbuf != null) force_pixbuf = null;
_icon = value;
icon_updated ();
}
}
private Gdk.Pixbuf? _force_pixbuf;
public Gdk.Pixbuf force_pixbuf
{
get
{
return _force_pixbuf;
}
set
{
if (_force_pixbuf == value) return;
_force_pixbuf = value;
icon_updated ();
}
}
private string _name;
public string name
{
get
{
if (_name == null) _name = "";
return _name;
}
set
{
if (_name == value) return;
_name = value;
text_updated ();
}
}
private string _description;
public string description
{
get
{
if (_description == null) _description = "";
return _description;
}
set
{
if (_description == value) return;
_description = value;
text_updated ();
}
}
private string _subdesc_title;
public string sub_description_title
{
get
{
if (_subdesc_title == null) _subdesc_title = "";
return _subdesc_title;
}
set
{
if (_subdesc_title == value) return;
_subdesc_title = value;
text_updated ();
}
}
private string _subdesc_text;
public string sub_description_text
{
get
{
if (_subdesc_text == null) _subdesc_text = "";
return _subdesc_text;
}
set
{
if (_subdesc_text == value) return;
_subdesc_text = value;
text_updated ();
}
}
public bool show_action_button { get; set; default = true; }
public bool enabled { get; set; default = true; }
public string add_button_stock { get; protected set; default = Gtk.STOCK_ADD; }
public string remove_button_stock { get; protected set; default = Gtk.STOCK_DELETE; }
public string add_button_tooltip { get; protected set; }
public string remove_button_tooltip { get; protected set; }
public void add_user_button (Gtk.Button button)
{
if (extra_buttons.find (button) == null)
{
extra_buttons.append (button);
buttons_updated ();
}
}
public void remove_user_button (Gtk.Button button)
{
if (extra_buttons.find (button) != null)
{
extra_buttons.remove (button);
buttons_updated ();
}
}
}
}
dockmanager-0.1.0/daemon/PaxHeaders.13539/tile.c 0000644 0001750 0001750 00000000132 11531300342 017352 x ustar 00 0000000 0000000 30 mtime=1298497762.029548919
30 atime=1298497762.029548919
30 ctime=1298497772.819548914
dockmanager-0.1.0/daemon/tile.c 0000644 0001750 0001750 00000075222 11531300342 016301 0 ustar 00rico rico 0000000 0000000 /* tile.c generated by valac 0.11.6, the Vala compiler
* generated from tile.vala, do not modify */
#include
#include
#include
#include
#include
#include
#include
#define DOCK_MANAGER_TYPE_TILE (dock_manager_tile_get_type ())
#define DOCK_MANAGER_TILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCK_MANAGER_TYPE_TILE, DockManagerTile))
#define DOCK_MANAGER_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCK_MANAGER_TYPE_TILE, DockManagerTileClass))
#define DOCK_MANAGER_IS_TILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCK_MANAGER_TYPE_TILE))
#define DOCK_MANAGER_IS_TILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCK_MANAGER_TYPE_TILE))
#define DOCK_MANAGER_TILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCK_MANAGER_TYPE_TILE, DockManagerTileClass))
typedef struct _DockManagerTile DockManagerTile;
typedef struct _DockManagerTileClass DockManagerTileClass;
typedef struct _DockManagerTilePrivate DockManagerTilePrivate;
#define DOCK_MANAGER_TYPE_WRAP_LABEL (dock_manager_wrap_label_get_type ())
#define DOCK_MANAGER_WRAP_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCK_MANAGER_TYPE_WRAP_LABEL, DockManagerWrapLabel))
#define DOCK_MANAGER_WRAP_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCK_MANAGER_TYPE_WRAP_LABEL, DockManagerWrapLabelClass))
#define DOCK_MANAGER_IS_WRAP_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCK_MANAGER_TYPE_WRAP_LABEL))
#define DOCK_MANAGER_IS_WRAP_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCK_MANAGER_TYPE_WRAP_LABEL))
#define DOCK_MANAGER_WRAP_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCK_MANAGER_TYPE_WRAP_LABEL, DockManagerWrapLabelClass))
typedef struct _DockManagerWrapLabel DockManagerWrapLabel;
typedef struct _DockManagerWrapLabelClass DockManagerWrapLabelClass;
#define DOCK_MANAGER_TYPE_TILE_VIEW (dock_manager_tile_view_get_type ())
#define DOCK_MANAGER_TILE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCK_MANAGER_TYPE_TILE_VIEW, DockManagerTileView))
#define DOCK_MANAGER_TILE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCK_MANAGER_TYPE_TILE_VIEW, DockManagerTileViewClass))
#define DOCK_MANAGER_IS_TILE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCK_MANAGER_TYPE_TILE_VIEW))
#define DOCK_MANAGER_IS_TILE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCK_MANAGER_TYPE_TILE_VIEW))
#define DOCK_MANAGER_TILE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCK_MANAGER_TYPE_TILE_VIEW, DockManagerTileViewClass))
typedef struct _DockManagerTileView DockManagerTileView;
typedef struct _DockManagerTileViewClass DockManagerTileViewClass;
#define DOCK_MANAGER_TYPE_ABSTRACT_TILE_OBJECT (dock_manager_abstract_tile_object_get_type ())
#define DOCK_MANAGER_ABSTRACT_TILE_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DOCK_MANAGER_TYPE_ABSTRACT_TILE_OBJECT, DockManagerAbstractTileObject))
#define DOCK_MANAGER_ABSTRACT_TILE_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DOCK_MANAGER_TYPE_ABSTRACT_TILE_OBJECT, DockManagerAbstractTileObjectClass))
#define DOCK_MANAGER_IS_ABSTRACT_TILE_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DOCK_MANAGER_TYPE_ABSTRACT_TILE_OBJECT))
#define DOCK_MANAGER_IS_ABSTRACT_TILE_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DOCK_MANAGER_TYPE_ABSTRACT_TILE_OBJECT))
#define DOCK_MANAGER_ABSTRACT_TILE_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DOCK_MANAGER_TYPE_ABSTRACT_TILE_OBJECT, DockManagerAbstractTileObjectClass))
typedef struct _DockManagerAbstractTileObject DockManagerAbstractTileObject;
typedef struct _DockManagerAbstractTileObjectClass DockManagerAbstractTileObjectClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
struct _DockManagerTile {
GtkTable parent_instance;
DockManagerTilePrivate * priv;
};
struct _DockManagerTileClass {
GtkTableClass parent_class;
};
struct _DockManagerTilePrivate {
GtkButton* add_remove_button;
GtkBox* button_box;
GtkLabel* title;
GtkImage* tile_image;
DockManagerWrapLabel* description;
GtkLabel* sub_description;
GtkImage* add_image;
GtkImage* remove_image;
gint icon_size;
DockManagerTileView* _owner;
DockManagerAbstractTileObject* _owned_object;
gboolean _last;
};
static gpointer dock_manager_tile_parent_class = NULL;
GType dock_manager_tile_get_type (void) G_GNUC_CONST;
GType dock_manager_wrap_label_get_type (void) G_GNUC_CONST;
GType dock_manager_tile_view_get_type (void) G_GNUC_CONST;
GType dock_manager_abstract_tile_object_get_type (void) G_GNUC_CONST;
#define DOCK_MANAGER_TILE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DOCK_MANAGER_TYPE_TILE, DockManagerTilePrivate))
enum {
DOCK_MANAGER_TILE_DUMMY_PROPERTY,
DOCK_MANAGER_TILE_OWNER,
DOCK_MANAGER_TILE_OWNED_OBJECT,
DOCK_MANAGER_TILE_LAST
};
DockManagerTile* dock_manager_tile_new (DockManagerAbstractTileObject* obj, gint icon_size);
DockManagerTile* dock_manager_tile_construct (GType object_type, DockManagerAbstractTileObject* obj, gint icon_size);
const gchar* dock_manager_abstract_tile_object_get_add_button_stock (DockManagerAbstractTileObject* self);
const gchar* dock_manager_abstract_tile_object_get_remove_button_stock (DockManagerAbstractTileObject* self);
static void dock_manager_tile_set_owned_object (DockManagerTile* self, DockManagerAbstractTileObject* value);
DockManagerAbstractTileObject* dock_manager_tile_get_owned_object (DockManagerTile* self);
static void dock_manager_tile_set_image (DockManagerTile* self);
static void _dock_manager_tile_set_image_dock_manager_abstract_tile_object_icon_updated (DockManagerAbstractTileObject* _sender, gpointer self);
static void dock_manager_tile_set_text (DockManagerTile* self);
static void _dock_manager_tile_set_text_dock_manager_abstract_tile_object_text_updated (DockManagerAbstractTileObject* _sender, gpointer self);
static void dock_manager_tile_update_buttons (DockManagerTile* self);
static void _dock_manager_tile_update_buttons_dock_manager_abstract_tile_object_buttons_updated (DockManagerAbstractTileObject* _sender, gpointer self);
void dock_manager_tile_update_state (DockManagerTile* self);
static void _dock_manager_tile_update_state_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void dock_manager_tile_build_tile (DockManagerTile* self);
DockManagerWrapLabel* dock_manager_wrap_label_new (void);
DockManagerWrapLabel* dock_manager_wrap_label_construct (GType object_type);
static void _lambda1_ (DockManagerTile* self);
static void __lambda1__gtk_button_clicked (GtkButton* _sender, gpointer self);
static void dock_manager_tile_real_realize (GtkWidget* base);
static gboolean dock_manager_tile_real_expose_event (GtkWidget* base, GdkEventExpose* event);
gboolean dock_manager_tile_get_last (DockManagerTile* self);
gboolean dock_manager_abstract_tile_object_get_enabled (DockManagerAbstractTileObject* self);
void dock_manager_wrap_label_set_wrap (DockManagerWrapLabel* self, gboolean value);
const gchar* dock_manager_abstract_tile_object_get_remove_button_tooltip (DockManagerAbstractTileObject* self);
const gchar* dock_manager_abstract_tile_object_get_add_button_tooltip (DockManagerAbstractTileObject* self);
void dock_manager_tile_set_selected (DockManagerTile* self, gboolean selected);
GdkPixbuf* dock_manager_abstract_tile_object_get_force_pixbuf (DockManagerAbstractTileObject* self);
const gchar* dock_manager_abstract_tile_object_get_icon (DockManagerAbstractTileObject* self);
const gchar* dock_manager_abstract_tile_object_get_name (DockManagerAbstractTileObject* self);
const gchar* dock_manager_abstract_tile_object_get_description (DockManagerAbstractTileObject* self);
const gchar* dock_manager_abstract_tile_object_get_sub_description_title (DockManagerAbstractTileObject* self);
const gchar* dock_manager_abstract_tile_object_get_sub_description_text (DockManagerAbstractTileObject* self);
GList* dock_manager_abstract_tile_object_get_extra_buttons (DockManagerAbstractTileObject* self);
gboolean dock_manager_abstract_tile_object_get_show_action_button (DockManagerAbstractTileObject* self);
DockManagerTileView* dock_manager_tile_get_owner (DockManagerTile* self);
void dock_manager_tile_set_owner (DockManagerTile* self, DockManagerTileView* value);
static void dock_manager_tile_set_last (DockManagerTile* self, gboolean value);
static void dock_manager_tile_finalize (GObject* obj);
static void _vala_dock_manager_tile_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_dock_manager_tile_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _dock_manager_tile_set_image_dock_manager_abstract_tile_object_icon_updated (DockManagerAbstractTileObject* _sender, gpointer self) {
dock_manager_tile_set_image (self);
}
static void _dock_manager_tile_set_text_dock_manager_abstract_tile_object_text_updated (DockManagerAbstractTileObject* _sender, gpointer self) {
dock_manager_tile_set_text (self);
}
static void _dock_manager_tile_update_buttons_dock_manager_abstract_tile_object_buttons_updated (DockManagerAbstractTileObject* _sender, gpointer self) {
dock_manager_tile_update_buttons (self);
}
static void _dock_manager_tile_update_state_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
dock_manager_tile_update_state (self);
}
DockManagerTile* dock_manager_tile_construct (GType object_type, DockManagerAbstractTileObject* obj, gint icon_size) {
DockManagerTile * self = NULL;
GtkIconSize isz;
const gchar* _tmp0_ = NULL;
GtkImage* _tmp1_ = NULL;
GtkImage* _tmp2_;
const gchar* _tmp3_ = NULL;
GtkImage* _tmp4_ = NULL;
GtkImage* _tmp5_;
g_return_val_if_fail (obj != NULL, NULL);
self = (DockManagerTile*) g_object_new (object_type, "n-rows", 3, "n-columns", 3, "homogeneous", FALSE, NULL);
isz = GTK_ICON_SIZE_SMALL_TOOLBAR;
_tmp0_ = dock_manager_abstract_tile_object_get_add_button_stock (obj);
_tmp1_ = (GtkImage*) gtk_image_new_from_stock (_tmp0_, isz);
_tmp2_ = g_object_ref_sink (_tmp1_);
_g_object_unref0 (self->priv->add_image);
self->priv->add_image = _tmp2_;
_tmp3_ = dock_manager_abstract_tile_object_get_remove_button_stock (obj);
_tmp4_ = (GtkImage*) gtk_image_new_from_stock (_tmp3_, isz);
_tmp5_ = g_object_ref_sink (_tmp4_);
_g_object_unref0 (self->priv->remove_image);
self->priv->remove_image = _tmp5_;
dock_manager_tile_set_owned_object (self, obj);
g_signal_connect_object (self->priv->_owned_object, "icon-updated", (GCallback) _dock_manager_tile_set_image_dock_manager_abstract_tile_object_icon_updated, self, 0);
g_signal_connect_object (self->priv->_owned_object, "text-updated", (GCallback) _dock_manager_tile_set_text_dock_manager_abstract_tile_object_text_updated, self, 0);
g_signal_connect_object (self->priv->_owned_object, "buttons-updated", (GCallback) _dock_manager_tile_update_buttons_dock_manager_abstract_tile_object_buttons_updated, self, 0);
g_signal_connect_object ((GObject*) self->priv->_owned_object, "notify::enabled", (GCallback) _dock_manager_tile_update_state_g_object_notify, self, 0);
self->priv->icon_size = icon_size;
dock_manager_tile_build_tile (self);
return self;
}
DockManagerTile* dock_manager_tile_new (DockManagerAbstractTileObject* obj, gint icon_size) {
return dock_manager_tile_construct (DOCK_MANAGER_TYPE_TILE, obj, icon_size);
}
static void _lambda1_ (DockManagerTile* self) {
g_signal_emit_by_name (self, "active-changed");
}
static void __lambda1__gtk_button_clicked (GtkButton* _sender, gpointer self) {
_lambda1_ (self);
}
static void dock_manager_tile_build_tile (DockManagerTile* self) {
GtkImage* _tmp0_ = NULL;
GtkImage* _tmp1_;
GtkLabel* _tmp2_ = NULL;
GtkLabel* _tmp3_;
DockManagerWrapLabel* _tmp4_ = NULL;
DockManagerWrapLabel* _tmp5_;
GtkLabel* _tmp6_ = NULL;
GtkLabel* _tmp7_;
GtkHBox* _tmp8_ = NULL;
GtkBox* _tmp9_;
GtkButton* _tmp10_ = NULL;
GtkButton* _tmp11_;
g_return_if_fail (self != NULL);
gtk_container_set_border_width ((GtkContainer*) self, (guint) 5);
g_object_set ((GtkTable*) self, "row-spacing", (guint) 1, NULL);
g_object_set ((GtkTable*) self, "column-spacing", (guint) 5, NULL);
_tmp0_ = (GtkImage*) gtk_image_new ();
_tmp1_ = g_object_ref_sink (_tmp0_);
_g_object_unref0 (self->priv->tile_image);
self->priv->tile_image = _tmp1_;
g_object_set ((GtkMisc*) self->priv->tile_image, "yalign", 0.0f, NULL);
gtk_table_attach ((GtkTable*) self, (GtkWidget*) self->priv->tile_image, (guint) 0, (guint) 1, (guint) 0, (guint) 3, GTK_SHRINK, GTK_FILL | GTK_EXPAND, (guint) 0, (guint) 0);
_tmp2_ = (GtkLabel*) gtk_label_new ("");
_tmp3_ = g_object_ref_sink (_tmp2_);
_g_object_unref0 (self->priv->title);
self->priv->title = _tmp3_;
g_object_set ((GtkMisc*) self->priv->title, "xalign", 0.0f, NULL);
gtk_table_attach ((GtkTable*) self, (GtkWidget*) self->priv->title, (guint) 1, (guint) 3, (guint) 0, (guint) 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, (guint) 0, (guint) 0);
gtk_widget_show ((GtkWidget*) self->priv->title);
_tmp4_ = dock_manager_wrap_label_new ();
_tmp5_ = g_object_ref_sink (_tmp4_);
_g_object_unref0 (self->priv->description);
self->priv->description = _tmp5_;
gtk_table_attach ((GtkTable*) self, (GtkWidget*) self->priv->description, (guint) 1, (guint) 3, (guint) 1, (guint) 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, (guint) 0, (guint) 0);
gtk_widget_show ((GtkWidget*) self->priv->description);
_tmp6_ = (GtkLabel*) gtk_label_new ("");
_tmp7_ = g_object_ref_sink (_tmp6_);
_g_object_unref0 (self->priv->sub_description);
self->priv->sub_description = _tmp7_;
g_object_set ((GtkMisc*) self->priv->sub_description, "xalign", 0.0f, NULL);
gtk_table_attach ((GtkTable*) self, (GtkWidget*) self->priv->sub_description, (guint) 1, (guint) 2, (guint) 2, (guint) 3, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, (guint) 0, (guint) 4);
gtk_widget_show ((GtkWidget*) self->priv->sub_description);
dock_manager_tile_set_text (self);
_tmp8_ = (GtkHBox*) gtk_hbox_new (FALSE, 3);
_tmp9_ = (GtkBox*) g_object_ref_sink (_tmp8_);
_g_object_unref0 (self->priv->button_box);
self->priv->button_box = _tmp9_;
_tmp10_ = (GtkButton*) gtk_button_new ();
_tmp11_ = g_object_ref_sink (_tmp10_);
_g_object_unref0 (self->priv->add_remove_button);
self->priv->add_remove_button = _tmp11_;
g_signal_connect_object (self->priv->add_remove_button, "clicked", (GCallback) __lambda1__gtk_button_clicked, self, 0);
dock_manager_tile_update_buttons (self);
gtk_table_attach ((GtkTable*) self, (GtkWidget*) self->priv->button_box, (guint) 2, (guint) 3, (guint) 2, (guint) 3, GTK_SHRINK, GTK_FILL | GTK_EXPAND, (guint) 0, (guint) 0);
gtk_widget_show ((GtkWidget*) self);
dock_manager_tile_update_state (self);
}
static void dock_manager_tile_real_realize (GtkWidget* base) {
DockManagerTile * self;
GtkContainer* _tmp0_ = NULL;
GdkWindow* _tmp1_ = NULL;
self = (DockManagerTile*) base;
GTK_WIDGET_SET_FLAGS ((GtkWidget*) self, GTK_NO_WINDOW);
_tmp0_ = gtk_widget_get_parent ((GtkWidget*) self);
_tmp1_ = gtk_widget_get_window ((GtkWidget*) _tmp0_);
gtk_widget_set_window ((GtkWidget*) self, _tmp1_);
GTK_WIDGET_CLASS (dock_manager_tile_parent_class)->realize ((GtkWidget*) GTK_TABLE (self));
}
static gboolean dock_manager_tile_real_expose_event (GtkWidget* base, GdkEventExpose* event) {
DockManagerTile * self;
gboolean result = FALSE;
GtkStateType _tmp0_;
gboolean _tmp6_;
self = (DockManagerTile*) base;
_tmp0_ = gtk_widget_get_state ((GtkWidget*) self);
if (_tmp0_ == GTK_STATE_SELECTED) {
GtkWidgetFlags _tmp1_;
gboolean had_focus;
gint _tmp2_ = 0;
GtkStyle* _tmp3_ = NULL;
GtkStateType _tmp4_;
_tmp1_ = GTK_WIDGET_FLAGS ((GtkWidget*) self);
had_focus = (_tmp1_ & GTK_HAS_FOCUS) == GTK_HAS_FOCUS;
if (!had_focus) {
GTK_WIDGET_SET_FLAGS ((GtkWidget*) self, GTK_HAS_FOCUS);
}
if (self->priv->_last) {
_tmp2_ = 0;
} else {
_tmp2_ = 1;
}
_tmp3_ = gtk_widget_get_style ((GtkWidget*) self);
_tmp4_ = gtk_widget_get_state ((GtkWidget*) self);
gtk_paint_flat_box (_tmp3_, (*event).window, _tmp4_, GTK_SHADOW_NONE, &(*event).area, (GtkWidget*) self, "cell_odd", ((GtkWidget*) self)->allocation.x, ((GtkWidget*) self)->allocation.y, ((GtkWidget*) self)->allocation.width, ((GtkWidget*) self)->allocation.height - _tmp2_);
if (!had_focus) {
GTK_WIDGET_UNSET_FLAGS ((GtkWidget*) self, GTK_HAS_FOCUS);
}
}
if (!self->priv->_last) {
GtkStyle* _tmp5_ = NULL;
_tmp5_ = gtk_widget_get_style ((GtkWidget*) self);
gtk_paint_hline (_tmp5_, (*event).window, GTK_STATE_NORMAL, &(*event).area, (GtkWidget*) self, NULL, ((GtkWidget*) self)->allocation.x, ((GtkWidget*) self)->allocation.x + ((GtkWidget*) self)->allocation.width, (((GtkWidget*) self)->allocation.y + ((GtkWidget*) self)->allocation.height) - 1);
}
_tmp6_ = GTK_WIDGET_CLASS (dock_manager_tile_parent_class)->expose_event ((GtkWidget*) GTK_TABLE (self), event);
result = _tmp6_;
return result;
}
void dock_manager_tile_update_state (DockManagerTile* self) {
gboolean _tmp0_;
gboolean enabled;
GtkStateType _tmp1_;
gboolean is_selected;
gboolean _tmp2_ = FALSE;
gboolean sensitive;
GtkImage* _tmp4_ = NULL;
const gchar* _tmp5_ = NULL;
g_return_if_fail (self != NULL);
_tmp0_ = dock_manager_abstract_tile_object_get_enabled (self->priv->_owned_object);
enabled = _tmp0_;
_tmp1_ = gtk_widget_get_state ((GtkWidget*) self);
is_selected = _tmp1_ == GTK_STATE_SELECTED;
if (enabled) {
_tmp2_ = TRUE;
} else {
gboolean _tmp3_ = FALSE;
if (!enabled) {
_tmp3_ = is_selected;
} else {
_tmp3_ = FALSE;
}
_tmp2_ = _tmp3_;
}
sensitive = _tmp2_;
dock_manager_tile_set_image (self);
gtk_widget_set_sensitive ((GtkWidget*) self->priv->title, sensitive);
gtk_widget_set_sensitive ((GtkWidget*) self->priv->description, sensitive);
dock_manager_wrap_label_set_wrap (self->priv->description, is_selected);
gtk_widget_set_visible ((GtkWidget*) self->priv->sub_description, is_selected);
if (enabled) {
_tmp4_ = self->priv->remove_image;
} else {
_tmp4_ = self->priv->add_image;
}
gtk_button_set_image (self->priv->add_remove_button, (GtkWidget*) _tmp4_);
if (enabled) {
const gchar* _tmp6_ = NULL;
_tmp6_ = dock_manager_abstract_tile_object_get_remove_button_tooltip (self->priv->_owned_object);
_tmp5_ = _tmp6_;
} else {
const gchar* _tmp7_ = NULL;
_tmp7_ = dock_manager_abstract_tile_object_get_add_button_tooltip (self->priv->_owned_object);
_tmp5_ = _tmp7_;
}
gtk_widget_set_tooltip_markup ((GtkWidget*) self->priv->add_remove_button, _tmp5_);
}
void dock_manager_tile_set_selected (DockManagerTile* self, gboolean selected) {
GtkStateType _tmp0_ = 0;
g_return_if_fail (self != NULL);
if (selected) {
_tmp0_ = GTK_STATE_SELECTED;
} else {
_tmp0_ = GTK_STATE_NORMAL;
}
gtk_widget_set_state ((GtkWidget*) self, _tmp0_);
if (selected) {
gtk_widget_show_all ((GtkWidget*) self->priv->button_box);
} else {
gtk_widget_hide ((GtkWidget*) self->priv->button_box);
}
gtk_widget_set_state ((GtkWidget*) self->priv->button_box, GTK_STATE_NORMAL);
dock_manager_tile_update_state (self);
gtk_widget_queue_resize ((GtkWidget*) self);
}
static gpointer _g_object_ref0 (gpointer self) {
return self ? g_object_ref (self) : NULL;
}
static void dock_manager_tile_set_image (DockManagerTile* self) {
GdkPixbuf* pixbuf;
GdkPixbuf* _tmp0_ = NULL;
gboolean _tmp19_;
GError * _inner_error_ = NULL;
g_return_if_fail (self != NULL);
pixbuf = NULL;
_tmp0_ = dock_manager_abstract_tile_object_get_force_pixbuf (self->priv->_owned_object);
if (_tmp0_ != NULL) {
GdkPixbuf* _tmp1_ = NULL;
GdkPixbuf* _tmp2_;
GdkPixbuf* _tmp3_;
gboolean _tmp4_ = FALSE;
gint _tmp5_;
_tmp1_ = dock_manager_abstract_tile_object_get_force_pixbuf (self->priv->_owned_object);
_tmp2_ = _g_object_ref0 (_tmp1_);
_tmp3_ = _tmp2_;
_g_object_unref0 (pixbuf);
pixbuf = _tmp3_;
_tmp5_ = gdk_pixbuf_get_width (pixbuf);
if (_tmp5_ != self->priv->icon_size) {
_tmp4_ = TRUE;
} else {
gint _tmp6_;
_tmp6_ = gdk_pixbuf_get_height (pixbuf);
_tmp4_ = _tmp6_ != self->priv->icon_size;
}
if (_tmp4_) {
GdkPixbuf* _tmp7_ = NULL;
GdkPixbuf* _tmp8_;
_tmp7_ = gdk_pixbuf_scale_simple (pixbuf, self->priv->icon_size, self->priv->icon_size, GDK_INTERP_BILINEAR);
_tmp8_ = _tmp7_;
_g_object_unref0 (pixbuf);
pixbuf = _tmp8_;
}
} else {
GdkPixbuf* temp_pb = NULL;
GtkIconTheme* _tmp9_ = NULL;
GtkIconTheme* it;
const gchar* _tmp10_ = NULL;
GdkPixbuf* _tmp11_ = NULL;
GdkPixbuf* _tmp12_;
GdkPixbuf* _tmp13_;
GdkPixbuf* _tmp17_ = NULL;
GdkPixbuf* _tmp18_;
_tmp9_ = gtk_icon_theme_get_default ();
it = _tmp9_;
_tmp10_ = dock_manager_abstract_tile_object_get_icon (self->priv->_owned_object);
_tmp11_ = gtk_icon_theme_load_icon (it, _tmp10_, self->priv->icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, &_inner_error_);
_tmp12_ = _tmp11_;
if (_inner_error_ != NULL) {
goto __catch3_g_error;
}
_tmp13_ = _tmp12_;
_g_object_unref0 (temp_pb);
temp_pb = _tmp13_;
goto __finally3;
__catch3_g_error:
{
GError * err;
GdkPixbuf* _tmp14_ = NULL;
GdkPixbuf* _tmp15_;
GdkPixbuf* _tmp16_;
err = _inner_error_;
_inner_error_ = NULL;
_tmp14_ = gtk_icon_theme_load_icon (it, GTK_STOCK_FILE, self->priv->icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, &_inner_error_);
_tmp15_ = _tmp14_;
if (_inner_error_ != NULL) {
_g_error_free0 (err);
goto __finally3;
}
_tmp16_ = _tmp15_;
_g_object_unref0 (temp_pb);
temp_pb = _tmp16_;
_g_error_free0 (err);
}
__finally3:
if (_inner_error_ != NULL) {
_g_object_unref0 (temp_pb);
goto __catch2_g_error;
}
_tmp17_ = gdk_pixbuf_copy (temp_pb);
_tmp18_ = _tmp17_;
_g_object_unref0 (pixbuf);
pixbuf = _tmp18_;
_g_object_unref0 (temp_pb);
goto __finally2;
__catch2_g_error:
{
GError * err;
err = _inner_error_;
_inner_error_ = NULL;
g_warning ("tile.vala:214: %s", err->message);
_g_error_free0 (err);
}
__finally2:
if (_inner_error_ != NULL) {
_g_object_unref0 (pixbuf);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
return;
}
}
_tmp19_ = dock_manager_abstract_tile_object_get_enabled (self->priv->_owned_object);
gtk_widget_set_sensitive ((GtkWidget*) self->priv->tile_image, _tmp19_);
gtk_image_set_from_pixbuf (self->priv->tile_image, pixbuf);
gtk_widget_show ((GtkWidget*) self->priv->tile_image);
_g_object_unref0 (pixbuf);
}
static void dock_manager_tile_set_text (DockManagerTile* self) {
const gchar* _tmp0_ = NULL;
gchar* _tmp1_ = NULL;
gchar* _tmp2_;
const gchar* _tmp3_ = NULL;
gboolean _tmp4_ = FALSE;
const gchar* _tmp5_ = NULL;
g_return_if_fail (self != NULL);
_tmp0_ = dock_manager_abstract_tile_object_get_name (self->priv->_owned_object);
_tmp1_ = g_markup_printf_escaped ("%s", _tmp0_);
_tmp2_ = _tmp1_;
gtk_label_set_markup (self->priv->title, _tmp2_);
_g_free0 (_tmp2_);
_tmp3_ = dock_manager_abstract_tile_object_get_description (self->priv->_owned_object);
gtk_label_set_text ((GtkLabel*) self->priv->description, _tmp3_);
_tmp5_ = dock_manager_abstract_tile_object_get_sub_description_title (self->priv->_owned_object);
if (g_strcmp0 (_tmp5_, "") != 0) {
const gchar* _tmp6_ = NULL;
_tmp6_ = dock_manager_abstract_tile_object_get_sub_description_text (self->priv->_owned_object);
_tmp4_ = g_strcmp0 (_tmp6_, "") != 0;
} else {
_tmp4_ = FALSE;
}
if (_tmp4_) {
const gchar* _tmp7_ = NULL;
const gchar* _tmp8_ = NULL;
gchar* _tmp9_ = NULL;
gchar* _tmp10_;
_tmp7_ = dock_manager_abstract_tile_object_get_sub_description_title (self->priv->_owned_object);
_tmp8_ = dock_manager_abstract_tile_object_get_sub_description_text (self->priv->_owned_object);
_tmp9_ = g_markup_printf_escaped ("%s %s", _tmp7_, _tmp8_);
_tmp10_ = _tmp9_;
gtk_label_set_markup (self->priv->sub_description, _tmp10_);
_g_free0 (_tmp10_);
}
}
static void dock_manager_tile_update_buttons (DockManagerTile* self) {
GList* _tmp0_ = NULL;
GList* children;
GList* _tmp1_ = NULL;
gboolean _tmp2_ = FALSE;
gboolean _tmp3_;
g_return_if_fail (self != NULL);
_tmp0_ = gtk_container_get_children ((GtkContainer*) self->priv->button_box);
children = _tmp0_;
{
GList* w_collection;
GList* w_it;
w_collection = children;
for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
GtkWidget* w;
w = (GtkWidget*) w_it->data;
{
gtk_container_remove ((GtkContainer*) self->priv->button_box, w);
}
}
}
_tmp1_ = dock_manager_abstract_tile_object_get_extra_buttons (self->priv->_owned_object);
{
GList* w_collection;
GList* w_it;
w_collection = _tmp1_;
for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
GtkWidget* w;
w = (GtkWidget*) ((GtkButton*) w_it->data);
{
gtk_box_pack_start (self->priv->button_box, w, FALSE, FALSE, (guint) 0);
gtk_widget_show (w);
}
}
_g_list_free0 (w_collection);
}
_tmp3_ = dock_manager_abstract_tile_object_get_show_action_button (self->priv->_owned_object);
if (_tmp3_) {
_tmp2_ = self->priv->add_remove_button != NULL;
} else {
_tmp2_ = FALSE;
}
if (_tmp2_) {
gtk_box_pack_start (self->priv->button_box, (GtkWidget*) self->priv->add_remove_button, FALSE, FALSE, (guint) 0);
}
_g_list_free0 (children);
}
DockManagerTileView* dock_manager_tile_get_owner (DockManagerTile* self) {
DockManagerTileView* result;
g_return_val_if_fail (self != NULL, NULL);
result = self->priv->_owner;
return result;
}
void dock_manager_tile_set_owner (DockManagerTile* self, DockManagerTileView* value) {
g_return_if_fail (self != NULL);
self->priv->_owner = value;
g_object_notify ((GObject *) self, "owner");
}
DockManagerAbstractTileObject* dock_manager_tile_get_owned_object (DockManagerTile* self) {
DockManagerAbstractTileObject* result;
g_return_val_if_fail (self != NULL, NULL);
result = self->priv->_owned_object;
return result;
}
static void dock_manager_tile_set_owned_object (DockManagerTile* self, DockManagerAbstractTileObject* value) {
DockManagerAbstractTileObject* _tmp0_;
DockManagerAbstractTileObject* _tmp1_;
g_return_if_fail (self != NULL);
_tmp0_ = _g_object_ref0 (value);
_tmp1_ = _tmp0_;
_g_object_unref0 (self->priv->_owned_object);
self->priv->_owned_object = _tmp1_;
g_object_notify ((GObject *) self, "owned-object");
}
gboolean dock_manager_tile_get_last (DockManagerTile* self) {
gboolean result;
g_return_val_if_fail (self != NULL, FALSE);
result = self->priv->_last;
return result;
}
static void dock_manager_tile_set_last (DockManagerTile* self, gboolean value) {
g_return_if_fail (self != NULL);
self->priv->_last = value;
g_object_notify ((GObject *) self, "last");
}
static void dock_manager_tile_class_init (DockManagerTileClass * klass) {
dock_manager_tile_parent_class = g_type_class_peek_parent (klass);
g_type_class_add_private (klass, sizeof (DockManagerTilePrivate));
GTK_WIDGET_CLASS (klass)->realize = dock_manager_tile_real_realize;
GTK_WIDGET_CLASS (klass)->expose_event = dock_manager_tile_real_expose_event;
G_OBJECT_CLASS (klass)->get_property = _vala_dock_manager_tile_get_property;
G_OBJECT_CLASS (klass)->set_property = _vala_dock_manager_tile_set_property;
G_OBJECT_CLASS (klass)->finalize = dock_manager_tile_finalize;
g_object_class_install_property (G_OBJECT_CLASS (klass), DOCK_MANAGER_TILE_OWNER, g_param_spec_object ("owner", "owner", "owner", DOCK_MANAGER_TYPE_TILE_VIEW, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), DOCK_MANAGER_TILE_OWNED_OBJECT, g_param_spec_object ("owned-object", "owned-object", "owned-object", DOCK_MANAGER_TYPE_ABSTRACT_TILE_OBJECT, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
g_object_class_install_property (G_OBJECT_CLASS (klass), DOCK_MANAGER_TILE_LAST, g_param_spec_boolean ("last", "last", "last", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
g_signal_new ("active_changed", DOCK_MANAGER_TYPE_TILE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}
static void dock_manager_tile_instance_init (DockManagerTile * self) {
self->priv = DOCK_MANAGER_TILE_GET_PRIVATE (self);
}
static void dock_manager_tile_finalize (GObject* obj) {
DockManagerTile * self;
self = DOCK_MANAGER_TILE (obj);
_g_object_unref0 (self->priv->add_remove_button);
_g_object_unref0 (self->priv->button_box);
_g_object_unref0 (self->priv->title);
_g_object_unref0 (self->priv->tile_image);
_g_object_unref0 (self->priv->description);
_g_object_unref0 (self->priv->sub_description);
_g_object_unref0 (self->priv->add_image);
_g_object_unref0 (self->priv->remove_image);
_g_object_unref0 (self->priv->_owned_object);
G_OBJECT_CLASS (dock_manager_tile_parent_class)->finalize (obj);
}
GType dock_manager_tile_get_type (void) {
static volatile gsize dock_manager_tile_type_id__volatile = 0;
if (g_once_init_enter (&dock_manager_tile_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (DockManagerTileClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dock_manager_tile_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DockManagerTile), 0, (GInstanceInitFunc) dock_manager_tile_instance_init, NULL };
GType dock_manager_tile_type_id;
dock_manager_tile_type_id = g_type_register_static (GTK_TYPE_TABLE, "DockManagerTile", &g_define_type_info, 0);
g_once_init_leave (&dock_manager_tile_type_id__volatile, dock_manager_tile_type_id);
}
return dock_manager_tile_type_id__volatile;
}
static void _vala_dock_manager_tile_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
DockManagerTile * self;
self = DOCK_MANAGER_TILE (object);
switch (property_id) {
case DOCK_MANAGER_TILE_OWNER:
g_value_set_object (value, dock_manager_tile_get_owner (self));
break;
case DOCK_MANAGER_TILE_OWNED_OBJECT:
g_value_set_object (value, dock_manager_tile_get_owned_object (self));
break;
case DOCK_MANAGER_TILE_LAST:
g_value_set_boolean (value, dock_manager_tile_get_last (self));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void _vala_dock_manager_tile_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
DockManagerTile * self;
self = DOCK_MANAGER_TILE (object);
switch (property_id) {
case DOCK_MANAGER_TILE_OWNER:
dock_manager_tile_set_owner (self, g_value_get_object (value));
break;
case DOCK_MANAGER_TILE_OWNED_OBJECT:
dock_manager_tile_set_owned_object (self, g_value_get_object (value));
break;
case DOCK_MANAGER_TILE_LAST:
dock_manager_tile_set_last (self, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
dockmanager-0.1.0/daemon/PaxHeaders.13539/dockmanager-settings.vala 0000644 0001750 0001750 00000000124 11522625025 023240 x ustar 00 0000000 0000000 27 mtime=1296771605.468202
27 atime=1296771605.468202
30 ctime=1298497772.829548914
dockmanager-0.1.0/daemon/dockmanager-settings.vala 0000644 0001750 0001750 00000022135 11522625025 022161 0 ustar 00rico rico 0000000 0000000 /*
* Copyright (C) 2010 Michal Hruby
*
* 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 St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Authored by Michal Hruby
*
*/
using DesktopAgnostic;
namespace DockManager
{
private static int64 EMBED_XID = 0;
private static bool NO_INSTALL = false;
const OptionEntry[] options =
{
{
"embed-xid", 'x', 0, OptionArg.INT64,
out EMBED_XID, "Window XID where the GUI will be embedded.", ""
},
{
"no-install", 'i', 0, OptionArg.NONE,
out NO_INSTALL, "Don't display the install button.", ""
},
{
null
}
};
class HelperTileObject: AbstractTileObject
{
private Gtk.Button help_button;
private Gtk.Button uninstall_button;
public string helper_path { get; construct; }
public HelperTileObject (HelperInfo hi)
{
GLib.Object (name: hi.name,
description: hi.description,
icon: hi.icon_name,
helper_path: hi.path);
}
construct
{
// hmm weird, why there's no AddButtonStock? = Gtk.STOCK_EXECUTE;
sub_description_title = "Status"; // FIXME: i18n
if (helper_path.has_prefix (Environment.get_home_dir ()))
{
uninstall_button = new Gtk.Button.with_label ("Uninstall"); // FIXME: i18n
add_user_button (uninstall_button);
}
help_button = new Gtk.Button ();
help_button.set_image (
new Gtk.Image.from_stock (Gtk.STOCK_HELP,
Gtk.IconSize.SMALL_TOOLBAR));
help_button.set_tooltip_markup ("About this helper"); // FIXME: i18n
help_button.clicked.connect (() =>
{
string id = Path.get_basename (helper_path).split (".")[0];
string address = "http://wiki.go-docky.com/index.php?title=%s_Helper". printf (id);
Process.spawn_command_line_async ("xdg-open %s".printf (address));
});
add_user_button (help_button);
add_button_tooltip = "Enable this helper"; // FIXME: i18n
remove_button_tooltip = "Disable this helper"; // FIXME: i18n
}
public void update_state (bool enabled, bool running)
{
this.enabled = enabled;
if (!enabled)
{
sub_description_text = "Disabled"; // i18n!
}
else
{
sub_description_text = running ? "Running" : "Enabled"; // i18n!
}
}
}
class PreferencesBin : Gtk.VBox
{
private Gtk.ScrolledWindow scroll;
private Gtk.ComboBox combobox;
private SearchEntry search_entry;
private TileView tile_view;
private List all_helpers;
private DaemonInterface dbus_interface;
PreferencesBin ()
{
GLib.Object (spacing: 6);
}
enum HelperFilterType
{
USABLE = 0,
ENABLED,
DISABLED,
ALL,
N_TYPES
}
construct
{
all_helpers = new List ();
var hbox = new Gtk.HBox (false, 6);
combobox = new Gtk.ComboBox.text ();
// FIXME: i18n!
combobox.append_text ("Usable");
combobox.append_text ("Enabled");
combobox.append_text ("Disabled");
combobox.append_text ("All");
combobox.set_active (0);
combobox.changed.connect (this.update_helpers);
hbox.pack_start (combobox, false);
this.pack_start (hbox, false);
search_entry = new SearchEntry ();
search_entry.search_timeout = 100;
search_entry.search.connect (() => { update_helpers (); });
search_entry.clear.connect (() => { update_helpers (); });
hbox.pack_start (search_entry);
if (NO_INSTALL == false)
{
var button = new Gtk.Button.with_label ("Install");
button.set_sensitive (false);
hbox.pack_start (button, false);
}
hbox.show_all ();
scroll = new Gtk.ScrolledWindow (null, null);
scroll.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
tile_view = new TileView ();
tile_view.show ();
scroll.add_with_viewport (tile_view);
scroll.show ();
this.pack_start (scroll);
this.run ();
}
public void run ()
{
try
{
var connection = DBus.Bus.get (DBus.BusType.SESSION);
dbus_interface = (DaemonInterface)
connection.get_object (DBUS_UNIQUE_NAME,
DBUS_OBJECT_PATH_NAME,
DBUS_INTERFACE_NAME);
dbus_interface.helper_state_changed.connect (this.helper_changed);
HelperInfo[] helpers = dbus_interface.get_all_helpers ();
foreach (unowned HelperInfo? helper in helpers)
{
all_helpers.append (helper);
}
all_helpers.sort ((a, b) =>
{
unowned HelperInfo? hi1 = (HelperInfo?) a;
unowned HelperInfo? hi2 = (HelperInfo?) b;
return strcmp (hi1.name, hi2.name);
});
update_helpers ();
}
catch (DBus.Error err)
{
warning ("%s", err.message);
}
}
private void update_helpers ()
{
tile_view.clear ();
HelperFilterType filter = (HelperFilterType) combobox.get_active ();
string search_filter = search_entry.get_text ();
foreach (unowned HelperInfo? helper in all_helpers)
{
if (filter == HelperFilterType.USABLE && !helper.app_available)
{
continue;
}
if (filter == HelperFilterType.ENABLED && !helper.enabled)
{
continue;
}
if (filter == HelperFilterType.DISABLED && helper.enabled)
{
continue;
}
if (search_filter != null && search_filter != "")
{
Regex r = new Regex (search_filter, RegexCompileFlags.CASELESS);
if (!r.match (helper.description) && !r.match (helper.name))
{
continue;
}
}
var h_tile = new HelperTileObject (helper);
h_tile.update_state (helper.enabled, helper.running);
tile_view.append_tile (h_tile);
h_tile.active_changed.connect ((tile_obj) =>
{
var helper_tile_obj = tile_obj as HelperTileObject;
if (!helper_tile_obj.enabled)
{
dbus_interface.enable_helper (helper_tile_obj.helper_path);
}
else
{
dbus_interface.disable_helper (helper_tile_obj.helper_path);
}
});
}
}
private void helper_changed (string path, bool enabled, bool running)
{
debug ("%s is now %s, [%s]",
Path.get_basename (path),
enabled ? "enabled" : "disabled",
running ? "running" : "stopped");
// update internal list
foreach (unowned HelperInfo? helper in all_helpers)
{
if (helper.path == path)
{
helper.enabled = enabled;
helper.running = running;
}
}
// update TileView
List tiles = tile_view.get_tiles ();
foreach (unowned AbstractTileObject to in tiles)
{
var helper_tile = to as HelperTileObject;
if (path == helper_tile.helper_path)
{
helper_tile.update_state (enabled, running);
break;
}
}
}
public static int main (string[] argv)
{
var context = new OptionContext (" - Dockmanager-settings Options");
context.add_main_entries (options, null);
context.add_group (Gtk.get_option_group (false));
context.parse (ref argv);
Gtk.init (ref argv); // necessary?
try
{
DesktopAgnostic.VFS.init ();
PreferencesBin prefs_bin = new PreferencesBin ();
prefs_bin.show ();
if (EMBED_XID == 0)
{
var window = new Gtk.Window ();
window.set_title ("Dockmanager preferences");
window.add (prefs_bin);
window.set_default_size (400, 450);
window.border_width = 12;
window.destroy.connect (Gtk.main_quit);
window.show ();
}
else
{
var plug = new Gtk.Plug ((Gdk.NativeWindow) 0);
plug.delete_event.connect (() =>
{
Gtk.main_quit ();
return false;
});
plug.add (prefs_bin);
plug.@construct ((Gdk.NativeWindow) EMBED_XID);
plug.show ();
// the plug gets unreffed, yet it still lives... hmm?!
}
Gtk.main ();
DesktopAgnostic.VFS.shutdown ();
}
catch (GLib.Error err)
{
warning ("%s", err.message);
}
return 0;
}
}
}
dockmanager-0.1.0/daemon/PaxHeaders.13539/Makefile.am 0000644 0001750 0001750 00000000124 11443342550 020317 x ustar 00 0000000 0000000 27 mtime=1284359528.571938
27 atime=1284359528.571938
30 ctime=1298497772.789548914
dockmanager-0.1.0/daemon/Makefile.am 0000644 0001750 0001750 00000002474 11443342550 017244 0 ustar 00rico rico 0000000 0000000 include $(top_srcdir)/Makefile.schemas
# config-related
schema_in_files = dockmanager-daemon.schema-ini.in
# global
install-data-local: install-gconf-schemas
VALAFLAGS = \
--enable-experimental \
--pkg dbus-glib-1 \
--vapidir=$(LDA_VAPIDIR) \
--pkg desktop-agnostic-cfg \
--pkg gtk+-2.0 \
build.vapi \
signal-fix.vapi \
$(NULL)
dockmanager_daemondir = $(libexecdir)
dockmanager_guidir = $(bindir)
dockmanager_daemon_PROGRAMS = \
dockmanager-daemon \
$(NULL)
dockmanager_gui_PROGRAMS = \
dockmanager-settings \
$(NULL)
dockmanager_daemon_CFLAGS = $(DOCKMANAGER_DAEMON_CFLAGS)
dockmanager_daemon_LDADD = $(DOCKMANAGER_DAEMON_LIBS)
dockmanager_daemon_SOURCES = \
dockmanager-common.vala \
dockmanager-daemon.vala \
dbus-helper.vala \
$(NULL)
dockmanager_settings_CFLAGS = $(DOCKMANAGER_DAEMON_CFLAGS) $(GTK_CFLAGS)
dockmanager_settings_LDADD = $(DOCKMANAGER_DAEMON_LIBS) $(GTK_LIBS)
dockmanager_settings_SOURCES = \
dockmanager-common.vala \
dockmanager-settings.vala \
search-entry.vala \
abstract-tile-object.vala \
tile.vala \
tile-view.vala \
wrap-label.vala \
$(NULL)
# service file
servicedir = $(datarootdir)/dbus-1/services
service_DATA = dockmanager.service
EXTRA_DIST = dockmanager.service.in
CLEANFILES = \
dockmanager.service \
$(schemas_DATA) \
$(schema_in_DATA) \
$(schema_DATA) \
$(NULL)
dockmanager-0.1.0/daemon/PaxHeaders.13539/tile-view.vala 0000644 0001750 0001750 00000000124 11476112600 021032 x ustar 00 0000000 0000000 27 mtime=1291359616.728732
27 atime=1291359616.728732
30 ctime=1298497772.829548914
dockmanager-0.1.0/daemon/tile-view.vala 0000644 0001750 0001750 00000013041 11476112600 017747 0 ustar 00rico rico 0000000 0000000 using Gtk;
namespace DockManager
{
public class TileView: EventBox
{
private List tiles = new List ();
private VBox box = new VBox (false, 0);
public int icon_size { get; construct set; default = 48; }
protected int selected_index = -1;
public TileView ()
{
GLib.Object (can_focus: true, visible_window: false);
this.button_press_event.connect (this.on_button_press);
this.key_press_event.connect (this.on_key_press);
box.show ();
this.add (box);
}
public virtual void append_tile (AbstractTileObject tile_obj)
{
Tile tile = new Tile (tile_obj, this.icon_size);
tile.owner = this;
tile.active_changed.connect (this.on_tile_active_changed);
tile.size_allocate.connect (this.on_tile_size_allocated);
tile.show ();
tiles.append (tile);
box.pack_start (tile, false, false, 0);
}
public virtual void remove_tile (AbstractTileObject tile_obj)
{
unowned Tile tile = null;
foreach (unowned Tile t in tiles)
{
if (t.owned_object == tile_obj)
{
tile = t;
break;
}
}
if (tile == null)
{
warning ("Container does not own this AbstractTileObject!");
return;
}
if (selected_index == tiles.index (tile))
{
clear_selection ();
}
tile.hide ();
tile.active_changed.disconnect (this.on_tile_active_changed);
tile.size_allocate.disconnect (this.on_tile_size_allocated);
tile.owner = null;
box.remove (tile);
tiles.remove (tile);
}
public List get_tiles ()
{
var result = new List ();
foreach (unowned Tile t in tiles)
{
result.prepend (t.owned_object);
}
result.reverse ();
return result;
}
public void clear ()
{
var tiles_copy = this.get_tiles ();
foreach (unowned AbstractTileObject to in tiles_copy)
{
this.remove_tile (to);
}
}
public virtual void clear_selection ()
{
if (0 <= selected_index < tiles.length ())
{
tiles.nth_data (selected_index).set_selected (false);
}
selected_index = -1;
}
public virtual AbstractTileObject? get_current_tile ()
{
if (0 <= selected_index < tiles.length ())
{
return tiles.nth_data (selected_index).owned_object;
}
return null;
}
private bool changing_style = false;
protected override void style_set (Gtk.Style? prev_style)
{
if (changing_style) return;
changing_style = true;
base.style_set (prev_style);
parent.modify_bg (StateType.NORMAL, style.@base[StateType.NORMAL]);
changing_style = false;
}
public virtual void on_tile_active_changed (Tile tile)
{
tile.owned_object.active_changed ();
foreach (unowned Tile t in tiles)
{
t.update_state ();
}
}
public virtual void on_tile_size_allocated (Gtk.Widget w, Gdk.Rectangle alloc)
{
Tile tile = w as Tile;
ScrolledWindow? scroll = null;
scroll = this.get_parent () == null ?
null : this.get_parent ().get_parent () as ScrolledWindow;
if (scroll == null)
{
return;
}
if (tiles.index (tile) != selected_index)
{
return;
}
var va = Gdk.Rectangle ();
va.x = 0;
va.y = (int) scroll.get_vadjustment ().get_value ();
va.width = alloc.width;
va.height = this.get_parent ().allocation.height;
var va_region = Gdk.Region.rectangle (va);
if (va_region.rect_in (alloc) != Gdk.OverlapType.IN)
{
double delta = 0.0;
if (alloc.y + alloc.height > va.y + va.height)
{
delta = alloc.y + alloc.height - (va.y + va.height);
delta += this.style.ythickness * 2;
}
else if (alloc.y < va.y)
{
delta = alloc.y - va.y;
}
scroll.get_vadjustment ().set_value (va.y + delta);
this.queue_draw ();
}
}
protected bool on_button_press (Gdk.EventButton event)
{
this.has_focus = true;
clear_selection ();
for (int i=0; i