Arg a;
c = g_hash_table_lookup(vp.behave.commands, name);
if (!c) {
- vp_echo(VP_MSG_ERROR, "Command '%s' not found", name);
+ vp_echo(VP_MSG_ERROR, TRUE, "Command '%s' not found", name);
return FALSE;
}
a.i = c->arg.i;
if (!token[1]) {
/* TODO display current value */
g_strfreev(token);
- vp_echo(VP_MSG_ERROR, "No param given");
+ vp_echo(VP_MSG_ERROR, TRUE, "No param given");
return FALSE;
}
success = setting_run(token[0], token[1] ? token[1] : NULL);
static gboolean vp_hide_message(void)
{
- /* do not clean in command mode */
- if (CLEAN_MODE(vp.state.mode) == VP_MODE_COMMAND) {
- return FALSE;
- }
-
- vp_set_widget_font(
- vp.gui.inputbox,
- &vp.style.input_fg[VP_MSG_NORMAL],
- &vp.style.input_bg[VP_MSG_NORMAL],
- vp.style.input_font[VP_MSG_NORMAL]
- );
-
- gtk_entry_set_text(GTK_ENTRY(vp.gui.inputbox), "");
+ vp_echo(VP_MSG_NORMAL, FALSE, "");
return FALSE;
}
/* echo message if given */
if (arg->s) {
- vp_echo(VP_MSG_NORMAL, arg->s);
+ vp_echo(VP_MSG_NORMAL, FALSE, arg->s);
}
vp_update_statusbar();
g_string_free(status, TRUE);
}
-void vp_echo(const MessageType type, const char *error, ...)
+void vp_echo(const MessageType type, gboolean hide, const char *error, ...)
{
va_list arg_list;
/* functions */
void vp_update_statusbar(void);
void vp_update_urlbar(const gchar* uri);
-void vp_echo(const MessageType type, const char* error, ...);
+void vp_echo(const MessageType type, gboolean hide, const char *error, ...);
gboolean vp_set_mode(const Arg* arg);
void vp_set_widget_font(GtkWidget* widget, const GdkColor* fg, const GdkColor* bg, PangoFontDescription* font);
gboolean vp_load_uri(const Arg* arg);
gboolean result = FALSE;
Setting* s = g_hash_table_lookup(vp.settings, name);
if (!s) {
- vp_echo(VP_MSG_ERROR, "Config '%s' not found", name);
+ vp_echo(VP_MSG_ERROR, TRUE, "Config '%s' not found", name);
return FALSE;
}
* it to the arg of the setting */
a = util_char_to_arg(param, s->type);
if (a == NULL) {
- vp_echo(VP_MSG_ERROR, "No valid value");
+ vp_echo(VP_MSG_ERROR, TRUE, "No valid value");
return FALSE;
}