Implemented toggle inputbar/statusbar

This commit is contained in:
Moritz Lipp 2011-02-10 10:10:58 +08:00
parent 9c27ab49e8
commit c41f945994

View File

@ -208,6 +208,15 @@ sc_toggle_index(girara_session_t* session, girara_argument_t* argument, unsigned
bool
sc_toggle_inputbar(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
if (session == NULL) {
return false;
}
if(GTK_WIDGET_VISIBLE(GTK_WIDGET(session->gtk.inputbar)))
gtk_widget_hide(GTK_WIDGET(session->gtk.inputbar));
else
gtk_widget_show(GTK_WIDGET(session->gtk.inputbar));
return false;
}
@ -234,6 +243,15 @@ sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* argument, uns
bool
sc_toggle_statusbar(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
if (session == NULL) {
return false;
}
if(GTK_WIDGET_VISIBLE(GTK_WIDGET(session->gtk.statusbar)))
gtk_widget_hide(GTK_WIDGET(session->gtk.statusbar));
else
gtk_widget_show(GTK_WIDGET(session->gtk.statusbar));
return false;
}