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

« back to all changes in this revision

Viewing changes to src/update.c

  • Committer: mvo
  • Date: 2005-02-08 00:25:09 UTC
  • Revision ID: gustavo@niemeyer.net-20050208002509-a211f90ce9367f80
* cleanups:
  - configure.in: no longer need libglade
  - src/update-notifier{c,h}: we no longer use dbus directly only libhal
  - src/update.c: added comment to update_check() 
  - README: reflect the latest developments (no direct dbus use etc)
  - data/Makefile.am: don't distribute the dbus helper script

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
{
79
79
   invoke_with_gksu("/usr/bin/gnome-software-properties",
80
80
                    _("Software preferences"));    
81
 
#if 0
82
 
   int i;
83
 
   //g_print("Trying to open: %s\n",GLADEDIR"/preferences.glade");
84
 
   TrayApplet *un = user_data;
85
 
 
86
 
   GladeXML *xml = glade_xml_new(GLADEDIR"/preferences.glade",
87
 
                                 "preferences", NULL);
88
 
   GtkWidget *prefs = glade_xml_get_widget(xml, "preferences");
89
 
   GtkWidget *combo = glade_xml_get_widget(xml, "combobox_default");
90
 
 
91
 
   for(i=0;actions[i][0]!=NULL;i++) {
92
 
      gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _(actions[i][1]));
93
 
   }
94
 
   int default_action = gconf_client_get_int(un->user_data,
95
 
                                             GCONF_KEY_DEFAULT_ACTION, NULL);
96
 
   gtk_combo_box_set_active(GTK_COMBO_BOX(combo), default_action);
97
 
 
98
 
   int res = gtk_dialog_run(GTK_DIALOG(prefs));
99
 
   if(res == GTK_RESPONSE_CLOSE) {
100
 
      int index = gtk_combo_box_get_active(GTK_COMBO_BOX(combo));
101
 
      gconf_client_set_int(un->user_data, GCONF_KEY_DEFAULT_ACTION, 
102
 
                           index, NULL);
103
 
   }
104
 
   gtk_widget_destroy(prefs);
105
 
#endif
106
81
}
107
82
 
108
83
void
148
123
   return FALSE; 
149
124
}
150
125
 
 
126
// jesus: this needs to run async! (g_spawn_async())
151
127
gboolean
152
128
update_check (TrayApplet *ta)
153
129
{
174
150
      gtk_widget_show(GTK_WIDGET(ta->tray_icon));
175
151
   }
176
152
   //g_print("upgrades: %i\n", un->num_upgrades);
 
153
 
 
154
 
 
155
   update_trayicon_update_tooltip(ta, 22);
177
156
   return TRUE;
178
157
}
179
158