ABF is currently being migrated to new servers. Pull requests are currently not operational due to git upgrade, they will be fixed as soon as possible.
avatar
gvm has added 33eb7bd82a
Updated to release 1.9.7, rediffed P0 and P2, dropped P1 and fixed fi...

...le list

... ... --- a/.abf.yml
... ... +++ b/.abf.yml
... ... @@ -1,3 +1,3 @@
1 1
sources:
2
  audio-recorder-1.6-2.tar.gz: 8b9c4f712fa8fde48c72b1521a867acb625608d1
3
  audio-recorder_ru.po.tar.gz: de451e0d9151b3997e685275b9cb927a36d51aec
3
\ No newline at end of file
2
  audio-recorder-1.9.7.tar.gz: 0d02481e59904f50986c521cf58cce17afebc7ba
3
  audio-recorder_ru.po.tar.gz: de451e0d9151b3997e685275b9cb927a36d51aec
view file @ 667d45574f
... ... --- a/audio-recorder-1.6-2-fix-clash-with-GtkLevelBar-from-Gtk3.patch
... ... +++ /dev/null
... ... @@ -1,1020 +0,0 @@
0
diff -rupN audio-recorder.old/po/POTFILES.in audio-recorder/po/POTFILES.in
1
--- audio-recorder.old/po/POTFILES.in	2014-09-28 19:15:05.000000000 +0200
2
+++ audio-recorder/po/POTFILES.in	2016-01-16 11:46:36.645876448 +0100
3
@@ -24,8 +24,8 @@ src/gst-pipeline.c
4
 src/gst-pipeline.h
5
 src/gst-recorder.c
6
 src/gst-recorder.h
7
-src/gtklevelbar.c
8
-src/gtklevelbar.h
9
+src/levelbar.c
10
+src/levelbar.h
11
 src/help.c
12
 src/help.h
13
 src/log.c
14
diff -rupN audio-recorder.old/src/gtklevelbar.c audio-recorder/src/gtklevelbar.c
15
--- audio-recorder.old/src/gtklevelbar.c	2015-02-06 15:04:35.000000000 +0100
16
+++ audio-recorder/src/gtklevelbar.c	1970-01-01 01:00:00.000000000 +0100
17
@@ -1,357 +0,0 @@
18
-/*
19
- * Copyright (c) Linux community.
20
- *
21
- * This library is free software; you can redistribute it and/or
22
- * modify it under the terms of the GNU Library General Public
23
- * License as published by the Free Software Foundation; either
24
- * version 3 of the License (GPL3), or any later version.
25
- *
26
- * This library is distributed in the hope that it will be useful,
27
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
28
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29
- * See the GNU Library General Public License 3 for more details.
30
- *
31
- * You should have received a copy of the GNU Library General Public
32
- * License 3 along with this program; if not, see /usr/share/common-licenses/GPL file
33
- * or write to Free Software Foundation, Inc., 59 Temple Place - Suite 330,
34
- * Boston, MA 02111-1307, USA.
35
-*/
36
-#include "gtklevelbar.h"
37
-#include <math.h> // round()
38
-
39
-// A simple level bar widget.
40
-// By Osmo Antero.
41
-//
42
-// Sample call:
43
-// GtkWidget *lb = gtk_level_bar_new();
44
-// gtk_widget_show(lb);
45
-//
46
-// Set value [0.0, 1.0].
47
-// gtk_level_bar_set_fraction(GTK_LEVEL_BAR(lb), 0.8);
48
-//
49
-// Show %-value [0 - 100%] or plain value [0 - 1.0] on the level bar. See BAR_VALUE enum.
50
-// gtk_level_bar_set_value_type(GTK_LEVEL_BAR(lb), VALUE_PRECENT);
51
-//
52
-
53
-struct _GtkLevelBarPrivate {
54
-    gdouble fraction;
55
-    guint bar_height;
56
-    enum BAR_VALUE bar_value;
57
-    enum BAR_SHAPE bar_shape;
58
-};
59
-
60
-static void gtk_level_bar_get_preferred_width(GtkWidget *widget, gint *minimum, gint *natural);
61
-static void gtk_level_bar_get_preferred_height (GtkWidget *widget,gint *minimum, gint *natural);
62
-
63
-static void gtk_level_bar_real_update(GtkLevelBar *progress);
64
-static gboolean gtk_level_bar_draw(GtkWidget *widget, cairo_t *cr);
65
-
66
-static void gtk_level_bar_finalize(GObject *object);
67
-
68
-G_DEFINE_TYPE(GtkLevelBar, gtk_level_bar, GTK_TYPE_WIDGET);
69
-
70
-static void gtk_level_bar_class_init (GtkLevelBarClass *class) {
71
-    GObjectClass *gobject_class;
72
-    GtkWidgetClass *widget_class;
73
-
74
-    gobject_class = G_OBJECT_CLASS (class);
75
-    widget_class = (GtkWidgetClass *)class;
76
-
77
-    gobject_class->set_property = NULL;
78
-    gobject_class->get_property = NULL;
79
-    gobject_class->finalize = gtk_level_bar_finalize;
80
-
81
-    widget_class->draw = gtk_level_bar_draw;
82
-    widget_class->get_preferred_width = gtk_level_bar_get_preferred_width;
83
-    widget_class->get_preferred_height = gtk_level_bar_get_preferred_height;
84
-
85
-    g_type_class_add_private (class, sizeof (GtkLevelBarPrivate));
86
-}
87
-
88
-static void gtk_level_bar_init(GtkLevelBar *pbar) {
89
-    GtkLevelBarPrivate *priv;
90
-
91
-    pbar->priv = G_TYPE_INSTANCE_GET_PRIVATE(pbar, GTK_TYPE_LEVEL_BAR, GtkLevelBarPrivate);
92
-    priv = pbar->priv;
93
-
94
-    priv->fraction = 0.0;
95
-    priv->bar_height = 8;
96
-    priv->bar_value = VALUE_NONE;
97
-    priv->bar_shape = SHAPE_CIRCLE; // pulsing line with circle at end.
98
-
99
-    gtk_widget_set_has_window(GTK_WIDGET (pbar), FALSE);
100
-}
101
-
102
-GtkWidget *gtk_level_bar_new(void) {
103
-    GtkWidget *pbar;
104
-    pbar = g_object_new(GTK_TYPE_LEVEL_BAR, NULL);
105
-    return pbar;
106
-}
107
-
108
-static void gtk_level_bar_real_update (GtkLevelBar *pbar) {
109
-    GtkWidget *widget;
110
-
111
-    g_return_if_fail (GTK_IS_LEVEL_BAR (pbar));
112
-
113
-    GtkLevelBarPrivate __attribute__ ((unused)) *priv = pbar->priv;
114
-
115
-    widget = GTK_WIDGET(pbar);
116
-
117
-    gtk_widget_queue_draw(widget);
118
-}
119
-
120
-static void gtk_level_bar_finalize (GObject *object) {
121
-    G_OBJECT_CLASS(gtk_level_bar_parent_class)->finalize (object);
122
-}
123
-
124
-static void gtk_level_bar_get_preferred_width (GtkWidget *widget,gint *minimum, gint *natural) {
125
-    *minimum = 50;
126
-    *natural = 160;
127
-}
128
-
129
-static void gtk_level_bar_get_preferred_height (GtkWidget *widget, gint      *minimum, gint      *natural) {
130
-    *minimum = 6;
131
-    *natural = 8;
132
-}
133
-
134
-static gboolean gtk_level_bar_draw(GtkWidget *widget, cairo_t *cr) {
135
-    // Draw level bar and optional text
136
-    GtkLevelBar *pbar = GTK_LEVEL_BAR (widget);
137
-    GtkLevelBarPrivate *priv = pbar->priv;
138
-    GtkStyleContext *context;
139
-    int width, height;
140
-
141
-    context = gtk_widget_get_style_context(widget);
142
-
143
-    width = gtk_widget_get_allocated_width(widget);
144
-    height = gtk_widget_get_allocated_height(widget);
145
-
146
-    // Bar thickness
147
-    gdouble bar_height = MIN(height , priv->bar_height);
148
-
149
-    // Vertical pos
150
-    gdouble y = (height - bar_height)/2;
151
-
152
-    // Pulse width
153
-    gdouble w = priv->fraction/(1.00/width);
154
-
155
-    // Debug:
156
-    // LOG_DEBUG("width=%d height=%d bar_height=%2.1f y=%2.1f w=%2.1f  fraction=%2.1f\n", width, height, bar_height, y, w, priv->fraction);
157
-
158
-    gtk_style_context_save(context);
159
-    gtk_render_background(context, cr, 0, 0, width, height);
160
-    gtk_render_frame(context, cr, 0, 0, width, height);
161
-
162
-    // Render level bar with current theme and color.
163
-
164
-    // Progressbar style
165
-    gtk_style_context_add_class(context, GTK_STYLE_CLASS_PROGRESSBAR);
166
-
167
-    if (priv->fraction > 0.001) {
168
-
169
-        switch (priv->bar_shape) {
170
-
171
-        case SHAPE_LINE:
172
-            // Render a single line
173
-            if (priv->bar_value == VALUE_NONE) {
174
-                // No value (text) shown. Draw a line on the middle.
175
-                gtk_render_line(context, cr, 0, y + (bar_height / 2), w, y + (bar_height / 2));
176
-
177
-            } else {
178
-                // Draw a line under text.
179
-                gtk_render_line(context, cr, 0, y + (bar_height ), w, y + (bar_height ));
180
-            }
181
-
182
-            break;
183
-
184
-        case SHAPE_LINE2:
185
-            // Render two horizontal lines + close the end.
186
-            gtk_render_line(context, cr, 0, y-1 , w, y-1);
187
-            gtk_render_line(context, cr, 0, y + (bar_height ), w, y + (bar_height ));
188
-            gtk_render_line(context, cr, w, y - 1, w, y + (bar_height ));
189
-            break;
190
-
191
-        case SHAPE_CIRCLE:
192
-            // Draw a line on the middle + circle at the end.
193
-            gtk_render_line(context, cr, 0, y + (bar_height / 2), w, y + (bar_height / 2));
194
-            gtk_render_option(context, cr, w, y, bar_height+1, bar_height+1);
195
-            break;
196
-
197
-        default:
198
-            // case SHAPE_LEVELBAR:
199
-
200
-            // EDIT: gtk_render_activity() does not work in GTK 3.14+
201
-            // gtk_style_context_set_state(context, GTK_STATE_FLAG_ACTIVE);
202
-            // gtk_render_activity(context, cr, 0, y, w, bar_height);
203
-
204
-            // Render a filled frame (this is a typical levelbar).
205
-            gtk_render_frame(context, cr, 0, y, w, bar_height);
206
-            break;
207
-
208
-        }
209
-    }
210
-
211
-    gtk_style_context_restore(context);
212
-
213
-    cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
214
-    cairo_set_font_size(cr, priv->bar_height);
215
-
216
-    GdkRGBA color;
217
-    gtk_style_context_get_border_color(context, GTK_STATE_NORMAL, &color);
218
-    gdk_cairo_set_source_rgba(cr, &color);
219
-    color.alpha = 0.9;
220
-
221
-    // Calculate total width of scale
222
-    cairo_text_extents_t extents;
223
-    cairo_text_extents(cr, "0.0", &extents);
224
-    gint total_w = 9 * (extents.x_advance + extents.width);
225
-
226
-    // Debug:
227
-    // g_print("Bar width=%d  total_w=%d  bearing=%3.1f advance=%3.1f char.width=%3.1f\n", width, total_w,
228
-    //          extents.x_bearing, extents.x_advance, extents.width);
229
-
230
-    // Draw values
231
-    gboolean draw_all = (total_w - extents.width) < width;
232
-
233
-    // Show normalized value [0 - 1.0]?
234
-    if (priv->bar_value == VALUE_0_1) {
235
-        // Value: 0.1  0.2  0.3  0.4...0.9
236
-
237
-        gint i = 0;
238
-        for (i=0; i < 10; i++) {
239
-            gchar *s = NULL;
240
-
241
-            // Draw all or draw only each second value?
242
-            if (draw_all || (i % 2 == 0))
243
-                s = g_strdup_printf("%2.1f", (gdouble)i/10.0);
244
-
245
-            if (!s) continue;
246
-
247
-            cairo_text_extents_t extents;
248
-            cairo_text_extents(cr, s, &extents);
249
-
250
-            gdouble xx = (width/10) * i;
251
-            gdouble yy = (height/2)-(extents.height/2 + extents.y_bearing) + 0.2;
252
-
253
-            cairo_move_to(cr, xx, yy);
254
-            cairo_show_text(cr, s);
255
-
256
-            g_free(s);
257
-        }
258
-
259
-        // Show percentage value?
260
-    } else if (priv->bar_value == VALUE_PERCENT) {
261
-        // Value: 10% . 20% . 30% . 40% . 50% ... 90%
262
-        gint i = 0;
263
-        for (i=0; i < 10; i++) {
264
-            gchar *s = NULL;
265
-            if (i % 2 == 0)
266
-                s = g_strdup_printf("%2.0f%%", (gdouble)i*10.0);
267
-            else
268
-                s = g_strdup_printf("%3s", ".");
269
-
270
-            cairo_text_extents_t extents;
271
-            cairo_text_extents(cr, s, &extents);
272
-
273
-            gdouble xx = (width/10) * i;
274
-            gdouble yy = (height/2)-(extents.height/2 + extents.y_bearing);
275
-
276
-            cairo_move_to(cr, xx, yy);
277
-            cairo_show_text(cr, s);
278
-
279
-            g_free(s);
280
-        }
281
-    }
282
-
283
-#if 0
284
-    // Commented out by moma 30.sep.2012.
285
-
286
-    // Set text
287
-    if (priv->text) {
288
-        cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
289
-
290
-        cairo_set_font_size(cr, 0.5*height);
291
-        cairo_text_extents_t extents;
292
-        cairo_text_extents(cr, priv->text, &extents);
293
-
294
-        // Ref: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-text-extents-t
295
-        gdouble xx = width-(extents.width + extents.x_bearing)-2;
296
-        gdouble yy = height/2-(extents.height/2 + extents.y_bearing);
297
-
298
-        GdkRGBA color;
299
-        gtk_style_context_get_border_color(context, GTK_STATE_NORMAL, &color);
300
-        gdk_cairo_set_source_rgba(cr, &color);
301
-        color.alpha = 0.9;
302
-
303
-        cairo_move_to(cr, xx, yy);
304
-        cairo_show_text(cr, priv->text);
305
-    }
306
-#endif
307
-
308
-    return FALSE;
309
-}
310
-
311
-void gtk_level_bar_set_fraction(GtkLevelBar *pbar, gdouble fraction) {
312
-    // Set fraction [0.0, 1.0]
313
-    GtkLevelBarPrivate* priv;
314
-    g_return_if_fail (GTK_IS_LEVEL_BAR (pbar));
315
-    priv = pbar->priv;
316
-
317
-    priv->fraction = CLAMP(fraction, 0.0, 1.0);
318
-    gtk_level_bar_real_update (pbar);
319
-}
320
-
321
-gdouble gtk_level_bar_get_fraction(GtkLevelBar *pbar) {
322
-    // Get fraction
323
-    g_return_val_if_fail(GTK_IS_LEVEL_BAR (pbar), 0);
324
-    return pbar->priv->fraction;
325
-}
326
-
327
-void gtk_level_bar_set_bar_height(GtkLevelBar *pbar, guint height) {
328
-    // Set bar height (thickness). Normally 8 pixels.
329
-    g_return_if_fail(GTK_IS_LEVEL_BAR (pbar));
330
-    GtkLevelBarPrivate* priv = pbar->priv;
331
-    priv->bar_height = height;
332
-    // Redraw
333
-    gtk_level_bar_real_update(pbar);
334
-}
335
-
336
-guint gtk_level_bar_get_bar_height(GtkLevelBar *pbar) {
337
-    // Get bar thickness
338
-    g_return_val_if_fail(GTK_IS_LEVEL_BAR(pbar), 0);
339
-    return pbar->priv->bar_height;
340
-}
341
-
342
-void gtk_level_bar_set_value_type(GtkLevelBar *pbar, enum BAR_VALUE bar_value) {
343
-    // Set BAR_VALUE
344
-    g_return_if_fail(GTK_IS_LEVEL_BAR(pbar));
345
-    GtkLevelBarPrivate* priv = pbar->priv;
346
-    priv->bar_value = bar_value;
347
-    // Redraw
348
-    gtk_level_bar_real_update(pbar);
349
-}
350
-
351
-enum BAR_VALUE gtk_level_bar_get_scale(GtkLevelBar *pbar) {
352
-    // Get BAR_VALUE
353
-    g_return_val_if_fail(GTK_IS_LEVEL_BAR(pbar), VALUE_NONE);
354
-    GtkLevelBarPrivate* priv = pbar->priv;
355
-    return priv->bar_value;
356
-}
357
-
358
-void gtk_level_bar_set_shape(GtkLevelBar *pbar, enum BAR_SHAPE bar_shape) {
359
-    // Set BAR_SHAPE
360
-    g_return_if_fail(GTK_IS_LEVEL_BAR(pbar));
361
-    GtkLevelBarPrivate* priv = pbar->priv;
362
-    priv->bar_shape = bar_shape;
363
-    // Redraw
364
-    gtk_level_bar_real_update(pbar);
365
-}
366
-
367
-enum BAR_SHAPE gtk_level_bar_get_shape(GtkLevelBar *pbar) {
368
-    // Get BAR_SHAPE
369
-    g_return_val_if_fail(GTK_IS_LEVEL_BAR(pbar), SHAPE_LEVELBAR);
370
-    GtkLevelBarPrivate* priv = pbar->priv;
371
-    return priv->bar_shape;
372
-}
373
-
374
-
375
diff -rupN audio-recorder.old/src/gtklevelbar.h audio-recorder/src/gtklevelbar.h
376
--- audio-recorder.old/src/gtklevelbar.h	2015-02-06 15:04:35.000000000 +0100
377
+++ audio-recorder/src/gtklevelbar.h	1970-01-01 01:00:00.000000000 +0100
378
@@ -1,60 +0,0 @@
379
-#ifndef __GTK_LEVEL_BAR_H__
380
-#define __GTK_LEVEL_BAR_H__
381
-
382
-// A simple level bar widget.
383
-
384
-#include <gtk/gtk.h>
385
-
386
-typedef enum BAR_VALUE {VALUE_NONE, VALUE_0_1/*0 - 1.0*/, VALUE_PERCENT/*0 - 100%*/} BAR_VALUE;
387
-typedef enum BAR_SHAPE {SHAPE_LEVELBAR, SHAPE_LINE, SHAPE_LINE2, SHAPE_CIRCLE} BAR_SHAPE;
388
-
389
-G_BEGIN_DECLS
390
-
391
-#define GTK_TYPE_LEVEL_BAR            (gtk_level_bar_get_type ())
392
-#define GTK_LEVEL_BAR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LEVEL_BAR, GtkLevelBar))
393
-#define GTK_LEVEL_BAR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LEVEL_BAR, GtkLevelBarClass))
394
-#define GTK_IS_LEVEL_BAR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LEVEL_BAR))
395
-#define GTK_IS_LEVEL_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LEVEL_BAR))
396
-#define GTK_LEVEL_BAR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LEVEL_BAR, GtkLevelBarClass))
397
-
398
-typedef struct _GtkLevelBar              GtkLevelBar;
399
-typedef struct _GtkLevelBarPrivate       GtkLevelBarPrivate;
400
-typedef struct _GtkLevelBarClass         GtkLevelBarClass;
401
-
402
-struct _GtkLevelBar {
403
-    GtkWidget parent;
404
-
405
-    /*< private >*/
406
-    GtkLevelBarPrivate *priv;
407
-};
408
-
409
-struct _GtkLevelBarClass {
410
-    GtkWidgetClass parent_class;
411
-
412
-    /* Padding for future expansion */
413
-    void (*_gtk_reserved1) (void);
414
-    void (*_gtk_reserved2) (void);
415
-    void (*_gtk_reserved3) (void);
416
-    void (*_gtk_reserved4) (void);
417
-};
418
-
419
-GType gtk_level_bar_get_type(void) G_GNUC_CONST;
420
-GtkWidget* gtk_level_bar_new(void);
421
-
422
-void gtk_level_bar_set_bar_height(GtkLevelBar *pbar, guint height);
423
-void gtk_level_bar_set_fraction(GtkLevelBar *pbar, gdouble fraction);
424
-
425
-guint gtk_level_bar_get_bar_height(GtkLevelBar *pbar);
426
-gdouble gtk_level_bar_get_fraction(GtkLevelBar *pbar);
427
-
428
-void gtk_level_bar_set_value_type(GtkLevelBar *pbar, enum BAR_VALUE bar_value);
429
-enum BAR_VALUE gtk_level_bar_get_value_type(GtkLevelBar *pbar);
430
-
431
-void gtk_level_bar_set_shape(GtkLevelBar *pbar, enum BAR_SHAPE bar_shape);
432
-enum BAR_SHAPE gtk_level_bar_get_shape(GtkLevelBar *pbar);
433
-
434
-G_END_DECLS
435
-
436
-#endif
437
-
438
-
439
diff -rupN audio-recorder.old/src/levelbar.c audio-recorder/src/levelbar.c
440
--- audio-recorder.old/src/levelbar.c	1970-01-01 01:00:00.000000000 +0100
441
+++ audio-recorder/src/levelbar.c	2016-01-16 11:47:15.076665286 +0100
442
@@ -0,0 +1,357 @@
443
+/*
444
+ * Copyright (c) Linux community.
445
+ *
446
+ * This library is free software; you can redistribute it and/or
447
+ * modify it under the terms of the GNU Library General Public
448
+ * License as published by the Free Software Foundation; either
449
+ * version 3 of the License (GPL3), or any later version.
450
+ *
451
+ * This library is distributed in the hope that it will be useful,
452
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
453
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
454
+ * See the GNU Library General Public License 3 for more details.
455
+ *
456
+ * You should have received a copy of the GNU Library General Public
457
+ * License 3 along with this program; if not, see /usr/share/common-licenses/GPL file
458
+ * or write to Free Software Foundation, Inc., 59 Temple Place - Suite 330,
459
+ * Boston, MA 02111-1307, USA.
460
+*/
461
+#include "levelbar.h"
462
+#include <math.h> // round()
463
+
464
+// A simple level bar widget.
465
+// By Osmo Antero.
466
+//
467
+// Sample call:
468
+// GtkWidget *lb = level_bar_new();
469
+// gtk_widget_show(lb);
470
+//
471
+// Set value [0.0, 1.0].
472
+// level_bar_set_fraction(LEVEL_BAR(lb), 0.8);
473
+//
474
+// Show %-value [0 - 100%] or plain value [0 - 1.0] on the level bar. See BAR_VALUE enum.
475
+// level_bar_set_value_type(LEVEL_BAR(lb), VALUE_PRECENT);
476
+//
477
+
478
+struct _LevelBarPrivate {
479
+    gdouble fraction;
480
+    guint bar_height;
481
+    enum BAR_VALUE bar_value;
482
+    enum BAR_SHAPE bar_shape;
483
+};
484
+
485
+static void level_bar_get_preferred_width(GtkWidget *widget, gint *minimum, gint *natural);
486
+static void level_bar_get_preferred_height (GtkWidget *widget,gint *minimum, gint *natural);
487
+
488
+static void level_bar_real_update(LevelBar *progress);
489
+static gboolean level_bar_draw(GtkWidget *widget, cairo_t *cr);
490
+
491
+static void level_bar_finalize(GObject *object);
492
+
493
+G_DEFINE_TYPE(LevelBar, level_bar, GTK_TYPE_WIDGET);
494
+
495
+static void level_bar_class_init (LevelBarClass *class) {
496
+    GObjectClass *gobject_class;
497
+    GtkWidgetClass *widget_class;
498
+
499
+    gobject_class = G_OBJECT_CLASS (class);
500
+    widget_class = (GtkWidgetClass *)class;
501
+
502
+    gobject_class->set_property = NULL;
503
+    gobject_class->get_property = NULL;
504
+    gobject_class->finalize = level_bar_finalize;
505
+
506
+    widget_class->draw = level_bar_draw;
507
+    widget_class->get_preferred_width = level_bar_get_preferred_width;
508
+    widget_class->get_preferred_height = level_bar_get_preferred_height;
509
+
510
+    g_type_class_add_private (class, sizeof (LevelBarPrivate));
511
+}
512
+
513
+static void level_bar_init(LevelBar *pbar) {
514
+    LevelBarPrivate *priv;
515
+
516
+    pbar->priv = G_TYPE_INSTANCE_GET_PRIVATE(pbar, TYPE_LEVEL_BAR, LevelBarPrivate);
517
+    priv = pbar->priv;
518
+
519
+    priv->fraction = 0.0;
520
+    priv->bar_height = 8;
521
+    priv->bar_value = VALUE_NONE;
522
+    priv->bar_shape = SHAPE_CIRCLE; // pulsing line with circle at end.
523
+
524
+    gtk_widget_set_has_window(GTK_WIDGET (pbar), FALSE);
525
+}
526
+
527
+GtkWidget *level_bar_new(void) {
528
+    GtkWidget *pbar;
529
+    pbar = g_object_new(TYPE_LEVEL_BAR, NULL);
530
+    return pbar;
531
+}
532
+
533
+static void level_bar_real_update (LevelBar *pbar) {
534
+    GtkWidget *widget;
535
+
536
+    g_return_if_fail (IS_LEVEL_BAR (pbar));
537
+
538
+    LevelBarPrivate __attribute__ ((unused)) *priv = pbar->priv;
539
+
540
+    widget = GTK_WIDGET(pbar);
541
+
542
+    gtk_widget_queue_draw(widget);
543
+}
544
+
545
+static void level_bar_finalize (GObject *object) {
546
+    G_OBJECT_CLASS(level_bar_parent_class)->finalize (object);
547
+}
548
+
549
+static void level_bar_get_preferred_width (GtkWidget *widget,gint *minimum, gint *natural) {
550
+    *minimum = 50;
551
+    *natural = 160;
552
+}
553
+
554
+static void level_bar_get_preferred_height (GtkWidget *widget, gint *minimum, gint *natural) {
555
+    *minimum = 6;
556
+    *natural = 8;
557
+}
558
+
559
+static gboolean level_bar_draw(GtkWidget *widget, cairo_t *cr) {
560
+    // Draw level bar and optional text
561
+    LevelBar *pbar = LEVEL_BAR (widget);
562
+    LevelBarPrivate *priv = pbar->priv;
563
+    GtkStyleContext *context;
564
+    int width, height;
565
+
566
+    context = gtk_widget_get_style_context(widget);
567
+
568
+    width = gtk_widget_get_allocated_width(widget);
569
+    height = gtk_widget_get_allocated_height(widget);
570
+
571
+    // Bar thickness
572
+    gdouble bar_height = MIN(height , priv->bar_height);
573
+
574
+    // Vertical pos
575
+    gdouble y = (height - bar_height)/2;
576
+
577
+    // Pulse width
578
+    gdouble w = priv->fraction/(1.00/width);
579
+
580
+    // Debug:
581
+    // LOG_DEBUG("width=%d height=%d bar_height=%2.1f y=%2.1f w=%2.1f  fraction=%2.1f\n", width, height, bar_height, y, w, priv->fraction);
582
+
583
+    gtk_style_context_save(context);
584
+    gtk_render_background(context, cr, 0, 0, width, height);
585
+    gtk_render_frame(context, cr, 0, 0, width, height);
586
+
587
+    // Render level bar with current theme and color.
588
+
589
+    // Progressbar style
590
+    gtk_style_context_add_class(context, GTK_STYLE_CLASS_PROGRESSBAR);
591
+
592
+    if (priv->fraction > 0.001) {
593
+
594
+        switch (priv->bar_shape) {
595
+
596
+        case SHAPE_LINE:
597
+            // Render a single line
598
+            if (priv->bar_value == VALUE_NONE) {
599
+                // No value (text) shown. Draw a line on the middle.
600
+                gtk_render_line(context, cr, 0, y + (bar_height / 2), w, y + (bar_height / 2));
601
+
602
+            } else {
603
+                // Draw a line under text.
604
+                gtk_render_line(context, cr, 0, y + (bar_height ), w, y + (bar_height ));
605
+            }
606
+
607
+            break;
608
+
609
+        case SHAPE_LINE2:
610
+            // Render two horizontal lines + close the end.
611
+            gtk_render_line(context, cr, 0, y-1 , w, y-1);
612
+            gtk_render_line(context, cr, 0, y + (bar_height ), w, y + (bar_height ));
613
+            gtk_render_line(context, cr, w, y - 1, w, y + (bar_height ));
614
+            break;
615
+
616
+        case SHAPE_CIRCLE:
617
+            // Draw a line on the middle + circle at the end.
618
+            gtk_render_line(context, cr, 0, y + (bar_height / 2), w, y + (bar_height / 2));
619
+            gtk_render_option(context, cr, w, y, bar_height+1, bar_height+1);
620
+            break;
621
+
622
+        default:
623
+            // case SHAPE_LEVELBAR:
624
+
625
+            // EDIT: gtk_render_activity() does not work in GTK 3.14+
626
+            // gtk_style_context_set_state(context, GTK_STATE_FLAG_ACTIVE);
627
+            // gtk_render_activity(context, cr, 0, y, w, bar_height);
628
+
629
+            // Render a filled frame (this is a typical levelbar).
630
+            gtk_render_frame(context, cr, 0, y, w, bar_height);
631
+            break;
632
+
633
+        }
634
+    }
635
+
636
+    gtk_style_context_restore(context);
637
+
638
+    cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
639
+    cairo_set_font_size(cr, priv->bar_height);
640
+
641
+    GdkRGBA color;
642
+    gtk_style_context_get_border_color(context, GTK_STATE_NORMAL, &color);
643
+    gdk_cairo_set_source_rgba(cr, &color);
644
+    color.alpha = 0.9;
645
+
646
+    // Calculate total width of scale
647
+    cairo_text_extents_t extents;
648
+    cairo_text_extents(cr, "0.0", &extents);
649
+    gint total_w = 9 * (extents.x_advance + extents.width);
650
+
651
+    // Debug:
652
+    // g_print("Bar width=%d  total_w=%d  bearing=%3.1f advance=%3.1f char.width=%3.1f\n", width, total_w,
653
+    //          extents.x_bearing, extents.x_advance, extents.width);
654
+
655
+    // Draw values
656
+    gboolean draw_all = (total_w - extents.width) < width;
657
+
658
+    // Show normalized value [0 - 1.0]?
659
+    if (priv->bar_value == VALUE_0_1) {
660
+        // Value: 0.1  0.2  0.3  0.4...0.9
661
+
662
+        gint i = 0;
663
+        for (i=0; i < 10; i++) {
664
+            gchar *s = NULL;
665
+
666
+            // Draw all or draw only each second value?
667
+            if (draw_all || (i % 2 == 0))
668
+                s = g_strdup_printf("%2.1f", (gdouble)i/10.0);
669
+
670
+            if (!s) continue;
671
+
672
+            cairo_text_extents_t extents;
673
+            cairo_text_extents(cr, s, &extents);
674
+
675
+            gdouble xx = (width/10) * i;
676
+            gdouble yy = (height/2)-(extents.height/2 + extents.y_bearing) + 0.2;
677
+
678
+            cairo_move_to(cr, xx, yy);
679
+            cairo_show_text(cr, s);
680
+
681
+            g_free(s);
682
+        }
683
+
684
+        // Show percentage value?
685
+    } else if (priv->bar_value == VALUE_PERCENT) {
686
+        // Value: 10% . 20% . 30% . 40% . 50% ... 90%
687
+        gint i = 0;
688
+        for (i=0; i < 10; i++) {
689
+            gchar *s = NULL;
690
+            if (i % 2 == 0)
691
+                s = g_strdup_printf("%2.0f%%", (gdouble)i*10.0);
692
+            else
693
+                s = g_strdup_printf("%3s", ".");
694
+
695
+            cairo_text_extents_t extents;
696
+            cairo_text_extents(cr, s, &extents);
697
+
698
+            gdouble xx = (width/10) * i;
699
+            gdouble yy = (height/2)-(extents.height/2 + extents.y_bearing);
700
+
701
+            cairo_move_to(cr, xx, yy);
702
+            cairo_show_text(cr, s);
703
+
704
+            g_free(s);
705
+        }
706
+    }
707
+
708
+#if 0
709
+    // Commented out by moma 30.sep.2012.
710
+
711
+    // Set text
712
+    if (priv->text) {
713
+        cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
714
+
715
+        cairo_set_font_size(cr, 0.5*height);
716
+        cairo_text_extents_t extents;
717
+        cairo_text_extents(cr, priv->text, &extents);
718
+
719
+        // Ref: http://cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-text-extents-t
720
+        gdouble xx = width-(extents.width + extents.x_bearing)-2;
721
+        gdouble yy = height/2-(extents.height/2 + extents.y_bearing);
722
+
723
+        GdkRGBA color;
724
+        gtk_style_context_get_border_color(context, GTK_STATE_NORMAL, &color);
725
+        gdk_cairo_set_source_rgba(cr, &color);
726
+        color.alpha = 0.9;
727
+
728
+        cairo_move_to(cr, xx, yy);
729
+        cairo_show_text(cr, priv->text);
730
+    }
731
+#endif
732
+
733
+    return FALSE;
734
+}
735
+
736
+void level_bar_set_fraction(LevelBar *pbar, gdouble fraction) {
737
+    // Set fraction [0.0, 1.0]
738
+    LevelBarPrivate* priv;
739
+    g_return_if_fail (IS_LEVEL_BAR (pbar));
740
+    priv = pbar->priv;
741
+
742
+    priv->fraction = CLAMP(fraction, 0.0, 1.0);
743
+    level_bar_real_update (pbar);
744
+}
745
+
746
+gdouble level_bar_get_fraction(LevelBar *pbar) {
747
+    // Get fraction
748
+    g_return_val_if_fail(IS_LEVEL_BAR (pbar), 0);
749
+    return pbar->priv->fraction;
750
+}
751
+
752
+void level_bar_set_bar_height(LevelBar *pbar, guint height) {
753
+    // Set bar height (thickness). Normally 8 pixels.
754
+    g_return_if_fail(IS_LEVEL_BAR (pbar));
755
+    LevelBarPrivate* priv = pbar->priv;
756
+    priv->bar_height = height;
757
+    // Redraw
758
+    level_bar_real_update(pbar);
759
+}
760
+
761
+guint level_bar_get_bar_height(LevelBar *pbar) {
762
+    // Get bar thickness
763
+    g_return_val_if_fail(IS_LEVEL_BAR(pbar), 0);
764
+    return pbar->priv->bar_height;
765
+}
766
+
767
+void level_bar_set_value_type(LevelBar *pbar, enum BAR_VALUE bar_value) {
768
+    // Set BAR_VALUE
769
+    g_return_if_fail(IS_LEVEL_BAR(pbar));
770
+    LevelBarPrivate* priv = pbar->priv;
771
+    priv->bar_value = bar_value;
772
+    // Redraw
773
+    level_bar_real_update(pbar);
774
+}
775
+
776
+enum BAR_VALUE level_bar_get_scale(LevelBar *pbar) {
777
+    // Get BAR_VALUE
778
+    g_return_val_if_fail(IS_LEVEL_BAR(pbar), VALUE_NONE);
779
+    LevelBarPrivate* priv = pbar->priv;
780
+    return priv->bar_value;
781
+}
782
+
783
+void level_bar_set_shape(LevelBar *pbar, enum BAR_SHAPE bar_shape) {
784
+    // Set BAR_SHAPE
785
+    g_return_if_fail(IS_LEVEL_BAR(pbar));
786
+    LevelBarPrivate* priv = pbar->priv;
787
+    priv->bar_shape = bar_shape;
788
+    // Redraw
789
+    level_bar_real_update(pbar);
790
+}
791
+
792
+enum BAR_SHAPE level_bar_get_shape(LevelBar *pbar) {
793
+    // Get BAR_SHAPE
794
+    g_return_val_if_fail(IS_LEVEL_BAR(pbar), SHAPE_LEVELBAR);
795
+    LevelBarPrivate* priv = pbar->priv;
796
+    return priv->bar_shape;
797
+}
798
+
799
+
800
diff -rupN audio-recorder.old/src/levelbar.h audio-recorder/src/levelbar.h
801
--- audio-recorder.old/src/levelbar.h	1970-01-01 01:00:00.000000000 +0100
802
+++ audio-recorder/src/levelbar.h	2016-01-16 11:46:36.646876416 +0100
803
@@ -0,0 +1,60 @@
804
+#ifndef __LEVEL_BAR_H__
805
+#define __LEVEL_BAR_H__
806
+
807
+// A simple level bar widget.
808
+
809
+#include <gtk/gtk.h>
810
+
811
+typedef enum BAR_VALUE {VALUE_NONE, VALUE_0_1/*0 - 1.0*/, VALUE_PERCENT/*0 - 100%*/} BAR_VALUE;
812
+typedef enum BAR_SHAPE {SHAPE_LEVELBAR, SHAPE_LINE, SHAPE_LINE2, SHAPE_CIRCLE} BAR_SHAPE;
813
+
814
+G_BEGIN_DECLS
815
+
816
+#define TYPE_LEVEL_BAR            (level_bar_get_type ())
817
+#define LEVEL_BAR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LEVEL_BAR, LevelBar))
818
+#define LEVEL_BAR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LEVEL_BAR, LevelBarClass))
819
+#define IS_LEVEL_BAR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LEVEL_BAR))
820
+#define IS_LEVEL_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LEVEL_BAR))
821
+#define LEVEL_BAR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LEVEL_BAR, LevelBarClass))
822
+
823
+typedef struct _LevelBar              LevelBar;
824
+typedef struct _LevelBarPrivate       LevelBarPrivate;
825
+typedef struct _LevelBarClass         LevelBarClass;
826
+
827
+struct _LevelBar {
828
+    GtkWidget parent;
829
+
830
+    /*< private >*/
831
+    LevelBarPrivate *priv;
832
+};
833
+
834
+struct _LevelBarClass {
835
+    GtkWidgetClass parent_class;
836
+
837
+    /* Padding for future expansion */
838
+    void (*_gtk_reserved1) (void);
839
+    void (*_gtk_reserved2) (void);
840
+    void (*_gtk_reserved3) (void);
841
+    void (*_gtk_reserved4) (void);
842
+};
843
+
844
+GType level_bar_get_type(void) G_GNUC_CONST;
845
+GtkWidget* level_bar_new(void);
846
+
847
+void level_bar_set_bar_height(LevelBar *pbar, guint height);
848
+void level_bar_set_fraction(LevelBar *pbar, gdouble fraction);
849
+
850
+guint level_bar_get_bar_height(LevelBar *pbar);
851
+gdouble level_bar_get_fraction(LevelBar *pbar);
852
+
853
+void level_bar_set_value_type(LevelBar *pbar, enum BAR_VALUE bar_value);
854
+enum BAR_VALUE level_bar_get_value_type(LevelBar *pbar);
855
+
856
+void level_bar_set_shape(LevelBar *pbar, enum BAR_SHAPE bar_shape);
857
+enum BAR_SHAPE level_bar_get_shape(LevelBar *pbar);
858
+
859
+G_END_DECLS
860
+
861
+#endif
862
+
863
+
864
diff -rupN audio-recorder.old/src/main.c audio-recorder/src/main.c
865
--- audio-recorder.old/src/main.c	2015-02-11 14:44:06.000000000 +0100
866
+++ audio-recorder/src/main.c	2016-01-16 11:46:36.646876416 +0100
867
@@ -25,7 +25,7 @@
868
 
869
 #include <gst/pbutils/pbutils.h>
870
 
871
-#include "gtklevelbar.h" // Level bar widget
872
+#include "levelbar.h" // Level bar widget
873
 #include "support.h"
874
 #include "audio-sources.h"
875
 #include "rec-window.h"
876
@@ -274,13 +274,13 @@ void win_set_filename(gchar *filename) {
877
 }
878
 
879
 void win_update_level_bar(gdouble norm_rms, gdouble norm_peak) {
880
-    // Set pulse on gtklevelbar
881
+    // Set pulse on levelbar
882
 
883
-    if (!GTK_IS_LEVEL_BAR(g_win.level_bar)) return;
884
+    if (!IS_LEVEL_BAR(g_win.level_bar)) return;
885
 
886
     // Show either RMS or peak-value on the levelbar.
887
     // Notice: This value has no GUI-setting. User must change it in the dconf-editor.
888
-    gtk_level_bar_set_fraction(GTK_LEVEL_BAR(g_win.level_bar),
889
+    level_bar_set_fraction(LEVEL_BAR(g_win.level_bar),
890
                                (g_win.pulse_type == PULSE_RMS ? norm_rms : norm_peak));
891
 }
892
 
893
@@ -810,7 +810,7 @@ void win_show_settings_dialog() {
894
 
895
 void win_level_bar_clicked(GtkWidget *widget, GdkEvent *event, gpointer data) {
896
     // User clicked on the level bar.
897
-    // Set BAR_VALUE or BAR_SHAPE. See gtklevelbar.h.value
898
+    // Set BAR_VALUE or BAR_SHAPE. See levelbar.h.value
899
     GdkEventButton *ev = (GdkEventButton*)event;
900
 
901
     if (ev->button == 1) {
902
@@ -827,7 +827,7 @@ void win_level_bar_clicked(GtkWidget *wi
903
         }
904
 
905
         // Update GUI
906
-        gtk_level_bar_set_value_type(GTK_LEVEL_BAR(g_win.level_bar), bar_value);
907
+        level_bar_set_value_type(LEVEL_BAR(g_win.level_bar), bar_value);
908
 
909
         // Save in DConf
910
         conf_save_int_value("level-bar-value", bar_value);
911
@@ -846,7 +846,7 @@ void win_level_bar_clicked(GtkWidget *wi
912
         }
913
 
914
         // Update GUI
915
-        gtk_level_bar_set_shape(GTK_LEVEL_BAR(g_win.level_bar), bar_shape);
916
+        level_bar_set_shape(LEVEL_BAR(g_win.level_bar), bar_shape);
917
 
918
         // Save in DConf
919
         conf_save_int_value("level-bar-shape", bar_shape);
920
@@ -981,7 +981,7 @@ void win_create_window() {
921
         }
922
     }
923
 
924
-    // Gtklevelbar/pulsebar: Indicator for sound amplitude (a GtkLevelBar widget).
925
+    // levelbar/pulsebar: Indicator for sound amplitude.
926
     // Put it in a GtkEventBox so we can catch click events.
927
 
928
     GtkWidget *event_box = gtk_event_box_new();
929
@@ -992,24 +992,24 @@ void win_create_window() {
930
     gtk_widget_set_events(event_box, GDK_BUTTON_PRESS_MASK);
931
     g_signal_connect(event_box, "button_press_event", G_CALLBACK(win_level_bar_clicked), NULL);
932
 
933
-    // Create GtkLevelBar widget and put it in the GtkEventBox
934
-    g_win.level_bar = gtk_level_bar_new();
935
+    // Create LevelBar widget and put it in the GtkEventBox
936
+    g_win.level_bar = level_bar_new();
937
     gtk_widget_show(g_win.level_bar);
938
     gtk_container_add(GTK_CONTAINER(event_box), g_win.level_bar);
939
-    gtk_level_bar_set_fraction(GTK_LEVEL_BAR(g_win.level_bar), 0.0);
940
+    level_bar_set_fraction(LEVEL_BAR(g_win.level_bar), 0.0);
941
 
942
     // How to draw the level bar?
943
     // Get from DConf
944
     gint bar_shape = SHAPE_CIRCLE;
945
     conf_get_int_value("level-bar-shape", &bar_shape);
946
-    gtk_level_bar_set_shape(GTK_LEVEL_BAR(g_win.level_bar), bar_shape);
947
+    level_bar_set_shape(LEVEL_BAR(g_win.level_bar), bar_shape);
948
     // Notice: User can change this by RIGHT-clicking on the level-bar
949
 
950
     // Type of value on the level bar?
951
     // Get from DConf
952
     gint bar_value = VALUE_NONE;
953
     conf_get_int_value("level-bar-value", &bar_value);
954
-    gtk_level_bar_set_value_type(GTK_LEVEL_BAR(g_win.level_bar), bar_value);
955
+    level_bar_set_value_type(LEVEL_BAR(g_win.level_bar), bar_value);
956
     // Notice: User can change this by LEFT-clicking on the level-bar
957
 
958
     // Should we show RMS or peak-value on the levelbar?
959
diff -rupN audio-recorder.old/src/Makefile.am audio-recorder/src/Makefile.am
960
--- audio-recorder.old/src/Makefile.am	2014-10-03 19:53:54.000000000 +0200
961
+++ audio-recorder/src/Makefile.am	2016-01-16 11:46:36.646876416 +0100
962
@@ -43,7 +43,7 @@ audio_recorder_SOURCES = rec-window.h co
963
     utility.c utility.h \
964
     settings.c settings-pipe.c settings.h \
965
     about.c about.h \
966
-    gtklevelbar.c gtklevelbar.h \
967
+    levelbar.c levelbar.h \
968
     main.c
969
 
970
 
971
diff -rupN audio-recorder.old/src/Makefile.in audio-recorder/src/Makefile.in
972
--- audio-recorder.old/src/Makefile.in	2015-02-11 17:55:09.000000000 +0100
973
+++ audio-recorder/src/Makefile.in	2016-01-16 11:46:36.648876353 +0100
974
@@ -98,7 +98,7 @@ am_audio_recorder_OBJECTS = systray-icon
975
 	gst-devices.$(OBJEXT) rec-manager.$(OBJEXT) support.$(OBJEXT) \
976
 	timer.$(OBJEXT) timer-parser.$(OBJEXT) utility.$(OBJEXT) \
977
 	settings.$(OBJEXT) settings-pipe.$(OBJEXT) about.$(OBJEXT) \
978
-	gtklevelbar.$(OBJEXT) main.$(OBJEXT)
979
+	levelbar.$(OBJEXT) main.$(OBJEXT)
980
 audio_recorder_OBJECTS = $(am_audio_recorder_OBJECTS)
981
 audio_recorder_LDADD = $(LDADD)
982
 AM_V_P = $(am__v_P_@AM_V@)
983
@@ -329,7 +329,7 @@ audio_recorder_SOURCES = rec-window.h co
984
     utility.c utility.h \
985
     settings.c settings-pipe.c settings.h \
986
     about.c about.h \
987
-    gtklevelbar.c gtklevelbar.h \
988
+    levelbar.c levelbar.h \
989
     main.c
990
 
991
 all: all-am
992
@@ -431,8 +431,8 @@ distclean-compile:
993
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gst-pipeline.Po@am__quote@
994
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gst-recorder.Po@am__quote@
995
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gst-vad.Po@am__quote@
996
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtklevelbar.Po@am__quote@
997
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@
998
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/levelbar.Po@am__quote@
999
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@
1000
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
1001
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/media-profiles.Po@am__quote@
1002
diff -rupN audio-recorder.old/src/rec-window.h audio-recorder/src/rec-window.h
1003
--- audio-recorder.old/src/rec-window.h	2015-02-06 15:04:35.000000000 +0100
1004
+++ audio-recorder/src/rec-window.h	2016-01-16 11:46:36.648876353 +0100
1005
@@ -5,12 +5,12 @@
1006
 #include <gtk/gtk.h>
1007
 #include <gdk/gdk.h>
1008
 
1009
-#include "gtklevelbar.h"
1010
+#include "levelbar.h"
1011
 
1012
 // Width of the settings window
1013
 #define PREF_WINDOW_WIDTH 300
1014
 
1015
-// PULSE_TYPE: Type of pulse on the gtklevelbar.
1016
+// PULSE_TYPE: Type of pulse on the levelbar.
1017
 // Notice: This cannot be changed from the GUI.
1018
 // Use Gsettings/dconf-editor and find "level-bar-pulse-type" in apps -> audio-recorder.
1019
 typedef enum PULSE_TYPE {PULSE_PEAK, PULSE_RMS} PULSE_TYPE;
view file @ 33eb7bd82a
... ... index ea916d24b06e9dce0d522dc4adfc2aa50b1a1902..c9470fea780e5d8d7b7fac2d07d7304d00a07212 100644
... ... --- a/audio-recorder-correct-desktop-menu.patch
... ... +++ b/audio-recorder-1.9.7-fix-desktop-file.patch
... ... @@ -1,7 +1,6 @@
1
Index: audio-recorder/data/audio-recorder.desktop
2
===================================================================
3
--- audio-recorder.orig/data/audio-recorder.desktop
4
+++ audio-recorder/data/audio-recorder.desktop
1
diff -rupN audio-recorder.old/data/audio-recorder.desktop audio-recorder/data/audio-recorder.desktop
2
--- audio-recorder.old/data/audio-recorder.desktop	2017-02-15 11:02:45.000000000 +0100
3
+++ audio-recorder/data/audio-recorder.desktop	2017-05-22 16:16:27.338431581 +0200
5 4
@@ -1,6 +1,6 @@
6 5
 [Desktop Entry]
7 6
 GenericName=Audio Recorder
... ... @@ -10,41 +9,41 @@ Index: audio-recorder/data/audio-recorder.desktop
9 9
 Exec=audio-recorder
10 10
 Icon=audio-recorder
11 11
 StartupNotify=true
12
@@ -49,37 +49,3 @@ Comment[sr]=Audio Recorder
12
@@ -50,37 +50,3 @@ Comment[sr]=Audio Recorder
13 13
 Comment[tr]=Ses Kaydedici
14 14
 Comment[uk]=Легкий в застосуванні інструмент для аудіо запису
15 15
 Comment[vi]=Trình ghi âm
16 16
-
17 17
-# Right-click menu items for Unity's launcher icon.
18 18
-# Ref: https://wiki.ubuntu.com/Unity/LauncherAPI
19
-X-Ayatana-Desktop-Shortcuts=StartRecording;StopRecording;PauseRecording;ShowWindow
19
-Actions=StartRecording;StopRecording;PauseRecording;ShowWindow
20 20
-
21
-[StartRecording Shortcut Group]
21
-[Desktop Action StartRecording]
22 22
-Name=Start
23 23
-Name[fi_FI]=Aloita
24 24
-Name[nb_NO]=Start
25 25
-Exec=audio-recorder --command=start
26
-TargetEnvironment=Unity
26
-OnlyShowIn=Unity;GNOME;
27 27
-
28
-[StopRecording Shortcut Group]
28
-[Desktop Action StopRecording]
29 29
-Name=Stop
30 30
-Name[fi_FI]=Lopeta
31 31
-Name[nb_NO]=Stopp
32 32
-Exec=audio-recorder --command=stop
33
-TargetEnvironment=Unity
33
-OnlyShowIn=Unity;GNOME;
34 34
-
35
-[PauseRecording Shortcut Group]
35
-[Desktop Action PauseRecording]
36 36
-Name=Pause
37 37
-Name[fi_FI]=Keskeytä väliaikaisesti
38 38
-Name[nb_NO]=Pause
39 39
-Exec=audio-recorder --command=pause
40
-TargetEnvironment=Unity
40
-OnlyShowIn=Unity;GNOME;
41 41
-
42
-[ShowWindow Shortcut Group]
42
-[Desktop Action ShowWindow]
43 43
-Name=Show window
44 44
-Name[fi_FI]=Näytä ikkuna
45 45
-Name[nb_NO]=Vis applikasjon
46 46
-Exec=audio-recorder --command=show
47
-TargetEnvironment=Unity
47
-OnlyShowIn=Unity;GNOME;
48 48
-
49 49
-
view file @ 33eb7bd82a
... ... index 40a16ce6594120834d2c4079886001952257ae3b..ec24e3b304269074e208117827d0cb5fc18dea2e 100644
... ... --- a/audio-recorder-1.6-no-autostart.patch
... ... +++ b/audio-recorder-1.9.7-no-autostart.patch
... ... @@ -1,19 +1,19 @@
1 1
diff -rupN audio-recorder.old/data/audio-recorder.desktop audio-recorder/data/audio-recorder.desktop
2
--- audio-recorder.old/data/audio-recorder.desktop	2016-02-01 16:10:22.000000000 +0100
3
+++ audio-recorder/data/audio-recorder.desktop	2016-02-01 16:15:06.827869884 +0100
2
--- audio-recorder.old/data/audio-recorder.desktop	2017-05-22 16:16:27.000000000 +0200
3
+++ audio-recorder/data/audio-recorder.desktop	2017-05-22 16:20:10.452859322 +0200
4 4
@@ -6,7 +6,7 @@ Icon=audio-recorder
5 5
 StartupNotify=true
6 6
 Terminal=false
7 7
 Type=Application
8 8
-X-GNOME-Autostart-enabled=true
9 9
+X-GNOME-Autostart-enabled=false
10
 Keywords=Audio;Sound;Mic;Recorder;
10 11
 
11 12
 Name=Audio Recorder
12
 Name[de]=Anwendung zur Audio-Aufnahme
13 13
diff -rupN audio-recorder.old/src/main.c audio-recorder/src/main.c
14
--- audio-recorder.old/src/main.c	2016-02-01 16:10:22.000000000 +0100
15
+++ audio-recorder/src/main.c	2016-02-01 16:14:21.016333515 +0100
16
@@ -1515,7 +1515,7 @@ int main(int argc, char *argv[]) {
14
--- audio-recorder.old/src/main.c	2017-02-15 11:02:45.000000000 +0100
15
+++ audio-recorder/src/main.c	2017-05-22 16:20:43.247850722 +0200
16
@@ -1536,7 +1536,7 @@ int main(int argc, char *argv[]) {
17 17
         show_window = TRUE;
18 18
 
19 19
         // Auto-start this application on login
view file @ 33eb7bd82a
... ... --- a/audio-recorder.spec
... ... +++ b/audio-recorder.spec
... ... @@ -2,16 +2,16 @@
2 2
3 3
Summary:	Audio recorder for the GNOME
4 4
Name:		audio-recorder
5
Version:	1.6
6
Release:	7
5
Version:	1.9.7
6
Release:	1
7 7
License:	GPLv3+
8 8
Group:		Sound
9 9
Url:		https://launchpad.net/audio-recorder
10
Source0:	https://launchpad.net/audio-recorder/trunk/version%{version}-2/+download/%{name}-%{version}-2.tar.gz
11
Source1:        audio-recorder_ru.po.tar.gz
12
Patch0:		audio-recorder-correct-desktop-menu.patch
13
Patch1:		audio-recorder-1.6-2-fix-clash-with-GtkLevelBar-from-Gtk3.patch
14
Patch2:         audio-recorder-1.6-no-autostart.patch
10
Source0:	https://launchpad.net/audio-recorder/trunk/version%{version}-2/+download/%{name}-%{version}.tar.gz
11
Source1:	audio-recorder_ru.po.tar.gz
12
Patch0:		audio-recorder-1.9.7-fix-desktop-file.patch
13
#Patch1:	audio-recorder-1.6-2-fix-clash-with-GtkLevelBar-from-Gtk3.patch
14
Patch2:		audio-recorder-1.9.7-no-autostart.patch
15 15
BuildRequires:	intltool
16 16
BuildRequires:	perl
17 17
BuildRequires:	perl(XML::Parser)
... ... @@ -44,19 +44,21 @@ Put simply: if it plays out of your loudspeakers you can record it.
44 44
%{_iconsdir}/hicolor/scalable/*/%{name}*.svg
45 45
%{_datadir}/pixmaps/%{name}/*
46 46
%{_datadir}/glib-2.0/schemas/org.gnome.%{name}.gschema.xml
47
%{_mandir}/man1/%{name}.1*
47 48
48 49
#----------------------------------------------------------------------------
49 50
50 51
%prep
51 52
%setup -qn %{name}
52 53
%patch0 -p1
53
%patch1 -p1
54
#patch1 -p1
54 55
%patch2 -p1
55 56
56 57
pushd po
57 58
tar -xvzf %{SOURCE1}
58 59
popd
59 60
61
60 62
%build
61 63
# Needed by P1
62 64
autoreconf -vfi

Comments