Mercurial > audlegacy-plugins
annotate src/rootvis/config_frontend_widgets.c @ 3021:5fe8ac99a33d
Kill more warnings by removing unused save/write code. We only read IT files.
author | Tony Vroon <chainsaw@gentoo.org> |
---|---|
date | Thu, 09 Apr 2009 22:57:02 +0100 |
parents | 31e6845e722a |
children |
rev | line source |
---|---|
900
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
1 #include <stdio.h> |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
2 #include <stdlib.h> |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
3 #include <string.h> |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
4 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
5 #include <gtk/gtk.h> |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
6 #include <config_frontend.h> |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
7 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
8 extern void print_status(char msg[]); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
9 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
10 void frontend_set_signal(GtkWidget *widget, char* signal, void* func, int data) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
11 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
12 gtk_signal_connect(GTK_OBJECT(widget), signal, GTK_SIGNAL_FUNC(func), GINT_TO_POINTER(data)); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
13 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
14 |
958
30e515b6e651
[svn] A cast a day keeps the compiler warning at bay.
chainsaw
parents:
900
diff
changeset
|
15 GtkWidget *frontend_create_window(int type, char *name) |
900
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
16 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
17 GtkWidget *window; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
18 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
19 print_status("creating window"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
20 print_status(name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
21 window = gtk_window_new(type); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
22 gtk_signal_connect(GTK_OBJECT(window), |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
23 "delete-event", |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
24 GTK_SIGNAL_FUNC(signal_window_close), |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
25 NULL); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
26 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
27 print_status("setting title"); |
958
30e515b6e651
[svn] A cast a day keeps the compiler warning at bay.
chainsaw
parents:
900
diff
changeset
|
28 gtk_window_set_title(GTK_WINDOW(window), name); |
900
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
29 print_status("done"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
30 gtk_widget_show(window); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
31 return window; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
32 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
33 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
34 GtkWidget *frontend_create_box(int box_type, GtkWidget *container, char *label, |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
35 int attach) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
36 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
37 GtkWidget *box; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
38 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
39 print_status("creating box"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
40 print_status(label); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
41 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
42 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
43 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
44 switch (box_type) { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
45 case VBOX: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
46 box = gtk_vbox_new(FALSE, 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
47 gtk_container_set_border_width(GTK_CONTAINER(box), 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
48 break; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
49 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
50 case HBOX: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
51 box = gtk_hbox_new(FALSE, 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
52 gtk_container_set_border_width(GTK_CONTAINER(box), 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
53 break; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
54 case HBBOX: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
55 box = gtk_hbutton_box_new(); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
56 gtk_button_box_set_layout(GTK_BUTTON_BOX(box), |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
57 GTK_BUTTONBOX_END); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
58 gtk_button_box_set_spacing(GTK_BUTTON_BOX(box), 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
59 break; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
60 case HBBOX2: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
61 box = gtk_hbutton_box_new(); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
62 gtk_button_box_set_layout(GTK_BUTTON_BOX(box), |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
63 GTK_BUTTONBOX_EDGE); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
64 gtk_button_box_set_spacing(GTK_BUTTON_BOX(box), 4); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
65 break; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
66 case FRAME: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
67 box = gtk_frame_new(label); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
68 gtk_container_set_border_width(GTK_CONTAINER(box), 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
69 break; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
70 default: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
71 print_status("error"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
72 print_status("trying to create vbox"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
73 box = gtk_vbox_new(FALSE, 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
74 gtk_container_set_border_width(GTK_CONTAINER(box), 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
75 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
76 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
77 print_status("attaching"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
78 switch (attach) { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
79 case ATTACH_TO_NOTEBOOK: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
80 gtk_notebook_append_page(GTK_NOTEBOOK(container), |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
81 box, gtk_label_new(label)); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
82 break; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
83 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
84 case ATTACH_TO_CONTAINER: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
85 gtk_container_add(GTK_CONTAINER(container), box); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
86 break; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
87 case ATTACH_TO_BOX: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
88 gtk_box_pack_start(GTK_BOX(container), box, TRUE, TRUE, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
89 break; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
90 default: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
91 print_status("error"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
92 print_status("trying to attach to container"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
93 gtk_container_add(GTK_CONTAINER(container), box); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
94 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
95 gtk_widget_show(box); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
96 print_status("done"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
97 return box; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
98 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
99 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
100 GtkWidget *frontend_create_notebook(GtkWidget *box) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
101 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
102 GtkWidget *notebook; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
103 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
104 print_status("creating notebook"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
105 notebook = gtk_notebook_new(); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
106 gtk_box_pack_start(GTK_BOX(box), notebook, TRUE, TRUE, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
107 gtk_widget_show(notebook); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
108 return notebook; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
109 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
110 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
111 GtkWidget *frontend_create_button(GtkWidget *container, char *label) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
112 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
113 GtkWidget *button; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
114 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
115 print_status("adding button"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
116 print_status(label); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
117 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
118 button = gtk_button_new_with_label(label); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
119 gtk_widget_show(button); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
120 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
121 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
122 gtk_box_pack_start(GTK_BOX(container), button, TRUE, TRUE, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
123 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
124 return button; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
125 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
126 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
127 GtkWidget *frontend_create_check(GtkWidget *container, char *label) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
128 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
129 GtkWidget *check; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
130 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
131 print_status("creating check"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
132 print_status(label); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
133 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
134 check = gtk_check_button_new_with_label(label); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
135 gtk_widget_show(check); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
136 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
137 gtk_container_add(GTK_CONTAINER(container), check); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
138 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
139 print_status("done"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
140 return check; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
141 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
142 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
143 GtkWidget *frontend_create_label(GtkWidget *container, char *text) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
144 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
145 GtkWidget *label; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
146 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
147 print_status("creating label"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
148 print_status(text); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
149 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
150 label = gtk_label_new(text); |
958
30e515b6e651
[svn] A cast a day keeps the compiler warning at bay.
chainsaw
parents:
900
diff
changeset
|
151 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER); |
30e515b6e651
[svn] A cast a day keeps the compiler warning at bay.
chainsaw
parents:
900
diff
changeset
|
152 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
900
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
153 gtk_widget_show(label); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
154 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
155 gtk_container_add(GTK_CONTAINER(container), label); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
156 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
157 print_status("done"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
158 return label; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
159 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
160 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
161 /* |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
162 GtkWidget *rootvis_create_frame_and_attach(char *name, GtkWidget *box) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
163 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
164 GtkWidget *frame; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
165 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
166 frame = gtk_frame_new(name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
167 gtk_container_set_border_width(GTK_CONTAINER(frame), 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
168 gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
169 gtk_widget_show(frame); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
170 return frame; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
171 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
172 */ |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
173 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
174 GtkWidget *frontend_create_entry(int type, GtkWidget *container, |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
175 char *entry_changed, |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
176 char *label, ...) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
177 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
178 va_list ap; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
179 char *list_element; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
180 char *signal; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
181 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
182 GtkWidget *entry; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
183 GList *list = NULL; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
184 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
185 print_status("creating entry"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
186 print_status(label); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
187 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
188 va_start(ap, label); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
189 switch (type) { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
190 case COMBO: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
191 entry = gtk_combo_new(); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
192 while ((list_element = va_arg(ap, char *))) { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
193 print_status("adding element to list"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
194 print_status(list_element); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
195 list = g_list_append(list, list_element); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
196 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
197 print_status("attaching string list to combo"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
198 gtk_combo_set_popdown_strings(GTK_COMBO(entry), list); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
199 break; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
200 case ENTRY: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
201 entry = gtk_entry_new(); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
202 gtk_entry_set_max_length(GTK_ENTRY(entry), 6); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
203 while ((signal = va_arg(ap, char *))) { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
204 print_status("adding signal to entry"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
205 print_status(signal); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
206 gtk_signal_connect(GTK_OBJECT(entry), |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
207 /* signal */ |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
208 signal, |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
209 /* function */ |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
210 GTK_SIGNAL_FUNC(va_arg(ap, |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
211 void *)), |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
212 /* data */ |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
213 va_arg(ap, char *)); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
214 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
215 break; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
216 default: |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
217 return NULL; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
218 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
219 va_end(ap); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
220 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
221 print_status("attaching entry to container"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
222 gtk_container_add(GTK_CONTAINER(container), entry); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
223 gtk_widget_show(entry); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
224 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
225 print_status("done"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
226 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
227 return entry; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
228 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
229 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
230 void frontend_create_colorpicker(struct config_value *cvar) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
231 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
232 struct rootvis_colorsel* colorsel = cvar->valc.frontend; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
233 GtkWidget *vbox; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
234 GtkWidget *options_frame, *options_vbox; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
235 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
236 static GtkWidget *bbox, *ok, *cancel; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
237 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
238 print_status("pressing button ... "); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
239 gtk_button_set_relief(GTK_BUTTON(colorsel->button), GTK_RELIEF_HALF); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
240 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
241 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
242 print_status("casting window ..."); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
243 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
244 colorsel->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
245 gtk_window_set_title(GTK_WINDOW(colorsel->window), colorsel->complete_name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
246 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
247 gtk_container_set_border_width(GTK_CONTAINER(colorsel->window), 10); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
248 gtk_window_set_policy(GTK_WINDOW(colorsel->window), FALSE, FALSE, FALSE); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
249 gtk_window_set_position(GTK_WINDOW(colorsel->window), |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
250 GTK_WIN_POS_MOUSE); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
251 gtk_signal_connect(GTK_OBJECT(colorsel->window), "destroy", |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
252 GTK_SIGNAL_FUNC(gtk_widget_destroyed), |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
253 &(colorsel->window)); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
254 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
255 vbox = gtk_vbox_new(FALSE, 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
256 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
257 printf("setting name ..."); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
258 options_frame = gtk_frame_new(colorsel->complete_name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
259 printf("done. \n"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
260 gtk_container_set_border_width(GTK_CONTAINER(options_frame), 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
261 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
262 options_vbox = gtk_vbox_new(FALSE, 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
263 gtk_container_set_border_width(GTK_CONTAINER(options_vbox), 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
264 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
265 colorsel->color_picker = gtk_color_selection_new(); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
266 gtk_color_selection_set_has_opacity_control(GTK_COLOR_SELECTION(colorsel->color_picker), TRUE); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
267 gtk_color_selection_set_color(GTK_COLOR_SELECTION(colorsel->color_picker), colorsel->color); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
268 gtk_signal_connect(GTK_OBJECT(colorsel->color_picker), "color_changed", GTK_SIGNAL_FUNC(signal_colorselector_update), cvar); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
269 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
270 gtk_box_pack_start(GTK_BOX(options_vbox), colorsel->color_picker, |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
271 FALSE, FALSE, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
272 gtk_widget_show(colorsel->color_picker); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
273 printf("raising the curtain \n"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
274 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
275 gtk_container_add(GTK_CONTAINER(options_frame), options_vbox); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
276 gtk_widget_show(options_vbox); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
277 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
278 gtk_box_pack_start(GTK_BOX(vbox), options_frame, TRUE, TRUE, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
279 gtk_widget_show(options_frame); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
280 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
281 bbox = gtk_hbutton_box_new(); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
282 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
283 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
284 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
285 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
286 ok = gtk_button_new_with_label("Ok"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
287 gtk_signal_connect(GTK_OBJECT(ok), "clicked", GTK_SIGNAL_FUNC(signal_colorselector_ok), cvar); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
288 GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
289 gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
290 gtk_widget_show(ok); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
291 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
292 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
293 cancel = gtk_button_new_with_label("Cancel"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
294 gtk_signal_connect(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(signal_colorselector_cancel), cvar); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
295 GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
296 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
297 gtk_widget_show(cancel); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
298 gtk_widget_show(bbox); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
299 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
300 gtk_container_add(GTK_CONTAINER(colorsel->window), vbox); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
301 gtk_widget_show(vbox); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
302 gtk_widget_grab_default(ok); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
303 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
304 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
305 void frontend_create_color_button(struct config_value* cvar, GtkWidget *container, char *name, |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
306 char *channel_name) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
307 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
308 struct rootvis_colorsel *color_struct; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
309 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
310 print_status("Allocating memory for color struct"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
311 color_struct = malloc(sizeof(struct rootvis_colorsel)); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
312 cvar->valc.frontend = color_struct; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
313 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
314 frontend_set_color(cvar); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
315 color_struct->window = NULL; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
316 color_struct->name = name; //complete_name; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
317 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
318 print_status("reallocating name"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
319 color_struct->complete_name = |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
320 malloc((sizeof(name) + sizeof(channel_name) + 10)*sizeof(char)); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
321 print_status("done"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
322 sprintf(color_struct->complete_name, "%s - %s", channel_name, name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
323 print_status("done"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
324 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
325 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
326 char* labeltext = (char*)malloc(strlen(name) + 2); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
327 sprintf(labeltext, "%s:", name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
328 color_struct->label = gtk_label_new(labeltext); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
329 gtk_container_add(GTK_CONTAINER(container), GTK_WIDGET(color_struct->label)); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
330 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
331 color_struct->button = gtk_button_new(); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
332 print_status("adding container ... "); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
333 gtk_container_add(GTK_CONTAINER(container), GTK_WIDGET(color_struct->button)); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
334 print_status("done.\nraising ... "); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
335 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
336 print_status("done.\nmaking preview ... "); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
337 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
338 color_struct->preview = gtk_preview_new(GTK_PREVIEW_COLOR); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
339 print_status("done.\nsetting size ... "); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
340 gtk_preview_size(GTK_PREVIEW(color_struct->preview), 30, 28); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
341 print_status("done.\nraising ... "); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
342 print_status("done.\n"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
343 gtk_container_add(GTK_CONTAINER(color_struct->button), color_struct->preview); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
344 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
345 gtk_widget_set_usize(color_struct->button, 32, 26); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
346 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
347 gtk_signal_connect(GTK_OBJECT(color_struct->button), "clicked", |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
348 GTK_SIGNAL_FUNC(signal_toggle_colorselector), cvar); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
349 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
350 frontend_update_color(cvar, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
351 gtk_widget_show(GTK_WIDGET(color_struct->label)); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
352 gtk_widget_show(GTK_WIDGET(color_struct->button)); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
353 gtk_widget_show(color_struct->preview); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
354 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
355 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
356 GtkWidget *frontend_create_channel(int channel) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
357 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
358 GtkWidget *window; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
359 char name[12]; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
360 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
361 print_status("creating gtk window ... "); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
362 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
363 sprintf(name, "Channel %d", channel+1); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
364 print_status(name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
365 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
366 print_status("debug 2"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
367 |
1044
b1128efde471
[svn] - get rid of all warnings gcc 4.2.0 emits with my build configuration.
yaz
parents:
958
diff
changeset
|
368 window = frontend_create_window(GTK_WINDOW_TOPLEVEL, name); |
900
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
369 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
370 print_status("done."); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
371 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
372 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
373 GtkWidget *vbox_0, *notebook_1, *button_box_1, |
2240 | 374 *vbox_2[4], *frame_3[4], *hbox_4[5], |
900
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
375 *close_button, *revert_button; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
376 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
377 vbox_0 = frontend_create_box(VBOX, window, "rootvis_config_vbox", ATTACH_TO_CONTAINER); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
378 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
379 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
380 notebook_1 = frontend_create_notebook(vbox_0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
381 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
382 /* vbox_2[0] = frontend_create_box(VBOX, notebook_1, "General", ATTACH_TO_NOTEBOOK); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
383 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
384 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
385 vbox_2[1] = frontend_create_box(VBOX, notebook_1, "Geometry", ATTACH_TO_NOTEBOOK); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
386 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
387 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
388 vbox_2[2] = frontend_create_box(VBOX, notebook_1, "Look & Feel", ATTACH_TO_NOTEBOOK); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
389 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
390 }*/ |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
391 vbox_2[3] = frontend_create_box(VBOX, notebook_1, "Colors", ATTACH_TO_NOTEBOOK); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
392 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
393 frame_3[0] = frontend_create_box(FRAME, vbox_2[3], "Gradient", ATTACH_TO_BOX); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
394 hbox_4[0] = frontend_create_box(HBOX, frame_3[0], "Bar", ATTACH_TO_CONTAINER); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
395 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
396 frontend_create_color_button(&Cchannel[channel].def[11], hbox_4[0], "Begin", name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
397 frontend_create_color_button(&Cchannel[channel].def[12], hbox_4[0], "2/5", name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
398 frontend_create_color_button(&Cchannel[channel].def[13], hbox_4[0], "4/5", name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
399 frontend_create_color_button(&Cchannel[channel].def[14], hbox_4[0], "End", name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
400 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
401 frame_3[1] = frontend_create_box(FRAME, vbox_2[3], "Bevel, Peaks & Shadow", ATTACH_TO_BOX); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
402 hbox_4[1] = frontend_create_box(HBOX, frame_3[1], "etc", ATTACH_TO_CONTAINER); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
403 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
404 frontend_create_color_button(&Cchannel[channel].def[15], hbox_4[1], "Bevel", name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
405 frontend_create_color_button(&Cchannel[channel].def[20], hbox_4[1], "Peaks", name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
406 frontend_create_color_button(&Cchannel[channel].def[16], hbox_4[1], "Shadow", name); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
407 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
408 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
409 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
410 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
411 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
412 button_box_1 = frontend_create_box(HBBOX2, vbox_0, "Button Box", ATTACH_TO_BOX); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
413 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
414 revert_button = frontend_create_button(button_box_1, "Revert"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
415 frontend_set_signal(revert_button, "clicked", signal_revert, channel); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
416 close_button = frontend_create_button(button_box_1, "Close"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
417 frontend_set_signal(close_button, "clicked", signal_hide, channel); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
418 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
419 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
420 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
421 config_set_widgets(channel); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
422 return window; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
423 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
424 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
425 GtkWidget *frontend_create_main(void) |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
426 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
427 GtkWidget *window, *channel_button[2], |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
428 *button_box[2], *channels_frame, *main_frame, *vbox, |
2240 | 429 *main_vbox, *channel_vbox[2], |
900
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
430 *save_button, *revert_button, *close_button; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
431 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
432 window = frontend_create_window(GTK_WINDOW_TOPLEVEL, "Main"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
433 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
434 vbox = frontend_create_box(VBOX, window, "vbox", ATTACH_TO_CONTAINER); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
435 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
436 main_frame = frontend_create_box(FRAME, vbox, "Global Settings", ATTACH_TO_BOX); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
437 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
438 main_vbox = frontend_create_box(VBOX, main_frame, "main_hbox", |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
439 ATTACH_TO_CONTAINER); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
440 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
441 widgets.stereo_check = frontend_create_check(main_vbox, "stereo support"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
442 frontend_set_signal(widgets.stereo_check, "toggled", signal_stereo_toggled, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
443 widgets.debug_check = frontend_create_check(main_vbox, "debug messages (stdout)"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
444 frontend_set_signal(widgets.debug_check, "toggled", signal_check_toggled, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
445 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
446 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
447 channels_frame = frontend_create_box(FRAME, vbox, "Channel-specific", |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
448 ATTACH_TO_BOX); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
449 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
450 button_box[0] = frontend_create_box(HBOX, channels_frame, "Main Button Box", |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
451 ATTACH_TO_CONTAINER); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
452 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
453 channel_vbox[0] = frontend_create_box(VBOX, button_box[0], "channel_vbox_0", |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
454 ATTACH_TO_CONTAINER); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
455 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
456 channel_button[0] = frontend_create_button(channel_vbox[0], "First Channel"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
457 frontend_set_signal(channel_button[0], "clicked", signal_show, 0); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
458 widgets.stereo_status[0] = frontend_create_label(channel_vbox[0], "renders both channels"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
459 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
460 channel_vbox[1] = frontend_create_box(VBOX, button_box[0], "channel_vbox_0", |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
461 ATTACH_TO_CONTAINER); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
462 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
463 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
464 channel_button[1] = frontend_create_button(channel_vbox[1], "Second Channel"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
465 frontend_set_signal(channel_button[1], "clicked", signal_show, 1); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
466 widgets.stereo_status[1] = frontend_create_label(channel_vbox[1], "unused / inactive"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
467 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
468 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
469 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
470 button_box[1] = frontend_create_box(HBBOX, vbox, "Button Box", ATTACH_TO_BOX); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
471 { |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
472 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
473 revert_button = frontend_create_button(button_box[1], "Revert All"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
474 frontend_set_signal(revert_button, "clicked", signal_revert, 2); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
475 save_button = frontend_create_button(button_box[1], "Save Settings"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
476 frontend_set_signal(save_button, "clicked", signal_save, 2); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
477 close_button = frontend_create_button(button_box[1], "Close Windows"); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
478 frontend_set_signal(close_button, "clicked", signal_hide, 2); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
479 |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
480 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
481 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
482 } |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
483 config_set_widgets(2); |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
484 return window; |
d985f0dcdeb0
[svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff
changeset
|
485 } |