mirror of
https://github.com/davatorium/rofi.git
synced 2025-04-14 17:43:01 -04:00
[Overlay] Make timeout configurable.
This commit is contained in:
parent
7880055388
commit
2b24da49aa
2 changed files with 7 additions and 1 deletions
|
@ -1118,6 +1118,10 @@ The following properties are currently supported:
|
|||
- **require-input**: boolean Listview requires user input to be unhidden.
|
||||
The list is still present and hitting accept will activate the first entry.
|
||||
|
||||
### Overlay widget
|
||||
|
||||
- **timeout**: The time the widget is visible when showing a temporary message.
|
||||
|
||||
## Listview widget
|
||||
|
||||
The listview widget is special container widget.
|
||||
|
|
|
@ -2847,6 +2847,7 @@ static gboolean rofi_view_overlay_timeout(G_GNUC_UNUSED gpointer user_data) {
|
|||
widget_disable(WIDGET(state->overlay));
|
||||
}
|
||||
CacheState.overlay_timeout = 0;
|
||||
rofi_view_queue_redraw();
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
|
@ -2859,8 +2860,9 @@ void rofi_view_set_overlay_timeout(RofiViewState *state, const char *text) {
|
|||
return;
|
||||
}
|
||||
rofi_view_set_overlay(state, text);
|
||||
int timeout = rofi_theme_get_integer(WIDGET(state->overlay), "timeout", 3);
|
||||
CacheState.overlay_timeout =
|
||||
g_timeout_add_seconds(3, rofi_view_overlay_timeout, state);
|
||||
g_timeout_add_seconds(timeout, rofi_view_overlay_timeout, state);
|
||||
}
|
||||
|
||||
void rofi_view_set_overlay(RofiViewState *state, const char *text) {
|
||||
|
|
Loading…
Add table
Reference in a new issue