const gchar *contents = gtk_entry_get_text(GTK_ENTRY(c->location));
if (strcspn(contents, "s/")) {
gtk_entry_set_text(GTK_ENTRY(c->location), "s/");
+ gtk_editable_set_position(GTK_EDITABLE(c->location), -1);
+ } else {
+ search(c, 0);
+ search(c, -1);
+ search(c, direction);
}
- gtk_editable_set_position(GTK_EDITABLE(c->location), -1);
- search(c, 0);
- search(c, -1);
- search(c, direction);
}
int
gtk_entry_set_progress_fraction(GTK_ENTRY(c->location), 0);
}
} else if (event->type == GDK_BUTTON_RELEASE) {
+ GdkModifierType modifiers = gtk_accelerator_get_default_mod_mask();
switch (((GdkEventButton *)event)->button) {
- case 2:
- if (c->hover_uri != NULL) {
+ case 1:
+ if ((((GdkEventButton *)event)->state & modifiers) ==
+ GDK_CONTROL_MASK &&
+ c->hover_uri != NULL) {
client_new(c->hover_uri, NULL, TRUE, FALSE);
return TRUE;
}