/* xlog - GTK+ logging program for amateur radio operators Copyright (C) 2001 - 2007 Joop Stakenborg This file is part of xlog. Xlog is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Xlog 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 General Public License for more details. You should have received a copy of the GNU General Public License along with xlog. If not, see . */ /* gui_aboutdialog.c - creation of the about dialog */ #include #include "gui_aboutdialog.h" #include "gui_utils.h" #include "support.h" #include "preferences.h" extern preferencestype preferences; extern GtkWidget *mainwindow; static void handle_url (GtkAboutDialog *about, const char *link, gpointer data) { gchar *command[] = {"xdg-open", NULL, NULL}; command[1] = g_strdup (link); g_spawn_async (NULL, command, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL); g_free (command[1]); } static void handle_email (GtkAboutDialog *about, const char *link, gpointer data) { gchar *command[] = {"xdg-email", NULL, NULL}; command[1] = g_strdup_printf ("mailto:%s", link); g_spawn_async (NULL, command, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL); g_free (command[1]); } void on_menu_about_activate (GtkMenuItem * menuitem, gpointer user_data) { gchar *authors[] = { "Joop Stakenborg PG4I ", "Stephane Fillod F8CFE ", NULL }; GdkPixbuf *pixbuf = create_pixbuf ("xlog.png"); gtk_about_dialog_set_url_hook (handle_url, NULL, NULL); gtk_about_dialog_set_email_hook (handle_email, NULL, NULL); gtk_show_about_dialog (GTK_WINDOW(mainwindow), "authors", authors, "comments", _("logbook program for amateur radio operators"), "license", "Copyright (C) 2001 - 2007 Joop Stakenborg \n" "\n" "Xlog is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "Xlog is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with xlog. If not, see .\n" "website", "http://pg4i.chronos.org.uk/linux/xlog.html", "logo", pixbuf, "translator-credits", "Czech: Jan Straka OK2JTB \n" "Danish: Alexandru Csete OZ9AEC \n" "Dutch: Joop Stakenborg PG4I \n" "French: Jean-Luc Coulon F5IBH \n" "German: Martin Hautsch DL5MRH <\n" "Polish: Boguslaw Ciastek SQ5TB \n" "Spanish: Jaime Robles EA4TV \n" "Slovak: Michal Karas OM4AA \n" "Swedish: Peter Landgren SM4ABE \n", "version", VERSION, NULL); }