changeset 2915:703cd5256849

added an about message box
author Calin Crisan ccrisan@gmail.com
date Sat, 16 Aug 2008 01:37:42 +0200
parents 457260d55428
children 223822ba79f2
files src/streambrowser/Makefile src/streambrowser/gui/about_win.c src/streambrowser/gui/about_win.h src/streambrowser/streambrowser.c
diffstat 4 files changed, 17 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/src/streambrowser/Makefile	Fri Aug 15 16:00:53 2008 +0200
+++ b/src/streambrowser/Makefile	Sat Aug 16 01:37:42 2008 +0200
@@ -5,7 +5,6 @@
        shoutcast.c \
        xiph.c \
        bookmarks.c \
-       gui/about_win.c \
        gui/streambrowser_win.c
 
 DATA = images/shoutcast.png \
--- a/src/streambrowser/gui/about_win.c	Fri Aug 15 16:00:53 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
- * Audacious Streambrowser Plugin
- *
- * Copyright (c) 2008 Calin Crisan <ccrisan@gmail.com>
- *
- * This program 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; under version 3 of the License.
- *
- * 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses>.
- */
-
-
--- a/src/streambrowser/gui/about_win.h	Fri Aug 15 16:00:53 2008 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-/*
- * Audacious Streambrowser Plugin
- *
- * Copyright (c) 2008 Calin Crisan <ccrisan@gmail.com>
- *
- * This program 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; under version 3 of the License.
- *
- * 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses>.
- */
-
-
-#ifndef ABOUT_WIN_H
-#define ABOUT_WIN_H
-
-#endif	// ABOUT_WIN_H
-
--- a/src/streambrowser/streambrowser.c	Fri Aug 15 16:00:53 2008 +0200
+++ b/src/streambrowser/streambrowser.c	Sat Aug 16 01:37:42 2008 +0200
@@ -29,7 +29,6 @@
 #include "xiph.h"
 #include "bookmarks.h"
 #include "gui/streambrowser_win.h"
-#include "gui/about_win.h"
 
 
 typedef struct {
@@ -313,6 +312,23 @@
 static void sb_about()
 {
     debug("sb_about()\n");
+
+	static GtkWidget* about_window = NULL;
+
+	if (about_window != NULL) {
+		gtk_window_present(GTK_WINDOW(about_window));
+	}
+	else {
+		about_window = audacious_info_dialog(_("About Stream Browser"),
+		_("Copyright (c) 2008, by Calin Crisan <ccrisan@gmail.com> and The Audacious Team.\n\n"
+		"This is a simple stream browser that includes the most popular streaming directories.\n"
+		"Many thanks to the Streamtuner developers <http://www.nongnu.org/streamtuner>,\n"
+		"\tand of course to the whole Audacious community.\n\n"
+		"Also thank you Tony Vroon for mentoring & guiding me, again.\n\n"
+		"This was a Google Summer of Code 2008 project."), _("OK"), FALSE, NULL, NULL);
+
+	    g_signal_connect(G_OBJECT(about_window), "destroy",	G_CALLBACK(gtk_widget_destroyed), &about_window);
+    }
 }
 
 static void sb_configure()