changeset: 122:3cfd2fe1f380
tag: tip
user: Enno Boland (tox) <tox_AT_s01.de>
date: Fri Oct 16 10:55:05 2009 +0200
files: surf.c
description:
improving urlbar hiding.
diff -r baacf52217d1 -r 3cfd2fe1f380 surf.c
--- a/surf.c Thu Oct 15 16:31:49 2009 +0200
+++ b/surf.c Fri Oct 16 10:55:05 2009 +0200
@@ -117,7 +117,7 @@
static void showurl(Client *c, const Arg *arg);
static void stop(Client *c, const Arg *arg);
static void titlechange(WebKitWebView* view, WebKitWebFrame* frame, const gchar* title, Client *c);
-static gboolean unfocusbar(GtkWidget *w, GdkEventFocus *e, Client *c);
+static gboolean focusview(GtkWidget *w, GdkEventFocus *e, Client *c);
static void usage(void);
static void update(Client *c);
static void updatewinid(Client *c);
@@ -419,16 +419,15 @@
g_signal_connect(G_OBJECT(c->view), "download-requested", G_CALLBACK(initdownload), c);
g_signal_connect(G_OBJECT(c->view), "window-object-cleared", G_CALLBACK(windowobjectcleared), c);
g_signal_connect_after(session, "request-started", G_CALLBACK(request), c);
+ g_signal_connect(G_OBJECT(c->view), "focus-in-event", G_CALLBACK(focusview), c);
/* urlbar */
c->urlbar = gtk_entry_new();
gtk_entry_set_has_frame(GTK_ENTRY(c->urlbar), FALSE);
- g_signal_connect(G_OBJECT(c->urlbar), "focus-out-event", G_CALLBACK(unfocusbar), c);
/* searchbar */
c->searchbar = gtk_entry_new();
gtk_entry_set_has_frame(GTK_ENTRY(c->searchbar), FALSE);
- g_signal_connect(G_OBJECT(c->searchbar), "focus-out-event", G_CALLBACK(unfocusbar), c);
/* indicator */
c->indicator = gtk_drawing_area_new();
@@ -508,7 +507,6 @@
return n->view;
}
-
void
pasteurl(GtkClipboard *clipboard, const gchar *text, gpointer d) {
Arg arg = {.v = text };
@@ -707,7 +705,7 @@
}
gboolean
-unfocusbar(GtkWidget *w, GdkEventFocus *e, Client *c) {
+focusview(GtkWidget *w, GdkEventFocus *e, Client *c) {
hidesearch(c, NULL);
hideurl(c, NULL);
return FALSE;
Received on Fri Oct 16 2009 - 08:52:42 UTC
This archive was generated by hypermail 2.2.0 : Fri Oct 16 2009 - 09:00:07 UTC