# HG changeset patch # User nenolod # Date 1140921622 28800 # Node ID 285ecb44708d7422991ada8caa374f1e39a297ed # Parent 7ea1edf23ab22309665554ff5b385ed2736dc752 [svn] Import new GUI code. Not yet hooked up really. diff -r 7ea1edf23ab2 -r 285ecb44708d Plugins/General/scrobbler/Makefile.in --- a/Plugins/General/scrobbler/Makefile.in Sat Feb 25 18:24:10 2006 -0800 +++ b/Plugins/General/scrobbler/Makefile.in Sat Feb 25 18:40:22 2006 -0800 @@ -11,6 +11,7 @@ SOURCES = \ fmt.c \ + configure.c \ gtkstuff.c \ md5.c \ queue.c \ diff -r 7ea1edf23ab2 -r 285ecb44708d Plugins/General/scrobbler/configure.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/General/scrobbler/configure.c Sat Feb 25 18:40:22 2006 -0800 @@ -0,0 +1,142 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "configure.h" + +#define GLADE_HOOKUP_OBJECT(component,widget,name) \ + g_object_set_data_full (G_OBJECT (component), name, \ + gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) + +#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ + g_object_set_data (G_OBJECT (component), name, widget) + +GtkWidget* +create_window1 (void) +{ + GtkWidget *window1; + GtkWidget *vbox2; + GtkWidget *table1; + GtkWidget *entry2; + GtkWidget *label3; + GtkWidget *hseparator2; + GtkWidget *hseparator3; + GtkWidget *label1; + GtkWidget *label2; + GtkWidget *entry1; + GtkWidget *hseparator1; + GtkWidget *hbuttonbox1; + GtkWidget *button5; + GtkWidget *button6; + + window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_container_set_border_width (GTK_CONTAINER (window1), 12); + gtk_window_set_title (GTK_WINDOW (window1), _("window1")); + + vbox2 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox2); + gtk_container_add (GTK_CONTAINER (window1), vbox2); + + table1 = gtk_table_new (4, 2, FALSE); + gtk_widget_show (table1); + gtk_box_pack_start (GTK_BOX (vbox2), table1, FALSE, FALSE, 0); + + entry2 = gtk_entry_new (); + gtk_widget_show (entry2); + gtk_table_attach (GTK_TABLE (table1), entry2, 1, 2, 3, 4, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + label3 = gtk_label_new (_("Password:")); + gtk_widget_show (label3); + gtk_table_attach (GTK_TABLE (table1), label3, 0, 1, 3, 4, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_label_set_justify (GTK_LABEL (label3), GTK_JUSTIFY_RIGHT); + gtk_misc_set_alignment (GTK_MISC (label3), 1, 0.5); + + hseparator2 = gtk_hseparator_new (); + gtk_widget_show (hseparator2); + gtk_table_attach (GTK_TABLE (table1), hseparator2, 0, 1, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + hseparator3 = gtk_hseparator_new (); + gtk_widget_show (hseparator3); + gtk_table_attach (GTK_TABLE (table1), hseparator3, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + label1 = gtk_label_new (_("Scrobbler Preferences")); + gtk_widget_show (label1); + gtk_table_attach (GTK_TABLE (table1), label1, 0, 1, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_label_set_use_markup (GTK_LABEL (label1), TRUE); + gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5); + + label2 = gtk_label_new (_("Username:")); + gtk_widget_show (label2); + gtk_table_attach (GTK_TABLE (table1), label2, 0, 1, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_RIGHT); + gtk_misc_set_alignment (GTK_MISC (label2), 1, 0.5); + + entry1 = gtk_entry_new (); + gtk_widget_show (entry1); + gtk_table_attach (GTK_TABLE (table1), entry1, 1, 2, 2, 3, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + + hseparator1 = gtk_hseparator_new (); + gtk_widget_show (hseparator1); + gtk_box_pack_start (GTK_BOX (vbox2), hseparator1, FALSE, FALSE, 0); + + hbuttonbox1 = gtk_hbutton_box_new (); + gtk_widget_show (hbuttonbox1); + gtk_box_pack_start (GTK_BOX (vbox2), hbuttonbox1, FALSE, FALSE, 0); + gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_END); + gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 5); + + button5 = gtk_button_new_from_stock ("gtk-ok"); + gtk_widget_show (button5); + gtk_container_add (GTK_CONTAINER (hbuttonbox1), button5); + GTK_WIDGET_SET_FLAGS (button5, GTK_CAN_DEFAULT); + + button6 = gtk_button_new_from_stock ("gtk-close"); + gtk_widget_show (button6); + gtk_container_add (GTK_CONTAINER (hbuttonbox1), button6); + GTK_WIDGET_SET_FLAGS (button6, GTK_CAN_DEFAULT); + + /* Store pointers to all widgets, for use by lookup_widget(). */ + GLADE_HOOKUP_OBJECT_NO_REF (window1, window1, "window1"); + GLADE_HOOKUP_OBJECT (window1, vbox2, "vbox2"); + GLADE_HOOKUP_OBJECT (window1, table1, "table1"); + GLADE_HOOKUP_OBJECT (window1, entry2, "entry2"); + GLADE_HOOKUP_OBJECT (window1, label3, "label3"); + GLADE_HOOKUP_OBJECT (window1, hseparator2, "hseparator2"); + GLADE_HOOKUP_OBJECT (window1, hseparator3, "hseparator3"); + GLADE_HOOKUP_OBJECT (window1, label1, "label1"); + GLADE_HOOKUP_OBJECT (window1, label2, "label2"); + GLADE_HOOKUP_OBJECT (window1, entry1, "entry1"); + GLADE_HOOKUP_OBJECT (window1, hseparator1, "hseparator1"); + GLADE_HOOKUP_OBJECT (window1, hbuttonbox1, "hbuttonbox1"); + GLADE_HOOKUP_OBJECT (window1, button5, "button5"); + GLADE_HOOKUP_OBJECT (window1, button6, "button6"); + + return window1; +} + diff -r 7ea1edf23ab2 -r 285ecb44708d Plugins/General/scrobbler/configure.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Plugins/General/scrobbler/configure.h Sat Feb 25 18:40:22 2006 -0800 @@ -0,0 +1,5 @@ +/* + * DO NOT EDIT THIS FILE - it is generated by Glade. + */ + +GtkWidget* create_window1 (void);