Mercurial > audlegacy-plugins
comparison src/crossfade/configure.c @ 3136:a9593b76cf19
crossfade: change about dialog to use audacious_info_dialog()
author | Michal Lipski <tallica@o2.pl> |
---|---|
date | Thu, 07 May 2009 15:31:32 +0200 |
parents | 354e90c81253 |
children | 7b80d4fb493d |
comparison
equal
deleted
inserted
replaced
3135:85b7dcee821f | 3136:a9593b76cf19 |
---|---|
19 * along with this program; if not, write to the Free Software | 19 * along with this program; if not, write to the Free Software |
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
21 * USA. | 21 * USA. |
22 */ | 22 */ |
23 | 23 |
24 #ifdef HAVE_CONFIG_H | |
25 # include "config.h" | |
26 #endif | |
27 | |
28 #include "crossfade.h" | 24 #include "crossfade.h" |
29 #include "configure.h" | 25 #include "configure.h" |
30 #include "cfgutil.h" | 26 #include "cfgutil.h" |
31 | 27 |
32 #include "interface-2.0.h" | 28 #include "interface-2.0.h" |
95 ((get_wgt = lookup_widget(config_win, name)) \ | 91 ((get_wgt = lookup_widget(config_win, name)) \ |
96 ? gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(get_wgt)) : 0) | 92 ? gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(get_wgt)) : 0) |
97 | 93 |
98 | 94 |
99 static GtkWidget *config_win = NULL; | 95 static GtkWidget *config_win = NULL; |
100 static GtkWidget *about_win = NULL; | |
101 static GtkWidget *set_wgt; | 96 static GtkWidget *set_wgt; |
102 static GtkWidget *get_wgt; | 97 static GtkWidget *get_wgt; |
103 | 98 |
104 /* defined in cfgutil.c */ | 99 /* defined in cfgutil.c */ |
105 extern config_t _xfg; | 100 extern config_t _xfg; |
1146 } | 1141 } |
1147 | 1142 |
1148 void | 1143 void |
1149 xfade_about() | 1144 xfade_about() |
1150 { | 1145 { |
1151 if (!about_win) | 1146 static GtkWidget *dialog; |
1152 { | 1147 |
1153 gchar *about_text = | 1148 if (dialog != NULL) |
1154 "Audacious Crossfade Plugin\n" | 1149 return; |
1155 "Copyright © 2009 William Pitcock <nenolod@atheme.org>\n" | 1150 |
1156 "\n" | 1151 dialog = audacious_info_dialog( |
1157 "...based in part on XMMS-Crossfade:\n" | 1152 _("About Crossfade Plugin"), |
1158 "Copyright © 2000-2009 Peter Eisenlohr <peter@eisenlohr.org>\n" | 1153 _("Audacious Crossfade Plugin\n\n" |
1159 "\n" | 1154 "Copyright © 2009 William Pitcock <nenolod@atheme.org>\n" |
1160 "based on the original OSS Output Plugin Copyright (C) 1998-2000\n" | 1155 "\n" |
1161 "Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies\n" | 1156 "...based in part on XMMS-Crossfade:\n" |
1162 "\n" | 1157 "Copyright © 2000-2009 Peter Eisenlohr <peter@eisenlohr.org>\n" |
1163 "This program is free software; you can redistribute it and/or modify\n" | 1158 "\n" |
1164 "it under the terms of the GNU General Public License as published by\n" | 1159 "based on the original OSS Output Plugin Copyright (C) 1998-2000\n" |
1165 "the Free Software Foundation; either version 2 of the License, or\n" | 1160 "Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies\n" |
1166 "(at your option) any later version.\n" | 1161 "\n" |
1167 "\n" | 1162 "This program is free software; you can redistribute it and/or modify\n" |
1168 "This program is distributed in the hope that it will be useful,\n" | 1163 "it under the terms of the GNU General Public License as published by\n" |
1169 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" | 1164 "the Free Software Foundation; either version 2 of the License, or\n" |
1170 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" | 1165 "(at your option) any later version.\n" |
1171 "GNU General Public License for more details.\n" | 1166 "\n" |
1172 "\n" | 1167 "This program is distributed in the hope that it will be useful,\n" |
1173 "You should have received a copy of the GNU General Public License\n" | 1168 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" |
1174 "along with this program; if not, write to the Free Software\n" | 1169 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" |
1175 "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n" "USA."; | 1170 "GNU General Public License for more details.\n" |
1176 | 1171 "\n" |
1177 about_win = create_about_win(); | 1172 "You should have received a copy of the GNU General Public License\n" |
1178 | 1173 "along with this program; if not, write to the Free Software\n" |
1179 /* update about_win when window is destroyed */ | 1174 "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n" "USA."), |
1180 gtk_signal_connect(GTK_OBJECT(about_win), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &about_win); | 1175 _("Ok"), FALSE, NULL, NULL); |
1181 | 1176 |
1182 /* set about box text (this is done here and not in interface.c because | 1177 g_signal_connect(G_OBJECT(dialog), "destroy", |
1183 of the VERSION #define -- there is no way to do this with GLADE */ | 1178 G_CALLBACK(gtk_widget_destroyed), &dialog); |
1184 if ((set_wgt = lookup_widget(about_win, "about_label"))) | 1179 } |
1185 gtk_label_set_text(GTK_LABEL(set_wgt), about_text); | |
1186 | |
1187 /* show near mouse pointer */ | |
1188 gtk_window_set_position(GTK_WINDOW(about_win), GTK_WIN_POS_MOUSE); | |
1189 gtk_widget_show(about_win); | |
1190 } | |
1191 else | |
1192 gdk_window_raise(about_win->window); | |
1193 } |