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;
if (conic_connected && tor_enabled) {
pixbuf = tor_connected ? icon_connected : icon_connecting;
- button.set_value (tor_connected ? "Connected" : "Connecting ...");
+ button.set_value (tor_connected ? _("Connected") : _("Connecting ..."));
} else {
- pixbuf = conic_connected ? icon_disabled : null;
- button.set_value (tor_enabled ? "Disconnected" : "Disabled");
+ pixbuf = null;
+ button.set_value (tor_enabled ? _("Disconnected") : _("Disabled"));
}
set_status_area_icon (pixbuf);
}
var dialog = new Gtk.Dialog ();
var content = (Gtk.VBox) dialog.get_content_area ();
- dialog.set_title ("The Onion Router");
+ dialog.set_title (_("Tor: anonymity online"));
var check = new Hildon.CheckButton (Hildon.SizeType.FINGER_HEIGHT);
- check.set_label ("Enable onion routing");
+ check.set_label (_("Enable onion routing"));
check.set_active (tor_enabled);
content.pack_start (check, true, true, 0);
- dialog.add_button ("Save", Gtk.ResponseType.ACCEPT);
+ dialog.add_button (_("Save"), Gtk.ResponseType.ACCEPT);
dialog.response.connect ((response_id) => {
if (response_id == Gtk.ResponseType.ACCEPT) {
if (!tor_enabled && check.get_active ()) {
// Status menu button
button = new Hildon.Button.with_text (Hildon.SizeType.FINGER_HEIGHT,
Hildon.ButtonArrangement.VERTICAL,
- "The Onion Router",
- tor_enabled ? "Enabled" : "Disabled");
+ _("The Onion Router"),
+ tor_enabled ? _("Enabled") : _("Disabled"));
icon_theme = Gtk.IconTheme.get_default();
try {
pixbuf = icon_theme.load_icon ("tor_onion",
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);
}
construct {
+ // Gettext hook-up
+ Intl.setlocale (LocaleCategory.ALL, "");
+ Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
+ Intl.textdomain (Config.GETTEXT_PACKAGE);
+
// GConf hook-up
gconf = GConf.Client.get_default ();
try {
// Osso hook-up
osso = new Osso.Context (STATUSMENU_TOR_LIBOSSO_SERVICE_NAME,
- "0.0.1",
+ Config.VERSION,
true,
null);