summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniels <niels@dyne.org>2015-08-03 22:51:58 (GMT)
committer niels <niels@dyne.org>2015-08-03 22:51:58 (GMT)
commit70baa2c2442cb84ada3b7cbca7e6e92a3e6609b1 (patch)
tree9afd25f866583476cd6073fedb261c107b5b3e26
parentd17353a67c8dbe066e9904c922a2879830c0f740 (diff)
d/j/a/y: set parameter name in fx anim label (instead of using p0...pn) | merge foreign branch https://github.com/d-j-a-y/veejay/tree/djay_curvepanel_paramname/veejay-current
-rw-r--r--veejay-current/veejay-client/src/vj-api.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/veejay-current/veejay-client/src/vj-api.c b/veejay-current/veejay-client/src/vj-api.c
index ff2fce9..bd4bf8b 100644
--- a/veejay-current/veejay-client/src/vj-api.c
+++ b/veejay-current/veejay-client/src/vj-api.c
@@ -1,3 +1,4 @@
+
/* Gveejay Reloaded - graphical interface for VeeJay
* (C) 2002-2004 Niels Elburg <nwelburg@gmail.com>
* with contributions by Thomas Rheinhold (2005)
@@ -129,6 +130,8 @@ enum {
TOOLTIP_SRTSELECT = 3
};
+#define FX_PARAMETER_DEFAULT_NAME "<none>"
+
enum
{
STREAM_NO_STREAM = 0,
@@ -1167,7 +1170,7 @@ char *_effect_get_param_description(int effect_id, int param)
return ec->param_description[param];
}
}
- return "<none>";
+ return FX_PARAMETER_DEFAULT_NAME;
}
@@ -1185,7 +1188,7 @@ char *_effect_get_description(int effect_id)
return ec->description;
}
}
- return "<none>";
+ return FX_PARAMETER_DEFAULT_NAME;
}
el_constr *_el_entry_new( int pos, char *file, int nf , char *fourcc)
@@ -2163,38 +2166,33 @@ static int get_slider_val(const char *name)
return ((gint)GTK_ADJUSTMENT(GTK_RANGE(w)->adjustment)->value);
}
-static void vj_kf_select_parameter(int num)
+static void vj_kf_refresh()
{
- sample_slot_t *s = info->selected_slot;
- if(!s) return;
-
- info->uc.selected_parameter_id = num;
-
GtkWidget *curve = glade_xml_get_widget_(info->main_window, "curve");
reset_curve( curve );
update_curve_accessibility("curve");
update_curve_widget("curve");
+ int *entry_tokens = &(info->uc.entry_tokens[0]);
- char name[20];
- sprintf(name, "P%d", info->uc.selected_parameter_id);
+ gchar *name = _utf8str(_effect_get_param_description(entry_tokens[ENTRY_FXID],info->uc.selected_parameter_id));
update_label_str( "curve_parameter", name );
+ g_free(name);
}
-static void vj_kf_refresh()
+static void vj_kf_select_parameter(int num)
{
- GtkWidget *curve = glade_xml_get_widget_(info->main_window, "curve");
-
-
- reset_curve( curve );
+ sample_slot_t *s = info->selected_slot;
+ if(!s)
+ {
+ update_label_str( "curve_parameter", FX_PARAMETER_DEFAULT_NAME);
+ return;
+ }
- update_curve_accessibility("curve");
- update_curve_widget("curve");
- char name[20];
- sprintf(name, "P%d", info->uc.selected_parameter_id);
- update_label_str( "curve_parameter", name );
+ info->uc.selected_parameter_id = num;
+ vj_kf_refresh();
}
static void update_curve_widget(const char *name)
@@ -3511,7 +3509,9 @@ static gint load_parameter_info()
int nl = get_nums("stream_length") + 1 ;
update_spin_range( "curve_spinstart", 0, nl, p[ENTRY_KF_START] );
update_spin_range( "curve_spinend", 0,nl, p[ENTRY_KF_END] );
- }
+ }
+
+ update_label_str( "curve_parameter", FX_PARAMETER_DEFAULT_NAME);
switch( p[ENTRY_KF_TYPE] )
{