File: about.c

package info (click to toggle)
cpanel 0.3.1-2.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 796 kB
  • ctags: 240
  • sloc: ansic: 2,538; makefile: 136; perl: 68
file content (59 lines) | stat: -rw-r--r-- 2,084 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*****************************************************************
 *
 *   about.c
 *
 *     Copyright (c) 2000  Kam Tik <kamtik@hongkong.com>
 *
 *	http://debian.kamtik.net
 *
 *     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, write to the Free Software
 *     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
 *
 ******************************************************************/


#include "cpanel.h"

void go_to_hp(GtkWidget *button, gpointer data)
{
	system("netscape -remote openURL\\(http://debian.kamtik.net\\)");
}

void display_about_page(GtkWidget *widget, gpointer data)
{
	GtkWidget *win;
	GtkWidget *button;
	GtkWidget *close_button;
	GtkWidget *label;

	win = gtk_dialog_new();

	gtk_signal_connect(GTK_OBJECT(win),"destroy",
			GTK_SIGNAL_FUNC(close_win),win);
	gtk_window_set_title(GTK_WINDOW(win),_("About CPanel"));
	gtk_container_set_border_width(GTK_CONTAINER(win),10);

	label = gtk_label_new(_("Debian Chinese Panel - Version 0.3.1\nCopyright (c) 2000, Kam Tik\nReleased under GPL\n\nHelper: All the Debian Chinese Project Participants\nAuthor: Kam Tik"));
	button = gtk_button_new_with_label("http://debian.kamtik.net");
	gtk_signal_connect(GTK_OBJECT(button),"clicked",
			GTK_SIGNAL_FUNC(go_to_hp),NULL);

	close_button = gtk_button_new_with_label(_("Close"));
	gtk_signal_connect(GTK_OBJECT(close_button),"clicked",
			GTK_SIGNAL_FUNC(close_win),win);

	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(win)->vbox),label,FALSE,FALSE,0);
	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(win)->vbox),button,FALSE,FALSE,3);
	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(win)->action_area),close_button,TRUE,TRUE,0);

	GTK_WIDGET_SET_FLAGS(close_button,GTK_CAN_DEFAULT);
	gtk_widget_grab_default(close_button);

	gtk_widget_show_all(win);
}