]> git.meshlink.io Git - catta/commitdiff
if no default service name is specified, just select the first one we find
authorLennart Poettering <lennart@poettering.net>
Thu, 8 Feb 2007 11:38:20 +0000 (11:38 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 8 Feb 2007 11:38:20 +0000 (11:38 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1395 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-ui/avahi-ui.c

index 9bbf08eb76eea3f19faf29c7d9bc7adab68907bb..5436e1975c4a0151c6ecc3e9bfae3e51c85a9c20 100644 (file)
@@ -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: