| 1504 static gboolean |
1504 static gboolean |
| 1505 key_pressed(GntWidget *widget, const char *text, FinchBlist *ggblist) |
1505 key_pressed(GntWidget *widget, const char *text, FinchBlist *ggblist) |
| 1506 { |
1506 { |
| 1507 if (text[0] == 27 && text[1] == 0) { |
1507 if (text[0] == 27 && text[1] == 0) { |
| 1508 /* Escape was pressed */ |
1508 /* Escape was pressed */ |
| |
1509 if (gnt_tree_is_searching(GNT_TREE(ggblist->tree))) |
| |
1510 gnt_bindable_perform_action_named(GNT_BINDABLE(ggblist->tree), "end-search", NULL); |
| 1509 remove_peripherals(ggblist); |
1511 remove_peripherals(ggblist); |
| 1510 } else if (strcmp(text, GNT_KEY_CTRL_O) == 0) { |
1512 } else if (strcmp(text, GNT_KEY_CTRL_O) == 0) { |
| 1511 purple_prefs_set_bool(PREF_ROOT "/showoffline", |
1513 purple_prefs_set_bool(PREF_ROOT "/showoffline", |
| 1512 !purple_prefs_get_bool(PREF_ROOT "/showoffline")); |
1514 !purple_prefs_get_bool(PREF_ROOT "/showoffline")); |
| 1513 } else if (strcmp(text, GNT_KEY_INS) == 0) { |
1515 } else if (strcmp(text, GNT_KEY_INS) == 0) { |