add signal handlers for text properties

This commit is contained in:
Brandon Lewis 2010-07-23 18:42:13 +02:00 committed by Edward Hervey
parent 59ecab2421
commit 28cef09736

View file

@ -82,6 +82,13 @@ gboolean in_point_scale_change_value_cb (GtkRange * range, GtkScrollType
void duration_cell_func (GtkTreeViewColumn * column, GtkCellRenderer * renderer,
GtkTreeModel * model, GtkTreeIter * iter, gpointer user);
void halign_changed_cb (GtkComboBox * widget, App * app);
void valign_changed_cb (GtkComboBox * widget, App * app);
void text_notify_text_changed_cb (GtkEntry * widget, GParamSpec * unused, App *
app);
gboolean create_ui (App * app);
void connect_to_filesource (GESTimelineObject * object, App * app);
@ -220,6 +227,45 @@ duration_cell_func (GtkTreeViewColumn * column, GtkCellRenderer * renderer,
g_object_set (renderer, "text", &buf, NULL);
}
void
halign_changed_cb (GtkComboBox * widget, App * app)
{
GList *tmp;
int active;
active = gtk_combo_box_get_active (app->halign);
for (tmp = app->selected_objects; tmp; tmp = tmp->next) {
g_object_set (G_OBJECT (tmp->data), "halignment", active, NULL);
}
}
void
valign_changed_cb (GtkComboBox * widget, App * app)
{
GList *tmp;
int active;
active = gtk_combo_box_get_active (app->valign);
for (tmp = app->selected_objects; tmp; tmp = tmp->next) {
g_object_set (G_OBJECT (tmp->data), "valignment", active, NULL);
}
}
void
text_notify_text_changed_cb (GtkEntry * widget, GParamSpec * unused, App * app)
{
GList *tmp;
const gchar *text;
text = gtk_entry_get_text (widget);
for (tmp = app->selected_objects; tmp; tmp = tmp->next) {
g_object_set (G_OBJECT (tmp->data), "text", text, NULL);
}
}
/* application methods ******************************************************/
static void selection_foreach (GtkTreeModel * model, GtkTreePath * path,