1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00
This commit is contained in:
Dave Davenport 2017-11-07 20:04:07 +01:00
parent 4ac428bace
commit 9cd1e3fac2
9 changed files with 162 additions and 160 deletions

View file

@ -585,8 +585,9 @@ static void drun_icon_fetch ( gpointer data, gpointer user_data )
const gchar *icon_path;
gchar *icon_path_ = NULL;
if ( g_path_is_absolute ( dr->icon_name ) )
if ( g_path_is_absolute ( dr->icon_name ) ) {
icon_path = dr->icon_name;
}
else {
icon_path = icon_path_ = nk_xdg_theme_get_icon ( pd->xdg_context, themes, NULL, dr->icon_name, dr->icon_size, 1, TRUE );
if ( icon_path_ == NULL ) {
@ -675,7 +676,6 @@ static int drun_mode_init ( Mode *sw )
const char *current_desktop = g_getenv ( "XDG_CURRENT_DESKTOP" );
pd->current_desktop_list = current_desktop ? g_strsplit ( current_desktop, ":", 0 ) : NULL;
// Theme
pd->xdg_context = nk_xdg_theme_context_new ( drun_icon_fallback_themes, NULL );
nk_xdg_theme_preload_themes_icon ( pd->xdg_context, themes );

View file

@ -95,7 +95,9 @@ static char ** __history_get_element_list_fields ( FILE *fd, unsigned int *lengt
// Jump to the first space.
const char *start = strchr ( buffer, ' ' );
// not found, skip.
if ( start == NULL ) continue;
if ( start == NULL ) {
continue;
}
start++;
// remove trailing \n
buffer[l - 1] = '\0';
@ -110,7 +112,6 @@ static char ** __history_get_element_list_fields ( FILE *fd, unsigned int *lengt
retv[( *length ) + 1] = NULL;
( *length )++;
}
return retv;
}

View file

@ -297,7 +297,8 @@ static void rofi_theme_print_index ( ThemeWidget *widget )
fputs ( name, stdout );
if ( iter->prev == NULL && iter->next ) {
putchar ( ' ' );
} else if ( iter->next ) {
}
else if ( iter->next ) {
putchar ( '.' );
}
}