mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-21 15:20:02 +01:00
change samplelist save button to quick save button
This commit is contained in:
@@ -11509,7 +11509,7 @@ YUV (current)</property>
|
|||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
<property name="tooltip" translatable="yes">Save Samplelist</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>
|
<child>
|
||||||
<widget class="GtkAlignment" id="alignment55">
|
<widget class="GtkAlignment" id="alignment55">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
|||||||
@@ -838,6 +838,9 @@ void on_button_samplelist_load_clicked(GtkWidget *widget, gpointer user_data)
|
|||||||
g_free(filename );
|
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)
|
void on_button_samplelist_save_clicked(GtkWidget *widget, gpointer user_data)
|
||||||
{
|
{
|
||||||
gchar *filename = dialog_save_file( "Save samplelist");
|
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 );
|
multi_vims( VIMS_SAMPLE_SAVE_SAMPLELIST, "%s", filename );
|
||||||
vj_msg(VEEJAY_MSG_INFO, "Saved samples to %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);
|
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)
|
void on_spin_samplestart_value_changed(GtkWidget *widget, gpointer user_data)
|
||||||
{
|
{
|
||||||
if(!info->status_lock)
|
if(!info->status_lock)
|
||||||
|
|||||||
Reference in New Issue
Block a user