Mercurial > hg > xmms-sid
comparison src/xs_about.c @ 61:8207e95e0467
Made logo-pixmap internal again
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 22 Jun 2003 11:37:05 +0000 |
parents | ffb606e17bec |
children | 05220299c6e8 |
comparison
equal
deleted
inserted
replaced
60:c5ef90f3c996 | 61:8207e95e0467 |
---|---|
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 */ | 21 */ |
22 | 22 |
23 #include "xmms-sid.h" | 23 #include "xmms-sid.h" |
24 #include <gtk/gtk.h> | 24 #include <gtk/gtk.h> |
25 /* #include "xmms-sid-logo.xpm" */ | 25 #include "xmms-sid-logo.xpm" |
26 | 26 |
27 | 27 |
28 static GtkWidget *xs_aboutwin = NULL; | 28 static GtkWidget *xs_aboutwin = NULL; |
29 | |
29 | 30 |
30 int xs_about_ok(void) | 31 int xs_about_ok(void) |
31 { | 32 { |
32 gtk_widget_destroy(xs_aboutwin); | 33 gtk_widget_destroy(xs_aboutwin); |
33 xs_aboutwin = NULL; | 34 xs_aboutwin = NULL; |
38 /* | 39 /* |
39 * Execute the aboutbox | 40 * Execute the aboutbox |
40 */ | 41 */ |
41 void xs_about(void) | 42 void xs_about(void) |
42 { | 43 { |
44 GtkWidget *about_vbox1; | |
45 GtkWidget *about_frame; | |
46 GtkWidget *about_logo; | |
47 GdkPixmap *about_logo_pixmap = NULL, *about_logo_mask = NULL; | |
48 GtkWidget *about_scrwin; | |
49 GtkWidget *about_text; | |
50 GtkWidget *alignment6; | |
51 GtkWidget *about_close; | |
52 | |
43 /* Check if there already is an open about window */ | 53 /* Check if there already is an open about window */ |
44 if (xs_aboutwin != NULL) | 54 if (xs_aboutwin != NULL) |
45 { | 55 { |
46 gdk_window_raise(xs_aboutwin->window); | 56 gdk_window_raise(xs_aboutwin->window); |
47 return; | 57 return; |
48 } | 58 } |
49 | 59 |
50 /* No, create one ... */ | 60 /* No, create one ... */ |
51 xs_aboutwin = create_xs_aboutwin(); | 61 xs_aboutwin = gtk_window_new (GTK_WINDOW_DIALOG); |
62 gtk_widget_set_name (xs_aboutwin, "xs_aboutwin"); | |
63 gtk_object_set_data (GTK_OBJECT (xs_aboutwin), "xs_aboutwin", xs_aboutwin); | |
64 gtk_window_set_title (GTK_WINDOW (xs_aboutwin), "About " PACKAGE_STRING); | |
65 gtk_window_set_modal (GTK_WINDOW (xs_aboutwin), TRUE); | |
66 gtk_window_set_default_size (GTK_WINDOW (xs_aboutwin), 300, -1); | |
67 | |
68 about_vbox1 = gtk_vbox_new (FALSE, 0); | |
69 gtk_widget_set_name (about_vbox1, "about_vbox1"); | |
70 gtk_widget_ref (about_vbox1); | |
71 gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "about_vbox1", about_vbox1, | |
72 (GtkDestroyNotify) gtk_widget_unref); | |
73 gtk_widget_show (about_vbox1); | |
74 gtk_container_add (GTK_CONTAINER (xs_aboutwin), about_vbox1); | |
75 | |
76 about_frame = gtk_frame_new (NULL); | |
77 gtk_widget_set_name (about_frame, "about_frame"); | |
78 gtk_widget_ref (about_frame); | |
79 gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "about_frame", about_frame, | |
80 (GtkDestroyNotify) gtk_widget_unref); | |
81 gtk_widget_show (about_frame); | |
82 gtk_box_pack_start (GTK_BOX (about_vbox1), about_frame, FALSE, FALSE, 0); | |
83 gtk_container_set_border_width (GTK_CONTAINER (about_frame), 4); | |
84 gtk_frame_set_shadow_type (GTK_FRAME (about_frame), GTK_SHADOW_OUT); | |
85 | |
86 about_logo_pixmap = gdk_pixmap_create_from_xpm_d( | |
87 xs_aboutwin, &about_logo_mask, NULL, xmms_sid_logo_xpm); | |
88 | |
89 about_logo = gtk_pixmap_new(about_logo_pixmap, about_logo_mask); | |
90 | |
91 gtk_widget_set_name (about_logo, "about_logo"); | |
92 gtk_widget_ref (about_logo); | |
93 gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "about_logo", about_logo, | |
94 (GtkDestroyNotify) gtk_widget_unref); | |
95 gtk_widget_show (about_logo); | |
96 gtk_container_add (GTK_CONTAINER (about_frame), about_logo); | |
97 gtk_misc_set_padding (GTK_MISC (about_logo), 0, 6); | |
98 | |
99 about_scrwin = gtk_scrolled_window_new (NULL, NULL); | |
100 gtk_widget_set_name (about_scrwin, "about_scrwin"); | |
101 gtk_widget_ref (about_scrwin); | |
102 gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "about_scrwin", about_scrwin, | |
103 (GtkDestroyNotify) gtk_widget_unref); | |
104 gtk_widget_show (about_scrwin); | |
105 gtk_box_pack_start (GTK_BOX (about_vbox1), about_scrwin, TRUE, TRUE, 0); | |
106 gtk_container_set_border_width (GTK_CONTAINER (about_scrwin), 8); | |
107 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (about_scrwin), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
108 | |
109 about_text = gtk_text_new (NULL, NULL); | |
110 gtk_widget_set_name (about_text, "about_text"); | |
111 gtk_widget_ref (about_text); | |
112 gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "about_text", about_text, | |
113 (GtkDestroyNotify) gtk_widget_unref); | |
114 gtk_widget_show (about_text); | |
115 gtk_container_add (GTK_CONTAINER (about_scrwin), about_text); | |
116 gtk_widget_set_usize (about_text, -2, 100); | |
117 gtk_text_insert (GTK_TEXT (about_text), NULL, NULL, NULL, | |
118 "Programming and design\n" | |
119 "\tMatti 'ccr/TNSP' Hämäläinen\n" | |
120 "\n" | |
121 "libSIDPlay created by\n" | |
122 "\tMichael Schwendt\n" | |
123 "\n" | |
124 "libSIDPlay2 and reSID created by\n" | |
125 "\tSimon White, Dag Lem,\n" | |
126 "\tMichael Schwendt and rest.\n" | |
127 "\n" | |
128 "Original XMMS-SID created by\n" | |
129 "\tWillem Monsuwe\n" | |
130 "\n" | |
131 "\"XMMS-SID Theme\"-song (SIDtune)\n" | |
132 "\tPeter 'Brite-Lite' Halin of Dekadence\n" | |
133 "\t(C) Copyright 2003 Dekadence\n" | |
134 "\thttp://www.dekadence64.org/\n" | |
135 "\n" | |
136 "Thanks and greetings ...\n" | |
137 "\tEveryone at #Linux.Fi, #Fireball,\n" | |
138 "\t#TNSP and #c-64 of IRCNet...\n" | |
139 "\n" | |
140 "\tPwP, iSO, Byterapers, Fairlight,\n" | |
141 "\tmfx, Unique, Static, Dekadence,\n" | |
142 "\tPHn, Creators, Cosine, tAAt ...\n" | |
143 "\n" | |
144 "Special thanks\n" | |
145 "\t- All the betatesters.\n" | |
146 "\t- All the users! Hey it's you!\n", -1); | |
147 | |
148 alignment6 = gtk_alignment_new (0.5, 0.5, 0.18, 1); | |
149 gtk_widget_set_name (alignment6, "alignment6"); | |
150 gtk_widget_ref (alignment6); | |
151 gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "alignment6", alignment6, | |
152 (GtkDestroyNotify) gtk_widget_unref); | |
153 gtk_widget_show (alignment6); | |
154 gtk_box_pack_start (GTK_BOX (about_vbox1), alignment6, FALSE, TRUE, 0); | |
155 gtk_container_set_border_width (GTK_CONTAINER (alignment6), 8); | |
156 | |
157 about_close = gtk_button_new_with_label ("Close"); | |
158 gtk_widget_set_name (about_close, "about_close"); | |
159 gtk_widget_ref (about_close); | |
160 gtk_object_set_data_full (GTK_OBJECT (xs_aboutwin), "about_close", about_close, | |
161 (GtkDestroyNotify) gtk_widget_unref); | |
162 gtk_widget_show (about_close); | |
163 gtk_container_add (GTK_CONTAINER (alignment6), about_close); | |
164 GTK_WIDGET_SET_FLAGS (about_close, GTK_CAN_DEFAULT); | |
165 | |
166 gtk_signal_connect (GTK_OBJECT (about_close), "clicked", | |
167 GTK_SIGNAL_FUNC (xs_about_ok), | |
168 NULL); | |
169 | |
52 gtk_widget_show(xs_aboutwin); | 170 gtk_widget_show(xs_aboutwin); |
53 } | 171 } |
54 | 172 |