diff --git a/ABOUT-NLS b/ABOUT-NLS new file mode 100644 index 0000000..2f50c66 --- /dev/null +++ b/ABOUT-NLS @@ -0,0 +1,768 @@ +Notes on the Free Translation Project +************************************* + +Free software is going international! The Free Translation Project is +a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +Quick configuration advice +========================== + +If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + +Some packages are "localizable" when properly installed; the programs +they contain can be made to speak your own native language. Most such +packages use GNU `gettext'. Other packages have their own ways to +internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is _not_ required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will respectively bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + +As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your country by running the command +`locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + Special advice for Norwegian users: The language code for Norwegian +bokma*l changed from `no' to `nb' recently (in 2003). During the +transition period, while some message catalogs for this language are +installed under `nb' and some older ones under `no', it's recommended +for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and +older translations are used. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +Translating Teams +================= + +For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + +Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of January +2004. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es + +----------------------------------------------------+ + a2ps | [] [] [] [] | + aegis | () | + ant-phone | () | + anubis | | + ap-utils | | + aspell | [] | + bash | [] [] [] [] | + batchelor | | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] | + bluez-pin | [] [] [] | + clisp | | + clisp | [] [] [] | + console-tools | [] [] | + coreutils | [] [] [] [] | + cpio | [] [] [] | + darkstat | [] () [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | [] [] [] | + enscript | [] [] [] [] | + error | [] [] [] [] [] | + fetchmail | [] () [] [] [] [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] [] [] | + flex | [] [] [] [] | + fslint | | + gas | [] | + gawk | [] [] [] [] | + gbiff | [] | + gcal | [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gettext-examples | [] [] [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] [] [] [] [] | + gliv | | + glunarclock | [] [] | + gnubiff | [] | + gnucash | [] () [] [] | + gnucash-glossary | [] () [] | + gnupg | [] () [] [] [] [] | + gpe-aerial | [] | + gpe-beam | [] [] | + gpe-calendar | [] [] | + gpe-clock | [] [] | + gpe-conf | [] [] | + gpe-contacts | [] [] | + gpe-edit | [] | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] | + gpe-sketchbook | [] [] | + gpe-su | [] [] | + gpe-taskmanager | [] [] | + gpe-timesheet | [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] [] | + gprof | [] [] [] | + gpsdrive | () () () | + gramadoir | [] | + grep | [] [] [] [] [] [] | + gretl | [] | + gtick | [] () | + hello | [] [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | + iso_3166 | [] [] [] [] [] [] [] [] [] [] | + iso_3166_1 | [] [] [] [] [] [] | + iso_3166_2 | | + iso_3166_3 | [] | + iso_4217 | [] [] [] [] | + iso_639 | | + jpilot | [] [] [] | + jtag | | + jwhois | [] | + kbd | [] [] [] [] [] | + latrine | () | + ld | [] [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] | + libiconv | [] [] [] [] [] | + lifelines | [] () | + lilypond | [] | + lingoteach | | + lingoteach_lessons | () () | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | [] [] | + make | [] [] [] | + man-db | [] () [] [] () | + minicom | [] [] [] | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] | + nano_1_0 | [] () [] [] [] | + opcodes | [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] | + python | | + radius | [] | + recode | [] [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] [] [] [] [] [] | + sed | [] [] [] [] [] [] | + sh-utils | [] [] [] | + shared-mime-info | | + sharutils | [] [] [] [] [] [] | + silky | () | + skencil | [] () [] | + sketch | [] () [] | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] | + texinfo | [] [] [] | + textutils | [] [] [] [] | + tin | () () | + tp-robot | | + tuxpaint | [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] [] [] | + vorbis-tools | [] [] [] [] | + wastesedge | () | + wdiff | [] [] [] [] | + wget | [] [] [] [] [] [] | + xchat | [] [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] | + +----------------------------------------------------+ + af am ar az be bg bs ca cs da de el en en_GB eo es + 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68 + + et eu fa fi fr ga gl he hr hu id is it ja ko lg + +-------------------------------------------------+ + a2ps | [] [] [] () () | + aegis | | + ant-phone | [] | + anubis | [] | + ap-utils | [] | + aspell | [] [] | + bash | [] [] | + batchelor | [] [] | + bfd | [] | + binutils | [] [] | + bison | [] [] [] [] | + bluez-pin | [] [] [] [] [] | + clisp | | + clisp | [] | + console-tools | | + coreutils | [] [] [] [] [] [] | + cpio | [] [] [] [] | + darkstat | () [] [] [] | + diffutils | [] [] [] [] [] [] [] | + e2fsprogs | | + enscript | [] [] | + error | [] [] [] [] | + fetchmail | [] | + fileutils | [] [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] [] [] [] | + flex | [] [] [] | + fslint | [] | + gas | [] | + gawk | [] [] [] | + gbiff | [] | + gcal | [] | + gcc | [] | + gettext | [] [] [] | + gettext-examples | [] [] | + gettext-runtime | [] [] [] [] [] | + gettext-tools | [] [] [] | + gimp-print | [] [] | + gliv | () | + glunarclock | [] [] [] [] | + gnubiff | [] | + gnucash | () [] | + gnucash-glossary | [] | + gnupg | [] [] [] [] [] [] [] | + gpe-aerial | [] | + gpe-beam | [] | + gpe-calendar | [] [] [] | + gpe-clock | [] | + gpe-conf | [] | + gpe-contacts | [] [] | + gpe-edit | [] [] | + gpe-go | [] | + gpe-login | [] [] | + gpe-ownerinfo | [] [] [] | + gpe-sketchbook | [] | + gpe-su | [] | + gpe-taskmanager | [] | + gpe-timesheet | [] [] [] | + gpe-today | [] [] | + gpe-todo | [] [] | + gphoto2 | [] [] [] | + gprof | [] [] | + gpsdrive | () () () | + gramadoir | [] [] | + grep | [] [] [] [] [] [] [] [] [] [] [] | + gretl | [] [] | + gtick | [] [] [] | + hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] [] | + indent | [] [] [] [] [] [] [] [] [] | + iso_3166 | [] [] [] [] [] [] [] | + iso_3166_1 | [] [] [] [] [] | + iso_3166_2 | | + iso_3166_3 | | + iso_4217 | [] [] [] [] [] [] | + iso_639 | | + jpilot | [] () | + jtag | [] | + jwhois | [] [] [] [] | + kbd | [] | + latrine | [] | + ld | [] | + libc | [] [] [] [] [] [] | + libgpewidget | [] [] [] [] | + libiconv | [] [] [] [] [] [] [] [] [] | + lifelines | () | + lilypond | [] | + lingoteach | [] [] | + lingoteach_lessons | | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + mailutils | | + make | [] [] [] [] [] [] | + man-db | () () | + minicom | [] [] [] [] | + mysecretdiary | [] [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] | + opcodes | [] | + parted | [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + radius | [] | + recode | [] [] [] [] [] [] | + rpm | [] [] | + screem | | + scrollkeeper | [] | + sed | [] [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] [] [] [] | + shared-mime-info | [] [] [] | + sharutils | [] [] [] [] [] | + silky | () [] () () | + skencil | [] | + sketch | [] | + soundtracker | [] [] | + sp | [] () | + tar | [] [] [] [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] [] [] [] [] | + tin | [] () | + tp-robot | [] | + tuxpaint | [] [] [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | [] [] | + util-linux | [] [] [] [] () [] | + vorbis-tools | [] | + wastesedge | () | + wdiff | [] [] [] [] [] [] | + wget | [] [] [] [] [] [] [] | + xchat | [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] [] | + +-------------------------------------------------+ + et eu fa fi fr ga gl he hr hu id is it ja ko lg + 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0 + + lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru + +-----------------------------------------------------+ + a2ps | [] [] () () [] [] [] | + aegis | () () () | + ant-phone | [] [] | + anubis | [] [] [] [] [] [] | + ap-utils | [] () [] | + aspell | [] | + bash | [] [] [] | + batchelor | [] | + bfd | [] | + binutils | [] | + bison | [] [] [] [] [] | + bluez-pin | [] [] [] | + clisp | | + clisp | [] | + console-tools | [] | + coreutils | [] [] | + cpio | [] [] [] [] [] | + darkstat | [] [] [] [] | + diffutils | [] [] [] [] [] [] | + e2fsprogs | [] | + enscript | [] [] [] [] | + error | [] [] [] | + fetchmail | [] [] () [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] | + flex | [] [] [] [] | + fslint | [] [] | + gas | | + gawk | [] [] [] | + gbiff | [] [] | + gcal | | + gcc | | + gettext | [] [] [] | + gettext-examples | [] [] [] | + gettext-runtime | [] [] [] [] | + gettext-tools | [] [] | + gimp-print | [] | + gliv | [] [] [] | + glunarclock | [] [] [] [] | + gnubiff | [] | + gnucash | [] [] () [] | + gnucash-glossary | [] [] | + gnupg | [] | + gpe-aerial | [] [] [] [] | + gpe-beam | [] [] [] [] | + gpe-calendar | [] [] [] [] | + gpe-clock | [] [] [] [] | + gpe-conf | [] [] [] [] | + gpe-contacts | [] [] [] [] | + gpe-edit | [] [] [] [] | + gpe-go | [] [] [] | + gpe-login | [] [] [] [] | + gpe-ownerinfo | [] [] [] [] | + gpe-sketchbook | [] [] [] [] | + gpe-su | [] [] [] [] | + gpe-taskmanager | [] [] [] [] | + gpe-timesheet | [] [] [] [] | + gpe-today | [] [] [] [] | + gpe-todo | [] [] [] [] | + gphoto2 | [] | + gprof | [] [] | + gpsdrive | () () [] | + gramadoir | () [] | + grep | [] [] [] [] [] | + gretl | | + gtick | [] [] [] | + hello | [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] [] | + indent | [] [] [] [] | + iso_3166 | [] [] [] | + iso_3166_1 | [] [] | + iso_3166_2 | | + iso_3166_3 | [] | + iso_4217 | [] [] [] [] [] [] [] [] | + iso_639 | [] | + jpilot | () () | + jtag | | + jwhois | [] [] [] [] () | + kbd | [] [] [] | + latrine | [] | + ld | | + libc | [] [] [] [] | + libgpewidget | [] [] [] | + libiconv | [] [] [] [] [] | + lifelines | | + lilypond | | + lingoteach | | + lingoteach_lessons | | + lynx | [] [] [] | + m4 | [] [] [] [] [] | + mailutils | [] [] [] | + make | [] [] [] [] | + man-db | [] | + minicom | [] [] [] [] | + mysecretdiary | [] [] [] | + nano | [] [] [] [] [] | + nano_1_0 | [] [] [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] [] | + ptx | [] [] [] [] [] [] [] [] | + python | | + radius | [] [] | + recode | [] [] [] [] | + rpm | [] [] [] | + screem | | + scrollkeeper | [] [] [] [] [] | + sed | [] [] [] | + sh-utils | [] [] | + shared-mime-info | [] [] | + sharutils | [] [] | + silky | () | + skencil | [] [] | + sketch | [] [] | + soundtracker | | + sp | | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] [] | + textutils | [] [] | + tin | | + tp-robot | [] | + tuxpaint | [] [] [] [] [] [] [] [] | + unicode-han-tra... | | + unicode-transla... | | + util-linux | [] [] [] | + vorbis-tools | [] [] [] | + wastesedge | | + wdiff | [] [] [] [] [] | + wget | [] [] [] | + xchat | [] [] [] | + xfree86_xkb_xml | [] [] | + xpad | [] [] | + +-----------------------------------------------------+ + lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru + 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63 + + sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu + +-----------------------------------------------------+ + a2ps | [] [] [] [] | 16 + aegis | | 0 + ant-phone | | 3 + anubis | [] [] | 9 + ap-utils | () | 3 + aspell | | 4 + bash | | 9 + batchelor | | 3 + bfd | [] [] | 6 + binutils | [] [] [] | 8 + bison | [] [] | 14 + bluez-pin | [] [] [] | 14 + clisp | | 0 + clisp | | 5 + console-tools | | 3 + coreutils | [] [] [] [] | 16 + cpio | [] [] | 14 + darkstat | [] [] [] () () | 12 + diffutils | [] [] [] | 23 + e2fsprogs | [] [] | 6 + enscript | [] [] | 12 + error | [] [] [] | 15 + fetchmail | [] [] | 11 + fileutils | [] [] [] [] [] | 17 + findutils | [] [] [] [] [] [] | 29 + flex | [] [] | 13 + fslint | | 3 + gas | [] | 3 + gawk | [] [] | 12 + gbiff | | 4 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] | 16 + gettext-examples | [] [] [] [] [] | 14 + gettext-runtime | [] [] [] [] [] [] [] [] | 22 + gettext-tools | [] [] [] [] [] [] | 14 + gimp-print | [] [] | 10 + gliv | | 3 + glunarclock | [] [] [] | 13 + gnubiff | | 3 + gnucash | [] [] | 9 + gnucash-glossary | [] [] [] | 8 + gnupg | [] [] [] [] | 17 + gpe-aerial | [] | 7 + gpe-beam | [] | 8 + gpe-calendar | [] [] [] [] | 13 + gpe-clock | [] [] [] | 10 + gpe-conf | [] [] | 9 + gpe-contacts | [] [] [] | 11 + gpe-edit | [] [] [] [] [] | 12 + gpe-go | | 5 + gpe-login | [] [] [] [] [] | 13 + gpe-ownerinfo | [] [] [] [] | 13 + gpe-sketchbook | [] [] | 9 + gpe-su | [] [] [] | 10 + gpe-taskmanager | [] [] [] | 10 + gpe-timesheet | [] [] [] [] | 12 + gpe-today | [] [] [] [] [] | 13 + gpe-todo | [] [] [] [] | 12 + gphoto2 | [] [] [] | 11 + gprof | [] [] | 9 + gpsdrive | [] [] | 3 + gramadoir | [] | 5 + grep | [] [] [] [] | 26 + gretl | | 3 + gtick | | 7 + hello | [] [] [] [] [] | 34 + id-utils | [] [] | 12 + indent | [] [] [] [] | 21 + iso_3166 | [] [] [] [] [] [] [] | 27 + iso_3166_1 | [] [] [] | 16 + iso_3166_2 | | 0 + iso_3166_3 | | 2 + iso_4217 | [] [] [] [] [] [] | 24 + iso_639 | | 1 + jpilot | [] [] [] [] [] | 9 + jtag | [] | 2 + jwhois | () [] [] | 11 + kbd | [] [] | 11 + latrine | | 2 + ld | [] [] | 5 + libc | [] [] [] [] | 20 + libgpewidget | [] [] [] [] | 13 + libiconv | [] [] [] [] [] [] [] [] | 27 + lifelines | [] | 2 + lilypond | [] | 3 + lingoteach | | 2 + lingoteach_lessons | () | 0 + lynx | [] [] [] | 14 + m4 | [] [] | 15 + mailutils | | 5 + make | [] [] [] | 16 + man-db | [] | 5 + minicom | | 11 + mysecretdiary | [] [] | 10 + nano | [] [] [] [] | 17 + nano_1_0 | [] [] [] | 17 + opcodes | [] [] | 6 + parted | [] [] [] | 15 + ptx | [] [] | 22 + python | | 0 + radius | | 4 + recode | [] [] [] | 20 + rpm | [] [] | 9 + screem | [] [] | 2 + scrollkeeper | [] [] [] | 15 + sed | [] [] [] [] [] [] | 24 + sh-utils | [] [] | 14 + shared-mime-info | [] [] | 7 + sharutils | [] [] [] [] | 17 + silky | () | 3 + skencil | [] | 6 + sketch | [] | 6 + soundtracker | [] [] | 7 + sp | [] | 3 + tar | [] [] [] [] [] | 24 + texinfo | [] [] [] | 14 + textutils | [] [] [] [] | 16 + tin | | 1 + tp-robot | | 2 + tuxpaint | [] [] [] [] [] | 29 + unicode-han-tra... | | 0 + unicode-transla... | | 2 + util-linux | [] [] | 15 + vorbis-tools | | 8 + wastesedge | | 0 + wdiff | [] [] [] | 18 + wget | [] [] [] [] [] [] [] [] | 24 + xchat | [] [] [] [] [] | 15 + xfree86_xkb_xml | [] [] [] [] [] | 11 + xpad | | 5 + +-----------------------------------------------------+ + 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu + 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If January 2004 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +Using `gettext' in new packages +=============================== + +If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +the use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..5a8d888 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,7 @@ +Hannes Janetzek + +Derived from ibox by +The Rasterman (Carsten Haitzler) +The Enlightenment Development Team +and Engage by +Andrew Williams \ No newline at end of file diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..474fcc5 --- /dev/null +++ b/COPYING @@ -0,0 +1,28 @@ +Copyright (C) 2000 Carsten Haitzler and various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies of the Software and its Copyright notices. In addition publicly +documented acknowledgment must be given that this software has been used if no +source code of this software is made available publicly. This includes +acknowledgments in either Copyright notices, Manuals, Publicity and Marketing +documents or any documentation provided with any product containing this +software. This License does not apply to any software that links to the +libraries provided by this software (statically or dynamically), but only to +the software provided. + +Please see the COPYING.PLAIN for a plain-english explanation of this notice +and it's intent. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/COPYING-PLAIN b/COPYING-PLAIN new file mode 100644 index 0000000..c7bdf22 --- /dev/null +++ b/COPYING-PLAIN @@ -0,0 +1,34 @@ +Plain English Copyright Notice + +This file is not intended to be the actual License. The reason this file +exists is that we here are programmers and engineers. We aren't lawyers. We +provide licenses that we THINK say the right things, but we have our own +intentions at heart. This is a plain-english explanation of what those +intentions are, and if you follow them you will be within the "spirit" of +the license. + +The intent is for us to enjoy writing software that is useful to us (the +AUTHORS) and allow others to use it freely and also benefit from the work we +put into making it. We don't want to restrict others using it. They should +not *HAVE* to make the source code of the applications they write that +simply link to these libraries (be that statically or dynamically), or for +them to be limited as to what license they choose to use (be it open, closed +or anything else). But we would like to know you are using these libraries. +We simply would like to know that it has been useful to someone. This is why +we ask for acknowledgement of some sort. + +You can do what you want with the source of this software - it doesn't +matter. We still have it here for ourselves and it is open and free to use +and download and play with. It can't be taken away. We don't really mind what +you do with the source to your software. We would simply like to know that +you are using it - especially if it makes it to a commerical product. If you +simply e-mail all the AUTHORS (see COPYING and AUTHORS files) telling us, and +then make sure you include a paragraph or page in the manual for the product +with the copyright notice and state that you used this software, we will be +very happy. If you want to contribute back modifications and fixes you may have +made we will welcome those too with open arms (generally). If you want help +with changes needed, ports needed or features to be added, arrangements can +be easily made with some dialogue. + +Carsten Haitzler +Hannes Janetzek diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..139597f --- /dev/null +++ b/ChangeLog @@ -0,0 +1,2 @@ + + diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..0355501 --- /dev/null +++ b/INSTALL @@ -0,0 +1,10 @@ +COMPILING and INSTALLING: + +If you got a official release tar archive do: + ./autogen.sh + +Then to compile: + make + +To install (run this user): + make install diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..3054fcc --- /dev/null +++ b/Makefile.am @@ -0,0 +1,27 @@ +ACLOCAL_AMFLAGS = -I m4 +MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ + config.sub configure depcomp install-sh ltmain.sh \ + missing module.desktop config.rpath mkinstalldirs + +SUBDIRS = src data po + +EDJE_FLAGS = -v \ + -id $(top_srcdir) + +filesdir = $(datadir) +files_DATA = module_icon.png module.desktop e-module-ng.edj + +EXTRA_DIST = module.desktop.in \ + module_icon.png \ + e-module-ng.edc + +%.edj: %.edc + $(EDJE_CC) $(EDJE_FLAGS) $< $@ + +clean-local: + rm -rf e-module-ng.edj module.desktop *~ + +uninstall: + rm -rf $(DESTDIR)$(datadir) + + diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..6c2f9bb --- /dev/null +++ b/NEWS @@ -0,0 +1 @@ +No news is good news. diff --git a/README b/README new file mode 100644 index 0000000..76cce18 --- /dev/null +++ b/README @@ -0,0 +1,54 @@ +Itask NG Module + +This is the NG module for Enlightenment. + +It will hold all of your open applications for fast switching and +is also an apllication launcher. + + +There are three basic functionalities that you dont want to miss: +1. If you click on an icon the corresponding will be shown and + raised to the top and if its on another desk, then you will + be switched right to it. +2. If you drag an icon out of NG the App will be shown on the + current desktop. +3. Drag an icon to a pagers desk to send it there. + + +lots of other stuff that you have to find out yourself for now :) + +Installation: +./autogen.sh +make +make install + +when having troubles: check the wiki on: +http://code.google.com/p/itask-module/wiki/ItaskNG + +This module is based on ibox and on engages algorithms. though thats +where it started. you'll not find much common code anymore + + +_______ATTENTION______________________________________________ + +you SHOULD have composite manager running like for example +bling (from e_modules) xcompmgr or kompmgr(kdebase). + +run enlightenment_remote -use-composite-set 1 +and then restart e to enable the use of composite + +you dont need it, just looks way cooler B-) otherwise you should + at least some kind of grey bg so that your friends dont see the +uggly pixel shaped borders +______________________________________________________________ + + + +Use middle click on the module to get to the configuration dialog. + +!!!!!!!!!!! CONFIGURATION: ADD A BAR:!!!!!!!!!!!!!!!!!! +- enable the module in e's module configuration dialog +- Goto E-menu->Configuration->Extensions->Itask NG->Add + + + diff --git a/TODO b/TODO new file mode 100644 index 0000000..7c04478 --- /dev/null +++ b/TODO @@ -0,0 +1 @@ +- check if below fullscreen works in shaped mode \ No newline at end of file diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..abd70de --- /dev/null +++ b/autogen.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +rm -rf autom4te.cache +rm -f aclocal.m4 ltmain.sh + +echo "Running autopoint..." ; autopoint -f || : +echo "Running aclocal..." ; aclocal -I m4 $ACLOCAL_FLAGS || exit 1 +echo "Running autoheader..." ; autoheader || exit 1 +echo "Running autoconf..." ; autoconf || exit 1 +echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 +echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 + +if [ -z "$NOCONFIGURE" ]; then + ./configure "$@" +fi diff --git a/config.rpath b/config.rpath new file mode 100755 index 0000000..4db13e5 --- /dev/null +++ b/config.rpath @@ -0,0 +1,548 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2003 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + mingw* | pw32* | os2*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + newsos6) + ;; + linux*) + case $CC in + icc|ecc) + wl='-Wl,' + ;; + ccc) + wl='-Wl,' + ;; + esac + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + sco3.2v5*) + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = yes; then + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + bsdi4*) + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then + hardcode_direct=no + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10* | hpux11*) + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=no + ;; + ia64*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=no + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + *) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + sco3.2v5*) + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4.2uw2*) + hardcode_direct=yes + hardcode_minus_L=no + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + ;; + sysv5*) + hardcode_libdir_flag_spec= + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. +libname_spec='lib$name' +case "$host_os" in + aix3*) + ;; + aix4* | aix5*) + ;; + amigaos*) + ;; + beos*) + ;; + bsdi4*) + ;; + cygwin* | mingw* | pw32*) + shrext=.dll + ;; + darwin* | rhapsody*) + shrext=.dylib + ;; + dgux*) + ;; + freebsd1*) + ;; + freebsd*) + ;; + gnu*) + ;; + hpux9* | hpux10* | hpux11*) + case "$host_cpu" in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux*) + ;; + netbsd*) + ;; + newsos6) + ;; + nto-qnx) + ;; + openbsd*) + ;; + os2*) + libname_spec='$name' + shrext=.dll + ;; + osf3* | osf4* | osf5*) + ;; + sco3.2v5*) + ;; + solaris*) + ;; + sunos4*) + ;; + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + ;; + sysv4*MP*) + ;; + uts4*) + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <= 0.5.0]) +AC_ARG_WITH(edje-cc, + AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc]), + [ + v=$withval; + EDJE_CC=$v + ],[ + EDJE_CC=$(pkg-config --variable=prefix edje)/bin/edje_cc + ] +) +AC_SUBST(EDJE_CC) +AC_MSG_CHECKING([Which edje_cc to use]) +AC_MSG_RESULT(${EDJE_CC}) + +PKG_CHECK_MODULES(E, [enlightenment]) + +datadir=$(pkg-config --variable=modules enlightenment)/${PACKAGE} +AC_ARG_ENABLE(homedir-install, + AS_HELP_STRING([--enable-homedir-install], [Install module in homedir]), + [ datadir="${HOME}/.e/e/modules/${PACKAGE}" ] +) + +AC_OUTPUT([ +Makefile +data/Makefile +data/themes/Makefile +src/Makefile +module.desktop +po/Makefile.in +],[ +]) + diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 0000000..7c624f2 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,3 @@ +MAINTAINERCLEANFILES = Makefile.in +SUBDIRS = themes + diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am new file mode 100644 index 0000000..1802a4e --- /dev/null +++ b/data/themes/Makefile.am @@ -0,0 +1,18 @@ +MAINTAINERCLEANFILES = Makefile.in + +EDJE_FLAGS = -v -id $(top_srcdir)/data/themes -fd $(top_srcdir)/data/themes + +filesdir = $(datadir) +files_DATA = \ +itask-ng.edj + + +EXTRA_DIST = $(files_DATA) + +%.edj: %.edc + $(EDJE_CC) $(EDJE_FLAGS) $< $@ + +clean-local: + rm -f *.edj + + diff --git a/data/themes/bg.png b/data/themes/bg.png new file mode 100644 index 0000000..8401477 Binary files /dev/null and b/data/themes/bg.png differ diff --git a/data/themes/bg_detour.png b/data/themes/bg_detour.png new file mode 100644 index 0000000..3e4394c Binary files /dev/null and b/data/themes/bg_detour.png differ diff --git a/data/themes/clip_over.png b/data/themes/clip_over.png new file mode 100644 index 0000000..d0b6a46 Binary files /dev/null and b/data/themes/clip_over.png differ diff --git a/data/themes/ibar_im0.png b/data/themes/ibar_im0.png new file mode 100644 index 0000000..518c530 Binary files /dev/null and b/data/themes/ibar_im0.png differ diff --git a/data/themes/itask-ng.edc b/data/themes/itask-ng.edc new file mode 100644 index 0000000..408556b --- /dev/null +++ b/data/themes/itask-ng.edc @@ -0,0 +1,895 @@ +#define BG_OFFSET 20 +#define HOVER_EFFECT 0 +#define RELECTION 0 + +images +{ + image:"itask_im0.png" COMP; + image:"itask_im1.png" COMP; + image:"itask_im2.png" COMP; + image:"itask_im3.png" COMP; + image:"itask_im4.png" COMP; + image:"itask_im5.png" COMP; + image:"itask_im6.png" COMP; +} + +collections{ +group { + /* bg frame that keeps is not affected by 'Background + * Transparency' setting */ + name: "e/modules/itask-ng/frame_bottom"; + alias: "e/modules/itask-ng/frame_top"; + alias: "e/modules/itask-ng/frame_left"; + alias: "e/modules/itask-ng/frame_right"; + + data { + /* space between icons */ + item: "icon_spacing" "1"; + + /* space between boxes */ + item: "separator_width" "6"; + + /* space between screen edge and icons */ + item: "edge_offset" "6"; + + /* clip separator to background group + * change opacity with background transparency */ + item: "clip_separator" "1"; + + /* extra space between icons and bg + (required for autohide to hide the whole background) */ + item: "bg_offset" "10"; + } + + parts { + part { + name: "frame"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + visible: 0; + } + } + } +} + +#if REFLECTION +group { + name: "e/modules/itask-ng/frame_bottom"; + + data { + item: "icon_spacing" "2"; + item: "separator_width" "15"; + item: "edge_offset" "15"; + item: "clip_separator" "1"; + item: "bg_offset" "0"; + + /* clip reflection at bottom edge */ + item: "reflection_offset" "1"; + } + parts { + part { + name: "frame"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + visible: 0; + } + } + } + +} + +group { + name: "e/modules/itask-ng/bg_bottom"; + parts { + + part { + name: "bg"; + mouse_events: 0; + + description { + state: "default" 0.0; + rel1.relative: 0.0 1.0; + rel1.offset: -40 -40; + rel2.offset: 40 -1; + color: 255 255 255 255; + image { + normal: "itask_im6.png"; + border: 36 36 7 2; + } + } + } + } +} +#else +group { + name: "e/modules/itask-ng/bg_bottom"; + parts { + part { + name: "bg"; + mouse_events: 0; + + description { + state: "default" 0.0; + + rel1.offset: (-BG_OFFSET) -10; + rel2.offset: (-1 + BG_OFFSET) -1; + + image { + normal: "itask_im0.png"; + border: 18 18 20 0; + } + + } + } + } +} +#endif + +group { + name: "e/modules/itask-ng/bg_top"; + parts { + part { + name: "bg"; + mouse_events: 0; + + description { + state: "default" 0.0; + + rel1.offset: (-BG_OFFSET) 0; + rel2.offset: (-1 + BG_OFFSET) (-1 + BG_OFFSET); + + image { + normal: "itask_im1.png"; + border: 18 18 0 28; + } + + } + } + } +} +group { + name: "e/modules/itask-ng/bg_left"; + parts { + part { + name: "bg"; + mouse_events: 0; + + description { + state: "default" 0.0; + + rel1.offset: 0 (-BG_OFFSET); + rel2.offset: (-1 + BG_OFFSET) (-1 + BG_OFFSET); + + image { + normal: "itask_im2.png"; + border: 0 20 32 18; + } + } + } + } +} + +group { + name: "e/modules/itask-ng/bg_right"; + parts { + part { + name: "bg"; + mouse_events: 0; + + description { + state: "default" 0.0; + + rel1.offset: (-BG_OFFSET) (-BG_OFFSET); + rel2.offset: -1 (-1 + BG_OFFSET); + + image { + normal: "itask_im3.png"; + border: 20 0 32 18; + } + } + } + } +} + + +/* the vertical and horizontal separator image. it can be a rectangle + * as it is in this example. + */ + +#if REFLECTION +group { + name: "e/modules/itask-ng/separator_bottom"; +} +#else +group { + name: "e/modules/itask-ng/separator_bottom"; + + parts { + part { + name: "separator"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + color: 182 182 182 255; + max: 1 999; + align: 0.5 0.0; + + rel1.offset: 0 -5; + rel2.offset: 0 2; + } + } + } +} +#endif + +group { + name: "e/modules/itask-ng/separator_top"; + + parts { + part { + name: "separator"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + color: 182 182 182 255; + max: 1 999; + align: 0.5 0.0; + + rel1.offset: 0 0; + rel2.offset: 0 2; + } + } + } +} + +group { + name: "e/modules/itask-ng/separator_left"; + alias: "e/modules/itask-ng/separator_right"; + + parts { + part { + name: "separator"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + color: 182 182 182 255; + max: 999 1; + align: 0.0 0.5; + + rel1.offset: -4 0; + rel2.offset: 3 0; + } + } + } +} + +group { + name: "e/modules/itask-ng/label_bottom"; + + parts { + part { + name: "label"; + type: IMAGE; + mouse_events: 0; + clip_to: "label.clip"; + + description { + state: "default" 0.0; + align: 0.5 0.5; + color: 0 0 0 148; + max: 999 26; + + rel1 { + to: "e.text.label"; + offset: -8 -2; + } + + rel2 { + to: "e.text.label"; + offset: 4 -1; + } + + image { + normal: "itask_im4.png"; + border: 5 5 5 5; + } + } + } + + part { + name: "label_decoration"; + type: IMAGE; + mouse_events: 0; + clip_to: "label.clip"; + + description { + state: "default" 0.0; + align: 0.5 1.0; + color: 255 0 0 148; + min: 11 6; + max: 11 6; + fixed: 1 1; + + rel1 { + to: "label"; + offset: 0 0; + } + + rel2 { + to: "label"; + offset: -1 4; + } + + image { + normal: "itask_im5.png"; + } + } + } + + part { + name: "e.text.label"; + type: TEXT; + effect: SHADOW; + mouse_events: 0; + clip_to: "label.clip"; + scale: 1; + + description { + state: "default" 0.0; + align: 0.5 0.5; + color: 255 255 255 255; + color3: 0 0 0 0; + + rel1.offset: 0 2; + rel2.offset: -1 -1; + + text { + text: ""; + font: "Sans:style=Bold"; + size: 11; + min: 1 1; + align: 0.5 0.5; + text_class: "module_large"; + } + } + } + + part { + name: "label.clip"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + align: 0.5 0.5; + color: 255 255 255 0; + min: 0 33; + + rel1 { + to: "e.text.label"; + offset: -12 -4; + } + + rel2 { + to: "e.text.label"; + offset: 11 -1; + } + + } + + description { + state: "visible" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + } + } + + programs { + program { + name: "go_label_show"; + signal: "e,state,label,show"; + source: "e"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.5; + target: "label.clip"; + } + + program { + name: "go_label_hide"; + signal: "e,state,label,hide"; + source: "e"; + action: STATE_SET "default" 0.0; + transition: ACCELERATE 0.25; + target: "label.clip"; + } + } +} + +group { + name: "e/modules/itask-ng/label_top"; + parts { + part { + name: "label"; + type: IMAGE; + mouse_events: 0; + clip_to: "label.clip"; + + description { + state: "default" 0.0; + align: 0.5 0.5; + color: 0 0 0 148; + max: 999 26; + + rel1 { + to: "e.text.label"; + offset: -8 -2; + } + + rel2 { + to: "e.text.label"; + offset: 4 -1; + } + + image { + normal: "itask_im4.png"; + border: 5 5 5 5; + } + } + } + + part { + name: "e.text.label"; + type: TEXT; + effect: SHADOW; + mouse_events: 0; + clip_to: "label.clip"; + scale: 1; + + description { + state: "default" 0.0; + align: 0.5 0.5; + color: 255 255 255 255; + color3: 0 0 0 0; + + rel1.offset: 0 2; + rel2.offset: -1 -1; + + text { + text: ""; + font: "Sans:style=Bold"; + size: 11; + min: 1 1; + align: 0.5 0.5; + text_class: "module_large"; + } + } + } + + part { + name: "label.clip"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + align: 0.5 0.5; + color: 255 255 255 0; + min: 0 33; + + rel1 { + to: "e.text.label"; + offset: -12 -4; + } + + rel2 { + to: "e.text.label"; + offset: 11 -1; + } + } + + description { + state: "visible" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + } + } + + programs { + program { + name: "go_label_show"; + signal: "e,state,label,show"; + source: "e"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.5; + target: "label.clip"; + } + + program { + name: "go_label_hide"; + signal: "e,state,label,hide"; + source: "e"; + action: STATE_SET "default" 0.0; + transition: ACCELERATE 0.25; + target: "label.clip"; + } + } +} + +/* TODO needs to be supported in code */ +/* group { + * name: "e/modules/itask-ng/label_left"; + * alias: "e/modules/itask-ng/label_right"; + * } */ + +group { + name: "e/modules/itask-ng/icon"; + alias: "e/modules/itask-ng/icon_top"; + alias: "e/modules/itask-ng/icon_left"; + alias: "e/modules/itask-ng/icon_right"; + alias: "e/modules/itask-ng/icon_bottom"; + + min: 32 32; + max: 128 128; + + parts { + part { + name: "clip"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + color: 255 255 255 128; + } + description { + state: "visible" 0.0; + color: 255 255 255 255; + } + } + part { + name: "focus_clip"; + type: RECT; + clip_to: "clip"; + mouse_events: 0; + + description { + state: "default" 0.0; + color: 255 255 255 255; + } + + description { + state: "focused" 0.0; + color: 200 200 255 255; + } + } + part { + name: "iconic_clip"; + type: RECT; + clip_to: "focus_clip"; + mouse_events: 0; + + description { + state: "default" 0.0; + color: 255 255 255 255; + } + + description { + state: "iconic" 0.0; + color: 200 200 200 255; + } + } + + part { + name: "urgent_clip"; + type: RECT; + clip_to: "iconic_clip"; + mouse_events: 0; + + description { + state: "default" 0.0; + color: 255 255 255 255; + } + description { + state: "urgent" 0.0; + color: 255 180 180 255; + } + } + + part { + name: "input_clip"; + type: RECT; + clip_to: "urgent_clip"; + mouse_events: 0; + + description { + state: "default" 0.0; + color: 255 255 255 255; + } + description { + state: "mouse_down" 0.0; + color: 200 200 200 255; + } + } + + part { + name: "e.swallow.content"; + type: SWALLOW; + clip_to: "input_clip"; + description { + state: "default" 0.0; + aspect: 1.0 1.0; + aspect_preference: BOTH; + } + } + } + + programs { + program { + name: "go_show"; + signal: "e,state,item,show"; + source: "e"; + action: STATE_SET "visible" 0.0; + transition: SINUSOIDAL 0.2; + target: "clip"; + } + + program { + name: "go_hide"; + signal: "e,state,item,hide"; + source: "e"; + action: STATE_SET "default" 0.0; + transition: SINUSOIDAL 0.3; + target: "clip"; + } + + /* when minimizing an application */ + program { + name: "go_iconic1"; + signal: "e,state,taskbar,iconic,on"; + source: "e"; + action: STATE_SET "iconic" 0.0; + transition: LINEAR 0.3; + target: "iconic_clip"; + } + program { + name: "go_iconic0"; + signal: "e,state,taskbar,iconic,off"; + source: "e"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.3; + target: "iconic_clip"; + } + + /* when an application got focus */ + program { + name: "go_focused1"; + signal: "e,state,taskbar,focus,on"; + source: "e"; + action: STATE_SET "focused" 0.0; + transition: SINUSOIDAL 0.3; + target: "focus_clip"; + } + + program { + name: "go_focused0"; + signal: "e,state,taskbar,focus,off"; + source: "e"; + action: STATE_SET "default" 0.0; + transition: SINUSOIDAL 0.3; + target: "focus_clip"; + } + + /* application is sending urgent signal */ + program { + name: "go_urgent"; + signal: "e,state,taskbar,urgent,on"; + source: "e"; + action: ACTION_STOP; + target: "go_urgent1"; + target: "go_urgent0"; + after: "go_urgent1"; + } + + program { + name: "go_urgent1"; + action: STATE_SET "urgent" 0.0; + transition: LINEAR 1.0; + target: "urgent_clip"; + after: "go_urgent2"; + } + + program { + name: "go_urgent2"; + action: STATE_SET "default" 0.0; + transition: LINEAR 1.0; + target: "urgent_clip"; + after: "go_urgent1"; + } + + program { + name: "go_urgent0"; + signal: "e,state,taskbar,urgent,off"; + source: "e"; + action: ACTION_STOP; + target: "go_urgent1"; + target: "go_urgent0"; + after: "go_urgent_end"; + } + + program { + name: "go_urgent_end"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.2; + target: "urgent_clip"; + } + + program { + name: "go_mouse_down"; + signal: "e,state,mouse,down"; + source: "e"; + action: STATE_SET "mouse_down" 0.0; + transition: LINEAR 0.2; + target: "input_clip"; + after: "go_mouse_down2"; + } + program { + name: "go_mouse_down2"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.3; + target: "input_clip"; + } + /* program { + * name: "go_mouse_up"; + * signal: "e,state,mouse,up"; + * source: "e"; + * action: STATE_SET "mouse_up" 0.0; + * transition: LINEAR 0.2; + * target: "input_clip"; + * } */ + } +} + +group { + name: "e/modules/itask-ng/icon_over_top"; + alias: "e/modules/itask-ng/icon_over_left"; + alias: "e/modules/itask-ng/icon_over_right"; + alias: "e/modules/itask-ng/icon_over_bottom"; + + parts { + part { + name: "icon_clip"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + color: 255 255 255 255; + visible: 0; + rel1.offset: -256 -256; + rel2.offset: 256 256; + } + } + part { + name: "background"; + type: RECT; + mouse_events: 0; + + description { + state: "default" 0.0; + color: 255 255 255 0; + visible: 0; + } + description { + state: "visible" 0.0; + color: 255 255 255 255; + } + description { + state: "hidden" 0.0; + visible: 1; + rel1.relative: -0.5 -0.5; + rel2.relative: 1.5 1.5; + + color: 255 255 255 0; + } + description { + state: "huge" 0.0; + color: 255 255 255 0; + rel1.relative: -1.5 -1.5; + rel2.relative: 2.5 2.5; + } + } + + part { + name: "e.swallow.content"; + type: SWALLOW; + clip_to: "background"; + + description { + state: "default" 0.0; + rel1.to: "background"; + rel2.to: "background"; + } + } + } + + programs { +#if HOVER_EFFECT == 1 + program { + name: "go_active"; + signal: "e,state,mouse,in"; + source: "e"; + action: STATE_SET "visible" 0.0; + target: "background"; + after: "go_active2"; + } + program { + name: "go_active2"; + action: STATE_SET "hidden" 0.0; + transition: LINEAR 0.5; + target: "background"; + after: "go_active"; + } + program { + name: "go_passive"; + signal: "e,state,mouse,out"; + source: "e"; + action: ACTION_STOP; + target: "go_active"; + target: "go_active2"; + after: "go_passive2"; + } + program { + name: "go_passive2"; + action: STATE_SET "default" 0.0; + target: "background"; + } +#endif + program { + name: "go_big"; + action: STATE_SET "visible" 0.0; + target: "background"; + after: "go_big2"; + } + + program { + name: "go_big2"; + action: STATE_SET "huge" 0.0; + transition: DECELERATE 0.4; + target: "background"; + after: "go_big3"; + } + + program { + name: "go_big3"; + action: STATE_SET "default" 0.0; + target: "background"; + } + + program { + name: "exec_start"; + signal: "e,action,start"; + source: "e"; + action: ACTION_STOP; + target: "go_big"; + target: "go_big2"; + target: "go_big3"; + after: "go_big"; + } + } +} +} + diff --git a/data/themes/itask_im0.png b/data/themes/itask_im0.png new file mode 100644 index 0000000..89288c6 Binary files /dev/null and b/data/themes/itask_im0.png differ diff --git a/data/themes/itask_im1.png b/data/themes/itask_im1.png new file mode 100644 index 0000000..9190ea3 Binary files /dev/null and b/data/themes/itask_im1.png differ diff --git a/data/themes/itask_im2.png b/data/themes/itask_im2.png new file mode 100644 index 0000000..d8277f7 Binary files /dev/null and b/data/themes/itask_im2.png differ diff --git a/data/themes/itask_im3.png b/data/themes/itask_im3.png new file mode 100644 index 0000000..865ced3 Binary files /dev/null and b/data/themes/itask_im3.png differ diff --git a/data/themes/itask_im4.png b/data/themes/itask_im4.png new file mode 100644 index 0000000..da2fff6 Binary files /dev/null and b/data/themes/itask_im4.png differ diff --git a/data/themes/itask_im5.png b/data/themes/itask_im5.png new file mode 100644 index 0000000..bfc709b Binary files /dev/null and b/data/themes/itask_im5.png differ diff --git a/data/themes/itask_im6.png b/data/themes/itask_im6.png new file mode 100644 index 0000000..dc036a0 Binary files /dev/null and b/data/themes/itask_im6.png differ diff --git a/data/themes/module_icon.png b/data/themes/module_icon.png new file mode 100644 index 0000000..e2900e1 Binary files /dev/null and b/data/themes/module_icon.png differ diff --git a/e-module-ng.edc b/e-module-ng.edc new file mode 100644 index 0000000..b4f89b8 --- /dev/null +++ b/e-module-ng.edc @@ -0,0 +1,19 @@ +images { + image: "module_icon.png" COMP; +} +collections { + group { + name: "icon"; + parts { + part { + name: "image"; + mouse_events: 0; + description { + state: "default" 0.0; + aspect_preference: BOTH; + image.normal: "module_icon.png"; + } + } + } + } +} diff --git a/m4/.svnignore b/m4/.svnignore new file mode 100644 index 0000000..e69de29 diff --git a/module.desktop.in b/module.desktop.in new file mode 100644 index 0000000..107c2f7 --- /dev/null +++ b/module.desktop.in @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Link +Name=Itask NG +Name[de]=Itask-NG +Icon=e-module-ng +Comment=A dock that holds a taskbar and application launcher
Add instances with: Config Panel > Extensions > Itask NG +Comment[ru]=Док содержащий панель задач и запуск приложений
Добавлять экземпляры через: Панель параметров → Расширения → Itask NG +Comment[de]=Ein Dock mit einer Taskbar und Anwendungsstartern
Instanzen können hinzugefügt werden über: Enlightenment-Einstellungen → Erweiterungen → Itask-NG +Comment[it]=Contiene una taskbar ed un lanciatore di applicazioni
Per aggiungerne istanze: Pannello di configurazione → Estensioni → Itask NG +Comment[fr]=Un dock contenant une barre des tâches et un lanceur.
Pour ajouter des instances : Panneau de contrôle → Extensions → Itask NG +Comment[pt]=Uma barra de tarefas e lançador de aplicações
Adicione instâncias em: Painel de configuração > Extensões > Itask NG +X-Enlightenment-ModuleType=utils diff --git a/module_icon.png b/module_icon.png new file mode 100644 index 0000000..9a51d02 Binary files /dev/null and b/module_icon.png differ diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..7e1638a --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1 @@ +cs de fr it pt sl diff --git a/po/Makefile.in.in b/po/Makefile.in.in new file mode 100644 index 0000000..53efc5e --- /dev/null +++ b/po/Makefile.in.in @@ -0,0 +1,366 @@ +# Makefile for PO directory in any package using GNU gettext. +# Copyright (C) 1995-1997, 2000-2004 by Ulrich Drepper +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU General Public +# License but which still want to provide support for the GNU gettext +# functionality. +# Please note that the actual code of GNU gettext is covered by the GNU +# General Public License and is *not* in the public domain. +# +# Origin: gettext-0.14 + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = @datadir@ +localedir = $(datadir)/locale +gettextsrcdir = $(datadir)/gettext/po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) + +GMSGFMT = @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = @XGETTEXT@ +MSGMERGE = msgmerge +MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGINIT = msginit +MSGCONV = msgconv +MSGFILTER = msgfilter + +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +UPDATEPOFILES = @UPDATEPOFILES@ +DUMMYPOFILES = @DUMMYPOFILES@ +DISTFILES.common = Makefile.in.in remove-potcdate.sin \ +$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) +DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ +$(POFILES) $(GMOFILES) \ +$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) + +POTFILES = \ + +CATALOGS = @CATALOGS@ + +# Makevars gets inserted here. (Don't remove this line!) + +.SUFFIXES: +.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update + +.po.mo: + @echo "$(MSGFMT) -c -o $@ $<"; \ + $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ + +.po.gmo: + @lang=`echo $* | sed -e 's,.*/,,'`; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + +.sin.sed: + sed -e '/^#/d' $< > t-$@ + mv t-$@ $@ + + +all: all-@USE_NLS@ + +all-yes: stamp-po +all-no: + +# stamp-po is a timestamp denoting the last time at which the CATALOGS have +# been loosely updated. Its purpose is that when a developer or translator +# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, +# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent +# invocations of "make" will do nothing. This timestamp would not be necessary +# if updating the $(CATALOGS) would always touch them; however, the rule for +# $(POFILES) has been designed to not touch files that don't need to be +# changed. +stamp-po: $(srcdir)/$(DOMAIN).pot + test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) + @echo "touch stamp-po" + @echo timestamp > stamp-poT + @mv stamp-poT stamp-po + +# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', +# otherwise packages like GCC can not be built if only parts of the source +# have been downloaded. + +# This target rebuilds $(DOMAIN).pot; it is an expensive operation. +# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' + test ! -f $(DOMAIN).po || { \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ + sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ + if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ + else \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + else \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + } + +# This rule has no dependencies: we don't need to update $(DOMAIN).pot at +# every "make" invocation, only create it when it is missing. +# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. +$(srcdir)/$(DOMAIN).pot: + $(MAKE) $(DOMAIN).pot-update + +# This target rebuilds a PO file if $(DOMAIN).pot has changed. +# Note that a PO file is not touched if it doesn't need to be changed. +$(POFILES): $(srcdir)/$(DOMAIN).pot + @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ + if test -f "$(srcdir)/$${lang}.po"; then \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + else \ + $(MAKE) $${lang}.po-create; \ + fi + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + for file in Makevars; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +install-data-no: all +install-data-yes: all + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ + fi; \ + done; \ + done + +install-strip: install + +installdirs: installdirs-exec installdirs-data +installdirs-exec: +installdirs-data: installdirs-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi +installdirs-data-no: +installdirs-data-yes: + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + fi; \ + done; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: uninstall-exec uninstall-data +uninstall-exec: +uninstall-data: uninstall-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in $(DISTFILES.common) Makevars.template; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +uninstall-data-no: +uninstall-data-yes: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + done; \ + done + +check: all + +info dvi ps pdf html tags TAGS ctags CTAGS ID: + +mostlyclean: + rm -f remove-potcdate.sed + rm -f stamp-poT + rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f stamp-po $(GMOFILES) + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: + $(MAKE) update-po + @$(MAKE) dist2 +# This is a separate target because 'update-po' must be executed before. +dist2: $(DISTFILES) + dists="$(DISTFILES)"; \ + if test "$(PACKAGE)" = "gettext-tools"; then \ + dists="$$dists Makevars.template"; \ + fi; \ + if test -f $(srcdir)/ChangeLog; then \ + dists="$$dists ChangeLog"; \ + fi; \ + for i in 0 1 2 3 4 5 6 7 8 9; do \ + if test -f $(srcdir)/ChangeLog.$$i; then \ + dists="$$dists ChangeLog.$$i"; \ + fi; \ + done; \ + if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ + for file in $$dists; do \ + if test -f $$file; then \ + cp -p $$file $(distdir); \ + else \ + cp -p $(srcdir)/$$file $(distdir); \ + fi; \ + done + +update-po: Makefile + $(MAKE) $(DOMAIN).pot-update + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) + $(MAKE) update-gmo + +# General rule for creating PO files. + +.nop.po-create: + @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ + echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ + exit 1 + +# General rule for updating PO files. + +.nop.po-update: + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + cd $(srcdir); \ + if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +$(DUMMYPOFILES): + +update-gmo: Makefile $(GMOFILES) + @: + +Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +force: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000..543fbf7 --- /dev/null +++ b/po/Makevars @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=N_ --keyword=D_ --from-code=UTF-8 --foreign-user + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Hannes Janetzek + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = hannes.janetzek@gmail.com + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..72ee3b8 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,12 @@ +# List of source files which contain translatable strings. +src/e_mod_main.c +src/e_mod_main.h +src/ng_taskbar.c +src/ng_launcher.c +src/ng_item.c +src/ng_box.c +src/ng_border_menu.c +src/ng_gadcon.c +src/ng_config.c +src/ng_config_instances.c +src/ng_launcher.c diff --git a/po/cs.po b/po/cs.po new file mode 100644 index 0000000..794af70 --- /dev/null +++ b/po/cs.po @@ -0,0 +1,310 @@ +# Czech translation. +# This file is put in the public domain. +# quaker66@gmail.com +msgid "" +msgstr "" +"Project-Id-Version: Itask-ng\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2011-01-04 18:31+0100\n" +"PO-Revision-Date: 2011-01-04 18:48+0100\n" +"Last-Translator: quaker66 \n" +"Language-Team: Czech \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../src/e_mod_main.c:398 +msgid "Itask-NG" +msgstr "Itask-NG" + +#: ../src/e_mod_main.c:477 +msgid "Itask NG" +msgstr "Itask NG" + +#: ../src/ng_taskbar.c:731 +msgid "No name!" +msgstr "Beze jména!" + +#: ../src/ng_launcher.c:619 +msgid "Configure Bar" +msgstr "Nastavit panel" + +#: ../src/ng_launcher.c:623 +msgid "Lock Dragging" +msgstr "Uzamknout přesun" + +#: ../src/ng_launcher.c:632 +msgid "Applications" +msgstr "Aplikace" + +#: ../src/ng_launcher.c:636 +msgid "Edit Icon" +msgstr "Upravit ikonu" + +#: ../src/ng_border_menu.c:30 +msgid "Fullscreen" +msgstr "Celá obrazovka" + +#: ../src/ng_border_menu.c:45 +msgid "Close" +msgstr "Zavřít" + +#: ../src/ng_border_menu.c:66 +msgid "Maximized" +msgstr "Maximalizováno" + +#: ../src/ng_border_menu.c:86 +msgid "Uniconify" +msgstr "Deminimalizovat" + +#: ../src/ng_border_menu.c:88 +msgid "Iconify" +msgstr "Minimalizovat" + +#: ../src/ng_gadcon.c:302 +msgid "Available Gadgets" +msgstr "Dostupné gadgety" + +#: ../src/ng_gadcon.c:309 +msgid "Add Gadget" +msgstr "Přidat gadget" + +#: ../src/ng_gadcon.c:315 +msgid "Selected Gadgets" +msgstr "Vybrané gadgety" + +#: ../src/ng_gadcon.c:322 +msgid "Remove Gadget" +msgstr "Odstranit gadget" + +#: ../src/ng_gadcon.c:330 +#: ../src/ng_gadcon.c:373 +#: ../src/ng_gadcon.c:397 +msgid "Description: Unavailable" +msgstr "Popis: nedostupný" + +#: ../src/ng_config.c:101 +msgid "Itask NG Configuration" +msgstr "Volby Itask NG" + +#: ../src/ng_config.c:168 +msgid "Bar Items" +msgstr "Položky panelu" + +#: ../src/ng_config.c:177 +#: ../src/ng_config.c:634 +#: ../src/ng_config_instances.c:104 +msgid "Delete" +msgstr "Odstranit" + +#: ../src/ng_config.c:179 +#: ../src/ng_config.c:636 +#: ../src/ng_config_instances.c:106 +msgid "Configure" +msgstr "Konfigurovat" + +#: ../src/ng_config.c:181 +msgid "Up" +msgstr "Nahoru" + +#: ../src/ng_config.c:183 +msgid "Down" +msgstr "Dolů" + +#: ../src/ng_config.c:188 +#: ../src/ng_config.c:632 +#: ../src/ng_config_instances.c:102 +msgid "Add" +msgstr "Přidat" + +#: ../src/ng_config.c:190 +msgid "Taskbar" +msgstr "Správce úloh" + +#: ../src/ng_config.c:192 +msgid "Launcher" +msgstr "Spouštěč" + +#: ../src/ng_config.c:194 +msgid "Gadcon" +msgstr "Gadcon" + +#: ../src/ng_config.c:205 +msgid "Appearance" +msgstr "Vzhled" + +#: ../src/ng_config.c:206 +msgid "Show Icon Label" +msgstr "Zobrazit text ikony" + +#: ../src/ng_config.c:209 +msgid "Show Background Box" +msgstr "Zobrazit pozadí" + +#. +#. ob = e_widget_check_add(evas, D_("Mouse-Over Animation"), &(cfdata->mouse_over_anim)); +#. e_widget_framelist_object_append(of, ob); +#. +#: ../src/ng_config.c:215 +msgid "Icon Size:" +msgstr "Velikost ikon:" + +#: ../src/ng_config.c:217 +#, c-format +msgid "%1.0f px" +msgstr "%1.0f px" + +#: ../src/ng_config.c:224 +msgid "Background Transparency:" +msgstr "Průhlednost pozadí:" + +#: ../src/ng_config.c:226 +msgid "%1.0f \\%" +msgstr "%1.0f \\%" + +#: ../src/ng_config.c:234 +msgid "Stacking" +msgstr "Skládání" + +#: ../src/ng_config.c:237 +msgid "Above All" +msgstr "Nad vším" + +#: ../src/ng_config.c:239 +msgid "Below Fullscreen" +msgstr "Pod celoobrazovkovými" + +#: ../src/ng_config.c:244 +msgid "Orientation" +msgstr "Orientace" + +#: ../src/ng_config.c:260 +msgid "Zoom" +msgstr "Přiblížení" + +#: ../src/ng_config.c:261 +msgid "Zoom only one icon" +msgstr "Přiblížit pouze jednu ikonu" + +#: ../src/ng_config.c:263 +msgid "Factor:" +msgstr "Faktor:" + +#: ../src/ng_config.c:269 +msgid "Range:" +msgstr "Šířka:" + +#: ../src/ng_config.c:275 +msgid "Duration:" +msgstr "Trvání:" + +#: ../src/ng_config.c:283 +msgid "Auto Hide" +msgstr "Automaticky skrýt" + +#: ../src/ng_config.c:307 +msgid "Show Bar when Urgent" +msgstr "Zobrazit panel při naléhavé notifikaci" + +#. ob = e_widget_radio_add(evas, "Hide Below Windows", 2, rg); +#. e_widget_framelist_object_append(of, ob); +#. // e_widget_on_change_hook_set(ob, _cb_check_if_launcher_source, cfdata); +#. +#: ../src/ng_config.c:314 +msgid "Hide Timeout:" +msgstr "Časový limit skrytí:" + +#: ../src/ng_config.c:322 +msgid "Other" +msgstr "Ostatní" + +#: ../src/ng_config.c:323 +msgid "Lock Deskflip on Edge" +msgstr "Zamknout přepnutí plochy na okraji" + +#: ../src/ng_config.c:325 +msgid "Ecomorph Features" +msgstr "Funkce Ecomorphu" + +#: ../src/ng_config.c:624 +msgid "Launcher Settings" +msgstr "Nastavení spouštěče" + +#: ../src/ng_config.c:644 +msgid "Taskbar Settings" +msgstr "Nastavení správce úloh" + +#: ../src/ng_config.c:646 +msgid "Dont Show Dialogs" +msgstr "Nezobrazovat dialogy" + +#: ../src/ng_config.c:648 +msgid "Advanced Window Menu" +msgstr "Pokročilé menu okna" + +#: ../src/ng_config.c:650 +msgid "Only Show Current Desk" +msgstr "Zobrazit jen aktuální plochu" + +#: ../src/ng_config.c:652 +msgid "Group Applications by Window Class" +msgstr "Seskupovat aplikace podle třídy okna" + +#: ../src/ng_config.c:654 +msgid "Append new Applications on the right Side" +msgstr "Přidávat nové aplikace na pravém okraji" + +#: ../src/ng_config.c:659 +msgid "Iconified Applications" +msgstr "Ikonifikované aplikace" + +#: ../src/ng_config.c:734 +#: ../src/ng_config.c:774 +msgid "Itask NG Bar Configuration" +msgstr "Itask NG Panel nastavení" + +#: ../src/ng_config.c:879 +msgid "Create new Itask NG source" +msgstr "Vytvořit nový zdroj Itask NG" + +#: ../src/ng_config.c:880 +msgid "Enter a name for this new Application Launcher:" +msgstr "Zadejte jméno pro tento nový spouštěč:" + +#: ../src/ng_config.c:889 +#, c-format +msgid "You requested to delete \"%s\".

Are you sure you want to delete this ng source?" +msgstr "Opravdu chcete smazat Itask NG zdroj \"%s\"?" + +#: ../src/ng_config.c:893 +msgid "Are you sure you want to delete this Itask NG source?" +msgstr "Opravdu chcete smazat tento Itask NG zdroj?" + +#: ../src/ng_config_instances.c:64 +msgid "Itask NG Instances" +msgstr "Instance Itask NG" + +#: ../src/ng_config_instances.c:94 +msgid "Itask NG - Instances" +msgstr "Itask NG - Instance" + +#. FIXME +#. if(ci->launcher) +#. label = D_("Launcher NG"); +#. else if(ci->taskbar) +#. label = D_("Taskbar NG"); +#. +#: ../src/ng_config_instances.c:164 +msgid "Bar" +msgstr "Panel" + +#: ../src/ng_config_instances.c:363 +#, c-format +msgid "You requested to delete \"%s\".

Are you sure you want to delete this Instance?" +msgstr "Opravdu chcete smazat Itask NG instanci \"%s\"?" + +#: ../src/ng_config_instances.c:367 +msgid "Are you sure you want to delete this Instance?" +msgstr "Opravdu chcete smazat tuto Itask NG instanci?" + diff --git a/po/de.po b/po/de.po new file mode 100644 index 0000000..8096abb --- /dev/null +++ b/po/de.po @@ -0,0 +1,313 @@ +# translation of de.po to German +# Copyright (C) YEAR Enlightenment development team +# This file is distributed under the same license as the PACKAGE package. +# +# hannes janetzek , 2008. +# Fabian Nowak , 2010. +msgid "" +msgstr "" +"Project-Id-Version: de\n" +"Report-Msgid-Bugs-To: hannes.janetzek@gmail.com\n" +"POT-Creation-Date: 2011-01-15 23:37+0100\n" +"PO-Revision-Date: 2008-09-02 17:25+0200\n" +"Last-Translator: Fabian Nowak \n" +"Language-Team: German\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: src/e_mod_main.c:398 +msgid "Itask-NG" +msgstr "Itask-NG" + +#: src/e_mod_main.c:477 +msgid "Itask NG" +msgstr "Itask-NG" + +#: src/ng_taskbar.c:731 +msgid "No name!" +msgstr "Kein Name!" + +#: src/ng_launcher.c:619 +msgid "Configure Bar" +msgstr "Itask-Leiste einstellen" + +#: src/ng_launcher.c:623 +msgid "Lock Dragging" +msgstr "Verschieben von Elementen sperren" + +#: src/ng_launcher.c:632 +msgid "Applications" +msgstr "Anwendungen" + +#: src/ng_launcher.c:636 +msgid "Edit Icon" +msgstr "Icon bearbeiten" + +#: src/ng_border_menu.c:30 +msgid "Fullscreen" +msgstr "Vollbildmodus" + +#: src/ng_border_menu.c:45 +msgid "Close" +msgstr "Schließen" + +#: src/ng_border_menu.c:66 +msgid "Maximized" +msgstr "Maximiert" + +#: src/ng_border_menu.c:86 +msgid "Uniconify" +msgstr "Wiederherstellen" + +#: src/ng_border_menu.c:88 +msgid "Iconify" +msgstr "Zu Icon minimieren" + +#: src/ng_gadcon.c:302 +msgid "Available Gadgets" +msgstr "Verfügbare Helfer" + +#: src/ng_gadcon.c:309 +msgid "Add Gadget" +msgstr "Helfer hinzufügen" + +#: src/ng_gadcon.c:315 +msgid "Selected Gadgets" +msgstr "Ausgewählte Helfer" + +#: src/ng_gadcon.c:322 +msgid "Remove Gadget" +msgstr "Helfer entfernen" + +#: src/ng_gadcon.c:330 src/ng_gadcon.c:373 src/ng_gadcon.c:397 +msgid "Description: Unavailable" +msgstr "Beschreibung: Nicht verfügbar" + +#: src/ng_config.c:101 +msgid "Itask NG Configuration" +msgstr "Einstellungen für Itask-NG" + +#: src/ng_config.c:168 +msgid "Bar Items" +msgstr "Leisteninhalte" + +#: src/ng_config.c:177 src/ng_config.c:634 src/ng_config_instances.c:104 +msgid "Delete" +msgstr "Entfernen" + +#: src/ng_config.c:179 src/ng_config.c:636 src/ng_config_instances.c:106 +msgid "Configure" +msgstr "Einstellen" + +#: src/ng_config.c:181 +msgid "Up" +msgstr "Hoch" + +#: src/ng_config.c:183 +msgid "Down" +msgstr "Runter" + +#: src/ng_config.c:188 src/ng_config.c:632 src/ng_config_instances.c:102 +msgid "Add" +msgstr "Hinzufügen" + +#: src/ng_config.c:190 +msgid "Taskbar" +msgstr "Taskbar" + +#: src/ng_config.c:192 +msgid "Launcher" +msgstr "Starter" + +#: src/ng_config.c:194 +msgid "Gadcon" +msgstr "Bereich für Helfer" + +#: src/ng_config.c:205 +msgid "Appearance" +msgstr "Erscheinungsbild" + +#: src/ng_config.c:206 +msgid "Show Icon Label" +msgstr "Icon-Beschriftung zeigen" + +#: src/ng_config.c:209 +msgid "Show Background Box" +msgstr "Hintergrundbox zeigen" + +#: src/ng_config.c:215 +msgid "Icon Size:" +msgstr "Symbolgröße:" + +#: src/ng_config.c:217 +#, c-format +msgid "%1.0f px" +msgstr "%1.0f px" + +#: src/ng_config.c:224 +msgid "Background Transparency:" +msgstr "Hintergrundtransparenz:" + +#: src/ng_config.c:226 +msgid "%1.0f \\%" +msgstr "%1.0f \\%" + +#: src/ng_config.c:234 +msgid "Stacking" +msgstr "Anordnung" + +#: src/ng_config.c:237 +msgid "Above All" +msgstr "Über allen" + +#: src/ng_config.c:239 +msgid "Below Fullscreen" +msgstr "Unterhalb Vollbild" + +#: src/ng_config.c:244 +msgid "Orientation" +msgstr "Ausrichtung" + +#: src/ng_config.c:260 +msgid "Zoom" +msgstr "Vergrößerung" + +#: src/ng_config.c:261 +msgid "Zoom only one icon" +msgstr "Nur ein Symbol vergrößern" + +#: src/ng_config.c:263 +msgid "Factor:" +msgstr "Faktor:" + +#: src/ng_config.c:269 +msgid "Range:" +msgstr "Bereich:" + +#: src/ng_config.c:275 +msgid "Duration:" +msgstr "Dauer:" + +#: src/ng_config.c:283 +msgid "Auto Hide" +msgstr "Automatisch verbergen" + +#: src/ng_config.c:307 +msgid "Show Bar when Urgent" +msgstr "Leiste zeigen bei wichtigen Ereignissen" + +#: src/ng_config.c:314 +msgid "Hide Timeout:" +msgstr "Zeit bis zum Verbergen:" + +#: src/ng_config.c:322 +msgid "Other" +msgstr "Weitere Einstellungen" + +#: src/ng_config.c:323 +msgid "Lock Deskflip on Edge" +msgstr "Arbeitsflächenwechsel an Itask-Kante verhindern" + +#: src/ng_config.c:325 +msgid "Ecomorph Features" +msgstr "\"Ecomorphe\" Eigenschaften" + +#: src/ng_config.c:624 +msgid "Launcher Settings" +msgstr "Startereinstellungen" + +#: src/ng_config.c:644 +msgid "Taskbar Settings" +msgstr "Taskbar-Einstellungen" + +#: src/ng_config.c:646 +msgid "Dont Show Dialogs" +msgstr "Dialoge nicht zeigen" + +#: src/ng_config.c:648 +msgid "Advanced Window Menu" +msgstr "Erweitertes Fenstermenü" + +#: src/ng_config.c:650 +msgid "Only Show Current Desk" +msgstr "Nur die aktuelle Arbeitsfläche zeigen" + +#: src/ng_config.c:652 +msgid "Group Applications by Window Class" +msgstr "Anwendungen nach Fensterklasse gruppieren" + +#: src/ng_config.c:654 +msgid "Append new Applications on the right Side" +msgstr "Neue Anwendungen an der \"rechten\" Seite anhängen" + +#: src/ng_config.c:659 +msgid "Iconified Applications" +msgstr "Zu Icon verkleinerte Anwendungen" + +#: src/ng_config.c:734 src/ng_config.c:774 +msgid "Itask NG Bar Configuration" +msgstr "Einstellungen für Itask-NG-Taskbar" + +#: src/ng_config.c:852 +#, c-format +msgid "%i Launcher" +msgstr "%i Starter" + +#: src/ng_config.c:859 +#, c-format +msgid "%i Taskbar" +msgstr "%i Taskbar" + +#: src/ng_config.c:865 +#, c-format +msgid "%i Gadcon" +msgstr "%i Bereich für Helfer" + +#: src/ng_config.c:879 +msgid "Create new Itask NG source" +msgstr "Neue Itask-NG-Quelle erstellen" + +#: src/ng_config.c:880 +msgid "Enter a name for this new Application Launcher:" +msgstr "Geben Sie einen neuen Namen für diesen Anwendungsstarter an:" + +#: src/ng_config.c:889 +#, c-format +msgid "" +"You requested to delete \"%s\".

Are you sure you want to delete this " +"ng source?" +msgstr "Sie möchten \"%s\" löschen.

Sind Sie wirklich sicher?" + +#: src/ng_config.c:893 +msgid "Are you sure you want to delete this Itask NG source?" +msgstr "Möchten Sie diese Itask-NG-Quelle wirklich löschen?" + +#: src/ng_config_instances.c:64 +msgid "Itask NG Instances" +msgstr "Itask-NG-Instanzen" + +#: src/ng_config_instances.c:94 +msgid "Itask NG - Instances" +msgstr "Itask-NG-Instanzen" + +#: src/ng_config_instances.c:164 +msgid "Bar" +msgstr "Leiste" + +#: src/ng_config_instances.c:363 +#, c-format +msgid "" +"You requested to delete \"%s\".

Are you sure you want to delete this " +"Instance?" +msgstr "Sie möchten \"%s\" löschen.

Sind Sie wirklich sicher?" + +#: src/ng_config_instances.c:367 +msgid "Are you sure you want to delete this Instance?" +msgstr "Möchten Sie diese Instanz wirklich löschen?" + +#~ msgid "Configure Launcher" +#~ msgstr "Konfiguriere Anwendungsstarter" diff --git a/po/fr.po b/po/fr.po new file mode 100644 index 0000000..dd5d143 --- /dev/null +++ b/po/fr.po @@ -0,0 +1,340 @@ +# French translation for Itask-ng. +# This file is put in the public domain. +# batden , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Itask-ng\n" +"Report-Msgid-Bugs-To: hannes.janetzek@gmail.com\n" +"POT-Creation-Date: 2008-09-02 16:42+0200\n" +"PO-Revision-Date: 2010-07-12 10:20+0400\n" +"Last-Translator: batden \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n>1;\n" +"X-Poedit-Language: French\n" +"X-Poedit-Country: FRANCE\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: src/e_mod_main.c:338 +msgid "Itask NG" +msgstr "Itask NG" + +#: src/ng_taskbar.c:851 +msgid "No name!" +msgstr "Pas de nom !" + +#: src/ng_launcher.c:726 +msgid "Configure Bar" +msgstr "Configurer la barre" + +#: src/ng_launcher.c:733 +msgid "Configure Launcher" +msgstr "Configurer le lanceur" + +#: src/ng_launcher.c:737 +msgid "Lock Dragging" +msgstr "Verrouiller le glisser" + +#: src/ng_launcher.c:746 +msgid "Set Single Instance" +msgstr "N'autoriser qu'une seule instance" + +#: src/ng_launcher.c:752 +#: src/ng_border_menu.c:307 +msgid "Edit Icon" +msgstr "Éditer l'icone" + +#: src/ng_border_menu.c:154 +msgid "Window Locks" +msgstr "Verrous de la fenêtre" + +#: src/ng_border_menu.c:161 +msgid "Remember" +msgstr "Mémoriser" + +#: src/ng_border_menu.c:170 +msgid "Borders" +msgstr "Bordures" + +#: src/ng_border_menu.c:184 +msgid "Send to Desktop" +msgstr "Envoyer sur le bureau" + +#: src/ng_border_menu.c:196 +msgid "Pin to Desktop" +msgstr "Épingler au bureau" + +#: src/ng_border_menu.c:208 +msgid "Unpin from Desktop" +msgstr "Désépingler du bureau" + +#: src/ng_border_menu.c:241 +msgid "State" +msgstr "État" + +#: src/ng_border_menu.c:255 +#: src/ng_border_menu.c:750 +msgid "Sticky" +msgstr "Ancré" + +#: src/ng_border_menu.c:268 +#: src/ng_border_menu.c:763 +msgid "Fullscreen" +msgstr "Plein écran" + +#: src/ng_border_menu.c:288 +msgid "Skip Window List" +msgstr "Ne pas afficher dans la liste des fenêtres" + +#: src/ng_border_menu.c:312 +msgid "Add To Favorites Menu" +msgstr "Ajouter au menu des favoris" + +#: src/ng_border_menu.c:317 +msgid "Add To Launcher" +msgstr "Ajouter au lanceur" + +#: src/ng_border_menu.c:324 +msgid "Create Icon" +msgstr "Créer un icone" + +#: src/ng_border_menu.c:334 +msgid "Window Properties" +msgstr "Propriétés de la fenêtre" + +#: src/ng_border_menu.c:347 +msgid "Kill" +msgstr "Tuer" + +#: src/ng_border_menu.c:357 +#: src/ng_border_menu.c:372 +msgid "Close" +msgstr "Fermer" + +#: src/ng_border_menu.c:395 +msgid "Maximized" +msgstr "Maximisée" + +#: src/ng_border_menu.c:419 +msgid "Uniconify" +msgstr "Restaurer" + +#: src/ng_border_menu.c:421 +msgid "Iconify" +msgstr "Minimiser" + +#: src/ng_border_menu.c:737 +msgid "Shaded" +msgstr "Enroulée" + +#: src/ng_gadcon.c:429 +msgid "Available Gadgets" +msgstr "Gadgets disponibles" + +#: src/ng_gadcon.c:436 +msgid "Add Gadget" +msgstr "Ajouter un gadget" + +#: src/ng_gadcon.c:442 +msgid "Selected Gadgets" +msgstr "Gadgets sélectionnés" + +#: src/ng_gadcon.c:449 +msgid "Remove Gadget" +msgstr "Supprimer ce gadget" + +#: src/ng_gadcon.c:457 +#: src/ng_gadcon.c:492 +#: src/ng_gadcon.c:514 +msgid "Description: Unavailable" +msgstr "Description : non disponible" + +#: src/ng_config.c:83 +msgid "Itask NG Configuration" +msgstr "Configuration de Itask NG" + +#: src/ng_config.c:153 +msgid "Bar Items" +msgstr "Éléments de la barre" + +#: src/ng_config.c:161 +#: src/ng_config.c:613 +#: src/ng_config_instances.c:92 +msgid "Delete" +msgstr "Supprimer" + +#: src/ng_config.c:163 +#: src/ng_config.c:615 +#: src/ng_config_instances.c:94 +msgid "Configure" +msgstr "Configurer" + +#: src/ng_config.c:165 +msgid "Up" +msgstr "Monter" + +#: src/ng_config.c:167 +msgid "Down" +msgstr "Descendre" + +#: src/ng_config.c:174 +#: src/ng_config.c:611 +#: src/ng_config_instances.c:90 +msgid "Add" +msgstr "Ajouter" + +#: src/ng_config.c:176 +msgid "Taskbar" +msgstr "Barre des tâches" + +#: src/ng_config.c:178 +msgid "Launcher" +msgstr "Lanceur" + +#: src/ng_config.c:180 +msgid "Gadcon" +msgstr "Gadcon" + +#: src/ng_config.c:187 +msgid "Zooming" +msgstr "Zoom" + +#: src/ng_config.c:188 +msgid "Zoom only one icon" +msgstr "Ne zoomer qu'un seul icone" + +#: src/ng_config.c:190 +msgid "Zoomfactor:" +msgstr "Facteur de zoom :" + +#: src/ng_config.c:192 +#, c-format +msgid "%0.01f" +msgstr "%0.01f" + +#: src/ng_config.c:196 +msgid "Zoom Range:" +msgstr "Étendue du zoom :" + +#: src/ng_config.c:198 +#: src/ng_config.c:204 +#: src/ng_config.c:284 +#, c-format +msgid "%0.1f" +msgstr "%0.1f" + +#: src/ng_config.c:202 +msgid "Zoom Duration:" +msgstr "Durée du zoom :" + +#: src/ng_config.c:215 +msgid "Appearance" +msgstr "Aspect" + +#: src/ng_config.c:216 +msgid "Show Icon Label" +msgstr "Montrer l'étiquette de l'icone" + +#: src/ng_config.c:219 +msgid "Show Background Box" +msgstr "Afficher le fond" + +#: src/ng_config.c:225 +msgid "Icon Size:" +msgstr "Taille de l'icone :" + +#: src/ng_config.c:227 +#, c-format +msgid "%1.0f px" +msgstr "%1.0f px" + +#: src/ng_config.c:234 +msgid "Background Transparency:" +msgstr "Transparence du fond :" + +#: src/ng_config.c:236 +msgid "%1.0f \\%" +msgstr "%1.0f \\%" + +#: src/ng_config.c:261 +msgid "Hide Behavior" +msgstr "Comportement du masquage" + +#: src/ng_config.c:282 +msgid "Hide Timeout:" +msgstr "Délai avant masquage :" + +#: src/ng_config.c:291 +msgid "Orientation" +msgstr "Disposition" + +#: src/ng_config.c:603 +msgid "Launcher Settings" +msgstr "Paramétrage du lanceur" + +#: src/ng_config.c:623 +msgid "Taskbar Settings" +msgstr "Paramétrage de la barre des tâches" + +#: src/ng_config.c:625 +msgid "Dont Show Dialogs" +msgstr "Ne pas afficher les boîtes de dialogue" + +#: src/ng_config.c:627 +msgid "Advanced Window Menu" +msgstr "Menu avancé de la fenêtre" + +#: src/ng_config.c:629 +msgid "Only Show Current Desk" +msgstr "Afficher uniquement le bureau actuel" + +#: src/ng_config.c:634 +msgid "Show Iconified" +msgstr "Afficher la minimisation" + +#: src/ng_config.c:720 +#: src/ng_config.c:761 +msgid "Itask NG Bar Configuration" +msgstr "Configuration de la barre NG" + +#: src/ng_config.c:869 +msgid "Create new Itask NG source" +msgstr "Créer une nouvelle source" + +#: src/ng_config.c:870 +msgid "Enter a name for this new Application Launcher:" +msgstr "Entrer un nom pour ce nouveau lanceur :" + +#: src/ng_config.c:881 +#, c-format +msgid "You requested to delete \"%s\".

Are you sure you want to delete this ng source?" +msgstr "Vous avez demandé à supprimer « %s ».

Voulez-vous vraiment supprimer cette source ?" + +#: src/ng_config.c:885 +msgid "Are you sure you want to delete this Itask NG source?" +msgstr "Voulez-vous vraiment supprimer cette source ?" + +#: src/ng_config_instances.c:49 +msgid "Itask NG Instances" +msgstr "Instances de Itask NG" + +#: src/ng_config_instances.c:82 +msgid "Itask NG - Instances" +msgstr "Itask NG - Instances" + +#: src/ng_config_instances.c:152 +msgid "Bar" +msgstr "Barre" + +#: src/ng_config_instances.c:336 +#, c-format +msgid "You requested to delete \"%s\".

Are you sure you want to delete this Instance?" +msgstr "Vous avez demandé à supprimer « %s ».

voulez-vous vraiment le faire ?" + +#: src/ng_config_instances.c:340 +msgid "Are you sure you want to delete this Instance?" +msgstr "Voulez-vous vraiment supprimer cette instance ?" + diff --git a/po/it.po b/po/it.po new file mode 100644 index 0000000..122aa94 --- /dev/null +++ b/po/it.po @@ -0,0 +1,316 @@ +# Italian translation for E17 itask-ng module. +# This file is put in the public domain. +# Massimo Maiurana , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: Itask-ng\n" +"Report-Msgid-Bugs-To: http://trac.enlightenment.org/e\n" +"POT-Creation-Date: 2011-03-24 05:00-0700\n" +"PO-Revision-Date: 2011-03-24 13:27+0100\n" +"Last-Translator: Massimo Maiurana \n" +"Language-Team: none\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../src/e_mod_main.c:1695 ../src/e_mod_main.c:1786 +msgid "Itask-NG" +msgstr "Itask-NG" + +#: ../src/e_mod_main.c:1810 +msgid "Itask NG" +msgstr "Itask NG" + +#: ../src/ng_taskbar.c:685 +msgid "No name!" +msgstr "Nessun nome!" + +#: ../src/ng_launcher.c:528 +msgid "Configure Bar" +msgstr "Configura barra" + +#: ../src/ng_launcher.c:532 +msgid "Lock Dragging" +msgstr "Blocca trascinamento" + +#: ../src/ng_launcher.c:541 +msgid "Applications" +msgstr "Applicazioni" + +#: ../src/ng_launcher.c:545 +msgid "Edit Icon" +msgstr "Modifica icona" + +#: ../src/ng_border_menu.c:30 +msgid "Fullscreen" +msgstr "A tutto schermo" + +#: ../src/ng_border_menu.c:45 +msgid "Close" +msgstr "Chiudi" + +#: ../src/ng_border_menu.c:66 +msgid "Maximized" +msgstr "Massimizzata" + +#: ../src/ng_border_menu.c:86 +msgid "Uniconify" +msgstr "Disiconifica" + +#: ../src/ng_border_menu.c:88 +msgid "Iconify" +msgstr "Iconifica" + +#: ../src/ng_gadcon.c:299 +msgid "Available Gadgets" +msgstr "Gadget disponibili" + +#: ../src/ng_gadcon.c:306 +msgid "Add Gadget" +msgstr "Aggiungi gadget" + +#: ../src/ng_gadcon.c:312 +msgid "Selected Gadgets" +msgstr "Gadget selezionati" + +#: ../src/ng_gadcon.c:319 +msgid "Remove Gadget" +msgstr "Rimuovi gadget" + +#: ../src/ng_gadcon.c:327 ../src/ng_gadcon.c:370 ../src/ng_gadcon.c:394 +msgid "Description: Unavailable" +msgstr "Descrizione: non disponibile" + +#: ../src/ng_config.c:101 +msgid "Itask NG Configuration" +msgstr "Configurazione di Itask NG" + +#: ../src/ng_config.c:171 ../src/ng_config.c:229 +msgid "Appearance" +msgstr "Aspetto" + +#: ../src/ng_config.c:172 +msgid "Icon Size:" +msgstr "Dimensione icona:" + +#: ../src/ng_config.c:174 +#, c-format +msgid "%1.0f px" +msgstr "%1.0f px" + +#: ../src/ng_config.c:179 +msgid "Reflection Opacity:" +msgstr "Trasparenza riflesso:" + +#: ../src/ng_config.c:181 +#, c-format +msgid "%1.0f" +msgstr "%1.0f" + +#: ../src/ng_config.c:188 +msgid "Background Opacity:" +msgstr "Trasparenza sfondo:" + +#: ../src/ng_config.c:190 +msgid "%1.0f \\%" +msgstr "%1.0f \\%" + +#: ../src/ng_config.c:198 +msgid "Show Background Box" +msgstr "Mostra box di sfondo" + +#: ../src/ng_config.c:203 +msgid "Orientation" +msgstr "Orientamento" + +#: ../src/ng_config.c:205 +msgid "Bottom Edge" +msgstr "Bordo inferiore" + +#: ../src/ng_config.c:207 +msgid "Top Edge" +msgstr "Bordo superiore" + +#: ../src/ng_config.c:209 +msgid "Left Edge" +msgstr "Bordo sinistro" + +#: ../src/ng_config.c:211 +msgid "Right Edge" +msgstr "Bordo destro" + +#: ../src/ng_config.c:232 ../src/ng_config.c:251 +msgid "Zoom" +msgstr "Zoom" + +#: ../src/ng_config.c:233 +msgid "Factor:" +msgstr "Fattore:" + +#: ../src/ng_config.c:239 +msgid "Range:" +msgstr "Intervallo:" + +#: ../src/ng_config.c:245 +msgid "Duration:" +msgstr "Durata:" + +#: ../src/ng_config.c:254 ../src/ng_config.c:282 +msgid "Bar Items" +msgstr "Elementi nella barra" + +#: ../src/ng_config.c:262 ../src/ng_config.c:538 +#: ../src/ng_config_instances.c:104 +msgid "Delete" +msgstr "Elimina" + +#: ../src/ng_config.c:264 ../src/ng_config.c:540 +#: ../src/ng_config_instances.c:106 +msgid "Configure" +msgstr "Configura" + +#: ../src/ng_config.c:266 +msgid "Up" +msgstr "Su" + +#: ../src/ng_config.c:268 +msgid "Down" +msgstr "Giù" + +#: ../src/ng_config.c:273 ../src/ng_config.c:536 +#: ../src/ng_config_instances.c:102 +msgid "Add" +msgstr "Aggiungi" + +#: ../src/ng_config.c:275 +msgid "Taskbar" +msgstr "Taskbar" + +#: ../src/ng_config.c:277 +msgid "Launcher" +msgstr "Lanciatore" + +#: ../src/ng_config.c:279 +msgid "Gadcon" +msgstr "Gadcon" + +#: ../src/ng_config.c:285 ../src/ng_config.c:301 +msgid "Auto Hide" +msgstr "Nascondi automaticamente" + +#: ../src/ng_config.c:299 +msgid "Show Bar when Urgent" +msgstr "Mostra barra su Urgenti" + +#: ../src/ng_config.c:307 +msgid "Stacking" +msgstr "Livello" + +#: ../src/ng_config.c:309 +msgid "Above All" +msgstr "Sopra tutto" + +#: ../src/ng_config.c:311 +msgid "Below Fullscreen" +msgstr "Sotto finestre a tutto schermo" + +#: ../src/ng_config.c:315 ../src/ng_config.c:322 +msgid "Other" +msgstr "Altro" + +#: ../src/ng_config.c:316 +msgid "Ecomorph Features" +msgstr "Funzionalità Ecomorph" + +#: ../src/ng_config.c:318 +msgid "Show Icon Label" +msgstr "Mostra etichetta icona" + +#: ../src/ng_config.c:528 +msgid "Launcher Settings" +msgstr "Impostazioni lanciatore" + +#: ../src/ng_config.c:548 +msgid "Taskbar Settings" +msgstr "Impostazioni taskbar" + +#: ../src/ng_config.c:550 +msgid "Dont Show Dialogs" +msgstr "Non mostrare finestre dialogo" + +#: ../src/ng_config.c:553 +msgid "Advanced Window Menu" +msgstr "Menù finestra avanzato" + +#: ../src/ng_config.c:556 +msgid "Only Show Current Desk" +msgstr "Mostra solo desktop corrente" + +#: ../src/ng_config.c:559 +msgid "Group Applications by Window Class" +msgstr "Raggruppa applicazioni per classe finestra" + +#: ../src/ng_config.c:562 +msgid "Append new Applications on the right Side" +msgstr "Aggiungi nuove applicazioni sul lato destro" + +#: ../src/ng_config.c:568 +msgid "Iconified Applications" +msgstr "Applicazioni iconificate" + +#: ../src/ng_config.c:643 ../src/ng_config.c:683 +msgid "Itask NG Bar Configuration" +msgstr "Configurazione barra Itask NG" + +#: ../src/ng_config.c:788 +msgid "Create new Itask NG source" +msgstr "Crea nuova fonte per Itask NG" + +#: ../src/ng_config.c:789 +msgid "Enter a name for this new Application Launcher:" +msgstr "Inserire un nome per il nuovo lanciatore:" + +#: ../src/ng_config.c:798 +#, c-format +msgid "" +"You requested to delete \"%s\".

Are you sure you want to delete this " +"ng source?" +msgstr "" +"Avete richiesto di eliminare \"%s\".

Siete sicuri di voler eliminare " +"questa fonte?" + +#: ../src/ng_config.c:802 +msgid "Are you sure you want to delete this Itask NG source?" +msgstr "Siete sicuri di voler eliminare questa fonte per Itask NG?" + +#: ../src/ng_config_instances.c:64 +msgid "Itask NG Instances" +msgstr "Istanze di Itask NG" + +#: ../src/ng_config_instances.c:94 +msgid "Itask NG - Instances" +msgstr "Itask NG - Istanze" + +#. FIXME +#. if(ci->launcher) +#. label = D_("Launcher NG"); +#. else if(ci->taskbar) +#. label = D_("Taskbar NG"); +#. +#: ../src/ng_config_instances.c:164 +msgid "Bar" +msgstr "Barra" + +#: ../src/ng_config_instances.c:338 +#, c-format +msgid "" +"You requested to delete \"%s\".

Are you sure you want to delete this " +"Instance?" +msgstr "" +"Avete richiesto di eliminare \"%s\".

Siete sicuri di voler eliminare " +"questa istanza?" + +#: ../src/ng_config_instances.c:342 +msgid "Are you sure you want to delete this Instance?" +msgstr "Siete sicuri di voler eliminare questa istanza?" diff --git a/po/itask-ng.pot b/po/itask-ng.pot new file mode 100644 index 0000000..f6f4902 --- /dev/null +++ b/po/itask-ng.pot @@ -0,0 +1,326 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Hannes Janetzek +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: hannes.janetzek@gmail.com\n" +"POT-Creation-Date: 2008-09-02 16:42+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/e_mod_main.c:338 +msgid "Itask NG" +msgstr "" + +#: src/ng_taskbar.c:851 +msgid "No name!" +msgstr "" + +#: src/ng_launcher.c:726 +msgid "Configure Bar" +msgstr "" + +#: src/ng_launcher.c:733 +msgid "Configure Launcher" +msgstr "" + +#: src/ng_launcher.c:737 +msgid "Lock Dragging" +msgstr "" + +#: src/ng_launcher.c:746 +msgid "Set Single Instance" +msgstr "" + +#: src/ng_launcher.c:752 src/ng_border_menu.c:307 +msgid "Edit Icon" +msgstr "" + +#: src/ng_border_menu.c:154 +msgid "Window Locks" +msgstr "" + +#: src/ng_border_menu.c:161 +msgid "Remember" +msgstr "" + +#: src/ng_border_menu.c:170 +msgid "Borders" +msgstr "" + +#: src/ng_border_menu.c:184 +msgid "Send to Desktop" +msgstr "" + +#: src/ng_border_menu.c:196 +msgid "Pin to Desktop" +msgstr "" + +#: src/ng_border_menu.c:208 +msgid "Unpin from Desktop" +msgstr "" + +#: src/ng_border_menu.c:241 +msgid "State" +msgstr "" + +#: src/ng_border_menu.c:255 src/ng_border_menu.c:750 +msgid "Sticky" +msgstr "" + +#: src/ng_border_menu.c:268 src/ng_border_menu.c:763 +msgid "Fullscreen" +msgstr "" + +#: src/ng_border_menu.c:288 +msgid "Skip Window List" +msgstr "" + +#: src/ng_border_menu.c:312 +msgid "Add To Favorites Menu" +msgstr "" + +#: src/ng_border_menu.c:317 +msgid "Add To Launcher" +msgstr "" + +#: src/ng_border_menu.c:324 +msgid "Create Icon" +msgstr "" + +#: src/ng_border_menu.c:334 +msgid "Window Properties" +msgstr "" + +#: src/ng_border_menu.c:347 +msgid "Kill" +msgstr "" + +#: src/ng_border_menu.c:357 src/ng_border_menu.c:372 +msgid "Close" +msgstr "" + +#: src/ng_border_menu.c:395 +msgid "Maximized" +msgstr "" + +#: src/ng_border_menu.c:419 +msgid "Uniconify" +msgstr "" + +#: src/ng_border_menu.c:421 +msgid "Iconify" +msgstr "" + +#: src/ng_border_menu.c:737 +msgid "Shaded" +msgstr "" + +#: src/ng_gadcon.c:429 +msgid "Available Gadgets" +msgstr "" + +#: src/ng_gadcon.c:436 +msgid "Add Gadget" +msgstr "" + +#: src/ng_gadcon.c:442 +msgid "Selected Gadgets" +msgstr "" + +#: src/ng_gadcon.c:449 +msgid "Remove Gadget" +msgstr "" + +#: src/ng_gadcon.c:457 src/ng_gadcon.c:492 src/ng_gadcon.c:514 +msgid "Description: Unavailable" +msgstr "" + +#: src/ng_config.c:83 +msgid "Itask NG Configuration" +msgstr "" + +#: src/ng_config.c:153 +msgid "Bar Items" +msgstr "" + +#: src/ng_config.c:161 src/ng_config.c:613 src/ng_config_instances.c:92 +msgid "Delete" +msgstr "" + +#: src/ng_config.c:163 src/ng_config.c:615 src/ng_config_instances.c:94 +msgid "Configure" +msgstr "" + +#: src/ng_config.c:165 +msgid "Up" +msgstr "" + +#: src/ng_config.c:167 +msgid "Down" +msgstr "" + +#: src/ng_config.c:174 src/ng_config.c:611 src/ng_config_instances.c:90 +msgid "Add" +msgstr "" + +#: src/ng_config.c:176 +msgid "Taskbar" +msgstr "" + +#: src/ng_config.c:178 +msgid "Launcher" +msgstr "" + +#: src/ng_config.c:180 +msgid "Gadcon" +msgstr "" + +#: src/ng_config.c:187 +msgid "Zooming" +msgstr "" + +#: src/ng_config.c:188 +msgid "Zoom only one icon" +msgstr "" + +#: src/ng_config.c:190 +msgid "Zoomfactor:" +msgstr "" + +#: src/ng_config.c:192 +#, c-format +msgid "%0.01f" +msgstr "" + +#: src/ng_config.c:196 +msgid "Zoom Range:" +msgstr "" + +#: src/ng_config.c:198 src/ng_config.c:204 src/ng_config.c:284 +#, c-format +msgid "%0.1f" +msgstr "" + +#: src/ng_config.c:202 +msgid "Zoom Duration:" +msgstr "" + +#: src/ng_config.c:215 +msgid "Appearance" +msgstr "" + +#: src/ng_config.c:216 +msgid "Show Icon Label" +msgstr "" + +#: src/ng_config.c:219 +msgid "Show Background Box" +msgstr "" + +#: src/ng_config.c:225 +msgid "Icon Size:" +msgstr "" + +#: src/ng_config.c:227 +#, c-format +msgid "%1.0f px" +msgstr "" + +#: src/ng_config.c:234 +msgid "Background Transparency:" +msgstr "" + +#: src/ng_config.c:236 +msgid "%1.0f \\%" +msgstr "" + +#: src/ng_config.c:261 +msgid "Hide Behavior" +msgstr "" + +#: src/ng_config.c:282 +msgid "Hide Timeout:" +msgstr "" + +#: src/ng_config.c:291 +msgid "Orientation" +msgstr "" + +#: src/ng_config.c:603 +msgid "Launcher Settings" +msgstr "" + +#: src/ng_config.c:623 +msgid "Taskbar Settings" +msgstr "" + +#: src/ng_config.c:625 +msgid "Dont Show Dialogs" +msgstr "" + +#: src/ng_config.c:627 +msgid "Advanced Window Menu" +msgstr "" + +#: src/ng_config.c:629 +msgid "Only Show Current Desk" +msgstr "" + +#: src/ng_config.c:634 +msgid "Show Iconified" +msgstr "" + +#: src/ng_config.c:720 src/ng_config.c:761 +msgid "Itask NG Bar Configuration" +msgstr "" + +#: src/ng_config.c:869 +msgid "Create new Itask NG source" +msgstr "" + +#: src/ng_config.c:870 +msgid "Enter a name for this new Application Launcher:" +msgstr "" + +#: src/ng_config.c:881 +#, c-format +msgid "" +"You requested to delete \"%s\".

Are you sure you want to delete this " +"ng source?" +msgstr "" + +#: src/ng_config.c:885 +msgid "Are you sure you want to delete this Itask NG source?" +msgstr "" + +#: src/ng_config_instances.c:49 +msgid "Itask NG Instances" +msgstr "" + +#: src/ng_config_instances.c:82 +msgid "Itask NG - Instances" +msgstr "" + +#: src/ng_config_instances.c:152 +msgid "Bar" +msgstr "" + +#: src/ng_config_instances.c:336 +#, c-format +msgid "" +"You requested to delete \"%s\".

Are you sure you want to delete this " +"Instance?" +msgstr "" + +#: src/ng_config_instances.c:340 +msgid "Are you sure you want to delete this Instance?" +msgstr "" diff --git a/po/pt.po b/po/pt.po new file mode 100644 index 0000000..dda477f --- /dev/null +++ b/po/pt.po @@ -0,0 +1,327 @@ +# Portuguese translation for itaskng +# This file is distributed under the same license as the enlightenment package. +# +# Sérgio Marques , 2010. +# Sérgio Marques , 2010. +msgid "" +msgstr "" +"Project-Id-Version: Itask-ng\n" +"Report-Msgid-Bugs-To: http://trac.enlightenment.org/e\n" +"POT-Creation-Date: 2011-03-18 23:00-0700\n" +"PO-Revision-Date: 2011-03-24 02:10-0000\n" +"Last-Translator: Sérgio Marques \n" +"Language-Team: Portuguese <>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Poedit-Language: Portuguese\n" +"X-Poedit-Country: Portugal\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Generator: Lokalize 1.1\n" + +#: ../src/e_mod_main.c:1695 +#: ../src/e_mod_main.c:1786 +msgid "Itask-NG" +msgstr "Itask-NG" + +#: ../src/e_mod_main.c:1810 +msgid "Itask NG" +msgstr "Itask NG" + +#: ../src/ng_taskbar.c:701 +msgid "No name!" +msgstr "Sem nome!" + +#: ../src/ng_launcher.c:538 +msgid "Configure Bar" +msgstr "Configurar barra" + +#: ../src/ng_launcher.c:542 +msgid "Lock Dragging" +msgstr "Bloquear o arrastamento" + +#: ../src/ng_launcher.c:551 +msgid "Applications" +msgstr "Aplicações" + +#: ../src/ng_launcher.c:555 +msgid "Edit Icon" +msgstr "Editar ícone" + +#: ../src/ng_border_menu.c:30 +msgid "Fullscreen" +msgstr "Ecrã completo" + +#: ../src/ng_border_menu.c:45 +msgid "Close" +msgstr "Fechar" + +#: ../src/ng_border_menu.c:66 +msgid "Maximized" +msgstr "Maximizada" + +#: ../src/ng_border_menu.c:86 +msgid "Uniconify" +msgstr "Restaurar" + +#: ../src/ng_border_menu.c:88 +msgid "Iconify" +msgstr "Minimizar" + +#: ../src/ng_gadcon.c:299 +msgid "Available Gadgets" +msgstr "\"Gadgets\" disponíveis" + +#: ../src/ng_gadcon.c:306 +msgid "Add Gadget" +msgstr "Adicionar \"gadget\"" + +#: ../src/ng_gadcon.c:312 +msgid "Selected Gadgets" +msgstr "\"Gadgets\" selecionados" + +#: ../src/ng_gadcon.c:319 +msgid "Remove Gadget" +msgstr "Remover \"gadget\"" + +#: ../src/ng_gadcon.c:327 +#: ../src/ng_gadcon.c:370 +#: ../src/ng_gadcon.c:394 +msgid "Description: Unavailable" +msgstr "Descrição: indisponível" + +#: ../src/ng_config.c:101 +msgid "Itask NG Configuration" +msgstr "Configuração do Itask NG" + +#: ../src/ng_config.c:171 +#: ../src/ng_config.c:229 +msgid "Appearance" +msgstr "Aparência" + +#: ../src/ng_config.c:172 +msgid "Icon Size:" +msgstr "Tamanho dos ícones:" + +#: ../src/ng_config.c:174 +#, c-format +msgid "%1.0f px" +msgstr "%1.0f px" + +#: ../src/ng_config.c:179 +msgid "Reflection Opacity:" +msgstr "Opacidade do reflexo:" + +#: ../src/ng_config.c:181 +#, c-format +msgid "%1.0f" +msgstr "%1.0f" + +#: ../src/ng_config.c:188 +msgid "Background Opacity:" +msgstr "Opacidade do fundo:" + +#: ../src/ng_config.c:190 +msgid "%1.0f \\%" +msgstr "%1.0f \\%" + +#: ../src/ng_config.c:198 +msgid "Show Background Box" +msgstr "Mostrar caixa de fundo" + +#: ../src/ng_config.c:203 +msgid "Orientation" +msgstr "Orientação" + +#: ../src/ng_config.c:205 +msgid "Bottom Edge" +msgstr "Limite inferior" + +#: ../src/ng_config.c:207 +msgid "Top Edge" +msgstr "Limite superior" + +#: ../src/ng_config.c:209 +msgid "Left Edge" +msgstr "Limite esquerdo" + +#: ../src/ng_config.c:211 +msgid "Right Edge" +msgstr "Limite direito" + +#: ../src/ng_config.c:232 +#: ../src/ng_config.c:251 +msgid "Zoom" +msgstr "Ampliação" + +#: ../src/ng_config.c:233 +msgid "Factor:" +msgstr "Fator:" + +#: ../src/ng_config.c:239 +msgid "Range:" +msgstr "Intervalo:" + +#: ../src/ng_config.c:245 +msgid "Duration:" +msgstr "Duração:" + +#: ../src/ng_config.c:254 +#: ../src/ng_config.c:282 +msgid "Bar Items" +msgstr "Itens na barra" + +#: ../src/ng_config.c:262 +#: ../src/ng_config.c:538 +#: ../src/ng_config_instances.c:104 +msgid "Delete" +msgstr "Apagar" + +#: ../src/ng_config.c:264 +#: ../src/ng_config.c:540 +#: ../src/ng_config_instances.c:106 +msgid "Configure" +msgstr "Configurar" + +#: ../src/ng_config.c:266 +msgid "Up" +msgstr "Cima" + +#: ../src/ng_config.c:268 +msgid "Down" +msgstr "Baixo" + +#: ../src/ng_config.c:273 +#: ../src/ng_config.c:536 +#: ../src/ng_config_instances.c:102 +msgid "Add" +msgstr "Adicionar" + +#: ../src/ng_config.c:275 +msgid "Taskbar" +msgstr "Barra de tarefas" + +#: ../src/ng_config.c:277 +msgid "Launcher" +msgstr "Lançador" + +#: ../src/ng_config.c:279 +msgid "Gadcon" +msgstr "Gadcon" + +#: ../src/ng_config.c:285 +#: ../src/ng_config.c:301 +msgid "Auto Hide" +msgstr "Ocultar automaticamente" + +#: ../src/ng_config.c:299 +msgid "Show Bar when Urgent" +msgstr "Mostrar a barra se for urgente" + +#: ../src/ng_config.c:307 +msgid "Stacking" +msgstr "Empilhamento" + +#: ../src/ng_config.c:309 +msgid "Above All" +msgstr "Acima de tudo" + +#: ../src/ng_config.c:311 +msgid "Below Fullscreen" +msgstr "Por baixo de ecrã completo" + +#: ../src/ng_config.c:315 +#: ../src/ng_config.c:322 +msgid "Other" +msgstr "Outras" + +#: ../src/ng_config.c:316 +msgid "Ecomorph Features" +msgstr "Funcionalidades Ecomorph" + +#: ../src/ng_config.c:318 +msgid "Show Icon Label" +msgstr "Mostrar texto nos ícones" + +#: ../src/ng_config.c:528 +msgid "Launcher Settings" +msgstr "Definições do lançador" + +#: ../src/ng_config.c:548 +msgid "Taskbar Settings" +msgstr "Definições da barra de tarefas" + +#: ../src/ng_config.c:550 +msgid "Dont Show Dialogs" +msgstr "Não mostrar diálogos" + +#: ../src/ng_config.c:553 +msgid "Advanced Window Menu" +msgstr "Menu avançado" + +#: ../src/ng_config.c:556 +msgid "Only Show Current Desk" +msgstr "Mostrar apenas na área de trabalho atual" + +#: ../src/ng_config.c:559 +msgid "Group Applications by Window Class" +msgstr "Agrupar aplicações por classes de janela" + +#: ../src/ng_config.c:562 +msgid "Append new Applications on the right Side" +msgstr "Colocar as novas aplicações no lado direito" + +#: ../src/ng_config.c:568 +msgid "Iconified Applications" +msgstr "Aplicações miniminizadas" + +#: ../src/ng_config.c:643 +#: ../src/ng_config.c:683 +msgid "Itask NG Bar Configuration" +msgstr "Configuração da barra Itask NG" + +#: ../src/ng_config.c:788 +msgid "Create new Itask NG source" +msgstr "Criar nova fonte Itask NG" + +#: ../src/ng_config.c:789 +msgid "Enter a name for this new Application Launcher:" +msgstr "Indique o nome para este lançador de aplicações:" + +#: ../src/ng_config.c:798 +#, c-format +msgid "You requested to delete \"%s\".

Are you sure you want to delete this ng source?" +msgstr "Solicitou a eliminação de \"%s\".

Tem a certeza que quer eliminar esta fonte?" + +#: ../src/ng_config.c:802 +msgid "Are you sure you want to delete this Itask NG source?" +msgstr "Tem a certeza que quer eliminar esta fonte Itask NG?" + +#: ../src/ng_config_instances.c:64 +msgid "Itask NG Instances" +msgstr "Instâncias Itask NG" + +#: ../src/ng_config_instances.c:94 +msgid "Itask NG - Instances" +msgstr "Itask NG - Instâncias" + +#. FIXME +#. if(ci->launcher) +#. label = D_("Launcher NG"); +#. else if(ci->taskbar) +#. label = D_("Taskbar NG"); +#. +#: ../src/ng_config_instances.c:164 +msgid "Bar" +msgstr "Barra" + +#: ../src/ng_config_instances.c:338 +#, c-format +msgid "You requested to delete \"%s\".

Are you sure you want to delete this Instance?" +msgstr "Solicitou a eliminação de \"%s\".

Tem a certeza que quer eliminar esta instância?" + +#: ../src/ng_config_instances.c:342 +msgid "Are you sure you want to delete this Instance?" +msgstr "Tem a certeza que quer eliminar esta instância?" + diff --git a/po/remove-potcdate.sed b/po/remove-potcdate.sed new file mode 100644 index 0000000..edb38d7 --- /dev/null +++ b/po/remove-potcdate.sed @@ -0,0 +1,11 @@ +/^"POT-Creation-Date: .*"$/{ +x +s/P/P/ +ta +g +d +bb +:a +x +:b +} diff --git a/po/sl.po b/po/sl.po new file mode 100644 index 0000000..cfcad7b --- /dev/null +++ b/po/sl.po @@ -0,0 +1,306 @@ +# Slovenian translation of itask_ng. +# This file is put in the public domain. +# r1to , 2011. +# , fuzzy +# +# +msgid "" +msgstr "" +"Project-Id-Version: itask_ng 1.0\n" +"Report-Msgid-Bugs-To: http://trac.enlightenment.org/e\n" +"POT-Creation-Date: 2011-02-22 20:00-0800\n" +"PO-Revision-Date: 2011-02-24 16:58+0100\n" +"Last-Translator: r1to \n" +"Language-Team: Slovenian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit" + +#: ../src/e_mod_main.c:1641 ../src/e_mod_main.c:1732 +msgid "Itask-NG" +msgstr "Itask-NG" + +#: ../src/e_mod_main.c:1756 +msgid "Itask NG" +msgstr "Itask·NG" + +#: ../src/ng_taskbar.c:702 +msgid "No name!" +msgstr "Ni imena !" + +#: ../src/ng_launcher.c:508 +msgid "Configure Bar" +msgstr "Nastavi vrstico" + +#: ../src/ng_launcher.c:512 +msgid "Lock Dragging" +msgstr "Zakleni vleko" + +#: ../src/ng_launcher.c:521 +msgid "Applications" +msgstr "Programi" + +#: ../src/ng_launcher.c:525 +msgid "Edit Icon" +msgstr "Uredi ikono" + +#: ../src/ng_border_menu.c:30 +msgid "Fullscreen" +msgstr "Celozaslonsko" + +#: ../src/ng_border_menu.c:45 +msgid "Close" +msgstr "Zapri" + +#: ../src/ng_border_menu.c:66 +msgid "Maximized" +msgstr "Razpeto" + +#: ../src/ng_border_menu.c:86 +msgid "Uniconify" +msgstr "Deikoniziraj" + +#: ../src/ng_border_menu.c:88 +msgid "Iconify" +msgstr "Ikoniziraj" + +#: ../src/ng_gadcon.c:299 +msgid "Available Gadgets" +msgstr "Dostopni gadgeti" + +#: ../src/ng_gadcon.c:306 +msgid "Add Gadget" +msgstr "Dodaj gadget" + +#: ../src/ng_gadcon.c:312 +msgid "Selected Gadgets" +msgstr "Izbrani gadgeti" + +#: ../src/ng_gadcon.c:319 +msgid "Remove Gadget" +msgstr "Odstrani gadget" + +#: ../src/ng_gadcon.c:327 ../src/ng_gadcon.c:370 ../src/ng_gadcon.c:394 +msgid "Description: Unavailable" +msgstr "Opis: Nedostopno" + +#: ../src/ng_config.c:101 +msgid "Itask NG Configuration" +msgstr "Itask·NG·nastavitve" + +#: ../src/ng_config.c:174 +msgid "Bar Items" +msgstr "Predmeti vrstice" + +#: ../src/ng_config.c:183 ../src/ng_config.c:537 +#: ../src/ng_config_instances.c:104 +msgid "Delete" +msgstr "Izbriši" + +#: ../src/ng_config.c:185 ../src/ng_config.c:539 +#: ../src/ng_config_instances.c:106 +msgid "Configure" +msgstr "Nastavi" + +#: ../src/ng_config.c:187 +msgid "Up" +msgstr "Gor" + +#: ../src/ng_config.c:189 +msgid "Down" +msgstr "Dol" + +#: ../src/ng_config.c:194 ../src/ng_config.c:535 +#: ../src/ng_config_instances.c:102 +msgid "Add" +msgstr "Dodaj" + +#: ../src/ng_config.c:196 +msgid "Taskbar" +msgstr "Opravilna vrstica" + +#: ../src/ng_config.c:198 +msgid "Launcher" +msgstr "Zaganjalnik" + +#: ../src/ng_config.c:200 +msgid "Gadcon" +msgstr "Gadcon" + +#: ../src/ng_config.c:211 +msgid "Appearance" +msgstr "Videz" + +#: ../src/ng_config.c:212 +msgid "Show Icon Label" +msgstr "Prikaži oznako ikone" + +#: ../src/ng_config.c:215 +msgid "Show Background Box" +msgstr "Prikaži škatlo ozadja" + +#. +#. ob = e_widget_check_add(evas, D_("Mouse-Over Animation"), &(cfdata->mouse_over_anim)); +#. e_widget_framelist_object_append(of, ob); +#. +#: ../src/ng_config.c:221 +msgid "Icon Size:" +msgstr "Velikost ikone" + +#: ../src/ng_config.c:223 +#, c-format +msgid "%1.0f px" +msgstr "%1.0f·pik." + +#: ../src/ng_config.c:228 +msgid "Reflection Opacity:" +msgstr "Prozornost zrcaljenja" + +#: ../src/ng_config.c:230 +#, c-format +msgid "%1.0f" +msgstr "%1.0f" + +#: ../src/ng_config.c:237 +msgid "Background Opacity:" +msgstr "Prozornost ozadja" + +#: ../src/ng_config.c:239 +msgid "%1.0f \\%" +msgstr "%1.0f·\\%" + +#: ../src/ng_config.c:247 +msgid "Stacking" +msgstr "Skladanje" + +#: ../src/ng_config.c:250 +msgid "Above All" +msgstr "Nad vsem" + +#: ../src/ng_config.c:252 +msgid "Below Fullscreen" +msgstr "Pod celozaslonskim" + +#: ../src/ng_config.c:257 +msgid "Auto Hide" +msgstr "Samodejno skrij" + +#: ../src/ng_config.c:271 +msgid "Show Bar when Urgent" +msgstr "Pokaži vrstico ko je nujno" + +#: ../src/ng_config.c:279 +msgid "Zoom" +msgstr "Povečava" + +#: ../src/ng_config.c:281 +msgid "Factor:" +msgstr "Dejavnik:" + +#: ../src/ng_config.c:287 +msgid "Range:" +msgstr "Domet:" + +#: ../src/ng_config.c:293 +msgid "Duration:" +msgstr "Trajanje:" + +#: ../src/ng_config.c:301 +msgid "Orientation" +msgstr "Usmeritev" + +#: ../src/ng_config.c:317 +msgid "Other" +msgstr "Drugo" + +#: ../src/ng_config.c:318 +msgid "Ecomorph Features" +msgstr "Ecomorph funkcije" + +#: ../src/ng_config.c:527 +msgid "Launcher Settings" +msgstr "Nastavitve zaganjalnika" + +#: ../src/ng_config.c:547 +msgid "Taskbar Settings" +msgstr "Nastavitve opravilne vrstice" + +#: ../src/ng_config.c:549 +msgid "Dont Show Dialogs" +msgstr "Ne prikaži pojavnih oken" + +#: ../src/ng_config.c:552 +msgid "Advanced Window Menu" +msgstr "Napreden meni oken" + +#: ../src/ng_config.c:555 +msgid "Only Show Current Desk" +msgstr "Prikaži le trenutno namizje" + +#: ../src/ng_config.c:558 +msgid "Group Applications by Window Class" +msgstr "Uskupini programe po razredih okna" + +#: ../src/ng_config.c:561 +msgid "Append new Applications on the right Side" +msgstr "Dodaj nove programe na desni strani" + +#: ../src/ng_config.c:567 +msgid "Iconified Applications" +msgstr "Ikonizirani programi" + +#: ../src/ng_config.c:642 ../src/ng_config.c:682 +msgid "Itask NG Bar Configuration" +msgstr "Nastavitve Itask·NG vrstice" + +#: ../src/ng_config.c:787 +msgid "Create new Itask NG source" +msgstr "Ustvari nov vir·Itask·NG" + +#: ../src/ng_config.c:788 +msgid "Enter a name for this new Application Launcher:" +msgstr "Vnesi ime za ta novi zaganjalnik programov" + +#: ../src/ng_config.c:797 +#, c-format +msgid "" +"You requested to delete \"%s\".

Are you sure you want to delete this " +"ng source?" +msgstr "" +"Zahtevali ste izbris·\"%s\".

Ali ste prepričani da hočete izbrisati " +"ta vir·ng ?" + +#: ../src/ng_config.c:801 +msgid "Are you sure you want to delete this Itask NG source?" +msgstr "Ali ste prepričani da hočete izbrisati ta vir·Itask·NG?" + +#: ../src/ng_config_instances.c:64 +msgid "Itask NG Instances" +msgstr "Primerki Itask·NG" + +#: ../src/ng_config_instances.c:94 +msgid "Itask NG - Instances" +msgstr "Itask·NG·-·Primerki" + +#. FIXME +#. if(ci->launcher) +#. label = D_("Launcher NG"); +#. else if(ci->taskbar) +#. label = D_("Taskbar NG"); +#. +#: ../src/ng_config_instances.c:164 +msgid "Bar" +msgstr "Vrstica" + +#: ../src/ng_config_instances.c:338 +#, c-format +msgid "" +"You requested to delete \"%s\".

Are you sure you want to delete this " +"Instance?" +msgstr "" +"Zahtevali ste izbris·\"%s\".

Ali ste prepričani da hočete izbrisati " +"ta primerek?" + +#: ../src/ng_config_instances.c:342 +msgid "Are you sure you want to delete this Instance?" +msgstr "Ali ste prepričani da hočete izbrisati ta primerek?" diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..1d8e487 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,28 @@ +MAINTAINERCLEANFILES = Makefile.in + +INCLUDES = -I. \ + -I$(top_srcdir) \ + -I$(includedir) \ + @E_CFLAGS@ + +pkgdir = $(datadir)/$(MODULE_ARCH) +pkg_LTLIBRARIES = module.la +module_la_SOURCES = e_mod_main.c \ + e_mod_main.h \ + ng_config.c \ + ng_item.c \ + ng_launcher.c \ + ng_taskbar.c \ + ng_config_instances.c \ + ng_box.c \ + ng_border_menu.c \ + ng_gadcon.c + +module_la_LIBADD = @E_LIBS@ +module_la_LDFLAGS = -module -avoid-version +module_la_DEPENDENCIES = $(top_builddir)/config.h + +clean-local: + rm -rf *~ + + diff --git a/src/e_mod_main.c b/src/e_mod_main.c new file mode 100644 index 0000000..637c5b2 --- /dev/null +++ b/src/e_mod_main.c @@ -0,0 +1,1878 @@ +#include "e_mod_main.h" +#include + +#define WINDOW_HEIGHT 250 +#define TEXT_DIST 45 +#define SIDE_OFFSET 30 + + +static int _ngi_win_free(Ngi_Win *win); +static Ngi_Win * _ngi_win_new(Ng *ng); + +static Eina_Bool _ngi_cb_container_resize(void *data, int type, void *event); + +static Eina_Bool _ngi_win_cb_mouse_in(void *data, int type, void *event); +static Eina_Bool _ngi_win_cb_mouse_out(void *data, int type, void *event); +static Eina_Bool _ngi_win_cb_mouse_down(void *data, int type, void *event); +static Eina_Bool _ngi_win_cb_mouse_up(void *data, int type, void *event); +static Eina_Bool _ngi_win_cb_mouse_move(void *data, int type, void *event); +static Eina_Bool _ngi_win_cb_mouse_wheel(void *data, int type, void *event); + +static Eina_Bool _ngi_win_cb_desk_show(void *data, int type, void *event); +static Eina_Bool _ngi_win_cb_border_event(void *data, int type, void *event); + +static void _ngi_zoom_in(Ng *ng); +static void _ngi_zoom_out(Ng *ng); +static void _ngi_item_appear(Ng *ng, Ngi_Item *it); +static void _ngi_item_disappear(Ng *ng, Ngi_Item *it); +static void _ngi_zoom_function(Ng *ng, double d, double *disp); +static Eina_Bool _ngi_animator(void *data); +static void _ngi_redraw(Ng *ng); +static int _ngi_autohide(Ng *ng, int hide); +/* static int _ngi_check_fullscreen(E_Desk *desk); */ + +static int initialized = 0; + +E_Config_DD *ngi_conf_edd = NULL; +E_Config_DD *ngi_conf_item_edd = NULL; +E_Config_DD *ngi_conf_box_edd = NULL; +E_Config_DD *ngi_conf_gadcon_edd = NULL; + +Config *ngi_config = NULL; + +E_Int_Menu_Augmentation *maug = NULL; + +static Evas_Smart *_e_smart = NULL; + +static void +_ngi_bar_add(Evas_Object *obj){} + +static void +_ngi_bar_del(Evas_Object *obj){} + +static void +_ngi_bar_clip_set(Evas_Object *obj, Evas_Object * clip){} + +static void +_ngi_bar_clip_unset(Evas_Object *obj){} + +static void +_ngi_bar_color_set(Evas_Object *obj, int r, int g, int b, int a){} + + +static Evas_Object * +_ngi_bar_smart_add(Evas *evas) +{ + if (!_e_smart) + { + static Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("ngi_bar"); + if (!sc.add) + { + sc.add = _ngi_bar_add; + sc.del = _ngi_bar_del; + sc.move = NULL; + sc.resize = NULL; + sc.show = NULL; + sc.hide = NULL; + sc.color_set = _ngi_bar_color_set; + sc.clip_set = _ngi_bar_clip_set; + sc.clip_unset = _ngi_bar_clip_unset; + } + _e_smart = evas_smart_class_new(&sc); + } + + return evas_object_smart_add(evas, _e_smart); +} + +Ng * +ngi_new(Config_Item *cfg) +{ + Ng *ng; + E_Zone *zone; + Config_Box *cfg_box; + Eina_List *l; + int alpha; + + zone = (E_Zone *)e_util_container_zone_number_get(cfg->container, cfg->zone); + if (!zone) return NULL; + + ng = E_NEW(Ng, 1); + cfg->ng = ng; + ng->cfg = cfg; + + ngi_config->instances = eina_list_append(ngi_config->instances, ng); + + ng->zone = zone; + ng->win = _ngi_win_new(ng); + + ng->zoom = 1.0; + ng->size = ng->cfg->size; + + ng->state = unzoomed; + ng->hide_state = show; + + + ng->clip = evas_object_rectangle_add(ng->evas); + evas_object_color_set(ng->clip, 255, 255, 255, 0); + + ng->bg_clip = evas_object_rectangle_add(ng->evas); + alpha = cfg->alpha; + evas_object_color_set(ng->bg_clip, alpha, alpha, alpha, alpha); + + ng->o_bg = edje_object_add(ng->evas); + ng->o_frame = edje_object_add(ng->evas); + + ng->o_icons = _ngi_bar_smart_add(ng->evas); + + ng->o_label = edje_object_add(ng->evas); + + switch(cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + ngi_object_theme_set(ng->o_bg, "e/modules/itask-ng/bg_bottom"); + ngi_object_theme_set(ng->o_frame,"e/modules/itask-ng/frame_bottom"); + ngi_object_theme_set(ng->o_label,"e/modules/itask-ng/label_bottom"); + + ng->o_proxy = evas_object_image_add(ng->evas); + evas_object_image_source_set(ng->o_proxy, ng->o_icons); + + evas_object_map_enable_set(ng->o_proxy, 1); + evas_object_show(ng->o_proxy); + + alpha = cfg->rflxn_alpha; + evas_object_color_set(ng->o_proxy, alpha, alpha, alpha, alpha); + break; + + case E_GADCON_ORIENT_TOP: + ngi_object_theme_set(ng->o_bg, "e/modules/itask-ng/bg_top"); + ngi_object_theme_set(ng->o_frame,"e/modules/itask-ng/frame_top"); + ngi_object_theme_set(ng->o_label,"e/modules/itask-ng/label_top"); + break; + + case E_GADCON_ORIENT_LEFT: + ngi_object_theme_set(ng->o_bg, "e/modules/itask-ng/bg_left"); + ngi_object_theme_set(ng->o_frame,"e/modules/itask-ng/frame_left"); + ngi_object_theme_set(ng->o_label,"e/modules/itask-ng/label_left"); + break; + + case E_GADCON_ORIENT_RIGHT: + ngi_object_theme_set(ng->o_bg, "e/modules/itask-ng/bg_right"); + ngi_object_theme_set(ng->o_frame,"e/modules/itask-ng/frame_right"); + ngi_object_theme_set(ng->o_label,"e/modules/itask-ng/label_right"); + break; + } + + const char *data = edje_object_data_get(ng->o_frame, "clip_separator"); + if (data) ng->opt.clip_separator = atoi(data); + + data = edje_object_data_get(ng->o_frame, "icon_spacing"); + if (data) ng->opt.item_spacing = atoi(data); + + data = edje_object_data_get(ng->o_frame, "edge_offset"); + if (data) ng->opt.edge_offset = atoi(data); + + data = edje_object_data_get(ng->o_frame, "separator_width"); + if (data) ng->opt.separator_width = atoi(data); + + data = edje_object_data_get(ng->o_frame, "bg_offset"); + if (data) ng->opt.bg_offset = atoi(data); + + data = edje_object_data_get(ng->o_frame, "reflection_offset"); + if (data) ng->opt.reflection_offset = atoi(data); + + data = edje_object_data_get(ng->o_frame, "keep_overlay_pos"); + if (data) ng->opt.keep_overlay_pos = atof(data); + + ng->opt.fade_duration = 0.25; + + evas_object_show(ng->o_frame); + evas_object_show(ng->o_bg); + evas_object_show(ng->o_icons); + + evas_object_clip_set(ng->o_bg, ng->bg_clip); + evas_object_show(ng->bg_clip); + + + if (cfg->show_label) + evas_object_show(ng->o_label); + + if (cfg->show_background) + evas_object_show(ng->bg_clip); + + ngi_win_position_calc(ng->win); + e_popup_show(ng->win->popup); + + EINA_LIST_FOREACH (cfg->boxes, l, cfg_box) + { + switch (cfg_box->type) + { + case launcher: + ngi_launcher_new(ng, cfg_box); + break; + + case taskbar: + ngi_taskbar_new(ng, cfg_box); + break; + + case gadcon: + ngi_gadcon_new(ng, cfg_box); + break; + } + } + + ng->handlers = eina_list_append + (ng->handlers, ecore_event_handler_add + (ECORE_X_EVENT_MOUSE_IN, _ngi_win_cb_mouse_in, ng)); + ng->handlers = eina_list_append + (ng->handlers, ecore_event_handler_add + (ECORE_X_EVENT_MOUSE_OUT, _ngi_win_cb_mouse_out, ng)); + ng->handlers = eina_list_append + (ng->handlers, ecore_event_handler_add + (ECORE_EVENT_MOUSE_BUTTON_DOWN, _ngi_win_cb_mouse_down, ng)); + ng->handlers = eina_list_append + (ng->handlers, ecore_event_handler_add + (ECORE_EVENT_MOUSE_BUTTON_UP, _ngi_win_cb_mouse_up, ng)); + ng->handlers = eina_list_append + (ng->handlers, ecore_event_handler_add + (ECORE_EVENT_MOUSE_WHEEL, _ngi_win_cb_mouse_wheel, ng)); + ng->handlers = eina_list_append + (ng->handlers, ecore_event_handler_add + (ECORE_EVENT_MOUSE_MOVE, _ngi_win_cb_mouse_move, ng)); + ng->handlers = eina_list_append + (ng->handlers, ecore_event_handler_add + (E_EVENT_DESK_SHOW, _ngi_win_cb_desk_show, ng)); + ng->handlers = eina_list_append + (ng->handlers, ecore_event_handler_add + (E_EVENT_BORDER_PROPERTY, _ngi_win_cb_border_event, ng)); + + if (ng->cfg->autohide == AUTOHIDE_FULLSCREEN) + { + int fullscreen = e_desk_current_get(ng->zone)->fullscreen_borders; + + ng->hide_fullscreen = fullscreen; + } + else if (ng->cfg->stacking == below_fullscreen) + { + int fullscreen = e_desk_current_get(ng->zone)->fullscreen_borders; + + if (fullscreen) + e_popup_hide(ng->win->popup); + else + e_popup_show(ng->win->popup); + } + + if ((ng->cfg->autohide == AUTOHIDE_NORMAL) || ng->hide_fullscreen) + { + ng->hide_step = ng->size + ng->opt.edge_offset + ng->opt.bg_offset; + ng->hide_state = hidden; + } + + ngi_thaw(ng); + + return ng; +} + +void +ngi_free(Ng *ng) +{ + Ngi_Box *box; + Ecore_Event_Handler *h; + + ngi_config->instances = eina_list_remove(ngi_config->instances, ng); + + while(ng->boxes) + { + box = ng->boxes->data; + if (box->cfg->type == taskbar) + ngi_taskbar_remove(box); + else if (box->cfg->type == launcher) + ngi_launcher_remove(box); + else if (box->cfg->type == gadcon) + ngi_gadcon_remove(box); + } + + if (ng->animator) + ecore_animator_del(ng->animator); + + if (ng->menu_wait_timer) + ecore_timer_del(ng->menu_wait_timer); + + if (ng->mouse_in_timer) + ecore_timer_del(ng->mouse_in_timer); + + if (ng->effect_timer) + ecore_timer_del(ng->effect_timer); + + if (ng->o_bg) + evas_object_del(ng->o_bg); + + if (ng->o_frame) + evas_object_del(ng->o_frame); + + if (ng->clip) + evas_object_del(ng->clip); + + if (ng->bg_clip) + evas_object_del(ng->bg_clip); + + if (ng->o_icons) + evas_object_del(ng->o_icons); + + if (ng->o_proxy) + evas_object_del(ng->o_proxy); + + if (ng->win) + _ngi_win_free(ng->win); + + EINA_LIST_FREE(ng->handlers, h) + ecore_event_handler_del(h); + + free(ng); +} + +Eina_Bool +ngi_object_theme_set(Evas_Object *obj, const char *part) +{ + if (e_theme_edje_object_set(obj, "base/theme/modules/itask-ng", part)) + return 1; + else + return edje_object_file_set(obj, ngi_config->theme_path, part); +} + +static Ngi_Win * +_ngi_win_new(Ng *ng) +{ + Ngi_Win *win; + + win = E_NEW(Ngi_Win, 1); + if (!win) return NULL; + + win->ng = ng; + win->popup = e_popup_new(ng->zone, 0, 0, 0, 0); + + if (ngi_config->use_composite) + { + ecore_evas_alpha_set(win->popup->ecore_evas, 1); + win->popup->evas_win = ecore_evas_software_x11_window_get(win->popup->ecore_evas); + win->input = win->popup->evas_win; + win->drop_win = E_OBJECT(win->popup); + } + else + { + ecore_evas_shaped_set(win->popup->ecore_evas, 1); + + win->input = ecore_x_window_input_new(ng->zone->container->win, 0, 0, 1, 1); + ecore_x_window_show(win->input); + + win->fake_iwin = E_OBJECT_ALLOC(E_Win, E_WIN_TYPE, NULL); + win->fake_iwin->evas_win = win->input; + win->drop_win = E_OBJECT(win->fake_iwin); + } + + ecore_x_netwm_window_type_set(win->popup->evas_win, ECORE_X_WINDOW_TYPE_DOCK); + ng->evas = win->popup->evas; + + e_drop_xdnd_register_set(win->input, 1); + e_container_window_raise(ng->zone->container, win->input, 999); + + return win; +} + +static int +_ngi_win_free(Ngi_Win *win) +{ + e_drop_xdnd_register_set(win->input, 0); + e_object_del(E_OBJECT(win->popup)); + + if (win->fake_iwin) + { + ecore_x_window_free(win->input); + free(win->fake_iwin); + } + + free(win); + + return 1; +} + +static Eina_Bool +_ngi_cb_container_resize(void *data, int ev_type, void *event_info) +{ + Config_Item *ci; + E_Zone *zone; + Eina_List *l; + Ng *ng; + + if (!initialized) + return EINA_TRUE; + + EINA_LIST_FOREACH (ngi_config->items, l, ci) + { + if (!ci->ng) + { + ngi_new(ci); + continue; + } + + ng = ci->ng; + zone = e_util_container_zone_number_get(ci->container, ci->zone); + if (!zone) + { + ngi_free(ng); + continue; + } + + ngi_win_position_calc(ng->win); + ngi_reposition(ng); + ngi_input_extents_calc(ng); + ngi_thaw(ng); + } + return EINA_TRUE; +} + +static void +_ngi_netwm_icon_geometry_set(E_Border *bd, int x, int y, int w, int h) +{ + unsigned int sizes[4]; + sizes[0] = x; + sizes[1] = y; + sizes[2] = w; + sizes[3] = h; + ecore_x_window_prop_card32_set + (bd->win, ECORE_X_ATOM_NET_WM_ICON_GEOMETRY, sizes, 4); +} +void +ngi_input_extents_calc(Ng *ng) +{ + int item_zoomed; + Ngi_Win *win = ng->win; + Ngi_Box *box; + Eina_List *l; + + if (ng->mouse_in) + item_zoomed = ng->size * ng->cfg->zoomfactor + ng->opt.bg_offset + ng->opt.edge_offset; + else if (ng->hide_state == hidden) + item_zoomed = 2; + else + item_zoomed = ng->size + ng->opt.bg_offset + ng->opt.edge_offset; + + switch (ng->cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + win->rect.x = ng->start; + win->rect.y = ng->win->popup->h - item_zoomed; + win->rect.width = ng->w; + win->rect.height = item_zoomed; + break; + + case E_GADCON_ORIENT_TOP: + win->rect.x = ng->start; + win->rect.y = 0; + win->rect.width = ng->w; + win->rect.height = item_zoomed; + break; + + case E_GADCON_ORIENT_LEFT: + win->rect.x = 0; + win->rect.y = ng->start; + win->rect.width = item_zoomed; + win->rect.height = ng->w; + break; + + case E_GADCON_ORIENT_RIGHT: + win->rect.x = ng->win->popup->w - item_zoomed; + win->rect.y = ng->start; + win->rect.width = item_zoomed; + win->rect.height = ng->w; + break; + } + + e_container_window_raise(ng->zone->container, win->input, 999); + + if (ngi_config->use_composite) + { + XShapeCombineRectangles((Display *)ecore_x_display_get(), + win->input, ShapeInput, 0, 0, + &win->rect, 1, ShapeSet, Unsorted); + } + else + { + ecore_x_window_move_resize(win->input, + ng->zone->x + win->popup->x + win->rect.x, + ng->zone->y + win->popup->y + win->rect.y, + win->rect.width, win->rect.height); + } + + EINA_LIST_FOREACH (ng->boxes, l, box) + { + if (!box->drop_handler) + continue; + + int w = box->w; + if (w < 10) w = 10; + + switch (ng->cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + e_drop_handler_geometry_set + (box->drop_handler, + box->pos, win->popup->h - item_zoomed, w, item_zoomed); + break; + + case E_GADCON_ORIENT_TOP: + e_drop_handler_geometry_set + (box->drop_handler, box->pos, 0, w, item_zoomed); + break; + + case E_GADCON_ORIENT_LEFT: + e_drop_handler_geometry_set + (box->drop_handler, 0, box->pos, item_zoomed, w); + break; + + case E_GADCON_ORIENT_RIGHT: + e_drop_handler_geometry_set + (box->drop_handler, win->popup->w - item_zoomed, box->pos, + item_zoomed, w); + break; + } + } +} + +static void +_ngi_proxy_geometry_calc(Ng *ng) +{ + int w = ng->win->popup->w; + int h = ng->win->popup->h; + + evas_object_move(ng->o_icons, 0, h + ng->hide_step - ng->size - ng->opt.edge_offset); + evas_object_resize(ng->o_icons, w, ng->cfg->size); + + if (ng->o_proxy) + { + evas_object_image_fill_set(ng->o_proxy, 0, 0, w, ng->opt.edge_offset); + + evas_object_move(ng->o_proxy, 0, h + ng->hide_step - ng->opt.edge_offset - + ng->opt.reflection_offset); + + evas_object_resize(ng->o_proxy, w, ng->opt.edge_offset); + + Evas_Map *m = evas_map_new(4); + evas_map_util_points_populate_from_object(m, ng->o_proxy); + + evas_map_point_image_uv_set(m, 0, 0, h); + evas_map_point_image_uv_set(m, 1, w, h); + evas_map_point_image_uv_set(m, 2, w, 0); + evas_map_point_image_uv_set(m, 3, 0, 0); + + evas_map_util_3d_perspective(m, w/2, h/2, 1, 1000); + + evas_object_map_set(ng->o_proxy, m); + evas_map_free(m); + } +} + + +void +ngi_win_position_calc(Ngi_Win *win) +{ + Ng *ng = win->ng; + + E_Gadcon_Orient orient = (E_Gadcon_Orient)ng->cfg->orient; + int size = WINDOW_HEIGHT; + + switch (orient) + { + case E_GADCON_ORIENT_LEFT: + e_popup_move_resize(win->popup, 0, 0, size, ng->zone->h); + ng->horizontal = 0; + break; + + case E_GADCON_ORIENT_RIGHT: + e_popup_move_resize(win->popup, ng->zone->w - size, 0, size, ng->zone->h); + ng->horizontal = 0; + break; + + case E_GADCON_ORIENT_TOP: + e_popup_move_resize(win->popup, 0, 0, ng->zone->w, size); + ng->horizontal = 1; + break; + + case E_GADCON_ORIENT_BOTTOM: + e_popup_move_resize(win->popup, 0, ng->zone->h - size, ng->zone->w, size); + ng->horizontal = 1; + break; + + default: + break; + } + + if (win->fake_iwin) + { + win->fake_iwin->x = win->popup->x; + win->fake_iwin->y = win->popup->y; + win->fake_iwin->w = win->popup->w; + win->fake_iwin->h = win->popup->h; + } + + evas_object_move(ng->clip, 0, 0); + evas_object_resize(ng->clip, win->popup->w, win->popup->h - ng->opt.edge_offset); + + evas_object_move(ng->bg_clip, 0, 0); + evas_object_resize(ng->bg_clip, win->popup->w, win->popup->h); + + _ngi_proxy_geometry_calc(ng); +} + +static Eina_Bool +_ngi_mouse_in_timer(void *data) +{ + Ng *ng = data; + + ng->mouse_in_timer = NULL; + ng->mouse_in = 1; + + ngi_input_extents_calc(ng); + + ngi_animate(ng); + + if (ng->item_active && ng->item_active->label && ng->item_active->label[0]) + { + evas_object_show(ng->o_label); + edje_object_signal_emit(ng->o_label, "e,state,label,show", "e"); + edje_object_part_text_set(ng->o_label, "e.text.label", ng->item_active->label); + } + + return EINA_FALSE; +} + +void +ngi_mouse_in(Ng *ng) +{ + if (ng->mouse_in_timer) + ecore_timer_del(ng->mouse_in_timer); + + if (ng->hide_state == hidden) + ng->mouse_in_timer = ecore_timer_add(0.15, _ngi_mouse_in_timer, ng); + else + _ngi_mouse_in_timer(ng); +} + +static Eina_Bool +_ngi_win_cb_mouse_in(void *data, int type, void *event) +{ + Ecore_X_Event_Mouse_In *ev = event; + Ng *ng = data; + + if (ev->win != ng->win->input) + return EINA_TRUE; + + ng->pos = ng->horizontal ? + (ev->root.x - ng->zone->x) : + (ev->root.y - ng->zone->y); + + ngi_mouse_in(ng); + + if (!ngi_config->use_composite) + evas_event_feed_mouse_in(ng->evas, ev->time, NULL); + + return EINA_TRUE; +} + +void +ngi_mouse_out(Ng *ng) +{ + ng->mouse_in = 0; + + if (ng->mouse_in_timer) + ecore_timer_del(ng->mouse_in_timer); + ng->mouse_in_timer = NULL; + + ngi_item_mouse_out(ng->item_active); + edje_object_signal_emit(ng->o_label, "e,state,label,hide", "e"); + + ngi_animate(ng); +} + +static Eina_Bool +_ngi_win_cb_mouse_out(void *data, int type, void *event) +{ + Ecore_X_Event_Mouse_Out *ev = event; + Ng *ng = data; + + if (ev->win != ng->win->input) + return EINA_TRUE; + + ngi_mouse_out(ng); + + if (!ngi_config->use_composite) + evas_event_feed_mouse_out(ng->evas, ev->time, NULL); + + return EINA_TRUE; +} + +static Eina_Bool +_ngi_menu_wait_after_timer_cb(void *data) +{ + Ng *ng = data; + + ng->menu_wait_timer = NULL; + ngi_animate(ng); + + return EINA_FALSE; +} + +static Eina_Bool +_ngi_menu_wait_timer_cb(void *data) +{ + Ng *ng = data; + + if (e_menu_grab_window_get()) + { + edje_object_signal_emit(ng->o_label, "e,state,label,hide", "e"); + return EINA_TRUE; + } + + ng->menu_wait_timer = + ecore_timer_add(1.0, _ngi_menu_wait_after_timer_cb, ng); + + return EINA_FALSE; +} + +static Eina_Bool +_ngi_win_cb_mouse_down(void *data, int type, void *event) +{ + Ecore_Event_Mouse_Button *ev = event; + Ng *ng = data; + + if (ev->event_window != ng->win->input) + return EINA_TRUE; + + Ngi_Item *it = ng->item_active; + + if (ev->buttons == 2) + { + ngi_configure_module(ng->cfg); + return EINA_TRUE; + } + else if (ng->item_active && ev->buttons == 1) + { + it->drag.x = ev->root.x; + it->drag.y = ev->root.y; + it->drag.start = 1; + it->drag.dnd = 0; + ng->item_drag = it; + } + + ngi_item_mouse_down(it, ev); + + if (!ngi_config->use_composite) + { + Evas_Button_Flags flags = EVAS_BUTTON_NONE; + if (ev->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK; + if (ev->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK; + evas_event_feed_mouse_down(ng->evas, ev->buttons, flags, ev->timestamp, NULL); + } + + /* if a grab window appears shortly after clicking the + bar it probably is a menu that belongs to a item */ + if (ng->menu_wait_timer) + ecore_timer_del(ng->menu_wait_timer); + + ng->menu_wait_timer = + ecore_timer_add(0.1, _ngi_menu_wait_timer_cb, ng); + + return EINA_TRUE; +} + +static Eina_Bool +_ngi_win_cb_mouse_up(void *data, int type, void *event) +{ + Ecore_Event_Mouse_Button *ev = event; + Ng *ng = data; + + if (ev->event_window != ng->win->input) + return EINA_TRUE; + + if (ng->item_active) + { + ngi_item_mouse_up(ng->item_active, ev); + evas_event_feed_mouse_up(ng->evas, ev->buttons, EVAS_BUTTON_NONE, ev->timestamp, NULL); + + if (ng->item_drag) + { + ng->item_drag->drag.start = 0; + ng->item_drag = NULL; + } + } + + return EINA_TRUE; +} + +static Eina_Bool +_ngi_win_cb_mouse_wheel(void *data, int type, void *event) +{ + Ecore_Event_Mouse_Wheel *ev = event; + Ng *ng = data; + + if (ev->event_window != ng->win->input) + return EINA_TRUE; + + if (!ngi_config->use_composite) + evas_event_feed_mouse_wheel(ng->evas, ev->direction, ev->z, ev->timestamp, NULL); + + return EINA_TRUE; +} + +static Eina_Bool +_ngi_win_cb_mouse_move(void *data, int type, void *event) +{ + Ecore_Event_Mouse_Move *ev = event; + Ng *ng = data; + + if (ev->event_window != ng->win->input) + return EINA_TRUE; + + ng->pos = ng->horizontal ? ev->root.x : ev->root.y; + + ng->pos -= ng->horizontal ? ng->zone->x : ng->zone->y; + + if (!ng->mouse_in) + return EINA_TRUE; + + ngi_item_activate(ng); + + if (!ngi_config->use_composite) + evas_event_feed_mouse_move(ng->evas, + ev->x + ng->win->rect.x, + ev->y + ng->win->rect.y, + ev->timestamp, NULL); + + if (ng->item_drag) + { + int dx = ev->root.x - ng->item_drag->drag.x; + int dy = ev->root.y - ng->item_drag->drag.y; + + if (((dx * dx) + (dy * dy)) > (e_config->drag_resist * e_config->drag_resist)) + { + ng->item_drag->drag.dnd = 1; + ng->item_drag->drag.start = 0; + + ITEM_DRAG_START(ng->item_drag); + ngi_item_mouse_out(ng->item_active); + + ng->item_active = NULL; + ng->item_drag = NULL; + } + } + + ngi_animate(ng); + + return EINA_TRUE; +} + +/**************************************************************************/ + + +Ngi_Item * +ngi_item_at_position_get(Ng *ng) +{ + Eina_List *l, *ll; + Ngi_Item *it; + Ngi_Box *box; + int pos = ng->pos; + + EINA_LIST_FOREACH (ng->boxes, ll, box) + { + if (pos < box->pos) + continue; + + EINA_LIST_FOREACH (box->items, l, it) + { + if (it->delete_me) + continue; + + if (it->scale == 0.0) + continue; + + if (pos <= it->pos + ng->size + ng->opt.item_spacing) + { + if (pos + ng->opt.item_spacing < it->pos - ng->size) + return NULL; + + return it; + } + } + } + return NULL; +} + +void +ngi_item_activate(Ng *ng) +{ + Ngi_Item *it; + + if (!ng->mouse_in) + { + ng->item_active = NULL; + evas_object_hide(ng->o_label); + return; + } + + if ((it = ngi_item_at_position_get(ng)) && (it != ng->item_active)) + { + ngi_item_mouse_out(ng->item_active); + ngi_item_mouse_in(it); + ng->item_active = it; + } + else if (!it) + { + ngi_item_mouse_out(ng->item_active); + ng->item_active = NULL; + } + + if ((!ng->cfg->show_label) || + (!ng->item_active) || + (!ng->item_active->label)) + { + evas_object_hide(ng->o_label); + return; + } + + switch (ng->cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + evas_object_move(ng->o_label, ng->item_active->pos + ng->size/2, + (ng->win->popup->h + ng->hide_step) - + ((double)ng->size * ng->zoom + TEXT_DIST)); + break; + + case E_GADCON_ORIENT_TOP: + evas_object_move(ng->o_label, ng->item_active->pos + ng->size/2, + ((double)ng->size * ng->zoom + TEXT_DIST) - ng->hide_step); + break; + } + + evas_object_show(ng->o_label); + edje_object_signal_emit(ng->o_label, "e,state,label,show", "e"); + edje_object_part_text_set(ng->o_label, "e.text.label", ng->item_active->label); +} + +/**************************************************************************/ + +static void +_ngi_item_appear(Ng *ng, Ngi_Item *it) +{ + it->scale = (ecore_time_get() - it->start_time) / ng->opt.fade_duration; + + if (it->scale < 1.0) + { + ngi_reposition(ng); + return; + } + + it->scale = 1.0; + ng->items_show = eina_list_remove(ng->items_show, it); + + ngi_reposition(ng); + ngi_input_extents_calc(ng); + ngi_item_activate(ng); +} + +static void +_ngi_item_disappear(Ng *ng, Ngi_Item *it) +{ + it->scale = 1.0 - (ecore_time_get() - it->start_time) / ng->opt.fade_duration; + + if (it->scale > 0.0) + { + ngi_reposition(ng); + return; + } + + ng->items_remove = eina_list_remove(ng->items_remove, it); + + ngi_item_free(it); + + ng->size = ng->cfg->size; + ngi_reposition(ng); + ngi_input_extents_calc(ng); + ngi_animate(ng); + ngi_item_activate(ng); +} + +static double +_ngi_anim_advance_in(double start, double duration) +{ + double z = (ecore_time_get() - start) / duration; + + if (z > 1.0) + return 1.0; + + if (z < 0.0) + return 0.0; + + z = log(10) * z; + + return 1.0 - (1.0 / exp(z*z)); +} + +static double +_ngi_anim_advance_out(double start, double duration) +{ + double z = (ecore_time_get() - start) / duration; + + if (z > 1.0) + return 0.0; + + if (z < 0.0) + return 1.0; + + z = 1.0 - z; + z = log(10) * z; + + return 1.0 - (1.0 / exp(z*z)); +} + +static void +_ngi_zoom_in(Ng *ng) +{ + double z; + + if (ng->state != zooming) + { + double now = ecore_time_get(); + + if (ng->state == unzooming) + ng->start_zoom = now - (ng->cfg->zoom_duration - (now - ng->start_zoom)); + else + ng->start_zoom = now; + + ng->state = zooming; + } + + z = _ngi_anim_advance_in(ng->start_zoom, ng->cfg->zoom_duration); + ng->zoom = 1.0 + (ng->cfg->zoomfactor - 1.0) * z; + + if (z == 1.0) + { + ng->zoom = ng->cfg->zoomfactor; + ng->state = zoomed; + } +} + +static void +_ngi_zoom_out(Ng *ng) +{ + double z; + + if (ng->state != unzooming) + { + double now = ecore_time_get(); + + if (ng->state == zooming) + ng->start_zoom = now - (ng->cfg->zoom_duration - (now - ng->start_zoom)); + else + ng->start_zoom = now; + + ng->state = unzooming; + } + + z = _ngi_anim_advance_out(ng->start_zoom, ng->cfg->zoom_duration); + ng->zoom = 1.0 + (ng->cfg->zoomfactor - 1.0) * z; + + if (z == 0.0) + { + ng->zoom = 1.0; + ng->state = unzoomed; + + if (!(ng->cfg->autohide == AUTOHIDE_NORMAL) && + !(ng->cfg->autohide == AUTOHIDE_FULLSCREEN && !ng->hide_fullscreen)) + ngi_input_extents_calc(ng); + + if (ng->item_active) + { + ngi_item_mouse_out(ng->item_active); + ng->item_active = NULL; + } + } +} + +static int +_ngi_autohide(Ng *ng, int hide) +{ + double duration = ng->cfg->zoom_duration; + double step = ng->hide_step; + double hide_max = ng->size + ng->opt.edge_offset + ng->opt.bg_offset; + + if (hide) + { + if (ng->hide_state != hiding) + { + double now = ecore_time_get(); + + if (ng->hide_state == showing) + ng->start_hide = now - (step / hide_max) * duration; + else + ng->start_hide = now; + + if (ng->start_hide < now - duration) + ng->start_hide = now - duration; + + ng->hide_state = hiding; + } + + step = hide_max * (1.0 - _ngi_anim_advance_out(ng->start_hide, duration)); + + if (step >= hide_max) + { + ng->hide_state = hidden; + ng->hide_step = hide_max; + ngi_input_extents_calc(ng); + return 0; + } + } + else + { + if (ng->hide_state != showing) + { + double now = ecore_time_get(); + + if (ng->hide_state == hiding) + ng->start_hide = now - (duration - (step / hide_max) * duration); + else + ng->start_hide = now; + + ng->hide_state = showing; + } + + step = hide_max * (1.0 - _ngi_anim_advance_in(ng->start_hide, duration)); + + if (step <= 0) + { + ng->hide_state = show; + ng->hide_step = 0; + + _ngi_proxy_geometry_calc(ng); + return 0; + } + } + + if (step > hide_max) + step = hide_max; + else if (step < 0) + step = 0; + + ng->hide_step = step; + + return 1; +} + +void +ngi_animate(Ng *ng) +{ + ng->changed = 1; + if (ng->animator) + return; + + ng->animator = ecore_animator_add(_ngi_animator, ng); +} + +static Eina_Bool +_ngi_animator(void *data) +{ + Ng *ng = data; + Eina_Bool cont = 0; + Eina_List *l, *ll; + Ngi_Item *it; + + if (ng->items_remove || ng->items_show) + cont = 1; + + EINA_LIST_FOREACH_SAFE(ng->items_show, l, ll, it) + _ngi_item_appear(ng, it); + + EINA_LIST_FOREACH_SAFE(ng->items_remove, l, ll, it) + _ngi_item_disappear(ng, it); + + if (ng->cfg->zoomfactor > 1.0) + { + if (ng->mouse_in && (ng->state != zoomed)) + { + _ngi_zoom_in(ng); + cont = 1; + } + else if (!ng->mouse_in && (ng->state != unzoomed)) + { + _ngi_zoom_out(ng); + cont = 1; + } + } + + if (ng->cfg->autohide) + { + if ((ng->mouse_in || ng->show_bar || ng->menu_wait_timer) || + (ng->cfg->autohide == AUTOHIDE_FULLSCREEN && (!ng->hide_fullscreen))) + { + if (ng->hide_state != show) + { + _ngi_autohide(ng, 0); + cont = 1; + } + } + else if ((ng->cfg->autohide == AUTOHIDE_NORMAL) || (ng->hide_fullscreen)) + { + if ((ng->hide_state != hidden) && + ((ng->zoom - 1.0) <= (ng->cfg->zoomfactor - 1.0) / 2.0)) + { + _ngi_autohide(ng, 1); + cont = 1; + } + } + } + + if (cont || ng->changed) + { + _ngi_redraw(ng); + return EINA_TRUE; + } + + ng->animator = NULL; + return EINA_FALSE; +} + +void +ngi_reposition(Ng *ng) +{ + Ngi_Box *box; + double pos, distance, range, disp; + Eina_List *l, *ll; + Ngi_Item *it; + int size = ng->size; + int cnt = 0, end; + int width = ng->horizontal ? ng->win->popup->w : ng->win->popup->h; + + ng->w = 0; + + EINA_LIST_FOREACH (ng->boxes, l, box) + { + box->w = 0; + + EINA_LIST_FOREACH (box->items, ll, it) + { + if (it->scale == 0.0) continue; + box->w += (size * it->scale) + ng->opt.item_spacing; + } + + ng->w += box->w; + + if (cnt++ > 0) ng->w += ng->opt.separator_width; + } + + ng->start = (width - ng->w) / 2; + + distance = ng->start - SIDE_OFFSET - width/2; + + range = ng->cfg->zoom_range * ng->size; + + disp = erf(distance / range) * range * (ng->cfg->zoomfactor - 1.0) + 0.6; + + end = ng->start - SIDE_OFFSET + disp; + + /* shrink bar when it becomes larger than screen height/width */ + if (end < 0 && size > 1) + { + ng->size -= 1; + ngi_reposition(ng); + return; + } + + cnt = 0; + pos = ng->start; + + EINA_LIST_FOREACH (ng->boxes, l, box) + { + box->pos = pos; + + if (cnt++ > 0) + pos += (ng->opt.separator_width); + + EINA_LIST_FOREACH (box->items, ll, it) + { + if (it->scale == 0.0) + continue; + + it->pos = pos; + + pos += it->scale * size + ng->opt.item_spacing; + } + } + + if (!ng->cfg->ecomorph_features) + return; + + if (ng->items_show || ng->items_remove) + return; + + /* FIXME */ + EINA_LIST_FOREACH (ng->boxes, l, box) + { + Ngi_Item_Taskbar *it; + + if (!(box->cfg->type == taskbar)) + continue; + + switch(ng->cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + EINA_LIST_FOREACH(box->items, ll, it) + _ngi_netwm_icon_geometry_set + (it->border, it->base.pos, + (ng->win->popup->y + ng->win->popup->h) - size, size, size); + break; + + case E_GADCON_ORIENT_TOP: + EINA_LIST_FOREACH(box->items, ll, it) + _ngi_netwm_icon_geometry_set + (it->border, it->base.pos, + ng->hide_step, size, size); + break; + + case E_GADCON_ORIENT_LEFT: + EINA_LIST_FOREACH(box->items, ll, it) + _ngi_netwm_icon_geometry_set + (it->border, ng->hide_step, + it->base.pos, size, size); + break; + + case E_GADCON_ORIENT_RIGHT: + EINA_LIST_FOREACH(box->items, ll, it) + _ngi_netwm_icon_geometry_set + (it->border, (ng->win->popup->x + ng->win->popup->w) - size, + it->base.pos, size, size); + break; + } + } +} + + +static void +_ngi_zoom_function(Ng *ng, double d, double *disp) +{ + float range = ng->cfg->zoom_range * ng->size; + + *disp = erf(d / range) * range * (ng->zoom - 1.0) + 0.6; +} + +static void +_ngi_redraw(Ng *ng) +{ + Ngi_Item *it; + Ngi_Box *box; + Eina_List *l, *ll; + + double pos, pos2; + int end1, end2, size_spacing, hide_step; + int bw, bh, bx, by; + + Config_Item *cfg = ng->cfg; + + int edge_offset = ng->opt.edge_offset; + int separator_width = ng->opt.separator_width; + + int cnt = 0; + double disp = 0.0; + + int w = ng->win->popup->w; + int h = ng->win->popup->h; + + if (cfg->autohide) + hide_step = ng->hide_step; + else + hide_step = ng->hide_step = 0; + + size_spacing = ng->size + edge_offset; + + + if (ng->o_proxy && ((ng->hide_state == hiding) || (ng->hide_state == showing))) + _ngi_proxy_geometry_calc(ng); + + if (cfg->show_background) + { + _ngi_zoom_function(ng, ng->start - ng->pos, &disp); + end1 = ng->start + disp; + + _ngi_zoom_function(ng, ng->start + ng->w - ng->pos, &disp); + end2 = ng->start + ng->w + disp; + + switch (cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + bx = end1; + by = h + hide_step - size_spacing; + bw = end2 - end1; + bh = size_spacing; + break; + + case E_GADCON_ORIENT_TOP: + bx = end1; + by = - hide_step; + bw = end2 - end1; + bh = size_spacing; + break; + + case E_GADCON_ORIENT_LEFT: + bx = - hide_step; + by = end1; + bw = size_spacing; + bh = end2 - end1; + break; + + case E_GADCON_ORIENT_RIGHT: + bx = w + hide_step - size_spacing; + by = end1; + bw = size_spacing; + bh = end2 - end1; + } + + evas_object_move(ng->o_bg, bx, by); + evas_object_resize(ng->o_bg, bw, bh); + evas_object_move(ng->o_frame, bx, by); + evas_object_resize(ng->o_frame, bw, bh); + } + + if (ng->item_active /* && ng->state != unzoomed */) + { + switch (cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + evas_object_move(ng->o_label, ng->item_active->pos + ng->size/2, + (h + hide_step) - ((double)ng->size * ng->zoom + TEXT_DIST)); + break; + + case E_GADCON_ORIENT_TOP: + evas_object_move(ng->o_label, ng->item_active->pos + ng->size/2, + ((double)ng->size * ng->zoom + TEXT_DIST) - hide_step); + break; + } + } + + EINA_LIST_FOREACH (ng->boxes, ll, box) + { + if (cnt++ > 0) + { + _ngi_zoom_function(ng, box->pos - ng->pos, &disp); + pos = (box->pos + disp); + + switch (cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + evas_object_move(box->separator, pos, h + hide_step - size_spacing); + evas_object_resize(box->separator, separator_width, size_spacing); + break; + + case E_GADCON_ORIENT_TOP: + evas_object_move(box->separator, pos, -hide_step); + evas_object_resize(box->separator, separator_width, size_spacing); + break; + + case E_GADCON_ORIENT_LEFT: + evas_object_move(box->separator, -hide_step, pos); + evas_object_resize(box->separator, size_spacing, separator_width); + break; + + case E_GADCON_ORIENT_RIGHT: + evas_object_move(box->separator, w + hide_step - size_spacing, pos); + evas_object_resize(box->separator, size_spacing, separator_width); + } + evas_object_show(box->separator); + } + else + evas_object_hide(box->separator); + + EINA_LIST_FOREACH (box->items, l, it) + { + double size; + + if (!l->prev) + { + _ngi_zoom_function(ng, it->pos - ng->pos, &pos); + pos = (double)it->pos + pos; + } + else + { + pos = pos2 + (double)ng->opt.item_spacing; + } + + _ngi_zoom_function(ng, it->pos + (ng->size * it->scale) - ng->pos, &pos2); + pos2 = (double)it->pos + ((double)ng->size * it->scale) + pos2; + size = (int)pos2 - (int)pos; + + switch (cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + bx = pos; + by = h + hide_step - (edge_offset + size); + break; + + case E_GADCON_ORIENT_TOP: + bx = pos; + by = edge_offset - hide_step; + break; + + case E_GADCON_ORIENT_LEFT: + bx = edge_offset - hide_step; + by = pos; + break; + + case E_GADCON_ORIENT_RIGHT: + bx = w + hide_step - (edge_offset + size); + by = pos; + break; + } + + evas_object_move(it->obj, bx, by); + evas_object_resize(it->obj, size, size); + + evas_object_move(it->over, bx, by); + evas_object_resize(it->over, size, size); + } + } + + ng->changed = 0; +} + +void +ngi_bar_lock(Ng *ng, int show) +{ + + if (show) + { + ng->show_bar++; + } + else if (ng->show_bar > 0) + { + ng->show_bar--; + } +} + +void +ngi_freeze(Ng *ng) +{ + if (ng->animator) + { + ecore_animator_del(ng->animator); + ng->animator = NULL; + } +} + +void +ngi_thaw(Ng *ng) +{ + ngi_reposition(ng); + ngi_input_extents_calc(ng); + ngi_animate(ng); +} + +/* static int + * _ngi_check_fullscreen(E_Desk *desk) + * { + * Eina_List *l; + * E_Border *bd; + * + * EINA_LIST_FOREACH(e_border_client_list(), l, bd) + * { + * if (bd->desk != desk) + * continue; + * + * if (bd->fullscreen) + * return 1; + * } + * + * return 0; + * } */ + +static Eina_Bool +_ngi_win_cb_desk_show(void *data, int type, void *event) +{ + E_Event_Desk_Show *ev = event; + Ng *ng = data; + int fullscreen; + + if (ng->cfg->stacking == below_fullscreen) + { + fullscreen = ev->desk->fullscreen_borders; + + if (fullscreen) + e_popup_hide(ng->win->popup); + else + e_popup_show(ng->win->popup); + } + else if (ng->cfg->autohide == AUTOHIDE_FULLSCREEN) + { + fullscreen = ev->desk->fullscreen_borders; + + if (ng->hide_fullscreen != fullscreen) + ngi_animate(ng); + + ng->hide_fullscreen = fullscreen; + } + return EINA_TRUE; +} + +static Eina_Bool +_ngi_win_cb_border_event(void *data, int type, void *event) +{ + E_Event_Border_Property *ev = event; + Ng *ng = data; + E_Desk *desk; + int fullscreen; + + if (ng->cfg->stacking == below_fullscreen) + { + desk = e_desk_current_get(ng->zone); + + if (ev->border->desk != desk) + return EINA_TRUE; + + fullscreen = desk->fullscreen_borders; + + if (fullscreen) + e_popup_hide(ng->win->popup); + else + e_popup_show(ng->win->popup); + } + else if (ng->cfg->autohide == AUTOHIDE_FULLSCREEN) + { + desk = e_desk_current_get(ng->zone); + + if (ev->border->desk != desk) + return EINA_TRUE; + + fullscreen = desk->fullscreen_borders; + + if (ng->hide_fullscreen != fullscreen) + ngi_animate(ng); + + ng->hide_fullscreen = fullscreen; + } + + return EINA_TRUE; +} + + +/***************************************************************************/ + +EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "itask-ng" }; + +static int +_ngi_init_timer_cb(void *data) +{ + Eina_List *l; + Config_Item *ci; + + EINA_LIST_FOREACH (ngi_config->items, l, ci) + ngi_new(ci); + + initialized = 1; + + return 0; +} + +/* menu item callback(s) */ +static void +_e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi) +{ + ngi_instances_config(e_util_zone_current_get(e_manager_current_get())->container, NULL); +} + +/* menu item add hook */ +static void +_e_mod_menu_add(void *data, E_Menu *m) +{ + E_Menu_Item *mi; + + mi = e_menu_item_new(m); + e_menu_item_label_set(mi, D_("Itask-NG")); + e_util_menu_item_theme_icon_set(mi, "preferences-desktop-shelf"); + e_menu_item_callback_set(mi, _e_mod_run_cb, NULL); +} + +static void +_ngi_config_free() +{ + Config_Item *ci; + Config_Box *cfg_box; + Config_Gadcon *cg; + + EINA_LIST_FREE(ngi_config->items, ci) + { + EINA_LIST_FREE(ci->boxes, cfg_box) + { + if (cfg_box->type == launcher && cfg_box->launcher_app_dir) + eina_stringshare_del(cfg_box->launcher_app_dir); + + if (cfg_box->type == gadcon) + { + EINA_LIST_FREE(cfg_box->gadcon_items, cg) + eina_stringshare_del(cg->name); + } + } + free(ci); + } + + if (ngi_config->theme_path) free(ngi_config->theme_path); + free(ngi_config); + ngi_config = NULL; +} + +EAPI void * +e_modapi_init(E_Module *m) +{ + char buf[4096]; + ngi_config = NULL; + + /* Location of message catalogs for localization */ + snprintf(buf, sizeof(buf), "%s/locale", e_module_dir_get(m)); + bindtextdomain(PACKAGE, buf); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + + ngi_conf_gadcon_edd = E_CONFIG_DD_NEW("Ngi_Config_Gadcon", Config_Gadcon); + E_CONFIG_VAL(ngi_conf_gadcon_edd, Config_Gadcon, name, STR); + + ngi_conf_box_edd = E_CONFIG_DD_NEW("Ngi_Config_Item_Box", Config_Box); + E_CONFIG_VAL(ngi_conf_box_edd, Config_Box, type, INT); + E_CONFIG_VAL(ngi_conf_box_edd, Config_Box, launcher_app_dir, STR); + E_CONFIG_VAL(ngi_conf_box_edd, Config_Box, launcher_lock_dnd, INT); + E_CONFIG_VAL(ngi_conf_box_edd, Config_Box, taskbar_skip_dialogs, INT); + E_CONFIG_VAL(ngi_conf_box_edd, Config_Box, taskbar_adv_bordermenu, INT); + E_CONFIG_VAL(ngi_conf_box_edd, Config_Box, taskbar_show_iconified, INT); + E_CONFIG_VAL(ngi_conf_box_edd, Config_Box, taskbar_show_desktop, INT); + E_CONFIG_VAL(ngi_conf_box_edd, Config_Box, taskbar_append_right, INT); + E_CONFIG_VAL(ngi_conf_box_edd, Config_Box, taskbar_group_apps, INT); + E_CONFIG_LIST(ngi_conf_box_edd, Config_Box, gadcon_items, ngi_conf_gadcon_edd); + + ngi_conf_item_edd = E_CONFIG_DD_NEW("Ngi_Config_Item", Config_Item); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, show_label, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, show_background, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, container, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, zone, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, orient, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, size, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, autohide, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, autohide_show_urgent, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, hide_timeout, FLOAT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, zoom_duration, FLOAT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, zoomfactor, FLOAT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, zoom_range, FLOAT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, hide_below_windows, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, alpha, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, stacking, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, mouse_over_anim, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, lock_deskswitch, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, ecomorph_features, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, rflxn_alpha, INT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, rflxn_foc, FLOAT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, rflxn_dist, FLOAT); + E_CONFIG_VAL(ngi_conf_item_edd, Config_Item, rflxn_rot, FLOAT); + E_CONFIG_LIST(ngi_conf_item_edd, Config_Item, boxes, ngi_conf_box_edd); + + ngi_conf_edd = E_CONFIG_DD_NEW("Ngi_Config", Config); + E_CONFIG_VAL(ngi_conf_edd, Config, version, INT); + E_CONFIG_LIST(ngi_conf_edd, Config, items, ngi_conf_item_edd); + + ngi_config = (Config *)e_config_domain_load("module.itask-ng", ngi_conf_edd); + + if (ngi_config && !e_util_module_config_check + (D_("Itask-NG"), ngi_config->version, + MOD_CONFIG_FILE_EPOCH, MOD_CONFIG_FILE_VERSION)) + _ngi_config_free(); + + if (!ngi_config) + { + ngi_config = E_NEW(Config, 1); + ngi_config->version = (MOD_CONFIG_FILE_EPOCH << 16); + } + + ngi_config->cfd = NULL; + ngi_config->module = m; + + snprintf(buf, sizeof(buf), "%s/itask-ng.edj", e_module_dir_get(m)); + ngi_config->theme_path = strdup(buf); + + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/", e_user_homedir_get()); + if (!ecore_file_mkdir(buf) && !ecore_file_is_dir(buf)) + { + e_error_message_show("Error creating directory:\n %s\n",buf); + return m; + } + + e_configure_registry_item_add("extensions/itask_ng", 40, + D_("Itask NG"), NULL, + "preferences-desktop-shelf", + ngi_instances_config); + + ngi_config->handlers = eina_list_append + (ngi_config->handlers, ecore_event_handler_add + (E_EVENT_CONTAINER_RESIZE, _ngi_cb_container_resize, NULL)); + + ngi_taskbar_init(); + ngi_gadcon_init(); + + if (ecore_x_screen_is_composited(0)) + ngi_config->use_composite = 1; + else + ngi_config->use_composite = 0; + + e_module_delayed_set(m, 1); + _ngi_init_timer_cb(NULL); + + maug = e_int_menus_menu_augmentation_add + ("config/1", _e_mod_menu_add, NULL, NULL, NULL); + + return m; +} + +EAPI int +e_modapi_shutdown(E_Module *m) +{ + Ecore_Event_Handler *h; + Ng *ng; + Eina_List *l, *ll; + + if (maug) + { + e_int_menus_menu_augmentation_del("config/1", maug); + maug = NULL; + } + + ngi_gadcon_shutdown(); + + EINA_LIST_FOREACH_SAFE(ngi_config->instances, l, ll, ng) + { + if (ng->cfg->config_dialog) + e_object_del(E_OBJECT(ng->cfg->config_dialog)); + + ngi_free(ng); + } + + EINA_LIST_FREE(ngi_config->handlers, h) + ecore_event_handler_del(h); + + _ngi_config_free(); + + E_CONFIG_DD_FREE(ngi_conf_gadcon_edd); + E_CONFIG_DD_FREE(ngi_conf_box_edd); + E_CONFIG_DD_FREE(ngi_conf_item_edd); + E_CONFIG_DD_FREE(ngi_conf_edd); + + e_configure_registry_item_del("extensions/itask_ng"); + + return 1; +} + +EAPI int +e_modapi_save(E_Module *m) +{ + e_config_domain_save("module.itask-ng", ngi_conf_edd, ngi_config); + return 1; +} diff --git a/src/e_mod_main.h b/src/e_mod_main.h new file mode 100644 index 0000000..7a295f5 --- /dev/null +++ b/src/e_mod_main.h @@ -0,0 +1,379 @@ +#include +#include + +#define D_(str) dgettext(PACKAGE, str) + +#ifndef E_MOD_MAIN_H +#define E_MOD_MAIN_H + +#define MOD_CONFIG_FILE_EPOCH 0x0001 +#define MOD_CONFIG_FILE_GENERATION 0x0001 +#define MOD_CONFIG_FILE_VERSION \ + ((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION) + +#define AUTOHIDE_NONE 0 +#define AUTOHIDE_NORMAL 1 +#define AUTOHIDE_FULLSCREEN 2 + +/* #define ITEM_MOUSE_DOWN(_item, _ev) \ + * if(_item && _item->cb_mouse_down) \ + * _item->cb_mouse_down(_item, _ev); \ + * + * #define ITEM_MOUSE_UP(_item, _ev) \ + * if(_item && _item->cb_mouse_up) \ + * _item->cb_mouse_up(_item, _ev); \ + * + * #define ITEM_MOUSE_OUT(_item) \ + * if(_item && _item->cb_mouse_out) \ + * _item->cb_mouse_out(_item); \ + * + * #define ITEM_MOUSE_IN(_item) \ + * if(_item && _item->cb_mouse_in) \ + * _item->cb_mouse_in(_item); \ */ + +#define ITEM_MOUSE_WHEEL(_item, ev) \ + if(_item && _item->cb_mouse_wheel) \ + _item->cb_mouse_wheel(_item, ev); \ + +#define ITEM_DRAG_START(_item) \ + if(_item && _item->cb_drag_start) \ + _item->cb_drag_start(_item); \ + +#define ITEM_FREE(_item) \ + if(_item && _item->cb_free) \ + _item->cb_free(_item); \ + _item = NULL; \ + + +typedef struct _Config Config; +typedef struct _Config_Item Config_Item; +typedef struct _Config_Box Config_Box; +typedef struct _Config_Gadcon Config_Gadcon; +typedef struct _Ng Ng; +typedef struct _Ngi_Item Ngi_Item; +typedef struct _Ngi_Item_Launcher Ngi_Item_Launcher; +typedef struct _Ngi_Item_Taskbar Ngi_Item_Taskbar; +typedef struct _Ngi_Item_Gadcon Ngi_Item_Gadcon; +typedef struct _Ngi_Win Ngi_Win; +typedef struct _Ngi_Box Ngi_Box; + +struct _Config +{ + int version; + + E_Module *module; + Eina_List *instances; + E_Menu *menu; + + Eina_List *items; + char *theme_path; + + int use_composite; + E_Config_Dialog *cfd; + Eina_List *handlers; +}; + +struct _Config_Item +{ + Ng *ng; + + int show_label; + int show_background; + int container; + int zone; + int orient; + int size; + int window_size; + int autohide; + int autohide_show_urgent; + int hide_below_windows; + float zoomfactor; + float zoom_range; + float hide_timeout; + float zoom_duration; + int alpha; + int mouse_over_anim; + + enum { above_all, below_fullscreen } stacking; + + int lock_deskswitch; + int ecomorph_features; + + int rflxn_alpha; + float rflxn_foc; + float rflxn_dist; + float rflxn_rot; + + Eina_List *boxes; + + E_Config_Dialog *config_dialog; +}; + +struct _Config_Box +{ + enum { launcher, taskbar, gadcon } type; + + int taskbar_skip_dialogs; + int taskbar_adv_bordermenu; + int taskbar_show_iconified; + int taskbar_show_desktop; + int taskbar_append_right; + int taskbar_group_apps; + + const char *launcher_app_dir; + int launcher_lock_dnd; + + Eina_List *gadcon_items; + + Ngi_Box *box; +}; + +struct _Config_Gadcon +{ + const char *name; +}; + + + +struct _Ngi_Win +{ + Ng *ng; + E_Popup *popup; + Ecore_X_Window input; + XRectangle rect; + E_Win *fake_iwin; + E_Object *drop_win; +}; + + + +struct _Ng +{ + Ngi_Win *win; + Evas *evas; + Eina_List *boxes; + + Config_Item *cfg; + + E_Zone *zone; + + Evas_Object *o_bg; + Evas_Object *o_proxy; + Evas_Object *o_icons; + Evas_Object *o_frame; + Evas_Object *o_label; + + Evas_Object *clip; + Evas_Object *bg_clip; + + unsigned char changed : 1; + + int pos; /* mouse position */ + int size; /* current icon size */ + + enum { unzoomed, zooming, zoomed, unzooming } state; + enum { hidden, hiding, showing, show } hide_state; + int hide_fullscreen; + + double zoom; + double start_zoom; + double start_hide; + + Eina_List *items_show; + Eina_List *items_remove; + + Ngi_Item *item_active; + + int hide_step; + + int w, h, start; + int horizontal; + + int mouse_in; + int show_bar; + + int dnd; + Ngi_Item *item_drag; + + Eina_List *handlers; + + Ecore_Animator *animator; + Ecore_Timer *mouse_in_timer; + Ecore_Timer *menu_wait_timer; + Ecore_Timer *effect_timer; + + struct + { + int clip_separator; + int separator_width; + int item_spacing; + int edge_offset; + int bg_offset; + int reflection_offset; + double keep_overlay_pos; + double fade_duration; + } opt; +}; + +struct _Ngi_Item +{ + Ngi_Box *box; + + Evas_Object *obj; + Evas_Object *over; + + const char *label; + + unsigned int mouse_down; + int pos; + double displace; + double scale; + + struct + { + unsigned char start : 1; + unsigned char dnd : 1; + int x, y; + int dx, dy; + } drag; + + void (*cb_free) (Ngi_Item *it); + void (*cb_mouse_down) (Ngi_Item *it, Ecore_Event_Mouse_Button *ev); + void (*cb_mouse_up) (Ngi_Item *it, Ecore_Event_Mouse_Button *ev); + void (*cb_mouse_in) (Ngi_Item *it); + void (*cb_mouse_out) (Ngi_Item *it); + void (*cb_drag_start) (Ngi_Item *it); + + double start_time; + + int delete_me; +}; + +struct _Ngi_Item_Launcher +{ + Ngi_Item base; + + Evas_Object *o_icon; + Evas_Object *o_proxy; + + Efreet_Desktop *app; +}; + + +struct _Ngi_Item_Taskbar +{ + Ngi_Item base; + + Evas_Object *o_icon; + Evas_Object *o_proxy; + + E_Border *border; + + unsigned int border_was_fullscreen; + unsigned int urgent; + const char *class; /* store icccm.class...*/ +}; + +struct _Ngi_Item_Gadcon +{ + Ngi_Item base; + + Evas_Object *o_icon; + Evas_Object *o_proxy; + + E_Gadcon *gadcon; + Config_Gadcon *cfg_gadcon; + +}; + + +struct _Ngi_Box +{ + Ng *ng; + Config_Box *cfg; + Eina_List *handlers; + Eina_List *items; + Ecore_Timer *dnd_timer; + E_Drop_Handler *drop_handler; + Ngi_Item *item_drop; + Evas_Object *separator; + Evas_Coord pos, w; + + E_Order *apps; + + E_Config_Dialog *cfd; +}; + +EAPI extern E_Module_Api e_modapi; +EAPI void *e_modapi_init (E_Module *m); +EAPI int e_modapi_shutdown (E_Module *m); +EAPI int e_modapi_save (E_Module *m); +EAPI int e_modapi_about (E_Module *m); +EAPI int e_modapi_config (E_Module *m); + +EAPI E_Config_Dialog *ngi_instances_config(E_Container *con, const char *params); + + + +Ng *ngi_new (Config_Item *ci); +void ngi_free (Ng *ng); +void ngi_reposition (Ng *ng); +void ngi_input_extents_calc (Ng *ng); +void ngi_freeze (Ng *ng); +void ngi_thaw (Ng *ng); +void ngi_animate (Ng *ng); +void ngi_mouse_in (Ng *ng); +void ngi_mouse_out (Ng *ng); +Ngi_Item * ngi_item_at_position_get (Ng *ng); +void ngi_bar_lock (Ng *ng, int lock); + +void ngi_win_show (Ngi_Win *win); +void ngi_win_hide (Ngi_Win *win); +void ngi_win_position_calc (Ngi_Win *win); + +Ngi_Box *ngi_box_new (Ng *ng); +void ngi_box_free (Ngi_Box *box); + +void ngi_configure_module (Config_Item *ci); +void ngi_configure_box (Ngi_Box *box); + +void ngi_item_init_defaults (Ngi_Item *it); +void ngi_item_label_set(Ngi_Item *it, const char *label); + + +void ngi_item_free (Ngi_Item *it); +void ngi_item_show (Ngi_Item *it, int instant); +void ngi_item_remove (Ngi_Item *it); +void ngi_item_del_icon (Ngi_Item *it); +void ngi_item_mouse_down (Ngi_Item *it, Ecore_Event_Mouse_Button *ev); +void ngi_item_mouse_up (Ngi_Item *it, Ecore_Event_Mouse_Button *ev); +void ngi_item_mouse_in (Ngi_Item *it); +void ngi_item_mouse_out (Ngi_Item *it); +void ngi_item_signal_emit (Ngi_Item *it, char *sig); +void ngi_item_activate (Ng *ng); + +void ngi_launcher_new (Ng *ng, Config_Box *cfg_box); +void ngi_launcher_remove (Ngi_Box *box); + +void ngi_taskbar_init (void); +void ngi_taskbar_new (Ng *ng, Config_Box *cfg_box); +void ngi_taskbar_remove (Ngi_Box *box); + +void ngi_gadcon_init (void); +void ngi_gadcon_shutdown (void); +void ngi_gadcon_new (Ng *ng, Config_Box *cfg_box); +void ngi_gadcon_remove (Ngi_Box *box); +void ngi_gadcon_config (Ngi_Box *box); + +void ngi_border_menu_show (Ngi_Box *box, E_Border *bd, + Evas_Coord x, Evas_Coord y, + int dir, Ecore_X_Time timestamp); + +Eina_Bool ngi_object_theme_set(Evas_Object *obj, const char *part); + +extern Config *ngi_config; +extern E_Config_DD *ngi_conf_edd; +extern E_Config_DD *ngi_conf_item_edd; +extern E_Config_DD *ngi_conf_box_edd; +extern E_Config_DD *ngi_conf_gadcon_edd; +#endif diff --git a/src/ng_border_menu.c b/src/ng_border_menu.c new file mode 100644 index 0000000..fab6d97 --- /dev/null +++ b/src/ng_border_menu.c @@ -0,0 +1,176 @@ +#include "e_mod_main.h" + +static void _ng_border_cb_border_menu_end(void *data, E_Menu *m); +static void _ng_border_menu_cb_close(void *data, E_Menu *m, E_Menu_Item *mi); +static void _ng_border_menu_cb_iconify(void *data, E_Menu *m, E_Menu_Item *mi); +static void _ng_border_menu_cb_maximize(void *data, E_Menu *m, E_Menu_Item *mi); +static void _ng_border_menu_cb_unmaximize(void *data, E_Menu *m, E_Menu_Item *mi); +static void _ng_border_menu_cb_fullscreen(void *data, E_Menu *m, E_Menu_Item *mi); + +void +ngi_border_menu_show(Ngi_Box *box, E_Border *bd, Evas_Coord x, Evas_Coord y, int dir, Ecore_X_Time timestamp) +{ + E_Menu *m; + E_Menu_Item *mi; + Ng *ng = box->ng; + + if (bd->border_menu) + return; + + m = e_menu_new(); + e_menu_category_set(m,"border"); + e_menu_category_data_set("border",bd); + e_object_data_set(E_OBJECT(m), bd); + bd->border_menu = m; + e_menu_post_deactivate_callback_set(m, _ng_border_cb_border_menu_end, ng); /* FIXME */ + + if ((!bd->lock_user_fullscreen) && (!bd->shaded)) + { + mi = e_menu_item_new(m); + e_menu_item_label_set(mi, D_("Fullscreen")); + e_menu_item_check_set(mi, 1); + e_menu_item_toggle_set(mi, bd->fullscreen); + e_menu_item_callback_set(mi, _ng_border_menu_cb_fullscreen, bd); + e_menu_item_icon_edje_set(mi, + e_theme_edje_file_get("base/theme/borders", + "e/widgets/border/default/fullscreen"), + "e/widgets/border/default/fullscreen"); + } + + mi = e_menu_item_new(m); + e_menu_item_separator_set(mi, 1); + if (!bd->lock_close) + { + mi = e_menu_item_new(m); + e_menu_item_label_set(mi, D_("Close")); + e_menu_item_callback_set(mi, _ng_border_menu_cb_close, bd); + e_menu_item_icon_edje_set(mi, + e_theme_edje_file_get("base/theme/borders", + "e/widgets/border/default/close"), + "e/widgets/border/default/close"); + } + + if (!bd->internal) + { + mi = e_menu_item_new(m); + e_menu_item_separator_set(mi, 1); + + if (!(((bd->client.icccm.min_w == bd->client.icccm.max_w) && + (bd->client.icccm.min_h == bd->client.icccm.max_h)) || + (bd->lock_user_maximize))) + { + if ((!bd->lock_user_maximize) && (!bd->shaded) && + ((bd->layer == 50) || (bd->layer == 100) || (bd->layer == 150))) + { + mi = e_menu_item_new(m); + e_menu_item_label_set(mi, D_("Maximized")); + e_menu_item_check_set(mi, 1); + e_menu_item_toggle_set(mi, (bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH); + if((bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH) + e_menu_item_callback_set(mi, _ng_border_menu_cb_unmaximize, bd); + else + e_menu_item_callback_set(mi, _ng_border_menu_cb_maximize, bd); + + e_menu_item_icon_edje_set(mi, + e_theme_edje_file_get("base/theme/borders", + "e/widgets/border/default/maximize"), + "e/widgets/border/default/maximize"); + } + } + } + + if (!bd->lock_user_iconify) + { + mi = e_menu_item_new(m); + if(bd->iconic) + e_menu_item_label_set(mi, D_("Uniconify")); + else + e_menu_item_label_set(mi, D_("Iconify")); + + e_menu_item_callback_set(mi, _ng_border_menu_cb_iconify, bd); + e_menu_item_icon_edje_set(mi, + e_theme_edje_file_get("base/theme/borders", + "e/widgets/border/default/minimize"), + "e/widgets/border/default/minimize"); + } + + e_menu_activate_mouse(m, ng->zone, ng->zone->x + x, ng->zone->y + y, 1, 1, + dir, timestamp); +} + +static void +_ng_border_cb_border_menu_end(void *data, E_Menu *m) +{ + E_Border *bd; + + bd = (E_Border *)e_object_data_get(E_OBJECT(m)); + if (bd) + { + /* If the border exists, delete all associated menus */ + e_int_border_menu_del(bd); + } + else + { + /* Just delete this menu */ + e_object_del(E_OBJECT(m)); + } + + // if (ng) ngi_thaw(ng); +} + +static void +_ng_border_menu_cb_close(void *data, E_Menu *m, E_Menu_Item *mi) +{ + E_Border *bd = (E_Border *)data; + if (!bd->lock_close) + e_border_act_close_begin(bd); +} + +static void +_ng_border_menu_cb_iconify(void *data, E_Menu *m, E_Menu_Item *mi) +{ + E_Border *bd = (E_Border *)data; + if (!bd->lock_user_iconify) + { + if (bd->iconic) + e_border_uniconify(bd); + else + e_border_iconify(bd); + } +} + +static void +_ng_border_menu_cb_maximize(void *data, E_Menu *m, E_Menu_Item *mi) +{ + E_Border *bd = (E_Border *)data; + if (!bd->lock_user_maximize) + e_border_maximize(bd, (e_config->maximize_policy & E_MAXIMIZE_TYPE) | + E_MAXIMIZE_BOTH); +} + +static void +_ng_border_menu_cb_unmaximize(void *data, E_Menu *m, E_Menu_Item *mi) +{ + E_Border *bd = (E_Border *)data; + e_border_unmaximize(bd, E_MAXIMIZE_BOTH); +} + +static void +_ng_border_menu_cb_fullscreen(void *data, E_Menu *m, E_Menu_Item *mi) +{ + E_Border *bd = (E_Border *)data; + int toggle; + + if (!bd) + return; + + if (!bd->lock_user_fullscreen) + { + toggle = e_menu_item_toggle_get(mi); + if (toggle) + e_border_fullscreen(bd, (E_Fullscreen)e_config->fullscreen_policy); + else + e_border_unfullscreen(bd); + } +} + diff --git a/src/ng_box.c b/src/ng_box.c new file mode 100644 index 0000000..5df1ef6 --- /dev/null +++ b/src/ng_box.c @@ -0,0 +1,59 @@ +#include "e_mod_main.h" + +Ngi_Box * +ngi_box_new(Ng *ng) +{ + Ngi_Box *box; + + box = E_NEW(Ngi_Box, 1); + box->ng = ng; + box->pos = 0; + box->apps = NULL; + box->drop_handler = NULL; + box->item_drop = NULL; + box->dnd_timer = NULL; + box->items = NULL; + + box->separator = edje_object_add(ng->evas); + + switch(box->ng->cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + ngi_object_theme_set(box->separator, "e/modules/itask-ng/separator_bottom"); + break; + case E_GADCON_ORIENT_TOP: + ngi_object_theme_set(box->separator, "e/modules/itask-ng/separator_top"); + break; + case E_GADCON_ORIENT_LEFT: + ngi_object_theme_set(box->separator, "e/modules/itask-ng/separator_left"); + break; + case E_GADCON_ORIENT_RIGHT: + ngi_object_theme_set(box->separator, "e/modules/itask-ng/separator_right"); + break; + } + + const char *clip_to = edje_object_data_get(box->separator, "clip_to_background"); + + if (clip_to && atoi(clip_to)) + evas_object_clip_set(box->separator, ng->bg_clip); + + evas_object_clip_set(box->separator, ng->bg_clip); + + ng->boxes = eina_list_append(ng->boxes, box); + + return box; +} + +void +ngi_box_free(Ngi_Box *box) +{ + box->ng->boxes = eina_list_remove(box->ng->boxes, box); + + while(box->items) + ngi_item_free(box->items->data); + + if (box->separator) + evas_object_del(box->separator); + + E_FREE(box); +} diff --git a/src/ng_config.c b/src/ng_config.c new file mode 100644 index 0000000..66abb48 --- /dev/null +++ b/src/ng_config.c @@ -0,0 +1,933 @@ +#include "e_mod_main.h" + +struct _E_Config_Dialog_Data +{ + int show_label; + int show_background; + int orient; + int size; + double zoomfactor; + int autohide; + int autohide_show_urgent; + int lock_deskswitch; + int ecomorph_features; + + double hide_timeout; + double zoom_duration; + double zoom_range; + + int hide_below_windows; + int hide_mode; + int alpha; + int stacking; + int mouse_over_anim; + + int rflxn_alpha; + double rflxn_foc; + double rflxn_dist; + double rflxn_rot; + + Eina_List *boxes; + + Evas_Object *ilist; + + Evas_Object *tlist_box; + Config_Box *cfg_box; + Config_Item *cfg; + E_Config_Dialog *cfd; + + const char *app_dir; +}; + +static void * _create_data(E_Config_Dialog *cfd); +static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); +static Evas_Object * _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); +static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); + +static void _cb_add(void *data, void *data2); +static void _cb_del(void *data, void *data2); +static void _cb_config(void *data, void *data2); +static void _cb_entry_ok(char *text, void *data); +static void _cb_confirm_dialog_yes(void *data); +static void _load_ilist(E_Config_Dialog_Data *cfdata); +static void _cb_slider_change(void *data, Evas_Object *obj); + +static void _cb_box_add_launcher(void *data, void *data2); +static void _cb_box_add_taskbar(void *data, void *data2); +static void _cb_box_add_gadcon(void *data, void *data2); +static void _cb_box_del(void *data, void *data2); +static void _cb_box_config(void *data, void *data2); +static void _cb_box_up(void *data, void *data2); +static void _cb_box_down(void *data, void *data2); +static void _load_box_tlist(E_Config_Dialog_Data *cfdata); + +void +ngi_configure_module(Config_Item *ci) +{ + E_Config_Dialog *cfd; + E_Config_Dialog_View *v; + Eina_List *l; + char buf[4096]; + char path[128]; + Config_Item *ci2; + int i = 0; + + if (ci->config_dialog) + return; + + EINA_LIST_FOREACH(ngi_config->items, l, ci2) + if (ci == ci2) + break; + else + i++; + + snprintf(path, sizeof(path), "extensions/itask_ng::%d", i); + if (e_config_dialog_find("E", path)) + return; + + v = E_NEW(E_Config_Dialog_View, 1); + + /* Dialog Methods */ + v->create_cfdata = _create_data; + v->free_cfdata = _free_data; + v->basic.apply_cfdata = _basic_apply_data; + v->basic.create_widgets = _basic_create_widgets; + v->advanced.apply_cfdata = NULL; + v->advanced.create_widgets = NULL; + + /* Create The Dialog */ + snprintf(buf, sizeof(buf), "%s/e-module-ng.edj", e_module_dir_get(ngi_config->module)); + cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()), + D_("Itask NG Configuration"), + "E", path, buf, 0, v, ci); + + ci->config_dialog = cfd; + ngi_bar_lock(ci->ng, 1); +} + +static void +_fill_data(Config_Item *ci, E_Config_Dialog_Data *cfdata) +{ +#define C(_name) cfdata->_name = ci->_name; + C(show_background); + C(show_label); + C(orient); + C(size); + C(zoomfactor); + C(autohide); + C(autohide_show_urgent); + C(hide_below_windows); + C(hide_timeout); + C(zoom_duration); + C(zoom_range); + C(alpha); + C(stacking); + C(mouse_over_anim); + C(lock_deskswitch); + C(ecomorph_features); + C(rflxn_alpha); + C(rflxn_rot); + C(rflxn_dist); + C(rflxn_foc); +#undef C + + cfdata->cfg = ci; + cfdata->cfd = ci->config_dialog; + + cfdata->ilist = NULL; + cfdata->tlist_box = NULL; +} + +static void * +_create_data(E_Config_Dialog *cfd) +{ + E_Config_Dialog_Data *cfdata; + Config_Item *ci; + + ci = (Config_Item *)cfd->data; + cfdata = E_NEW(E_Config_Dialog_Data, 1); + _fill_data(ci, cfdata); + return cfdata; +} + +static void +_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) +{ + cfdata->cfg->config_dialog = NULL; + if (cfdata->cfg->ng) ngi_bar_lock(cfdata->cfg->ng, 0); + free(cfdata); +} + +static Evas_Object * +_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) +{ + E_Radio_Group *rg; + Evas_Object *ol, *of, *ob, *ot, *otb; + + otb = e_widget_toolbook_add(evas, 0, 0); + + /* _______ first column __________________________________________________*/ + ol = e_widget_list_add(evas, 0, 0); + of = e_widget_framelist_add(evas, D_("Appearance"), 0); + ob = e_widget_label_add (evas, D_("Icon Size:")); + e_widget_framelist_object_append (of, ob); + ob = e_widget_slider_add (evas, 1, 0, D_("%1.0f px"), 16.0, 128, + 1.0, 0, NULL, &(cfdata->size), 100); + e_widget_on_change_hook_set(ob, _cb_slider_change, cfdata); + e_widget_framelist_object_append (of, ob); + + ob = e_widget_label_add (evas, D_("Reflection Opacity:")); + e_widget_framelist_object_append (of, ob); + ob = e_widget_slider_add (evas, 1, 0, D_("%1.0f"), 0, 255, + 1.0, 0, NULL, &(cfdata->rflxn_alpha), 100); + e_widget_on_change_hook_set(ob, _cb_slider_change, cfdata); + e_widget_framelist_object_append (of, ob); + + if (ngi_config->use_composite) + { + ob = e_widget_label_add (evas, D_("Background Opacity:")); + e_widget_framelist_object_append (of, ob); + ob = e_widget_slider_add (evas, 1, 0, D_("%1.0f \%"), 0, 255, + 1.0, 0, NULL, &(cfdata->alpha), 100); + e_widget_on_change_hook_set(ob, _cb_slider_change, cfdata); + e_widget_framelist_object_append (of, ob); + } + else + cfdata->alpha = 255; + + ob = e_widget_check_add(evas, D_("Show Background Box"), &(cfdata->show_background)); + e_widget_framelist_object_append(of, ob); + + e_widget_list_object_append(ol, of, 1, 0, 0.0); + + of = e_widget_framelist_add(evas, D_("Orientation"), 0); + rg = e_widget_radio_group_new(&(cfdata->orient)); + ob = e_widget_radio_add(evas, D_("Bottom Edge"), E_GADCON_ORIENT_BOTTOM, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, D_("Top Edge"), E_GADCON_ORIENT_TOP, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, D_("Left Edge"), E_GADCON_ORIENT_LEFT, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, D_("Right Edge"), E_GADCON_ORIENT_RIGHT, rg); + e_widget_framelist_object_append(of, ob); + + /* of = e_widget_frametable_add(evas, D_("Orientation"), 1); + * ob = e_widget_radio_icon_add(evas, NULL, "enlightenment/shelf_position_left", + * 24, 24, E_GADCON_ORIENT_LEFT, rg); + * e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 0); + * ob = e_widget_radio_icon_add(evas, NULL, "enlightenment/shelf_position_right", + * 24, 24, E_GADCON_ORIENT_RIGHT, rg); + * e_widget_frametable_object_append(of, ob, 2, 1, 1, 1, 1, 1, 1, 0); + * ob = e_widget_radio_icon_add(evas, NULL, "enlightenment/shelf_position_top", + * 24, 24, E_GADCON_ORIENT_TOP, rg); + * e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 0); + * ob = e_widget_radio_icon_add(evas, NULL, "enlightenment/shelf_position_bottom", + * 24, 24, E_GADCON_ORIENT_BOTTOM, rg); + * e_widget_frametable_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 0); */ + + e_widget_list_object_append(ol, of, 1, 0, 0.0); + e_widget_toolbook_page_append(otb, NULL, D_("Appearance"), ol, 1, 1, 1, 1, 0.5, 0.5); + + + of = e_widget_framelist_add(evas, D_("Zoom"), 0); + ob = e_widget_label_add (evas, D_("Factor:")); + e_widget_framelist_object_append (of, ob); + ob = e_widget_slider_add (evas, 1, 0, "%1.2f", 1.0, 5.0, + 0.01, 0, &(cfdata->zoomfactor), NULL, 100); + e_widget_on_change_hook_set(ob, _cb_slider_change, cfdata); + e_widget_framelist_object_append (of, ob); + ob = e_widget_label_add (evas, D_("Range:")); + e_widget_framelist_object_append (of, ob); + ob = e_widget_slider_add (evas, 1, 0, "%1.2f", 1.0, 4.0, + 0.01, 0, &(cfdata->zoom_range), NULL, 100); + e_widget_on_change_hook_set(ob, _cb_slider_change, cfdata); + e_widget_framelist_object_append (of, ob); + ob = e_widget_label_add (evas, D_("Duration:")); + e_widget_framelist_object_append (of, ob); + ob = e_widget_slider_add (evas, 1, 0, "%1.2f", 0.1, 0.5, + 0.01, 0, &(cfdata->zoom_duration), NULL, 100); + e_widget_on_change_hook_set(ob, _cb_slider_change, cfdata); + e_widget_framelist_object_append (of, ob); + e_widget_toolbook_page_append(otb, NULL, D_("Zoom"), of, 1, 0, 1, 0, 0.5, 0.0); + + + of = e_widget_frametable_add(evas, D_("Bar Items"), 0); + ol = e_widget_ilist_add(evas, 0, 0, NULL); + cfdata->ilist = ol; + _load_box_tlist(cfdata); + e_widget_size_min_set(ol, 300, 80); + e_widget_frametable_object_append(of, ol, 0, 0, 1, 1, 1, 1, 1, 1); + + ot = e_widget_table_add(evas, 0); + ob = e_widget_button_add(evas, D_("Delete"), "widget/del", _cb_box_del, cfdata, NULL); + e_widget_table_object_append(ot, ob, 0, 1, 1, 1, 1, 1, 1, 0); + ob = e_widget_button_add(evas, D_("Configure"), "widget/config", _cb_box_config, cfdata, NULL); + e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 1, 1, 1, 0); + ob = e_widget_button_add(evas, D_("Up"), "widget/up_arrow", _cb_box_up, cfdata, NULL); + e_widget_table_object_append(ot, ob, 1, 0, 1, 1, 1, 1, 1, 0); + ob = e_widget_button_add(evas, D_("Down"), "widget/down_arrow", _cb_box_down, cfdata, NULL); + e_widget_table_object_append(ot, ob, 1, 1, 1, 1, 1, 1, 1, 0); + e_widget_frametable_object_append(of, ot, 0, 1, 1, 1, 1, 1, 1, 0); + + ot = e_widget_table_add(evas, 0); + ob = e_widget_label_add(evas, D_("Add")); + e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 1, 1, 1, 0); + ob = e_widget_button_add(evas, D_("Taskbar"), "widget/add", _cb_box_add_taskbar, cfdata, NULL); + e_widget_table_object_append(ot, ob, 0, 1, 1, 1, 1, 1, 1, 0); + ob = e_widget_button_add(evas, D_("Launcher"), "widget/add", _cb_box_add_launcher, cfdata, NULL); + e_widget_table_object_append(ot, ob, 1, 1, 1, 1, 1, 1, 1, 0); + ob = e_widget_button_add(evas, D_("Gadcon"), "widget/add", _cb_box_add_gadcon, cfdata, NULL); + e_widget_table_object_append(ot, ob, 0, 2, 1, 1, 1, 1, 1, 0); + e_widget_frametable_object_append(of, ot, 0, 2, 1, 1, 1, 1, 1, 0); + e_widget_toolbook_page_append(otb, NULL, D_("Bar Items"), of, 1, 1, 1, 1, 0.5, 0.5); + + + of = e_widget_framelist_add(evas, D_("Auto Hide"), 0); + cfdata->hide_mode = cfdata->autohide; + + rg = e_widget_radio_group_new(&cfdata->hide_mode); + ob = e_widget_radio_add(evas, "None", + AUTOHIDE_NONE, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, "Autohide", + AUTOHIDE_NORMAL, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, "Autohide on Fullscreen", + AUTOHIDE_FULLSCREEN, rg); + e_widget_framelist_object_append(of, ob); + + ob = e_widget_check_add(evas, D_("Show Bar when Urgent"), &(cfdata->autohide_show_urgent)); + e_widget_framelist_object_append(of, ob); + e_widget_toolbook_page_append(otb, NULL, D_("Auto Hide"), of, 1, 0, 1, 0, 0.5, 0.0); + + + /* e_widget_toolbook_page_append(otb, NULL, D_("Orientation"), of, 1, 1, 1, 0, 0.5, 0.0); */ + + ol = e_widget_list_add(evas, 0, 0); + of = e_widget_framelist_add(evas, D_("Stacking"), 0); + rg = e_widget_radio_group_new(&cfdata->stacking); + ob = e_widget_radio_add(evas, D_("Above All"), 0, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, D_("Below Fullscreen"), 1, rg); + e_widget_framelist_object_append(of, ob); + e_widget_list_object_append(ol, of, 1, 0, 0.0); + + of = e_widget_framelist_add(evas, D_("Other"), 0); + ob = e_widget_check_add(evas, D_("Ecomorph Features"), &(cfdata->ecomorph_features)); + e_widget_framelist_object_append(of, ob); + ob = e_widget_check_add(evas, D_("Show Icon Label"), &(cfdata->show_label)); + e_widget_framelist_object_append(of, ob); + e_widget_list_object_append(ol, of, 1, 0, 0.0); + + e_widget_toolbook_page_append(otb, NULL, D_("Other"), ol, 1, 0, 1, 0, 0.5, 0.0); + + e_widget_toolbook_page_show(otb, 0); + + + return otb; +} + +static int +_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) +{ + Config_Item *ci; + Ng *ng; + + ci = cfd->data; + ng = ci->ng; + + ci->size = cfdata->size; + ci->zoomfactor = cfdata->zoomfactor; + ci->hide_timeout = cfdata->hide_timeout; + ci->zoom_duration = cfdata->zoom_duration; + ci->zoom_range = cfdata->zoom_range; + ci->alpha = cfdata->alpha; + ci->mouse_over_anim = cfdata->mouse_over_anim; + ci->autohide = cfdata->hide_mode; + ci->lock_deskswitch = cfdata->lock_deskswitch; + ci->ecomorph_features = cfdata->ecomorph_features; + ci->show_background = cfdata->show_background; + ci->show_label = cfdata->show_label; + ci->stacking = cfdata->stacking; + ci->autohide_show_urgent = cfdata->autohide_show_urgent; + + if (ci->show_label) + evas_object_show(ng->o_label); + else + evas_object_hide(ng->o_label); + + if (ci->show_background) + evas_object_show(ng->bg_clip); + else + evas_object_hide(ng->bg_clip); + + if (ci->orient != cfdata->orient) + { + ci->orient = cfdata->orient; + ngi_free(ng); + ngi_new(ci); + } + else + { + ngi_bar_lock(ng, 0); + ng->hide_step = 0; + ng->hide_state = show; + ngi_reposition(ng); + ngi_input_extents_calc(ng); + ngi_thaw(ng); + } + + e_config_domain_save("module.ng", ngi_conf_edd, ngi_config); + + return 1; +} + +static void +_update_boxes(Ng *ng) +{ + Eina_List *l; + Ngi_Box *box; + Config_Box *cfg_box; + + while(ng->boxes) + { + box = ng->boxes->data; + if (box->cfg->type == taskbar) + ngi_taskbar_remove(box); + else if (box->cfg->type == launcher) + ngi_launcher_remove(box); + else if (box->cfg->type == gadcon) + ngi_gadcon_remove(box); + } + + ngi_freeze(ng); + + EINA_LIST_FOREACH (ng->cfg->boxes, l, cfg_box) + { + switch (cfg_box->type) + { + case launcher: + ngi_launcher_new(ng, cfg_box); + break; + + case taskbar: + ngi_taskbar_new(ng, cfg_box); + break; + + case gadcon: + ngi_gadcon_new(ng, cfg_box); + break; + } /* switch */ + } + + ngi_thaw(ng); +} + +/***************************************************************************************/ + +static void +_cb_box_add_taskbar(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + Config_Box *cfg_box; + + cfg_box = E_NEW(Config_Box, 1); + cfg_box->type = taskbar; + cfg_box->taskbar_adv_bordermenu = 0; + cfg_box->taskbar_skip_dialogs = 0; + cfg_box->taskbar_skip_dialogs = 1; + cfg_box->taskbar_show_iconified = 1; + cfg_box->taskbar_show_desktop = 0; + + cfdata->cfg->boxes = eina_list_append(cfdata->cfg->boxes, cfg_box); + + _update_boxes(cfdata->cfg->ng); + + _load_box_tlist(cfdata); +} + +static void +_cb_box_add_launcher(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + Config_Box *cfg_box; + + cfg_box = E_NEW(Config_Box, 1); + cfg_box->type = launcher; + cfg_box->launcher_app_dir = eina_stringshare_add("default"); + cfdata->cfg->boxes = eina_list_append(cfdata->cfg->boxes, cfg_box); + + _update_boxes(cfdata->cfg->ng); + + _load_box_tlist(cfdata); +} + +static void +_cb_box_add_gadcon(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + Config_Box *cfg_box; + + cfg_box = E_NEW(Config_Box, 1); + cfg_box->type = gadcon; + //cfg_box->gadcon_items = eina_stringshare_add("ng_gadcon-tmp"); + cfdata->cfg->boxes = eina_list_append(cfdata->cfg->boxes, cfg_box); + + _update_boxes(cfdata->cfg->ng); + + _load_box_tlist(cfdata); +} + +static void +_cb_box_del(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + int selected = e_widget_ilist_selected_get(cfdata->ilist); + + if (selected < 0) + return; + + Eina_List *boxes = cfdata->cfg->boxes; + + Config_Box *cfg_box = eina_list_nth(boxes, selected); + + if (!cfg_box) + return; + + cfdata->cfg->boxes = eina_list_remove(boxes, cfg_box); + + switch(cfg_box->type) + { + case launcher: + ngi_launcher_remove(cfg_box->box); + break; + + case taskbar: + ngi_taskbar_remove(cfg_box->box); + break; + + case gadcon: + ngi_gadcon_remove(cfg_box->box); + } /* switch */ + + ngi_thaw(cfdata->cfg->ng); + + _load_box_tlist(cfdata); +} + +static Evas_Object * +_basic_create_box_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) +{ + Evas_Object *o, *ol, *of, *ob, *ot; + E_Radio_Group *rg; + + o = e_widget_list_add(evas, 0, 0); + if (cfdata->cfg_box->type == launcher) + { + cfdata->app_dir = eina_stringshare_add(cfdata->cfg_box->launcher_app_dir); + + of = e_widget_frametable_add(evas, D_("Launcher Settings"), 0); + ol = e_widget_ilist_add(evas, 0, 0, &cfdata->app_dir); + cfdata->tlist_box = ol; + _load_ilist(cfdata); + e_widget_size_min_set(ol, 140, 140); + e_widget_frametable_object_append(of, ol, 0, 0, 1, 2, 1, 1, 1, 1); + + ot = e_widget_table_add(evas, 0); + ob = e_widget_button_add(evas, D_("Add"), "widget/add", _cb_add, cfdata, NULL); + e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 1, 1, 1, 0); + ob = e_widget_button_add(evas, D_("Delete"), "widget/del", _cb_del, cfdata, NULL); + e_widget_table_object_append(ot, ob, 0, 1, 1, 1, 1, 1, 1, 0); + ob = e_widget_button_add(evas, D_("Configure"), "widget/config", _cb_config, cfdata, NULL); + e_widget_table_object_append(ot, ob, 0, 2, 1, 1, 1, 1, 1, 0); + + e_widget_frametable_object_append(of, ot, 2, 0, 1, 1, 1, 1, 1, 0); + e_widget_list_object_append(o, of, 0, 1, 0.5); + } + else if (cfdata->cfg_box->type == taskbar) + { + of = e_widget_framelist_add(evas, D_("Taskbar Settings"), 0); + + ob = e_widget_check_add(evas, D_("Dont Show Dialogs"), + &(cfdata->cfg_box->taskbar_skip_dialogs)); + e_widget_framelist_object_append(of, ob); + ob = e_widget_check_add(evas, D_("Advanced Window Menu"), + &(cfdata->cfg_box->taskbar_adv_bordermenu)); + e_widget_framelist_object_append(of, ob); + ob = e_widget_check_add(evas, D_("Only Show Current Desk"), + &(cfdata->cfg_box->taskbar_show_desktop)); + e_widget_framelist_object_append(of, ob); + ob = e_widget_check_add(evas, D_("Group Applications by Window Class"), + &(cfdata->cfg_box->taskbar_group_apps)); + e_widget_framelist_object_append(of, ob); + ob = e_widget_check_add(evas, D_("Append new Applications on the right Side"), + &(cfdata->cfg_box->taskbar_append_right)); + e_widget_framelist_object_append(of, ob); + + e_widget_list_object_append(o, of, 1, 1, 0.5); + + of = e_widget_framelist_add(evas, D_("Iconified Applications"), 0); + rg = e_widget_radio_group_new(&cfdata->cfg_box->taskbar_show_iconified); + ob = e_widget_radio_add(evas, "Not Shown", 0, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, "Show", 1, rg); + e_widget_framelist_object_append(of, ob); + ob = e_widget_radio_add(evas, "Only Iconified", 2, rg); + e_widget_framelist_object_append(of, ob); + + e_widget_list_object_append(o, of, 1, 1, 0.5); + } + + return o; +} + +static int +_basic_apply_box_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) +{ + eina_stringshare_replace(&cfdata->cfg_box->launcher_app_dir, cfdata->app_dir); + + _update_boxes(cfdata->cfg->ng); + return 1; +} + +/* urgh */ +static void * +_create_box_data(E_Config_Dialog *cfd) +{ + return cfd->data; +} + +static void +_free_box_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) +{ + eina_stringshare_del(cfdata->app_dir); +} + +static void +_cb_box_config(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + + E_Config_Dialog *cfd; + E_Config_Dialog_View *v; + char buf[4096]; + + int selected = e_widget_ilist_selected_get(cfdata->ilist); + + if (selected < 0) + return; + + Eina_List *boxes = cfdata->cfg->boxes; + + cfdata->cfg_box = eina_list_nth(boxes, selected); + + if (!cfdata->cfg_box) + return; + + if (cfdata->cfg_box->type == gadcon) + { + ngi_gadcon_config(cfdata->cfg_box->box); + } + else + { + v = E_NEW(E_Config_Dialog_View, 1); + + v->create_cfdata = _create_box_data; + v->free_cfdata = _free_box_data; + v->basic.apply_cfdata = _basic_apply_box_data; + v->basic.create_widgets = _basic_create_box_widgets; + v->advanced.apply_cfdata = NULL; + v->advanced.create_widgets = NULL; + + snprintf(buf, sizeof(buf), "%s/e-module-ng.edj", e_module_dir_get(ngi_config->module)); + cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()), + D_("Itask NG Bar Configuration"), + "e", "_e_mod_ngi_config_dialog_add_box", buf, 0, v, cfdata); + } +} + +static void * +_create_data2(E_Config_Dialog *cfd) +{ + E_Config_Dialog_Data *cfdata; + Config_Item *ci; + + Ngi_Box *box = cfd->data; + + ci = (Config_Item *)box->ng->cfg; + + cfdata = E_NEW(E_Config_Dialog_Data, 1); + _fill_data(ci, cfdata); + cfdata->cfg_box = box->cfg; + + return cfdata; +} + +void +ngi_configure_box(Ngi_Box *box) +{ + E_Config_Dialog *cfd; + E_Config_Dialog_View *v; + char buf[4096]; + + v = E_NEW(E_Config_Dialog_View, 1); + + v->create_cfdata = _create_data2; + v->free_cfdata = _free_data; + v->basic.apply_cfdata = _basic_apply_box_data; + v->basic.create_widgets = _basic_create_box_widgets; + v->advanced.apply_cfdata = NULL; + v->advanced.create_widgets = NULL; + + snprintf(buf, sizeof(buf), "%s/e-module-ng.edj", e_module_dir_get(ngi_config->module)); + cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()), + D_("Itask NG Bar Configuration"), + "e", "_e_mod_ngi_config_dialog_add_box", buf, 0, v, box); +} + +static void +_cb_box_up(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + int selected = e_widget_ilist_selected_get(cfdata->ilist); + + if (selected < 0) + return; + + Eina_List *boxes = cfdata->cfg->boxes; + + Eina_List *l = eina_list_nth_list(boxes, selected); + + if (!l || !l->prev) + return; + + Config_Box *cfg_box = l->data; + + boxes = eina_list_remove(boxes, cfg_box); + cfdata->cfg->boxes = eina_list_prepend_relative(boxes, cfg_box, l->prev->data); + + _update_boxes(cfdata->cfg->ng); + + _load_box_tlist(cfdata); + + e_widget_ilist_selected_set(cfdata->ilist, selected - 1); +} + +static void +_cb_box_down(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + int selected = e_widget_ilist_selected_get(cfdata->ilist); + + if (selected < 0) + return; + + Eina_List *boxes = cfdata->cfg->boxes; + + Eina_List *l = eina_list_nth_list(boxes, selected); + + if (!l || !l->next) + return; + + Config_Box *cfg_box = l->data; + + boxes = eina_list_remove(boxes, cfg_box); + cfdata->cfg->boxes = eina_list_append_relative(boxes, cfg_box, l->next->data); + + _update_boxes(cfdata->cfg->ng); + + _load_box_tlist(cfdata); + + e_widget_ilist_selected_set(cfdata->ilist, selected + 1); +} + +static void +_load_box_tlist(E_Config_Dialog_Data *cfdata) +{ + char buf[4096]; + + e_widget_ilist_clear(cfdata->ilist); + + int cnt = 1; + Eina_List *l; + Config_Box *cfg_box; + char *blub; + + for(l = cfdata->cfg->boxes; l; l = l->next) + { + cfg_box = l->data; + switch (cfg_box->type) + { + case launcher: + snprintf(buf, sizeof(buf), "%i Launcher", cnt); + blub = strdup(buf); + + e_widget_ilist_append(cfdata->ilist, NULL, blub, NULL, cfg_box, blub); + break; + + case taskbar: + snprintf(buf, sizeof(buf), "%i Taskbar", cnt); + blub = strdup(buf); + e_widget_ilist_append(cfdata->ilist, NULL, blub, NULL, cfg_box, blub); + break; + + case gadcon: + snprintf(buf, sizeof(buf), "%i Gadcon", cnt); + blub = strdup(buf); + e_widget_ilist_append(cfdata->ilist, NULL, blub, NULL, cfg_box, blub); + break; + } /* switch */ + cnt++; + } + e_widget_ilist_go(cfdata->ilist); +} + +static void +_cb_add(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + e_entry_dialog_show(D_("Create new Itask NG source"), "enlightenment/e", + D_("Enter a name for this new Application Launcher:"), "", NULL, NULL, + _cb_entry_ok, NULL, cfdata); +} + +static void +_cb_del(void *data, void *data2) +{ + char buf[4096]; + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + snprintf(buf, sizeof(buf), D_("You requested to delete \"%s\".

" + "Are you sure you want to delete this ng source?"), + cfdata->app_dir); + + e_confirm_dialog_show(D_("Are you sure you want to delete this Itask NG source?"), + "enlightenment/exit", buf, NULL, NULL, + _cb_confirm_dialog_yes, NULL, cfdata, NULL, NULL, NULL); +} + +static void +_cb_config(void *data, void *data2) +{ + char path[4096]; + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + snprintf(path, sizeof(path), "%s/.e/e/applications/bar/%s/.order", + e_user_homedir_get(), cfdata->app_dir); + + e_configure_registry_call("internal/ibar_other", + e_container_current_get(e_manager_current_get()), + path); +} + +static void +_cb_entry_ok(char *text, void *data) +{ + char buf[4096]; + char tmp[4096]; + FILE *f; + + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s", + e_user_homedir_get(), text); + + if (!ecore_file_exists(buf)) + { + ecore_file_mkdir(buf); + + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s/.order", + e_user_homedir_get(), text); + + f = fopen(buf, "w"); + if (f) + { + // Populate this .order file with some defaults + snprintf(tmp, sizeof(tmp), "xterm.desktop\n" + "firefox.desktop\n" + "gimp.desktop\n" "xmms.desktop\n"); + fwrite(tmp, sizeof(char), strlen(tmp), f); + fclose(f); + } + } + + _load_ilist((E_Config_Dialog_Data *)data); +} + +static void +_cb_confirm_dialog_yes(void *data) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + char buf[4096]; + + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s", e_user_homedir_get(), cfdata->app_dir); + + if (ecore_file_is_dir(buf)) + ecore_file_recursive_rm(buf); + + _load_ilist(cfdata); +} + +static void +_load_ilist(E_Config_Dialog_Data *cfdata) +{ + Eina_List *dirs, *l; + char buf[4096], *file; + int selnum = -1; + const char *home; + int i = 0; + e_widget_ilist_clear(cfdata->tlist_box); + + home = e_user_homedir_get(); + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar", home); + dirs = ecore_file_ls(buf); + + EINA_LIST_FOREACH(dirs, l, file) + { + if (file[0] == '.') + continue; + + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s", home, file); + if (ecore_file_is_dir(buf)) + { + e_widget_ilist_append(cfdata->tlist_box, NULL, file, NULL, NULL, file); + if ((cfdata->app_dir) && (!strcmp(cfdata->app_dir, file))) + selnum = i; + + i++; + } + } + + e_widget_ilist_go(cfdata->tlist_box); + if (selnum >= 0) + e_widget_ilist_selected_set(cfdata->tlist_box, selnum); +} + +static void +_cb_slider_change(void *data, Evas_Object *obj) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + Ng *ng = cfdata->cfg->ng; + int a; + + ng->cfg->size = (int)cfdata->size; + ng->size = ng->cfg->size; + + ng->cfg->zoomfactor = cfdata->zoomfactor; + ng->cfg->zoom_duration = cfdata->zoom_duration; + ng->cfg->zoom_range = cfdata->zoom_range; + ng->cfg->hide_timeout = cfdata->hide_timeout; + ng->cfg->alpha = cfdata->alpha; + ng->cfg->rflxn_alpha = cfdata->rflxn_alpha; + + a = ng->cfg->alpha; + evas_object_color_set(ng->bg_clip, a, a, a, a); + + a = ng->cfg->rflxn_alpha; + if (a > 0) + evas_object_show(ng->o_proxy); + else + evas_object_hide(ng->o_proxy); + + evas_object_color_set(ng->o_proxy, a, a, a, a); + + ngi_win_position_calc(ng->win); + ngi_thaw(ng); +} + diff --git a/src/ng_config_instances.c b/src/ng_config_instances.c new file mode 100644 index 0000000..ee32c2b --- /dev/null +++ b/src/ng_config_instances.c @@ -0,0 +1,388 @@ +#include "e_mod_main.h" + +static void * _create_data(E_Config_Dialog *cfd); +static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); +static Evas_Object * _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); +static void _ilist_fill(E_Config_Dialog_Data *cfdata); +static void _ilist_cb_selected(void *data); +static void _cb_add(void *data, void *data2); +static void _cb_delete(void *data, void *data2); +static void _cb_dialog_yes(void *data); +static void _cb_dialog_destroy(void *data); +static void _cb_config(void *data, void *data2); + +struct _E_Config_Dialog_Data +{ + Evas_Object *o_list; + Evas_Object *o_delete; + Evas_Object *o_config; + + const char *cur_ng; +}; + +typedef struct _Ngi_Del_Confirm_Data Ngi_Del_Confirm_Data; +struct _Ngi_Del_Confirm_Data +{ + E_Config_Dialog_Data *cfdata; + Config_Item *cfg; +}; + +EAPI E_Config_Dialog * +ngi_instances_config(E_Container *con, const char *params) +{ + E_Config_Dialog *cfd; + E_Config_Dialog_View *v; + + if (params) + { + int i = atoi(params); + Config_Item *ci = eina_list_nth(ngi_config->items, i); + if (ci) + { + ngi_configure_module(ci); + return ci->config_dialog; + } + + return NULL; + } + + if(ngi_config->cfd) + return NULL; + + if (e_config_dialog_find("E", "extensions/itask_ng")) + return NULL; + + v = E_NEW(E_Config_Dialog_View, 1); + if (!v) + return NULL; + + v->create_cfdata = _create_data; + v->free_cfdata = _free_data; + v->basic.create_widgets = _basic_create_widgets; + + cfd = e_config_dialog_new(con, + D_("Itask NG Instances"), + "E", "extensions/itask_ng", + "enlightenment/module/ng-instances", 0, v, NULL); + ngi_config->cfd = cfd; + return cfd; +} + +static void * +_create_data(E_Config_Dialog *cfd) +{ + E_Config_Dialog_Data *cfdata; + + cfdata = E_NEW(E_Config_Dialog_Data, 1); + return cfdata; +} + +static void +_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) +{ + ngi_config->cfd = NULL; + E_FREE(cfdata); +} + +static Evas_Object * +_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) +{ + Evas_Object *o, *of, *ot, *ob; + + o = e_widget_list_add(evas, 0, 1); + + of = e_widget_framelist_add(evas, D_("Itask NG - Instances"), 0); + cfdata->o_list = e_widget_ilist_add(evas, 24, 24, &(cfdata->cur_ng)); + e_widget_ilist_selector_set(cfdata->o_list, 1); + e_widget_size_min_set(cfdata->o_list, 200, 250); + e_widget_framelist_object_append(of, cfdata->o_list); + e_widget_list_object_append(o, of, 1, 1, 0.5); + + ot = e_widget_table_add(evas, 0); + ob = e_widget_button_add(evas, D_("Add"), "widget/add", _cb_add, cfdata, NULL); + e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 1, 1, 0, 0); + cfdata->o_delete = e_widget_button_add(evas, D_("Delete"), "widget/del", _cb_delete, cfdata, NULL); + e_widget_table_object_append(ot, cfdata->o_delete, 0, 1, 1, 1, 1, 1, 0, 0); + cfdata->o_config = e_widget_button_add(evas, D_("Configure"), "widget/config", _cb_config, cfdata, NULL); + e_widget_table_object_append(ot, cfdata->o_config, 0, 2, 1, 1, 1, 1, 0, 0); + + e_widget_disabled_set(cfdata->o_delete, 1); + e_widget_disabled_set(cfdata->o_config, 1); + + e_widget_list_object_append(o, ot, 1, 0, 0.0); + + _ilist_fill(cfdata); + + e_dialog_resizable_set(cfd->dia, 1); + return o; +} + +/* private functions */ +static void +_ilist_fill(E_Config_Dialog_Data *cfdata) +{ + Evas *evas; + Eina_List *l; + int n = -1; + char buf[256]; + Ng *ng; + Config_Item *ci; + Evas_Object *ob; + const char *label; + + if (!cfdata) + return; + + if (!cfdata->o_list) + return; + + evas = evas_object_evas_get(cfdata->o_list); + + if (e_widget_ilist_count(cfdata->o_list) > 0) + n = e_widget_ilist_selected_get(cfdata->o_list); + + evas_event_freeze(evas); + edje_freeze(); + e_widget_ilist_freeze(cfdata->o_list); + + e_widget_ilist_clear(cfdata->o_list); + e_widget_ilist_go(cfdata->o_list); + + EINA_LIST_FOREACH (ngi_config->items, l, ci) + { + if (!ci) + continue; + + ng = ci->ng; + + /* FIXME*/ + /*if(ci->launcher) + label = D_("Launcher NG"); + else if(ci->taskbar) + label = D_("Taskbar NG"); + */ + label = D_("Bar"); + + snprintf(buf, sizeof(buf), "%s / Zone %d", label, ci->zone); + + ob = edje_object_add(evas); + switch (ci->orient) + { + case E_GADCON_ORIENT_LEFT: + e_util_edje_icon_set(ob, "enlightenment/shelf_position_left"); + break; + + case E_GADCON_ORIENT_RIGHT: + e_util_edje_icon_set(ob, "enlightenment/shelf_position_right"); + break; + + case E_GADCON_ORIENT_TOP: + e_util_edje_icon_set(ob, "enlightenment/shelf_position_top"); + break; + + case E_GADCON_ORIENT_BOTTOM: + e_util_edje_icon_set(ob, "enlightenment/shelf_position_bottom"); + break; + + default: + e_util_edje_icon_set(ob, "enlightenment/e"); + break; + } /* switch */ + e_widget_ilist_append(cfdata->o_list, ob, buf, _ilist_cb_selected, cfdata, buf); + } + + e_widget_size_min_set(cfdata->o_list, 155, 250); + e_widget_ilist_go(cfdata->o_list); + + e_widget_ilist_thaw(cfdata->o_list); + edje_thaw(); + evas_event_thaw(evas); + + if (n > -1) + { + e_widget_disabled_set(cfdata->o_delete, 0); + e_widget_disabled_set(cfdata->o_config, 0); + e_widget_ilist_selected_set(cfdata->o_list, n); + } + else + { + e_widget_disabled_set(cfdata->o_delete, 1); + e_widget_disabled_set(cfdata->o_config, 1); + } +} + +static void +_ilist_cb_selected(void *data) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + if (!cfdata) + return; + + e_widget_disabled_set(cfdata->o_delete, 0); + e_widget_disabled_set(cfdata->o_config, 0); +} + +static void +_cb_add(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + Config_Item *cfg; + Config_Box *cfg_box; + + E_Container *con; + E_Zone *zone; + + if (!cfdata) + return; + + con = e_container_current_get(e_manager_current_get()); + zone = e_zone_current_get(con); + + cfg = E_NEW(Config_Item, 1); + + cfg->show_label = 1; + cfg->show_background = 1; + cfg->container = con->num; + cfg->zone = zone->num; + cfg->orient = E_GADCON_ORIENT_BOTTOM; + cfg->size = 36; + cfg->autohide = AUTOHIDE_FULLSCREEN; + cfg->autohide_show_urgent = 0; + cfg->hide_below_windows = 0; + cfg->zoom_duration = 0.3; + cfg->zoom_range = 1.5; + cfg->hide_timeout = 0.1; + cfg->zoomfactor = 2.0; + cfg->alpha = 255; + cfg->stacking = above_all; + cfg->mouse_over_anim = 1; + cfg->lock_deskswitch = 1; + cfg->ecomorph_features = 0; + cfg->boxes = NULL; + + cfg_box = E_NEW(Config_Box, 1); + cfg_box->type = launcher; + cfg_box->launcher_app_dir = eina_stringshare_add("default"); + cfg_box->launcher_lock_dnd = 0; + cfg->boxes = eina_list_append(cfg->boxes, cfg_box); + + cfg_box = E_NEW(Config_Box, 1); + cfg_box->type = taskbar; + cfg_box->taskbar_adv_bordermenu = 0; + cfg_box->taskbar_skip_dialogs = 0; + cfg_box->taskbar_show_iconified = 1; + cfg_box->taskbar_show_desktop = 0; + cfg_box->taskbar_append_right = 0; + cfg_box->taskbar_group_apps = 1; + + cfg->boxes = eina_list_append(cfg->boxes, cfg_box); + + ngi_config->items = eina_list_append(ngi_config->items, cfg); + + e_config_domain_save("module.ng", ngi_conf_edd, ngi_config); + + char buf[4096]; + char tmp[4096]; + FILE *f; + char *app_dir = "default"; + + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s", + e_user_homedir_get(), app_dir); + + if (!ecore_file_exists(buf)) + { + ecore_file_mkdir(buf); + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s/.order", + e_user_homedir_get(), app_dir); + f = fopen(buf, "w"); + if (f) + { + /* Populate this .order file with some defaults */ + snprintf(tmp, sizeof(tmp), "xterm.desktop\n" "sylpheed.desktop\n" + "firefox.desktop\n" "openoffice.desktop\n" "xchat.desktop\n" + "gimp.desktop\n" "xmms.desktop\n"); + fwrite(tmp, sizeof(char), strlen(tmp), f); + fclose(f); + } + } + + ngi_new(cfg); + + _ilist_fill(cfdata); +} + +static void +_cb_delete(void *data, void *data2) +{ + Ngi_Del_Confirm_Data *d; + char buf[4096]; + Config_Item *ci; + + d = E_NEW(Ngi_Del_Confirm_Data, 1); + if (!d) + return; + + d->cfdata = (E_Config_Dialog_Data *)data; + if (!d->cfdata) + return; + + if (!d->cfdata->cur_ng) + return; + + ci = (Config_Item *)eina_list_nth(ngi_config->items, e_widget_ilist_selected_get(d->cfdata->o_list)); + if (!ci) + return; + + d->cfg = ci; + + snprintf(buf, sizeof(buf), D_("You requested to delete \"%s\".

" + "Are you sure you want to delete this Instance?"), + d->cfdata->cur_ng); + + e_confirm_dialog_show(D_("Are you sure you want to delete this Instance?"), + "enlightenment/exit", buf, NULL, NULL, _cb_dialog_yes, NULL, d, NULL, + _cb_dialog_destroy, d); +} + +static void +_cb_dialog_yes(void *data) +{ + Ngi_Del_Confirm_Data *d = (Ngi_Del_Confirm_Data *)data; + if (!data) + return; + + if(d->cfg->ng) + ngi_free(d->cfg->ng); + + ngi_config->items = eina_list_remove(ngi_config->items, d->cfg); + + e_config_domain_save("module.ng", ngi_conf_edd, ngi_config); +} + +static void +_cb_dialog_destroy(void *data) +{ + Ngi_Del_Confirm_Data *d = (Ngi_Del_Confirm_Data *)data; + _ilist_fill(d->cfdata); + E_FREE(d); +} + +static void +_cb_config(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = (E_Config_Dialog_Data *)data; + Config_Item *ci; + int item = 0; + + if (!cfdata) + return; + + item = e_widget_ilist_selected_get(cfdata->o_list); + + ci = (Config_Item *)eina_list_nth(ngi_config->items, item); + if (!ci) + return; + + ngi_configure_module(ci); +} + diff --git a/src/ng_gadcon.c b/src/ng_gadcon.c new file mode 100644 index 0000000..f43f0eb --- /dev/null +++ b/src/ng_gadcon.c @@ -0,0 +1,687 @@ +#include "e_mod_main.h" +#include + +static void _ngi_gadcon_cb_gadcon_min_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h); +static void _ngi_gadcon_cb_gadcon_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h); +static Evas_Object * _ngi_gadcon_cb_gadcon_frame_request(void *data, E_Gadcon_Client *gcc, const char *style); +static void * _create_data(E_Config_Dialog *cfd); +static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); +static Evas_Object * _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata); +static Eina_Bool _cb_mod_update(void *data, int type, void *event); +static void _avail_list_cb_change(void *data, Evas_Object *obj); +static void _sel_list_cb_change(void *data, Evas_Object *obj); +static void _load_avail_gadgets(void *data); +static void _load_sel_gadgets(void *data); +static void _cb_add(void *data, void *data2); +static void _cb_del(void *data, void *data2); +static void _set_description(void *data, const char *name); + +static Eina_Hash *ngi_gadcon_hash = NULL; + +void +ngi_gadcon_init(void) +{ + Eina_List *l, *ll, *lll; + Config_Item *ci; + Config_Box *cb; + Config_Gadcon *cg; + + ngi_gadcon_hash = eina_hash_string_superfast_new(NULL); + + EINA_LIST_FOREACH (ngi_config->items, l, ci) + { + EINA_LIST_FOREACH (ci->boxes, ll, cb) + { + if (cb->type != gadcon) + continue; + + EINA_LIST_FOREACH(cb->gadcon_items, lll, cg) + eina_hash_add(ngi_gadcon_hash, cg->name, cg); + } + } +} + +void +ngi_gadcon_shutdown(void) +{ + if (ngi_gadcon_hash) + eina_hash_free(ngi_gadcon_hash); +} + +static char * +_ngi_gadcon_name_new() +{ + char name[256]; + int cnt = 0; + + while(cnt < 1000) + { + snprintf(name, 256, "ng_gadcon-%d", cnt++); + + if (!eina_hash_find(ngi_gadcon_hash, name)) + return strdup(name); + } + return NULL; +} + +static void +_ngi_gadcon_item_cb_mouse_down(Ngi_Item *it, Ecore_Event_Mouse_Button *ev) +{ +} + +static void +_ngi_gadcon_item_cb_mouse_up(Ngi_Item *it, Ecore_Event_Mouse_Button *ev) +{ +} + +static void +_ngi_gadcon_item_cb_mouse_in(Ngi_Item *it) +{ +} + +static void +_ngi_gadcon_item_cb_mouse_out(Ngi_Item *it) +{ +} + +static void +_ngi_gadcon_item_cb_free(Ngi_Item *item) +{ + Ngi_Item_Gadcon *it = (Ngi_Item_Gadcon *) item; + + if (it->gadcon) + e_object_del(E_OBJECT(it->gadcon)); + + if (it->o_icon) + evas_object_del(it->o_icon); + + if (it->o_proxy) + evas_object_del(it->o_proxy); + + E_FREE(it); +} + +static void +_ngi_gadcon_locked_set(void *data, int lock) +{ + Ng *ng = data; + + ngi_bar_lock(ng, lock); + ngi_animate(ng); +} + +static Ngi_Item_Gadcon * +_ngi_gadcon_item_new(Ngi_Box *box, Config_Gadcon *cg, Ngi_Item *after) +{ + Ngi_Item_Gadcon *it; + Evas_Object *o; + Ng *ng = box->ng; + + it = E_NEW(Ngi_Item_Gadcon, 1); + it->base.box = box; + it->cfg_gadcon = cg; + + ngi_item_init_defaults((Ngi_Item*)it); + + it->base.cb_mouse_in = _ngi_gadcon_item_cb_mouse_in; + it->base.cb_mouse_out = _ngi_gadcon_item_cb_mouse_out; + it->base.cb_mouse_down = _ngi_gadcon_item_cb_mouse_down; + it->base.cb_mouse_up = _ngi_gadcon_item_cb_mouse_up; + it->base.cb_drag_start = NULL; //_ngi_gadcon_item_cb_drag_start; + it->base.cb_free = _ngi_gadcon_item_cb_free; + + it->gadcon = e_gadcon_swallowed_new(cg->name, 0, it->base.obj, "e.swallow.content"); + it->gadcon->instant_edit = 0; + /* edje_extern_object_min_size_set(it->gadcon->o_container, ng->size, ng->size); */ + + e_gadcon_min_size_request_callback_set(it->gadcon, _ngi_gadcon_cb_gadcon_min_size_request, it); + e_gadcon_size_request_callback_set(it->gadcon, _ngi_gadcon_cb_gadcon_size_request, it); + e_gadcon_frame_request_callback_set(it->gadcon, _ngi_gadcon_cb_gadcon_frame_request, it); + e_gadcon_orient(it->gadcon, ng->cfg->orient); + e_gadcon_zone_set(it->gadcon, box->ng->zone); + e_gadcon_ecore_evas_set(it->gadcon, box->ng->win->popup->ecore_evas); + e_gadcon_util_lock_func_set(it->gadcon, _ngi_gadcon_locked_set, ng); + + if (after) + box->items = eina_list_prepend_relative(box->items, it, after); + else + box->items = eina_list_append(box->items, it); + + e_gadcon_populate(it->gadcon); + + /* if(it->gadcon->clients) + * { + * char buf[256]; + * E_Gadcon_Client *gcc = it->gadcon->clients->data; + * snprintf(buf, 256, "%s-%d", gcc->name, gcc->id); + * it->label = e_datastore_get(buf); + * } */ + + evas_object_show(it->gadcon->o_container); + + it->o_proxy = e_icon_add(ng->evas); + o = evas_object_image_add(ng->evas); + evas_object_image_source_set(o, it->base.obj); + evas_object_resize(o, 128, 128); + evas_object_image_fill_set(o, 0,0,128,128); + e_icon_object_set(it->o_proxy, o); + + edje_object_part_swallow(it->base.over, "e.swallow.content", it->o_proxy); + evas_object_pass_events_set(it->o_proxy, 1); + evas_object_show(it->o_proxy); + + ngi_item_show((Ngi_Item*)it, 0); + + return it; +} + +void +ngi_gadcon_new(Ng *ng, Config_Box *cfg) +{ + Eina_List *l; + Config_Gadcon *cg; + Ngi_Box *box = ngi_box_new(ng); + + if(!box) return; + + box->cfg = cfg; + cfg->box = box; + + if(!cfg->gadcon_items) + return; + + EINA_LIST_FOREACH (cfg->gadcon_items, l, cg) + _ngi_gadcon_item_new(box, cg, NULL); +} + +void +ngi_gadcon_remove(Ngi_Box *box) +{ + ngi_box_free(box); +} + +static void +_ngi_gadcon_cb_gadcon_min_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h) +{ + Ngi_Item *it; + + it = data; + + return; +} + +static void +_ngi_gadcon_cb_gadcon_size_request(void *data, E_Gadcon *gc, Evas_Coord w, Evas_Coord h) +{ + Ngi_Item *it; + + it = data; + + return; +} + +static Evas_Object * +_ngi_gadcon_cb_gadcon_frame_request(void *data, E_Gadcon_Client *gcc, const char *style) +{ + /* FIXME: provide an inset look edje thing */ + return NULL; +} + +struct _E_Config_Dialog_Data +{ + Evas_Object *o_avail, *o_sel; + Evas_Object *o_add, *o_del; + Evas_Object *o_desc; + + E_Gadcon *gc; + + Ngi_Box *box; + + Ecore_Event_Handler *hdl; +}; + +void +ngi_gadcon_config(Ngi_Box *box) +{ + E_Config_Dialog *cfd; + E_Config_Dialog_View *v; + E_Container *con; + + v = E_NEW(E_Config_Dialog_View, 1); + if (!v) + return; + + con = e_container_current_get(e_manager_current_get()); + + v->create_cfdata = _create_data; + v->free_cfdata = _free_data; + v->basic.create_widgets = _basic_create; + + cfd = e_config_dialog_new(con, "Gadcon Config", "E", "_ngi_gadcon_config_dialog", + "enlightenment/shelf", 0, v, box); + box->cfd = cfd; + e_dialog_resizable_set(cfd->dia, 1); +} + +static void * +_create_data(E_Config_Dialog *cfd) +{ + E_Config_Dialog_Data *cfdata; + + cfdata = E_NEW(E_Config_Dialog_Data, 1); + cfdata->box = cfd->data; + return cfdata; +} + +static void +_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) +{ + Ngi_Box *box; + + if (cfdata->hdl) + ecore_event_handler_del(cfdata->hdl); + + E_FREE(cfdata); + + if (!(box = cfd->data)) + return; + + box->cfd = NULL; +} + +static Evas_Object * +_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) +{ + Evas_Object *o = NULL, *of = NULL; + Evas_Object *ow = NULL; + + o = e_widget_table_add(evas, 0); + of = e_widget_frametable_add(evas, D_("Available Gadgets"), 0); + ow = e_widget_ilist_add(evas, 24, 24, NULL); + e_widget_ilist_multi_select_set(ow, 1); + e_widget_on_change_hook_set(ow, _avail_list_cb_change, cfdata); + cfdata->o_avail = ow; + _load_avail_gadgets(cfdata); + e_widget_frametable_object_append(of, ow, 0, 0, 1, 1, 1, 1, 1, 1); + ow = e_widget_button_add(evas, D_("Add Gadget"), NULL, _cb_add, cfdata, NULL); + e_widget_disabled_set(ow, 1); + cfdata->o_add = ow; + e_widget_frametable_object_append(of, ow, 0, 1, 1, 1, 1, 1, 1, 0); + e_widget_table_object_append(o, of, 0, 0, 1, 1, 1, 1, 1, 1); + + of = e_widget_frametable_add(evas, D_("Selected Gadgets"), 0); + ow = e_widget_ilist_add(evas, 24, 24, NULL); + e_widget_ilist_multi_select_set(ow, 1); + e_widget_on_change_hook_set(ow, _sel_list_cb_change, cfdata); + cfdata->o_sel = ow; + _load_sel_gadgets(cfdata); + e_widget_frametable_object_append(of, ow, 0, 0, 1, 1, 1, 1, 1, 1); + ow = e_widget_button_add(evas, D_("Remove Gadget"), NULL, _cb_del, cfdata, NULL); + e_widget_disabled_set(ow, 1); + cfdata->o_del = ow; + e_widget_frametable_object_append(of, ow, 0, 1, 1, 1, 1, 1, 1, 0); + e_widget_table_object_append(o, of, 1, 0, 1, 1, 1, 1, 1, 1); + + ow = e_widget_textblock_add(evas); + e_widget_size_min_set(ow, 200, 70); + e_widget_textblock_markup_set(ow, D_("Description: Unavailable")); + cfdata->o_desc = ow; + e_widget_table_object_append(o, ow, 0, 1, 2, 1, 1, 1, 1, 0); + + if (cfdata->hdl) + ecore_event_handler_del(cfdata->hdl); + + cfdata->hdl = ecore_event_handler_add(E_EVENT_MODULE_UPDATE, + _cb_mod_update, cfdata); + return o; +} + +static Eina_Bool +_cb_mod_update(void *data, int type, void *event) +{ + E_Config_Dialog_Data *cfdata = NULL; + + if (type != E_EVENT_MODULE_UPDATE) + return EINA_TRUE; + + if (!(cfdata = data)) + return EINA_TRUE; + + _load_avail_gadgets(cfdata); + _load_sel_gadgets(cfdata); + return EINA_TRUE; +} + +static void +_avail_list_cb_change(void *data, Evas_Object *obj) +{ + E_Config_Dialog_Data *cfdata = NULL; + const char *name; + int sel, count; + + if (!(cfdata = data)) + return; + + e_widget_ilist_unselect(cfdata->o_sel); + e_widget_disabled_set(cfdata->o_del, 1); + e_widget_disabled_set(cfdata->o_add, 0); + count = e_widget_ilist_selected_count_get(cfdata->o_avail); + if ((count > 1) || (count == 0)) + e_widget_textblock_markup_set(cfdata->o_desc, D_("Description: Unavailable")); + else + { + sel = e_widget_ilist_selected_get(cfdata->o_avail); + name = (char *)e_widget_ilist_nth_data_get(cfdata->o_avail, sel); + _set_description(cfdata, name); + } +} + +static void +_sel_list_cb_change(void *data, Evas_Object *obj) +{ + E_Config_Dialog_Data *cfdata = NULL; + const char *name; + int sel, count; + + if (!(cfdata = data)) + return; + + e_widget_ilist_unselect(cfdata->o_avail); + e_widget_disabled_set(cfdata->o_add, 1); + e_widget_disabled_set(cfdata->o_del, 0); + count = e_widget_ilist_selected_count_get(cfdata->o_sel); + if ((count > 1) || (count == 0)) + e_widget_textblock_markup_set(cfdata->o_desc, D_("Description: Unavailable")); + else + { + sel = e_widget_ilist_selected_get(cfdata->o_sel); + name = (char *)e_widget_ilist_nth_data_get(cfdata->o_sel, sel); + _set_description(cfdata, name); + } +} + +static void +_load_avail_gadgets(void *data) +{ + E_Config_Dialog_Data *cfdata = NULL; + E_Gadcon_Client_Class *cc; + Eina_List *l = NULL; + Evas_Object *icon = NULL; + const char *lbl = NULL; + Evas *evas; + int w; + + if (!(cfdata = data)) + return; + + evas = evas_object_evas_get(cfdata->o_avail); + evas_event_freeze(evas); + edje_freeze(); + e_widget_ilist_freeze(cfdata->o_avail); + e_widget_ilist_clear(cfdata->o_avail); + EINA_LIST_FOREACH (e_gadcon_provider_list(), l, cc) + { + if (!cc) + continue; + + if (cc->func.label) + lbl = cc->func.label(cc); + + if (!lbl) + lbl = cc->name; + + if (cc->func.icon) + icon = cc->func.icon(cc, evas); + + e_widget_ilist_append(cfdata->o_avail, icon, lbl, NULL, + (void *)cc->name, NULL); + } + e_widget_ilist_go(cfdata->o_avail); + e_widget_size_min_get(cfdata->o_avail, &w, NULL); + if (w < 200) + w = 200; + + e_widget_size_min_set(cfdata->o_avail, w, 250); + e_widget_ilist_thaw(cfdata->o_avail); + edje_thaw(); + evas_event_thaw(evas); +} + +static void +_load_sel_gadgets(void *data) +{ + E_Config_Dialog_Data *cfdata = NULL; + Eina_List *ll = NULL, *l = NULL, *l2 = NULL; + Evas *evas; + int w; + Ngi_Item_Gadcon *it; + E_Config_Gadcon_Client *cgc; + E_Gadcon_Client_Class *gcc; + if (!(cfdata = data)) + return; + + evas = evas_object_evas_get(cfdata->o_sel); + evas_event_freeze(evas); + edje_freeze(); + e_widget_ilist_freeze(cfdata->o_sel); + e_widget_ilist_clear(cfdata->o_sel); + + EINA_LIST_FOREACH(cfdata->box->items, ll, it) + { + EINA_LIST_FOREACH(it->gadcon->cf->clients, l, cgc) + { + if (!cgc) continue; + + EINA_LIST_FOREACH(e_gadcon_provider_list(), l2, gcc) + { + Evas_Object *icon = NULL; + const char *lbl = NULL; + + if (!gcc) continue; + + if ((cgc->name) && (gcc->name) && + (!strcmp(cgc->name, gcc->name))) + { + if (gcc->func.label) + lbl = gcc->func.label(gcc); + + if (!lbl) + lbl = gcc->name; + + if (gcc->func.icon) + icon = gcc->func.icon(gcc, evas); + + e_widget_ilist_append(cfdata->o_sel, icon, lbl, NULL, + (void *)gcc->name, NULL); + } + } + } + } + + e_widget_ilist_go(cfdata->o_sel); + e_widget_size_min_get(cfdata->o_sel, &w, NULL); + if (w < 200) + w = 200; + + e_widget_size_min_set(cfdata->o_sel, w, 250); + e_widget_ilist_thaw(cfdata->o_sel); + edje_thaw(); + evas_event_thaw(evas); + if (l) + eina_list_free(l); + + if (l2) + eina_list_free(l2); +} + +static void +_cb_add(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = NULL; + Eina_List *l, *ll; + char *gadcon_name; + Ngi_Box *box; + E_Ilist_Item *item; + int i = 0, update = 0; + + if (!(cfdata = data)) + return; + + box = cfdata->box; + + EINA_LIST_FOREACH(e_widget_ilist_items_get(cfdata->o_avail), l, item) + { + Config_Gadcon *cg; + E_Config_Gadcon_Client *cgc; + Ngi_Item_Gadcon *it; + const char *name; + + if (!item->selected) continue; + + name = (char *) e_widget_ilist_item_data_get(item); + if (!name) continue; + + gadcon_name = _ngi_gadcon_name_new(); + if (!gadcon_name) continue; + + cg = E_NEW(Config_Gadcon, 1); + cg->name = eina_stringshare_add(gadcon_name); + eina_hash_add(ngi_gadcon_hash, cg->name, cg); + box->cfg->gadcon_items = eina_list_append(box->cfg->gadcon_items, cg); + + it = _ngi_gadcon_item_new(box, cg, NULL); + + if (it->gadcon->cf->clients) + e_gadcon_unpopulate(it->gadcon); + + EINA_LIST_FOREACH(it->gadcon->cf->clients, ll, cgc) + e_gadcon_client_config_del(it->gadcon->cf, cgc); + + if (!e_gadcon_client_config_new(it->gadcon, name)) + { + // FIXME free item + } + else + { + e_gadcon_populate(it->gadcon); + update = 1; + } + } + + if (update) + { + e_config_save_queue(); + + _load_sel_gadgets(cfdata); + e_widget_ilist_selected_set(cfdata->o_sel, i); + + ngi_thaw(box->ng); + } +} + +static void +_cb_del(void *data, void *data2) +{ + E_Config_Dialog_Data *cfdata = NULL; + Eina_List *l = NULL, *g = NULL; + int i = 0, update = 0; + Ngi_Item_Gadcon *it; + + if (!(cfdata = data)) + return; + + for (i = 0, l = e_widget_ilist_items_get(cfdata->o_sel); l; l = l->next, i++) + { + E_Ilist_Item *item = NULL; + E_Config_Gadcon_Client *cgc; + const char *name = NULL; + if (!(item = l->data)) + continue; + + if (!item->selected) + continue; + + name = (char *)e_widget_ilist_nth_data_get(cfdata->o_sel, i); + if (!name) + continue; + + it = eina_list_nth(cfdata->box->items, i); + + if (!it) + continue; + + EINA_LIST_FOREACH (it->gadcon->cf->clients, g, cgc) + { + if (!cgc) + continue; + + if (strcmp(name, cgc->name)) + continue; + + e_gadcon_client_config_del(it->gadcon->cf, cgc); + + cfdata->box->cfg->gadcon_items = + eina_list_remove(cfdata->box->cfg->gadcon_items, it->cfg_gadcon); + + eina_hash_del_by_key(ngi_gadcon_hash, it->cfg_gadcon->name); + + e_gadcon_unpopulate(it->gadcon); + + /* it->base.obj = NULL; + * it->box->items = eina_list_remove(it->box->items, it); + * ngi_item_free(it); */ + + ngi_item_remove((Ngi_Item*)it); + + e_config_save_queue(); + + update = 1; + } + } + if (update) + { + _load_sel_gadgets(cfdata); + + /* we just default to selecting first one here as the user may have had + * more than one selected */ + e_widget_ilist_selected_set(cfdata->o_sel, 0); + ngi_thaw(cfdata->box->ng); + } + + if (g) + eina_list_free(g); + + if (l) + eina_list_free(l); +} + +static void +_set_description(void *data, const char *name) +{ + E_Config_Dialog_Data *cfdata = NULL; + E_Module *mod = NULL; + Efreet_Desktop *desk = NULL; + char buf[4096]; + + if (!(cfdata = data)) + return; + + if (!name) + return; + + if (!(mod = e_module_find(name))) + return; + + snprintf(buf, sizeof(buf), "%s/module.desktop", e_module_dir_get(mod)); + if (!ecore_file_exists(buf)) + return; + + if (!(desk = efreet_desktop_get(buf))) + return; + + if (desk->comment) + e_widget_textblock_markup_set(cfdata->o_desc, desk->comment); + + efreet_desktop_free(desk); +} + diff --git a/src/ng_item.c b/src/ng_item.c new file mode 100644 index 0000000..758e867 --- /dev/null +++ b/src/ng_item.c @@ -0,0 +1,213 @@ +#include "e_mod_main.h" + + +void +ngi_item_init_defaults(Ngi_Item *it) +{ + Ng *ng = it->box->ng; + int ok = 0; + + it->obj = edje_object_add(ng->evas); + + switch(ng->cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + ok = ngi_object_theme_set(it->obj, "e/modules/itask-ng/icon_bottom"); + break; + case E_GADCON_ORIENT_TOP: + ok = ngi_object_theme_set(it->obj, "e/modules/itask-ng/icon_top"); + break; + case E_GADCON_ORIENT_LEFT: + ok = ngi_object_theme_set(it->obj, "e/modules/itask-ng/icon_left"); + break; + case E_GADCON_ORIENT_RIGHT: + ok = ngi_object_theme_set(it->obj, "e/modules/itask-ng/icon_right"); + break; + } + + /* TODO remove fallback */ + if (!ok) + { + if (!e_theme_edje_object_set(it->obj, "base/theme/modules/itask-ng", "e/modules/itask-ng/icon")) + edje_object_file_set(it->obj, ngi_config->theme_path, "e/modules/itask-ng/icon"); + } + + it->over = edje_object_add(ng->evas); + + switch(ng->cfg->orient) + { + case E_GADCON_ORIENT_BOTTOM: + ok = ngi_object_theme_set(it->over, "e/modules/itask-ng/icon_over_bottom"); + break; + case E_GADCON_ORIENT_TOP: + ok = ngi_object_theme_set(it->over, "e/modules/itask-ng/icon_over_top"); + break; + case E_GADCON_ORIENT_LEFT: + ok = ngi_object_theme_set(it->over, "e/modules/itask-ng/icon_over_left"); + break; + case E_GADCON_ORIENT_RIGHT: + ok = ngi_object_theme_set(it->over, "e/modules/itask-ng/icon_over_right"); + break; + } + if (!ok) + { + if (!e_theme_edje_object_set(it->over, "base/theme/modules/itask-ng", "e/modules/itask-ng/icon_overlay")) + edje_object_file_set(it->over, ngi_config->theme_path, "e/modules/itask-ng/icon_overlay"); + } + + + evas_object_layer_set(it->over, 9999); + evas_object_show(it->over); + + evas_object_smart_member_add(it->obj, ng->o_icons); + evas_object_show(it->obj); +} + +void +ngi_item_show(Ngi_Item *it, int instant) +{ + Ng *ng = it->box->ng; + + evas_object_show(it->obj); + evas_object_show(it->over); + + ngi_item_signal_emit(it, "e,state,item,show"); + + if (eina_list_data_find(ng->items_remove, it)) + ng->items_remove = eina_list_remove(ng->items_remove, it); + + if (instant) + { + it->scale = 1.0; + ngi_animate(ng); + return; + } + + it->start_time = ecore_time_get(); + it->scale = 0.0; + ng->items_show = eina_list_append(ng->items_show, it); + ngi_animate(ng); +} + +void +ngi_item_remove(Ngi_Item *it) +{ + if (!it) return; + + Ng *ng = it->box->ng; + double now = ecore_time_get(); + + edje_object_signal_emit(it->obj, "e,state,item,hide", "e"); + + if (now - it->start_time < ng->opt.fade_duration) + it->start_time = now - (ng->opt.fade_duration - (now - it->start_time)); + else + it->start_time = now; + + it->delete_me = 1; + + if (eina_list_data_find(ng->items_show, it)) + ng->items_show = eina_list_remove(ng->items_show, it); + + if (!eina_list_data_find(ng->items_remove, it)) + ng->items_remove = eina_list_append(ng->items_remove, it); + + if (it == ng->item_active) + ng->item_active = NULL; + + if (it == ng->item_drag) + ng->item_drag = NULL; + + ngi_animate(ng); +} + +EAPI void +ngi_item_free(Ngi_Item *it) +{ + Ng *ng = it->box->ng; + + if (eina_list_data_find(ng->items_remove, it)) + ng->items_remove = eina_list_remove(ng->items_remove, it); + + if (eina_list_data_find(ng->items_show, it)) + ng->items_show = eina_list_remove(ng->items_show, it); + + it->box->items = eina_list_remove(it->box->items, it); + + if (it->obj) + evas_object_del(it->obj); + + if (it->over) + evas_object_del(it->over); + + if (it->label) + eina_stringshare_del(it->label); + + if (it->cb_free) it->cb_free(it); +} + +void +ngi_item_label_set(Ngi_Item *it, const char *label) +{ + if (it->label) + eina_stringshare_del(it->label); + + if (label) + it->label = eina_stringshare_add(label); + else + it->label = NULL; +} + +void +ngi_item_signal_emit(Ngi_Item *it, char *sig) +{ + if (it->obj) + edje_object_signal_emit(it->obj, sig, "e"); + if (it->over) + edje_object_signal_emit(it->over, sig, "e"); +} + +void +ngi_item_mouse_in(Ngi_Item *it) +{ + if (!it || it->delete_me) return; + + ngi_item_signal_emit(it,"e,state,mouse,in"); + + if (it->cb_mouse_in) + it->cb_mouse_in(it); +} + +void +ngi_item_mouse_out(Ngi_Item *it) +{ + if (!it || it->delete_me) return; + + ngi_item_signal_emit(it,"e,state,mouse,out"); + + if (it->cb_mouse_out) + it->cb_mouse_out(it); +} + +void +ngi_item_mouse_down(Ngi_Item *it, Ecore_Event_Mouse_Button *ev) +{ + if (!it || it->delete_me) return; + + ngi_item_signal_emit(it,"e,state,mouse,down"); + + if (it->cb_mouse_down) + it->cb_mouse_down(it, ev); +} + +void +ngi_item_mouse_up(Ngi_Item *it, Ecore_Event_Mouse_Button *ev) +{ + if (!it || it->delete_me) return; + + ngi_item_signal_emit(it,"e,state,mouse,up"); + + if (it->cb_mouse_up) + it->cb_mouse_up(it, ev); +} + diff --git a/src/ng_launcher.c b/src/ng_launcher.c new file mode 100644 index 0000000..f643fc1 --- /dev/null +++ b/src/ng_launcher.c @@ -0,0 +1,572 @@ +#include "e_mod_main.h" + +/* + TODO + - update on icon changes + +*/ + +static void _box_fill (Ngi_Box *box); +static void _app_change_cb (void *data, E_Order *eo); + +static void _item_new (Ngi_Box *box, Efreet_Desktop *dekstop, int instant, Ngi_Item_Launcher *after); +static void _item_fill (Ngi_Item_Launcher *it); + +static void _item_cb_free (Ngi_Item *it); +static void _item_cb_drag_start (Ngi_Item *it); +static void _item_cb_mouse_up (Ngi_Item *it, Ecore_Event_Mouse_Button *ev); +static void _item_cb_mouse_down (Ngi_Item *it, Ecore_Event_Mouse_Button *ev); + +static void _cb_drop_enter (void *data, const char *type, void *event_info); +static void _cb_drop_leave (void *data, const char *type, void *event_info); +static void _cb_drop_move (void *data, const char *type, void *event_info); +static void _cb_drop_end (void *data, const char *type, void *event_info); +static Eina_Bool _cb_icons_update(void *data, int type, void *event); + + +void +ngi_launcher_new(Ng *ng, Config_Box *cfg) +{ + char buf[4096]; + Ecore_Event_Handler *h; + Ngi_Box *box = ngi_box_new(ng); + + box->cfg = cfg; + cfg->box = box; + + const char *drop[] = + { "enlightenment/desktop", + "enlightenment/border", + "text/uri-list" }; + + box->drop_handler = e_drop_handler_add + (ng->win->drop_win, box, + _cb_drop_enter, _cb_drop_move, + _cb_drop_leave, _cb_drop_end, + drop, 3, 0, 0, 0, 0); + + h = ecore_event_handler_add(E_EVENT_CONFIG_ICON_THEME, _cb_icons_update, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + if (!cfg->launcher_app_dir || strlen(cfg->launcher_app_dir) == 0) + return; + + if (cfg->launcher_app_dir[0] != '/') + { + snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s/.order", + e_user_homedir_get(), cfg->launcher_app_dir); + } + else + snprintf(buf, sizeof(buf), "%s", cfg->launcher_app_dir); + + box->apps = e_order_new(buf); + e_order_update_callback_set(box->apps, _app_change_cb, box); + + _box_fill(box); +} + +void +ngi_launcher_remove(Ngi_Box *box) +{ + Ecore_Event_Handler *h; + + e_drop_handler_del(box->drop_handler); + + if (box->apps) + { + e_order_update_callback_set(box->apps, NULL, NULL); + e_object_del(E_OBJECT(box->apps)); + } + + EINA_LIST_FREE(box->handlers, h) + ecore_event_handler_del(h); + + ngi_box_free(box); +} + +static void +_box_fill(Ngi_Box *box) +{ + Efreet_Desktop *desktop; + Eina_List *l; + + if (!box->apps) + return; + + ngi_freeze(box->ng); + + EINA_LIST_FOREACH( box->apps->desktops, l, desktop) + _item_new(box, desktop, 1, NULL); + + ngi_thaw(box->ng); +} + +static Eina_Bool +_cb_icons_update(void *data, int type, void *event) +{ + Ngi_Box *box = (Ngi_Box *)data; + Eina_List *l; + Ngi_Item_Launcher *it; + printf(">>>>>>>> icons update %s\n", e_config->icon_theme); + + EINA_LIST_FOREACH(box->items, l, it) + _item_fill(it); + + return ECORE_CALLBACK_PASS_ON; +} + +static void +_app_change_cb(void *data, E_Order *eo) +{ + Ngi_Box *box = (Ngi_Box *)data; + + if (box->item_drop) + return; + + while(box->items) + ngi_item_free(box->items->data); + + _box_fill(box); +} + +/* ******************************* LAUNCHER DROP HANDLER ******************** */ + +static Ngi_Item * +_drop_item_new(Ngi_Box *box) +{ + Ngi_Item *it; + + it = (Ngi_Item*)E_NEW(Ngi_Item_Launcher, 1); + it->box = box; + ngi_item_show(it, 0); + it->delete_me = EINA_TRUE; + + return it; +} + +static void +_drop_handle_move(Ngi_Box *box, int x, int y) +{ + Ngi_Item *item; + Ngi_Item_Launcher *it, *it2; + Eina_List *l; + + if (box->ng->horizontal) + box->ng->pos = x + box->ng->size/2; + else + box->ng->pos = y + box->ng->size/2; + + item = ngi_item_at_position_get(box->ng); + + if (item && (item->box != box)) + { + l = eina_list_last(box->items); + if (l && (it = l->data) && (!it->app)) return; + + ngi_item_remove(box->item_drop); + + box->item_drop = _drop_item_new(box); + box->items = eina_list_append(box->items, box->item_drop); + } + else if (item && item->box == box) + { + it = (Ngi_Item_Launcher*)item; + l = eina_list_data_find_list(box->items, it); + + if (l) it2 = eina_list_data_get(l->prev); + + if (it->app && (!it2 || it2->app)) + { + ngi_item_remove(box->item_drop); + + box->item_drop = _drop_item_new(box); + box->items = eina_list_prepend_relative(box->items, box->item_drop, it); + } + } +} + +static void +_cb_drop_enter(void *data, const char *type, void *event_info) +{ + E_Event_Dnd_Enter *ev = (E_Event_Dnd_Enter *)event_info; + Ngi_Box *box = (Ngi_Box *)data; + + if (!strcmp(type, "text/uri-list")) + return; + + _drop_handle_move(box, ev->x, ev->y); + + box->ng->dnd = 1; + ngi_mouse_in(box->ng); +} + +static void +_cb_drop_move(void *data, const char *type, void *event_info) +{ + E_Event_Dnd_Move *ev = (E_Event_Dnd_Move *)event_info; + Ngi_Box *box = (Ngi_Box *)data; + + if (!strcmp(type, "text/uri-list")) + return; + + _drop_handle_move(box, ev->x, ev->y); + + ngi_thaw(box->ng); +} + +static void +_cb_drop_leave(void *data, const char *type, void *event_info) +{ + Ngi_Box *box = (Ngi_Box *)data; + + if (!strcmp(type, "text/uri-list")) + return; + + if (box->item_drop) + ngi_item_remove(box->item_drop); + box->item_drop = NULL; + + ngi_reposition(box->ng); + ngi_input_extents_calc(box->ng); + box->ng->dnd = 0; + ngi_mouse_out(box->ng); +} + +static void +_cb_drop_end(void *data, const char *type, void *event_info) +{ + E_Event_Dnd_Drop *ev = (E_Event_Dnd_Drop *)event_info; + Ngi_Box *box = data; + Efreet_Desktop *app = NULL; + Ngi_Item_Launcher *it = NULL; + + Eina_List *l; + if (!strcmp(type, "enlightenment/desktop")) + { + app = (Efreet_Desktop *)ev->data; + } + else if (!strcmp(type, "enlightenment/border")) + { + E_Border *bd = (E_Border *)ev->data; + app = bd->desktop; + + if (!app) + { + app = e_desktop_border_create(bd); + efreet_desktop_save(app); + e_desktop_edit(e_container_current_get(e_manager_current_get()), app); + } + } + else if (!strcmp(type, "text/uri-list")) + return; + + if (!app) + return; + + l = eina_list_data_find_list(box->items, box->item_drop); + if (l) it = eina_list_data_get(l->next); + + ngi_item_free(box->item_drop); + + if (it && it->app) + e_order_prepend_relative(box->apps, app, it->app); + else + e_order_append(box->apps, app); + /* _save_order(box); */ + + _item_new(box, app, 1, it); + + box->ng->dnd = 0; + ngi_reposition(box->ng); + ngi_input_extents_calc(box->ng); +} + +/* ******************************* LAUNCHER ITEM ********************************** */ + +static void +_item_new(Ngi_Box *box, Efreet_Desktop *desktop, int instant, Ngi_Item_Launcher *after) +{ + Ngi_Item_Launcher *it; + + it = E_NEW(Ngi_Item_Launcher, 1); + it->base.box = box; + ngi_item_init_defaults((Ngi_Item*)it); + + it->base.cb_free = _item_cb_free; + it->base.cb_mouse_down = _item_cb_mouse_down; + it->base.cb_mouse_up = _item_cb_mouse_up; + it->base.cb_drag_start = _item_cb_drag_start; + + efreet_desktop_ref(desktop); + it->app = desktop; + + _item_fill(it); + + if (after) + box->items = eina_list_prepend_relative(box->items, it, after); + else + box->items = eina_list_append(box->items, it); + + ngi_item_show((Ngi_Item*)it, instant); +} + +static void +_item_cb_free(Ngi_Item *item) +{ + Ngi_Item_Launcher *it = (Ngi_Item_Launcher *) item; + + if (it->app) + efreet_desktop_unref(it->app); + + if (it->o_icon) + evas_object_del(it->o_icon); + + if (it->o_proxy) + evas_object_del(it->o_proxy); + + E_FREE(it); +} + +static void +_item_fill(Ngi_Item_Launcher *it) +{ + Evas_Object *o; + Evas *e = it->base.box->ng->evas; + + if (it->o_icon) + { + edje_object_part_unswallow(it->base.obj, it->o_icon); + evas_object_del(it->o_icon); + } + if (it->o_proxy) + { + edje_object_part_unswallow(it->base.obj, it->o_proxy); + evas_object_del(it->o_proxy); + } + + o = e_util_desktop_icon_add(it->app, 128, e); + if (o) + { + edje_object_part_swallow(it->base.obj, "e.swallow.content", o); + evas_object_show(o); + it->o_icon = o; + + o = evas_object_image_filled_add(e); + evas_object_image_fill_set(o, 0, 0, 1, 1); + evas_object_image_source_set(o, it->base.obj); + + edje_object_part_swallow(it->base.over, "e.swallow.content", o); + evas_object_show(o); + it->o_proxy = o; + } + + if (it->app->name && it->app->name[0]) + ngi_item_label_set((Ngi_Item*)it, it->app->name); + else if (it->app->generic_name && it->app->generic_name[0]) + ngi_item_label_set((Ngi_Item*)it, it->app->generic_name); +} + +static void +_cb_drag_del(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Ngi_Box *box = data; + + ngi_bar_lock(box->ng, 0); + ngi_thaw(box->ng); +} + +static void +_cb_drag_finished(E_Drag *d, int dropped) +{ + efreet_desktop_unref((Efreet_Desktop*)d->data); +} + +static void +_item_cb_drag_start(Ngi_Item *item) +{ + Ngi_Item_Launcher *it = (Ngi_Item_Launcher*) item; + E_Drag *d; + Evas_Object *o; + Evas_Coord x, y, w, h, px, py; + Ngi_Box *box = item->box; + + const char *drag_types[] = { "enlightenment/desktop" }; + + if (item->box->cfg->launcher_lock_dnd) + return; + + evas_object_geometry_get(it->o_icon, &x, &y, &w, &h); + + if (!ngi_config->use_composite) + { + x -= box->ng->win->rect.x; + y -= box->ng->win->rect.y; + } + + d = e_drag_new(box->ng->zone->container, x, y, drag_types, 1, + it->app, -1, NULL, + _cb_drag_finished); + efreet_desktop_ref(it->app); + + o = e_util_desktop_icon_add(it->app, MIN(w, h), e_drag_evas_get(d)); + e_drag_object_set(d, o); + e_drag_resize(d, w, h); + evas_object_event_callback_add(o, EVAS_CALLBACK_DEL, _cb_drag_del, box); + + e_order_remove(item->box->apps, it->app); + + evas_object_hide(it->base.obj); + ngi_item_remove(&(it->base)); + + ecore_x_pointer_xy_get(box->ng->win->input, &px, &py); + e_drag_start(d, px, py); + + box->ng->item_drag = NULL; + + ngi_bar_lock(box->ng, 1); + ngi_thaw(box->ng); +} + +static void +_menu_cb_lock_dnd(void *data, E_Menu *m, E_Menu_Item *mi) +{ + Ngi_Box *box = (Ngi_Box *)data; + + if (box) box->cfg->launcher_lock_dnd = e_menu_item_toggle_get(mi); +} + +static void +_menu_cb_edit_icon(void *data, E_Menu *m, E_Menu_Item *mi) +{ + Ngi_Item_Launcher *it = data; + + if (it) e_desktop_edit(e_container_current_get(e_manager_current_get()), it->app); +} + +static void +_menu_cb_configure_bar(void *data, E_Menu *m, E_Menu_Item *mi) +{ + Ng *ng = (Ng *)data; + + if (ng) ngi_configure_module(ng->cfg); +} + +static void +_menu_cb_configure_launcher(void *data, E_Menu *m, E_Menu_Item *mi) +{ + Ngi_Box *box = (Ngi_Box *)data; + char path[4096]; + + if (!box) + return; + + snprintf(path, sizeof(path), "%s/.e/e/applications/bar/%s/.order", + e_user_homedir_get(), box->cfg->launcher_app_dir); + + e_configure_registry_call("internal/ibar_other", + e_container_current_get(e_manager_current_get()), + path); +} + +static void +_menu_cb_menu_end(void *data, E_Menu *m) +{ + Ng *ng = (Ng *)data; + + e_object_del(E_OBJECT(m)); + ngi_thaw(ng); +} + +static void +_item_cb_mouse_down(Ngi_Item *item, Ecore_Event_Mouse_Button *ev) +{ + Ngi_Item_Launcher *it = (Ngi_Item_Launcher *) item; + Evas_Coord x, y, w, h; + E_Menu *m; + E_Menu_Item *mi; + Ngi_Box *box = item->box; + + if (!(ev->buttons == 3)) + { + item->mouse_down = 1; + return; + } + + if (!it->app) + return; + + evas_object_geometry_get(item->obj, &x, &y, &w, &h); + + x += box->ng->win->popup->x + box->ng->zone->x; + y += box->ng->win->popup->y + box->ng->zone->y; + + int dir = E_MENU_POP_DIRECTION_AUTO; + + switch(box->ng->cfg->orient) + { + case E_GADCON_ORIENT_TOP: + dir = E_MENU_POP_DIRECTION_DOWN; + y += h; + break; + + case E_GADCON_ORIENT_BOTTOM: + dir = E_MENU_POP_DIRECTION_UP; + break; + + case E_GADCON_ORIENT_LEFT: + dir = E_MENU_POP_DIRECTION_RIGHT; + x += w; + break; + + case E_GADCON_ORIENT_RIGHT: + dir = E_MENU_POP_DIRECTION_LEFT; + break; + } + + m = e_menu_new(); + + mi = e_menu_item_new(m); + e_menu_item_label_set(mi, D_("Configure Bar")); + e_menu_item_callback_set(mi, _menu_cb_configure_bar, box->ng); + + mi = e_menu_item_new(m); + e_menu_item_label_set(mi, D_("Lock Dragging")); + e_menu_item_check_set(mi, 1); + e_menu_item_toggle_set(mi, box->cfg->launcher_lock_dnd); + e_menu_item_callback_set(mi, _menu_cb_lock_dnd, box); + + mi = e_menu_item_new(m); + e_menu_item_separator_set(mi, 1); + + mi = e_menu_item_new(m); + e_menu_item_label_set(mi, D_("Applications")); + e_menu_item_callback_set(mi, _menu_cb_configure_launcher, box); + + mi = e_menu_item_new(m); + e_menu_item_label_set(mi, D_("Edit Icon")); + e_menu_item_callback_set(mi, _menu_cb_edit_icon, it); + + e_menu_post_deactivate_callback_set(m, _menu_cb_menu_end, box->ng); + + e_menu_activate_mouse(m, box->ng->zone, x, y, 1, 1, + dir, ev->timestamp); +} + +static void +_item_cb_mouse_up(Ngi_Item *item, Ecore_Event_Mouse_Button *ev) +{ + Ngi_Item_Launcher *it = (Ngi_Item_Launcher *) item; + + if (!item->mouse_down) + return; + + item->mouse_down = 0; + + if (ev->buttons == 1) + { + e_exec(e_util_zone_current_get(e_manager_current_get()), it->app, NULL, NULL, NULL); + + ngi_item_signal_emit((Ngi_Item*)it, "e,action,start"); + } +} + diff --git a/src/ng_taskbar.c b/src/ng_taskbar.c new file mode 100644 index 0000000..8428ac5 --- /dev/null +++ b/src/ng_taskbar.c @@ -0,0 +1,975 @@ +#include "e_mod_main.h" +#include + +static int _border_check (Ngi_Box *box, E_Border *bd); +static Ngi_Item_Taskbar *_border_find (Ngi_Box *box, E_Border *bd); + +static Eina_Bool _cb_border_event (void *data, int type, void *event); +static Eina_Bool _cb_desk_show (void *data, int type, void *event); + +static void _item_new (Ngi_Box *box, E_Border *bd); +static void _item_cb_free (Ngi_Item *it); +static void _item_set_icon (Ngi_Item_Taskbar *it); +static void _item_set_label (Ngi_Item_Taskbar *it); + +static void _item_cb_mouse_down (Ngi_Item *it, Ecore_Event_Mouse_Button *ev); +static void _item_cb_mouse_up (Ngi_Item *it, Ecore_Event_Mouse_Button *ev); +static void _item_cb_mouse_in (Ngi_Item *it); +static void _item_cb_mouse_out (Ngi_Item *it); +static void _item_cb_drag_start (Ngi_Item *it); +static void _item_cb_drag_end (E_Drag *drag, int dropped); + +static Eina_Bool _cb_show_window (void *data); +static void _cb_drop_enter (void *data, const char *type, void *event_info); +static void _cb_drop_move (void *data, const char *type, void *event_info); +static void _cb_drop_end (void *data, const char *type, void *event_info); +static void _cb_drop_leave (void *data, const char *type, void *event_info); + + +static Ecore_X_Atom ECOMORPH_ATOM_THUMBNAIL = 0; + +void +ngi_taskbar_init(void) +{ + ECOMORPH_ATOM_THUMBNAIL = ecore_x_atom_get("__ECOMORPH_THUMBNAIL"); +} + +void +ngi_taskbar_new(Ng *ng, Config_Box *cfg) +{ + Ngi_Box *box = ngi_box_new(ng); + E_Border *bd; + E_Border_List *bl; + Ecore_Event_Handler *h; + + if (!box) return; + + box->cfg = cfg; + cfg->box = box; + + // "enlightenment/border", "enlightenment/desktop", + const char *drop[] = {"text/uri-list","text/x-moz-url", "enlightenment/x-file"}; + box->drop_handler = e_drop_handler_add(ng->win->drop_win, box, + _cb_drop_enter, _cb_drop_move, + _cb_drop_leave, _cb_drop_end, + drop, 3, 0, 0, 0, 0); + + h = ecore_event_handler_add(E_EVENT_BORDER_ADD, _cb_border_event, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + h = ecore_event_handler_add(E_EVENT_BORDER_REMOVE, _cb_border_event, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + h = ecore_event_handler_add(E_EVENT_BORDER_ICONIFY, _cb_border_event, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + h = ecore_event_handler_add(E_EVENT_BORDER_UNICONIFY, _cb_border_event, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + h = ecore_event_handler_add(E_EVENT_BORDER_ICON_CHANGE, _cb_border_event, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + h = ecore_event_handler_add(E_EVENT_BORDER_PROPERTY, _cb_border_event, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + h = ecore_event_handler_add(E_EVENT_BORDER_ZONE_SET, _cb_border_event, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + h = ecore_event_handler_add(E_EVENT_BORDER_URGENT_CHANGE, _cb_border_event, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + h = ecore_event_handler_add(E_EVENT_BORDER_FOCUS_IN, _cb_border_event, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + h = ecore_event_handler_add(E_EVENT_BORDER_FOCUS_OUT, _cb_border_event, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + h = ecore_event_handler_add(E_EVENT_DESK_SHOW, _cb_desk_show, box); + if (h) box->handlers = eina_list_append(box->handlers, h); + + bl = e_container_border_list_first(box->ng->zone->container); + + while ((bd = e_container_border_list_next(bl))) + { + if (box->ng->zone == bd->zone) + _item_new(box, bd); + } + + e_container_border_list_free(bl); +} + +void +ngi_taskbar_remove(Ngi_Box *box) +{ + Ecore_Event_Handler *h; + + e_drop_handler_del(box->drop_handler); + + EINA_LIST_FREE(box->handlers, h) + ecore_event_handler_del(h); + + ngi_box_free(box); +} + +static int +_border_check(Ngi_Box *box, E_Border *bd) +{ + if (box->cfg->taskbar_show_desktop && bd->desk != e_desk_current_get(box->ng->zone)) + return 0; + + if (box->cfg->taskbar_show_iconified == 0 && bd->iconic) + return 0; + + if (box->cfg->taskbar_show_iconified == 2 && !bd->iconic) + return 0; + + if ((box->cfg->taskbar_skip_dialogs && bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DIALOG) + || (bd->user_skip_winlist) + || (bd->client.netwm.state.skip_taskbar)) + return 0; + + /* XXX Xitk menu windows act like normal windows... */ + if (bd->client.icccm.transient_for && + bd->client.icccm.class && + !strcmp(bd->client.icccm.class, "Xitk")) + return 0; + + return 1; +} + +static Ngi_Item_Taskbar * +_border_find(Ngi_Box *box, E_Border *bd) +{ + Eina_List *l; + Ngi_Item_Taskbar *it; + + EINA_LIST_FOREACH(box->items, l, it) + if (it->border == bd) return it; + + return NULL; +} + +/* ************************* DND CALLBACKS ************************** */ + +static void +_cb_drop_enter(void *data, const char *type, void *event_info) +{ + E_Event_Dnd_Enter *ev = (E_Event_Dnd_Enter *)event_info; + Ngi_Box *box = (Ngi_Box *)data; + Ng *ng = box->ng; + + ng->pos = (ng->horizontal ? ev->x : ev->y); + + ng->item_active = ngi_item_at_position_get(ng); + + if (!ng->item_active) + return; /* FIXME set edge_in before ?*/ + + if (box->dnd_timer) + ecore_timer_del(box->dnd_timer); + + box->dnd_timer = ecore_timer_add(0.5, _cb_show_window, ng->item_active); + + ng->dnd = 1; + ngi_mouse_in(ng); +} + +static void +_cb_drop_leave(void *data, const char *type, void *event_info) +{ + Ngi_Box *box = (Ngi_Box *)data; + Ng *ng = box->ng; + + if (box->dnd_timer) + { + ecore_timer_del(box->dnd_timer); + box->dnd_timer = NULL; + } + + ng->item_active = NULL; + ngi_mouse_out(ng); +} + +static void +_cb_drop_move(void *data, const char *type, void *event_info) +{ + E_Event_Dnd_Move *ev = (E_Event_Dnd_Move *)event_info; + Ngi_Box *box = (Ngi_Box *)data; + Ng *ng = box->ng; + Ngi_Item *it; + + ng->pos = (ng->horizontal ? ev->x : ev->y); + + it = ngi_item_at_position_get(ng); + + if (!it || !ng->item_active) + return; + + if (ng->item_active != it) + { + if (box->dnd_timer) + ecore_timer_del(box->dnd_timer); + box->dnd_timer = NULL; + + if (it) + { + ngi_item_activate(ng); + + box->dnd_timer = ecore_timer_add(0.5, _cb_show_window, it); + } + } + + ngi_animate(ng); +} + +static void +_cb_drop_end(void *data, const char *type, void *event_info) +{ + Ngi_Box *box = (Ngi_Box *)data; + Ng *ng = box->ng; + + if (!ng->item_active) + return; + + if (box->dnd_timer) + { + ecore_timer_del(box->dnd_timer); + box->dnd_timer = NULL; + } + + ng->item_active = NULL; + ngi_mouse_out(ng); +} + +static Eina_Bool +_cb_show_window(void *data) +{ + Ngi_Item_Taskbar *it = (Ngi_Item_Taskbar*) data; + E_Desk *desk; + + if (!it) return EINA_FALSE; + + desk = e_desk_current_get(it->border->zone); + + if (desk != it->border->desk && !it->border->sticky) + { + e_desk_show(it->border->desk); + } + + if (it->border->shaded) + { + e_border_unshade(it->border, E_DIRECTION_UP); + } + + if (!it->border->visible) + { + e_border_show(it->border); + } + + if (it->border->iconic) + { + e_border_uniconify(it->border); + } + else + { + e_border_raise(it->border); + } + + e_border_focus_set(it->border, 1, 1); + + it->base.box->dnd_timer = NULL; + + return EINA_FALSE; +} + +/* ************************** BORDER CALLBACKS ************************* */ + +static Eina_Bool +_cb_border_event(void *data, int type, void *event) +{ + E_Event_Border_Add *ev = event; + Ngi_Box *box = data; + Ngi_Item *it; + E_Border *bd = ev->border; + + /* XXX workaround for e sending event after the + * border_remove event */ + /* if (bd->already_unparented) + * return ECORE_CALLBACK_PASS_ON; */ + + it = (Ngi_Item*)_border_find(box, bd); + + if (type == E_EVENT_BORDER_FOCUS_IN) + { + if (it) ngi_item_signal_emit(it, "e,state,taskbar,focus,on"); + } + else if (type == E_EVENT_BORDER_FOCUS_OUT) + { + if (it) ngi_item_signal_emit(it, "e,state,taskbar,focus,off"); + } + else if (type == E_EVENT_BORDER_ICONIFY) + { + if (it) ngi_item_signal_emit(it, "e,state,taskbar,iconic,on"); + } + else if (type == E_EVENT_BORDER_UNICONIFY) + { + if (it) ngi_item_signal_emit(it, "e,state,taskbar,iconic,off"); + } + else if (type == E_EVENT_BORDER_ICON_CHANGE) + { + if (it) _item_set_icon((Ngi_Item_Taskbar *)it); + } + else if (type ==E_EVENT_BORDER_ADD) + { + _item_new(box, bd); + } + else if (type ==E_EVENT_BORDER_REMOVE) + { + if (it) ngi_item_remove(it); + } + else if (type ==E_EVENT_BORDER_ZONE_SET) + { + if (box->ng->zone == bd->zone) + _item_new(box, bd); + else if (it) + ngi_item_remove(it); + } + else if ((type == E_EVENT_BORDER_URGENT_CHANGE) && (it)) + { + if (bd->client.icccm.urgent) + { + ((Ngi_Item_Taskbar *)it)->urgent = 1; + ngi_item_signal_emit(it, "e,state,taskbar,urgent,on"); + + if (box->ng->cfg->autohide_show_urgent) + { + ngi_bar_lock(box->ng, 1); + ngi_animate(box->ng); + } + } + else + { + ((Ngi_Item_Taskbar *)it)->urgent = 0; + ngi_item_signal_emit(it, "e,state,taskbar,urgent,off"); + + if (box->ng->cfg->autohide_show_urgent) + { + ngi_bar_lock(box->ng, 0); + ngi_animate(box->ng); + } + } + } + else if (type ==E_EVENT_BORDER_PROPERTY) + { + if (it) + { + if (!_border_check(box, bd)) + ngi_item_remove(it); + else + _item_set_label((Ngi_Item_Taskbar *)it); + } + else + { + _item_new(box, ev->border); + } + } + + return ECORE_CALLBACK_PASS_ON; +} + +/* FIXME set it->visible to skip icons */ +static Eina_Bool +_cb_desk_show(void *data, int type, void *event) +{ + /* E_Event_Desk_Show *ev = (E_Event_Desk_Show*) event; */ + Ng *ng; + Ngi_Box *box; + Ngi_Item_Taskbar *it; + Eina_List *l, *ll, *lll; + E_Desk *desk; + int changed = 0; + + EINA_LIST_FOREACH (ngi_config->instances, l, ng) + { + EINA_LIST_FOREACH (ng->boxes, ll, box) + { + if ((box->cfg->type != taskbar) || + (!box->cfg->taskbar_show_desktop)) + continue; + + desk = e_desk_current_get(ng->zone); + + EINA_LIST_FOREACH (box->items, lll, it) + { + if (it->border->desk == desk) + { + changed = 1; + it->base.scale = 1.0; + } + else + { + changed = 1; + it->base.scale = 0.0; + } + } + if (changed) + ngi_thaw(ng); + + changed = 0; + } + } + return EINA_TRUE; +} + +/* *************************** TASKBAR ITEM *************************** */ + +static void +_item_new(Ngi_Box *box, E_Border *bd) +{ + Ngi_Item_Taskbar *it, *l_it = NULL, *ll_it = NULL; + Eina_List *l; + + if (!_border_check(box, bd)) + return; + + if (_border_find(box, bd)) + return; + + it = E_NEW(Ngi_Item_Taskbar, 1); + it->base.box = box; + ngi_item_init_defaults((Ngi_Item*)it); + + e_object_ref(E_OBJECT(bd)); + it->border = bd; + + it->base.cb_free = _item_cb_free; + it->base.cb_mouse_in = _item_cb_mouse_in; + it->base.cb_mouse_out = _item_cb_mouse_out; + it->base.cb_mouse_down = _item_cb_mouse_down; + it->base.cb_mouse_up = _item_cb_mouse_up; + it->base.cb_drag_start = _item_cb_drag_start; + + _item_set_icon(it); + _item_set_label(it); + + if (box->cfg->taskbar_group_apps && (bd->client.icccm.class && bd->client.icccm.class[0])) + { + it->class = eina_stringshare_add(bd->client.icccm.class); + + EINA_LIST_FOREACH (box->items, l, l_it) + { + if (box->cfg->taskbar_append_right) + { + if (ll_it && l_it->class && ll_it->class && + ll_it->class == it->class && + l_it->class != it->class) + break; + } + else + { + if (l_it->class && l_it->class == it->class) + break; + + ll_it = l_it; + l_it = NULL; + } + } + } + + if (l_it) + { + if (box->cfg->taskbar_append_right) + box->items = eina_list_append_relative(box->items, it, l_it); + else + box->items = eina_list_prepend_relative(box->items, it, l_it); + } + else + { + if (box->cfg->taskbar_append_right) + box->items = eina_list_append(box->items, it); + else + box->items = eina_list_prepend(box->items, it); + } + + ngi_item_show((Ngi_Item*)it, 0); + + if (bd->iconic) + ngi_item_signal_emit((Ngi_Item*)it, "e,state,taskbar,iconic,on"); + + it->urgent = bd->client.icccm.urgent; + if (it->urgent) + ngi_item_signal_emit((Ngi_Item*)it, "e,state,taskbar,urgent,on"); +} + +static void +_item_cb_free(Ngi_Item *item) +{ + Ngi_Item_Taskbar *it = (Ngi_Item_Taskbar *) item; + + if (it->urgent) + ngi_bar_lock(((Ngi_Item*)it)->box->ng, 0); + + if (it->border) + e_object_unref(E_OBJECT(it->border)); + + if (it->o_icon) + evas_object_del(it->o_icon); + + if (it->o_proxy) + edje_object_part_unswallow(it->base.obj, it->o_proxy); + + E_FREE(it); +} + +Evas_Object * +_border_icon_add(E_Border *bd, Evas *evas) +{ + Evas_Object *o; + + E_OBJECT_CHECK_RETURN(bd, NULL); + E_OBJECT_TYPE_CHECK_RETURN(bd, E_BORDER_TYPE, NULL); + + o = NULL; + + if (bd->internal) + { + o = edje_object_add(evas); + if (!bd->internal_icon) + e_util_edje_icon_set(o, "enlightenment"); + else + { + if (!bd->internal_icon_key) + { + char *ext; + + ext = strrchr(bd->internal_icon, '.'); + if ((ext) && ((!strcmp(ext, ".edj")))) + { + if (!edje_object_file_set(o, bd->internal_icon, "icon")) + e_util_edje_icon_set(o, "enlightenment"); + } + else if (ext) + { + evas_object_del(o); + o = e_icon_add(evas); + e_icon_file_set(o, bd->internal_icon); + } + else + { + evas_object_del(o); + o = e_icon_add(evas); + double tmp = e_scale; + e_scale = 3.0; + if (!e_util_icon_theme_set(o, bd->internal_icon)) + e_util_icon_theme_set(o, "enlightenment"); + e_scale = tmp; + } + } + else + { + edje_object_file_set(o, bd->internal_icon, + bd->internal_icon_key); + } + } + return o; + } + if ((bd->client.netwm.icons) && + ((e_config->use_app_icon) || + (bd->remember && (bd->remember->prop.icon_preference == E_ICON_PREF_NETWM)))) + { + int i, size, tmp, found = 0; + o = e_icon_add(evas); + + size = bd->client.netwm.icons[0].width; + + for (i = 1; i < bd->client.netwm.num_icons; i++) + { + if ((tmp = bd->client.netwm.icons[i].width) > size) + { + size = tmp; + found = i; + } + } + + e_icon_data_set(o, bd->client.netwm.icons[found].data, + bd->client.netwm.icons[found].width, + bd->client.netwm.icons[found].height); + e_icon_alpha_set(o, 1); + + return o; + } + + if (bd->desktop) + { + o = e_util_desktop_icon_add(bd->desktop, 128, evas); + if (o) return o; + } + + if (bd->client.netwm.icons) + { + int i, size, tmp, found = 0; + o = e_icon_add(evas); + + size = bd->client.netwm.icons[0].width; + + for (i = 1; i < bd->client.netwm.num_icons; i++) + { + if ((tmp = bd->client.netwm.icons[i].width) > size) + { + size = tmp; + found = i; + } + } + + e_icon_data_set(o, bd->client.netwm.icons[found].data, + bd->client.netwm.icons[found].width, + bd->client.netwm.icons[found].height); + e_icon_alpha_set(o, 1); + return o; + } + + o = e_border_icon_add(bd, evas); + if (o) return o; + + o = edje_object_add(evas); + e_util_edje_icon_set(o, "enlightenment/unknown"); + + return o; +} + +static void +_item_set_icon(Ngi_Item_Taskbar *it) +{ + Evas_Object *o, *oo; + Evas *e = it->base.box->ng->evas; + + if (it->o_icon) + { + edje_object_part_unswallow(it->base.obj, it->o_icon); + evas_object_del(it->o_icon); + } + if (it->o_proxy) + { + edje_object_part_unswallow(it->base.obj, it->o_proxy); + evas_object_del(it->o_proxy); + } + + o = _border_icon_add(it->border, e); + edje_object_part_swallow(it->base.obj, "e.swallow.content", o); + evas_object_show(o); + it->o_icon = o; + + oo = evas_object_image_filled_add(e); + evas_object_image_fill_set(oo, 0, 0, 1, 1); + evas_object_image_source_set(oo, it->base.obj); + edje_object_part_swallow(it->base.over, "e.swallow.content", oo); + evas_object_show(oo); + it->o_proxy = oo; + + if (it->border->iconic) + ngi_item_signal_emit((Ngi_Item*)it, "e,state,taskbar,iconic,on"); + if (it->urgent) + ngi_item_signal_emit((Ngi_Item*)it, "e,state,taskbar,urgent,on"); +} + +static void +_item_set_label(Ngi_Item_Taskbar *it) +{ + const char *title; + unsigned int max_len = 36; + + title = e_border_name_get(it->border); + + if ((!title) || (!title[0])) + title = D_("No name!"); + + if (strlen(title) > max_len) + { + char *abbv; + const char *left, *right; + + abbv = (char *)calloc(E_CLIENTLIST_MAX_CAPTION_LEN + 4, sizeof(char)); + left = title; + right = title + (strlen(title) - (max_len / 2)); + + strncpy(abbv, left, max_len / 2); + strncat(abbv, "...", 3); + strncat(abbv, right, max_len / 2); + + ngi_item_label_set((Ngi_Item*)it, abbv); + return; + } + + ngi_item_label_set((Ngi_Item*)it, title); +} + +/* ************************** ITEM CALLBACKS ************************** */ + +static void +_item_cb_mouse_down(Ngi_Item *item, Ecore_Event_Mouse_Button *ev) +{ + Ngi_Item_Taskbar *it = (Ngi_Item_Taskbar *) item; + Evas_Coord x, y, w, h; + E_Border *bd; + Ng *ng; + + ng = item->box->ng; + bd = it->border; + + if (ev->buttons == 3 && bd) + { + int dir = E_MENU_POP_DIRECTION_AUTO; + evas_object_geometry_get(item->obj, &x, &y, &w, &h); + + x += ng->win->popup->x + ng->zone->x; + y += ng->win->popup->y + ng->zone->y; + + switch(ng->cfg->orient) + { + case E_GADCON_ORIENT_TOP: + dir = E_MENU_POP_DIRECTION_DOWN; + y += h; + break; + + case E_GADCON_ORIENT_BOTTOM: + dir = E_MENU_POP_DIRECTION_UP; + break; + + case E_GADCON_ORIENT_LEFT: + dir = E_MENU_POP_DIRECTION_RIGHT; + x += w; + break; + + case E_GADCON_ORIENT_RIGHT: + dir = E_MENU_POP_DIRECTION_LEFT; + break; + } /* switch */ + ngi_border_menu_show(item->box, it->border, x, y, dir, ev->timestamp); + } + else if (ev->buttons == 1 && ev->double_click && !it->border->iconic) + { + e_border_iconify(it->border); + } + else + item->mouse_down = 1; +} + +static void +_item_cb_mouse_up(Ngi_Item *item, Ecore_Event_Mouse_Button *ev) +{ + Ngi_Item_Taskbar *it = (Ngi_Item_Taskbar *) item; + E_Border *bd = it->border; + + if (!item->mouse_down) + return; + + item->mouse_down = 0; + + if (it->urgent) + { + it->urgent = 0; + + ngi_item_signal_emit((Ngi_Item*)it, "e,state,taskbar,urgent,off"); + ngi_bar_lock(item->box->ng, 0); + } + + if (ev->buttons != 1) + return; + + if (bd->shaded) + e_border_unshade(bd, E_DIRECTION_UP); + + if (bd->shaded) + e_border_unshade(bd, E_DIRECTION_UP); + + if ((e_desk_current_get(bd->zone) != bd->desk) && (!bd->sticky)) + e_desk_show(bd->desk); + + if (bd->iconic) + { + e_border_uniconify(bd); + + if (it->border_was_fullscreen) + e_border_fullscreen(bd, (E_Fullscreen)e_config->fullscreen_policy); + + it->border_was_fullscreen = 0; + } + else + { + e_border_raise(bd); + } + if (bd->focused) + { + char buf[1024]; + E_Action *act = e_action_find("scale-windows"); + + if (!act) return; + if (!bd->client.icccm.class) return; + + snprintf(buf, 1024, "go_scale_class:%s", bd->client.icccm.class); + act->func.go(NULL, buf); + } + else + e_border_focus_set(bd, 1, 1); +} + + +static void +_item_cb_drag_del(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Ng *ng = data; + + ngi_bar_lock(ng, 0); + ngi_thaw(ng); +} + +static void +_item_cb_drag_start(Ngi_Item *item) +{ + Ngi_Item_Taskbar *it = (Ngi_Item_Taskbar *) item; + E_Drag *d; + Evas_Object *o; + Evas_Coord x, y, w, h, px, py; + Ng *ng = item->box->ng; + + if (!it->border) + return; + + edje_object_signal_emit(ng->o_label, "e,state,label,hide", "e"); + + evas_object_geometry_get(it->o_icon, &x, &y, &w, &h); + + if (!ngi_config->use_composite) + { + x -= ng->win->rect.x; + y -= ng->win->rect.y; + } + + const char *drag_types[] = { "enlightenment/border" }; + + d = e_drag_new(ng->zone->container, x, y, drag_types, 1, + it->border, -1, NULL, _item_cb_drag_end); + + o = _border_icon_add(it->border,e_drag_evas_get(d)); + e_object_ref(E_OBJECT(it->border)); + e_drag_object_set(d, o); + e_drag_resize(d, w, h); + evas_object_event_callback_add(o, EVAS_CALLBACK_DEL, _item_cb_drag_del, ng); + + ecore_x_pointer_xy_get(ng->win->input, &px, &py); + e_drag_start(d, px, py); + + ngi_bar_lock(ng, 1); +} + +static void +_item_cb_drag_end(E_Drag *drag, int dropped) +{ + E_Border *bd = (E_Border *)drag->data; + + if (dropped) + { + e_object_unref(E_OBJECT(bd)); + return; + } + + E_Desk *desk = e_desk_current_get(bd->zone); + int w = bd->zone->w; + int h = bd->zone->h; + + if (desk != bd->desk) + e_border_desk_set(bd, desk); + + if ((bd->w < w) && (bd->h < w)) + { + int dx = abs(drag->x - w/2); + int dy = abs(drag->y - h/2); + + if (sqrt(dx*dx + dy*dy) < w/8) + { + drag->x = w/2; + drag->y = h/2; + } + + int x = drag->x - bd->w/2; + + if (bd->w < w - 50) + { + if (x < 50) x = 50; + if (x + bd->w > w) x = w - bd->w - 50; + } + else x = bd->x; + + int y = drag->y - bd->h/2; + + if (bd->h < h - 50) + { + if (y < 50) y = 50; + if (y + bd->h > h) y = h - bd->h - 50; + } + else y = bd->y; + + e_border_move(bd, x, y); + } + + if (bd->iconic) + e_border_uniconify(bd); + else + e_border_raise(bd); + + if (bd->shaded) + e_border_unshade(bd, E_DIRECTION_UP); + + e_object_unref(E_OBJECT(bd)); +} + +static Eina_Bool +_cb_preview_hide(void *data) +{ + Ng *ng = data; + + ng->effect_timer = NULL; + + ecore_x_client_message32_send(e_manager_current_get()->root, + ECORE_X_ATOM_NET_WM_ICON_GEOMETRY, + SubstructureNotifyMask, + 0, 0, 0, 0, 0); + return EINA_FALSE; +} + +static void +_item_cb_mouse_in(Ngi_Item *item) +{ + Ngi_Item_Taskbar *it = (Ngi_Item_Taskbar *) item; + + Ng *ng = item->box->ng; + + if (ng->cfg->ecomorph_features) + { + if (ng->effect_timer) + ecore_timer_del(ng->effect_timer); + + ng->effect_timer = NULL; + + ecore_x_client_message32_send(e_manager_current_get()->root, + ECORE_X_ATOM_NET_WM_ICON_GEOMETRY, + SubstructureNotifyMask, + it->border->win, item->pos, + (double)ng->size * item->scale, + ng->cfg->orient,0); + } +} + +static void +_item_cb_mouse_out(Ngi_Item *it) +{ + Ng *ng = it->box->ng; + if (ng->cfg->ecomorph_features) + { + if (ng->effect_timer) + ecore_timer_del(ng->effect_timer); + + ng->effect_timer = ecore_timer_add(0.2, _cb_preview_hide, ng); + } +} +