Fullscreen

It is now possible to enable a fullscreen mode.
This commit is contained in:
Moritz Lipp 2010-05-24 09:38:54 +02:00
parent f0c0c7b8ee
commit ecfe451807
2 changed files with 25 additions and 0 deletions

View File

@ -65,6 +65,7 @@ Shortcut shortcuts[] = {
/* mask, key, function, mode, argument */ /* mask, key, function, mode, argument */
{GDK_CONTROL_MASK, GDK_n, sc_toggle_statusbar, NORMAL, {0} }, {GDK_CONTROL_MASK, GDK_n, sc_toggle_statusbar, NORMAL, {0} },
{GDK_CONTROL_MASK, GDK_m, sc_toggle_inputbar, NORMAL, {0} }, {GDK_CONTROL_MASK, GDK_m, sc_toggle_inputbar, NORMAL, {0} },
{0, GDK_F5, sc_toggle_fullscreen, NORMAL, {0} },
{GDK_CONTROL_MASK, GDK_q, sc_quit, -1, {0} }, {GDK_CONTROL_MASK, GDK_q, sc_quit, -1, {0} },
{GDK_CONTROL_MASK, GDK_c, sc_abort, -1, {0} }, {GDK_CONTROL_MASK, GDK_c, sc_abort, -1, {0} },
{GDK_CONTROL_MASK, GDK_i, sc_recolor, NORMAL, {0} }, {GDK_CONTROL_MASK, GDK_i, sc_recolor, NORMAL, {0} },

View File

@ -322,6 +322,7 @@ void sc_switch_goto_mode(Argument*);
void sc_navigate_index(Argument*); void sc_navigate_index(Argument*);
void sc_toggle_index(Argument*); void sc_toggle_index(Argument*);
void sc_toggle_inputbar(Argument*); void sc_toggle_inputbar(Argument*);
void sc_toggle_fullscreen(Argument*);
void sc_toggle_statusbar(Argument*); void sc_toggle_statusbar(Argument*);
void sc_quit(Argument*); void sc_quit(Argument*);
@ -1791,6 +1792,29 @@ sc_toggle_inputbar(Argument* argument)
gtk_widget_show(GTK_WIDGET(Zathura.UI.inputbar)); gtk_widget_show(GTK_WIDGET(Zathura.UI.inputbar));
} }
void
sc_toggle_fullscreen(Argument* argument)
{
static gboolean fs = TRUE;
if(fs)
{
gtk_window_fullscreen(GTK_WINDOW(Zathura.UI.window));
gtk_widget_hide(GTK_WIDGET(Zathura.UI.inputbar));
gtk_widget_hide(GTK_WIDGET(Zathura.UI.statusbar));
fs = FALSE;
}
else
{
gtk_window_unfullscreen(GTK_WINDOW(Zathura.UI.window));
gtk_widget_show(GTK_WIDGET(Zathura.UI.inputbar));
gtk_widget_show(GTK_WIDGET(Zathura.UI.statusbar));
fs = TRUE;
}
}
void void
sc_toggle_statusbar(Argument* argument) sc_toggle_statusbar(Argument* argument)
{ {