[SCM] gsequencer/upstream: fixed initial values

jkraehemann-guest at users.alioth.debian.org jkraehemann-guest at users.alioth.debian.org
Sun Jun 14 16:07:07 UTC 2015


The following commit has been merged in the upstream branch:
commit 109f5230163932a947adf7abac91bd949598b18d
Author: Joël Krähemann <weedlight at gmail.com>
Date:   Fri Jun 12 16:36:44 2015 +0200

    fixed initial values

diff --git a/.deps/ags-ags_drum.Po b/.deps/ags-ags_drum.Po
index cfc9e31..6bb5975 100644
--- a/.deps/ags-ags_drum.Po
+++ b/.deps/ags-ags_drum.Po
@@ -651,15 +651,16 @@ ags-ags_drum.o: src/ags/X/machine/ags_drum.c /usr/include/stdc-predef.h \
  src/ags/X/ags_performance_preferences.h \
  src/ags/X/ags_server_preferences.h src/ags-lib/object/ags_connectable.h \
  src/ags/util/ags_id_generator.h src/ags/object/ags_portlet.h \
- src/ags/object/ags_plugin.h src/ags/file/ags_file_stock.h \
- src/ags/widget/ags_led.h src/ags/widget/ags_vindicator.h \
- src/ags/widget/ags_indicator.h src/ags/widget/ags_hindicator.h \
- src/ags/widget/ags_waveform.h src/ags/widget/ags_dial.h \
- src/ags/widget/ags_cartesian.h src/ags/file/ags_file_id_ref.h \
- src/ags/file/ags_file_lookup.h src/ags/file/ags_file_launch.h \
- src/ags/file/ags_file_gui.h src/ags/X/ags_line_member.h \
- src/ags/X/ags_machine_editor.h src/ags/X/ags_listing_editor.h \
- src/ags/X/ags_property_listing_editor.h src/ags/X/ags_property_editor.h \
+ src/ags/object/ags_plugin.h src/ags/object/ags_seekable.h \
+ src/ags/file/ags_file_stock.h src/ags/widget/ags_led.h \
+ src/ags/widget/ags_vindicator.h src/ags/widget/ags_indicator.h \
+ src/ags/widget/ags_hindicator.h src/ags/widget/ags_waveform.h \
+ src/ags/widget/ags_dial.h src/ags/widget/ags_cartesian.h \
+ src/ags/file/ags_file_id_ref.h src/ags/file/ags_file_lookup.h \
+ src/ags/file/ags_file_launch.h src/ags/file/ags_file_gui.h \
+ src/ags/X/ags_line_member.h src/ags/X/ags_machine_editor.h \
+ src/ags/X/ags_listing_editor.h src/ags/X/ags_property_listing_editor.h \
+ src/ags/X/ags_property_editor.h \
  src/ags/X/ags_property_collection_editor.h src/ags/X/ags_resize_editor.h \
  src/ags/X/ags_pad_editor.h src/ags/X/ags_line_editor.h \
  src/ags/X/ags_link_editor.h src/ags/audio/file/ags_audio_file.h \
@@ -2309,6 +2310,8 @@ src/ags/object/ags_portlet.h:
 
 src/ags/object/ags_plugin.h:
 
+src/ags/object/ags_seekable.h:
+
 src/ags/file/ags_file_stock.h:
 
 src/ags/widget/ags_led.h:
diff --git a/.deps/ags-ags_ffplayer.Po b/.deps/ags-ags_ffplayer.Po
index dc0979d..cd79c01 100644
--- a/.deps/ags-ags_ffplayer.Po
+++ b/.deps/ags-ags_ffplayer.Po
@@ -729,17 +729,18 @@ ags-ags_ffplayer.o: src/ags/X/machine/ags_ffplayer.c \
  src/ags/X/ags_performance_preferences.h \
  src/ags/X/ags_server_preferences.h src/ags-lib/object/ags_connectable.h \
  src/ags/util/ags_id_generator.h src/ags/object/ags_playable.h \
- src/ags/object/ags_plugin.h src/ags/file/ags_file_stock.h \
- src/ags/widget/ags_led.h src/ags/widget/ags_vindicator.h \
- src/ags/widget/ags_indicator.h src/ags/widget/ags_hindicator.h \
- src/ags/widget/ags_waveform.h src/ags/widget/ags_dial.h \
- src/ags/widget/ags_cartesian.h src/ags/file/ags_file_id_ref.h \
- src/ags/file/ags_file_lookup.h src/ags/file/ags_file_launch.h \
- src/ags/file/ags_file_gui.h src/ags/X/ags_pad.h \
- src/ags/widget/ags_expander_set.h src/ags/X/ags_line.h \
- src/ags/widget/ags_expander.h src/ags/X/ags_line_member.h \
- src/ags/X/ags_machine_editor.h src/ags/X/ags_listing_editor.h \
- src/ags/X/ags_property_listing_editor.h src/ags/X/ags_property_editor.h \
+ src/ags/object/ags_plugin.h src/ags/object/ags_seekable.h \
+ src/ags/file/ags_file_stock.h src/ags/widget/ags_led.h \
+ src/ags/widget/ags_vindicator.h src/ags/widget/ags_indicator.h \
+ src/ags/widget/ags_hindicator.h src/ags/widget/ags_waveform.h \
+ src/ags/widget/ags_dial.h src/ags/widget/ags_cartesian.h \
+ src/ags/file/ags_file_id_ref.h src/ags/file/ags_file_lookup.h \
+ src/ags/file/ags_file_launch.h src/ags/file/ags_file_gui.h \
+ src/ags/X/ags_pad.h src/ags/widget/ags_expander_set.h \
+ src/ags/X/ags_line.h src/ags/widget/ags_expander.h \
+ src/ags/X/ags_line_member.h src/ags/X/ags_machine_editor.h \
+ src/ags/X/ags_listing_editor.h src/ags/X/ags_property_listing_editor.h \
+ src/ags/X/ags_property_editor.h \
  src/ags/X/ags_property_collection_editor.h src/ags/X/ags_resize_editor.h \
  src/ags/X/ags_pad_editor.h src/ags/X/ags_line_editor.h \
  src/ags/X/ags_link_editor.h src/ags/audio/file/ags_audio_file.h \
@@ -2454,6 +2455,8 @@ src/ags/object/ags_playable.h:
 
 src/ags/object/ags_plugin.h:
 
+src/ags/object/ags_seekable.h:
+
 src/ags/file/ags_file_stock.h:
 
 src/ags/widget/ags_led.h:
diff --git a/.deps/ags-ags_matrix.Po b/.deps/ags-ags_matrix.Po
index ae96442..40deaa1 100644
--- a/.deps/ags-ags_matrix.Po
+++ b/.deps/ags-ags_matrix.Po
@@ -649,14 +649,15 @@ ags-ags_matrix.o: src/ags/X/machine/ags_matrix.c \
  src/ags/X/ags_performance_preferences.h \
  src/ags/X/ags_server_preferences.h src/ags-lib/object/ags_connectable.h \
  src/ags/util/ags_id_generator.h src/ags/object/ags_portlet.h \
- src/ags/object/ags_plugin.h src/ags/file/ags_file_stock.h \
- src/ags/widget/ags_led.h src/ags/widget/ags_vindicator.h \
- src/ags/widget/ags_indicator.h src/ags/widget/ags_hindicator.h \
- src/ags/widget/ags_waveform.h src/ags/widget/ags_dial.h \
- src/ags/widget/ags_cartesian.h src/ags/file/ags_file_id_ref.h \
- src/ags/file/ags_file_lookup.h src/ags/file/ags_file_launch.h \
- src/ags/thread/ags_mutex_manager.h src/ags/audio/ags_input.h \
- /usr/include/glib-2.0/glib/gstdio.h /usr/include/glib-2.0/glib/gprintf.h \
+ src/ags/object/ags_plugin.h src/ags/object/ags_seekable.h \
+ src/ags/file/ags_file_stock.h src/ags/widget/ags_led.h \
+ src/ags/widget/ags_vindicator.h src/ags/widget/ags_indicator.h \
+ src/ags/widget/ags_hindicator.h src/ags/widget/ags_waveform.h \
+ src/ags/widget/ags_dial.h src/ags/widget/ags_cartesian.h \
+ src/ags/file/ags_file_id_ref.h src/ags/file/ags_file_lookup.h \
+ src/ags/file/ags_file_launch.h src/ags/thread/ags_mutex_manager.h \
+ src/ags/audio/ags_input.h /usr/include/glib-2.0/glib/gstdio.h \
+ /usr/include/glib-2.0/glib/gprintf.h \
  /usr/include/x86_64-linux-gnu/sys/stat.h src/ags/audio/ags_output.h \
  src/ags/audio/ags_pattern.h src/ags/audio/ags_recall_factory.h \
  src/ags/audio/ags_recall_container.h \
@@ -2208,6 +2209,8 @@ src/ags/object/ags_portlet.h:
 
 src/ags/object/ags_plugin.h:
 
+src/ags/object/ags_seekable.h:
+
 src/ags/file/ags_file_stock.h:
 
 src/ags/widget/ags_led.h:
diff --git a/src/ags/X/ags_menu_bar_callbacks.c b/src/ags/X/ags_menu_bar_callbacks.c
index b1d1f58..4cb280a 100644
--- a/src/ags/X/ags_menu_bar_callbacks.c
+++ b/src/ags/X/ags_menu_bar_callbacks.c
@@ -255,8 +255,6 @@ ags_menu_bar_add_panel_callback(GtkWidget *menu_item, AgsMenuBar *menu_bar)
 
   panel = ags_panel_new(G_OBJECT(window->devout));
 
-  g_message("debug -1\0");
-  
   add_audio = ags_add_audio_new(window->devout,
 				AGS_MACHINE(panel)->audio);
   ags_task_thread_append_task(AGS_TASK_THREAD(AGS_AUDIO_LOOP(AGS_MAIN(window->ags_main)->main_loop)->task_thread),
diff --git a/src/ags/X/editor/ags_note_edit.c b/src/ags/X/editor/ags_note_edit.c
index a206937..78102fa 100644
--- a/src/ags/X/editor/ags_note_edit.c
+++ b/src/ags/X/editor/ags_note_edit.c
@@ -331,6 +331,7 @@ ags_note_edit_reset_horizontally(AgsNoteEdit *note_edit, guint flags)
   AgsEditor *editor;
   double tact_factor, zoom_factor;
   double tact;
+  gdouble value;
 
   editor = (AgsEditor *) gtk_widget_get_ancestor(GTK_WIDGET(note_edit),
 						 AGS_TYPE_EDITOR);
@@ -356,85 +357,84 @@ ags_note_edit_reset_horizontally(AgsNoteEdit *note_edit, guint flags)
     gtk_widget_queue_draw((GtkWidget *) note_edit->ruler);
   }
 
-  if(editor->selected_machine != NULL){
-    cairo_t *cr;
-    gdouble value;
-
-    value = GTK_RANGE(note_edit->hscrollbar)->adjustment->value;
+  value = GTK_RANGE(note_edit->hscrollbar)->adjustment->value;
 
-    if((AGS_NOTE_EDIT_RESET_HSCROLLBAR & flags) != 0){
-      GtkWidget *widget;
-      GtkAdjustment *adjustment;
-      guint width;
-
-      widget = GTK_WIDGET(note_edit->drawing_area);
-      adjustment = GTK_RANGE(note_edit->hscrollbar)->adjustment;
+  if((AGS_NOTE_EDIT_RESET_HSCROLLBAR & flags) != 0){
+    GtkWidget *widget;
+    GtkAdjustment *adjustment;
+    guint width;
 
-      if(note_edit->map_width > widget->allocation.width){
-	width = widget->allocation.width;
-	//	gtk_adjustment_set_upper(adjustment, (double) (note_edit->map_width - width));
-	gtk_adjustment_set_upper(adjustment,
-				 (gdouble) (note_edit->map_width - width));
-	gtk_adjustment_set_upper(note_edit->ruler->adjustment,
-				 (gdouble) (note_edit->map_width - width) / note_edit->control_current.control_width);
+    widget = GTK_WIDGET(note_edit->drawing_area);
+    adjustment = GTK_RANGE(note_edit->hscrollbar)->adjustment;
 
-	if(adjustment->value > adjustment->upper){
-	  gtk_adjustment_set_value(adjustment, adjustment->upper);
+    if(note_edit->map_width > widget->allocation.width){
+      width = widget->allocation.width;
+      //	gtk_adjustment_set_upper(adjustment, (double) (note_edit->map_width - width));
+      gtk_adjustment_set_upper(adjustment,
+			       (gdouble) (note_edit->map_width - width));
+      gtk_adjustment_set_upper(note_edit->ruler->adjustment,
+			       (gdouble) (note_edit->map_width - width) / note_edit->control_current.control_width);
 
-	  /* reset ruler */
-	  gtk_adjustment_set_value(note_edit->ruler->adjustment, note_edit->ruler->adjustment->upper);
-	  gtk_widget_queue_draw((GtkWidget *) note_edit->ruler);
-	}
-      }else{
-	width = note_edit->map_width;
+      if(adjustment->value > adjustment->upper){
+	gtk_adjustment_set_value(adjustment, adjustment->upper);
 
-	gtk_adjustment_set_upper(adjustment, 0.0);
-	gtk_adjustment_set_value(adjustment, 0.0);
-	
 	/* reset ruler */
-	gtk_adjustment_set_upper(note_edit->ruler->adjustment, 0.0);
-	gtk_adjustment_set_value(note_edit->ruler->adjustment, 0.0);
+	gtk_adjustment_set_value(note_edit->ruler->adjustment, note_edit->ruler->adjustment->upper);
 	gtk_widget_queue_draw((GtkWidget *) note_edit->ruler);
       }
+    }else{
+      width = note_edit->map_width;
 
-      note_edit->width = width;
+      gtk_adjustment_set_upper(adjustment, 0.0);
+      gtk_adjustment_set_value(adjustment, 0.0);
+	
+      /* reset ruler */
+      gtk_adjustment_set_upper(note_edit->ruler->adjustment, 0.0);
+      gtk_adjustment_set_value(note_edit->ruler->adjustment, 0.0);
+      gtk_widget_queue_draw((GtkWidget *) note_edit->ruler);
     }
 
-    /* reset AgsNoteEditControlCurrent */
-    if(note_edit->map_width > note_edit->width){
-      note_edit->control_current.x0 = ((guint) round((double) value)) % note_edit->control_current.control_width;
-
-      if(note_edit->control_current.x0 != 0){
-	note_edit->control_current.x0 = note_edit->control_current.control_width - note_edit->control_current.x0;
-      }
+    note_edit->width = width;
+  }
 
-      note_edit->control_current.x1 = (note_edit->width - note_edit->control_current.x0) % note_edit->control_current.control_width;
+  /* reset AgsNoteEditControlCurrent */
+  if(note_edit->map_width > note_edit->width){
+    note_edit->control_current.x0 = ((guint) round((double) value)) % note_edit->control_current.control_width;
 
-      note_edit->control_current.nth_x = (guint) ceil((double)(value) / (double)(note_edit->control_current.control_width));
-    }else{
-      note_edit->control_current.x0 = 0;
-      note_edit->control_current.x1 = 0;
-      note_edit->control_current.nth_x = 0;
+    if(note_edit->control_current.x0 != 0){
+      note_edit->control_current.x0 = note_edit->control_current.control_width - note_edit->control_current.x0;
     }
 
-    /* reset AgsNoteEditControlUnit */
-    if(note_edit->map_width > note_edit->width){
-      note_edit->control_unit.x0 = ((guint)round((double) value)) % note_edit->control_unit.control_width;
+    note_edit->control_current.x1 = (note_edit->width - note_edit->control_current.x0) % note_edit->control_current.control_width;
+
+    note_edit->control_current.nth_x = (guint) ceil((double)(value) / (double)(note_edit->control_current.control_width));
+  }else{
+    note_edit->control_current.x0 = 0;
+    note_edit->control_current.x1 = 0;
+    note_edit->control_current.nth_x = 0;
+  }
+
+  /* reset AgsNoteEditControlUnit */
+  if(note_edit->map_width > note_edit->width){
+    note_edit->control_unit.x0 = ((guint)round((double) value)) % note_edit->control_unit.control_width;
 
-      if(note_edit->control_unit.x0 != 0)
-	note_edit->control_unit.x0 = note_edit->control_unit.control_width - note_edit->control_unit.x0;
+    if(note_edit->control_unit.x0 != 0)
+      note_edit->control_unit.x0 = note_edit->control_unit.control_width - note_edit->control_unit.x0;
       
-      note_edit->control_unit.x1 = (note_edit->width - note_edit->control_unit.x0) % note_edit->control_unit.control_width;
+    note_edit->control_unit.x1 = (note_edit->width - note_edit->control_unit.x0) % note_edit->control_unit.control_width;
       
-      note_edit->control_unit.nth_x = (guint) ceil(round((double) value) / (double) (note_edit->control_unit.control_width));
-      note_edit->control_unit.stop_x = note_edit->control_unit.nth_x + (note_edit->width - note_edit->control_unit.x0 - note_edit->control_unit.x1) / note_edit->control_unit.control_width;
-    }else{
-      note_edit->control_unit.x0 = 0;
-      note_edit->control_unit.x1 = 0;
-      note_edit->control_unit.nth_x = 0;
-    }
+    note_edit->control_unit.nth_x = (guint) ceil(round((double) value) / (double) (note_edit->control_unit.control_width));
+    note_edit->control_unit.stop_x = note_edit->control_unit.nth_x + (note_edit->width - note_edit->control_unit.x0 - note_edit->control_unit.x1) / note_edit->control_unit.control_width;
+  }else{
+    note_edit->control_unit.x0 = 0;
+    note_edit->control_unit.x1 = 0;
+    note_edit->control_unit.nth_x = 0;
+  }
 
     /* refresh display */
+  if(editor->selected_machine != NULL){
+    cairo_t *cr;
+
     if(GTK_WIDGET_VISIBLE(editor)){
       gdouble position;
       
diff --git a/src/ags/X/machine/ags_drum.c b/src/ags/X/machine/ags_drum.c
index 8725743..711a152 100644
--- a/src/ags/X/machine/ags_drum.c
+++ b/src/ags/X/machine/ags_drum.c
@@ -27,6 +27,7 @@
 
 #include <ags/object/ags_portlet.h>
 #include <ags/object/ags_plugin.h>
+#include <ags/object/ags_seekable.h>
 
 #include <ags/file/ags_file.h>
 #include <ags/file/ags_file_stock.h>
@@ -517,6 +518,8 @@ ags_drum_show_all(GtkWidget *widget)
 void
 ags_drum_map_recall(AgsMachine *machine)
 {
+  AgsWindow *window;
+  
   AgsAudio *audio;
 
   AgsDelayAudio *play_delay_audio;
@@ -533,6 +536,9 @@ ags_drum_map_recall(AgsMachine *machine)
     return;
   }
 
+  window = gtk_widget_get_ancestor(machine,
+				   AGS_TYPE_WINDOW);
+  
   audio = machine->audio;
 
   /* ags-delay */
@@ -573,6 +579,9 @@ ags_drum_map_recall(AgsMachine *machine)
     g_object_set(G_OBJECT(play_count_beats_audio_run),
 		 "delay-audio-run\0", play_delay_audio_run,
 		 NULL);
+    ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run),
+		      window->navigation->position_tact->adjustment->value * AGS_DEVOUT(audio->devout)->delay[AGS_DEVOUT(audio->devout)->tic_counter],
+		      TRUE);
   }
 
   /* ags-copy-pattern */
diff --git a/src/ags/X/machine/ags_ffplayer.c b/src/ags/X/machine/ags_ffplayer.c
index 80a3561..d99b306 100644
--- a/src/ags/X/machine/ags_ffplayer.c
+++ b/src/ags/X/machine/ags_ffplayer.c
@@ -27,6 +27,7 @@
 
 #include <ags/object/ags_playable.h>
 #include <ags/object/ags_plugin.h>
+#include <ags/object/ags_seekable.h>
 
 #include <ags/file/ags_file.h>
 #include <ags/file/ags_file_stock.h>
@@ -330,6 +331,8 @@ ags_ffplayer_init(AgsFFPlayer *ffplayer)
 void
 ags_ffplayer_map_recall(AgsMachine *machine)
 {
+  AgsWindow *window;
+  
   AgsAudio *audio;
 
   AgsDelayAudio *play_delay_audio;
@@ -346,6 +349,9 @@ ags_ffplayer_map_recall(AgsMachine *machine)
     return;
   }
 
+  window = gtk_widget_get_ancestor(machine,
+				   AGS_TYPE_WINDOW);
+
   audio = machine->audio;
 
   AGS_MACHINE_CLASS(ags_ffplayer_parent_class)->map_recall(machine);
@@ -390,9 +396,12 @@ ags_ffplayer_map_recall(AgsMachine *machine)
     g_object_set(G_OBJECT(play_count_beats_audio_run),
 		 "delay-audio-run\0", play_delay_audio_run,
 		 NULL);
+    ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run),
+		      window->navigation->position_tact->adjustment->value * AGS_DEVOUT(audio->devout)->delay[AGS_DEVOUT(audio->devout)->tic_counter],
+		      TRUE);
 
     g_value_init(&value, G_TYPE_BOOLEAN);
-    g_value_set_boolean(&value, TRUE);
+    g_value_set_boolean(&value, gtk_toggle_button_get_active(window->navigation->loop));
     ags_port_safe_write(AGS_COUNT_BEATS_AUDIO(AGS_RECALL_AUDIO_RUN(play_count_beats_audio_run)->recall_audio)->loop,
 			&value);
   }
diff --git a/src/ags/X/machine/ags_matrix.c b/src/ags/X/machine/ags_matrix.c
index f148d79..c2a9f84 100644
--- a/src/ags/X/machine/ags_matrix.c
+++ b/src/ags/X/machine/ags_matrix.c
@@ -27,6 +27,7 @@
 
 #include <ags/object/ags_portlet.h>
 #include <ags/object/ags_plugin.h>
+#include <ags/object/ags_seekable.h>
 
 #include <ags/file/ags_file.h>
 #include <ags/file/ags_file_stock.h>
@@ -561,6 +562,7 @@ ags_matrix_set_pads(AgsAudio *audio, GType type,
 void
 ags_matrix_map_recall(AgsMachine *machine)
 {
+  AgsWindow *window;
   AgsMatrix *matrix;
 
   AgsAudio *audio;
@@ -588,8 +590,11 @@ ags_matrix_map_recall(AgsMachine *machine)
     return;
   }
 
-  audio = machine->audio;
+  window = gtk_widget_get_ancestor(machine,
+				   AGS_TYPE_WINDOW);
+
   matrix = AGS_MATRIX(machine);
+  audio = machine->audio;
 
   /* ags-delay */
   ags_recall_factory_create(audio,
@@ -629,6 +634,9 @@ ags_matrix_map_recall(AgsMachine *machine)
     g_object_set(G_OBJECT(play_count_beats_audio_run),
 		 "delay-audio-run\0", play_delay_audio_run,
 		 NULL);
+    ags_seekable_seek(AGS_SEEKABLE(play_count_beats_audio_run),
+		      window->navigation->position_tact->adjustment->value * AGS_DEVOUT(audio->devout)->delay[AGS_DEVOUT(audio->devout)->tic_counter],
+		      TRUE);
   }
 
   /* ags-copy-pattern */
diff --git a/src/ags/widget/ags_ruler.c b/src/ags/widget/ags_ruler.c
index 05c0c0b..24d9f38 100644
--- a/src/ags/widget/ags_ruler.c
+++ b/src/ags/widget/ags_ruler.c
@@ -393,7 +393,7 @@ ags_ruler_draw(AgsRuler *ruler)
 		  (double) (i),
 		  (double) (widget->allocation.height - AGS_RULER_LARGE_STEP));
 
-    str = g_strdup_printf("%.2f\0",
+    str = g_strdup_printf("%.0f\0",
 			  (ceil(offset) + z) * ruler->scale_precision);
 
     cairo_show_text(cr,

-- 
gsequencer packaging



More information about the pkg-multimedia-commits mailing list