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.
This commit is contained in:
Moritz Lipp 2010-04-11 11:18:33 +02:00
parent f928221f30
commit f64b82919a

View File

@ -1197,6 +1197,7 @@ sc_abort(Argument* argument)
/* Set back to normal mode */ /* Set back to normal mode */
change_mode(NORMAL); change_mode(NORMAL);
switch_view(Zathura.UI.drawing_area);
} }
void void
@ -2086,6 +2087,8 @@ cmd_info(int argc, char** argv)
if(!Zathura.PDF.document) if(!Zathura.PDF.document)
return TRUE; return TRUE;
static gboolean visible = FALSE;
if(!Zathura.UI.information) if(!Zathura.UI.information)
{ {
GtkListStore *list; GtkListStore *list;
@ -2140,12 +2143,12 @@ cmd_info(int argc, char** argv)
gtk_widget_show_all(Zathura.UI.information); gtk_widget_show_all(Zathura.UI.information);
} }
if(!gtk_widget_get_visible(GTK_WIDGET(Zathura.UI.information))) if(!visible)
switch_view(Zathura.UI.information); switch_view(Zathura.UI.information);
else else
{
switch_view(Zathura.UI.drawing_area); switch_view(Zathura.UI.drawing_area);
}
visible = !visible;
return FALSE; return FALSE;
} }