.000075500017500000144000000000001254205245000112715ustar00gberusers00000000000000pk-update-icon-2/COPYING000064400017500000144000000432541254077353100152450ustar00gberusers00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. pk-update-icon-2/pkui-icon.h000064400017500000144000000034671254077402400162610ustar00gberusers00000000000000/* * (C) 2011 Guido Berhoerster * * Licensed under the GNU General Public License Version 2 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __PKUI_ICON_H #define __PKUI_ICON_H #include #include G_BEGIN_DECLS #define PKUI_TYPE_ICON (pkui_icon_get_type()) #define PKUI_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \ PKUI_TYPE_ICON, PkuiIcon)) #define PKUI_IS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ PKUI_TYPE_ICON)) #define PKUI_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \ PKUI_TYPE_ICON, PkuiIconClass)) #define PKUI_IS_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \ PKUI_TYPE_ICON)) #define PKUI_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \ PKUI_TYPE_ICON, PkuiIconClass)) typedef struct _PkuiIcon PkuiIcon; typedef struct _PkuiIconClass PkuiIconClass; typedef struct _PkuiIconPrivate PkuiIconPrivate; struct _PkuiIcon { GObject parent_instance; PkuiIconPrivate *priv; }; struct _PkuiIconClass { GObjectClass parent_class; }; GType pkui_icon_get_type(void); PkuiIcon *pkui_icon_new(guint, guint, const gchar *); G_END_DECLS #endif /* __PKUI_ICON_H */ pk-update-icon-2/pk-update-icon.desktop.in000064400017500000144000000003621254077353100210230ustar00gberusers00000000000000[Desktop Entry] _Name=PackageKit Update Applet _GenericName=Update Applet _Comment=PackageKit Update Applet Icon=system-software-update Exec=pk-update-icon Terminal=false Type=Application Categories=Utility;GTK;TrayIcon; NotShowIn=KDE;GNOME; pk-update-icon-2/main.c000064400017500000144000000064161254077402400152770ustar00gberusers00000000000000/* * Copyright (C) 2011 Guido Berhoerster * * Licensed under the GNU General Public License Version 2 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include #include #include #include "pkui-icon.h" int main(int argc, char **argv) { PkuiIcon *icon; UniqueApp *app = NULL; int exitval = 0; gboolean version = FALSE; gchar *update_viewer_command = NULL; gint startup_delay = 300; gint check_interval = 86400; GOptionContext *context; GError *error = NULL; const GOptionEntry options[] = { { "command", 'c', 0, G_OPTION_ARG_STRING, &update_viewer_command, N_("Command for starting the " "software update viewer"), "command" }, { "delay", 'd', 0, G_OPTION_ARG_INT, &startup_delay, N_("Set the delay in seconds before the first check for " "updates"), "delay" }, { "interval", 'i', 0, G_OPTION_ARG_INT, &check_interval, N_("Set the interval in seconds between checks for " "updates"), "interval" }, { "version", 'v', 0, G_OPTION_ARG_NONE, &version, N_("Print the version number and exit"), NULL }, { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, 0 } }; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); textdomain(PACKAGE); gtk_init(&argc, &argv); context = g_option_context_new(_("- display notifications about " "software updates")); g_option_context_add_main_entries(context, options, PACKAGE); g_option_context_parse(context, &argc, &argv, &error); g_option_context_free(context); if (error) { g_printerr("Error parsing command line options: %s\n", error->message); g_error_free(error); exitval = 1; goto out; } if (startup_delay < 0) { g_printerr("Error parsing command line options: delay must be " "greater or equal to zero\n"); exitval = 1; goto out; } if (check_interval < 0) { g_printerr("Error parsing command line options: interval must " "be greater or equal to zero\n"); exitval = 1; goto out; } if (version) { g_print("%s %s\n", PACKAGE, VERSION); goto out; } app = unique_app_new(APP_NAME, NULL); if (unique_app_is_running(app)) { g_printerr("Another instance of pk-update-icon is already " "running, exiting\n"); exitval = 1; goto out; } notify_init(PACKAGE); icon = pkui_icon_new(startup_delay, check_interval, update_viewer_command); gtk_main(); g_object_unref(icon); out: if (app != NULL) g_object_unref(app); if (notify_is_initted()) notify_uninit (); g_free(update_viewer_command); return (exitval); } pk-update-icon-2/README000064400017500000144000000101741254077353100150650ustar00gberusers00000000000000pk-update-icon ============== Description ----------- pk-update-icon displays notifications and an icon in the tray area of the panel when package updates are available. Build Instructions ------------------ pk-update-icon requires a POSIX:2004 compatible operating system, it has been tested to work on Linux distributions. The following tools and shared libraries are required to build pk-update-icon: - GNU make >= 3.81 - pkg-config - GNU gettext - GNU or BSD install - GLib version 2.30 or later - GTK+ version 2.24 or later - libunique - libnotify - PackageKit-glib2 Rebuilding the man pages additionally requires the xsltproc tool from libxml2. Before building pk-update-icon check the commented macros in the Makefile for any macros you may need to override depending on the used toolchain and operating system. By default, all files will be installed under the "/usr/local" directory, a different installation path prefix can be set via the `prefix` macro. In addition, a second path prefix can be specified via the `DESTDIR` macro which will be prepended to any path, incuding the `prefix` macro path prefix. In contrast to `prefix`, the path specified via the `DESTDIR` macro will only be prepended to paths during installation and not be used for constructing internal paths. The following instructions assume that `make` is GNU make, on some platforms it may be installed under a different name or a non-default path. In order to start the build process run `make all`. After a successful build, run `make install` to install the program, any associated data files and the documentation. Previously built binaries, object files, generated data files and documentation can be removed by running `make clean`, any additional, generated files which are not removed by the `clean` target can be removed by running `make clobber`. Contact ------- Please send any feedback, translations or bug reports via email to . Bug Reports ----------- When sending bug reports, please always mention the exact version of pk-update-icon with which the issue occurs as well as the version of the operating system you are using and make sure that you provide sufficient information to reproduce the issue and include any input, output, any error messages. In case of build issues, please also specify the implementations and versions of the tools and shared libraries used to build the program, in particular the compiler. In case of crashes, please generate a stack trace with a suitable debugger such as gdb, lldb, dbx, or debug after a crash has occurred either by examining the resulting core file or by running the program from the debugger and attach it to the bug report. In order to generate a meaningful stack trace the program as well as any dynamically linked libraries need to be built with debugging information, see the documentation of the used compiler for the required compiler flags. If any of the dynamically linked shared libraries do not contain debugging information, please either install debugging information for these libraries using mechanisms provided by your operating system or rebuild the libraries accordingly. Please refer to the documentation of the debugger for detailed instructions on generating backtraces. License ------- Except otherwise noted, all files are Copyright (C) 2014 Guido Berhoerster and distributed under the following license terms: Copyright (C) 2014 Guido Berhoerster Licensed under the GNU General Public License Version 2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. pk-update-icon-2/docbook-update-source-data.xsl000064400017500000144000000015111254077353100220350ustar00gberusers00000000000000 pk-update-icon-2/pkui-icon.c000064400017500000144000000311101254077405600162430ustar00gberusers00000000000000/* * (C) 2011 Guido Berhoerster * * Licensed under the GNU General Public License Version 2 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include "pkui-backend.h" #include "pkui-icon.h" G_DEFINE_TYPE(PkuiIcon, pkui_icon, G_TYPE_OBJECT) #ifndef UPDATE_VIEWER_COMMAND #define UPDATE_VIEWER_COMMAND "" #endif /* UPDATE_VIEWER_COMMAND */ #define PKUI_ICON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), \ PKUI_TYPE_ICON, PkuiIconPrivate)) struct _PkuiIconPrivate { PkuiBackend *backend; GtkStatusIcon *status_icon; GtkWidget *status_icon_popup_menu; NotifyNotification *notification; gchar *update_viewer_command; }; static GtkWidget* icon_popup_menu_create(PkuiIcon *self); static void icon_popup_menu_popup(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data); static void icon_activated(GtkStatusIcon *status_icon, gpointer user_data); static void hide_notification(PkuiIcon *self); static void backend_state_changed(PkuiBackend *backend, gpointer user_data); static void update_viewer_exited(GPid pid, gint status, gpointer user_data); static void pkui_icon_finalize(GObject *gobject) { PkuiIcon *self = PKUI_ICON(gobject); gtk_widget_destroy(self->priv->status_icon_popup_menu); g_object_unref(self->priv->status_icon_popup_menu); g_object_unref(self->priv->status_icon); if (self->priv->notification != NULL) { notify_notification_close(self->priv->notification, NULL); g_object_unref(self->priv->notification); } g_object_unref(self->priv->backend); g_free(self->priv->update_viewer_command); G_OBJECT_CLASS(pkui_icon_parent_class)->finalize(gobject); } static void pkui_icon_class_init(PkuiIconClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); gobject_class->finalize = pkui_icon_finalize; g_type_class_add_private(klass, sizeof (PkuiIconPrivate)); } static void pkui_icon_init(PkuiIcon *self) { self->priv = PKUI_ICON_GET_PRIVATE(self); gtk_window_set_default_icon_name("system-software-update"); self->priv->status_icon_popup_menu = icon_popup_menu_create(self); g_object_ref(self->priv->status_icon_popup_menu); g_object_ref_sink(GTK_OBJECT(self->priv->status_icon_popup_menu)); self->priv->status_icon = gtk_status_icon_new(); gtk_status_icon_set_title(self->priv->status_icon, _("Software Updates")); gtk_status_icon_set_visible(self->priv->status_icon, FALSE); g_signal_connect(G_OBJECT(self->priv->status_icon), "activate", G_CALLBACK(icon_activated), self); g_signal_connect(G_OBJECT(self->priv->status_icon), "popup-menu", G_CALLBACK(icon_popup_menu_popup), self); self->priv->notification = NULL; self->priv->backend = NULL; self->priv->update_viewer_command = NULL; } static void exec_update_viewer(PkuiIcon *self) { gchar **argv = NULL; GError *error = NULL; GPid pid; g_return_if_fail(PKUI_IS_BACKEND(self->priv->backend)); g_return_if_fail(self->priv->update_viewer_command != NULL); g_debug("executing command %s", self->priv->update_viewer_command); if (!g_shell_parse_argv(self->priv->update_viewer_command, NULL, &argv, &error)) { g_warning("Could not parse command: %s", error->message); g_error_free(error); return; } if (!g_spawn_async(NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH, NULL, NULL, &pid, &error)) { g_warning("Could not execute command: %s", error->message); g_error_free(error); return; } g_child_watch_add(pid, (GChildWatchFunc)update_viewer_exited, self); pkui_backend_set_inhibit_check(self->priv->backend, TRUE); hide_notification(self); } static void about_dialog_show(GtkMenuItem *item, gpointer user_data) { static const gchar *copyright = "Copyright \xc2\xa9 2011 Guido " "Berhoerster\nCopyright \xc2\xa9 2011 Pavol Rusnak\n"; static const gchar *authors[3] = { "Guido Berhoerster ", "Pavol Rusnak ", NULL }; static const gchar *documenters[2] = { "Guido Berhoerster ", NULL }; static const gchar *license = "Licensed under the GNU General Public License Version 2\n\n" "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.\n\n" "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.\n\n" "You should have received a copy of the GNU General Public License " "along with this program; if not, write to the Free Software " "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, " "MA 02110-1301 USA."; const gchar *translators = _("translators"); if (strcmp(translators, "translators") == 0) translators = NULL; gtk_show_about_dialog (NULL, "version", VERSION, "copyright", copyright, "authors", authors, "documenters", documenters, "translator-credits", translators, "license", license, "wrap-license", TRUE, NULL); } static void backend_check_now(GtkMenuItem *menu_item, gpointer user_data) { PkuiIcon *self = PKUI_ICON(user_data); g_return_if_fail(PKUI_IS_BACKEND(self->priv->backend)); pkui_backend_check_now(self->priv->backend); } static GtkWidget* icon_popup_menu_create(PkuiIcon *self) { GtkWidget *popup_menu = gtk_menu_new(); GtkWidget *item; GtkWidget *image; item = gtk_image_menu_item_new_with_mnemonic(_("_Check for Updates")); image = gtk_image_new_from_icon_name(GTK_STOCK_REFRESH, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); gtk_menu_shell_append(GTK_MENU_SHELL(popup_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(backend_check_now), self); item = gtk_image_menu_item_new_with_mnemonic(_("_About")); image = gtk_image_new_from_icon_name(GTK_STOCK_ABOUT, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); gtk_menu_shell_append(GTK_MENU_SHELL(popup_menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(about_dialog_show), self); gtk_widget_show_all(GTK_WIDGET(popup_menu)); return (popup_menu); } static void icon_popup_menu_popup(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data) { PkuiIcon *self = PKUI_ICON(user_data); gtk_menu_popup(GTK_MENU(self->priv->status_icon_popup_menu), NULL, NULL, NULL, NULL, button, activate_time); } static void notification_handle_action(NotifyNotification *notification, gchar *action, gpointer user_data) { PkuiIcon *self = PKUI_ICON(user_data); if (strcmp(action, "install-updates") == 0) { exec_update_viewer(self); } } static void update_notification(PkuiIcon *self, guint updates_normal, guint updates_important) { gchar *message; gchar *message_a; gchar *message_b; gchar *title = updates_important ? /* TRANSLATORS: This is a message without number mentioned */ ngettext("Important Software Update", "Important Software Updates", updates_important + updates_normal) : /* TRANSLATORS: This is a message without number mentioned */ ngettext("Software Update", "Software Updates", updates_important + updates_normal); gchar *icon = updates_important ? "software-update-urgent" : "software-update-available"; if (updates_important > 0) { if (updates_normal > 0) { message_a = g_strdup_printf( /* * TRANSLATORS: This sentence contains two plurals. * Texts related to these plurals are mixed. That is * why it is split in three parts. Fill first two parts * as you need, and use them as %s in the last one to * construct a sentence. Note that if the first form of * plural relates only to singular form, it is never * used, and dedicated shorter sentences are used. */ ngettext("There is %d software update available,", "There are %d software updates available,", updates_normal + updates_important), updates_normal + updates_important); /* * TRANSLATORS: This is the sentence part in the * middle, form of which is related to the first * number. If your language does not need it, simply * use it as space or so. */ message_b = ngettext("of it", "of them", updates_normal + updates_important); message = g_strdup_printf( /* * TRANSLATORS: This forms the sentence. If you need to * swap parts, use %3$s and %1$s etc. Plurals are * related to second number. */ ngettext("%s %d %s is important.", "%s %d %s are important.", updates_important), message_a, updates_important, message_b); g_free(message_a); } else { message = g_strdup_printf(ngettext("There is %d " "important software update available.", "There are %d important software updates " "available.", updates_important), updates_important); } } else { message = g_strdup_printf(ngettext("There is %d software " "update available.", "There are %d software updates available.", updates_normal), updates_normal); } gtk_status_icon_set_tooltip(self->priv->status_icon, message); gtk_status_icon_set_from_icon_name(self->priv->status_icon, icon); gtk_status_icon_set_visible(self->priv->status_icon, TRUE); if (self->priv->notification == NULL) { self->priv->notification = notify_notification_new(title, message, icon #if (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR < 7) , NULL #endif ); if (self->priv->update_viewer_command != NULL) { notify_notification_add_action(self->priv->notification, "install-updates", ngettext("Install Update", "Install Updates", updates_normal + updates_important), notification_handle_action, self, NULL); } } else notify_notification_update(self->priv->notification, title, message, icon); notify_notification_set_timeout(self->priv->notification, NOTIFY_EXPIRES_NEVER); notify_notification_set_urgency(self->priv->notification, updates_important ? NOTIFY_URGENCY_CRITICAL : NOTIFY_URGENCY_NORMAL); notify_notification_show(self->priv->notification, NULL); g_free(message); } static void hide_notification(PkuiIcon *self) { gtk_status_icon_set_visible(self->priv->status_icon, FALSE); notify_notification_close(self->priv->notification, NULL); } static void backend_state_changed(PkuiBackend *backend, gpointer user_data) { PkuiIcon *self = PKUI_ICON(user_data); guint updates_normal; guint updates_important; g_return_if_fail(PKUI_IS_BACKEND(backend)); updates_normal = pkui_backend_get_updates_normal(backend); updates_important = pkui_backend_get_updates_important(backend); if (updates_normal > 0 || updates_important > 0) update_notification(self, updates_normal, updates_important); else if (updates_normal + updates_important == 0) hide_notification(self); } static void update_viewer_exited(GPid pid, gint status, gpointer user_data) { PkuiIcon *self = PKUI_ICON(user_data); g_return_if_fail(PKUI_IS_BACKEND(self->priv->backend)); g_spawn_close_pid(pid); pkui_backend_check_now(self->priv->backend); pkui_backend_set_inhibit_check(self->priv->backend, FALSE); } static void icon_activated(GtkStatusIcon *status_icon, gpointer user_data) { PkuiIcon *self = PKUI_ICON(user_data); if (self->priv->update_viewer_command != NULL) { exec_update_viewer(self); } } PkuiIcon * pkui_icon_new(guint startup_delay, guint check_interval, const gchar *update_viewer_command) { PkuiIcon *icon = g_object_new(PKUI_TYPE_ICON, NULL); icon->priv->update_viewer_command = g_strdup((update_viewer_command != NULL) ? update_viewer_command : UPDATE_VIEWER_COMMAND); icon->priv->backend = pkui_backend_new(startup_delay, check_interval); g_signal_connect(icon->priv->backend, "state-changed", G_CALLBACK(backend_state_changed), icon); return (icon); } pk-update-icon-2/pkui-backend.c000064400017500000144000000265401254077401500167100ustar00gberusers00000000000000/* * (C) 2011 Guido Berhoerster * * Licensed under the GNU General Public License Version 2 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include "pkui-backend.h" G_DEFINE_TYPE(PkuiBackend, pkui_backend, G_TYPE_OBJECT) #define PKUI_BACKEND_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), \ PKUI_TYPE_BACKEND, PkuiBackendPrivate)) struct _PkuiBackendPrivate { PkuiBackend *backend; PkClient *pk_client; guint periodic_check_id; guint updates_normal; guint updates_important; guint previous_updates_normal; guint previous_updates_important; guint startup_delay; guint check_interval; gint64 last_check; gboolean inhibit_check; }; enum { PROP_0, PROP_UPDATES_NORMAL, PROP_UPDATES_IMPORTANT, PROP_STARTUP_DELAY, PROP_CHECK_INTERVAL, PROP_INHIBIT_CHECK }; enum { STATE_CHANGED_SIGNAL, LAST_SIGNAL }; static guint pkui_backend_signals[LAST_SIGNAL] = { 0 }; static gboolean periodic_check(gpointer data); static void pkui_backend_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { PkuiBackend *self = PKUI_BACKEND(object); gboolean inhibit_check; gint64 time_to_check; switch (property_id) { case PROP_STARTUP_DELAY: self->priv->startup_delay = g_value_get_uint(value); if (self->priv->periodic_check_id != 0) { g_source_remove(self->priv->periodic_check_id); } self->priv->periodic_check_id = g_timeout_add_seconds(self->priv->startup_delay, (GSourceFunc)periodic_check, self); break; case PROP_CHECK_INTERVAL: self->priv->check_interval = g_value_get_uint(value); /* * reschedule only if the first run has been completed and * checks are currently not inibited, otherwise the new * interval will be picked up anyway */ if (!self->priv->inhibit_check && self->priv->last_check > 0) { time_to_check = g_get_real_time() - self->priv->last_check; if (time_to_check <= 0) pkui_backend_check_now(self); else { if (self->priv->periodic_check_id != 0) { g_source_remove(self->priv->periodic_check_id); } self->priv->periodic_check_id = g_timeout_add_seconds(time_to_check, periodic_check, self); } } break; case PROP_INHIBIT_CHECK: inhibit_check = g_value_get_boolean(value); /* * when changing self->priv->inhibit_check from FALSE to TRUE * and the first run has been completed remove the periodic * check, when changing from TRUE to FALSE either trigger a run * immediately when more time than self->priv->check_interval * has passed or just reschedule the next check */ if (!self->priv->inhibit_check && inhibit_check && self->priv->periodic_check_id != 0) { g_source_remove(self->priv->periodic_check_id); self->priv->periodic_check_id = 0; } else if (self->priv->inhibit_check && !inhibit_check) { self->priv->periodic_check_id = g_timeout_add_seconds(self->priv->check_interval, (GSourceFunc)periodic_check, self); } self->priv->inhibit_check = inhibit_check; break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void pkui_backend_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { PkuiBackend *self = PKUI_BACKEND(object); switch (property_id) { case PROP_UPDATES_NORMAL: g_value_set_uint(value, self->priv->updates_normal); break; case PROP_UPDATES_IMPORTANT: g_value_set_uint(value, self->priv->updates_important); break; case PROP_STARTUP_DELAY: g_value_set_uint(value, self->priv->startup_delay); break; case PROP_CHECK_INTERVAL: g_value_set_uint(value, self->priv->check_interval); break; case PROP_INHIBIT_CHECK: g_value_set_boolean(value, self->priv->inhibit_check); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; } } static void pkui_backend_finalize(GObject *gobject) { PkuiBackend *self = PKUI_BACKEND(gobject); if (self->priv->pk_client != NULL) g_object_unref(self->priv->pk_client); G_OBJECT_CLASS(pkui_backend_parent_class)->finalize(gobject); } static void pkui_backend_class_init(PkuiBackendClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); GParamSpec *pspec; gobject_class->set_property = pkui_backend_set_property; gobject_class->get_property = pkui_backend_get_property; gobject_class->finalize = pkui_backend_finalize; pspec = g_param_spec_uint("updates-normal", "Normal updates", "Number of normal package updates", 0, G_MAXUINT, 0, G_PARAM_READABLE); g_object_class_install_property(gobject_class, PROP_UPDATES_NORMAL, pspec); pspec = g_param_spec_uint("updates-important", "Important updates", "Number of important package updates", 0, G_MAXUINT, 0, G_PARAM_READABLE); g_object_class_install_property(gobject_class, PROP_UPDATES_IMPORTANT, pspec); pspec = g_param_spec_uint("startup-delay", "Startup delay", "Initial delay in seconds before the first check for new package " "updates", 0, G_MAXUINT, 300, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property(gobject_class, PROP_STARTUP_DELAY, pspec); pspec = g_param_spec_uint("check-interval", "Check interval", "Interval in seconds for checking for new package updates", 1, G_MAXUINT, 86400, G_PARAM_READWRITE | G_PARAM_CONSTRUCT); g_object_class_install_property(gobject_class, PROP_CHECK_INTERVAL, pspec); pspec = g_param_spec_boolean("inhibit-check", "Inhibit check", "Whether to inhibit checks for new package updates", FALSE, G_PARAM_READWRITE); g_object_class_install_property(gobject_class, PROP_INHIBIT_CHECK, pspec); pkui_backend_signals[STATE_CHANGED_SIGNAL] = g_signal_newv("state-changed", G_TYPE_FROM_CLASS(gobject_class), G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, NULL, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, NULL); g_type_class_add_private(klass, sizeof (PkuiBackendPrivate)); } static void pkui_backend_init(PkuiBackend *self) { self->priv = PKUI_BACKEND_GET_PRIVATE(self); self->priv->pk_client = pk_client_new(); self->priv->updates_normal = 0; self->priv->updates_important = 0; self->priv->periodic_check_id = g_timeout_add_seconds(self->priv->startup_delay, (GSourceFunc)periodic_check, self); self->priv->last_check = 0; } static gboolean periodic_check(gpointer data) { PkuiBackend *self = PKUI_BACKEND(data); pkui_backend_check_now(self); /* rescheduling happens after results are available */ self->priv->periodic_check_id = 0; return (FALSE); } static void process_pk_package_info(PkPackage *pkg, gpointer *user_data) { PkuiBackend *self = PKUI_BACKEND(user_data); PkInfoEnum type_info = pk_package_get_info(pkg); switch (type_info) { case PK_INFO_ENUM_LOW: case PK_INFO_ENUM_ENHANCEMENT: case PK_INFO_ENUM_NORMAL: self->priv->updates_normal++; break; case PK_INFO_ENUM_BUGFIX: case PK_INFO_ENUM_IMPORTANT: case PK_INFO_ENUM_SECURITY: self->priv->updates_important++; break; default: break; } } static void get_updates_finished(GObject *object, GAsyncResult *res, gpointer user_data) { PkClient *client = PK_CLIENT(object); PkuiBackend *self = PKUI_BACKEND(user_data); PkResults *results = NULL; GError *error = NULL; GPtrArray *list = NULL; g_debug("PackageKit finished checking for updates"); results = pk_client_generic_finish(PK_CLIENT(client), res, &error); if (results == NULL) { g_warning("error: %s\n", error->message); g_error_free(error); goto out; } list = pk_results_get_package_array(results); if (list == NULL) goto out; self->priv->previous_updates_normal = self->priv->updates_normal; self->priv->previous_updates_important = self->priv->updates_important; self->priv->updates_normal = 0; self->priv->updates_important = 0; g_ptr_array_foreach(list, (GFunc)process_pk_package_info, self); if (self->priv->updates_normal != self->priv->previous_updates_normal || self->priv->updates_important != self->priv->previous_updates_important) { g_debug("normal updates: %d, important updates: %d", self->priv->updates_normal, self->priv->updates_important); g_debug("emit state-changed"); g_signal_emit(self, pkui_backend_signals[STATE_CHANGED_SIGNAL], 0); } out: if (results != NULL) g_object_unref(results); if (list != NULL) g_ptr_array_unref(list); self->priv->last_check = g_get_real_time(); if (!self->priv->inhibit_check) { if (self->priv->periodic_check_id != 0) { g_source_remove(self->priv->periodic_check_id); } self->priv->periodic_check_id = g_timeout_add_seconds(self->priv->check_interval, (GSourceFunc)periodic_check, self); } } PkuiBackend * pkui_backend_new(guint startup_delay, guint check_interval) { g_return_val_if_fail(check_interval > 0, NULL); return (g_object_new(PKUI_TYPE_BACKEND, "startup-delay", startup_delay, "check-interval", check_interval, NULL)); } guint pkui_backend_get_updates_normal(PkuiBackend *self) { guint updates_normal; g_return_val_if_fail(PKUI_IS_BACKEND(self), 0); g_object_get(G_OBJECT(self), "updates-normal", &updates_normal, NULL); return (updates_normal); } guint pkui_backend_get_updates_important(PkuiBackend *self) { guint updates_important; g_return_val_if_fail(PKUI_IS_BACKEND(self), 0); g_object_get(G_OBJECT(self), "updates-important", &updates_important, NULL); return (updates_important); } void pkui_backend_set_inhibit_check(PkuiBackend *self, gboolean inhibit_check) { g_return_if_fail(PKUI_IS_BACKEND(self)); g_object_set(G_OBJECT(self), "inhibit-check", inhibit_check, NULL); } gboolean pkui_backend_get_inhibit_check(PkuiBackend *self) { gboolean inhibit_check; g_return_val_if_fail(PKUI_IS_BACKEND(self), FALSE); g_object_get(G_OBJECT(self), "inhibit-check", &inhibit_check, NULL); return (inhibit_check); } guint pkui_backend_get_startup_interval(PkuiBackend *self) { guint startup_interval; g_return_val_if_fail(PKUI_IS_BACKEND(self), 0); g_object_get(G_OBJECT(self), "startup-interval", &startup_interval, NULL); return (startup_interval); } void pkui_backend_set_check_interval(PkuiBackend *self, guint check_interval) { g_return_if_fail(PKUI_IS_BACKEND(self)); g_object_set(G_OBJECT(self), "check-interval", check_interval, NULL); } guint pkui_backend_get_check_interval(PkuiBackend *self) { guint check_interval; g_return_val_if_fail(PKUI_IS_BACKEND(self), 0); g_object_get(G_OBJECT(self), "check-interval", &check_interval, NULL); return (check_interval); } void pkui_backend_check_now(PkuiBackend *self) { g_return_if_fail(PKUI_IS_BACKEND(self)); g_debug("querying PackageKit for updates"); pk_client_get_updates_async(self->priv->pk_client, pk_bitfield_value(PK_FILTER_ENUM_NONE), NULL, NULL, NULL, get_updates_finished, self); } pk-update-icon-2/deps.sed000064400017500000144000000012451254077353100156340ustar00gberusers00000000000000/^[^:]\{1,\}:.*\\$/{ h s/\([^:]\{1,\}:\).*/\1/ x s/[^:]\{1,\}:// } /\\$/,/^$/bgen /\\$/,/[^\\]$/{ :gen s/[[:blank:]]*\\$// s/^[[:blank:]]*// G s/\(.*\)\n\(.*\)/\2 \1/ } /^[^:]\{1,\}:[[:blank:]]*$/d /^[^:]\{1,\}\.o:/{ s/[[:blank:]]*[^[:blank:]]\{1,\}\.[cC][[:blank:]]*/ /g s/[[:blank:]]*[^[:blank:]]\{1,\}\.[cC]$//g s/[[:blank:]]*[^[:blank:]]\{1,\}\.cc[[:blank:]]*/ /g s/[[:blank:]]*[^[:blank:]]\{1,\}\.cc$//g s/[[:blank:]]*[^[:blank:]]\{1,\}\.cpp[[:blank:]]*/ /g s/[[:blank:]]*[^[:blank:]]\{1,\}\.cpp$//g /^[^:]\{1,\}:[[:blank:]]*$/d s/^\([^:]\{1,\}\)\.o[[:blank:]]*:[[:blank:]]*\(.*\)/\1.d: $(wildcard \2)\ &/ } pk-update-icon-2/NEWS000064400017500000144000000042401254101732600146730ustar00gberusers00000000000000News ==== pk-update-icon 2 (2015-06-19T13:08:33+02:00) -------------------------------------------- - Update German and Indonesian translations - Update and improve Czech translation - Avoid passing more arguments to g_strdup_printf() than specified in the format - Document configuration default values - Make the update viewer command configurable - Prevent calling g_source_remove() on an invalid source ID - Improve README file - Add NEWS file pk-update-icon 1 (2014-02-07T22:05:17+01:00) -------------------------------------------- - Add missing function prototypes - Stylistic fixes - Add README file with build instructions and author information - Convert the manpage to DocBook V5.0 - Use pax to generate tarballs - Fix automatic dependency generation and improve portability pk-update-icon 0.2.2 (2012-07-18T11:54:03+02:00) ------------------------------------------------ - increase the default update interval and delay before checking for updates pk-update-icon 0.2.1 (2011-11-15T13:03:17+01:00) ------------------------------------------------ - hide the autostart file in KDE and GNOME rather than explicitly showing it in Xfce and LXDE only - increase default startup-delay to 5 min (bnc#729230) - fix some typos - use the VERSION macro in the about dialog pk-update-icon 0.2 (2011-10-22T10:20:02+02:00) ---------------------------------------------- - add dist target to Makefile - add french translation - added slovak and czech translations - added a button for installing updates to the notification - add an about dialog - added Indonesian translations - add CLI, make delay and interval configurable - add clobber target - GObject-based rewrite - fix the locale path - add license header to main.h - add compatibility with libnotify version < 0.7 - add a man page - use libunique to ensure that only a single instance of pk-update-icon can be run - add internationalization support - allow overriding CFLAGS - fix desktop file and arguments order in Makefile - use libnotify's pkgconfig for buildflags - use GTK2 as Xfce/LXDE are not yet using GTK3 - code rework, show notify window just once - added GPLv2 headers - change icon and tooltip of the tray icon - initial commit pk-update-icon-2/pkui-backend.h000064400017500000144000000046631254077353100167210ustar00gberusers00000000000000/* * (C) 2011 Guido Berhoerster * * Licensed under the GNU General Public License Version 2 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __PKUI_BACKEND_H #define __PKUI_BACKEND_H #include #include G_BEGIN_DECLS #define PKUI_TYPE_BACKEND (pkui_backend_get_type()) #define PKUI_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \ PKUI_TYPE_BACKEND, PkuiBackend)) #define PKUI_IS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ PKUI_TYPE_BACKEND)) #define PKUI_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \ PKUI_TYPE_BACKEND, PkuiBackendClass)) #define PKUI_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \ PKUI_TYPE_BACKEND)) #define PKUI_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \ PKUI_TYPE_BACKEND, PkuiBackendClass)) typedef struct _PkuiBackend PkuiBackend; typedef struct _PkuiBackendClass PkuiBackendClass; typedef struct _PkuiBackendPrivate PkuiBackendPrivate; struct _PkuiBackend { GObject parent_instance; PkuiBackendPrivate *priv; }; struct _PkuiBackendClass { GObjectClass parent_class; }; GType pkui_backend_get_type(void); PkuiBackend *pkui_backend_new(guint startup_delay, guint interval); guint pkui_backend_get_updates_normal(PkuiBackend *self); guint pkui_backend_get_updates_important(PkuiBackend *self); void pkui_backend_set_inhibit_check(PkuiBackend *self, gboolean inhibit_check); gboolean pkui_backend_get_inhibit_check(PkuiBackend *self); void pkui_backend_set_check_interval(PkuiBackend *self, guint check_interval); guint pkui_backend_get_check_interval(PkuiBackend *self); guint pkui_backend_get_startup_interval(PkuiBackend *self); void pkui_backend_check_now(PkuiBackend *self); G_END_DECLS #endif /* __PKUI_BACKEND_H */ pk-update-icon-2/pk-update-icon.1.xml000064400017500000144000000127221254077405400177100ustar00gberusers00000000000000 Guido Berhoerster gber@opensuse.org 18 Juni, 2015 pk-update-icon 1 User Commands pk-update-icon display notifications about software updates pk-update-icon command command delay delay interval interval Description pk-update-icon displays notifications and an icon in the tray area of the panel when package updates are available. Options The following options are supported: command command Specify the command for starting the software update viewer. delay delay Set the delay in seconds before the first check for updates. The default is five minutes. Print a summary of all command line options and exit. interval interval Set the interval in seconds between checks for updates. The default is one day. Print the version number and exit. Exit Status The following exit values are returned: 0 Command successfully executed. > 0 An error has occured. pk-update-icon-2/Makefile000064400017500000144000000102641254101710400156310ustar00gberusers00000000000000# # Copyright (C) 2014 Guido Berhoerster # # Licensed under the GNU General Public License Version 2 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # PACKAGE = pk-update-icon APP_NAME = org.opensuse.pk-update-icon VERSION = 2 DISTNAME := $(PACKAGE)-$(VERSION) # gcc, clang, icc MAKEDEPEND.c = $(CC) -MM $(CFLAGS) $(CPPFLAGS) # Sun/Solaris Studio #MAKEDEPEND.c = $(CC) -xM1 $(CFLAGS) $(CPPFLAGS) # X makedepend #MAKEDEPEND.c = makedepend -f- -Y -- $(CFLAGS) $(CPPFLAGS) -- INSTALL := install INSTALL.exec := $(INSTALL) -D -m 0755 INSTALL.data := $(INSTALL) -D -m 0644 PAX := pax GZIP := gzip SED := sed MSGFMT := msgfmt INTLTOOL_UPDATE := intltool-update INTLTOOL_MERGE := intltool-merge XSLTPROC := xsltproc DOCBOOK5_MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl UPDATE_VIEWER_COMMAND = /usr/bin/gpk-update-viewer define generate-manpage-rule = %.$(1): %.$(1).xml $$(XSLTPROC) \ --xinclude \ --stringparam package $$(PACKAGE) \ --stringparam version $$(VERSION)\ docbook-update-source-data.xsl $$< | \ $$(XSLTPROC) \ --xinclude \ $$(DOCBOOK5_MANPAGES_FLAGS) \ --output $$@ \ $$(DOCBOOK5_MANPAGES_STYLESHEET) \ - endef DESTDIR ?= prefix ?= /usr/local bindir ?= $(prefix)/bin datadir ?= $(prefix)/share mandir ?= $(datadir)/man localedir ?= $(datadir)/locale sysconfdir ?= /etc xdgautostartdir ?= $(sysconfdir)/xdg/autostart OBJS = main.o pkui-icon.o pkui-backend.o MANPAGES = $(PACKAGE).1 AUTOSTART_FILE = $(PACKAGE).desktop MOFILES := $(patsubst %.po,%.mo,$(wildcard po/*.po)) POTFILE = po/$(PACKAGE).pot CPPFLAGS := $(shell pkg-config --cflags gtk+-2.0 unique-1.0 libnotify packagekit-glib2) \ -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \ -DPACKAGE="\"$(PACKAGE)\"" \ -DAPP_NAME=\"$(APP_NAME)\" \ -DVERSION=\"$(VERSION)\" \ -DLOCALEDIR="\"$(localedir)\"" \ -DUPDATE_VIEWER_COMMAND="\"$(UPDATE_VIEWER_COMMAND)\"" LDLIBS := $(shell pkg-config --libs gtk+-2.0 unique-1.0 libnotify packagekit-glib2) DOCBOOK5_MANPAGES_FLAGS = --stringparam man.authors.section.enabled 0 \ --stringparam man.copyright.section.enabled 0 .DEFAULT_TARGET = all .PHONY: all clean clobber dist install all: $(PACKAGE) $(MANPAGES) $(MOFILES) $(AUTOSTART_FILE) $(PACKAGE): $(OBJS) $(LINK.o) $^ $(LDLIBS) -o $@ $(POTFILE): po/POTFILES.in cd po/ && $(INTLTOOL_UPDATE) --pot --gettext-package="$(PACKAGE)" pot: $(POTFILE) update-po: $(POTFILE) cd po/ && for lang in $(patsubst po/%.mo,%,$(MOFILES)); do \ $(INTLTOOL_UPDATE) --dist --gettext-package="$(PACKAGE)" \ $${lang}; \ done %.o: %.c $(MAKEDEPEND.c) $< | $(SED) -f deps.sed >$*.d $(COMPILE.c) -o $@ $< $(foreach section,1 2 3 4 5 6 7 8 9,$(eval $(call generate-manpage-rule,$(section)))) %.desktop: %.desktop.in $(MOFILES) $(INTLTOOL_MERGE) --desktop-style --utf8 po $< $@ %.mo: %.po $(MSGFMT) -o $@ $< install: $(INSTALL.exec) $(PACKAGE) $(DESTDIR)$(bindir)/$(PACKAGE) $(INSTALL.data) $(AUTOSTART_FILE) \ $(DESTDIR)$(xdgautostartdir)/$(AUTOSTART_FILE) for lang in $(patsubst po/%.mo,%,$(MOFILES)); do \ $(INSTALL.data) po/$${lang}.mo \ $(DESTDIR)$(localedir)/$${lang}/LC_MESSAGES/$(PACKAGE).mo; \ done $(INSTALL.data) $(PACKAGE).1 \ $(DESTDIR)$(mandir)/man1/$(PACKAGE).1 clean: rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(MANPAGES) $(AUTOSTART_FILE) clobber: clean rm -f $(patsubst %.o,%.d,$(OBJS)) dist: clobber $(PAX) -w -x ustar -s ',.*/\..*,,' -s ',./[^/]*\.tar\.gz,,' \ -s ',\./,$(DISTNAME)/,' . | $(GZIP) > $(DISTNAME).tar.gz -include $(patsubst %.o,%.d,$(OBJS)) pk-update-icon-2/po000075500017500000144000000000001254101710400145255ustar00gberusers00000000000000pk-update-icon-2/po/de.po000064400017500000144000000103321254101710400155330ustar00gberusers00000000000000# pk-update-icon # Copyright (C) 2011 Pavol Rusnak, Guido Berhoerster # This file is distributed under the same license as the pk-update-icon package. # Guido Berhoerster , 2015. # msgid "" msgstr "" "Project-Id-Version: pk-update-icon 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-06-18 22:51:12+0200\n" "PO-Revision-Date: 2015-06-19 09:09+0200\n" "Last-Translator: Guido Berhoerster \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" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../main.c:42 msgid "Command for starting the software update viewer" msgstr "Befehl zum Starten des Software-Aktualisierungs-Betrachters" #: ../main.c:45 msgid "Set the delay in seconds before the first check for updates" msgstr "" "Bestimme die Verzögerung in Sekunden vor dem ersten Überprüfen auf " "Aktualisierungen" #: ../main.c:48 msgid "Set the interval in seconds between checks for updates" msgstr "" "Bestimme das Intervall in Sekunden zwischen dem Überprüfen auf " "Aktualisierungen" #: ../main.c:51 msgid "Print the version number and exit" msgstr "Zeige die Versionsnummer und breche ab" #: ../main.c:63 msgid "- display notifications about software updates" msgstr "- zeige Benachrichtigungen über Softwareaktualisierungen" #: ../pkui-icon.c:94 msgid "Software Updates" msgstr "Softwareaktualisierungen" #: ../pkui-icon.c:168 msgid "translators" msgstr "Guido Berhörster " #: ../pkui-icon.c:196 msgid "_Check for Updates" msgstr "Nach Aktualisierungen _Suchen" #: ../pkui-icon.c:204 msgid "_About" msgstr "_Info" #. TRANSLATORS: This is a message without number mentioned #: ../pkui-icon.c:247 msgid "Important Software Update" msgid_plural "Important Software Updates" msgstr[0] "Wichtige Aktualisierung" msgstr[1] "Wichtige Aktualisierungen" #. TRANSLATORS: This is a message without number mentioned #: ../pkui-icon.c:250 msgid "Software Update" msgid_plural "Software Updates" msgstr[0] "Softwareaktualisierung" msgstr[1] "Softwareaktualisierungen" #. #. * TRANSLATORS: This sentence contains two plurals. #. * Texts related to these plurals are mixed. That is #. * why it is split in three parts. Fill first two parts #. * as you need, and use them as %s in the last one to #. * construct a sentence. Note that if the first form of #. * plural relates only to singular form, it is never #. * used, and dedicated shorter sentences are used. #: ../pkui-icon.c:266 #, c-format msgid "There is %d software update available," msgid_plural "There are %d software updates available," msgstr[0] "Es ist %d Softwareaktualisierung verfügbar," msgstr[1] "Es sind %d Softwareaktualisierungen verfügbar," #. #. * TRANSLATORS: This is the sentence part in the #. * middle, form of which is related to the first #. * number. If your language does not need it, simply #. * use it as space or so. #: ../pkui-icon.c:275 msgid "of it" msgid_plural "of them" msgstr[0] "davon" msgstr[1] "davon" #. #. * TRANSLATORS: This forms the sentence. If you need to #. * swap parts, use %3$s and %1$s etc. Plurals are #. * related to second number. #: ../pkui-icon.c:282 #, c-format msgid "%s %d %s is important." msgid_plural "%s %d %s are important." msgstr[0] "%1$s %3$s ist %2$d wichtig." msgstr[1] "%1$s %3$s sind %2$d wichtig." #: ../pkui-icon.c:287 #, c-format msgid "There is %d important software update available." msgid_plural "There are %d important software updates available." msgstr[0] "Es ist %d wichtige Softwareaktualisierung verfügbar." msgstr[1] "Es sind %d wichtige Softwareaktualisierungen verfügbar." #: ../pkui-icon.c:294 #, c-format msgid "There is %d software update available." msgid_plural "There are %d software updates available." msgstr[0] "Es ist %d Softwareaktualisierung verfügbar." msgstr[1] "Es sind %d Softwareaktualisierungen verfügbar." #: ../pkui-icon.c:313 msgid "Install Update" msgid_plural "Install Updates" msgstr[0] "Aktualisierung Installieren" msgstr[1] "Aktualisierungen Installieren" #: ../pk-update-icon.desktop.in.h:1 msgid "PackageKit Update Applet" msgstr "PackageKit Aktualisierungsapplet" #: ../pk-update-icon.desktop.in.h:2 msgid "Update Applet" msgstr "Aktualisierungsapplet" pk-update-icon-2/po/sk.po000064400017500000144000000115251254077405600156040ustar00gberusers00000000000000# pk-update-icon # Copyright (C) 2011 Pavol Rusnak, Guido Berhoerster # This file is distributed under the same license as the pk-update-icon package. # Pavol Rusnak , 2011. # msgid "" msgstr "" "Project-Id-Version: pk-update-icon 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-06-18 22:51:12+0200\n" "PO-Revision-Date: 2011-10-10 19:21+0200\n" "Last-Translator: Pavol Rusnak \n" "Language-Team: Slovak\n" "Language: slovak\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n" #: ../main.c:42 msgid "Command for starting the software update viewer" msgstr "" #: ../main.c:45 msgid "Set the delay in seconds before the first check for updates" msgstr "Nastaviť pauzu v sekundách pred prvou kontrolou aktualizácií" #: ../main.c:48 msgid "Set the interval in seconds between checks for updates" msgstr "Nastaviť interval v sekundách medzi kontrolami aktualizácií" #: ../main.c:51 msgid "Print the version number and exit" msgstr "Vypíše verziu a skončí" #: ../main.c:63 msgid "- display notifications about software updates" msgstr "- zobraziť notifikácie o softvérových aktualizáciách" #: ../pkui-icon.c:94 msgid "Software Updates" msgstr "Softvérové aktualizácie" #: ../pkui-icon.c:168 msgid "translators" msgstr "Pavol Rusnak " #: ../pkui-icon.c:196 msgid "_Check for Updates" msgstr "_Skontrolovať aktualizácie" #: ../pkui-icon.c:204 msgid "_About" msgstr "_O programe" #. TRANSLATORS: This is a message without number mentioned #: ../pkui-icon.c:247 msgid "Important Software Update" msgid_plural "Important Software Updates" msgstr[0] "Dôležitých aktualizácií" msgstr[1] "Dôležitá aktualizácia" msgstr[2] "Dôležité aktualizácie" #. TRANSLATORS: This is a message without number mentioned #: ../pkui-icon.c:250 msgid "Software Update" msgid_plural "Software Updates" msgstr[0] "Softvérových aktualizácií" msgstr[1] "Softvérová aktualizácia" msgstr[2] "Softvérové aktualizácie" #. #. * TRANSLATORS: This sentence contains two plurals. #. * Texts related to these plurals are mixed. That is #. * why it is split in three parts. Fill first two parts #. * as you need, and use them as %s in the last one to #. * construct a sentence. Note that if the first form of #. * plural relates only to singular form, it is never #. * used, and dedicated shorter sentences are used. #: ../pkui-icon.c:266 #, fuzzy, c-format msgid "There is %d software update available," msgid_plural "There are %d software updates available," msgstr[0] "Je k dispozícii %d softvérových aktualizácií." msgstr[1] "Je k dispozícii %d softvérová aktualizácia." msgstr[2] "Sú k dispozícii %d softvérové aktualizácie." #. #. * TRANSLATORS: This is the sentence part in the #. * middle, form of which is related to the first #. * number. If your language does not need it, simply #. * use it as space or so. #: ../pkui-icon.c:275 msgid "of it" msgid_plural "of them" msgstr[0] "" msgstr[1] "" msgstr[2] "" #. #. * TRANSLATORS: This forms the sentence. If you need to #. * swap parts, use %3$s and %1$s etc. Plurals are #. * related to second number. #: ../pkui-icon.c:282 #, c-format msgid "%s %d %s is important." msgid_plural "%s %d %s are important." msgstr[0] "" msgstr[1] "" msgstr[2] "" #: ../pkui-icon.c:287 #, fuzzy, c-format msgid "There is %d important software update available." msgid_plural "There are %d important software updates available." msgstr[0] "Je k dispozícii %d dôležitých aktualizácií." msgstr[1] "Je k dispozícii %d dôležitá aktualizácia." msgstr[2] "Sú k dispozícii %d dôležité aktualizácie." #: ../pkui-icon.c:294 #, fuzzy, c-format msgid "There is %d software update available." msgid_plural "There are %d software updates available." msgstr[0] "Je k dispozícii %d softvérových aktualizácií." msgstr[1] "Je k dispozícii %d softvérová aktualizácia." msgstr[2] "Sú k dispozícii %d softvérové aktualizácie." #: ../pkui-icon.c:313 msgid "Install Update" msgid_plural "Install Updates" msgstr[0] "Inštalovať aktualizácie" msgstr[1] "Inštalovať aktualizáciu" msgstr[2] "Inštalovať aktualizácie" #: ../pk-update-icon.desktop.in.h:1 msgid "PackageKit Update Applet" msgstr "PackageKit Aktualizačný Applet" #: ../pk-update-icon.desktop.in.h:2 msgid "Update Applet" msgstr "Aktualizačný Applet" #~ msgid "There are %d software updates available, %d of them is important." #~ msgid_plural "" #~ "There are %d software updates available, %d of them are important." #~ msgstr[0] "" #~ "Je k dispozícii %d softvérových aktualizácií, z toho %d je dôležitých." #~ msgstr[1] "" #~ "Je k dispozícii %d softvérových aktualizácií, z toho %d je dôležitá." #~ msgstr[2] "" #~ "Je k dispozícii %d softvérových aktualizácií, z toho %d sú dôležité." pk-update-icon-2/po/id.po000064400017500000144000000105011254101710400155350ustar00gberusers00000000000000# Indonesian translations for pk-update-icon package # Terjemahan bahasa inggris untuk paket pk-update-icon. # Copyright (C) 2011 Guido Berhoerster # This file is distributed under the same license as the pk-update-icon package. # Guido Berhoerster , 2015. # msgid "" msgstr "" "Project-Id-Version: pk-update-icon 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-06-18 22:51:12+0200\n" "PO-Revision-Date: 2015-06-19 09:12+0200\n" "Last-Translator: Guido Berhoerster \n" "Language-Team: Indonesian\n" "Language: id\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../main.c:42 msgid "Command for starting the software update viewer" msgstr "Perintah untuk manjalankan Penampil Perangkat Lunak Pembaharuan-Pembaharuan" #: ../main.c:45 msgid "Set the delay in seconds before the first check for updates" msgstr "" "Aturlah penundaan dalam beberapa detik sebelum pemeriksaan pertama untuk " "Pembaharuan-Pembaharuan" #: ../main.c:48 msgid "Set the interval in seconds between checks for updates" msgstr "" "Aturlah Interval dalam beberapa detik diatara Pemeriksaan untuk Pembaharuan-" "Pembaharuan" #: ../main.c:51 msgid "Print the version number and exit" msgstr "Cetak Versi Angka dan Keluar" #: ../main.c:63 msgid "- display notifications about software updates" msgstr "" #: ../pkui-icon.c:94 msgid "Software Updates" msgstr "Perangkat Lunak Pembaharuan-Pembaharuan" #: ../pkui-icon.c:168 msgid "translators" msgstr "Guido Berhörster " #: ../pkui-icon.c:196 msgid "_Check for Updates" msgstr "Pemeriksaan untuk Pembaharuan-Pembaharuan" #: ../pkui-icon.c:204 msgid "_About" msgstr "Tent_ang" #. TRANSLATORS: This is a message without number mentioned #: ../pkui-icon.c:247 msgid "Important Software Update" msgid_plural "Important Software Updates" msgstr[0] "Perangkat Lunak Pembaharuan yang penting" msgstr[1] "Perangkat Lunak Pembaharuan-Pembaharuan yang penting" #. TRANSLATORS: This is a message without number mentioned #: ../pkui-icon.c:250 msgid "Software Update" msgid_plural "Software Updates" msgstr[0] "Pembaharuan Perangkat Lunak" msgstr[1] "Pembaharuan-Pembaharuan Perangkat Lunak" #. #. * TRANSLATORS: This sentence contains two plurals. #. * Texts related to these plurals are mixed. That is #. * why it is split in three parts. Fill first two parts #. * as you need, and use them as %s in the last one to #. * construct a sentence. Note that if the first form of #. * plural relates only to singular form, it is never #. * used, and dedicated shorter sentences are used. #: ../pkui-icon.c:266 #, c-format msgid "There is %d software update available," msgid_plural "There are %d software updates available," msgstr[0] "Tersedia %d Pembaharuan Perangkat Lunak," msgstr[1] "Tersedia %d Pembaharuan-Pembaharuan Perangkat Lunak," #. #. * TRANSLATORS: This is the sentence part in the #. * middle, form of which is related to the first #. * number. If your language does not need it, simply #. * use it as space or so. #: ../pkui-icon.c:275 msgid "of it" msgid_plural "of them" msgstr[0] "diantaranya" #. #. * TRANSLATORS: This forms the sentence. If you need to #. * swap parts, use %3$s and %1$s etc. Plurals are #. * related to second number. #: ../pkui-icon.c:282 #, c-format msgid "%s %d %s is important." msgid_plural "%s %d %s are important." msgstr[0] "%1$s %3$s adalah %2$d yang penting." #: ../pkui-icon.c:287 #, c-format msgid "There is %d important software update available." msgid_plural "There are %d important software updates available." msgstr[0] "Tersedia %d Pembaharuan Perangkat Lunak yang penting." msgstr[1] "Tersedia %d Pembaharuan-Pembaharuan Perangkat Lunak yang penting." #: ../pkui-icon.c:294 #, c-format msgid "There is %d software update available." msgid_plural "There are %d software updates available." msgstr[0] "Tersedia %d Pembaharuan Perangkat Lunak." msgstr[1] "Tersedia %d Pembaharuan-Pembaharuan Perangkat Lunak." #: ../pkui-icon.c:313 msgid "Install Update" msgid_plural "Install Updates" msgstr[0] "Pasang Perangkat Lunak Pembaharuan" msgstr[1] "Pasang Perangkat Lunak Pembaharuan-Pembaharuan" #: ../pk-update-icon.desktop.in.h:1 msgid "PackageKit Update Applet" msgstr "PackageKit Update Applet" #: ../pk-update-icon.desktop.in.h:2 msgid "Update Applet" msgstr "Update Applet" pk-update-icon-2/po/POTFILES.in000064400017500000144000000000741254077353100163760ustar00gberusers00000000000000main.c pkui-icon.c pkui-backend.c pk-update-icon.desktop.in pk-update-icon-2/po/cs.po000064400017500000144000000110371254101700300155510ustar00gberusers00000000000000# pk-update-icon # Copyright (C) 2011 Pavol Rusnak, Guido Berhoerster # This file is distributed under the same license as the pk-update-icon package. # Pavol Rusnak , 2011. # Stanislav Brabec , 2015. # msgid "" msgstr "" "Project-Id-Version: pk-update-icon 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-06-18 22:56:02+0200\n" "PO-Revision-Date: 2015-06-18 16:36+0200\n" "Last-Translator: Stanislav Brabec \n" "Language-Team: Czech\n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #: ../main.c:42 msgid "Command for starting the software update viewer" msgstr "Příkaz spouštějící prohlížeč aktualizací softwaru" #: ../main.c:45 msgid "Set the delay in seconds before the first check for updates" msgstr "Nastaví prodlevu před první kontrolou aktualizací v sekundách" #: ../main.c:48 msgid "Set the interval in seconds between checks for updates" msgstr "Nastaví interval mezi kontrolami aktualizací v sekundách" #: ../main.c:51 msgid "Print the version number and exit" msgstr "Vypíše verzi a skončí" #: ../main.c:63 msgid "- display notifications about software updates" msgstr "- zobrazení oznámení o aktualizacích softwaru" #: ../pkui-icon.c:94 msgid "Software Updates" msgstr "Aktualizace softwaru" #: ../pkui-icon.c:168 msgid "translators" msgstr "" "Pavol Rusnak \n" "Stanislav Brabec " #: ../pkui-icon.c:196 msgid "_Check for Updates" msgstr "_Zkontrolovat aktualizace" #: ../pkui-icon.c:204 msgid "_About" msgstr "_O programu" #. TRANSLATORS: This is a message without number mentioned #: ../pkui-icon.c:247 msgid "Important Software Update" msgid_plural "Important Software Updates" msgstr[0] "Důležitá aktualizace softwaru" msgstr[1] "Důležité aktualizace softwaru" msgstr[2] "Důležité aktualizace softwaru" #. TRANSLATORS: This is a message without number mentioned #: ../pkui-icon.c:250 msgid "Software Update" msgid_plural "Software Updates" msgstr[0] "Aktualizace softwaru" msgstr[1] "Aktualizace softwaru" msgstr[2] "Aktualizace softwaru" #. #. * TRANSLATORS: This sentence contains two plurals. #. * Texts related to these plurals are mixed. That is #. * why it is split in three parts. Fill first two parts #. * as you need, and use them as %s in the last one to #. * construct a sentence. Note that if the first form of #. * plural relates only to singular form, it is never #. * used, and dedicated shorter sentences are used. #: ../pkui-icon.c:266 #, c-format msgid "There is %d software update available," msgid_plural "There are %d software updates available," msgstr[0] "Je k dispozici %d aktualizace softwaru, z níž" msgstr[1] "Jsou k dispozici %d aktualizace softwaru, z nichž" msgstr[2] "Je k dispozici %d aktualizací softwaru, z nichž" #. #. * TRANSLATORS: This is the sentence part in the #. * middle, form of which is related to the first #. * number. If your language does not need it, simply #. * use it as space or so. #: ../pkui-icon.c:275 msgid "of it" msgid_plural "of them" msgstr[0] "." msgstr[1] "." msgstr[2] "." #. #. * TRANSLATORS: This forms the sentence. If you need to #. * swap parts, use %3$s and %1$s etc. Plurals are #. * related to second number. #: ../pkui-icon.c:282 #, c-format msgid "%s %d %s is important." msgid_plural "%s %d %s are important." msgstr[0] "%s %d je důležitá%s" msgstr[1] "%s %d jsou důležité%s" msgstr[2] "%s %d je důležitých%s" #: ../pkui-icon.c:287 #, c-format msgid "There is %d important software update available." msgid_plural "There are %d important software updates available." msgstr[0] "Je k dispozici %d důležitá aktualizace softwaru." msgstr[1] "Jsou k dispozici %d důležité aktualizace softwaru." msgstr[2] "Je k dispozici %d důležitých aktualizací softwaru." #: ../pkui-icon.c:294 #, c-format msgid "There is %d software update available." msgid_plural "There are %d software updates available." msgstr[0] "Je k dispozici %d aktualizace softwaru." msgstr[1] "Jsou k dispozici %d aktualizace softwaru." msgstr[2] "Je k dispozici %d aktualizací softwaru." #: ../pkui-icon.c:313 msgid "Install Update" msgid_plural "Install Updates" msgstr[0] "Instalovat aktualizaci" msgstr[1] "Instalovat aktualizace" msgstr[2] "Instalovat aktualizace" #: ../pk-update-icon.desktop.in.h:1 msgid "PackageKit Update Applet" msgstr "Aktualizační aplet PackageKit" #: ../pk-update-icon.desktop.in.h:2 msgid "Update Applet" msgstr "Aktualizační aplet" pk-update-icon-2/po/fr.po000064400017500000144000000105371254077405600156000ustar00gberusers00000000000000# pk-update-icon # Copyright (C) 2011 Vincent Untz # This file is distributed under the same license as the pk-update-icon package. # Vincent Untz , 2011. # msgid "" msgstr "" "Project-Id-Version: pk-update-icon 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-06-18 22:51:12+0200\n" "PO-Revision-Date: 2001-10-20 15:40+0200\n" "Last-Translator: Vincent Untz \n" "Language-Team: French\n" "Language: 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" #: ../main.c:42 msgid "Command for starting the software update viewer" msgstr "" #: ../main.c:45 msgid "Set the delay in seconds before the first check for updates" msgstr "" "Configure le délai en secondes avant la première vérification des mises à " "jour" #: ../main.c:48 msgid "Set the interval in seconds between checks for updates" msgstr "" "Configure l'intervalle en seconde entre les vérifications des mises à jour" #: ../main.c:51 msgid "Print the version number and exit" msgstr "Affiche le numéro de version et quitte" #: ../main.c:63 msgid "- display notifications about software updates" msgstr "- affiche les notifications à propos des mises à jour des logiciels" #: ../pkui-icon.c:94 msgid "Software Updates" msgstr "Mise à jour des logiciels" #: ../pkui-icon.c:168 msgid "translators" msgstr "traducteurs" #: ../pkui-icon.c:196 msgid "_Check for Updates" msgstr "_Vérifier les mises à jour" #: ../pkui-icon.c:204 msgid "_About" msgstr "À _propos" #. TRANSLATORS: This is a message without number mentioned #: ../pkui-icon.c:247 msgid "Important Software Update" msgid_plural "Important Software Updates" msgstr[0] "Mise à jour importante d'un logiciel" msgstr[1] "Mises à jour importantes de logiciels" #. TRANSLATORS: This is a message without number mentioned #: ../pkui-icon.c:250 msgid "Software Update" msgid_plural "Software Updates" msgstr[0] "Mise à jour d'un logiciel" msgstr[1] "Mises à jour de logiciels" #. #. * TRANSLATORS: This sentence contains two plurals. #. * Texts related to these plurals are mixed. That is #. * why it is split in three parts. Fill first two parts #. * as you need, and use them as %s in the last one to #. * construct a sentence. Note that if the first form of #. * plural relates only to singular form, it is never #. * used, and dedicated shorter sentences are used. #: ../pkui-icon.c:266 #, fuzzy, c-format msgid "There is %d software update available," msgid_plural "There are %d software updates available," msgstr[0] "Il y a une mise à jour disponible." msgstr[1] "Il y a %d mises à jour disponibles." #. #. * TRANSLATORS: This is the sentence part in the #. * middle, form of which is related to the first #. * number. If your language does not need it, simply #. * use it as space or so. #: ../pkui-icon.c:275 msgid "of it" msgid_plural "of them" msgstr[0] "" msgstr[1] "" #. #. * TRANSLATORS: This forms the sentence. If you need to #. * swap parts, use %3$s and %1$s etc. Plurals are #. * related to second number. #: ../pkui-icon.c:282 #, c-format msgid "%s %d %s is important." msgid_plural "%s %d %s are important." msgstr[0] "" msgstr[1] "" #: ../pkui-icon.c:287 #, fuzzy, c-format msgid "There is %d important software update available." msgid_plural "There are %d important software updates available." msgstr[0] "Il y a une mise à jour importante disponible." msgstr[1] "Il y a %d mises à jour importantes disponibles." #: ../pkui-icon.c:294 #, fuzzy, c-format msgid "There is %d software update available." msgid_plural "There are %d software updates available." msgstr[0] "Il y a une mise à jour disponible." msgstr[1] "Il y a %d mises à jour disponibles." #: ../pkui-icon.c:313 msgid "Install Update" msgid_plural "Install Updates" msgstr[0] "Installer la mise à jour" msgstr[1] "Installer les mises à jour" #: ../pk-update-icon.desktop.in.h:1 msgid "PackageKit Update Applet" msgstr "Applet de mise à jour PackageKit" #: ../pk-update-icon.desktop.in.h:2 msgid "Update Applet" msgstr "Applet de mise à jour" #~ msgid "There are %d software updates available, %d of them is important." #~ msgid_plural "" #~ "There are %d software updates available, %d of them are important." #~ msgstr[0] "Il y a %d mise à jour disponible, dont %d importante." #~ msgstr[1] "Il y a %d mises à jour disponibles, dont %d importantes."