diff options
author | Arx Cruz <arxcruz@redhat.com> | 2017-04-07 14:00:42 +0200 |
---|---|---|
committer | Arx Cruz <arxcruz@redhat.com> | 2017-04-07 14:00:42 +0200 |
commit | 4eddb202cafdcabc254aa941ad1348ff09372627 (patch) | |
tree | 693615e41338546f87d791fbc1cbe9a47738e7e6 /src/about.c | |
parent | Adding clang-format script (diff) | |
download | zenity-4eddb202cafdcabc254aa941ad1348ff09372627.tar.gz zenity-4eddb202cafdcabc254aa941ad1348ff09372627.tar.bz2 zenity-4eddb202cafdcabc254aa941ad1348ff09372627.zip |
Fix style
Fixing style in all zenity code, removing useless spaces,
empty lines, all code in 80 columns, etc.
Diffstat (limited to 'src/about.c')
-rw-r--r-- | src/about.c | 161 |
1 files changed, 86 insertions, 75 deletions
diff --git a/src/about.c b/src/about.c index 486b6416..627aa1ea 100644 --- a/src/about.c +++ b/src/about.c @@ -25,10 +25,10 @@ */ #include "config.h" -#include "zenity.h" #include "util.h" -#include <string.h> +#include "zenity.h" #include <gdk/gdkkeysyms.h> +#include <string.h> #define GTK_RESPONSE_CREDITS 0 #define ZENITY_HELP_PATH ZENITY_DATADIR "/help/" @@ -39,39 +39,38 @@ static GtkWidget *dialog; -static void zenity_about_dialog_response (GtkWidget *widget, int response, gpointer data); +static void zenity_about_dialog_response ( + GtkWidget *widget, int response, gpointer data); /* Sync with the people in the THANKS file */ -static const gchar *const authors[] = { - "Glynn Foster <glynn foster sun com>", - "Lucas Rocha <lucasr gnome org>", - "Mike Newman <mikegtn gnome org>", - NULL -}; +static const gchar *const authors[] = {"Glynn Foster <glynn foster sun com>", + "Lucas Rocha <lucasr gnome org>", + "Mike Newman <mikegtn gnome org>", + NULL}; -static const char *documenters[] = { - "Glynn Foster <glynn.foster@sun.com>", - "Lucas Rocha <lucasr@gnome.org>", - "Java Desktop System Documentation Team", - "GNOME Documentation Project", - NULL -}; +static const char *documenters[] = {"Glynn Foster <glynn.foster@sun.com>", + "Lucas Rocha <lucasr@gnome.org>", + "Java Desktop System Documentation Team", + "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 published by " - "the Free Software Foundation; either version 2 of the License, or " - "(at your option) any later version.\n"), - N_("This program is distributed in the hope that it will be useful, " - "but WITHOUT ANY WARRANTY; without even the implied warranty of " - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " - "GNU Lesser General Public License for more details.\n"), - N_("You should have received a copy of the GNU Lesser General Public License " - "along with this program; if not, write to the Free Software " - "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.") -}; + 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 " + "published by " + "the Free Software Foundation; either version 2 of the License, or " + "(at your option) any later version.\n"), + N_ ("This program is distributed in the hope that it will be useful, " + "but WITHOUT ANY WARRANTY; without even the implied warranty of " + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " + "GNU Lesser General Public License for more details.\n"), + N_ ("You should have received a copy of the GNU Lesser General Public " + "License " + "along with this program; if not, write to the Free Software " + "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA " + "02110-1301, USA.")}; #if 0 static gint @@ -253,66 +252,78 @@ zenity_zen_wisdom (GtkDialog *dialog, GdkEventKey *event, gpointer user_data) } #endif -void -zenity_about (ZenityData *data) -{ - GdkPixbuf *logo; - char *license_trans; - - - translators = _("translator-credits"); - logo = gdk_pixbuf_new_from_file (ZENITY_IMAGE_FULLPATH ("zenity.png"), NULL); - - 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", "Zenity", - "version", VERSION, - "copyright", "Copyright \xc2\xa9 2003 Sun Microsystems", - "comments", _("Display dialog boxes from shell scripts"), - "authors", authors, - "documenters", documenters, - "translator-credits", translators, - "website", "http://live.gnome.org/Zenity", - "logo", logo, - "wrap-license", TRUE, - "license", license_trans, +void +zenity_about (ZenityData *data) { + GdkPixbuf *logo; + char *license_trans; + + translators = _ ("translator-credits"); + logo = + gdk_pixbuf_new_from_file (ZENITY_IMAGE_FULLPATH ("zenity.png"), NULL); + + 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", + "Zenity", + "version", + VERSION, + "copyright", + "Copyright \xc2\xa9 2003 Sun Microsystems", + "comments", + _ ("Display dialog boxes from shell scripts"), + "authors", + authors, + "documenters", + documenters, + "translator-credits", + translators, + "website", + "http://live.gnome.org/Zenity", + "logo", + logo, + "wrap-license", + TRUE, + "license", + license_trans, NULL); - - g_free (license_trans); - zenity_util_set_window_icon (dialog, NULL, ZENITY_IMAGE_FULLPATH ("zenity.png")); + 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 (G_OBJECT (dialog), + "response", + G_CALLBACK (zenity_about_dialog_response), + data); #if 0 g_signal_connect (G_OBJECT (dialog), "key_press_event", G_CALLBACK (zenity_zen_wisdom), NULL); #endif - zenity_util_show_dialog (dialog, data->attach); - gtk_main (); + zenity_util_show_dialog (dialog, data->attach); + gtk_main (); } static void -zenity_about_dialog_response (GtkWidget *widget, int response, gpointer data) -{ - ZenityData *zen_data = data; +zenity_about_dialog_response (GtkWidget *widget, int response, gpointer data) { + ZenityData *zen_data = data; - switch (response) { - case GTK_RESPONSE_CLOSE: - zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK); - break; + 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; - } + default: + /* Esc dialog */ + zen_data->exit_code = zenity_util_return_exit_code (ZENITY_ESC); + break; + } - gtk_main_quit (); + gtk_main_quit (); } |