Hildon.Button button;
// Icons
- Gdk.Pixbuf icon_disabled;
Gdk.Pixbuf icon_connecting;
Gdk.Pixbuf icon_connected;
if (tor_enabled && tor_connected && icon_connected == null) try {
icon_theme = Gtk.IconTheme.get_default ();
- pixbuf = icon_theme.load_icon ("tor_status_connected",
+ pixbuf = icon_theme.load_icon ("statusarea_tor_connected",
STATUS_AREA_ICON_SIZE,
Gtk.IconLookupFlags.NO_SVG);
icon_connected = pixbuf;
} catch (Error e) {
error (e.message);
}
- if (!tor_enabled && icon_disabled == null) try {
- icon_theme = Gtk.IconTheme.get_default ();
- pixbuf = icon_theme.load_icon ("tor_status_disabled",
- STATUS_AREA_ICON_SIZE,
- Gtk.IconLookupFlags.NO_SVG);
- icon_disabled = pixbuf;
- } catch (Error e) {
- error (e.message);
- }
if (tor_enabled && !tor_connected && icon_connecting == null) try {
icon_theme = Gtk.IconTheme.get_default ();
- pixbuf = icon_theme.load_icon ("tor_status_connecting",
+ pixbuf = icon_theme.load_icon ("statusarea_tor_connecting",
STATUS_AREA_ICON_SIZE,
Gtk.IconLookupFlags.NO_SVG);
icon_connecting = pixbuf;
pixbuf = tor_connected ? icon_connected : icon_connecting;
button.set_value (tor_connected ? _("Connected") : _("Connecting ..."));
} else {
- pixbuf = conic_connected ? icon_disabled : null;
+ pixbuf = null;
button.set_value (tor_enabled ? _("Disconnected") : _("Disabled"));
}
set_status_area_icon (pixbuf);
error (e.message);
}
button.set_alignment (0.0f, 0.5f, 1.0f, 1.0f);
+ button.set_style (Hildon.ButtonStyle.PICKER);
button.clicked.connect (button_clicked_cb);
add (button);