aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Rob <rob.manea@gmail.com>2009-11-04 10:43:04 +0100
committerGravatar Rob <rob.manea@gmail.com>2009-11-04 10:43:04 +0100
commit09ca0253c7984296bbb2b62a2106892eca75ac0e (patch)
tree85537585529bd261fe18b39c95cebfb480b1cf46
parent724086a6b2a48330b3655ca4b75327d358fe0ed7 (diff)
remove obsolete code
-rw-r--r--callbacks.c14
-rw-r--r--uzbl-core.c26
-rw-r--r--uzbl-core.h6
3 files changed, 13 insertions, 33 deletions
diff --git a/callbacks.c b/callbacks.c
index 4c6e1db..704414f 100644
--- a/callbacks.c
+++ b/callbacks.c
@@ -354,8 +354,6 @@ progress_change_cb (WebKitWebView* page, gint progress, gpointer data) {
prg_str = itos(progress);
send_event(LOAD_PROGRESS, prg_str, NULL);
g_free(prg_str);
-
- update_title();
}
void
@@ -374,9 +372,6 @@ load_finish_cb (WebKitWebView* page, WebKitWebFrame* frame, gpointer data) {
(void) page;
(void) data;
- if (uzbl.behave.load_finish_handler)
- run_handler(uzbl.behave.load_finish_handler, "");
-
send_event(LOAD_FINISH, webkit_web_frame_get_uri(frame), NULL);
}
@@ -385,9 +380,6 @@ load_start_cb (WebKitWebView* page, WebKitWebFrame* frame, gpointer data) {
(void) page;
(void) frame;
(void) data;
- uzbl.gui.sbar.load_progress = 0;
- if (uzbl.behave.load_start_handler)
- run_handler(uzbl.behave.load_start_handler, "");
send_event(LOAD_START, uzbl.state.uri, NULL);
}
@@ -413,10 +405,6 @@ load_commit_cb (WebKitWebView* page, WebKitWebFrame* frame, gpointer data) {
GString* newuri = g_string_new (webkit_web_frame_get_uri (frame));
uzbl.state.uri = g_string_free (newuri, FALSE);
- if (uzbl.behave.load_commit_handler)
- run_handler(uzbl.behave.load_commit_handler, uzbl.state.uri);
-
- /* event message */
send_event(LOAD_COMMIT, webkit_web_frame_get_uri (frame), NULL);
}
@@ -595,8 +583,8 @@ download_cb (WebKitWebView *web_view, GObject *download, gpointer user_data) {
const gchar* uri = webkit_download_get_uri ((WebKitDownload*)download);
if (uzbl.state.verbose)
printf("Download -> %s\n",uri);
- /* if urls not escaped, we may have to escape and quote uri before this call */
+ /* if urls not escaped, we may have to escape and quote uri before this call */
GString *args = g_string_new(uri);
if (uzbl.net.proxy_url) {
diff --git a/uzbl-core.c b/uzbl-core.c
index 05705ff..f6ff1ab 100644
--- a/uzbl-core.c
+++ b/uzbl-core.c
@@ -69,8 +69,6 @@ XDG_Var XDG[] =
{ "XDG_DATA_DIRS", "/usr/local/share/:/usr/share/" },
};
-/* associate command names to their properties */
-
/* abbreviations to help keep the table's width humane */
#define PTR_V_STR(var, d, fun) { .ptr.s = &(var), .type = TYPE_STR, .dump = d, .writeable = 1, .func = fun }
#define PTR_V_INT(var, d, fun) { .ptr.i = (int*)&(var), .type = TYPE_INT, .dump = d, .writeable = 1, .func = fun }
@@ -89,19 +87,16 @@ const struct var_name_to_ptr_t {
{ "verbose", PTR_V_INT(uzbl.state.verbose, 1, NULL)},
{ "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, update_title)},
- { "status_message", PTR_V_STR(uzbl.gui.sbar.msg, 1, update_title)},
+ { "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, update_title)},
- { "status_background", PTR_V_STR(uzbl.behave.status_background, 1, update_title)},
- { "title_format_long", PTR_V_STR(uzbl.behave.title_format_long, 1, update_title)},
- { "title_format_short", PTR_V_STR(uzbl.behave.title_format_short, 1, update_title)},
+ { "status_format", PTR_V_STR(uzbl.behave.status_format, 1, NULL)},
+ { "status_background", PTR_V_STR(uzbl.behave.status_background, 1, NULL)},
+ { "title_format_long", PTR_V_STR(uzbl.behave.title_format_long, 1, NULL)},
+ { "title_format_short", PTR_V_STR(uzbl.behave.title_format_short, 1, NULL)},
{ "icon", PTR_V_STR(uzbl.gui.icon, 1, set_icon)},
{ "forward_keys", PTR_V_INT(uzbl.behave.forward_keys, 1, NULL)},
- { "load_finish_handler", PTR_V_STR(uzbl.behave.load_finish_handler, 1, NULL)},
- { "load_start_handler", PTR_V_STR(uzbl.behave.load_start_handler, 1, NULL)},
- { "load_commit_handler", PTR_V_STR(uzbl.behave.load_commit_handler, 1, NULL)},
{ "download_handler", PTR_V_STR(uzbl.behave.download_handler, 1, NULL)},
{ "cookie_handler", PTR_V_STR(uzbl.behave.cookie_handler, 1, NULL)},
{ "new_window", PTR_V_STR(uzbl.behave.new_window, 1, NULL)},
@@ -142,13 +137,12 @@ const struct var_name_to_ptr_t {
{ "enforce_96_dpi", PTR_V_INT(uzbl.behave.enforce_96dpi, 1, cmd_enforce_96dpi)},
{ "caret_browsing", PTR_V_INT(uzbl.behave.caret_browsing, 1, cmd_caret_browsing)},
- /* constants (not dumpable or writeable) */
+ /* constants (not dumpable or writeable) */
{ "WEBKIT_MAJOR", PTR_C_INT(uzbl.info.webkit_major, NULL)},
{ "WEBKIT_MINOR", PTR_C_INT(uzbl.info.webkit_minor, NULL)},
{ "WEBKIT_MICRO", PTR_C_INT(uzbl.info.webkit_micro, NULL)},
{ "ARCH_UZBL", PTR_C_STR(uzbl.info.arch, NULL)},
{ "COMMIT", PTR_C_STR(uzbl.info.commit, NULL)},
- { "LOAD_PROGRESS", PTR_C_INT(uzbl.gui.sbar.load_progress, NULL)},
{ "TITLE", PTR_C_STR(uzbl.gui.main_title, NULL)},
{ "SELECTED_URI", PTR_C_STR(uzbl.state.selected_url, NULL)},
{ "NAME", PTR_C_STR(uzbl.state.instance_name, NULL)},
@@ -156,6 +150,7 @@ const struct var_name_to_ptr_t {
{ NULL, {.ptr.s = NULL, .type = TYPE_INT, .dump = 0, .writeable = 0, .func = NULL}}
};
+
/* construct a hash from the var_name_to_ptr array for quick access */
void
create_var_to_name_hash() {
@@ -880,8 +875,9 @@ void
include(WebKitWebView *page, GArray *argv, GString *result) {
(void) page;
(void) result;
- gchar *pe = NULL, *path = NULL;
- gchar *line;
+ gchar *pe = NULL,
+ *path = NULL,
+ *line;
int i=0;
if(!argv_idx(argv, 0))
diff --git a/uzbl-core.h b/uzbl-core.h
index c3fbc12..8c432f0 100644
--- a/uzbl-core.h
+++ b/uzbl-core.h
@@ -43,7 +43,6 @@
/* status bar elements */
typedef struct {
- gint load_progress;
gchar *msg;
} StatusBar;
@@ -81,7 +80,7 @@ enum { FIFO, SOCKET};
typedef struct {
gchar *fifo_path;
gchar *socket_path;
- /* stores (key)"variable name" -> (value)"pointer to this var*/
+ /* stores (key)"variable name" -> (value)"pointer to var*/
GHashTable *proto_var;
gchar *sync_stdout;
@@ -121,9 +120,6 @@ typedef struct {
/* behaviour */
typedef struct {
- gchar* load_finish_handler;
- gchar* load_start_handler;
- gchar* load_commit_handler;
gchar* status_format;
gchar* title_format_short;
gchar* title_format_long;