typedef MemberCaller<ModelAttribute, &ModelAttribute::update> UpdateCaller;
void browse(const BrowsedPathEntry::SetPathCallback& setPath)
{
- const char *filename = misc_model_dialog(GTK_WIDGET(m_entry.m_entry.m_frame));
+ const char *filename = misc_model_dialog(gtk_widget_get_toplevel(GTK_WIDGET(m_entry.m_entry.m_frame)));
if(filename != 0)
{
GtkTreeView* view = g_entityClassList;
GtkTreePath* path = gtk_tree_model_get_path(model, &iter);
gtk_tree_selection_select_path(gtk_tree_view_get_selection(view), path);
- gtk_tree_view_scroll_to_cell(view, path, 0, FALSE, 0, 0);
+ if(GTK_WIDGET_REALIZED(view))
+ {
+ gtk_tree_view_scroll_to_cell(view, path, 0, FALSE, 0, 0);
+ }
gtk_tree_path_free(path);
good = FALSE;
}
{
GtkTreePath* path = gtk_tree_model_get_path(model, &iter);
gtk_tree_selection_select_path(gtk_tree_view_get_selection(view), path);
- gtk_tree_view_scroll_to_cell(view, path, 0, FALSE, 0, 0);
+ if(GTK_WIDGET_REALIZED(view))
+ {
+ gtk_tree_view_scroll_to_cell(view, path, 0, FALSE, 0, 0);
+ }
gtk_tree_path_free(path);
count = 1;
}
{
- int x = g_entitysplit1_position;
- if (x != -1)
+ // show the sliders in any case
+ if(g_entitysplit2_position > 22)
{
- gtk_paned_set_position(GTK_PANED(g_entity_split1), x);
-
- x = g_entitysplit2_position;
-
- if (x != -1)
- gtk_paned_set_position (GTK_PANED(g_entity_split2), x);
+ gtk_paned_set_position (GTK_PANED(g_entity_split2), g_entitysplit2_position);
+ } else {
+ g_entitysplit2_position = 22;
+ gtk_paned_set_position (GTK_PANED(g_entity_split2), 22);
+ }
+ if((g_entitysplit1_position - g_entitysplit2_position) > 27)
+ {
+ gtk_paned_set_position (GTK_PANED(g_entity_split1), g_entitysplit1_position);
+ } else {
+ gtk_paned_set_position (GTK_PANED(g_entity_split1), g_entitysplit2_position + 27);
}
}
g_entityInspector_windowConstructed = true;
EntityClassList_fill();
- GlobalSelectionSystem().addSelectionChangeCallback(FreeCaller1<const Selectable&, EntityInspector_selectionChanged>());
+ typedef FreeCaller1<const Selectable&, EntityInspector_selectionChanged> EntityInspectorSelectionChangedCaller;
+ GlobalSelectionSystem().addSelectionChangeCallback(EntityInspectorSelectionChangedCaller());
GlobalEntityCreator().setKeyValueChangedFunc(EntityInspector_keyValueChanged);
// hack