diff --git a/src/teleport-app.c b/src/teleport-app.c index 0b4cea9..4105bd5 100644 --- a/src/teleport-app.c +++ b/src/teleport-app.c @@ -294,8 +294,11 @@ teleport_app_startup (GApplication *app) { g_signal_connect (app, "notify_user", (GCallback)callback_notify_user, priv->window); teleport_server_run(); - teleport_publish_run (teleport_get_device_name()); - teleport_browser_run_avahi_service(priv->peerList); + + if (!teleport_publish_run (teleport_get_device_name())) + if (!teleport_browser_run_avahi_service(priv->peerList)) { + /* Error when avahi doesn't run */ + } } static void diff --git a/src/teleport-window.c b/src/teleport-window.c index fe134aa..ccee64e 100644 --- a/src/teleport-window.c +++ b/src/teleport-window.c @@ -40,6 +40,7 @@ struct _TeleportWindowPrivate GtkWidget *remote_devices_box; GtkWidget *this_device_name_label; GtkWidget *remote_no_devices; + GtkWidget *remote_no_avahi; }; G_DEFINE_TYPE_WITH_PRIVATE(TeleportWindow, teleport_window, GTK_TYPE_APPLICATION_WINDOW); @@ -190,6 +191,7 @@ teleport_window_class_init (TeleportWindowClass *class) gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), TeleportWindow, this_device_name_label); gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), TeleportWindow, remote_no_devices); gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), TeleportWindow, remote_devices_box); + gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), TeleportWindow, remote_no_avahi); } TeleportWindow * diff --git a/src/window.ui b/src/window.ui index 5e8c0f2..fe0b0c6 100644 --- a/src/window.ui +++ b/src/window.ui @@ -208,7 +208,6 @@ - True @@ -216,6 +215,63 @@ 6 6 vertical + + + True + False + in + + + True + True + none + + + True + False + False + False + + + True + False + 50 + 50 + + + True + 20 + vertical + + + True + False + 40 + center + True + center + The Avahi daemon is not running. You can run this command to start it now: + + + + + True + center + False + 206 + systemctl start avahi-daemon + + + + + + + + + + + + True