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

« back to all changes in this revision

Viewing changes to src/update-notifier.c

  • Committer: Michael Terry
  • Date: 2011-07-13 14:54:42 UTC
  • mto: This revision was merged to the branch mainline in revision 631.
  • Revision ID: michael.terry@canonical.com-20110713145442-4b0pkrbebadn99h6
convert to gsettings

Show diffs side-by-side

added added

removed removed

Lines of Context:
489
489
    * (see /usr/share/gdm/guest-session/guest-session-setup.sh)
490
490
    */
491
491
   int end_system_uid = 500;
492
 
   GConfClient *gconf = gconf_client_get_default();
493
 
   if (gconf) {
494
 
      int i = gconf_client_get_int(gconf, GCONF_KEY_END_SYSTEM_UIDS, NULL);
495
 
      if (i>0)
496
 
         end_system_uid = i;
497
 
   }
 
492
   GSettings *settings = g_settings_new(SETTINGS_SCHEMA);
 
493
   int i = g_settings_get_int(settings, SETTINGS_KEY_END_SYSTEM_UIDS);
 
494
   if (i>0)
 
495
      end_system_uid = i;
 
496
   g_object_unref(settings);
498
497
 
499
498
   uid_t uid = getuid();
500
499
   if (uid < end_system_uid)
600
599
 
601
600
        // do not run as system user (e.g. guest user)
602
601
        if (FORCE_RELEASE_CHECK) {
603
 
           GConfClient *gconf = gconf_client_get_default();
604
 
           gconf_client_unset(gconf, GCONF_KEY_LAST_RELEASE_CHECK, NULL);
 
602
           GSettings *settings = g_settings_new(SETTINGS_SCHEMA);
 
603
           g_settings_reset(settings, SETTINGS_KEY_LAST_RELEASE_CHECK);
 
604
           g_object_unref(settings);
605
605
        }
606
606
 
607
607
        // check if it is running already