summaryrefslogtreecommitdiff
path: root/src/dwb.c
diff options
context:
space:
mode:
authorportix <none@none>2013-02-11 22:28:33 +0100
committerportix <none@none>2013-02-11 22:28:33 +0100
commitf15fd379c27390d2b1a1227bebfd025985d41264 (patch)
tree7c0fcd9e246ff1b4033897d9a1f1f2a7eb58784e /src/dwb.c
parent88074c24dbcaf5faf6749c915729683056a9d48a (diff)
parente4d3878ea5c017ba39bee6176d92f4277d13e70a (diff)
downloaddwb-f15fd379c27390d2b1a1227bebfd025985d41264.zip
Automated merge with ssh://bitbucket.org/portix/dwb
Diffstat (limited to 'src/dwb.c')
-rw-r--r--src/dwb.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/dwb.c b/src/dwb.c
index 8d9e97b0..ffd6f119 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -2253,11 +2253,12 @@ dwb_tab_label_set_text(GList *gl, const char *text)
if (v->status->progress != 0)
snprintf(progress, sizeof(progress), "[%2d%%] ", v->status->progress);
- escaped = g_markup_printf_escaped("<span foreground='%s'>%d%s</span> %s%s",
+ escaped = g_markup_printf_escaped("<span foreground='%s'>%d%s</span> %s%s%s",
LP_PROTECTED(v) ? dwb.color.tab_protected_color : dwb.color.tab_number_color,
g_list_position(dwb.state.views, gl) + 1,
LP_VISIBLE(v) ? "*" : "",
progress,
+ v->status->deferred ? "*" : "",
title ? title : "---");
gtk_label_set_markup(GTK_LABEL(v->tablabel), escaped);
@@ -2298,14 +2299,12 @@ dwb_update_status(GList *gl, const char *title)
void
dwb_update_layout()
{
+ const char *title;
for (GList *gl = dwb.state.views; gl; gl = gl->next)
{
- if (!VIEW(gl)->status->deferred)
- {
- View *v = gl->data;
- const char *title = webkit_web_view_get_title(WEBKIT_WEB_VIEW(v->web));
- dwb_tab_label_set_text(gl, title);
- }
+ View *v = gl->data;
+ title = v->status->deferred ? v->status->deferred_uri : webkit_web_view_get_title(WEBKIT_WEB_VIEW(v->web));
+ dwb_tab_label_set_text(gl, title);
}
dwb_update_tabs();
@@ -3013,7 +3012,7 @@ dwb_execute_user_script(KeyMap *km, Arg *a)
char *fifo;
snprintf(nummod, sizeof(nummod), "%d", NUMMOD);
- char *argv[] = { a->arg, (char*)webkit_web_view_get_uri(CURRENT_WEBVIEW()), (char *)webkit_web_view_get_title(CURRENT_WEBVIEW()), (char *)dwb.misc.profile, nummod, a->p, NULL } ;
+ char *argv[] = { a->p, (char*)webkit_web_view_get_uri(CURRENT_WEBVIEW()), (char *)webkit_web_view_get_title(CURRENT_WEBVIEW()), (char *)dwb.misc.profile, nummod, NULL } ;
const char *uri = webkit_web_view_get_uri(CURRENT_WEBVIEW());
if (uri != NULL)
@@ -3026,8 +3025,8 @@ dwb_execute_user_script(KeyMap *km, Arg *a)
list = g_slist_append(list, dwb_navigation_new("DWB_PROFILE", dwb.misc.profile));
list = g_slist_append(list, dwb_navigation_new("DWB_NUMMOD", nummod));
- if (a->p != NULL)
- list = g_slist_append(list, dwb_navigation_new("DWB_ARGUMENT", a->p));
+ if (a->arg != NULL)
+ list = g_slist_append(list, dwb_navigation_new("DWB_ARGUMENT", a->arg));
const char *referer = soup_get_header(dwb.state.fview, "Referer");
if (referer != NULL)
@@ -3049,7 +3048,7 @@ dwb_execute_user_script(KeyMap *km, Arg *a)
env->channel = g_io_channel_unix_new(env->fd);
if (env->channel != NULL)
{
- dwb_set_normal_message(dwb.state.fview, true, "Executing script %s", a->arg);
+ dwb_set_normal_message(dwb.state.fview, true, "Executing script %s", a->p);
env->source = g_io_add_watch(env->channel, G_IO_IN, (GIOFunc)dwb_user_script_cb, env);
g_child_watch_add(pid, (GChildWatchFunc)dwb_user_script_watch, env);
}
@@ -3182,7 +3181,7 @@ dwb_get_scripts()
map->key = "";
map->mod = 0;
}
- FunctionMap fm = { { n->first, n->first }, CP_DONT_SAVE | CP_COMMANDLINE | CP_USERSCRIPT, (Func)dwb_execute_user_script, NULL, POST_SM, { .arg = path }, EP_NONE, {NULL} };
+ FunctionMap fm = { { n->first, n->first }, CP_DONT_SAVE | CP_COMMANDLINE | CP_USERSCRIPT, (Func)dwb_execute_user_script, NULL, POST_SM, { .p = path }, EP_NONE, {NULL} };
*fmap = fm;
map->map = fmap;
dwb.misc.userscripts = g_list_prepend(dwb.misc.userscripts, n);
@@ -4464,7 +4463,7 @@ dwb_parse_command_line(const char *line)
if (token[1] && ! m->map->arg.ro)
{
g_strstrip(token[1]);
- m->map->arg.p = token[1];
+ m->map->arg.arg = token[1];
argument = token[1];
}
if (gtk_widget_has_focus(dwb.gui.entry) && (m->map->prop & CP_OVERRIDE_ENTRY))