diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-09-11 22:24:42 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-09-25 21:21:50 +0800 |
commit | ff897a9a71c4eb91548f40ab6ea09e17936cd8c1 (patch) | |
tree | b34bf3a8ddfb98d73ed5c9fb47c9161889abf237 /src | |
parent | 091002b85df80403470285c6e8d85617306467a8 (diff) | |
download | gsoc2013-empathy-ff897a9a71c4eb91548f40ab6ea09e17936cd8c1.tar gsoc2013-empathy-ff897a9a71c4eb91548f40ab6ea09e17936cd8c1.tar.gz gsoc2013-empathy-ff897a9a71c4eb91548f40ab6ea09e17936cd8c1.tar.bz2 gsoc2013-empathy-ff897a9a71c4eb91548f40ab6ea09e17936cd8c1.tar.lz gsoc2013-empathy-ff897a9a71c4eb91548f40ab6ea09e17936cd8c1.tar.xz gsoc2013-empathy-ff897a9a71c4eb91548f40ab6ea09e17936cd8c1.tar.zst gsoc2013-empathy-ff897a9a71c4eb91548f40ab6ea09e17936cd8c1.zip |
menu_removed_cb: call g_menu_model_get_n_items() once
No need to call it during each iteration.
https://bugzilla.gnome.org/show_bug.cgi?id=707885
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-roster-window.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c index 018e2200a..9dd7a4e75 100644 --- a/src/empathy-roster-window.c +++ b/src/empathy-roster-window.c @@ -1354,10 +1354,11 @@ roster_window_favorite_chatroom_menu_removed_cb ( EmpathyRosterWindow *self) { GList *chatrooms; - gint i; + guint i, n; - for (i = 0; i < g_menu_model_get_n_items ( - G_MENU_MODEL (self->priv->rooms_section)); i++) + n = g_menu_model_get_n_items (G_MENU_MODEL (self->priv->rooms_section)); + + for (i = 0; i < n; i++) { const gchar *name; |