Commit b733bc4a5fb238f95d81e704357d2ae3c25d4439
1 parent
d7931c4d
Exists in
master
and in
5 other branches
Emitting message when the logo is not available on about window.
Showing
1 changed file
with
23 additions
and
21 deletions
Show diff stats
src/pw3270/dialog.c
... | ... | @@ -467,11 +467,14 @@ |
467 | 467 | |
468 | 468 | G_GNUC_INTERNAL void about_dialog_action(GtkAction *action, GtkWidget *widget) |
469 | 469 | { |
470 | - static const gchar *authors[] = { "Perry Werneck <perry.werneck@gmail.com>", | |
471 | - "Paul Mattes <Paul.Mattes@usa.net>", | |
472 | - "Georgia Tech Research Corporation (GTRC)", | |
473 | - "and others", | |
474 | - NULL }; | |
470 | + static const gchar *authors[] = | |
471 | + { | |
472 | + "Perry Werneck <perry.werneck@gmail.com>", | |
473 | + "Paul Mattes <Paul.Mattes@usa.net>", | |
474 | + "Georgia Tech Research Corporation (GTRC)", | |
475 | + "and others", | |
476 | + NULL | |
477 | + }; | |
475 | 478 | |
476 | 479 | static const gchar *license = |
477 | 480 | N_( "This program is free software; you can redistribute it and/or " |
... | ... | @@ -490,13 +493,20 @@ |
490 | 493 | GtkAboutDialog * dialog = GTK_ABOUT_DIALOG(gtk_about_dialog_new()); |
491 | 494 | g_autofree gchar * text = g_strdup_printf("%s-logo.png",g_get_application_name()); |
492 | 495 | g_autofree gchar * filename = build_data_filename(text,NULL); |
493 | - g_autofree gchar * info; | |
496 | + g_autofree gchar * info = g_strdup_printf(_( "3270 terminal emulator for GTK %d.%d" ),GTK_MAJOR_VERSION,GTK_MINOR_VERSION); | |
497 | + | |
498 | + g_autofree gchar * version = | |
499 | +#ifdef PACKAGE_RELEASE | |
500 | + g_strdup_printf(_("Version %s-%s"),PACKAGE_VERSION,G_STRINGIFY(PACKAGE_RELEASE)); | |
501 | +#else | |
502 | + g_strdup_printf(_("Version %s-%s"),PACKAGE_VERSION,G_STRINGIFY(BUILD_DATE)); | |
503 | +#endif // PACKAGE_REVISION | |
504 | + | |
494 | 505 | |
495 | 506 | if(widget) { |
496 | 507 | gtk_window_set_transient_for(GTK_WINDOW(dialog),GTK_WINDOW(gtk_widget_get_toplevel(widget))); |
497 | 508 | } |
498 | 509 | |
499 | - trace("[%s]",filename); | |
500 | 510 | if(g_file_test(filename,G_FILE_TEST_EXISTS)) |
501 | 511 | { |
502 | 512 | GError * error = NULL; |
... | ... | @@ -513,28 +523,20 @@ |
513 | 523 | g_warning("Can't load %s: %s",filename,error->message); |
514 | 524 | g_error_free(error); |
515 | 525 | } |
516 | - } | |
517 | 526 | |
518 | - g_autofree gchar * version = | |
519 | -#ifdef PACKAGE_RELEASE | |
520 | - g_strdup_printf(_("Version %s-%s"),PACKAGE_VERSION,G_STRINGIFY(PACKAGE_RELEASE)); | |
521 | -#else | |
522 | - g_strdup_printf(_("Version %s-%s"),PACKAGE_VERSION,G_STRINGIFY(BUILD_DATE)); | |
523 | -#endif // PACKAGE_REVISION | |
527 | + } else { | |
524 | 528 | |
525 | - gtk_about_dialog_set_version(dialog,version); | |
529 | + g_message("Can't load %s: %s",filename,strerror(ENOENT)); | |
526 | 530 | |
527 | - gtk_about_dialog_set_copyright(dialog, "Copyright © 2008 Banco do Brasil S.A." ); | |
531 | + } | |
528 | 532 | |
529 | - info = g_strdup_printf(_( "3270 terminal emulator for GTK %d.%d" ),GTK_MAJOR_VERSION,GTK_MINOR_VERSION); | |
533 | + gtk_about_dialog_set_version(dialog,version); | |
534 | + gtk_about_dialog_set_copyright(dialog, "Copyright © 2008 Banco do Brasil S.A." ); | |
530 | 535 | gtk_about_dialog_set_comments(dialog, info ); |
531 | - | |
532 | 536 | gtk_about_dialog_set_license(dialog, gettext( license ) ); |
533 | 537 | gtk_about_dialog_set_wrap_license(dialog,TRUE); |
534 | - | |
535 | - gtk_about_dialog_set_website(dialog,_("https://portal.softwarepublico.gov.br/social/pw3270/")); | |
538 | + gtk_about_dialog_set_website(dialog,"https://portal.softwarepublico.gov.br/social/pw3270/"); | |
536 | 539 | gtk_about_dialog_set_website_label(dialog,_( "Brazilian Public Software Portal" )); |
537 | - | |
538 | 540 | gtk_about_dialog_set_authors(dialog,authors); |
539 | 541 | gtk_about_dialog_set_translator_credits(dialog,_("translator-credits")); |
540 | 542 | ... | ... |