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

« back to all changes in this revision

Viewing changes to src/reboot.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:
195
195
 
196
196
        // if we are not supposed to show the reboot notification
197
197
        // just skip it 
198
 
        if(gconf_client_get_bool((GConfClient*) ta->user_data,
199
 
                                 GCONF_KEY_HIDE_REBOOT, NULL))
 
198
        if(g_settings_get_boolean((GSettings*) ta->user_data,
 
199
                                  SETTINGS_KEY_HIDE_REBOOT))
200
200
           return;
201
201
        // no auto-open of this dialog 
202
 
        if(gconf_client_get_bool((GConfClient*) ta->user_data,
203
 
                                 GCONF_KEY_AUTO_LAUNCH, NULL)) {
204
 
           g_debug ("Skipping reboot required");
 
202
        if(g_settings_get_boolean((GSettings*) ta->user_data,
 
203
                                  SETTINGS_KEY_AUTO_LAUNCH)) {
 
204
           g_debug ("Skipping reboot required");
205
205
           return;
206
206
        }
207
207
 
227
227
        gtk_status_icon_set_visible (ta->tray_icon, TRUE);
228
228
 
229
229
        /* Check whether the user doesn't like notifications */
230
 
        if (gconf_client_get_bool ((GConfClient*) ta->user_data,
231
 
                                   GCONF_KEY_NO_UPDATE_NOTIFICATIONS, NULL))
 
230
        if (g_settings_get_boolean ((GSettings*) ta->user_data,
 
231
                                    SETTINGS_KEY_NO_UPDATE_NOTIFICATIONS))
232
232
                return;
233
233
 
234
234
        /* Show the notification, after a delay so it doesn't look ugly
274
274
        GdkPixbuf *pixbuf = gtk_icon_theme_load_icon (icon_theme, "un-reboot",
275
275
                                                      48, 0,NULL);
276
276
        gtk_status_icon_set_from_pixbuf (ta->tray_icon, pixbuf);
277
 
        ta->user_data = gconf_client_get_default();
 
277
        ta->user_data = g_settings_new(SETTINGS_SCHEMA);
278
278
 
279
279
        g_signal_connect (G_OBJECT(ta->tray_icon),
280
280
                          "activate",