[SCM] wavbreaker/master: debian/patches/06-code_duplication.patch
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Wed May 18 10:00:17 UTC 2011
The following commit has been merged in the master branch:
commit 74aebc8c5bf8c1422f46531d17c65bace29379cc
Author: Alessio Treglia <alessio at debian.org>
Date: Wed May 18 11:59:57 2011 +0200
debian/patches/06-code_duplication.patch
- Fix code duplication.
diff --git a/debian/patches/06-code_duplication.patch b/debian/patches/06-code_duplication.patch
new file mode 100644
index 0000000..e029b32
--- /dev/null
+++ b/debian/patches/06-code_duplication.patch
@@ -0,0 +1,139 @@
+Description: Fix code duplication.
+ "sample_get_playing()" is the same as "sample_is_playing()"
+Origin: upstream, commit:299
+Applied-Upstream:
+ http://wavbreaker.svn.sf.net/viewvc/wavbreaker?view=revision&revision=299
+---
+ src/appconfig.c | 4 ++--
+ src/sample.c | 5 -----
+ src/sample.h | 1 -
+ src/wavbreaker.c | 18 +++++++++---------
+ 4 files changed, 11 insertions(+), 17 deletions(-)
+
+--- wavbreaker.orig/src/appconfig.c
++++ wavbreaker/src/appconfig.c
+@@ -844,7 +844,7 @@ void appconfig_show(GtkWidget *main_wind
+ gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), pos);
+ }
+ #endif
+- gtk_widget_set_sensitive( GTK_WIDGET(combo_box), sample_get_playing()?FALSE:TRUE);
++ gtk_widget_set_sensitive( GTK_WIDGET(combo_box), sample_is_playing()?FALSE:TRUE);
+ gtk_table_attach(GTK_TABLE(table), combo_box,
+ 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 5, 0);
+ g_signal_connect(G_OBJECT(combo_box), "changed",
+@@ -857,7 +857,7 @@ void appconfig_show(GtkWidget *main_wind
+
+ output_device_entry = gtk_entry_new();
+ gtk_entry_set_text(GTK_ENTRY(output_device_entry), audio_options_get_output_device());
+- gtk_widget_set_sensitive( GTK_WIDGET(output_device_entry), sample_get_playing()?FALSE:TRUE);
++ gtk_widget_set_sensitive( GTK_WIDGET(output_device_entry), sample_is_playing()?FALSE:TRUE);
+ gtk_table_attach(GTK_TABLE(table), output_device_entry,
+ 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, 0, 5, 0);
+
+--- wavbreaker.orig/src/sample.c
++++ wavbreaker/src/sample.c
+@@ -93,11 +93,6 @@ void sample_set_error_message(const char
+ strncpy(error_message, val, ERROR_MESSAGE_SIZE);
+ }
+
+-gint sample_get_playing()
+-{
+- return playing;
+-}
+-
+ void sample_init()
+ {
+ mutex = g_mutex_new();
+--- wavbreaker.orig/src/sample.h
++++ wavbreaker/src/sample.h
+@@ -56,7 +56,6 @@ void stop_sample();
+ int sample_open_file(const char *, GraphData *, double *);
+ void sample_close_file();
+ void sample_write_files(GList *, WriteInfo *, char *);
+-gint sample_get_playing();
+ void sample_merge_files(char *merge_filename, GList *filenames, WriteInfo *write_info);
+
+ #endif /* SAMPLE_H*/
+--- wavbreaker.orig/src/wavbreaker.c
++++ wavbreaker/src/wavbreaker.c
+@@ -1395,7 +1395,7 @@ file_play_progress_idle_func(gpointer da
+ update_status(FALSE);
+ usleep( 50000);
+
+- if (sample_get_playing()) {
++ if (sample_is_playing()) {
+ return TRUE;
+ } else {
+ set_play_icon();
+@@ -1924,7 +1924,7 @@ static gboolean expose_event(GtkWidget *
+ cairo_stroke( cr);
+ }
+
+- if( sample_is_playing()) {
++ if (sample_is_playing()) {
+ /**
+ * Draw GREEN play marker
+ **/
+@@ -2236,7 +2236,7 @@ static gboolean draw_summary_button_rele
+ int x_scale, x_scale_leftover, x_scale_mod;
+ int leftover_count;
+
+- if (sample_get_playing()) {
++ if (sample_is_playing()) {
+ return TRUE;
+ }
+
+@@ -2293,7 +2293,7 @@ void reset_sample_display(guint midpoint
+
+ static gboolean adj_value_changed(GtkAdjustment *adj, gpointer data)
+ {
+- if( sample_get_playing()) {
++ if (sample_is_playing()) {
+ return FALSE;
+ }
+
+@@ -2308,7 +2308,7 @@ static void cursor_marker_time_spinners_
+ {
+ gint min, sec, subsec;
+
+- if (sample_get_playing()) {
++ if (sample_is_playing()) {
+ return;
+ }
+
+@@ -2325,7 +2325,7 @@ static void cursor_marker_time_spinners_
+
+ static void cursor_marker_spinner_changed(GtkAdjustment *adj, gpointer data)
+ {
+- if (sample_get_playing()) {
++ if (sample_is_playing()) {
+ return;
+ }
+ cursor_marker = adj->value;
+@@ -2384,7 +2384,7 @@ static gboolean button_release(GtkWidget
+ if (event->x + pixmap_offset > graphData.numSamples) {
+ return TRUE;
+ }
+- if (sample_get_playing()) {
++ if (sample_is_playing()) {
+ return TRUE;
+ }
+
+@@ -2463,7 +2463,7 @@ static void update_status(gboolean updat
+ offset_to_time(cursor_marker, strbuf, update_time_offset);
+ strcat(str, strbuf);
+
+- if( sample_is_playing()) {
++ if (sample_is_playing()) {
+ strcat( str, "\t");
+ strcat( str, _("Playing"));
+ strcat( str, ": ");
+@@ -2476,7 +2476,7 @@ static void update_status(gboolean updat
+
+ static void menu_play(GtkWidget *widget, gpointer user_data)
+ {
+- if( sample_is_playing()) {
++ if (sample_is_playing()) {
+ menu_stop( NULL, NULL);
+ update_status(FALSE);
+ set_play_icon();
diff --git a/debian/patches/series b/debian/patches/series
index 5749bad..04ecf2c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
03-save_restore_mainwnd_position.patch
04-new_context_menu_entries.patch
05-timeoffset_controls.patch
+06-code_duplication.patch
--
wavbreaker packaging
More information about the pkg-multimedia-commits
mailing list