From dea532397b8aae0bf89c636627d07021addbe285 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 8 Feb 2007 11:38:20 +0000 Subject: [PATCH] if no default service name is specified, just select the first one we find git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1395 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-ui/avahi-ui.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/avahi-ui/avahi-ui.c b/avahi-ui/avahi-ui.c index 9bbf08e..5436e19 100644 --- a/avahi-ui/avahi-ui.c +++ b/avahi-ui/avahi-ui.c @@ -365,8 +365,9 @@ static void browse_callback( selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->service_tree_view)); if (!gtk_tree_selection_get_selected(selection, NULL, NULL)) { - if (d->service_type && d->service_name && - avahi_domain_equal(d->service_type, type) && strcasecmp(d->service_name, name) == 0) { + if (!d->service_type || + !d->service_name || + (avahi_domain_equal(d->service_type, type) && strcasecmp(d->service_name, name) == 0)) { GtkTreePath *path; gtk_tree_selection_select_iter(selection, &iter); @@ -1308,7 +1309,7 @@ static void aui_service_dialog_get_property(GObject *object, guint prop_id, GVal break; case PROP_TXT_DATA: - g_value_set_pointer(value, aui_service_dialog_get_txt_data(d)); + g_value_set_pointer(value, (gpointer) aui_service_dialog_get_txt_data(d)); break; case PROP_RESOLVE_SERVICE: -- 2.39.5