diff options
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | events.c | 3 | ||||
-rw-r--r-- | events.h | 2 | ||||
-rw-r--r-- | uzbl-core.c | 10 | ||||
-rw-r--r-- | uzbl-core.h | 8 |
5 files changed, 11 insertions, 14 deletions
@@ -455,6 +455,7 @@ Basically all events have this format: - `EVENT [uzbl_instance_name] INSTANCE_EXIT process_id`: uzbl shutdown - `EVENT [uzbl_instance_name] VARIABLE_SET variable_name str|int|float variable_value`. Note: str|int|float denote the type of variable_value - `EVENT [uzbl_instance_name] COMMAND_EXECUTED command_name optional_command_arguments` + - `EVENT [uzbl_instance_name] COMMAND_ERROR command` - `EVENT [uzbl_instance_name] GEOMETRY_CHANGED WIDTHxHEIGHT+X_POSITION+Y_POSITION`: when the size or position of the uzbl window changes - `EVENT [uzbl_instance_name] FIFO_SET path_to_fifo` - `EVENT [uzbl_instance_name] SOCKET_SET path_to_socket` @@ -462,6 +463,7 @@ Basically all events have this format: - `EVENT [uzbl_instance_name] LOAD_START uri` - `EVENT [uzbl_instance_name] LOAD_FINISHED uri` - `EVENT [uzbl_instance_name] LOAD_ERROR reason_of_error` + - `EVENT [uzbl_instance_name] LOAD_PROGRESS percentage` : while the page is loading - `EVENT [uzbl_instance_name] TITLE_CHANGED title_name`: when the title of the webpage (and hence maybe, the window title) changed - `EVENT [uzbl_instance_name] DOWNLOAD_REQUEST download_uri`: when content needs to be downloaded - `EVENT [uzbl_instance_name] LINK_HOVER uri`: mouse hovers over a link @@ -41,7 +41,8 @@ const char *event_table[LAST_EVENT] = { "FOCUS_LOST" , "FOCUS_GAINED" , "FILE_INCLUDED" , - "PLUG_CREATED" + "PLUG_CREATED" , + "COMMAND_ERROR" }; void @@ -13,7 +13,7 @@ enum event_type { INSTANCE_START, INSTANCE_EXIT, LOAD_PROGRESS, LINK_UNHOVER, FORM_ACTIVE, ROOT_ACTIVE, FOCUS_LOST, FOCUS_GAINED, FILE_INCLUDED, - PLUG_CREATED, + PLUG_CREATED, COMMAND_ERROR, /* must be last entry */ LAST_EVENT diff --git a/uzbl-core.c b/uzbl-core.c index 146642c..96a6208 100644 --- a/uzbl-core.c +++ b/uzbl-core.c @@ -88,7 +88,6 @@ const struct var_name_to_ptr_t { { "inject_html", PTR_V_STR(uzbl.behave.inject_html, 0, cmd_inject_html)}, { "geometry", PTR_V_STR(uzbl.gui.geometry, 1, cmd_set_geometry)}, { "keycmd", PTR_V_STR(uzbl.state.keycmd, 1, NULL)}, - { "status_message", PTR_V_STR(uzbl.gui.sbar.msg, 1, NULL)}, { "show_status", PTR_V_INT(uzbl.behave.show_status, 1, cmd_set_status)}, { "status_top", PTR_V_INT(uzbl.behave.status_top, 1, move_statusbar)}, { "status_format", PTR_V_STR(uzbl.behave.status_format, 1, NULL)}, @@ -1491,9 +1490,12 @@ parse_command(const char *cmd, const char *param, GString *result) { send_event(COMMAND_EXECUTED, tmp->str, NULL); g_string_free(tmp, TRUE); } - - } else - g_printerr ("command \"%s\" not understood. ignoring.\n", cmd); + } + else { + gchar *tmp = g_strdup_printf("%s %s", cmd, param?param:""); + send_event(COMMAND_ERROR, tmp, NULL); + g_free(tmp); + } } diff --git a/uzbl-core.h b/uzbl-core.h index 48c99ae..5c291e5 100644 --- a/uzbl-core.h +++ b/uzbl-core.h @@ -41,12 +41,6 @@ #define LENGTH(x) (sizeof x / sizeof x[0]) -/* status bar elements */ -typedef struct { - gchar *msg; -} StatusBar; - - /* gui elements */ typedef struct { GtkWidget* main_window; @@ -68,8 +62,6 @@ typedef struct { GtkWidget *inspector_window; WebKitWebInspector *inspector; - StatusBar sbar; - /* custom context menu item */ GPtrArray *menu_items; } GUI; |