remove id and position fields from EffectGroup
This commit is contained in:
@@ -35,8 +35,6 @@ typedef struct {
|
||||
typedef struct {
|
||||
guint type; /**< value (type) */
|
||||
gchar *label; /**< Effect name */
|
||||
guint id; /**< ID (to set effect type) */
|
||||
guint position; /**< position */
|
||||
EffectSettings *settings; /**< possible parameters */
|
||||
gint settings_amt; /**< possible parameters length */
|
||||
} EffectGroup;
|
||||
@@ -44,6 +42,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
gchar *label; /**< Group label */
|
||||
guint id; /**< ID to set effect on/off, or if it isn't on/off group then -1 */
|
||||
guint type; /**< ID to set effect type */
|
||||
guint position; /**< position */
|
||||
EffectGroup *group; /**< possible effect types */
|
||||
gint group_amt; /**< possible effect types length */
|
||||
@@ -56,6 +55,8 @@ typedef struct {
|
||||
} EffectList;
|
||||
|
||||
typedef struct {
|
||||
guint type; /**< ID to set effect type */
|
||||
guint position;
|
||||
EffectGroup *group;
|
||||
gint group_amt;
|
||||
} ModifierGroup;
|
||||
|
||||
12
gui.c
12
gui.c
@@ -350,12 +350,14 @@ void combo_box_changed_cb(GtkComboBox *widget, gpointer data)
|
||||
/**
|
||||
* \param group Effect type groups
|
||||
* \param amt amount of effect groups
|
||||
* \param id ID to set effect type
|
||||
* \param position position
|
||||
*
|
||||
* Creates widget allowing user to choose effect type.
|
||||
*
|
||||
* \return widget that allow user to set effect type.
|
||||
**/
|
||||
GtkWidget *create_widget_container(EffectGroup *group, gint amt)
|
||||
GtkWidget *create_widget_container(EffectGroup *group, gint amt, gint id, gint position)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *widget;
|
||||
@@ -388,12 +390,12 @@ GtkWidget *create_widget_container(EffectGroup *group, gint amt)
|
||||
widget = NULL;
|
||||
|
||||
settings = g_slice_new(EffectSettingsGroup);
|
||||
settings->id = group[x].id;
|
||||
settings->id = id;
|
||||
settings->type = group[x].type;
|
||||
settings->position = group[x].position;
|
||||
settings->position = position;
|
||||
settings->child = widget;
|
||||
|
||||
widget_list_add(GTK_OBJECT(combo_box), group[x].id, group[x].position, group[x].type, x);
|
||||
widget_list_add(GTK_OBJECT(combo_box), id, position, group[x].type, x);
|
||||
|
||||
name = g_strdup_printf("SettingsGroup%d", cmbox_no);
|
||||
g_object_set_data_full(G_OBJECT(combo_box), name, settings, ((GDestroyNotify)effect_settings_group_free));
|
||||
@@ -453,7 +455,7 @@ GtkWidget *create_vbox(Effect *widgets, gint amt, gchar *label)
|
||||
y = 0;
|
||||
}
|
||||
|
||||
container = create_widget_container(widgets[x].group, widgets[x].group_amt);
|
||||
container = create_widget_container(widgets[x].group, widgets[x].group_amt, widgets[x].type, widgets[x].position);
|
||||
gtk_table_attach_defaults(GTK_TABLE(table), container, 1-y, 2-y, x+y, x+y+1);
|
||||
}
|
||||
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 2);
|
||||
|
||||
Reference in New Issue
Block a user