~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to src/update-notifier.c

  • Committer: Brian Murray
  • Date: 2013-06-03 20:55:52 UTC
  • Revision ID: brian@canonical.com-20130603205552-cmsdkfwtbf24sz55
* Remove support for choosing not to auto-launch applications (LP: #947008)
* Remove reboot required notification as update-manager itself indicates
  when a reboot is required and it only appeared when auto-launch was set to
  false.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include "update.h"
43
43
#include "hooks.h"
44
44
#include "cdroms.h"
45
 
#include "reboot.h"
46
45
#include "uevent.h"
47
46
#include "crash.h"
48
47
#include "avahi.h"
249
248
      g_debug_inotify("dpkg_was_run=TRUE");
250
249
      un->dpkg_was_run = TRUE;
251
250
   } 
252
 
   if(strstr(info_uri, REBOOT_FILE)) {
253
 
      g_debug_inotify("reboot required");
254
 
      un->reboot_pending = TRUE;
255
 
   }
256
251
   if(strstr(info_uri, HOOKS_DIR)) {
257
252
      g_debug_inotify("new hook!");
258
253
      un->hook_pending = TRUE;
274
269
 * - apt_get_running: set when apt/dpkg activity is detected (in the
275
270
 *                    lists-dir, archive-cache, or /var/lib/dpkg/status)
276
271
 * - hook_pending: we have new upgrade hoook information
277
 
 * - reboot_pending: we need to reboot
278
272
 * - crashreport_pending: we have a new crashreport
279
273
 * - unicast_local_avahi_pending: avahi got disabled due to a unicast .local domain
280
274
 *
313
307
      update_apt_is_running(un->update, FALSE);
314
308
      if(un->update_finished_timer > 0) 
315
309
         g_source_remove(un->update_finished_timer);
316
 
      
317
 
      if(un->reboot_pending) {
318
 
         //g_print("checking reboot now\n");
319
 
         reboot_check (un->reboot);
320
 
         un->reboot_pending = FALSE;
321
 
      }
322
310
 
323
311
      // apt must be finished when a new stamp file was written, so we
324
312
      // reset the apt_get_running time-slice field because its not
406
394
      "/var/lib/dpkg/status", 
407
395
      "/var/lib/update-notifier/dpkg-run-stamp", 
408
396
      "/var/lib/apt/periodic/update-success-stamp",
409
 
      REBOOT_FILE,
410
397
      UNICAST_LOCAL_AVAHI_FILE,
411
398
      NULL};
412
399
   for(i=0;monitor_files[i] != NULL;i++) {
449
436
   trayapplet_create(un->hook, un, "hook-notifier");
450
437
   hook_tray_icon_init(un->hook);
451
438
 
452
 
   /* reboot required icon */
453
 
   un->reboot = g_new0 (TrayApplet, 1);
454
 
   trayapplet_create(un->reboot, un, "un-reboot");
455
 
   reboot_tray_icon_init(un->reboot);
456
 
 
457
439
   /* crashreport detected icon */
458
440
   un->crashreport = g_new0 (TrayApplet, 1);
459
441
   trayapplet_create(un->crashreport, un, "apport");