All pastes #741016 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-10-18 12:12 UTC
rendered paste body
 This is the callback asociation:

g_signal_connect_swapped (treeviewInputParam, "row-activated",
                          G_CALLBACK (show_parameterDialog_edit),
                          (gpointer)buttonEditInputParam);

 This is the callback:

/* Creates and shows a dialog to edit a parameters treemodel row */
void
show_parameterDialog_edit (GtkWidget *button, GtkWidget *treeview)
{
  GtkTreeSelection *row;
  GtkTreeModel *model;
  GtkTreeIter iter;

  g_print ("check_1");

  /* Show dialog only if there is a selected row */
  if (gtk_tree_selection_get_selected (row, &model, &iter))
  {
    g_print ("check2");

    row = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));

    gtk_widget_show (create_parameterDialog (GTK_WIDGET (treeview), EDIT, button));
  }
}