Hello community, here is the log from the commit of package pk-update-icon for openSUSE:Factory checked in at Tue Oct 11 18:21:49 CEST 2011.
-------- --- openSUSE:Factory/pk-update-icon/pk-update-icon.changes 2011-10-07 00:52:24.000000000 +0200 +++ /mounts/work_src_done/STABLE/pk-update-icon/pk-update-icon.changes 2011-10-11 17:44:56.000000000 +0200 @@ -1,0 +2,5 @@ +Tue Oct 11 15:44:15 UTC 2011 - [email protected] + +- added manpage, autostart and localization + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pk-update-icon.spec ++++++ --- /var/tmp/diff_new_pack.KiITs9/_old 2011-10-11 18:21:44.000000000 +0200 +++ /var/tmp/diff_new_pack.KiITs9/_new 2011-10-11 18:21:44.000000000 +0200 @@ -22,12 +22,14 @@ Release: 1 License: GPLv2+ Summary: Simply GTK tray icon showing available updates -Group: System/Daemons Url: http://gitorious.org/opensuse/pk-update-icon +Group: System/Daemons Source: %{name}.tar.bz2 +BuildRequires: intltool BuildRequires: pkgconfig(gtk+-2.0) -BuildRequires: pkgconfig(libnotify) >= 0.7 +BuildRequires: pkgconfig(libnotify) BuildRequires: pkgconfig(packagekit-glib2) +BuildRequires: pkgconfig(unique-1.0) %if 0%{?suse_version} BuildRequires: update-desktop-files %endif @@ -40,22 +42,23 @@ %setup -q -n %{name} %build -make %{?_smp_mflags} +make %{?_smp_mflags} prefix=%{_prefix} CFLAGS="%{optflags}" %install -install -D -m 0755 %{name} %{buildroot}%{_bindir}/%{name} -install -D -m 0644 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop +%make_install prefix=%{_prefix} %if 0%{?suse_version} %suse_update_desktop_file %{name} %endif +%find_lang %{name} %clean rm -rf %{buildroot} -%files +%files -f %{name}.lang %defattr(-,root,root) %doc AUTHORS COPYING %{_bindir}/%{name} -%{_datadir}/applications/%{name}.desktop +%{_mandir}/man1/%{name}.1* +%{_sysconfdir}/xdg/autostart/%{name}.desktop %changelog ++++++ pk-update-icon.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/.gitignore new/pk-update-icon/.gitignore --- old/pk-update-icon/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/pk-update-icon/.gitignore 2011-09-26 15:28:53.000000000 +0200 @@ -0,0 +1,2 @@ +*.o +pk-update-icon diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/AUTHORS new/pk-update-icon/AUTHORS --- old/pk-update-icon/AUTHORS 2011-09-26 15:36:41.000000000 +0200 +++ new/pk-update-icon/AUTHORS 2011-10-11 17:20:59.000000000 +0200 @@ -1 +1,2 @@ Pavol Rusnak <[email protected]> +Guido Berhoerster <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/Makefile new/pk-update-icon/Makefile --- old/pk-update-icon/Makefile 2011-10-06 15:51:14.000000000 +0200 +++ new/pk-update-icon/Makefile 2011-10-11 17:40:42.000000000 +0200 @@ -1,16 +1,79 @@ -CC=gcc -OBJS=main.o notify.o packagekit.o -CFLAGS=$(shell pkg-config --cflags gtk+-2.0 libnotify packagekit-glib2) -Wall -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE -LDFLAGS=$(shell pkg-config --libs gtk+-2.0 libnotify packagekit-glib2) -NAME=pk-update-icon +INSTALL := install +INSTALL.exec := $(INSTALL) -D -m 0755 +INSTALL.data := $(INSTALL) -D -m 0644 +SED := sed +MSGFMT := msgfmt +INTLTOOL_UPDATE := intltool-update +INTLTOOL_MERGE := intltool-merge -all: $(NAME) +DESTDIR ?= +prefix ?= /usr/local +bindir ?= $(prefix)/bin +datadir ?= $(prefix)/share +mandir ?= $(datadir)/man +localedir ?= $(datadir)/locale +sysconfdir ?= /etc +xdgautostartdir ?= $(sysconfdir)/xdg/autostart -$(NAME): $(OBJS) - $(CC) $(OBJS) $(LDFLAGS) -o $(NAME) +PACKAGE = pk-update-icon +APP_NAME = org.opensuse.pk-update-icon +VERSION = 0.1 +OBJS = main.o notify.o packagekit.o +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)\" \ + -DLOCALEDIR="\"$(localedir)\"" +LDLIBS := $(shell pkg-config --libs gtk+-2.0 unique-1.0 libnotify packagekit-glib2) + +.DEFAULT_TARGET = all + +.PHONY: all clean install + +all: $(PACKAGE) $(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 - $(CC) -c $< $(CFLAGS) -o $@ + $(COMPILE.c) -MD -o $@ $< + @cp $*.d $*.P; \ + $(SED) -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \ + rm -f $*.d + +%.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 $(OBJS) $(NAME) + rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(AUTOSTART_FILE) + +-include $(patsubst %.o,%.P,$(OBJS)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/main.c new/pk-update-icon/main.c --- old/pk-update-icon/main.c 2011-09-27 12:15:24.000000000 +0200 +++ new/pk-update-icon/main.c 2011-10-11 17:20:59.000000000 +0200 @@ -1,5 +1,6 @@ /* * Copyright (C) 2011 Pavol Rusnak <[email protected]> + * Copyright (C) 2011 Guido Berhoerster <[email protected]> * * Licensed under the GNU General Public License Version 2 * @@ -21,7 +22,10 @@ #include "main.h" #include "notify.h" #include "packagekit.h" +#include <locale.h> +#include <glib/gi18n.h> #include <gtk/gtk.h> +#include <unique/unique.h> struct UpdatesInfo info; @@ -43,7 +47,7 @@ { GtkWidget *item; GtkWidget *menu = gtk_menu_new(); - item = gtk_menu_item_new_with_mnemonic("_Quit"); + item = gtk_menu_item_new_with_mnemonic(_("_Quit")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(gtk_main_quit), user_data); gtk_widget_show(item); @@ -61,7 +65,7 @@ g_signal_connect(G_OBJECT(tray_icon), "activate", G_CALLBACK(tray_icon_on_click), NULL); g_signal_connect(G_OBJECT(tray_icon), "popup-menu", G_CALLBACK(tray_icon_on_menu), NULL); gtk_status_icon_set_from_icon_name(tray_icon, "system-software-update"); - gtk_status_icon_set_title(tray_icon, "Software Update"); + gtk_status_icon_set_title(tray_icon, _("Software Update(s)")); gtk_status_icon_set_visible(tray_icon, TRUE); return tray_icon; } @@ -83,8 +87,21 @@ int main(int argc, char **argv) { GtkStatusIcon *tray_icon; + UniqueApp *app; + int exitval = 0; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + textdomain(PACKAGE); gtk_init(&argc, &argv); + 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; + } tray_icon = create_tray_icon(); init_notify(); @@ -95,5 +112,10 @@ gtk_main(); - return 0; + g_object_unref(tray_icon); + +out: + g_object_unref(app); + + return exitval; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/main.h new/pk-update-icon/main.h --- old/pk-update-icon/main.h 2011-09-27 12:14:56.000000000 +0200 +++ new/pk-update-icon/main.h 2011-10-11 17:20:59.000000000 +0200 @@ -1,5 +1,26 @@ +/* + * Copyright (C) 2011 Pavol Rusnak <[email protected]> + * Copyright (C) 2011 Guido Berhoerster <[email protected]> + * + * 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 MAIN_H -#define MAIN_H 1 +#define MAIN_H struct UpdatesInfo { int normal; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/notify.c new/pk-update-icon/notify.c --- old/pk-update-icon/notify.c 2011-10-06 15:30:33.000000000 +0200 +++ new/pk-update-icon/notify.c 2011-10-11 17:20:59.000000000 +0200 @@ -1,5 +1,6 @@ /* * Copyright (C) 2011 Pavol Rusnak <[email protected]> + * Copyright (C) 2011 Guido Berhoerster <[email protected]> * * Licensed under the GNU General Public License Version 2 * @@ -18,20 +19,24 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include <libnotify/notify.h> #include "notify.h" -#define NOTIFY_NAME "Software Update" - void init_notify() { - notify_init(NOTIFY_NAME); + notify_init(PACKAGE); } void send_notify(struct UpdatesInfo *info) { NotifyNotification *ntfy; - ntfy = notify_notification_new(NOTIFY_NAME, notify_text(info), info->critical > 0 ? "software-update-urgent" : "software-update-available"); + ntfy = notify_notification_new( + _("Software Update(s)"), + _(notify_text(info)), + info->critical > 0 ? "software-update-urgent" : "software-update-available" +#if (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR < 7) + , NULL +#endif + ); notify_notification_set_timeout(ntfy, 3000); notify_notification_set_urgency(ntfy, info->critical > 0 ? NOTIFY_URGENCY_CRITICAL : NOTIFY_URGENCY_NORMAL); notify_notification_show(ntfy, NULL); @@ -41,9 +46,9 @@ { static char buf[128]; if (info->critical > 0) { - snprintf(buf, sizeof(buf), "There are %d software updates available, %d of them critical.", info->normal + info->critical, info->critical); + snprintf(buf, sizeof(buf), _("There are %d software updates available, %d of them critical."), info->normal + info->critical, info->critical); } else { - snprintf(buf, sizeof(buf), "There are %d software updates available.", info->normal); + snprintf(buf, sizeof(buf), _("There are %d software updates available."), info->normal); } return buf; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/notify.h new/pk-update-icon/notify.h --- old/pk-update-icon/notify.h 2011-09-27 12:14:56.000000000 +0200 +++ new/pk-update-icon/notify.h 2011-10-11 17:20:59.000000000 +0200 @@ -1,5 +1,6 @@ /* * Copyright (C) 2011 Pavol Rusnak <[email protected]> + * Copyright (C) 2011 Guido Berhoerster <[email protected]> * * Licensed under the GNU General Public License Version 2 * @@ -21,6 +22,9 @@ #ifndef NOTIFY_H #define NOTIFY_H +#include <glib.h> +#include <glib/gi18n.h> +#include <libnotify/notify.h> #include "main.h" void init_notify(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/pk-update-icon.1 new/pk-update-icon/pk-update-icon.1 --- old/pk-update-icon/pk-update-icon.1 1970-01-01 01:00:00.000000000 +0100 +++ new/pk-update-icon/pk-update-icon.1 2011-10-11 17:20:59.000000000 +0200 @@ -0,0 +1,26 @@ +.\" Copyright (C) 2011 Guido Berhoerster <[email protected]> +.\" +.\" 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. +.\" +.TH PK\-UPDATE\-ICON 1 "9 Oct 2011" +.SH NAME +pk\-update\-icon \- display notifications about package updates +.SH SYNOPSIS +.B pk\-update\-icon +.SH DESCRIPTION +\fBpk\-update\-icon\fR displays notifications and an icon in the tray area of +the panel when package updates are available. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/pk-update-icon.desktop new/pk-update-icon/pk-update-icon.desktop --- old/pk-update-icon/pk-update-icon.desktop 2011-10-06 15:58:29.000000000 +0200 +++ new/pk-update-icon/pk-update-icon.desktop 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -[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; -OnlyShowIn=XFCE;LXDE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/pk-update-icon.desktop.in new/pk-update-icon/pk-update-icon.desktop.in --- old/pk-update-icon/pk-update-icon.desktop.in 1970-01-01 01:00:00.000000000 +0100 +++ new/pk-update-icon/pk-update-icon.desktop.in 2011-10-11 17:20:59.000000000 +0200 @@ -0,0 +1,10 @@ +[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; +OnlyShowIn=XFCE;LXDE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/po/POTFILES.in new/pk-update-icon/po/POTFILES.in --- old/pk-update-icon/po/POTFILES.in 1970-01-01 01:00:00.000000000 +0100 +++ new/pk-update-icon/po/POTFILES.in 2011-10-11 17:20:59.000000000 +0200 @@ -0,0 +1,4 @@ +main.c +notify.c +packagekit.c +pk-update-icon.desktop.in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pk-update-icon/po/de.po new/pk-update-icon/po/de.po --- old/pk-update-icon/po/de.po 1970-01-01 01:00:00.000000000 +0100 +++ new/pk-update-icon/po/de.po 2011-10-11 17:20:59.000000000 +0200 @@ -0,0 +1,44 @@ +# 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 <[email protected]>, 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: pk-update-icon 0.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-10-10 19:19+0200\n" +"PO-Revision-Date: 2011-10-10 19:21+0200\n" +"Last-Translator: Guido Berhoerster <[email protected]>\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:49 +msgid "_Quit" +msgstr "_Verlassen" + +#: ../main.c:67 ../notify.c:32 +msgid "Software Update(s)" +msgstr "Software Update(s)" + +#: ../notify.c:42 +#, c-format +msgid "There are %d software updates available, %d of them critical." +msgstr "%d Software Updates sind verfügbar, %d davon sind kritisch." + +#: ../notify.c:44 +#, c-format +msgid "There are %d software updates available." +msgstr "%d Software Updates sind verfügbar." + +#: ../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" continue with "q"... Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
