GtkTreeIter iter;
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter, 0, e->name, 1, e, -1);
- }
+ }
}
// SetKeyValuePairs
//
-// Reset the key/value (aka property) listbox and fill it with the
+// Reset the key/value (aka property) listbox and fill it with the
// k/v pairs from the entity being edited.
//
}
// SetSpawnFlags
-//
+//
// Update the checkboxes to reflect the flag state of the entity
//
void SetSpawnFlags(void)
}
// GetSpawnFlags
-//
+//
// Update the entity flags to reflect the state of the checkboxes
//
// NOTE: this function had a tendency to add "spawnflags" "0" on most entities
if (multiple_entities)
{
brush_t *b;
-
+
for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)
DeleteKey (b->owner, "spawnflags");
}
DeleteKey (edit_entity, "spawnflags");
}
else
- {
- sprintf (sz, "%i", f);
+ {
+ sprintf (sz, "%i", f);
if (multiple_entities)
{
brush_t *b;
-
+
for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)
SetKeyValue(b->owner, "spawnflags", sz);
}
int i, next_state;
brush_t *b;
- // syndrom of crappy code, we may get into stack overflowing crap with this function and Gtk
+ // syndrom of crappy code, we may get into stack overflowing crap with this function and Gtk
// if we play with the list of entity classes
// using a static flag to prevent recursion
static bool bBlockUpdate = false;
SetKeyValue(edit_entity, key, value);
// refresh the prop listbox
- SetKeyValuePairs();
+ SetKeyValuePairs();
#ifdef USEPLUGINENTITIES
str = filename;
}
- gtk_entry_set_text (GTK_ENTRY (EntWidgets[EntValueField]), str.GetBuffer());
+ gtk_entry_set_text (GTK_ENTRY (EntWidgets[EntValueField]), str.GetBuffer());
AddProp();
}
}
str = filename;
}
- gtk_entry_set_text (GTK_ENTRY (EntWidgets[EntValueField]), str.GetBuffer());
+ gtk_entry_set_text (GTK_ENTRY (EntWidgets[EntValueField]), str.GetBuffer());
AddProp();
edit_entity->brushes.onext->bModelFailed = false;
}
iType = W_GROUP;
else
iType = W_ENTITY;
- }
+ }
switch(iType)
{
}
const char *pName = NULL;
// const char *pNamed = Brush_GetKeyValue(b, "name");
-
+
if (!b->owner || (b->owner == world_entity))
{
- if (b->patchBrush)
+ if (b->patchBrush)
{
pName = "Generic Patch";
nImage = IMG_PATCH;
- }
- else
+ }
+ else
{
pName = "Generic Brush";
nImage = IMG_BRUSH;
}
- }
- else
+ }
+ else
{
pName = b->owner->eclass->name;
- if (b->owner->eclass->fixedsize)
+ if (b->owner->eclass->fixedsize)
{
nImage = IMG_ENTITY;
- }
- else
+ }
+ else
{
nImage = IMG_ENTITYGROUP;
}
// no world entity, we are not ready yet
// http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=917
if( !world_entity ) {
- return;
+ return;
}
if(gtk_tree_selection_get_selected(selection, &model, &selected))
{
if (name != NULL)
{
- // create a new group node
+ // create a new group node
GtkCTreeNode *item;
item = gtk_ctree_insert_node (GTK_CTREE (g_wndGroup.m_pTree), g_pGroupDlg->m_hWorld, NULL, &name, 0,
tree_pixmaps[IMG_GROUP], tree_masks[IMG_GROUP],
else
inspector_mode = W_GROUP;
}
-
+
if (inspector_mode == W_ENTITY)
gtk_widget_set_sensitive (GTK_WIDGET (item), TRUE);
else
GtkWidget* split1 = gtk_vpaned_new ();
gtk_box_pack_start (GTK_BOX (vbox), split1, TRUE, TRUE, 0);
gtk_widget_show (split1);
-
+
{
GtkWidget* split2 = gtk_vpaned_new ();
gtk_paned_add1 (GTK_PANED (split1), split2);
gtk_widget_show(view);
gtk_container_add(GTK_CONTAINER (scr), view);
-
+
g_object_unref(G_OBJECT(store));
EntWidgets[EntList] = view;
g_entlist_store = store;
{
// Spawnflags (4 colums wide max, or window gets too wide.)
- GtkWidget* table = LayoutTable = gtk_table_new (4, 4, FALSE);
+ GtkWidget* LayoutTable = gtk_table_new (4, 4, FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), LayoutTable, FALSE, TRUE, 0);
gtk_widget_show(LayoutTable);
gtk_widget_show(view);
gtk_container_add(GTK_CONTAINER (scr), view);
-
+
g_object_unref(G_OBJECT(store));
EntWidgets[EntProps] = view;