Skip to content
Snippets Groups Projects
Commit acb6bf2c authored by Guillaume Roguez's avatar Guillaume Roguez Committed by Tristan Matthews
Browse files

gnome : fix account order move

Refs #52027

Change-Id: I135c6606753f98783319c1372d51459b4280dda6
parent 8786f892
No related branches found
No related tags found
No related merge requests found
......@@ -236,7 +236,7 @@ account_list_move_up(guint account_index)
void
account_list_move_down(guint account_index)
{
if (account_index != accountQueue->length) {
if (account_index < accountQueue->length-1) {
gpointer acc = g_queue_pop_nth(accountQueue, account_index);
g_queue_push_nth(accountQueue, acc, account_index + 1);
}
......
......@@ -354,7 +354,7 @@ account_move(gboolean move_up, gpointer data)
GtkTreePath *tree_path = gtk_tree_path_new_from_string(path);
gint *indices = gtk_tree_path_get_indices(tree_path);
const gint pos = indices[0];
const gint pos = indices[0] - 1; /* black magic : gtk tree order is not account queue order */
// Depending on button direction get new path
if (move_up)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment