5 #include <libempathy/empathy-contact-manager.h>
6 #include <libempathy/empathy-debug.h>
8 #include <libempathy-gtk/empathy-contact-list-store.h>
9 #include <libempathy-gtk/empathy-ui-utils.h>
12 main (int argc
, char **argv
)
14 EmpathyContactManager
*manager
;
16 EmpathyContactListStore
*store
;
19 GtkCellRenderer
*renderer
;
21 gtk_init (&argc
, &argv
);
24 empathy_debug_set_flags (g_getenv ("EMPATHY_DEBUG"));
25 main_loop
= g_main_loop_new (NULL
, FALSE
);
26 manager
= empathy_contact_manager_dup_singleton ();
27 store
= empathy_contact_list_store_new (EMPATHY_CONTACT_LIST (manager
));
28 empathy_contact_list_store_set_is_compact (store
, TRUE
);
29 empathy_contact_list_store_set_show_groups (store
, FALSE
);
30 combo
= gtk_combo_box_new_with_model (GTK_TREE_MODEL (store
));
31 renderer
= gtk_cell_renderer_text_new ();
32 gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo
), renderer
, TRUE
);
33 gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo
), renderer
, "text", EMPATHY_CONTACT_LIST_STORE_COL_NAME
);
34 window
= gtk_window_new (GTK_WINDOW_TOPLEVEL
);
35 gtk_container_add (GTK_CONTAINER (window
), combo
);
36 gtk_widget_show (combo
);
37 gtk_widget_show (window
);
38 g_object_unref (manager
);