add check to make sure resource exists
This commit is contained in:
parent
23051f4a8c
commit
a1225763d6
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#define _(STRING) gettext(STRING)
|
#define _(STRING) gettext(STRING)
|
||||||
#define TAX 1.111111111
|
#define TAX 1.111111111
|
||||||
#define VERSION "1.0.0"
|
#define VERSION "1.0.1"
|
||||||
|
|
||||||
GtkLabel *calculated_value = NULL;
|
GtkLabel *calculated_value = NULL;
|
||||||
|
|
||||||
@ -71,11 +71,16 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
gtk_init(&argc, &argv);
|
gtk_init(&argc, &argv);
|
||||||
|
|
||||||
builder = gtk_builder_new();
|
builder = gtk_builder_new();
|
||||||
gtk_builder_add_from_resource(builder, "/cl/cromer/addtax/window_main.glade", NULL);
|
gtk_builder_add_from_resource(builder, "/cl/cromer/addtax/window_main.glade", &error);
|
||||||
|
if (error != NULL) {
|
||||||
|
fprintf(stderr, "Error: %s\n", error->message);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
window = GTK_WIDGET(gtk_builder_get_object(builder, "window_main"));
|
window = GTK_WIDGET(gtk_builder_get_object(builder, "window_main"));
|
||||||
gtk_builder_connect_signals(builder, NULL);
|
gtk_builder_connect_signals(builder, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user