diff options
author | Logan Rathbone <poprocks@gmail.com> | 2021-02-14 22:27:01 -0500 |
---|---|---|
committer | Logan Rathbone <poprocks@gmail.com> | 2021-02-14 22:27:01 -0500 |
commit | 2aac67b9c184ad533510d61569a5763e87ecf7f3 (patch) | |
tree | 9be8a26d0a33c78fd549890fd7655923028178d6 /src/about.c | |
parent | 71744aa4b388754b20bbcdbf7dabf482202fee79 (diff) | |
download | zenity-2aac67b9c184ad533510d61569a5763e87ecf7f3.tar.gz |
Mass cleanup and finish meson migration.
Autotools purged.
Diffstat (limited to 'src/about.c')
-rw-r--r-- | src/about.c | 48 |
1 files changed, 12 insertions, 36 deletions
diff --git a/src/about.c b/src/about.c index 338cca3..cac56c8 100644 --- a/src/about.c +++ b/src/about.c @@ -34,18 +34,12 @@ #include <config.h> -#define GTK_RESPONSE_CREDITS 0 - -#define ZENITY_CANVAS_X 400.0 -#define ZENITY_CANVAS_Y 280.0 - static GtkWidget *dialog; -static void zenity_about_dialog_response (GtkWidget *widget, - int response, gpointer data); +static void zenity_about_close_cb (GtkWindow *window, gpointer data); /* Sync with the people in the THANKS file */ -static const gchar *const authors[] = {"Glynn Foster <glynn foster sun com>", +static const char *const authors[] = {"Glynn Foster <glynn foster sun com>", "Lucas Rocha <lucasr gnome org>", "Mike Newman <mikegtn gnome org>", NULL}; @@ -56,8 +50,6 @@ static const char *documenters[] = {"Glynn Foster <glynn.foster@sun.com>", "GNOME Documentation Project", NULL}; -static gchar *translators; - static const char *license[] = { N_ ("This program is free software; you can redistribute it and/or modify " "it under the terms of the GNU Lesser General Public License as " @@ -79,15 +71,13 @@ zenity_about (ZenityData *data) { char *license_trans; - translators = _("translator-credits"); - license_trans = g_strconcat ( _(license[0]), "\n", _(license[1]), "\n", _(license[2]), "\n", NULL); dialog = gtk_about_dialog_new (); g_object_set (G_OBJECT (dialog), - "name", + "program-name", "Zenity", "version", VERSION, @@ -100,46 +90,32 @@ zenity_about (ZenityData *data) authors, "documenters", documenters, - "translator-credits", - translators, "website", "https://gitlab.gnome.org/GNOME/zenity", "wrap-license", TRUE, "license", license_trans, + "icon-name", + "zenity", + "logo-icon-name", + "zenity", NULL); g_free (license_trans); - zenity_util_set_window_icon (dialog, - NULL, ZENITY_IMAGE_FULLPATH ("zenity.png")); - - g_signal_connect (G_OBJECT (dialog), - "response", - G_CALLBACK (zenity_about_dialog_response), - data); + g_signal_connect (dialog, "close-request", + G_CALLBACK(zenity_about_close_cb), data); zenity_util_show_dialog (dialog); zenity_util_gapp_main (GTK_WINDOW (dialog)); } static void -zenity_about_dialog_response (GtkWidget *widget, int response, gpointer data) +zenity_about_close_cb (GtkWindow *window, gpointer data) { ZenityData *zen_data = data; - g_return_if_fail (GTK_IS_WINDOW (GTK_WINDOW(widget))); - - switch (response) { - case GTK_RESPONSE_CLOSE: - zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); - break; - - default: - /* Esc dialog */ - zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); - break; - } - zenity_util_gapp_quit (GTK_WINDOW(widget)); + zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); + zenity_util_gapp_quit (window); } |