Fix some small warning because get_string returns const.

This commit is contained in:
Dave Davenport 2017-04-28 09:15:01 +02:00
parent ce4b1b23b4
commit 9afa7682f6
3 changed files with 4 additions and 4 deletions

View File

@ -908,7 +908,7 @@ static gboolean startup ( G_GNUC_UNUSED gpointer data )
return G_SOURCE_REMOVE;
}
static gboolean record ( void )
static gboolean record ( G_GNUC_UNUSED void *data )
{
rofi_capture_screenshot ();
return G_SOURCE_CONTINUE;

View File

@ -710,7 +710,7 @@ void __create_window ( MenuFlags menu_flags )
// Setup font.
// Dummy widget.
container *win = container_create ( "window.box" );
char *font = rofi_theme_get_string ( WIDGET ( win ), "font", config.menu_font );
const char *font = rofi_theme_get_string ( WIDGET ( win ), "font", config.menu_font );
if ( font ) {
PangoFontDescription *pfd = pango_font_description_from_string ( font );
if ( helper_validate_font ( pfd, font ) ) {
@ -759,7 +759,7 @@ void __create_window ( MenuFlags menu_flags )
xcb_icccm_set_wm_class ( xcb->connection, box, sizeof ( wm_class_name ), wm_class_name );
TICK_N ( "setup window name and class" );
char *transparency = rofi_theme_get_string ( WIDGET ( win ), "transparency", NULL );
const char *transparency = rofi_theme_get_string ( WIDGET ( win ), "transparency", NULL );
if ( transparency ) {
rofi_view_setup_fake_transparency ( transparency );
}

View File

@ -126,7 +126,7 @@ textbox* textbox_create ( const char *name, TextboxFlags flags, TextBoxFontType
textbox_font ( tb, tbft );
tb->metrics = p_metrics;
char * font = rofi_theme_get_string ( WIDGET ( tb ), "font", NULL );
const char * font = rofi_theme_get_string ( WIDGET ( tb ), "font", NULL );
if ( font ) {
TBFontConfig *tbfc = g_hash_table_lookup ( tbfc_cache, font );
if ( tbfc == NULL ) {