r15483 - in /packages/unstable/update-notifier/debian: changelog changelog.ubuntu patches/002_i18n_update.diff patches/02_reboot_use_my_gdm_signal.diff patches/04_fix_gksu_usage.diff patches/05_fix_monitored_dirs.diff patches/06_port_to_gtk2.10.diff

alanbach-guest at users.alioth.debian.org alanbach-guest at users.alioth.debian.org
Sun Apr 6 15:11:38 UTC 2008


Author: alanbach-guest
Date: Sun Apr  6 15:11:37 2008
New Revision: 15483

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=15483
Log:
* New upstream bugfix release
* Dropped 05_fix_monitored_dirs.diff, merged upstream
* Refreshed 02_reboot_use_my_gdm_signal, 002_i18n_update,
  04_fix_gksu_usage and 06_port_to_gtk2.10 to be applied
  cleanly
* Updated changelog.ubuntu from the new upstream tarball

Removed:
    packages/unstable/update-notifier/debian/patches/05_fix_monitored_dirs.diff
Modified:
    packages/unstable/update-notifier/debian/changelog
    packages/unstable/update-notifier/debian/changelog.ubuntu
    packages/unstable/update-notifier/debian/patches/002_i18n_update.diff
    packages/unstable/update-notifier/debian/patches/02_reboot_use_my_gdm_signal.diff
    packages/unstable/update-notifier/debian/patches/04_fix_gksu_usage.diff
    packages/unstable/update-notifier/debian/patches/06_port_to_gtk2.10.diff

Modified: packages/unstable/update-notifier/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/update-notifier/debian/changelog?rev=15483&op=diff
==============================================================================
--- packages/unstable/update-notifier/debian/changelog (original)
+++ packages/unstable/update-notifier/debian/changelog Sun Apr  6 15:11:37 2008
@@ -1,4 +1,4 @@
-update-notifier (0.70.4.debian-1) unstable; urgency=low
+update-notifier (0.70.7.debian-1) unstable; urgency=low
 
   [ Alan Baghumian ]
   * New upstream stable releases
@@ -27,11 +27,17 @@
   * Removed debian/install: obsolete, merged with
     update-notifier-common.install
 
+  [ Alan Baghumian ]  
+  * Dropped 05_fix_monitored_dirs.diff, merged upstream
+  * Refreshed 02_reboot_use_my_gdm_signal, 002_i18n_update,
+    04_fix_gksu_usage and 06_port_to_gtk2.10 to be applied
+    cleanly
+
   [ Gustavo Noronha Silva ]
   * debian/control:
   - Make GNOME team the maintainer, I can no longer be involved
 
- -- Alan Baghumian <alan at technotux.org>  Mon, 18 Feb 2008 13:52:54 +0330
+ -- Alan Baghumian <alan at technotux.org>  Sun, 06 Apr 2008 17:06:41 +0200
 
 update-notifier (0.59.5.debian-1) unstable; urgency=low
 

Modified: packages/unstable/update-notifier/debian/changelog.ubuntu
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/update-notifier/debian/changelog.ubuntu?rev=15483&op=diff
==============================================================================
--- packages/unstable/update-notifier/debian/changelog.ubuntu (original)
+++ packages/unstable/update-notifier/debian/changelog.ubuntu Sun Apr  6 15:11:37 2008
@@ -1,3 +1,37 @@
+update-notifier (0.70.7) hardy; urgency=low
+
+  * src/update-notifier.c:
+    - support running for non-admin users too
+    - support forcing gksu 
+
+ -- Michael Vogt <michael.vogt at ubuntu.com>  Fri, 04 Apr 2008 23:15:31 +0200
+
+update-notifier (0.70.6) hardy; urgency=low
+
+  * src/update-notifier.c:
+    - monitor the apt-get update stamp file too (LP: #206360)
+
+ -- Michael Vogt <michael.vogt at ubuntu.com>  Tue, 01 Apr 2008 16:49:48 +0200
+
+update-notifier (0.70.5) hardy; urgency=low
+
+  * src/update-notifier.c:
+    - delay statup checks for updates etc for 60s to avoid
+      slowing down the desktop startup (for Seb128)
+    - fix typo in monitored directories (LP: #188201)
+  * src/update.c, src/crash.c, src/hooks.c:
+    - ensure to not show notification if the icon is already
+      gone (LP: #187744)
+  * src/hal.c:
+    - setup sensible default actions (LP: #186595)
+    - do not keep the cdrom detected window on top of
+      other windows (LP: #186593) and make sure it appears
+      in the taskbar
+  * src/reboot.c:
+    - use bigger icon (LP: #149380)
+
+ -- Michael Vogt <michael.vogt at ubuntu.com>  Thu, 13 Mar 2008 18:24:07 +0100
+
 update-notifier (0.70.4) hardy; urgency=low
 
   * src/update.c, debian/15update-stamp:

Modified: packages/unstable/update-notifier/debian/patches/002_i18n_update.diff
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/update-notifier/debian/patches/002_i18n_update.diff?rev=15483&op=diff
==============================================================================
--- packages/unstable/update-notifier/debian/patches/002_i18n_update.diff (original)
+++ packages/unstable/update-notifier/debian/patches/002_i18n_update.diff Sun Apr  6 15:11:37 2008
@@ -1,7 +1,7 @@
-diff -urpN update-notifier-0.57.1/po/fi.po update-notifier-0.57.1.new/po/fi.po
---- update-notifier-0.57.1/po/fi.po	2006-12-12 13:32:10.000000000 +0330
-+++ update-notifier-0.57.1.new/po/fi.po	2007-06-20 08:42:07.000000000 +0330
-@@ -57,9 +57,10 @@ msgid ""
+diff -urN update-notifier-0.70.7.debian/po/fi.po update-notifier-0.70.7.debian.new/po/fi.po
+--- update-notifier-0.70.7.debian/po/fi.po	2008-01-08 17:40:26.000000000 +0100
++++ update-notifier-0.70.7.debian.new/po/fi.po	2008-04-06 10:44:03.000000000 +0200
+@@ -61,9 +61,10 @@
  "\n"
  "Would you like to open it with the package manager?"
  msgstr ""
@@ -12,9 +12,9 @@
 -"Voit nyt käynnistää pakettienhallintaohjelman hyödyntääksesi sitä."
 +"Would you like to open it with the package manager?"
  
- #: ../src/hal.c:53 ../src/hal.c:66 ../src/update.c:23
- msgid "Start package manager"
-@@ -77,9 +78,10 @@ msgid ""
+ #: ../src/hal.c:59 ../src/hal.c:72 ../src/hal.c:88 ../src/hal.c:106
+ #: ../src/update.c:29
+@@ -82,9 +83,10 @@
  "\n"
  "Would you like to try to upgrade from it automatically? "
  msgstr ""
@@ -25,12 +25,12 @@
 -"Voit nyt käynnistää pakettienhallintaohjelman hyödyntääksesi sitä."
 +"Would you like to try to upgrade from it automatically? "
  
- #: ../src/hal.c:68
+ #: ../src/hal.c:74
  #, fuzzy
-diff -urpN update-notifier-0.57.1/po/hu.po update-notifier-0.57.1.new/po/hu.po
---- update-notifier-0.57.1/po/hu.po	2006-12-12 13:32:10.000000000 +0330
-+++ update-notifier-0.57.1.new/po/hu.po	2007-06-20 08:42:53.000000000 +0330
-@@ -55,11 +55,10 @@ msgid ""
+diff -urN update-notifier-0.70.7.debian/po/hu.po update-notifier-0.70.7.debian.new/po/hu.po
+--- update-notifier-0.70.7.debian/po/hu.po	2008-01-08 17:40:27.000000000 +0100
++++ update-notifier-0.70.7.debian.new/po/hu.po	2008-04-06 10:44:03.000000000 +0200
+@@ -60,11 +60,10 @@
  "\n"
  "Would you like to open it with the package manager?"
  msgstr ""
@@ -43,9 +43,9 @@
 -"vagy megszakíthatja a műveletet."
 +"Would you like to open it with the package manager?"
  
- #: ../src/hal.c:53 ../src/hal.c:66 ../src/update.c:23
- msgid "Start package manager"
-@@ -77,11 +76,10 @@ msgid ""
+ #: ../src/hal.c:59 ../src/hal.c:72 ../src/hal.c:88 ../src/hal.c:106
+ #: ../src/update.c:29
+@@ -83,11 +82,10 @@
  "\n"
  "Would you like to try to upgrade from it automatically? "
  msgstr ""
@@ -58,12 +58,12 @@
 -"vagy megszakíthatja a műveletet."
 +"Would you like to try to upgrade from it automatically? "
  
- #: ../src/hal.c:68
+ #: ../src/hal.c:74
  #, fuzzy
-diff -urpN update-notifier-0.57.1/po/ja.po update-notifier-0.57.1.new/po/ja.po
---- update-notifier-0.57.1/po/ja.po	2006-12-12 13:32:10.000000000 +0330
-+++ update-notifier-0.57.1.new/po/ja.po	2007-06-20 08:43:24.000000000 +0330
-@@ -56,9 +56,10 @@ msgid ""
+diff -urN update-notifier-0.70.7.debian/po/ja.po update-notifier-0.70.7.debian.new/po/ja.po
+--- update-notifier-0.70.7.debian/po/ja.po	2008-01-08 17:40:27.000000000 +0100
++++ update-notifier-0.70.7.debian.new/po/ja.po	2008-04-06 10:44:03.000000000 +0200
+@@ -61,9 +61,10 @@
  "\n"
  "Would you like to open it with the package manager?"
  msgstr ""
@@ -74,9 +74,9 @@
 -"パッケージマネージャを起動してください。"
 +"Would you like to open it with the package manager?"
  
- #: ../src/hal.c:53 ../src/hal.c:66 ../src/update.c:23
- msgid "Start package manager"
-@@ -76,9 +77,10 @@ msgid ""
+ #: ../src/hal.c:59 ../src/hal.c:72 ../src/hal.c:88 ../src/hal.c:106
+ #: ../src/update.c:29
+@@ -82,9 +83,10 @@
  "\n"
  "Would you like to try to upgrade from it automatically? "
  msgstr ""
@@ -87,12 +87,12 @@
 -"パッケージマネージャを起動してください。"
 +"Would you like to try to upgrade from it automatically? "
  
- #: ../src/hal.c:68
+ #: ../src/hal.c:74
  #, fuzzy
-diff -urpN update-notifier-0.57.1/po/pl.po update-notifier-0.57.1.new/po/pl.po
---- update-notifier-0.57.1/po/pl.po	2006-12-12 13:32:10.000000000 +0330
-+++ update-notifier-0.57.1.new/po/pl.po	2007-06-20 08:43:58.000000000 +0330
-@@ -58,10 +58,10 @@ msgid ""
+diff -urN update-notifier-0.70.7.debian/po/pl.po update-notifier-0.70.7.debian.new/po/pl.po
+--- update-notifier-0.70.7.debian/po/pl.po	2008-01-08 17:40:27.000000000 +0100
++++ update-notifier-0.70.7.debian.new/po/pl.po	2008-04-06 10:44:03.000000000 +0200
+@@ -63,10 +63,10 @@
  "\n"
  "Would you like to open it with the package manager?"
  msgstr ""
@@ -104,9 +104,9 @@
 -"pakietów lub anulować"
 +"Would you like to open it with the package manager?"
  
- #: ../src/hal.c:53 ../src/hal.c:66 ../src/update.c:23
- msgid "Start package manager"
-@@ -79,10 +79,10 @@ msgid ""
+ #: ../src/hal.c:59 ../src/hal.c:72 ../src/hal.c:88 ../src/hal.c:106
+ #: ../src/update.c:29
+@@ -85,10 +85,10 @@
  "\n"
  "Would you like to try to upgrade from it automatically? "
  msgstr ""
@@ -118,12 +118,12 @@
 -"pakietów lub anulować"
 +"Would you like to try to upgrade from it automatically? "
  
- #: ../src/hal.c:68
+ #: ../src/hal.c:74
  #, fuzzy
-diff -urpN update-notifier-0.57.1/po/pt_BR.po update-notifier-0.57.1.new/po/pt_BR.po
---- update-notifier-0.57.1/po/pt_BR.po	2006-12-12 13:32:10.000000000 +0330
-+++ update-notifier-0.57.1.new/po/pt_BR.po	2007-06-20 08:44:31.000000000 +0330
-@@ -60,9 +60,10 @@ msgid ""
+diff -urN update-notifier-0.70.7.debian/po/pt_BR.po update-notifier-0.70.7.debian.new/po/pt_BR.po
+--- update-notifier-0.70.7.debian/po/pt_BR.po	2008-01-08 17:40:27.000000000 +0100
++++ update-notifier-0.70.7.debian.new/po/pt_BR.po	2008-04-06 10:44:03.000000000 +0200
+@@ -65,9 +65,10 @@
  "\n"
  "Would you like to open it with the package manager?"
  msgstr ""
@@ -134,9 +134,9 @@
 -"Você pode iniciar o programa Gerenciador de Pacotes com ele agora."
 +"Would you like to open it with the package manager?"
  
- #: ../src/hal.c:53 ../src/hal.c:66 ../src/update.c:23
- msgid "Start package manager"
-@@ -80,9 +81,10 @@ msgid ""
+ #: ../src/hal.c:59 ../src/hal.c:72 ../src/hal.c:88 ../src/hal.c:106
+ #: ../src/update.c:29
+@@ -86,9 +87,10 @@
  "\n"
  "Would you like to try to upgrade from it automatically? "
  msgstr ""
@@ -147,12 +147,12 @@
 -"Você pode iniciar o programa Gerenciador de Pacotes com ele agora."
 +"Would you like to try to upgrade from it automatically? "
  
- #: ../src/hal.c:68
+ #: ../src/hal.c:74
  #, fuzzy
-diff -urpN update-notifier-0.57.1/po/sv.po update-notifier-0.57.1.new/po/sv.po
---- update-notifier-0.57.1/po/sv.po	2006-12-12 13:32:10.000000000 +0330
-+++ update-notifier-0.57.1.new/po/sv.po	2007-06-20 08:45:25.000000000 +0330
-@@ -56,9 +56,10 @@ msgid ""
+diff -urN update-notifier-0.70.7.debian/po/sv.po update-notifier-0.70.7.debian.new/po/sv.po
+--- update-notifier-0.70.7.debian/po/sv.po	2008-01-08 17:40:27.000000000 +0100
++++ update-notifier-0.70.7.debian.new/po/sv.po	2008-04-06 10:44:03.000000000 +0200
+@@ -60,9 +60,10 @@
  "\n"
  "Would you like to open it with the package manager?"
  msgstr ""
@@ -163,5 +163,5 @@
 -"Du kan starta pakethanteringsprogrammet med den nu."
 +"Would you like to open it with the package manager?"
  
- #: ../src/hal.c:53 ../src/hal.c:66 ../src/update.c:23
- msgid "Start package manager"
+ #: ../src/hal.c:59 ../src/hal.c:72 ../src/hal.c:88 ../src/hal.c:106
+ #: ../src/update.c:29

Modified: packages/unstable/update-notifier/debian/patches/02_reboot_use_my_gdm_signal.diff
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/update-notifier/debian/patches/02_reboot_use_my_gdm_signal.diff?rev=15483&op=diff
==============================================================================
--- packages/unstable/update-notifier/debian/patches/02_reboot_use_my_gdm_signal.diff (original)
+++ packages/unstable/update-notifier/debian/patches/02_reboot_use_my_gdm_signal.diff Sun Apr  6 15:11:37 2008
@@ -1,5 +1,6 @@
---- src/reboot.c~	2006-07-27 11:00:04.000000000 -0300
-+++ src/reboot.c	2006-08-12 16:38:43.000000000 -0300
+diff -urN update-notifier-0.70.7.debian/src/reboot.c update-notifier-0.70.7.debian.new/src/reboot.c
+--- update-notifier-0.70.7.debian/src/reboot.c	2008-03-13 18:17:33.000000000 +0100
++++ update-notifier-0.70.7.debian.new/src/reboot.c	2008-04-06 10:45:55.000000000 +0200
 @@ -13,7 +13,7 @@
  #include "update.h"
  

Modified: packages/unstable/update-notifier/debian/patches/04_fix_gksu_usage.diff
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/update-notifier/debian/patches/04_fix_gksu_usage.diff?rev=15483&op=diff
==============================================================================
--- packages/unstable/update-notifier/debian/patches/04_fix_gksu_usage.diff (original)
+++ packages/unstable/update-notifier/debian/patches/04_fix_gksu_usage.diff Sun Apr  6 15:11:37 2008
@@ -1,6 +1,6 @@
-diff -urpN update-notifier-0.70.4.debian/src/update.c update-notifier-0.70.4.debian.new/src/update.c
---- update-notifier-0.70.4.debian/src/update.c	2008-02-02 00:38:39.000000000 +0330
-+++ update-notifier-0.70.4.debian.new/src/update.c	2008-02-07 16:28:17.000000000 +0330
+diff -urN update-notifier-0.70.7.debian/src/update.c update-notifier-0.70.7.debian.new/src/update.c
+--- update-notifier-0.70.7.debian/src/update.c	2008-03-13 17:13:47.000000000 +0100
++++ update-notifier-0.70.7.debian.new/src/update.c	2008-04-06 10:46:43.000000000 +0200
 @@ -17,8 +17,8 @@
  
  // command, description, desktopfile, needs_gksu
@@ -12,7 +12,7 @@
  
     { "/usr/sbin/synaptic --dist-upgrade-mode --non-interactive --hide-main-window -o Synaptic::AskRelated=true",
       N_("Install all updates"), "/usr/share/applications/synaptic.desktop", TRUE
-@@ -86,7 +86,7 @@ cb_action(GObject *self, void *user_data
+@@ -86,7 +86,7 @@
  void 
  cb_preferences(GObject *self, void *user_data)
  {
@@ -21,10 +21,10 @@
  		    "/usr/share/applications/software-properties.desktop",
  		    FALSE);    
  }
-diff -urpN update-notifier-0.70.4.debian/src/update-notifier.c update-notifier-0.70.4.debian.new/src/update-notifier.c
---- update-notifier-0.70.4.debian/src/update-notifier.c	2008-02-01 19:17:47.000000000 +0330
-+++ update-notifier-0.70.4.debian.new/src/update-notifier.c	2008-02-07 16:29:33.000000000 +0330
-@@ -73,12 +73,13 @@ void
+diff -urN update-notifier-0.70.7.debian/src/update-notifier.c update-notifier-0.70.7.debian.new/src/update-notifier.c
+--- update-notifier-0.70.7.debian/src/update-notifier.c	2008-04-04 22:50:10.000000000 +0200
++++ update-notifier-0.70.7.debian.new/src/update-notifier.c	2008-04-06 10:46:43.000000000 +0200
+@@ -81,12 +81,13 @@
  invoke_with_gksu(gchar *cmd, gchar *descr, gboolean whole_message)
  {
          //g_print("invoke_update_manager ()\n");
@@ -41,468 +41,471 @@
  
  	g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL);
  }
-diff -urpN update-notifier-0.70.4.debian/src/update-notifier.c.orig update-notifier-0.70.4.debian.new/src/update-notifier.c.orig
---- update-notifier-0.70.4.debian/src/update-notifier.c.orig	1970-01-01 03:30:00.000000000 +0330
-+++ update-notifier-0.70.4.debian.new/src/update-notifier.c.orig	2008-02-01 19:17:47.000000000 +0330
-@@ -0,0 +1,461 @@
-+/* update-notifier.c
-+ * Copyright (C) 2004 Lukas Lipka <lukas at pmad.net>
-+ *           (C) 2004 Michael Vogt <mvo at debian.org>
-+ *           (C) 2004 Michiel Sikkes <michiel at eyesopened.nl>
-+ *           (C) 2004-2006 Canonical
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+ * Boston, MA 02111-1307, USA.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#include <signal.h>
-+#include <gnome.h>
-+#include <grp.h>
-+#include <pwd.h>
-+#include <limits.h>
-+#include <glib.h>
-+#include <glib/gstdio.h>
-+#include <gtk/gtk.h>
-+#include <glade/glade.h>
-+#include <libgnomevfs/gnome-vfs.h>
-+#include <libgnomevfs/gnome-vfs-utils.h>
-+#include <libgnomevfs/gnome-vfs-monitor.h>
-+
-+#include "update-notifier.h"
-+#include "hal.h"
-+#include "update.h"
-+#include "hooks.h"
-+#include "reboot.h"
-+#include "crash.h"
-+#include "avahi.h"
-+
-+/* some prototypes */
-+extern gboolean up_get_clipboard (void);
-+gboolean update_timer_finished(gpointer data);
-+
-+// the time when we check for fam events
-+#define TIMEOUT_FAM 1000*5 /* 5 sec */
-+
-+// the timeout (in msec) for apt-get update (changes in 
-+// /var/lib/apt/lists{/partial})
-+#define TIMEOUT_APT_GET_UPDATE 1000*30 /* 30 sec */
-+
-+// the timeout (in sec) when a further activity from dpkg/apt
-+// causes the applet to "ungray"
-+#define TIMEOUT_APT_RUN 120 /* 120 sec */
-+
-+
-+void invoke(gchar *cmd, gchar *desktop, gboolean with_gksu)
-+{
-+   if(with_gksu)
-+      invoke_with_gksu(cmd, desktop, FALSE);
-+   else
-+      g_spawn_command_line_async(cmd, NULL);
-+}
-+
-+void
-+invoke_with_gksu(gchar *cmd, gchar *descr, gboolean whole_message)
-+{
-+        //g_print("invoke_update_manager ()\n");
-+	gchar *argv[5];
-+	argv[0] = "/usr/bin/gksu";
-+	argv[1] = whole_message ? "--message" : "--desktop";
-+	argv[2] = descr;
-+	argv[3] = cmd;
-+	argv[4] = NULL;
-+
-+	g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL);
-+}
-+
-+
-+
-+gboolean
-+trayapplet_create (TrayApplet *un, char *name)
-+{
-+        //g_print("trayicon_create()\n");
-+
-+	/* setup widgets */
-+	un->tray_icon = gtk_status_icon_new_from_icon_name (name);
-+	un->name = name;
-+	gtk_status_icon_set_visible (un->tray_icon, FALSE);
-+
-+	return TRUE;
-+}
-+
-+
-+/* 
-+ the following files change:
-+ on "install":
-+  - /var/lib/dpkg/lock
-+  - /var/lib/dpkg/ *
-+  - /var/lib/update-notifier/dpkg-run-stamp
-+ on "update":
-+  - /var/lib/apt/lists/lock
-+  - /var/lib/apt/lists/ *
-+  - /var/lib/dpkg/lock
-+*/
-+void
-+monitor_cb(GnomeVFSMonitorHandle *handle,
-+	   const gchar *monitor_uri,
-+	   const gchar *info_uri,
-+	   GnomeVFSMonitorEventType event_type,
-+	   gpointer user_data)
-+{
-+   UpgradeNotifier *un = (UpgradeNotifier*)user_data;
-+
-+#if 0
-+   g_print("monitor_uri: %s\n", monitor_uri);
-+   g_print("info_uri: %s\n", info_uri);
-+   g_print("event_type: %i\n",event_type);
-+#endif
-+
-+   // we ignore lock file events because we can only get 
-+   // when a lock was taken, but not when it was removed
-+   if(g_str_has_suffix(info_uri, "lock"))
-+      return;
-+
-+   // look for apt-get install/update
-+   if(g_str_has_prefix(info_uri,"file:///var/lib/apt/") 
-+      || g_str_has_prefix(info_uri,"file:///var/cache/apt/")
-+      || strcmp(info_uri,"file:///var/lib/dpkg/status") == 0) {
-+      un->apt_get_runing=TRUE;
-+   } 
-+   if(strstr(info_uri, "/var/lib/update-notifier/dpkg-run-stamp")) {
-+      un->dpkg_was_run = TRUE;
-+   } 
-+   if(strstr(info_uri, REBOOT_FILE)) {
-+      //g_print("reboot required\n");
-+      un->reboot_pending = TRUE;
-+   }
-+   if(strstr(info_uri, HOOKS_DIR)) {
-+      //g_print("new hook!\n");
-+      un->hook_pending = TRUE;
-+   }
-+   if(strstr(info_uri, CRASHREPORT_DIR)) {
-+      //g_print("crashreport found\n");
-+      un->crashreport_pending = TRUE;
-+   }
-+   if(strstr(info_uri, UNICAST_LOCAL_AVAHI_FILE)) {
-+      //g_print("avahi disabled due to unicast .local domain\n");
-+      un->unicast_local_avahi_pending = TRUE;
-+   }
-+}
-+
-+/*
-+ * We periodically check here what actions happend in this "time-slice". 
-+ * This can be:
-+ * - dpkg_was_run=TRUE: set when apt wrote the "dpkg-run-stamp" file
-+ * - apt_get_runing: set when apt/dpkg activity is detected (in the 
-+ *                   lists-dir, archive-cache, or /var/lib/dpkg/status
-+ * - hook_pending: we have new upgrade hoook information
-+ * - reboot_pending: we need to reboot
-+ * - crashreport_pending: we have a new crashreport
-+ * - unicast_local_avahi_pending: avahi got disabled due to a unicast .local domain
-+ *
-+ */
-+gboolean file_monitor_periodic_check(gpointer data)
-+
-+{
-+   UpgradeNotifier *un = (UpgradeNotifier *)data;
-+
-+   // we are not ready yet, wait for the next timeslice
-+   if((un->update == NULL) || (un->reboot == NULL) || (un->crashreport == NULL))
-+      return TRUE;
-+
-+   // DPkg::Post-Invoke has written a stamp file, that means a install/remove
-+   // operation finished, we can show hooks/reboot notifications then
-+   if(un->dpkg_was_run) {
-+
-+      // check updates
-+      update_check(un->update);
-+
-+      // any apt-get update  must be finished, otherwise 
-+      // apt-get install wouldn't be finished
-+      update_apt_is_running(un->update, FALSE);
-+      if(un->update_finished_timer > 0) 
-+	 g_source_remove(un->update_finished_timer);
-+      
-+      // show pending hooks/reboots
-+      if(un->hook_pending) {
-+	 //g_print("checking hooks now\n");
-+	 check_update_hooks(un->hook);
-+	 un->hook_pending = FALSE;
-+      }
-+      if(un->reboot_pending) {
-+	 //g_print("checking reboot now\n");
-+	 reboot_check (un->reboot);
-+	 un->reboot_pending = FALSE;
-+      }
-+
-+      // apt must be finished when a new stamp file was writen, so we
-+      // reset the apt_get_runing time-slice field because its not 
-+      // important anymore (it finished runing)
-+      //
-+      // This may leave a 5s race condition when a apt-get install finished
-+      // and something new (apt-get) was started
-+      un->apt_get_runing = FALSE;
-+      un->last_apt_action = 0;
-+   }
-+
-+   // apt-get update/install or dpkg is runing (and updates files in 
-+   // it's list/cache dir) or in /var/lib/dpkg/status
-+   if(un->apt_get_runing) 
-+      update_apt_is_running(un->update, TRUE);
-+
-+   // update time information for apt/dpkg
-+   time_t now = time(NULL);
-+   if(un->apt_get_runing) 
-+      un->last_apt_action = now;
-+
-+   // no apt operation for a long time
-+   if(un->last_apt_action > 0 &&
-+      (now - un->last_apt_action) >  TIMEOUT_APT_RUN) {
-+      update_apt_is_running(un->update, FALSE);
-+      update_check(un->update);
-+      un->last_apt_action = 0;
-+   }
-+
-+   if(un->crashreport_pending) {
-+      g_print("checking for valid crashreport now\n");
-+      crashreport_check (un->crashreport);
-+      un->crashreport_pending = FALSE;
-+   }
-+
-+   if(un->unicast_local_avahi_pending) {
-+      g_print("checking for disabled avahi due to unicast .local domain now\n");
-+      avahi_disabled_check ();
-+      un->unicast_local_avahi_pending = FALSE;
-+   }
-+
-+   // reset the bitfields (for the next "time-slice")
-+   un->dpkg_was_run = FALSE;
-+   un->apt_get_runing = FALSE;
-+
-+   return TRUE;
-+}
-+
-+
-+
-+
-+/* u_abort seems like an internal error notification.
-+ * End user might not understand the message at all */
-+void u_abort(gchar *msg)
-+{
-+   msg = g_strdup_printf("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s\n", _("Internal error"), msg);
-+   gtk_dialog_run(GTK_DIALOG(gtk_message_dialog_new_with_markup(NULL,0,
-+						     GTK_MESSAGE_ERROR,
-+						     GTK_BUTTONS_CLOSE,
-+						     msg)));
-+   g_free(msg);
-+   exit(1);
-+}
-+
-+// FIXME: get the apt directories with apt-config or something
-+gboolean monitor_init(UpgradeNotifier *un)
-+{
-+   int i;
-+   GnomeVFSResult res;
-+   GnomeVFSMonitorHandle *monitor_handle;
-+
-+   // monitor thise dirs
-+   static const char *monitor_dirs[] = { 
-+      "/var/lib/apt/lists/", "/var/lib/apt/list/partial", 
-+      "/var/cache/apt/archives/", "/var/cache/apt/archives/partial", 
-+      HOOKS_DIR, 
-+      CRASHREPORT_DIR,
-+      NULL};
-+   for(i=0;monitor_dirs[i] != NULL;i++) {
-+      res = gnome_vfs_monitor_add(&monitor_handle,
-+				  monitor_dirs[i],
-+				  GNOME_VFS_MONITOR_DIRECTORY,
-+				  monitor_cb, un);
-+   }
-+
-+   // and those files
-+   static const char *monitor_files[] = { 
-+      "/var/lib/dpkg/status", 
-+      "/var/lib/update-notifier/dpkg-run-stamp", 
-+      REBOOT_FILE,
-+      UNICAST_LOCAL_AVAHI_FILE,
-+      NULL};
-+   for(i=0;monitor_files[i] != NULL;i++) {
-+      res = gnome_vfs_monitor_add(&monitor_handle,
-+				  monitor_files[i],
-+				  GNOME_VFS_MONITOR_FILE,
-+				  monitor_cb, un);
-+   }
-+
-+   g_timeout_add (TIMEOUT_FAM, (GSourceFunc)file_monitor_periodic_check, un);
-+
-+
-+   return TRUE;
-+}
-+
-+
-+
-+
-+static gboolean
-+tray_icons_init(UpgradeNotifier *un)
-+{
-+   //g_debug("tray_icons_init");
-+
-+   /* new upates tray icon */
-+   un->update = g_new0 (TrayApplet, 1);
-+
-+   trayapplet_create(un->update, "software-update-available");
-+   update_tray_icon_init(un->update);
-+
-+   /* update hook icon*/
-+   un->hook = g_new0 (TrayApplet, 1);
-+   trayapplet_create(un->hook, "hook-notifier");
-+   hook_tray_icon_init(un->hook);
-+
-+   /* reboot required icon */
-+   un->reboot = g_new0 (TrayApplet, 1);
-+   trayapplet_create(un->reboot, "reboot-notifier");
-+   reboot_tray_icon_init(un->reboot);
-+
-+   /* crashreport detected icon */
-+   un->crashreport = g_new0 (TrayApplet, 1);
-+   trayapplet_create(un->crashreport, "apport");
-+   crashreport_tray_icon_init(un->crashreport);
-+
-+   return FALSE; // for the tray_destroyed_cb
-+}
-+
-+// this function checks if the user is in the admin group
-+// if there is no admin group, we return true becuase there
-+// is no way to figure if the user is a admin or not
-+gboolean
-+in_admin_group()
-+{
-+   int i, ng = 0;
-+   gid_t *groups = NULL;
-+
-+   struct group *grp = getgrnam("admin");
-+   if(grp == NULL) 
-+      return TRUE;
-+
-+   ng = getgroups (0, NULL);
-+   groups = (gid_t *) malloc (ng * sizeof (gid_t));
-+
-+   i = getgroups (ng, groups);
-+   if (i != ng) {
-+     free (groups);
-+     return TRUE;
-+   }
-+   
-+   for(i=0;i<ng;i++) {
-+      if(groups[i] == grp->gr_gid) {
-+        free(groups);
-+        return TRUE;
-+      }
-+   }
-+   
-+   if(groups != NULL)
-+      free(groups);
-+
-+   return FALSE;
-+}
-+
-+static GOptionEntry entries[] = 
-+{
-+   { "debug-hooks", 0, 0, G_OPTION_ARG_NONE, &HOOK_DEBUG, "Enable hooks debugging"},
-+   { NULL }
-+};
-+
-+int 
-+main (int argc, char *argv[])
-+{
-+	GnomeClient *client;
-+	UpgradeNotifier *un;
-+
-+	// option parsing
-+	GOptionContext *context;
-+	context = g_option_context_new (" - inform about updates");
-+	g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
-+	gnome_program_init (PACKAGE, PACKAGE_VERSION, 
-+			    LIBGNOMEUI_MODULE,
-+			    argc, argv, 
-+			    GNOME_PARAM_GOPTION_CONTEXT, context,
-+			    GNOME_PARAM_NONE);
-+	notify_init("update-notifier");
-+        bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
-+        bind_textdomain_codeset(PACKAGE, "UTF-8");
-+        textdomain(PACKAGE);
-+
-+	g_set_application_name (_("update-notifier"));
-+	gtk_window_set_default_icon_name ("update-notifier");
-+
-+	//g_print("starting update-notifier\n");
-+	
-+	// check if we should run at all (see HideAdminTools spec
-+	// on https://wiki.ubuntu.com/HideAdminToolsToUsers)
-+	if(!in_admin_group()) {
-+	   g_warning("not starting because user is not in admin group\n");
-+	   exit(0);
-+	}
-+
-+	client = gnome_master_client ();
-+	if (up_get_clipboard ())
-+	  gnome_client_set_restart_style (client, GNOME_RESTART_ANYWAY);
-+	else {
-+	   gnome_client_set_restart_style (client, GNOME_RESTART_NEVER);
-+	   g_warning ("already running?\n");
-+	   return 1;
-+	}
-+
-+	/* Make sure we die when the session dies */
-+	g_signal_connect (G_OBJECT (client), "die",
-+			  G_CALLBACK (gtk_main_quit), NULL);
-+	
-+	/* Create the UpgradeNotifier object */
-+	un = g_new0 (UpgradeNotifier, 1);
-+
-+	// check for .update-notifier dir and create if needed
-+	gchar *dirname = g_strdup_printf("%s/.update-notifier",
-+					 g_get_home_dir());
-+	if(!g_file_test(dirname, G_FILE_TEST_IS_DIR))
-+	   g_mkdir(dirname, 0700);
-+	g_free(dirname);
-+
-+	// create the icons with a timeout
-+	//g_timeout_add(5000, (GSourceFunc)(tray_icons_init), un);
-+	tray_icons_init(un);
-+
-+        // initial check for avahi
-+        avahi_disabled_check();
-+
-+	// init hal (needs to be done _after_ the icons are created)
-+	/* setup hal so that inserted cdroms can be checked */
-+	LibHalContext *hal_ctx = up_do_hal_init();
-+	if (!hal_ctx) {
-+	   u_abort("failed to initialize HAL!\n");
-+	   return 1;
-+	}
-+	libhal_ctx_set_user_data(hal_ctx, un);
-+	
-+	// init fam
-+	monitor_init(un);
-+	
-+	/* Start the main gtk loop */
-+	gtk_main ();
-+
-+	return 0;
-+}
+diff -urN update-notifier-0.70.7.debian/src/update-notifier.c.orig.rej update-notifier-0.70.7.debian.new/src/update-notifier.c.orig.rej
+--- update-notifier-0.70.7.debian/src/update-notifier.c.orig.rej	1970-01-01 01:00:00.000000000 +0100
++++ update-notifier-0.70.7.debian.new/src/update-notifier.c.orig.rej	2008-04-06 10:46:47.000000000 +0200
+@@ -0,0 +1,464 @@
++***************
++*** 0 ****
++--- 1,461 ----
+++ /* update-notifier.c
+++  * Copyright (C) 2004 Lukas Lipka <lukas at pmad.net>
+++  *           (C) 2004 Michael Vogt <mvo at debian.org>
+++  *           (C) 2004 Michiel Sikkes <michiel at eyesopened.nl>
+++  *           (C) 2004-2006 Canonical
+++  *
+++  * This library is free software; you can redistribute it and/or
+++  * modify it under the terms of the GNU Lesser General Public
+++  * License as published by the Free Software Foundation; either
+++  * version 2 of the License, or (at your option) any later version.
+++  *
+++  * This library is distributed in the hope that it will be useful,
+++  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+++  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+++  * Lesser General Public License for more details.
+++  *
+++  * You should have received a copy of the GNU Lesser General Public
+++  * License along with this library; if not, write to the
+++  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+++  * Boston, MA 02111-1307, USA.
+++  */
+++ 
+++ #ifdef HAVE_CONFIG_H
+++ #include "config.h"
+++ #endif
+++ 
+++ #include <signal.h>
+++ #include <gnome.h>
+++ #include <grp.h>
+++ #include <pwd.h>
+++ #include <limits.h>
+++ #include <glib.h>
+++ #include <glib/gstdio.h>
+++ #include <gtk/gtk.h>
+++ #include <glade/glade.h>
+++ #include <libgnomevfs/gnome-vfs.h>
+++ #include <libgnomevfs/gnome-vfs-utils.h>
+++ #include <libgnomevfs/gnome-vfs-monitor.h>
+++ 
+++ #include "update-notifier.h"
+++ #include "hal.h"
+++ #include "update.h"
+++ #include "hooks.h"
+++ #include "reboot.h"
+++ #include "crash.h"
+++ #include "avahi.h"
+++ 
+++ /* some prototypes */
+++ extern gboolean up_get_clipboard (void);
+++ gboolean update_timer_finished(gpointer data);
+++ 
+++ // the time when we check for fam events
+++ #define TIMEOUT_FAM 1000*5 /* 5 sec */
+++ 
+++ // the timeout (in msec) for apt-get update (changes in 
+++ // /var/lib/apt/lists{/partial})
+++ #define TIMEOUT_APT_GET_UPDATE 1000*30 /* 30 sec */
+++ 
+++ // the timeout (in sec) when a further activity from dpkg/apt
+++ // causes the applet to "ungray"
+++ #define TIMEOUT_APT_RUN 120 /* 120 sec */
+++ 
+++ 
+++ void invoke(gchar *cmd, gchar *desktop, gboolean with_gksu)
+++ {
+++    if(with_gksu)
+++       invoke_with_gksu(cmd, desktop, FALSE);
+++    else
+++       g_spawn_command_line_async(cmd, NULL);
+++ }
+++ 
+++ void
+++ invoke_with_gksu(gchar *cmd, gchar *descr, gboolean whole_message)
+++ {
+++         //g_print("invoke_update_manager ()\n");
+++ 	gchar *argv[5];
+++ 	argv[0] = "/usr/bin/gksu";
+++ 	argv[1] = whole_message ? "--message" : "--desktop";
+++ 	argv[2] = descr;
+++ 	argv[3] = cmd;
+++ 	argv[4] = NULL;
+++ 
+++ 	g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL);
+++ }
+++ 
+++ 
+++ 
+++ gboolean
+++ trayapplet_create (TrayApplet *un, char *name)
+++ {
+++         //g_print("trayicon_create()\n");
+++ 
+++ 	/* setup widgets */
+++ 	un->tray_icon = gtk_status_icon_new_from_icon_name (name);
+++ 	un->name = name;
+++ 	gtk_status_icon_set_visible (un->tray_icon, FALSE);
+++ 
+++ 	return TRUE;
+++ }
+++ 
+++ 
+++ /* 
+++  the following files change:
+++  on "install":
+++   - /var/lib/dpkg/lock
+++   - /var/lib/dpkg/ *
+++   - /var/lib/update-notifier/dpkg-run-stamp
+++  on "update":
+++   - /var/lib/apt/lists/lock
+++   - /var/lib/apt/lists/ *
+++   - /var/lib/dpkg/lock
+++ */
+++ void
+++ monitor_cb(GnomeVFSMonitorHandle *handle,
+++ 	   const gchar *monitor_uri,
+++ 	   const gchar *info_uri,
+++ 	   GnomeVFSMonitorEventType event_type,
+++ 	   gpointer user_data)
+++ {
+++    UpgradeNotifier *un = (UpgradeNotifier*)user_data;
+++ 
+++ #if 0
+++    g_print("monitor_uri: %s\n", monitor_uri);
+++    g_print("info_uri: %s\n", info_uri);
+++    g_print("event_type: %i\n",event_type);
+++ #endif
+++ 
+++    // we ignore lock file events because we can only get 
+++    // when a lock was taken, but not when it was removed
+++    if(g_str_has_suffix(info_uri, "lock"))
+++       return;
+++ 
+++    // look for apt-get install/update
+++    if(g_str_has_prefix(info_uri,"file:///var/lib/apt/") 
+++       || g_str_has_prefix(info_uri,"file:///var/cache/apt/")
+++       || strcmp(info_uri,"file:///var/lib/dpkg/status") == 0) {
+++       un->apt_get_runing=TRUE;
+++    } 
+++    if(strstr(info_uri, "/var/lib/update-notifier/dpkg-run-stamp")) {
+++       un->dpkg_was_run = TRUE;
+++    } 
+++    if(strstr(info_uri, REBOOT_FILE)) {
+++       //g_print("reboot required\n");
+++       un->reboot_pending = TRUE;
+++    }
+++    if(strstr(info_uri, HOOKS_DIR)) {
+++       //g_print("new hook!\n");
+++       un->hook_pending = TRUE;
+++    }
+++    if(strstr(info_uri, CRASHREPORT_DIR)) {
+++       //g_print("crashreport found\n");
+++       un->crashreport_pending = TRUE;
+++    }
+++    if(strstr(info_uri, UNICAST_LOCAL_AVAHI_FILE)) {
+++       //g_print("avahi disabled due to unicast .local domain\n");
+++       un->unicast_local_avahi_pending = TRUE;
+++    }
+++ }
+++ 
+++ /*
+++  * We periodically check here what actions happend in this "time-slice". 
+++  * This can be:
+++  * - dpkg_was_run=TRUE: set when apt wrote the "dpkg-run-stamp" file
+++  * - apt_get_runing: set when apt/dpkg activity is detected (in the 
+++  *                   lists-dir, archive-cache, or /var/lib/dpkg/status
+++  * - hook_pending: we have new upgrade hoook information
+++  * - reboot_pending: we need to reboot
+++  * - crashreport_pending: we have a new crashreport
+++  * - unicast_local_avahi_pending: avahi got disabled due to a unicast .local domain
+++  *
+++  */
+++ gboolean file_monitor_periodic_check(gpointer data)
+++ 
+++ {
+++    UpgradeNotifier *un = (UpgradeNotifier *)data;
+++ 
+++    // we are not ready yet, wait for the next timeslice
+++    if((un->update == NULL) || (un->reboot == NULL) || (un->crashreport == NULL))
+++       return TRUE;
+++ 
+++    // DPkg::Post-Invoke has written a stamp file, that means a install/remove
+++    // operation finished, we can show hooks/reboot notifications then
+++    if(un->dpkg_was_run) {
+++ 
+++       // check updates
+++       update_check(un->update);
+++ 
+++       // any apt-get update  must be finished, otherwise 
+++       // apt-get install wouldn't be finished
+++       update_apt_is_running(un->update, FALSE);
+++       if(un->update_finished_timer > 0) 
+++ 	 g_source_remove(un->update_finished_timer);
+++       
+++       // show pending hooks/reboots
+++       if(un->hook_pending) {
+++ 	 //g_print("checking hooks now\n");
+++ 	 check_update_hooks(un->hook);
+++ 	 un->hook_pending = FALSE;
+++       }
+++       if(un->reboot_pending) {
+++ 	 //g_print("checking reboot now\n");
+++ 	 reboot_check (un->reboot);
+++ 	 un->reboot_pending = FALSE;
+++       }
+++ 
+++       // apt must be finished when a new stamp file was writen, so we
+++       // reset the apt_get_runing time-slice field because its not 
+++       // important anymore (it finished runing)
+++       //
+++       // This may leave a 5s race condition when a apt-get install finished
+++       // and something new (apt-get) was started
+++       un->apt_get_runing = FALSE;
+++       un->last_apt_action = 0;
+++    }
+++ 
+++    // apt-get update/install or dpkg is runing (and updates files in 
+++    // it's list/cache dir) or in /var/lib/dpkg/status
+++    if(un->apt_get_runing) 
+++       update_apt_is_running(un->update, TRUE);
+++ 
+++    // update time information for apt/dpkg
+++    time_t now = time(NULL);
+++    if(un->apt_get_runing) 
+++       un->last_apt_action = now;
+++ 
+++    // no apt operation for a long time
+++    if(un->last_apt_action > 0 &&
+++       (now - un->last_apt_action) >  TIMEOUT_APT_RUN) {
+++       update_apt_is_running(un->update, FALSE);
+++       update_check(un->update);
+++       un->last_apt_action = 0;
+++    }
+++ 
+++    if(un->crashreport_pending) {
+++       g_print("checking for valid crashreport now\n");
+++       crashreport_check (un->crashreport);
+++       un->crashreport_pending = FALSE;
+++    }
+++ 
+++    if(un->unicast_local_avahi_pending) {
+++       g_print("checking for disabled avahi due to unicast .local domain now\n");
+++       avahi_disabled_check ();
+++       un->unicast_local_avahi_pending = FALSE;
+++    }
+++ 
+++    // reset the bitfields (for the next "time-slice")
+++    un->dpkg_was_run = FALSE;
+++    un->apt_get_runing = FALSE;
+++ 
+++    return TRUE;
+++ }
+++ 
+++ 
+++ 
+++ 
+++ /* u_abort seems like an internal error notification.
+++  * End user might not understand the message at all */
+++ void u_abort(gchar *msg)
+++ {
+++    msg = g_strdup_printf("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s\n", _("Internal error"), msg);
+++    gtk_dialog_run(GTK_DIALOG(gtk_message_dialog_new_with_markup(NULL,0,
+++ 						     GTK_MESSAGE_ERROR,
+++ 						     GTK_BUTTONS_CLOSE,
+++ 						     msg)));
+++    g_free(msg);
+++    exit(1);
+++ }
+++ 
+++ // FIXME: get the apt directories with apt-config or something
+++ gboolean monitor_init(UpgradeNotifier *un)
+++ {
+++    int i;
+++    GnomeVFSResult res;
+++    GnomeVFSMonitorHandle *monitor_handle;
+++ 
+++    // monitor thise dirs
+++    static const char *monitor_dirs[] = { 
+++       "/var/lib/apt/lists/", "/var/lib/apt/list/partial", 
+++       "/var/cache/apt/archives/", "/var/cache/apt/archives/partial", 
+++       HOOKS_DIR, 
+++       CRASHREPORT_DIR,
+++       NULL};
+++    for(i=0;monitor_dirs[i] != NULL;i++) {
+++       res = gnome_vfs_monitor_add(&monitor_handle,
+++ 				  monitor_dirs[i],
+++ 				  GNOME_VFS_MONITOR_DIRECTORY,
+++ 				  monitor_cb, un);
+++    }
+++ 
+++    // and those files
+++    static const char *monitor_files[] = { 
+++       "/var/lib/dpkg/status", 
+++       "/var/lib/update-notifier/dpkg-run-stamp", 
+++       REBOOT_FILE,
+++       UNICAST_LOCAL_AVAHI_FILE,
+++       NULL};
+++    for(i=0;monitor_files[i] != NULL;i++) {
+++       res = gnome_vfs_monitor_add(&monitor_handle,
+++ 				  monitor_files[i],
+++ 				  GNOME_VFS_MONITOR_FILE,
+++ 				  monitor_cb, un);
+++    }
+++ 
+++    g_timeout_add (TIMEOUT_FAM, (GSourceFunc)file_monitor_periodic_check, un);
+++ 
+++ 
+++    return TRUE;
+++ }
+++ 
+++ 
+++ 
+++ 
+++ static gboolean
+++ tray_icons_init(UpgradeNotifier *un)
+++ {
+++    //g_debug("tray_icons_init");
+++ 
+++    /* new upates tray icon */
+++    un->update = g_new0 (TrayApplet, 1);
+++ 
+++    trayapplet_create(un->update, "software-update-available");
+++    update_tray_icon_init(un->update);
+++ 
+++    /* update hook icon*/
+++    un->hook = g_new0 (TrayApplet, 1);
+++    trayapplet_create(un->hook, "hook-notifier");
+++    hook_tray_icon_init(un->hook);
+++ 
+++    /* reboot required icon */
+++    un->reboot = g_new0 (TrayApplet, 1);
+++    trayapplet_create(un->reboot, "reboot-notifier");
+++    reboot_tray_icon_init(un->reboot);
+++ 
+++    /* crashreport detected icon */
+++    un->crashreport = g_new0 (TrayApplet, 1);
+++    trayapplet_create(un->crashreport, "apport");
+++    crashreport_tray_icon_init(un->crashreport);
+++ 
+++    return FALSE; // for the tray_destroyed_cb
+++ }
+++ 
+++ // this function checks if the user is in the admin group
+++ // if there is no admin group, we return true becuase there
+++ // is no way to figure if the user is a admin or not
+++ gboolean
+++ in_admin_group()
+++ {
+++    int i, ng = 0;
+++    gid_t *groups = NULL;
+++ 
+++    struct group *grp = getgrnam("admin");
+++    if(grp == NULL) 
+++       return TRUE;
+++ 
+++    ng = getgroups (0, NULL);
+++    groups = (gid_t *) malloc (ng * sizeof (gid_t));
+++ 
+++    i = getgroups (ng, groups);
+++    if (i != ng) {
+++      free (groups);
+++      return TRUE;
+++    }
+++    
+++    for(i=0;i<ng;i++) {
+++       if(groups[i] == grp->gr_gid) {
+++         free(groups);
+++         return TRUE;
+++       }
+++    }
+++    
+++    if(groups != NULL)
+++       free(groups);
+++ 
+++    return FALSE;
+++ }
+++ 
+++ static GOptionEntry entries[] = 
+++ {
+++    { "debug-hooks", 0, 0, G_OPTION_ARG_NONE, &HOOK_DEBUG, "Enable hooks debugging"},
+++    { NULL }
+++ };
+++ 
+++ int 
+++ main (int argc, char *argv[])
+++ {
+++ 	GnomeClient *client;
+++ 	UpgradeNotifier *un;
+++ 
+++ 	// option parsing
+++ 	GOptionContext *context;
+++ 	context = g_option_context_new (" - inform about updates");
+++ 	g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
+++ 	gnome_program_init (PACKAGE, PACKAGE_VERSION, 
+++ 			    LIBGNOMEUI_MODULE,
+++ 			    argc, argv, 
+++ 			    GNOME_PARAM_GOPTION_CONTEXT, context,
+++ 			    GNOME_PARAM_NONE);
+++ 	notify_init("update-notifier");
+++         bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
+++         bind_textdomain_codeset(PACKAGE, "UTF-8");
+++         textdomain(PACKAGE);
+++ 
+++ 	g_set_application_name (_("update-notifier"));
+++ 	gtk_window_set_default_icon_name ("update-notifier");
+++ 
+++ 	//g_print("starting update-notifier\n");
+++ 	
+++ 	// check if we should run at all (see HideAdminTools spec
+++ 	// on https://wiki.ubuntu.com/HideAdminToolsToUsers)
+++ 	if(!in_admin_group()) {
+++ 	   g_warning("not starting because user is not in admin group\n");
+++ 	   exit(0);
+++ 	}
+++ 
+++ 	client = gnome_master_client ();
+++ 	if (up_get_clipboard ())
+++ 	  gnome_client_set_restart_style (client, GNOME_RESTART_ANYWAY);
+++ 	else {
+++ 	   gnome_client_set_restart_style (client, GNOME_RESTART_NEVER);
+++ 	   g_warning ("already running?\n");
+++ 	   return 1;
+++ 	}
+++ 
+++ 	/* Make sure we die when the session dies */
+++ 	g_signal_connect (G_OBJECT (client), "die",
+++ 			  G_CALLBACK (gtk_main_quit), NULL);
+++ 	
+++ 	/* Create the UpgradeNotifier object */
+++ 	un = g_new0 (UpgradeNotifier, 1);
+++ 
+++ 	// check for .update-notifier dir and create if needed
+++ 	gchar *dirname = g_strdup_printf("%s/.update-notifier",
+++ 					 g_get_home_dir());
+++ 	if(!g_file_test(dirname, G_FILE_TEST_IS_DIR))
+++ 	   g_mkdir(dirname, 0700);
+++ 	g_free(dirname);
+++ 
+++ 	// create the icons with a timeout
+++ 	//g_timeout_add(5000, (GSourceFunc)(tray_icons_init), un);
+++ 	tray_icons_init(un);
+++ 
+++         // initial check for avahi
+++         avahi_disabled_check();
+++ 
+++ 	// init hal (needs to be done _after_ the icons are created)
+++ 	/* setup hal so that inserted cdroms can be checked */
+++ 	LibHalContext *hal_ctx = up_do_hal_init();
+++ 	if (!hal_ctx) {
+++ 	   u_abort("failed to initialize HAL!\n");
+++ 	   return 1;
+++ 	}
+++ 	libhal_ctx_set_user_data(hal_ctx, un);
+++ 	
+++ 	// init fam
+++ 	monitor_init(un);
+++ 	
+++ 	/* Start the main gtk loop */
+++ 	gtk_main ();
+++ 
+++ 	return 0;
+++ }

Modified: packages/unstable/update-notifier/debian/patches/06_port_to_gtk2.10.diff
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/update-notifier/debian/patches/06_port_to_gtk2.10.diff?rev=15483&op=diff
==============================================================================
--- packages/unstable/update-notifier/debian/patches/06_port_to_gtk2.10.diff (original)
+++ packages/unstable/update-notifier/debian/patches/06_port_to_gtk2.10.diff Sun Apr  6 15:11:37 2008
@@ -1,6 +1,7 @@
---- src/update.c~	2007-08-27 08:37:17.000000000 -0300
-+++ src/update.c	2007-09-04 20:57:30.000000000 -0300
-@@ -44,8 +44,10 @@
+diff -urN update-notifier-0.70.7.debian/src/update.c update-notifier-0.70.7.debian.new/src/update.c
+--- update-notifier-0.70.7.debian/src/update.c	2008-03-13 17:13:47.000000000 +0100
++++ update-notifier-0.70.7.debian.new/src/update.c	2008-04-06 10:49:00.000000000 +0200
+@@ -48,8 +48,10 @@
  	  guint          activate_time,
  	  TrayApplet     *un)
  {




More information about the pkg-gnome-commits mailing list