mirror of
https://github.com/davatorium/rofi.git
synced 2025-03-03 16:05:20 -05:00
Always refilter when switching modi.
This commit is contained in:
parent
f3298801f3
commit
07425fd10a
5 changed files with 25 additions and 6 deletions
|
@ -16,6 +16,10 @@
|
|||
* @{
|
||||
*/
|
||||
typedef struct _widget widget;
|
||||
|
||||
/**
|
||||
* Callback for when widget is clicked.
|
||||
*/
|
||||
typedef gboolean ( *widget_clicked_cb )( widget *, xcb_button_press_event_t *, void * );
|
||||
|
||||
/** Macro to get widget from an implementation (e.g. textbox/scrollbar) */
|
||||
|
@ -41,8 +45,24 @@ int widget_intersect ( const widget *widget, int x, int y );
|
|||
*/
|
||||
void widget_move ( widget *widget, short x, short y );
|
||||
|
||||
/**
|
||||
* @param widget Handle to widget
|
||||
*
|
||||
* Check if widget is enabled.
|
||||
* @returns TRUE when widget is enabled.
|
||||
*/
|
||||
gboolean widget_enabled ( widget *widget );
|
||||
/**
|
||||
* @param widget Handle to widget
|
||||
*
|
||||
* Disable the widget.
|
||||
*/
|
||||
void widget_disable ( widget *widget );
|
||||
/**
|
||||
* @param widget Handle to widget
|
||||
*
|
||||
* Enable the widget.
|
||||
*/
|
||||
void widget_enable ( widget *widget );
|
||||
|
||||
/**
|
||||
|
|
|
@ -198,7 +198,7 @@ static char **read_hosts_file ( char ** retv, unsigned int *length )
|
|||
// Reading one line per time.
|
||||
while ( getline ( &buffer, &buffer_length, fd ) > 0 ) {
|
||||
// Evaluate one line.
|
||||
unsigned int index = 0, ti = 0;
|
||||
unsigned int index = 0, ti = 0;
|
||||
char *token = buffer;
|
||||
|
||||
// Tokenize it.
|
||||
|
|
|
@ -194,7 +194,7 @@ static GRegex * create_regex ( const char *input, int case_sensitive )
|
|||
{
|
||||
#define R( s ) g_regex_new ( s, G_REGEX_OPTIMIZE | ( ( case_sensitive ) ? 0 : G_REGEX_CASELESS ), 0, NULL )
|
||||
GRegex * retv = NULL;
|
||||
gchar *r;
|
||||
gchar *r;
|
||||
switch ( config.matching_method )
|
||||
{
|
||||
case MM_GLOB:
|
||||
|
@ -234,7 +234,7 @@ GRegex **tokenize ( const char *input, int case_sensitive )
|
|||
}
|
||||
|
||||
char *saveptr = NULL, *token;
|
||||
GRegex **retv = NULL;
|
||||
GRegex **retv = NULL;
|
||||
if ( !config.tokenize ) {
|
||||
retv = g_malloc0 ( sizeof ( GRegex* ) * 2 );
|
||||
retv[0] = (GRegex *) create_regex ( input, case_sensitive );
|
||||
|
|
|
@ -1653,5 +1653,6 @@ void rofi_view_switch_mode ( RofiViewState *state, Mode *mode )
|
|||
rofi_view_restart ( state );
|
||||
state->reload = TRUE;
|
||||
state->refilter = TRUE;
|
||||
rofi_view_refilter ( state );
|
||||
rofi_view_update ( state );
|
||||
}
|
||||
|
|
|
@ -102,9 +102,7 @@ void widget_update ( widget *widget )
|
|||
widget->update ( widget );
|
||||
}
|
||||
// Recurse back.
|
||||
if ( widget->parent && widget->parent->update ) {
|
||||
widget->parent->update ( widget->parent );
|
||||
}
|
||||
widget_update ( widget->parent );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue