+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <string.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <avahi-core/core.h>
-#include <avahi-core/strlst.h>
+#include <avahi-common/strlst.h>
struct ServiceType;
}
if (event == AVAHI_RESOLVER_TIMEOUT)
- gtk_label_set_text(info_label, "<i>Failed to resolve.</i>");
+ gtk_label_set_markup(info_label, "<i>Failed to resolve.</i>");
else
update_label(s, host_name, a, port, txt);
}
int main(int argc, char *argv[]) {
GladeXML *xml;
AvahiServerConfig config;
+ GtkTreeViewColumn *c;
gtk_init(&argc, &argv);
glade_init();
- xml = glade_xml_new("avahi-discover.glade", NULL, NULL);
+ xml = glade_xml_new(AVAHI_INTERFACES_DIR"avahi-discover.glade", NULL, NULL);
main_window = glade_xml_get_widget(xml, "main_window");
g_signal_connect(main_window, "delete-event", (GCallback) main_window_on_delete_event, NULL);
gtk_tree_view_set_model(tree_view, GTK_TREE_MODEL(tree_store));
gtk_tree_view_insert_column_with_attributes(tree_view, -1, "Name", gtk_cell_renderer_text_new(), "text", 0, NULL);
gtk_tree_view_insert_column_with_attributes(tree_view, -1, "Interface", gtk_cell_renderer_text_new(), "text", 1, NULL);
+
+ gtk_tree_view_column_set_resizable(c = gtk_tree_view_get_column(tree_view, 0), TRUE);
+ gtk_tree_view_column_set_sizing(c, GTK_TREE_VIEW_COLUMN_GROW_ONLY);
+ gtk_tree_view_column_set_expand(c, TRUE);
service_type_hash_table = g_hash_table_new((GHashFunc) avahi_domain_hash, (GEqualFunc) avahi_domain_equal);
avahi_server_config_init(&config);
- config.register_hinfo = config.register_addresses = config.announce_domain = config.register_workstation = FALSE;
+ config.publish_hinfo = config.publish_addresses = config.publish_domain = config.publish_workstation = FALSE;
server = avahi_server_new(NULL, &config, NULL, NULL);
avahi_server_config_free(&config);