Merge lp:~rodrigo-moya/ubuntuone-client/same-selection-in-both-tabs into lp:ubuntuone-client

Proposed by Rodrigo Moya
Status: Merged
Approved by: Rodrigo Moya
Approved revision: 495
Merged at revision: not available
Proposed branch: lp:~rodrigo-moya/ubuntuone-client/same-selection-in-both-tabs
Merge into: lp:ubuntuone-client
Diff against target: 55 lines (+35/-2)
1 file modified
nautilus/contacts-view.c (+35/-2)
To merge this branch: bzr merge lp:~rodrigo-moya/ubuntuone-client/same-selection-in-both-tabs
Reviewer Review Type Date Requested Status
Eric Casteleijn (community) Approve
Rick McBride (community) Approve
Review via email: mp+23385@code.launchpad.net

Commit message

Match the selection in both views of the contacts picker

Description of the change

Match the selection in both views of the contacts picker

To post a comment you must log in.
Revision history for this message
Rick McBride (rmcbride) :
review: Approve
Revision history for this message
Eric Casteleijn (thisfred) wrote :

looks good, tests pass.

review: Approve
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :
Download full text (33.7 KiB)

The attempt to merge lp:~rodrigo-moya/ubuntuone-client/same-selection-in-both-tabs into lp:ubuntuone-client failed.Below is the output from the failed tests.

/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
(B testing autoconf2.50... not found.
  testing autoconf... found 2.65
checking for automake >= 1.10...
(B testing automake-1.11... found 1.11.1
checking for libtool >= 1.5...
(B testing libtoolize... found 2.2.6b
checking for intltool >= 0.30...
(B testing intltoolize... found 0.41.0
checking for pkg-config >= 0.14.0...
(B testing pkg-config... found 0.22
Checking for required M4 macros...
(BChecking for forbidden M4 macros...
(BProcessing ./configure.ac
(BRunning libtoolize...
(Blibtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
Running intltoolize...
(BRunning aclocal-1.11...
(BRunning autoconf...
(BRunning autoheader...
(BRunning automake-1.11...
(BRunning ./configure --prefix=/usr ...
(Bchecking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files......

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'nautilus/contacts-view.c'
--- nautilus/contacts-view.c 2010-04-13 18:45:30 +0000
+++ nautilus/contacts-view.c 2010-04-14 12:34:25 +0000
@@ -129,10 +129,9 @@
129{129{
130 GtkTreeModel *model;130 GtkTreeModel *model;
131 GList *selected_items, *l;131 GList *selected_items, *l;
132 GtkWidget *other_icon_view = NULL;
132 ContactsView *cv = CONTACTS_VIEW (data);133 ContactsView *cv = CONTACTS_VIEW (data);
133134
134 g_debug ("Selection_changed called");
135
136 /* We first remove all the previous selected items */135 /* We first remove all the previous selected items */
137 g_hash_table_remove_all (cv->selection);136 g_hash_table_remove_all (cv->selection);
138137
@@ -170,6 +169,40 @@
170 g_list_foreach (selected_items, (GFunc) gtk_tree_path_free, NULL);169 g_list_foreach (selected_items, (GFunc) gtk_tree_path_free, NULL);
171 g_list_free (selected_items);170 g_list_free (selected_items);
172171
172 /* Set the same selection on the other view */
173 if (GTK_ICON_VIEW (cv->recently_used_view) == icon_view)
174 other_icon_view = cv->alphabetical_view;
175 else if (GTK_ICON_VIEW (cv->alphabetical_view) == icon_view)
176 other_icon_view = cv->recently_used_view;
177
178 if (other_icon_view != NULL) {
179 GtkTreeModel *model;
180 GtkTreeIter current_row;
181
182 g_signal_handlers_block_by_func (G_OBJECT (other_icon_view), selection_changed_cb, data);
183
184 model = gtk_icon_view_get_model (GTK_ICON_VIEW (other_icon_view));
185 if (gtk_tree_model_get_iter_first (model, &current_row)) {
186 gchar *current_name;
187
188 do {
189 gtk_tree_model_get (model, &current_row,
190 CONTACTS_VIEW_COLUMN_NAME, &current_name,
191 -1);
192 if (g_hash_table_lookup (cv->selection, current_name)) {
193 gtk_icon_view_select_path (GTK_ICON_VIEW (other_icon_view),
194 gtk_tree_model_get_path (model, &current_row));
195 } else {
196 gtk_icon_view_unselect_path (GTK_ICON_VIEW (other_icon_view),
197 gtk_tree_model_get_path (model, &current_row));
198 }
199 } while (gtk_tree_model_iter_next (model, &current_row));
200 }
201
202 g_signal_handlers_unblock_by_func (G_OBJECT (other_icon_view), selection_changed_cb, data);
203 }
204
205 /* Notify listeners the selection has changed */
173 g_signal_emit_by_name (cv, "selection-changed", NULL);206 g_signal_emit_by_name (cv, "selection-changed", NULL);
174}207}
175208

Subscribers

People subscribed via source and target branches