typo
This commit is contained in:
parent
90289f6023
commit
5df6c8d6c5
16
surf.c
16
surf.c
|
@ -159,7 +159,6 @@ loadcommit(WebKitWebView *view, WebKitWebFrame *f, gpointer d) {
|
||||||
XChangeProperty(dpy, GDK_WINDOW_XID(GTK_WIDGET(c->win)->window), urlprop,
|
XChangeProperty(dpy, GDK_WINDOW_XID(GTK_WIDGET(c->win)->window), urlprop,
|
||||||
XA_STRING, 8, PropModeReplace, (unsigned char *)uri,
|
XA_STRING, 8, PropModeReplace, (unsigned char *)uri,
|
||||||
strlen(uri) + 1);
|
strlen(uri) + 1);
|
||||||
gtk_entry_set_text(GTK_ENTRY(c->urlbar), uri);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -201,25 +200,27 @@ void
|
||||||
destroyclient(Client *c) {
|
destroyclient(Client *c) {
|
||||||
Client *p;
|
Client *p;
|
||||||
|
|
||||||
gtk_widget_destroy(c->win);
|
gtk_widget_destroy(GTK_WIDGET(webkit_web_view_new()));
|
||||||
gtk_widget_destroy(c->scroll);
|
gtk_widget_destroy(c->scroll);
|
||||||
gtk_widget_destroy(c->vbox);
|
|
||||||
gtk_widget_destroy(c->urlbar);
|
gtk_widget_destroy(c->urlbar);
|
||||||
/* gtk_widget_destroy(c->urllist);*/
|
gtk_widget_destroy(c->urllist);
|
||||||
gtk_widget_destroy(c->searchbar);
|
gtk_widget_destroy(c->searchbar);
|
||||||
if(clients == c && c->next == NULL)
|
gtk_widget_destroy(c->vbox);
|
||||||
gtk_main_quit();
|
gtk_widget_destroy(c->win);
|
||||||
for(p = clients; p && p->next != c; p = p->next);
|
for(p = clients; p && p->next != c; p = p->next);
|
||||||
if(p)
|
if(p)
|
||||||
p->next = c->next;
|
p->next = c->next;
|
||||||
else
|
else
|
||||||
clients = c->next;
|
clients = c->next;
|
||||||
free(c);
|
free(c);
|
||||||
|
if(clients == NULL)
|
||||||
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
keypress(GtkWidget* w, GdkEventKey *ev, gpointer d) {
|
keypress(GtkWidget* w, GdkEventKey *ev, gpointer d) {
|
||||||
Client *c = (Client *)d;
|
Client *c = (Client *)d;
|
||||||
|
gchar *uri;
|
||||||
|
|
||||||
if(ev->type != GDK_KEY_PRESS)
|
if(ev->type != GDK_KEY_PRESS)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -236,6 +237,9 @@ keypress(GtkWidget* w, GdkEventKey *ev, gpointer d) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case GDK_g:
|
case GDK_g:
|
||||||
gtk_widget_hide(c->searchbar);
|
gtk_widget_hide(c->searchbar);
|
||||||
|
if(!(uri = (gchar *)webkit_web_view_get_uri(c->view)))
|
||||||
|
uri = "(null)";
|
||||||
|
gtk_entry_set_text(GTK_ENTRY(c->urlbar), uri);
|
||||||
gtk_widget_show(c->urlbar);
|
gtk_widget_show(c->urlbar);
|
||||||
gtk_widget_grab_focus(c->urlbar);
|
gtk_widget_grab_focus(c->urlbar);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue