forked from Mirrors/openclonk
editor/gtk: ObjectListDlg opens object properties on double click
parent
b64653d003
commit
05ccd857e3
|
@ -625,6 +625,12 @@ void C4ObjectListDlg::OnDestroy(GtkWidget* widget, C4ObjectListDlg* dlg)
|
|||
dlg->treeview = 0;
|
||||
}
|
||||
|
||||
void C4ObjectListDlg::OnRowActivated(GtkTreeView * tree_view, GtkTreePath * path, GtkTreeViewColumn * column, C4ObjectListDlg * dlg)
|
||||
{
|
||||
Console.EditCursor.SetMode(C4CNS_ModeEdit);
|
||||
Console.EditCursor.OpenPropTools();
|
||||
}
|
||||
|
||||
void C4ObjectListDlg::OnSelectionChanged(GtkTreeSelection* selection, C4ObjectListDlg* dlg)
|
||||
{
|
||||
if (dlg->updating_selection) return;
|
||||
|
@ -787,6 +793,8 @@ void C4ObjectListDlg::Open()
|
|||
|
||||
g_object_unref(model); /* destroy store automatically with view */
|
||||
|
||||
g_signal_connect(G_OBJECT(treeview), "row-activated", G_CALLBACK(OnRowActivated), this);
|
||||
|
||||
GtkTreeViewColumn * col = gtk_tree_view_column_new();
|
||||
GtkCellRenderer * renderer;
|
||||
#if 0
|
||||
|
|
|
@ -48,6 +48,7 @@ private:
|
|||
bool updating_selection;
|
||||
|
||||
static void OnDestroy(GtkWidget * widget, C4ObjectListDlg * dlg);
|
||||
static void OnRowActivated(GtkTreeView * tree_view, GtkTreePath * path, GtkTreeViewColumn * column, C4ObjectListDlg * dlg);
|
||||
static void OnSelectionChanged(GtkTreeSelection * selection, C4ObjectListDlg * dlg);
|
||||
#endif // WITH_DEVELOPER_MODE
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue