diff --git a/veejay-current/veejay-client/share/gveejay.reloaded.glade b/veejay-current/veejay-client/share/gveejay.reloaded.glade
index bf1daac6..988da005 100644
--- a/veejay-current/veejay-client/share/gveejay.reloaded.glade
+++ b/veejay-current/veejay-client/share/gveejay.reloaded.glade
@@ -54,7 +54,7 @@
True
-
+
True
button_loop.png
0.5
@@ -75,7 +75,7 @@
-
+
True
icon_openlist.png
0.5
@@ -95,7 +95,7 @@
-
+
True
icon_copy.png
0.5
@@ -115,7 +115,7 @@
-
+
True
icon_clear.png
0.5
@@ -138,7 +138,7 @@
True
-
+
True
icon_stream.png
0.5
@@ -159,7 +159,7 @@
-
+
True
icon_openlist.png
0.5
@@ -179,7 +179,7 @@
-
+
True
icon_color.png
0.5
@@ -199,7 +199,7 @@
-
+
True
icon_clear.png
0.5
@@ -222,7 +222,7 @@
True
-
+
True
icon_connect.png
0.5
@@ -240,7 +240,7 @@
True
_learn MIDI
True
- False
+ True
@@ -250,11 +250,26 @@
True
_MIDI enable
True
- False
+ True
midilearn
+
+
+
+
+
+
+
+
@@ -267,7 +282,7 @@
True
-
+
True
icon_save.png
0.5
@@ -288,7 +303,7 @@
-
+
True
icon_saveas.png
0.5
@@ -308,7 +323,7 @@
-
+
True
icon_openlist.png
0.5
@@ -328,7 +343,7 @@
-
+
True
icon_saveas.png
0.5
@@ -351,7 +366,7 @@
True
-
+
True
icon_open.png
0.5
@@ -372,7 +387,7 @@
-
+
True
icon_open.png
0.5
@@ -392,7 +407,7 @@
-
+
True
icon_openlist.png
0.5
@@ -412,7 +427,7 @@
-
+
True
icon_open.png
0.5
@@ -470,7 +485,7 @@
-
+
True
gtk-preferences
1
@@ -497,7 +512,7 @@
-
+
True
icon_bundle.png
0.5
@@ -530,7 +545,7 @@
-
+
True
icon_question.png
0.5
@@ -550,7 +565,7 @@
-
+
True
icon_bug.png
0.5
diff --git a/veejay-current/veejay-client/share/gveejay.reloaded.glade.bak b/veejay-current/veejay-client/share/gveejay.reloaded.glade.bak
index be43a4e4..bf1daac6 100644
--- a/veejay-current/veejay-client/share/gveejay.reloaded.glade.bak
+++ b/veejay-current/veejay-client/share/gveejay.reloaded.glade.bak
@@ -5866,8 +5866,7 @@
True
- True
- True
+ False
False
GTK_POS_TOP
False
diff --git a/veejay-current/veejay-client/src/callback.c b/veejay-current/veejay-client/src/callback.c
index bce03e15..c69122fe 100644
--- a/veejay-current/veejay-client/src/callback.c
+++ b/veejay-current/veejay-client/src/callback.c
@@ -3702,4 +3702,8 @@ void on_save_midi_layout1_activate( GtkWidget *w, gpointer data )
if(filename)
vj_midi_save( info->midi, filename );
}
-
+
+void on_clear_midi_layout1_activate( GtkWidget *w, gpointer data )
+{
+ vj_midi_reset(info->midi);
+}
diff --git a/veejay-current/veejay-client/src/vj-api.c b/veejay-current/veejay-client/src/vj-api.c
index c8ad2b12..c3749871 100644
--- a/veejay-current/veejay-client/src/vj-api.c
+++ b/veejay-current/veejay-client/src/vj-api.c
@@ -7104,10 +7104,6 @@ void setup_samplebank(gint num_cols, gint num_rows, GtkWidget *pad, int *idx, in
float ratio = (float) info->el.height / (float) info->el.width;
image_height = image_width * ratio;
- *idx = image_width;
- while( (image_width * ratio) > image_height )
- *idy = image_width * ratio;
-
gfloat w = image_width;
gfloat h = image_width * ratio;
diff --git a/veejay-current/veejay-client/src/vj-midi.c b/veejay-current/veejay-client/src/vj-midi.c
index 510f32de..a515640e 100644
--- a/veejay-current/veejay-client/src/vj-midi.c
+++ b/veejay-current/veejay-client/src/vj-midi.c
@@ -90,12 +90,25 @@ static int vj_midi_events(void *vv )
free(items);
return len;
}
-static void vj_midi_reset( void *vv )
+void vj_midi_reset( void *vv )
{
vmidi_t *v = (vmidi_t*)vv;
- char **items = vevo_list_properties(v->vims);
- if(!items) return;
+ int a = vj_midi_events(vv);
+ if( a > 0 )
+ {
+ char warn[200];
+ snprintf(warn,sizeof(warn), "This will clear %d MIDI events, Continue ?",a );
+ if( prompt_dialog( "MIDI", warn ) == GTK_RESPONSE_REJECT )
+ return;
+
+ }
+
+ char **items = vevo_list_properties(v->vims);
+ if(!items) {
+ vj_msg(VEEJAY_MSG_INFO,"No MIDI events to clear");
+ return;
+ }
int i;
for( i = 0; items[i] != NULL ; i ++ )
{
@@ -114,7 +127,7 @@ static void vj_midi_reset( void *vv )
v->vims = vpn(VEVO_ANONYMOUS_PORT);
- vj_msg(VEEJAY_MSG_INFO, "Cleared all MIDI events.");
+ vj_msg(VEEJAY_MSG_INFO, "Cleared %d MIDI events.",a);
}
void vj_midi_load(void *vv, const char *filename)
@@ -394,6 +407,7 @@ static void queue_vims_event( vmidi_t *v, int *data )
if( val > 0 )
val = val / tmp;
} else {
+ vj_msg(VEEJAY_MSG_INFO, "MIDI: what's this ? %x,%x,%x",data[0],data[1],data[2]);
return;
}
diff --git a/veejay-current/veejay-client/src/vmidi.h b/veejay-current/veejay-client/src/vmidi.h
index d20eacdf..aeb2a2bc 100644
--- a/veejay-current/veejay-client/src/vmidi.h
+++ b/veejay-current/veejay-client/src/vmidi.h
@@ -30,6 +30,7 @@ void vj_midi_load(void *vv, const char *filename);
void vj_midi_save(void *vv, const char *filename);
+void vj_midi_reset( void *vv );
void vj_midi_learning_vims( void *vv, char *widget, char *msg, int extra );
void vj_midi_learning_vims_simple( void *vv, char *widget, int id );