wok view cpige/stuff/cpige.patch @ rev 25466

Update some web_site
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Oct 01 09:32:27 2022 +0000 (19 months ago)
parents 9753324921b9
children
line source
1 diff -ur cpigeorig/gui/callbacks.c cpige/gui/callbacks.c
2 --- cpigeorig/gui/callbacks.c 2022-07-21 22:11:29.000000000 +0200
3 +++ cpige/gui/callbacks.c 2022-07-28 08:43:22.000000000 +0200
4 @@ -310,10 +310,10 @@
5 idx = gtk_combo_box_get_active(combobox);
6 if (idx == 0) /* Hour */
7 {
8 - gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(gtk_adjustment_new (1, 1, 12, 1, 1, 1)));
9 + gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(gtk_adjustment_new (1, 1, 12, 1, 1, 0)));
10 gtk_spin_button_set_value(spinButton, 1);
11 } else if (idx == 1) { /* Minute */
12 - gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(gtk_adjustment_new (10, 10, 30, 10, 10, 10)));
13 + gtk_spin_button_set_adjustment(spinButton, GTK_ADJUSTMENT(gtk_adjustment_new (10, 10, 30, 10, 10, 0)));
14 gtk_spin_button_set_value(spinButton, 10);
15 } else {
16 g_printf("Unknown interval type (%d)\n", idx);
17 @@ -592,7 +592,7 @@
18 {
19 int percentage, hour, min, sec, left_sec;
20 gchar statusText[100];
21 - memset(statusText, 0, 100);
22 + memset(statusText, 0, 100);
24 left_sec = atoi(left);
25 hour = left_sec / 3600;
26 @@ -605,7 +605,7 @@
27 }
28 }
30 - g_free(line);
31 +
33 } else if (condition & G_IO_HUP) {
34 if (g_object_get_data(G_OBJECT(mainWindow), "stopping") != NULL)
35 diff -ur cpigeorig/gui/configlib.c cpige/gui/configlib.c
36 --- cpigeorig/gui/configlib.c 2022-07-21 22:11:29.000000000 +0200
37 +++ cpige/gui/configlib.c 2022-07-28 08:43:22.000000000 +0200
38 @@ -68,7 +68,7 @@
39 buf[i++] = c;
40 }
41 }
42 - free(buf); /* Thx dunky */
43 + /* Thx dunky */
44 return config;
45 }
47 @@ -145,8 +145,8 @@
48 if (j == 0)
49 {
50 fprintf(stderr, "CONFIG ERROR: Incorrect Line. Should not start with '='\n");
51 - free(confObj);
52 - free(buf);
53 +
54 +
55 return NULL;
56 }
58 @@ -181,8 +181,6 @@
59 if ((j == 0) || (confObj->var == NULL))
60 {
61 fprintf(stderr, "Invalid entry: variable defined, but without val.\n");
62 - free(confObj);
63 - free(buf);
64 return NULL;
65 }
67 @@ -202,7 +200,6 @@
69 confObj->val = strdup(buf);
71 - free(ptr);
73 return confObj;
74 }
75 @@ -310,17 +307,10 @@
76 while (start != NULL)
77 {
78 if (start->conf != NULL)
79 - {
80 - if (start->conf->var != NULL)
81 - free(start->conf->var);
82 - if (start->conf->val != NULL)
83 - free(start->conf->val);
85 - free(start->conf);
86 - }
87 old = start;
88 start = start->next;
89 - free(old);
90 +
91 }
92 }
94 @@ -385,7 +375,7 @@
95 }
96 } else {
97 *value = atoi(tmp);
98 - free(tmp);
99 +
100 }
101 }
103 @@ -407,6 +397,5 @@
104 *value = atoi(tmp);
105 if ( (*value) != 1)
106 *value = 0;
107 - free(tmp);
108 }
109 }
110 diff -ur cpigeorig/gui/interface.c cpige/gui/interface.c
111 --- cpigeorig/gui/interface.c 2022-07-21 22:11:29.000000000 +0200
112 +++ cpige/gui/interface.c 2022-07-28 08:43:22.000000000 +0200
113 @@ -118,7 +118,7 @@
115 mainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
116 gtk_widget_set_name (mainWindow, "mainWindow");
117 - gtk_window_set_title (GTK_WINDOW (mainWindow), gettext("cPige Configurator by Laurent Coustet"));
118 + gtk_window_set_title (GTK_WINDOW (mainWindow), gettext("cPige Configurator by Laurent Coustet (SliTaz-Version)"));
119 gtk_window_set_icon_name (GTK_WINDOW (mainWindow), "gtk-media-record");
121 vbox1 = gtk_vbox_new (FALSE, 0);
122 @@ -131,7 +131,7 @@
123 gtk_widget_show (menubar1);
124 gtk_box_pack_start (GTK_BOX (vbox1), menubar1, FALSE, FALSE, 0);
126 - menuitem13 = gtk_menu_item_new_with_mnemonic ("_Fichier");
127 + menuitem13 = gtk_menu_item_new_with_mnemonic ("_File");
128 gtk_widget_set_name (menuitem13, "menuitem13");
129 gtk_widget_show (menuitem13);
130 gtk_container_add (GTK_CONTAINER (menubar1), menuitem13);
131 @@ -356,7 +356,7 @@
132 gtk_widget_show (label17);
133 gtk_box_pack_start (GTK_BOX (hbox11), label17, FALSE, FALSE, 0);
135 - IntervalDelaySpinButton_adj = gtk_adjustment_new (10, 10, 30, 10, 10, 10);
136 + IntervalDelaySpinButton_adj = gtk_adjustment_new (10, 10, 30, 10, 10, 0);
137 IntervalDelaySpinButton = gtk_spin_button_new (GTK_ADJUSTMENT (IntervalDelaySpinButton_adj), 1, 0);
138 gtk_widget_set_name (IntervalDelaySpinButton, "IntervalDelaySpinButton");
139 gtk_widget_show (IntervalDelaySpinButton);
140 @@ -377,7 +377,7 @@
141 gtk_frame_set_label_widget (GTK_FRAME (PigeModeFrame), label16);
142 gtk_label_set_use_markup (GTK_LABEL (label16), TRUE);
144 - MandatoryParametersLabel = gtk_label_new (gettext("<b>Mandatory parameters</b>"));
145 + MandatoryParametersLabel = gtk_label_new (gettext("<b>URL Streaming</b>"));
146 gtk_widget_set_name (MandatoryParametersLabel, "MandatoryParametersLabel");
147 gtk_widget_show (MandatoryParametersLabel);
148 gtk_frame_set_label_widget (GTK_FRAME (ParametersFrame), MandatoryParametersLabel);
149 @@ -459,7 +459,7 @@
150 gtk_tooltips_set_tip (tooltips, useNumbersButton, gettext("Should cPige prefix songs with a unique number ? (UNIX only, with pige mode Disabled)"), NULL);
151 gtk_button_set_focus_on_click (GTK_BUTTON (useNumbersButton), FALSE);
153 - spinbutton2_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10);
154 + spinbutton2_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 0);
155 spinbutton2 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton2_adj), 1, 0);
156 gtk_widget_set_name (spinbutton2, "skipSongsSpin");
157 gtk_widget_show (spinbutton2);
158 diff -ur cpigeorig/gui/main.c cpige/gui/main.c
159 --- cpigeorig/gui/main.c 2022-07-21 22:11:29.000000000 +0200
160 +++ cpige/gui/main.c 2022-07-28 08:43:22.000000000 +0200
161 @@ -230,7 +230,7 @@
162 if (retval == FALSE)
163 return retval;
164 } else {
165 - free(val);
166 +
167 }
169 /* Setup savedirectory */
170 @@ -398,7 +398,7 @@
171 0
172 );
174 - free(val);
175 +
177 gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), (gdouble)(intval));
179 @@ -449,7 +449,7 @@
180 {
181 gtk_tree_model_get(model, &iter, 0, &val, -1);
182 conf_setValue(&conf, "url", val);
183 - g_free(val);
184 +
185 } while ( gtk_tree_model_iter_next(model, &iter) == TRUE);
186 }
188 @@ -458,7 +458,7 @@
189 val = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget));
191 conf_setValue(&conf, "savedirectory", val);
192 - g_free(val);
193 +
195 /* Retreiving weekbackup */
196 widget = lookup_widget(mainWindow, "WeekBackupButton");
197 @@ -515,7 +515,7 @@
198 val = (gchar *)g_malloc(8);
199 snprintf(val, 8, "%d", intval);
200 conf_setValue(&conf, "skipsongs", val);
201 - g_free(val);
202 +
204 /* Retreiving next title */
205 widget = lookup_widget(mainWindow, "NextTitleEntry");
206 @@ -536,7 +536,7 @@
207 val = (gchar *)g_malloc(8);
208 snprintf(val, 8, "%d", intval);
209 conf_setValue(&conf, "cutdelay", val);
210 - g_free(val);
211 +
213 /* Retreiving logfile */
214 widget = lookup_widget(mainWindow, "LogfileEntry");
215 diff -ur cpigeorig/Makefile cpige/Makefile
216 --- cpigeorig/Makefile 2022-07-21 22:11:29.000000000 +0200
217 +++ cpige/Makefile 2022-07-28 08:43:22.000000000 +0200
218 @@ -16,6 +16,6 @@
219 docker run --rm -it -v $(shell pwd):$(shell pwd) -w $(shell pwd) alpine:latest ./build_alpine.sh
221 cpige: $(OBJS)
222 - $(CC) $(CFLAGS) $(CLIBS) $(OBJS) -static -o cpige
223 + $(CC) $(CFLAGS) $(CLIBS) $(OBJS) -o cpige