Skip to content

Commit

Permalink
make the quick_url behavior the only option
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Feb 20, 2013
1 parent c0af43d commit 6fb386b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@ and copied to the PRIMARY clipboard buffer.
With the text input widget focused, up/down (or tab/shift-tab) cycle through
completions, escape closes the widget and enter accepts the input.

After hints mode is activated, as single number or a comma separated list of
hint numbers can be entered, which will be opened in the browser.
In hints mode, the input will be accepted as soon as termite considers it a
unique match.
3 changes: 0 additions & 3 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ cursor_shape = block
# (default if unset: all graphic non-punctuation/space characters)
#word_chars = -A-Za-z0-9,./?%&#:_=+@~

# if true, follow hints as soon as the typed text uniquely identifies it
quick_url = false

[colors]
foreground = #dcdccc
foreground_bold = #ffffff
Expand Down
7 changes: 3 additions & 4 deletions termite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct hint_info {
struct config_info {
hint_info hints;
char *browser;
gboolean dynamic_title, urgent_on_bell, clickable_url, quick_url;
gboolean dynamic_title, urgent_on_bell, clickable_url;
int tag;
char *config_file;
};
Expand Down Expand Up @@ -748,7 +748,7 @@ gboolean entry_key_press_cb(GtkEntry *entry, GdkEventKey *event, keybind_info *i
case GDK_KEY_7:
case GDK_KEY_8:
case GDK_KEY_9:
if (info->panel.mode == overlay_mode::urlselect && info->config.quick_url) {
if (info->panel.mode == overlay_mode::urlselect) {
const char *const text = gtk_entry_get_text(entry);
char *fulltext = g_strndup(text, strlen(text) + 1);
fulltext[strlen(text)] = (char)event->keyval;
Expand Down Expand Up @@ -1103,7 +1103,6 @@ static void set_config(GtkWindow *window, VteTerminal *vte, config_info *info,
info->dynamic_title = cfg_bool("dynamic_title", TRUE);
info->urgent_on_bell = cfg_bool("urgent_on_bell", TRUE);
info->clickable_url = cfg_bool("clickable_url", TRUE);
info->quick_url = cfg_bool("quick_url", FALSE);

if (info->clickable_url) {
info->tag =
Expand Down Expand Up @@ -1284,7 +1283,7 @@ int main(int argc, char **argv) {
std::vector<url_data>()},
{vi_mode::insert, 0, 0, 0, 0},
{{nullptr, nullptr, nullptr, nullptr, 0, 0, 0},
nullptr, FALSE, FALSE, FALSE, FALSE, -1, config_file}
nullptr, FALSE, FALSE, FALSE, -1, config_file}
};

load_config(GTK_WINDOW(window), vte, &info.config, &geometry);
Expand Down

0 comments on commit 6fb386b

Please sign in to comment.