[SCM] gsequencer/master: New upstream version 0.4.2-71
jkraehemann-guest at users.alioth.debian.org
jkraehemann-guest at users.alioth.debian.org
Sun Jun 21 03:04:25 UTC 2015
The following commit has been merged in the master branch:
commit a03f388bfb09bdb518fda448ea36d278902c1c86
Author: Joël Krähemann <jkraehemann-guest at users.alioth.debian.org>
Date: Sun Jun 21 03:25:43 2015 +0200
New upstream version 0.4.2-71
diff --git a/ChangeLog b/ChangeLog
index d5705d9..ef9fcd1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+ags (0.4.2-71-1)
+
+ [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ]
+ * commented-out two unimplemented menu entries in editor's machine selector. Add and remove tab you may do so by using resize tab of machine properties dialog.
+ * implemented select-all in editor
+ * fixed multi-channel editing mode
+ * fixed refresh of GUI after cut or paste
+ * fixed crash related to XML IO
+
ags (0.4.2-70-1)
[ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ]
diff --git a/configure b/configure
index 0728eb9..072e30b 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for ags 0.4.2-70.
+# Generated by GNU Autoconf 2.69 for ags 0.4.2-71.
#
# Report bugs to <jkraehemann at gmail.com>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ags'
PACKAGE_TARNAME='ags'
-PACKAGE_VERSION='0.4.2-70'
-PACKAGE_STRING='ags 0.4.2-70'
+PACKAGE_VERSION='0.4.2-71'
+PACKAGE_STRING='ags 0.4.2-71'
PACKAGE_BUGREPORT='jkraehemann at gmail.com'
PACKAGE_URL=''
@@ -1317,7 +1317,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ags 0.4.2-70 to adapt to many kinds of systems.
+\`configure' configures ags 0.4.2-71 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1387,7 +1387,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ags 0.4.2-70:";;
+ short | recursive ) echo "Configuration of ags 0.4.2-71:";;
esac
cat <<\_ACEOF
@@ -1523,7 +1523,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ags configure 0.4.2-70
+ags configure 0.4.2-71
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2000,7 +2000,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ags $as_me 0.4.2-70, which was
+It was created by ags $as_me 0.4.2-71, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2866,7 +2866,7 @@ fi
# Define the identity of the package.
PACKAGE='ags'
- VERSION='0.4.2-70'
+ VERSION='0.4.2-71'
cat >>confdefs.h <<_ACEOF
@@ -7161,7 +7161,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ags $as_me 0.4.2-70, which was
+This file was extended by ags $as_me 0.4.2-71, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7227,7 +7227,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ags config.status 0.4.2-70
+ags config.status 0.4.2-71
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index fc750ae..2679120 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([ags],[0.4.2-70],[jkraehemann at gmail.com])
+AC_INIT([ags],[0.4.2-71],[jkraehemann at gmail.com])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
diff --git a/gsequencer-documentation b/gsequencer-documentation
index 4f0647f..53d438a 100644
--- a/gsequencer-documentation
+++ b/gsequencer-documentation
@@ -2,8 +2,7 @@ Document: gsequencer
Title: GSequencer Manual
Author: Joël Krähemann
Section: Sound
-Abstract: This manual describes what gsequencer is and how it can be used to
- do audio processing and editing notes.
+Abstract: This manual describes what gsequencer is and how it can be used to do audio processing and editing notes.
Format: HTML
Index: /usr/share/doc/gsequencer/html/index.html
diff --git a/src/ags/X/editor/ags_machine_selector.c b/src/ags/X/editor/ags_machine_selector.c
index aaf50b1..c71cbd1 100644
--- a/src/ags/X/editor/ags_machine_selector.c
+++ b/src/ags/X/editor/ags_machine_selector.c
@@ -212,12 +212,14 @@ ags_machine_selector_popup_new(AgsMachineSelector *machine_selector)
popup = (GtkMenu *) gtk_menu_new();
g_object_set_data((GObject *) popup, g_type_name(AGS_TYPE_MACHINE_SELECTOR), machine_selector);
+ /*
item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("add tab\0"));
gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item);
item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("remove tab\0"));
gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item);
-
+ */
+
item = (GtkMenuItem *) gtk_menu_item_new_with_label(g_strdup("add index\0"));
gtk_menu_shell_append((GtkMenuShell*) popup, (GtkWidget*) item);
@@ -230,6 +232,7 @@ ags_machine_selector_popup_new(AgsMachineSelector *machine_selector)
list_start =
list = gtk_container_get_children((GtkContainer *) popup);
+ /*
g_signal_connect(G_OBJECT(list->data), "activate\0",
G_CALLBACK(ags_machine_selector_popup_add_tab_callback), (gpointer) machine_selector);
@@ -238,6 +241,7 @@ ags_machine_selector_popup_new(AgsMachineSelector *machine_selector)
G_CALLBACK(ags_machine_selector_popup_remove_tab_callback), (gpointer) machine_selector);
list = list->next;
+ */
g_signal_connect(G_OBJECT(list->data), "activate\0",
G_CALLBACK(ags_machine_selector_popup_add_index_callback), (gpointer) machine_selector);
diff --git a/src/ags/X/editor/ags_note_edit.c b/src/ags/X/editor/ags_note_edit.c
index dbfe176..cd46a61 100644
--- a/src/ags/X/editor/ags_note_edit.c
+++ b/src/ags/X/editor/ags_note_edit.c
@@ -100,8 +100,10 @@ ags_note_edit_init(AgsNoteEdit *note_edit)
{
GtkAdjustment *adjustment;
+ note_edit->key_mask = 0;
+
adjustment = (GtkAdjustment *) gtk_adjustment_new(0.0, 0.0, 1.0, 1.0, 1.0, 1.0);
-
+
note_edit->ruler = ags_ruler_new();
gtk_table_attach(GTK_TABLE(note_edit), (GtkWidget *) note_edit->ruler,
0, 1, 0, 1,
@@ -110,14 +112,19 @@ ags_note_edit_init(AgsNoteEdit *note_edit)
note_edit->drawing_area = (GtkDrawingArea *) gtk_drawing_area_new();
gtk_widget_set_style((GtkWidget *) note_edit->drawing_area, note_edit_style);
- gtk_widget_set_events (GTK_WIDGET (note_edit->drawing_area), GDK_EXPOSURE_MASK
- | GDK_LEAVE_NOTIFY_MASK
- | GDK_BUTTON_PRESS_MASK
- | GDK_BUTTON_RELEASE_MASK
- | GDK_POINTER_MOTION_MASK
- | GDK_POINTER_MOTION_HINT_MASK
- );
-
+ gtk_widget_set_events(GTK_WIDGET(note_edit->drawing_area), GDK_EXPOSURE_MASK
+ | GDK_LEAVE_NOTIFY_MASK
+ | GDK_BUTTON_PRESS_MASK
+ | GDK_BUTTON_RELEASE_MASK
+ | GDK_POINTER_MOTION_MASK
+ | GDK_POINTER_MOTION_HINT_MASK
+ | GDK_CONTROL_MASK
+ | GDK_KEY_PRESS_MASK
+ | GDK_KEY_RELEASE_MASK
+ );
+ gtk_widget_set_can_focus(note_edit->drawing_area,
+ TRUE);
+
gtk_table_attach(GTK_TABLE(note_edit), (GtkWidget *) note_edit->drawing_area,
0, 1, 1, 2,
GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND,
@@ -188,25 +195,31 @@ ags_note_edit_connect(AgsConnectable *connectable)
note_edit = AGS_NOTE_EDIT(connectable);
g_signal_connect_after((GObject *) note_edit->drawing_area, "expose_event\0",
- G_CALLBACK (ags_note_edit_drawing_area_expose_event), (gpointer) note_edit);
+ G_CALLBACK(ags_note_edit_drawing_area_expose_event), (gpointer) note_edit);
g_signal_connect_after((GObject *) note_edit->drawing_area, "configure_event\0",
- G_CALLBACK (ags_note_edit_drawing_area_configure_event), (gpointer) note_edit);
+ G_CALLBACK(ags_note_edit_drawing_area_configure_event), (gpointer) note_edit);
g_signal_connect((GObject *) note_edit->drawing_area, "button_press_event\0",
- G_CALLBACK (ags_note_edit_drawing_area_button_press_event), (gpointer) note_edit);
+ G_CALLBACK(ags_note_edit_drawing_area_button_press_event), (gpointer) note_edit);
g_signal_connect((GObject *) note_edit->drawing_area, "button_release_event\0",
- G_CALLBACK (ags_note_edit_drawing_area_button_release_event), (gpointer) note_edit);
+ G_CALLBACK(ags_note_edit_drawing_area_button_release_event), (gpointer) note_edit);
g_signal_connect((GObject *) note_edit->drawing_area, "motion_notify_event\0",
- G_CALLBACK (ags_note_edit_drawing_area_motion_notify_event), (gpointer) note_edit);
+ G_CALLBACK(ags_note_edit_drawing_area_motion_notify_event), (gpointer) note_edit);
+
+ g_signal_connect((GObject *) note_edit->drawing_area, "key_press_event\0",
+ G_CALLBACK(ags_note_edit_drawing_area_key_press_event), (gpointer) note_edit);
+
+ g_signal_connect((GObject *) note_edit->drawing_area, "key_release_event\0",
+ G_CALLBACK(ags_note_edit_drawing_area_key_release_event), (gpointer) note_edit);
g_signal_connect_after((GObject *) note_edit->vscrollbar, "value-changed\0",
- G_CALLBACK (ags_note_edit_vscrollbar_value_changed), (gpointer) note_edit);
+ G_CALLBACK(ags_note_edit_vscrollbar_value_changed), (gpointer) note_edit);
g_signal_connect_after((GObject *) note_edit->hscrollbar, "value-changed\0",
- G_CALLBACK (ags_note_edit_hscrollbar_value_changed), (gpointer) note_edit);
+ G_CALLBACK(ags_note_edit_hscrollbar_value_changed), (gpointer) note_edit);
}
diff --git a/src/ags/X/editor/ags_note_edit.h b/src/ags/X/editor/ags_note_edit.h
index c011cde..d6ac409 100644
--- a/src/ags/X/editor/ags_note_edit.h
+++ b/src/ags/X/editor/ags_note_edit.h
@@ -57,12 +57,19 @@ typedef enum{
AGS_NOTE_EDIT_RESET_HEIGHT = 1 << 3, // reserved
}AgsNoteEditResetFlags;
+typedef enum{
+ AGS_NOTE_EDIT_KEY_L_CONTROL = 1,
+ AGS_NOTE_EDIT_KEY_R_CONTROL = 1 << 1,
+}AgsNoteEditKeyMask;
+
struct _AgsNoteEdit
{
GtkTable table;
guint flags;
+ guint key_mask;
+
AgsRuler *ruler;
GtkDrawingArea *drawing_area;
diff --git a/src/ags/X/editor/ags_note_edit_callbacks.c b/src/ags/X/editor/ags_note_edit_callbacks.c
index 376a4d9..acb0d4c 100644
--- a/src/ags/X/editor/ags_note_edit_callbacks.c
+++ b/src/ags/X/editor/ags_note_edit_callbacks.c
@@ -27,6 +27,8 @@
#include <ags/X/machine/ags_synth.h>
#include <ags/X/machine/ags_ffplayer.h>
+#include <gdk/gdkkeysyms.h>
+
gboolean
ags_note_edit_drawing_area_expose_event(GtkWidget *widget, GdkEventExpose *event, AgsNoteEdit *note_edit)
{
@@ -144,6 +146,8 @@ ags_note_edit_drawing_area_button_press_event(GtkWidget *widget, GdkEventButton
editor = (AgsEditor *) gtk_widget_get_ancestor(GTK_WIDGET(note_edit),
AGS_TYPE_EDITOR);
+ gtk_widget_grab_focus(note_edit->drawing_area);
+
if(editor->selected_machine != NULL &&
event->button == 1 &&
(machine = editor->selected_machine) != NULL){
@@ -206,7 +210,7 @@ ags_note_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButto
GList *list_notation;
guint note_x, note_y;
guint note_offset_x1;
- gint history;
+ gint i;
gint selected_channel;
if(note_edit->control.x0 >= note_edit->map_width)
@@ -224,55 +228,23 @@ ags_note_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButto
note->x[1] = (note_x * tact) + (note_offset_x1 * tact);
list_notation = machine->audio->notation;
- history = gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->mode);
-
- switch(history){
- case 0:
- {
- if(editor->notebook->tabs != NULL){
- list_notation = g_list_nth(list_notation,
- ags_notebook_next_active_tab(editor->notebook,
- 0));
-
- note0 = ags_note_duplicate(note);
-
- ags_notation_add_note(AGS_NOTATION(list_notation->data), note0, FALSE);
- }
- }
- break;
- case 1:
- {
- gint i;
-
- i = 0;
-
- while((selected_channel = ags_notebook_next_active_tab(editor->notebook,
- i)) != -1){
- list_notation = g_list_nth(machine->audio->notation,
- selected_channel);
+ i = 0;
- note0 = ags_note_duplicate(note);
+ while((selected_channel = ags_notebook_next_active_tab(editor->notebook,
+ i)) != -1){
+ list_notation = g_list_nth(machine->audio->notation,
+ selected_channel);
- ags_notation_add_note(AGS_NOTATION(list_notation->data), note0, FALSE);
-
- i++;
- }
- }
- break;
- case 2:
- {
- while(list_notation != NULL){
- note0 = ags_note_duplicate(note);
+ note0 = ags_note_duplicate(note);
- ags_notation_add_note(AGS_NOTATION(list_notation->data), note0, FALSE);
+ ags_notation_add_note(AGS_NOTATION(list_notation->data), note0, FALSE);
- list_notation = list_notation->next;
- }
- }
- break;
+ i++;
}
+#ifdef DEBUG
fprintf(stdout, "x0 = %llu\nx1 = %llu\ny = %llu\n\n\0", (long long unsigned int) note->x[0], (long long unsigned int) note->x[1], (long long unsigned int) note->y);
+#endif
}
void ags_note_edit_drawing_area_button_release_event_draw_control(cairo_t *cr){
guint x, y, width, height;
@@ -334,6 +306,7 @@ ags_note_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButto
GList *list_notation;
guint x, y;
gint history;
+ gint i;
gint selected_channel;
x = note_edit->control.x0_offset + note_edit->control.x0 - 1;
@@ -346,46 +319,26 @@ ags_note_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButto
/* select notes */
list_notation = machine->audio->notation;
+ i = 0;
- history = gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->mode);
-
- if(history == 0){
- if(editor->notebook->tabs != NULL){
- list_notation = g_list_nth(list_notation,
- ags_notebook_next_active_tab(editor->notebook,
- 0));
-
- ags_notation_remove_note_at_position(AGS_NOTATION(list_notation->data),
- x, y);
- }
- }else if(history == 1){
- gint i;
-
- i = 0;
+ while((selected_channel = ags_notebook_next_active_tab(editor->notebook,
+ i)) != -1){
+ list_notation = g_list_nth(machine->audio->notation,
+ selected_channel);
- while((selected_channel = ags_notebook_next_active_tab(editor->notebook,
- i)) != -1){
- list_notation = g_list_nth(machine->audio->notation,
- selected_channel);
+ ags_notation_remove_note_at_position(AGS_NOTATION(list_notation->data),
+ x, y);
- ags_notation_remove_note_at_position(AGS_NOTATION(list_notation->data),
- x, y);
-
- list_notation = list_notation->next;
- i++;
- }
- }else if(history == 2){
- while(list_notation != NULL){
- ags_notation_remove_note_at_position(AGS_NOTATION(list_notation->data),
- x, y);
-
- list_notation = list_notation->next;
- }
+ list_notation = list_notation->next;
+ i++;
}
}
void ags_note_edit_drawing_area_button_release_event_select_region(){
GList *list_notation;
+
guint x0, x1, y0, y1;
+ gint i;
+ gint selected_channel;
/* get real size and offset */
x0 = note_edit->control.x0_offset + note_edit->control.x0;
@@ -421,27 +374,18 @@ ags_note_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButto
/* select notes */
list_notation = machine->audio->notation;
-
- if(gtk_combo_box_get_active((GtkComboBox *) editor->toolbar->mode) == 0){
- if(editor->notebook->tabs != NULL){
- list_notation = g_list_nth(list_notation,
- ags_notebook_next_active_tab(editor->notebook,
- 0));
-
- ags_notation_add_region_to_selection(AGS_NOTATION(list_notation->data),
- x0, y0,
- x1, y1,
- TRUE);
- }
- }else{
- while(list_notation != NULL ){
- ags_notation_add_region_to_selection(AGS_NOTATION(list_notation->data),
- x0, y0,
- x1, y1,
- TRUE);
-
- list_notation = list_notation->next;
- }
+ i = 0;
+
+ while((selected_channel = ags_notebook_next_active_tab(editor->notebook,
+ i)) != -1){
+ list_notation = g_list_nth(machine->audio->notation,
+ selected_channel);
+ ags_notation_add_region_to_selection(AGS_NOTATION(list_notation->data),
+ x0, y0,
+ x1, y1,
+ TRUE);
+
+ i++;
}
}
@@ -532,7 +476,7 @@ ags_note_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButto
}
gboolean
-ags_note_edit_drawing_area_motion_notify_event (GtkWidget *widget, GdkEventMotion *event, AgsNoteEdit *note_edit)
+ags_note_edit_drawing_area_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, AgsNoteEdit *note_edit)
{
AgsMachine *machine;
AgsEditor *editor;
@@ -766,6 +710,84 @@ ags_note_edit_drawing_area_motion_notify_event (GtkWidget *widget, GdkEventMotio
return(FALSE);
}
+gboolean
+ags_note_edit_drawing_area_key_press_event(GtkWidget *widget, GdkEventKey *event, AgsNoteEdit *note_edit)
+{
+ AgsMachine *machine;
+ AgsEditor *editor;
+
+ editor = (AgsEditor *) gtk_widget_get_ancestor(GTK_WIDGET(note_edit),
+ AGS_TYPE_EDITOR);
+
+ if(editor->selected_machine != NULL){
+ machine = editor->selected_machine;
+
+ switch(event->keyval){
+ case GDK_KEY_Control_L:
+ {
+ note_edit->key_mask |= AGS_NOTE_EDIT_KEY_L_CONTROL;
+ }
+ break;
+ case GDK_KEY_Control_R:
+ {
+ note_edit->key_mask |= AGS_NOTE_EDIT_KEY_R_CONTROL;
+ }
+ break;
+ case GDK_KEY_a:
+ {
+ /* select notes */
+ if((AGS_NOTE_EDIT_KEY_L_CONTROL & (note_edit->key_mask)) != 0 || (AGS_NOTE_EDIT_KEY_R_CONTROL & (note_edit->key_mask)) != 0){
+ cairo_t *cr;
+
+ GList *list_notation;
+
+ gint i;
+ gint selected_channel;
+
+ cr = gdk_cairo_create(widget->window);
+ cairo_push_group(cr);
+
+ list_notation = machine->audio->notation;
+ i = 0;
+
+ while((selected_channel = ags_notebook_next_active_tab(editor->notebook,
+ i)) != -1){
+ list_notation = g_list_nth(machine->audio->notation,
+ selected_channel);
+ ags_notation_add_all_to_selection(AGS_NOTATION(list_notation->data));
+
+ i++;
+ }
+
+ ags_note_edit_draw_segment(note_edit, cr);
+ ags_note_edit_draw_notation(note_edit, cr);
+
+ cairo_pop_group_to_source(cr);
+ cairo_paint(cr);
+ }
+ }
+ break;
+ }
+ }
+}
+
+gboolean
+ags_note_edit_drawing_area_key_release_event(GtkWidget *widget, GdkEventKey *event, AgsNoteEdit *note_edit)
+{
+ switch(event->keyval){
+ case GDK_KEY_Control_L:
+ {
+ note_edit->key_mask &= (~AGS_NOTE_EDIT_KEY_L_CONTROL);
+ }
+ break;
+ case GDK_KEY_Control_R:
+ {
+ note_edit->key_mask &= (~AGS_NOTE_EDIT_KEY_R_CONTROL);
+ }
+ break;
+ }
+}
+
void
ags_note_edit_vscrollbar_value_changed(GtkRange *range, AgsNoteEdit *note_edit)
{
diff --git a/src/ags/X/editor/ags_note_edit_callbacks.h b/src/ags/X/editor/ags_note_edit_callbacks.h
index c3b6571..d85ca6b 100644
--- a/src/ags/X/editor/ags_note_edit_callbacks.h
+++ b/src/ags/X/editor/ags_note_edit_callbacks.h
@@ -30,6 +30,8 @@ gboolean ags_note_edit_drawing_area_configure_event(GtkWidget *widget, GdkEventC
gboolean ags_note_edit_drawing_area_button_press_event(GtkWidget *widget, GdkEventButton *event, AgsNoteEdit *note_edit);
gboolean ags_note_edit_drawing_area_button_release_event(GtkWidget *widget, GdkEventButton *event, AgsNoteEdit *note_edit);
gboolean ags_note_edit_drawing_area_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, AgsNoteEdit *note_edit);
+gboolean ags_note_edit_drawing_area_key_press_event(GtkWidget *widget, GdkEventKey *event, AgsNoteEdit *note_edit);
+gboolean ags_note_edit_drawing_area_key_release_event(GtkWidget *widget, GdkEventKey *event, AgsNoteEdit *note_edit);
void ags_note_edit_vscrollbar_value_changed(GtkRange *range, AgsNoteEdit *note_edit);
void ags_note_edit_hscrollbar_value_changed(GtkRange *range, AgsNoteEdit *note_edit);
diff --git a/src/ags/X/editor/ags_toolbar_callbacks.c b/src/ags/X/editor/ags_toolbar_callbacks.c
index 401bf46..f8aaf06 100644
--- a/src/ags/X/editor/ags_toolbar_callbacks.c
+++ b/src/ags/X/editor/ags_toolbar_callbacks.c
@@ -133,12 +133,17 @@ ags_toolbar_copy_or_cut_callback(GtkWidget *widget, AgsToolbar *toolbar)
{
AgsMachine *machine;
AgsEditor *editor;
+
AgsNotation *notation;
+
GList *list_notation;
xmlDocPtr clipboard;
xmlNodePtr audio_node, notation_node;
+
xmlChar *buffer;
int size;
+ gint i;
+ gint selected_channel;
/* add notation to root node */
editor = AGS_EDITOR(gtk_widget_get_ancestor(GTK_WIDGET(toolbar), AGS_TYPE_EDITOR));
@@ -153,33 +158,35 @@ ags_toolbar_copy_or_cut_callback(GtkWidget *widget, AgsToolbar *toolbar)
/* create notation nodes */
list_notation = machine->audio->notation;
+ i = 0;
- if(gtk_combo_box_get_active((GtkComboBox *) toolbar->mode) == 0){
- if(editor->notebook->tabs != NULL){
- list_notation = g_list_nth(list_notation,
- ags_notebook_next_active_tab(editor->notebook,
- 0));
+ while((selected_channel = ags_notebook_next_active_tab(editor->notebook,
+ i)) != -1){
+ list_notation = g_list_nth(machine->audio->notation,
+ selected_channel);
- if(widget == (GtkWidget *) toolbar->copy)
- notation_node = ags_notation_copy_selection(AGS_NOTATION(list_notation->data));
- else
- notation_node = ags_notation_cut_selection(AGS_NOTATION(list_notation->data));
+ if(widget == (GtkWidget *) toolbar->copy){
+ notation_node = ags_notation_copy_selection(AGS_NOTATION(list_notation->data));
+ }else{
+ cairo_t *cr;
- xmlAddChild(audio_node, notation_node);
- }
- }else{
- while(list_notation != NULL ){
- if(widget == (GtkWidget *) toolbar->copy)
- notation_node = ags_notation_copy_selection(AGS_NOTATION(list_notation->data));
- else
- notation_node = ags_notation_cut_selection(AGS_NOTATION(list_notation->data));
+ cr = gdk_cairo_create(GTK_WIDGET(editor->note_edit->drawing_area)->window);
+ cairo_push_group(cr);
- xmlAddChild(audio_node, notation_node);
+ notation_node = ags_notation_cut_selection(AGS_NOTATION(list_notation->data));
- list_notation = list_notation->next;
+ ags_note_edit_draw_segment(editor->note_edit, cr);
+ ags_note_edit_draw_notation(editor->note_edit, cr);
+
+ cairo_pop_group_to_source(cr);
+ cairo_paint(cr);
}
- }
+
+ xmlAddChild(audio_node, notation_node);
+ i++;
+ }
+
/* write to clipboard */
xmlDocDumpFormatMemoryEnc(clipboard, &buffer, &size, "UTF-8\0", TRUE);
gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD),
@@ -195,12 +202,17 @@ ags_toolbar_paste_callback(GtkWidget *widget, AgsToolbar *toolbar)
{
AgsMachine *machine;
AgsEditor *editor;
+
AgsNotation *notation;
+
xmlDocPtr clipboard;
xmlNodePtr audio_node, notation_node;
+ cairo_t *cr;
+
gchar *buffer;
guint position_x, position_y;
gboolean paste_from_position;
+
void ags_toolbar_paste_callback_read_notation(){
xmlXPathContextPtr xpathCtxt;
xmlXPathObjectPtr xpathObj;
@@ -285,6 +297,15 @@ ags_toolbar_paste_callback(GtkWidget *widget, AgsToolbar *toolbar)
xmlFreeDoc(clipboard);
}
+
+ cr = gdk_cairo_create(GTK_WIDGET(editor->note_edit->drawing_area)->window);
+ cairo_push_group(cr);
+
+ ags_note_edit_draw_segment(editor->note_edit, cr);
+ ags_note_edit_draw_notation(editor->note_edit, cr);
+
+ cairo_pop_group_to_source(cr);
+ cairo_paint(cr);
}
void
diff --git a/src/ags/audio/ags_notation.c b/src/ags/audio/ags_notation.c
index a15aa51..be4a0bc 100644
--- a/src/ags/audio/ags_notation.c
+++ b/src/ags/audio/ags_notation.c
@@ -915,6 +915,33 @@ ags_notation_free_selection(AgsNotation *notation)
}
/**
+ * ags_notation_add_all_to_selection:
+ * @notation: an #AgsNotation
+ *
+ * Select all.
+ *
+ * Since: 0.4.2
+ */
+void
+ags_notation_add_all_to_selection(AgsNotation *notation)
+{
+ AgsNote *note;
+ GList *region, *list;
+
+ ags_notation_free_selection(notation);
+ list = notation->notes;
+
+ while(list != NULL){
+ AGS_NOTE(list->data)->flags |= AGS_NOTE_IS_SELECTED;
+ g_object_ref(G_OBJECT(list->data));
+
+ list = list->next;
+ }
+
+ notation->selection = g_list_copy(notation->notes);
+}
+
+/**
* ags_notation_add_point_to_selection:
* @notation: an #AgsNotation
* @x: offset
diff --git a/src/ags/audio/ags_notation.h b/src/ags/audio/ags_notation.h
index 07e4f7b..5e999cf 100644
--- a/src/ags/audio/ags_notation.h
+++ b/src/ags/audio/ags_notation.h
@@ -114,6 +114,7 @@ GList* ags_notation_find_region(AgsNotation *notation,
gboolean use_selection_list);
void ags_notation_free_selection(AgsNotation *notation);
+void ags_notation_add_all_to_selection(AgsNotation *notation);
void ags_notation_add_point_to_selection(AgsNotation *notation,
guint x, guint y,
diff --git a/src/ags/audio/ags_recall_factory.c b/src/ags/audio/ags_recall_factory.c
index c7e0f56..f71166d 100644
--- a/src/ags/audio/ags_recall_factory.c
+++ b/src/ags/audio/ags_recall_factory.c
@@ -1824,7 +1824,7 @@ ags_recall_factory_create_peak(AgsAudio *audio,
"devout\0", audio->devout,
"recall-channel\0", peak_channel,
"source\0", channel,
- "recall_container\0", recall_container,
+ "recall_container\0", play_container,
NULL);
ags_recall_set_flags(AGS_RECALL(peak_channel_run), (AGS_RECALL_TEMPLATE |
(((AGS_RECALL_FACTORY_OUTPUT & create_flags) != 0) ? AGS_RECALL_OUTPUT_ORIENTATED: AGS_RECALL_INPUT_ORIENTATED) |
diff --git a/src/ags/main.c b/src/ags/main.c
index 54f45a5..7438f1e 100644
--- a/src/ags/main.c
+++ b/src/ags/main.c
@@ -627,6 +627,11 @@ ags_main_register_recall_type()
ags_copy_channel_get_type();
ags_copy_channel_run_get_type();
+ ags_mute_audio_get_type();
+ ags_mute_audio_run_get_type();
+ ags_mute_channel_get_type();
+ ags_mute_channel_run_get_type();
+
ags_volume_channel_get_type();
ags_volume_channel_run_get_type();
--
gsequencer packaging
More information about the pkg-multimedia-commits
mailing list