summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniels <niels@dyne.org>2015-08-03 09:57:26 (GMT)
committer niels <niels@dyne.org>2015-08-03 09:57:26 (GMT)
commit0399d8e9e70fdd5e8a0f7a4f44106d7d6c0a7eff (patch)
tree3b38c4b733ae1bc70b7733524c5ad9579df8ecf8
parent23779a3a3b874bfbf3de0a5af8411e485e39aa40 (diff)
change samplelist save button to quick save button
-rw-r--r--veejay-current/veejay-client/share/gveejay.reloaded.glade2
-rw-r--r--veejay-current/veejay-client/src/callback.c25
2 files changed, 26 insertions, 1 deletions
diff --git a/veejay-current/veejay-client/share/gveejay.reloaded.glade b/veejay-current/veejay-client/share/gveejay.reloaded.glade
index c68a8fa..856d662 100644
--- a/veejay-current/veejay-client/share/gveejay.reloaded.glade
+++ b/veejay-current/veejay-client/share/gveejay.reloaded.glade
@@ -11509,7 +11509,7 @@ YUV (current)</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip" translatable="yes">Save Samplelist</property>
- <signal name="clicked" handler="on_button_samplelist_save_clicked" />
+ <signal name="clicked" handler="on_button_samplelist_qsave_clicked" />
<child>
<widget class="GtkAlignment" id="alignment55">
<property name="visible">True</property>
diff --git a/veejay-current/veejay-client/src/callback.c b/veejay-current/veejay-client/src/callback.c
index 4493d55..ebdb12f 100644
--- a/veejay-current/veejay-client/src/callback.c
+++ b/veejay-current/veejay-client/src/callback.c
@@ -838,6 +838,9 @@ void on_button_samplelist_load_clicked(GtkWidget *widget, gpointer user_data)
g_free(filename );
}
}
+static char samplelist_name[1024];
+static int has_samplelist_name = 0;
+
void on_button_samplelist_save_clicked(GtkWidget *widget, gpointer user_data)
{
gchar *filename = dialog_save_file( "Save samplelist");
@@ -845,10 +848,32 @@ void on_button_samplelist_save_clicked(GtkWidget *widget, gpointer user_data)
{
multi_vims( VIMS_SAMPLE_SAVE_SAMPLELIST, "%s", filename );
vj_msg(VEEJAY_MSG_INFO, "Saved samples to %s", filename);
+ strncpy( samplelist_name, filename,strlen(filename));
+ has_samplelist_name = 1;
g_free(filename);
}
}
+void on_button_samplelist_qsave_clicked(GtkWidget *widget, gpointer user_data)
+{
+ if( has_samplelist_name == 0 ) {
+ gchar *filename = dialog_save_file( "Save samplelist");
+ if(filename)
+ {
+ multi_vims( VIMS_SAMPLE_SAVE_SAMPLELIST, "%s", filename );
+ vj_msg(VEEJAY_MSG_INFO, "Saved samples to %s", filename);
+ strncpy( samplelist_name, filename, strlen(filename));
+ g_free(filename);
+ has_samplelist_name = 1;
+ }
+ }
+ else {
+ multi_vims( VIMS_SAMPLE_SAVE_SAMPLELIST, "%s" , samplelist_name );
+ vj_msg(VEEJAY_MSG_INFO, "Quick saved samples to %s" , samplelist_name );
+ }
+}
+
+
void on_spin_samplestart_value_changed(GtkWidget *widget, gpointer user_data)
{
if(!info->status_lock)