From 4785df8db97f2fbaf7a355e5c7f5c87311a58975 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pekka=20Geh=C3=B6r?= Date: Mon, 24 Nov 2008 14:39:22 +0200 Subject: [PATCH] irreco_theme check inside irreco_theme_creator_backgrounds_new() --- irreco/src/core/irreco_theme_creator_backgrounds.c | 7 +++++-- irreco/src/core/irreco_theme_creator_buttons.c | 12 ++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/irreco/src/core/irreco_theme_creator_backgrounds.c b/irreco/src/core/irreco_theme_creator_backgrounds.c index cfda06ca..53b82802 100644 --- a/irreco/src/core/irreco_theme_creator_backgrounds.c +++ b/irreco/src/core/irreco_theme_creator_backgrounds.c @@ -187,8 +187,9 @@ GtkWidget* irreco_theme_creator_backgrounds_new(GtkWindow *parent, self->parent_window = GTK_WINDOW(parent); self->irreco_data = irreco_data; self->theme = irreco_theme; + if (irreco_theme !=NULL) { irreco_theme_creator_backgrounds_image_append_with_size(self); - + } IRRECO_RETURN_PTR(GTK_WIDGET(self)); } @@ -283,7 +284,9 @@ void irreco_theme_creator_backgrounds_image_append_with_size( IRRECO_BACKGROUNDS_PREVIEW_WIDHT, IRRECO_BACKGROUNDS_PREVIEW_HEIGHT, GDK_INTERP_NEAREST, &error); - irreco_gerror_check_print(&error); + if (irreco_gerror_check_print(&error)) { + IRRECO_RETURN + } gtk_list_store_append(self->store_backgrounds, &iter); diff --git a/irreco/src/core/irreco_theme_creator_buttons.c b/irreco/src/core/irreco_theme_creator_buttons.c index 4a787b00..5fcab690 100644 --- a/irreco/src/core/irreco_theme_creator_buttons.c +++ b/irreco/src/core/irreco_theme_creator_buttons.c @@ -185,8 +185,9 @@ GtkWidget* irreco_theme_creator_buttons_new(GtkWindow *parent, self->parent_window = GTK_WINDOW(parent); self->irreco_data = irreco_data; self->theme = irreco_theme; + if (irreco_theme !=NULL) { irreco_theme_creator_buttons_image_append(self); - + } IRRECO_RETURN_PTR(GTK_WIDGET(self)); } @@ -275,11 +276,14 @@ void irreco_theme_creator_buttons_image_append( unpixbuf = gdk_pixbuf_new_from_file(button_image->image_up->str, &error); + if (irreco_gerror_check_print(&error)) { + IRRECO_RETURN + } pixbuf = gdk_pixbuf_new_from_file(button_image->image_down->str, &error); - - - irreco_gerror_check_print(&error); + if (irreco_gerror_check_print(&error)) { + IRRECO_RETURN + } gtk_list_store_append(self->store_buttons, &iter); -- 2.11.4.GIT