mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-31 09:44:55 +01:00
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:
parent
023866c58b
commit
6ffa286376
1 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue