From 6ffa2863764c8b2e233a39a78d4aea19734fea0c Mon Sep 17 00:00:00 2001 From: neldoreth Date: Sun, 11 Apr 2010 11:18:33 +0200 Subject: [PATCH] Show/hide the document information This patch fixes the document information feature, now it is possible to open up the document information and hide it again. --- zathura.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/zathura.c b/zathura.c index 5bb5d5f..d890b9a 100644 --- a/zathura.c +++ b/zathura.c @@ -1197,6 +1197,7 @@ sc_abort(Argument* argument) /* Set back to normal mode */ change_mode(NORMAL); + switch_view(Zathura.UI.drawing_area); } void @@ -2086,6 +2087,8 @@ cmd_info(int argc, char** argv) if(!Zathura.PDF.document) return TRUE; + static gboolean visible = FALSE; + if(!Zathura.UI.information) { GtkListStore *list; @@ -2140,12 +2143,12 @@ cmd_info(int argc, char** argv) gtk_widget_show_all(Zathura.UI.information); } - if(!gtk_widget_get_visible(GTK_WIDGET(Zathura.UI.information))) + if(!visible) switch_view(Zathura.UI.information); else - { switch_view(Zathura.UI.drawing_area); - } + + visible = !visible; return FALSE; }