[WIP] add avahi error msg
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 *
|
||||
|
||||
@@ -208,7 +208,6 @@
|
||||
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkBox" id="remote_devices_box">
|
||||
<property name="visible">True</property>
|
||||
@@ -216,6 +215,63 @@
|
||||
<property name="spacing">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="remote_no_avahi">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkListBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="activatable">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<child>
|
||||
<object class="GtkAlignment">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">50</property>
|
||||
<property name="bottom_padding">50</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">20</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="max-width-chars">40</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="label">The Avahi daemon is not running. You can run this command to start it now:</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="editable">False</property>
|
||||
<property name="width-request">206</property>
|
||||
<property name="text">systemctl start avahi-daemon</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="remote_no_devices">
|
||||
<property name="visible">True</property>
|
||||
|
||||
Reference in New Issue
Block a user