Mercurial > audlegacy
comparison audacious/about.c @ 510:d9f6ab166d58 trunk
[svn] custom label/images for about.c buttons
author | giacomo |
---|---|
date | Thu, 26 Jan 2006 10:31:35 -0800 |
parents | 55ec56ecbfad |
children | 9da0f92ce2ef |
comparison
equal
deleted
inserted
replaced
509:d60d23b9fe20 | 510:d9f6ab166d58 |
---|---|
85 void | 85 void |
86 show_about_window(void) | 86 show_about_window(void) |
87 { | 87 { |
88 GtkWidget *about_fixedbox; | 88 GtkWidget *about_fixedbox; |
89 GtkWidget *close_button; | 89 GtkWidget *close_button; |
90 GtkWidget *credits_button; | 90 GtkWidget *credits_button , *credits_button_hbox, *credits_button_image, *credits_button_label; |
91 gchar *filename = DATA_DIR G_DIR_SEPARATOR_S "images" G_DIR_SEPARATOR_S "about-logo.png"; | 91 gchar *filename = DATA_DIR G_DIR_SEPARATOR_S "images" G_DIR_SEPARATOR_S "about-logo.png"; |
92 | 92 |
93 if (about_window != NULL) | 93 if (about_window != NULL) |
94 { | 94 { |
95 gtk_window_present(GTK_WINDOW(about_window)); | 95 gtk_window_present(GTK_WINDOW(about_window)); |
225 g_signal_connect(close_button, "clicked", | 225 g_signal_connect(close_button, "clicked", |
226 G_CALLBACK(on_close_button_clicked), NULL); | 226 G_CALLBACK(on_close_button_clicked), NULL); |
227 | 227 |
228 gtk_fixed_put( GTK_FIXED(about_fixedbox) , close_button , 390 , 220 ); | 228 gtk_fixed_put( GTK_FIXED(about_fixedbox) , close_button , 390 , 220 ); |
229 | 229 |
230 /* GTK+ won't let us override the label we set for this button without | 230 credits_button = gtk_button_new(); |
231 * destroying our stock icon. If we want to go to GTK 2.6, that's fine, | 231 credits_button_hbox = gtk_hbox_new( FALSE , 0 ); |
232 * but until then, we're pretty much screwed here. --nenolod | 232 credits_button_image = gtk_image_new_from_stock( GTK_STOCK_DIALOG_INFO , GTK_ICON_SIZE_BUTTON ); |
233 */ | 233 credits_button_label = gtk_label_new( "Credits" ); |
234 credits_button = gtk_button_new_from_stock(GTK_STOCK_DIALOG_INFO); | 234 gtk_box_pack_start( GTK_BOX(credits_button_hbox) , credits_button_image , |
235 TRUE , TRUE , 0 ); | |
236 gtk_box_pack_start( GTK_BOX(credits_button_hbox) , credits_button_label , | |
237 TRUE , TRUE , 5 ); | |
238 gtk_container_add( GTK_CONTAINER(credits_button) , credits_button_hbox ); | |
235 | 239 |
236 g_signal_connect(credits_button, "clicked", | 240 g_signal_connect(credits_button, "clicked", |
237 G_CALLBACK(on_credits_button_clicked), NULL); | 241 G_CALLBACK(on_credits_button_clicked), NULL); |
238 | 242 |
239 gtk_fixed_put( GTK_FIXED(about_fixedbox) , credits_button , 60 , 220 ); | 243 gtk_fixed_put( GTK_FIXED(about_fixedbox) , credits_button , 60 , 220 ); |