g_string_free(status, TRUE);
}
-void vb_update_status_style()
+void vb_update_status_style(void)
{
- StatusType type = vb.state.status;
+ StatusType type = vb.state.status_type;
vb_set_widget_font(
vb.gui.eventbox, &vb.style.status_fg[type], &vb.style.status_bg[type], vb.style.status_font[type]
);
);
}
-void vb_update_input_style(MessageType type)
+void vb_update_input_style(void)
{
+ MessageType type = vb.state.input_type;
vb_set_widget_font(
vb.gui.inputbox, &vb.style.input_fg[type], &vb.style.input_bg[type], vb.style.input_font[type]
);
static gboolean vb_hide_message()
{
- vb_echo(VB_MSG_NORMAL, FALSE, "");
+ vb_inputbox_print(FALSE, VB_MSG_NORMAL, FALSE, "");
return FALSE;
}
static void vb_set_status(const StatusType status)
{
- if (vb.state.status != status) {
- vb.state.status = status;
+ if (vb.state.status_type != status) {
+ vb.state.status_type = status;
/* update the statusbar style only if the status changed */
vb_update_status_style();
}
return;
}
- vb_update_input_style(type);
+ /* apply input style only if the message type was changed */
+ if (type != vb.state.input_type) {
+ vb.state.input_type = type;
+ vb_update_input_style();
+ }
gtk_entry_set_text(GTK_ENTRY(vb.gui.inputbox), message);
gtk_editable_set_position(GTK_EDITABLE(vb.gui.inputbox), strlen(message) > INPUT_LENGTH ? 0 : -1);
if (hide) {
keybind_init();
vb_read_config();
- vb_update_status_style();
- vb_update_input_style(VB_MSG_NORMAL);
+ /* initially apply input style */
+ vb_update_input_style();
/* make sure the main window and all its contents are visible */
gtk_widget_show_all(gui->window);
char modkey;
guint count;
guint progress;
- StatusType status;
+ StatusType status_type;
+ MessageType input_type;
gboolean is_inspecting;
SearchDirection search_dir;
char* search_query;
void vb_set_widget_font(GtkWidget* widget, const VbColor* fg, const VbColor* bg, PangoFontDescription* font);
void vb_update_statusbar(void);
void vb_update_status_style(void);
-void vb_update_input_style(MessageType type);
+void vb_update_input_style(void);
void vb_update_urlbar(const char* uri);
#endif /* end of include guard: _MAIN_H */