58 i = this_proj -> modelgl ->
bonds[0][0];
59 this_proj -> modelgl -> bondid[0][0] = g_realloc (this_proj -> modelgl -> bondid[0][0], (i+nbd)*
sizeof*this_proj -> modelgl -> bondid[0][0]);
62 this_proj -> modelgl -> bondid[0][0][j+i] =
allocint (2);
63 this_proj -> modelgl -> bondid[0][0][j+i][0] = new_bond_list[j][0] + this_proj -> natomes - removed;
64 this_proj -> modelgl -> bondid[0][0][j+i][1] = new_bond_list[j][1] + this_proj -> natomes - removed;
66 this_proj -> modelgl ->
bonds[0][0] += nbd;
67 this_proj -> modelgl -> allbonds[0] += nbd;
86 for (i=0; i<
object ->
bonds; i++)
88 new_bond_list[i+nbd][0] =
object -> ibonds[i][0] + nat;
89 new_bond_list[i+nbd][1] =
object -> ibonds[i][1] + nat;
121 GtkTreeModel * cmodel = gtk_combo_box_get_model (box);
123 if (gtk_combo_box_get_active_iter (box, & iter))
125 gtk_tree_model_get_value (cmodel, & iter, 0, &
val);
127 gchar * str = g_strdup_printf (
"%s", (
char *)g_value_get_string (&
val));
132 gtk_combo_box_set_active (box, 0);
Function declarations for the mode edition window.
int get_selected_object_id(gboolean visible, int p, gchar *str, atom_search *asearch)
get the id of the object selected (in contextual menu, or in combo box)
void to_insert_in_project(int stat, int orig, project *this_proj, atom_search *asearch, gboolean visible)
to insert object in project
void add_bonds_to_list(int **new_bond_list, int nat, int nbd, atomic_object *object)
add object bond(s) list to overall bond(s) list
void add_bonds_to_project(project *this_proj, int removed, int nbd, int **new_bond_list)
add bond list to project bond list
G_MODULE_EXPORT void set_atoms_to_insert(GtkComboBox *box, gpointer data)
change the object to insert
void prepare_to_instert(gchar *key, project *this_proj, atom_search *asearch, gboolean visible)
prepare to insert something
int * allocint(int val)
allocate an int * pointer
project * get_project_by_id(int p)
get project pointer using id number