mirror of
https://github.com/davatorium/rofi.git
synced 2025-01-27 15:25:24 -05:00
[Config] Remove stray printf, add compiler hints.
This commit is contained in:
parent
193dfa16bc
commit
fcd9878a3b
2 changed files with 5 additions and 7 deletions
|
@ -1080,8 +1080,7 @@ cairo_surface_t* cairo_image_surface_create_from_svg ( const gchar* file, int he
|
|||
RsvgHandle * handle;
|
||||
|
||||
handle = rsvg_handle_new_from_file ( file, &error );
|
||||
if ( handle != NULL ) {
|
||||
cairo_t *cr;
|
||||
if ( G_LIKELY ( handle != NULL ) ) {
|
||||
RsvgDimensionData dimensions;
|
||||
// Update DPI.
|
||||
rsvg_handle_set_dpi ( handle, config.dpi );
|
||||
|
@ -1093,8 +1092,8 @@ cairo_surface_t* cairo_image_surface_create_from_svg ( const gchar* file, int he
|
|||
(double) dimensions.width * scale,
|
||||
(double) dimensions.height * scale );
|
||||
gboolean failed = cairo_surface_status ( surface ) != CAIRO_STATUS_SUCCESS;
|
||||
if ( !failed ) {
|
||||
cr = cairo_create ( surface );
|
||||
if ( G_LIKELY ( failed == FALSE ) ) {
|
||||
cairo_t *cr = cairo_create ( surface );
|
||||
cairo_scale ( cr, scale, scale );
|
||||
failed = rsvg_handle_render_cairo ( handle, cr ) == FALSE;
|
||||
cairo_destroy ( cr );
|
||||
|
@ -1104,13 +1103,13 @@ cairo_surface_t* cairo_image_surface_create_from_svg ( const gchar* file, int he
|
|||
g_object_unref ( handle );
|
||||
|
||||
/** Rendering fails */
|
||||
if ( failed ) {
|
||||
if ( G_UNLIKELY ( failed ) ){
|
||||
g_warning ( "Failed to render file: '%s'", file );
|
||||
cairo_surface_destroy ( surface );
|
||||
surface = NULL;
|
||||
}
|
||||
}
|
||||
if ( error != NULL ) {
|
||||
if ( G_UNLIKELY ( error != NULL ) ) {
|
||||
g_warning ( "Failed to render SVG file: '%s': %s", file, error->message );
|
||||
g_error_free ( error );
|
||||
}
|
||||
|
|
|
@ -393,7 +393,6 @@ static gboolean __config_parser_set_property ( XrmOption *option, const Property
|
|||
else {
|
||||
value = g_strdup ( p->value.s );
|
||||
}
|
||||
printf ( "set: %s\n", value );
|
||||
if ( ( option )->mem != NULL ) {
|
||||
g_free ( option->mem );
|
||||
option->mem = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue