Line 0
Link Here
|
|
|
1 |
--- beep/playlist.c.orig Fri Nov 14 06:25:26 2003 |
2 |
+++ beep/playlist.c Fri Nov 14 06:34:23 2003 |
3 |
@@ -607,6 +607,7 @@ |
4 |
|
5 |
while (*string) |
6 |
{ |
7 |
+ GList *node; |
8 |
temp = strchr(string, '\n'); |
9 |
if (temp) |
10 |
{ |
11 |
@@ -633,7 +634,6 @@ |
12 |
} |
13 |
} |
14 |
|
15 |
- GList *node; |
16 |
node = g_list_nth(get_playlist(), pos); |
17 |
|
18 |
entries += i; |
19 |
@@ -2346,6 +2346,7 @@ |
20 |
guint64 node_idx; |
21 |
gchar * from_real; |
22 |
gboolean error; |
23 |
+ db_node * node; |
24 |
|
25 |
/* It's not really a waste creating both beforehand since we will certainly need the folder one at least once, |
26 |
and most probably the audio one too anyway */ |
27 |
@@ -2366,7 +2367,6 @@ |
28 |
|
29 |
current = gtk_tree_model_get_path(model, &parent_iter); |
30 |
node_idx = dirbrowser_get_nodeidx_from_iter(model, &parent_iter, 0, &error); |
31 |
- db_node * node; |
32 |
node = g_ptr_array_index(nodes, node_idx); |
33 |
from_real = g_strconcat(node->path_real,"/",from,NULL); |
34 |
|
35 |
@@ -2388,10 +2388,11 @@ |
36 |
{ |
37 |
while ((dirent = readdir(dir)) != NULL) |
38 |
{ |
39 |
+ char * name_real; |
40 |
// FIXME: Excludes hidden dirs too (do we want them anyway?) |
41 |
if (dirent->d_name[0] == '.') |
42 |
continue; |
43 |
- char * name_real = g_strdup(g_strconcat(from_real,"/",dirent->d_name,NULL)); |
44 |
+ name_real = g_strdup(g_strconcat(from_real,"/",dirent->d_name,NULL)); |
45 |
stat(name_real, &statbuf); |
46 |
|
47 |
if ( S_ISDIR(statbuf.st_mode) ) { |
48 |
@@ -2513,9 +2514,10 @@ |
49 |
char *buffer, **lines, **frags; |
50 |
struct stat stats; |
51 |
guint i; |
52 |
- |
53 |
+ GdkPixbuf * buf; |
54 |
+ |
55 |
model = gtk_tree_store_new(2, GDK_TYPE_PIXBUF, G_TYPE_STRING); |
56 |
- GdkPixbuf * buf = gdk_pixbuf_new_from_inline(sizeof(harddisk_pixbuf), |
57 |
+ buf = gdk_pixbuf_new_from_inline(sizeof(harddisk_pixbuf), |
58 |
harddisk_pixbuf, |
59 |
TRUE, |
60 |
NULL); |
61 |
@@ -2803,13 +2805,16 @@ |
62 |
|
63 |
PangoAttrList *attrs; |
64 |
PangoAttribute *attr; |
65 |
+ |
66 |
+ GdkPixbuf * buf; |
67 |
+ |
68 |
attrs = pango_attr_list_new (); |
69 |
attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); |
70 |
attr->start_index = 0; |
71 |
attr->end_index = -1; |
72 |
pango_attr_list_insert (attrs, attr); |
73 |
|
74 |
- GdkPixbuf * buf = gdk_pixbuf_new_from_inline(sizeof(harddisk_pixbuf), |
75 |
+ buf = gdk_pixbuf_new_from_inline(sizeof(harddisk_pixbuf), |
76 |
harddisk_pixbuf, |
77 |
TRUE, |
78 |
NULL); |
79 |
@@ -2863,9 +2868,10 @@ |
80 |
if ( S_ISDIR(statbuf.st_mode) ) { |
81 |
|
82 |
db_node * node; |
83 |
- node = g_malloc0(sizeof(db_node)); |
84 |
char * dir = g_strdup(path_real); |
85 |
char * name = g_strdup(path_real); |
86 |
+ |
87 |
+ node = g_malloc0(sizeof(db_node)); |
88 |
node->path_real = dir; |
89 |
|
90 |
gtk_label_set_text(variable, g_strdup(g_strconcat("Choose a Name for:\n",name,NULL))); |
91 |
@@ -2932,9 +2938,9 @@ |
92 |
(model, |
93 |
&iter, |
94 |
gtk_tree_path_to_string(paths->data))) { |
95 |
+ db_node * node; |
96 |
gtk_tree_store_remove (GTK_TREE_STORE(model), &iter); |
97 |
|
98 |
- db_node * node; |
99 |
node = g_ptr_array_index(nodes, node_idx); |
100 |
g_ptr_array_remove_index(nodes, node_idx); |
101 |
ctr_array--; |
102 |
@@ -3178,7 +3184,11 @@ |
103 |
/* create window, etc */ |
104 |
|
105 |
/* yes this is all messed up */ |
106 |
- |
107 |
+ GSList * group; |
108 |
+ GtkWidget * hbox_default_setting; |
109 |
+ PangoAttrList *attrs; |
110 |
+ PangoAttribute *attr; |
111 |
+ |
112 |
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); |
113 |
gtk_window_set_title (GTK_WINDOW (window), "beep :: directory browser"); |
114 |
gtk_container_set_border_width(GTK_CONTAINER(window), |
115 |
@@ -3195,8 +3205,6 @@ |
116 |
|
117 |
vbox = gtk_vbox_new (FALSE, 0); |
118 |
|
119 |
- PangoAttrList *attrs; |
120 |
- PangoAttribute *attr; |
121 |
attrs = pango_attr_list_new (); |
122 |
attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); |
123 |
attr->start_index = 0; |
124 |
@@ -3235,8 +3243,6 @@ |
125 |
hbox = gtk_hbox_new (FALSE, 0); |
126 |
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE, 0); |
127 |
|
128 |
- GSList * group; |
129 |
- |
130 |
rb_enq = gtk_radio_button_new(NULL); |
131 |
group = gtk_radio_button_get_group(rb_enq); |
132 |
rb_play = gtk_radio_button_new(group); |
133 |
@@ -3257,7 +3263,6 @@ |
134 |
|
135 |
gtk_misc_set_alignment(GTK_MISC(label_rb), 0.0, 0.0); |
136 |
|
137 |
- gtk_label_set_attributes (GTK_LABEL(label_rb), attrs); |
138 |
|
139 |
gtk_container_add(GTK_CONTAINER (frame),vbox); |
140 |
gtk_box_pack_start(GTK_BOX (vbox_main), frame,TRUE,TRUE,0); |
141 |
@@ -3287,7 +3292,7 @@ |
142 |
|
143 |
hbox_lower = gtk_hbox_new(FALSE, 8); |
144 |
|
145 |
- GtkWidget * hbox_default_setting = gtk_hbox_new(FALSE,8); |
146 |
+ hbox_default_setting = gtk_hbox_new(FALSE,8); |
147 |
|
148 |
gtk_box_pack_start(GTK_BOX(hbox_default_setting), table_rb,FALSE,FALSE,0); |
149 |
gtk_box_pack_start(GTK_BOX(hbox_default_setting), gtk_vseparator_new(), FALSE,FALSE,0); |