Merge lp:~rodrigo-moya/evolution-couchdb/remove-server-gui into lp:evolution-couchdb

Proposed by Rodrigo Moya
Status: Merged
Approved by: Guillermo Gonzalez
Approved revision: 85
Merge reported by: Rodrigo Moya
Merged at revision: not available
Proposed branch: lp:~rodrigo-moya/evolution-couchdb/remove-server-gui
Merge into: lp:evolution-couchdb
Diff against target: 91 lines
1 file modified
plugins/couchdb-contacts-source.c (+17/-15)
To merge this branch: bzr merge lp:~rodrigo-moya/evolution-couchdb/remove-server-gui
Reviewer Review Type Date Requested Status
Guillermo Gonzalez Approve
dobey (community) Approve
Review via email: mp+13849@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Fixed removal of CouchDB addressbook options when switching to another addressbook backend and some UI tweaks

Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

Looks ok.

I'm getting this weird libtool error, but looks like my libtool is busted:

libtool: link: only absolute run-paths are allowed
make[2]: *** [libebookbackendcouchdb.la] Error 1
make[2]: Leaving directory `/home/guillermo/canonical/evolution-couchdb/addressbook'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/guillermo/canonical/evolution-couchdb'
make: *** [all] Error 2

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/couchdb-contacts-source.c'
2--- plugins/couchdb-contacts-source.c 2009-09-22 22:52:32 +0000
3+++ plugins/couchdb-contacts-source.c 2009-10-23 15:15:46 +0000
4@@ -152,11 +152,10 @@
5 {
6 UIData *ui = data;
7
8- if (ui) {
9+ if (ui && ui->vbox)
10 gtk_widget_destroy (ui->vbox);
11- g_object_unref (ui->source);
12- g_free (ui);
13- }
14+
15+ g_free (ui);
16 }
17
18 static void
19@@ -205,8 +204,8 @@
20 ESource *source;
21 ESourceGroup *group;
22 const gchar *base_uri;
23- GtkWidget *parent, *parent_vbox;
24- GtkWidget *table, *label;
25+ GtkWidget *parent;
26+ GtkWidget *table, *label, *parent_vbox;
27 UIData *ui;
28 const gchar *property;
29 EABConfigTargetSource *t = (EABConfigTargetSource *) data->target;
30@@ -216,14 +215,14 @@
31
32 base_uri = e_source_group_peek_base_uri (group);
33
34- g_object_set_data (G_OBJECT (epl), "wwidget", NULL);
35+ g_object_set_data (G_OBJECT (epl), "cwidget", NULL);
36
37- if (strcmp(base_uri, COUCHDB_BASE_URI) != 0)
38+ if (strcmp (base_uri, COUCHDB_BASE_URI) != 0)
39 return NULL;
40
41 /* Build up the UI */
42 ui = g_new0 (UIData, 1);
43- ui->source = g_object_ref (source);
44+ ui->source = t->source;
45
46 parent = data->parent;
47 parent_vbox = gtk_widget_get_ancestor (gtk_widget_get_parent (parent), GTK_TYPE_VBOX);
48@@ -236,26 +235,29 @@
49 gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
50 gtk_box_pack_start (GTK_BOX (ui->vbox), label, FALSE, FALSE, 0);
51
52- table = gtk_table_new (3, 2, FALSE);
53+ table = gtk_table_new (3, 3, FALSE);
54 gtk_box_pack_start (GTK_BOX (ui->vbox), table, TRUE, TRUE, 0);
55
56+ label = gtk_label_new (" ");
57+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
58+
59 ui->user_db_button = gtk_radio_button_new_with_label (NULL, _("Desktop CouchDB"));
60- gtk_table_attach (GTK_TABLE (table), ui->user_db_button, 0, 2, 0, 1,
61+ gtk_table_attach (GTK_TABLE (table), ui->user_db_button, 1, 3, 0, 1,
62 GTK_EXPAND | GTK_FILL, GTK_FILL, 3, 3);
63
64 ui->system_db_button = gtk_radio_button_new_with_label (
65 gtk_radio_button_get_group (GTK_RADIO_BUTTON (ui->user_db_button)),
66 _("System-wide CouchDB"));
67- gtk_table_attach (GTK_TABLE (table), ui->system_db_button, 0, 2, 1, 2,
68+ gtk_table_attach (GTK_TABLE (table), ui->system_db_button, 1, 3, 1, 2,
69 GTK_EXPAND | GTK_FILL, GTK_FILL, 3, 3);
70
71 ui->remote_db_button = gtk_radio_button_new_with_label (
72 gtk_radio_button_get_group (GTK_RADIO_BUTTON (ui->user_db_button)),
73 _("Remote CouchDB server"));
74- gtk_table_attach (GTK_TABLE (table), ui->remote_db_button, 0, 1, 2, 3,
75+ gtk_table_attach (GTK_TABLE (table), ui->remote_db_button, 1, 2, 2, 3,
76 GTK_EXPAND | GTK_FILL, GTK_FILL, 3, 3);
77 ui->remote_db_entry = gtk_entry_new ();
78- gtk_table_attach (GTK_TABLE (table), ui->remote_db_entry, 1, 2, 2, 3,
79+ gtk_table_attach (GTK_TABLE (table), ui->remote_db_entry, 2, 3, 2, 3,
80 GTK_EXPAND | GTK_FILL, GTK_FILL, 3, 3);
81
82 gtk_widget_show_all (ui->vbox);
83@@ -277,7 +279,7 @@
84 gtk_widget_set_sensitive (ui->remote_db_entry, FALSE);
85 }
86
87- g_object_set_data_full (G_OBJECT (epl), "gwidget", ui, destroy_ui_data);
88+ g_object_set_data_full (G_OBJECT (epl), "cwidget", ui, destroy_ui_data);
89 g_signal_connect (ui->vbox, "destroy", G_CALLBACK (gtk_widget_destroyed), &ui->vbox);
90
91 /* Signals */

Subscribers

People subscribed via source and target branches