[bijiben] Fix back button from trash view
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] Fix back button from trash view
- Date: Mon, 5 Feb 2018 22:16:31 +0000 (UTC)
commit 4c81a035a698d8bb1ececcbe1965605a3826c57b
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Fri Feb 2 08:34:04 2018 +0530
Fix back button from trash view
The back button wasn't working properly after the user switched
to trash view (only when with empty note in main view).
This commit fixes the issue by switching to the right view
when the back button is pressed.
https://bugzilla.gnome.org/show_bug.cgi?id=793091
src/bjb-controller.c | 2 +-
src/bjb-main-toolbar.c | 1 +
src/bjb-window-base.c | 3 ---
3 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/bjb-controller.c b/src/bjb-controller.c
index 417bab0..733a1d0 100644
--- a/src/bjb-controller.c
+++ b/src/bjb-controller.c
@@ -639,7 +639,7 @@ on_manager_changed (BijiManager *manager,
gtk_list_store_remove (GTK_LIST_STORE (self->model), p_iter);
self->items_to_show = g_list_remove (self->items_to_show, item);
- if (self->items_to_show == NULL)
+ if (self->items_to_show == NULL && group == BIJI_LIVING_ITEMS)
bjb_window_base_switch_to (self->window, BJB_WINDOW_BASE_NO_NOTE);
else
diff --git a/src/bjb-main-toolbar.c b/src/bjb-main-toolbar.c
index aa9db3f..8008bb2 100644
--- a/src/bjb-main-toolbar.c
+++ b/src/bjb-main-toolbar.c
@@ -308,6 +308,7 @@ on_back_button_clicked (BjbMainToolbar *self)
disconnect_note_handlers (self);
bjb_window_base_switch_to (BJB_WINDOW_BASE (self->window),
BJB_WINDOW_BASE_MAIN_VIEW);
+ bjb_main_view_update_model (self->parent);
return;
}
diff --git a/src/bjb-window-base.c b/src/bjb-window-base.c
index 44c3aa9..6637675 100644
--- a/src/bjb-window-base.c
+++ b/src/bjb-window-base.c
@@ -420,9 +420,6 @@ bjb_window_base_switch_to (BjbWindowBase *self, BjbWindowViewType type)
if (type != BJB_WINDOW_BASE_NOTE_VIEW)
destroy_note_if_needed (self);
- if (self->current_view == BJB_WINDOW_BASE_ARCHIVE_VIEW && type == BJB_WINDOW_BASE_NO_NOTE)
- type = self->current_view;
-
switch (type)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]