GtkWidget * contact_list_editor_create_source_combo_box (gchar *name, gchar *string1, gchar *string2, gint int1, gint int2) { const gchar *key = "/apps/evolution/addressbook/sources"; GtkWidget *combo_box; GConfClient *client; ESourceList *source_list; client = gconf_client_get_default (); source_list = e_source_list_new_for_gconf (client, key); combo_box = e_source_combo_box_new (source_list); g_object_unref (source_list); g_object_unref (client); g_signal_connect ( combo_box, "changed", G_CALLBACK ( contact_list_editor_source_menu_changed_cb), NULL); gtk_widget_show (combo_box); return combo_box; }
static gint on_idle_create_widget (const gchar *gconf_path) { GtkWidget *window; GtkWidget *combo_box; ESourceList *source_list; GConfClient *gconf_client; gconf_client = gconf_client_get_default (); source_list = e_source_list_new_for_gconf (gconf_client, gconf_path); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); combo_box = e_source_combo_box_new (source_list); g_signal_connect ( combo_box, "changed", G_CALLBACK (source_changed_cb), NULL); gtk_container_add (GTK_CONTAINER (window), combo_box); gtk_widget_show_all (window); g_object_unref (gconf_client); g_object_unref (source_list); return FALSE; }
static void build_ui (EPilotSettings *ps, ESourceList *source_list) { EPilotSettingsPrivate *priv; GtkWidget *lbl; priv = ps->priv; gtk_table_resize (GTK_TABLE (ps), 2, 2); gtk_container_set_border_width (GTK_CONTAINER (ps), 4); gtk_table_set_col_spacings (GTK_TABLE (ps), 6); lbl = gtk_label_new (_("Sync with:")); gtk_misc_set_alignment (GTK_MISC (lbl), 0.0, 0.5); priv->source = e_source_combo_box_new (source_list); gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, 0, 1); gtk_table_attach_defaults (GTK_TABLE (ps), priv->source, 1, 2, 0, 1); gtk_widget_show (lbl); gtk_widget_show (priv->source); lbl = gtk_label_new (_("Sync Private Records:")); gtk_misc_set_alignment (GTK_MISC (lbl), 0.0, 0.5); priv->secret = gtk_check_button_new (); gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, 1, 2); gtk_table_attach_defaults (GTK_TABLE (ps), priv->secret, 1, 2, 1, 2); gtk_widget_show (lbl); gtk_widget_show (priv->secret); #if 0 lbl = gtk_label_new (_("Sync Categories:")); gtk_misc_set_alignment (GTK_MISC (lbl), 0.0, 0.5); priv->cat = gtk_check_button_new (); gtk_table_attach_defaults (GTK_TABLE (ps), lbl, 0, 1, 2, 3); gtk_table_attach_defaults (GTK_TABLE (ps), priv->cat, 1, 2, 2, 3); gtk_widget_show (lbl); gtk_widget_show (priv->cat); #endif }