using Hildon;
public class LiftDetailWindow : StackableWindow {
- private const string BROWSER_SERVICE = "com.nokia.osso_browser";
- private const string BROWSER_PATH = "/com/nokia/osso_browser";
- private const string BROWSER_IF = "com.nokia.osso_browser";
-
private const string CALENDAR_SERVICE = "com.nokia.calendar";
private const string CALENDAR_PATH = "/com/nokia/calendar";
private const string CALENDAR_IF = "com.nokia.calendar";
string phone_number = E.normalize_phone_number (lift.phone);
button_phone.value = phone_number;
button_sms.value = phone_number;
+ } else if (lift.phone2 != null) {
+ button_phone.title = _("Phone");
+ string phone_number = E.normalize_phone_number (lift.phone2);
+ button_phone.value = phone_number;
+ button_sms.value = phone_number;
}
if (lift.email_image_uri != null) {
}
void on_goto_website_clicked () {
- var url = "http://mitfahrclub.adac.de" + lift.href;
-
- try {
- var conn = DBus.Bus.get (DBus.BusType.SESSION);
-
- dynamic DBus.Object browser = conn.get_object (BROWSER_SERVICE, BROWSER_PATH, BROWSER_IF);
- browser.open_new_window (url, false);
- } catch (Error e) {
- stderr.printf ("Error: %s\n", e.message);
- Banner.show_information (this, null, _("Failed to open browser."));
- }
+ BeifahrerProgram.open_browser (this, adac.get_lift_details_url (lift));
}
bool on_image_eventbox_button_pressed (Gdk.EventButton event) {