pnmixer
Volume mixer for the system tray
ui-about-dialog.c
Go to the documentation of this file.
1 /* ui-about-dialog.c
2  * PNmixer is written by Nick Lanham, a fork of OBmixer
3  * which was programmed by Lee Ferrett, derived
4  * from the program "AbsVolume" by Paul Sherman
5  * This program is free software; you can redistribute
6  * it and/or modify it under the terms of the GNU General
7  * Public License v3. source code is available at
8  * <http://github.com/nicklan/pnmixer>
9  */
10 
17 #ifdef HAVE_CONFIG_H
18 #include "config.h"
19 #endif
20 
21 #include <gtk/gtk.h>
22 
23 #include "support-intl.h"
24 #include "ui-about-dialog.h"
25 
26 #define LICENSE_GPL3 \
27  "PNMixer is free software; you can redistribute it and/or modify it " \
28  "under the terms of the GNU General Public License v3 as published " \
29  "by the Free Software Foundation.\n" \
30  "\n" \
31  "PNMixer is distributed in the hope that it will be useful, but " \
32  "WITHOUT ANY WARRANTY; without even the implied warranty of " \
33  "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. " \
34  "See the GNU General Public License for more details.\n" \
35  "\n" \
36  "You should have received a copy of the GNU General Public License " \
37  "along with PNMixer; if not, write to the Free Software Foundation, " \
38  "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA."
39 
40 /* Public functions */
41 
42 struct about_dialog {
43  GtkWidget *about_dialog;
44 };
45 
51 void
53 {
54  GtkDialog *about_dialog = GTK_DIALOG(dialog->about_dialog);
55 
56  gtk_dialog_run(about_dialog);
57 }
58 
64 void
66 {
67  gtk_widget_destroy(dialog->about_dialog);
68  g_free(dialog);
69 }
70 
78 about_dialog_create(GtkWindow *parent)
79 {
80  AboutDialog *dialog;
81  const gchar *artists[] = {
82  "Paul Davey",
83  NULL
84  };
85  const gchar *authors[] = {
86  "Brian Bidulock",
87  "El Boulangero <elboulangero@gmail.com>",
88  "Julian Ospald <hasufell@posteo.de>",
89  "Nick Lanham",
90  "Steven Honeyman",
91  NULL
92  };
93  const gchar *translators =
94  "The Translation Project http://translationproject.org\n" \
95  "Mario Blättermann (de)\n" \
96  "Stéphane Aulery (fr)\n" \
97  "Božidar Putanec (hr)\n" \
98  "Mattia Bertoni (it)\n" \
99  "Benno Schulenberg (nl)\n" \
100  "Pavel Roschin (ru)\n" \
101  "Мирослав Николић (sr)\n" \
102  "Yuri Chornoivan (uk)\n" \
103  "Trần Ngọc Quân (vi)\n" \
104  "Shengyu Zhang (zh_CN)";
105 
106  /* Create about dialog */
107  dialog = g_new0(AboutDialog, 1);
108  dialog->about_dialog = gtk_about_dialog_new();
109 
110  /* Fill with the relevant information */
111  g_object_set(dialog->about_dialog,
112  "artists", artists,
113  "authors", authors,
114  "comments", _("A mixer for the system tray"),
115  "copyright", _("Copyright © 2010-2017 Nick Lanham"),
116  "license", LICENSE_GPL3,
117  "wrap-license", TRUE,
118  "logo-icon-name", "pnmixer",
119  "program-name", "PNMixer",
120  "translator-credits", translators,
121  "version", PACKAGE_VERSION,
122  "website", "http://github.com/nicklan/pnmixer",
123  NULL);
124 
125  /* More config for window */
126  gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog->about_dialog), TRUE);
127  gtk_window_set_transient_for(GTK_WINDOW(dialog->about_dialog), parent);
128 
129  return dialog;
130 }
#define _(String)
Definition: support-intl.h:44
Internationalization support.
header for ui-about-dialog.c.
void about_dialog_run(AboutDialog *dialog)
AboutDialog * about_dialog_create(GtkWindow *parent)
void about_dialog_destroy(AboutDialog *dialog)
GtkWidget * about_dialog
#define LICENSE_GPL3