static void newwindow(Client *c, const Arg *arg, gboolean noembed);
static GtkWidget *createwindow(Client *c);
static void pasteuri(GtkClipboard *clipboard, const char *text, gpointer d);
-static void print(Client *c, const Arg *arg);
+static void print(Client *c, const Arg *a);
static GdkFilterReturn processx(GdkXEvent *xevent, GdkEvent *event,
gpointer d);
static gboolean winevent(GtkWidget *w, GdkEvent *e, Client *c);
}
void
-print(Client *c, const Arg *arg)
+print(Client *c, const Arg *a)
{
- webkit_web_frame_print(webkit_web_view_get_main_frame(c->view));
+ webkit_print_operation_run_dialog(webkit_print_operation_new(c->view),
+ GTK_WINDOW(c->win));
}
GdkFilterReturn
setup(void)
{
int i;
- char *styledirfile, *stylepath;
WebKitWebContext *context;
GError *error = NULL;
cookiefile = buildfile(cookiefile);
scriptfile = buildfile(scriptfile);
cachedir = buildpath(cachedir);
+
if (stylefile == NULL) {
styledir = buildpath(styledir);
for (i = 0; i < LENGTH(styles); i++) {
styles[i].regex);
styles[i].regex = NULL;
}
- styledirfile = g_strconcat(styledir, "/",
- styles[i].style, NULL);
- stylepath = buildfile(styledirfile);
- styles[i].style = g_strconcat("file://", stylepath,
- NULL);
- g_free(styledirfile);
- g_free(stylepath);
+ styles[i].style = g_strconcat(styledir, "/",
+ styles[i].style, NULL);
}
g_free(styledir);
} else {
- stylepath = buildfile(stylefile);
- stylefile = g_strconcat("file://", stylepath, NULL);
- g_free(stylepath);
+ stylefile = buildfile(stylefile);
}
}