[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_module.cc,1.11,
From: |
Kai Sterker <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_module.cc,1.11,1.12 dlg_module.h,1.11,1.12 gui_dlgedit.cc,1.11,1.12 gui_graph.cc,1.9,1.10 gui_resources.cc,1.1,1.2 gui_tree.cc,1.2,1.3 |
Date: |
Sat, 02 Nov 2002 16:35:59 -0500 |
Update of /cvsroot/adonthell/adonthell/src/tools/dlgedit
In directory subversions:/tmp/cvs-serv6338
Modified Files:
dlg_module.cc dlg_module.h gui_dlgedit.cc gui_graph.cc
gui_resources.cc gui_tree.cc
Log Message:
ADDED: remember which sub-module has been in view and restore it when switching
between different dialogues
FIXED invalidation of 'open previous' filenames and some minor bugs
Index: dlg_module.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_module.cc,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** dlg_module.cc 2 Nov 2002 18:40:02 -0000 1.11
--- dlg_module.cc 2 Nov 2002 21:35:55 -0000 1.12
***************
*** 41,44 ****
--- 41,45 ----
{
type_ = MODULE;
+ mode_ = IDLE;
state_ = IDLE;
selected_ = NULL;
***************
*** 46,49 ****
--- 47,51 ----
parent_ = NULL;
changed_ = false;
+ displayed_ = false;
}
Index: dlg_module.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_module.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** dlg_module.h 2 Nov 2002 18:40:02 -0000 1.11
--- dlg_module.h 2 Nov 2002 21:35:55 -0000 1.12
***************
*** 216,219 ****
--- 216,231 ----
/**
+ * Whether this (sub-)dialogue has been in view before switching
+ * dialogues.
+ * @return \b true if that is the case, \b false otherwise.
+ */
+ bool displayed () { return displayed_; }
+ /**
+ * Mark this dialogue as displayed.
+ * @param c Set to \b true to mark the dialogue as displayed.
+ */
+ void setDisplayed (bool displayed) { displayed_ = displayed; }
+
+ /**
* Check whether this dialogue has been changed since it's been
* opened or saved.
***************
*** 273,278 ****
DlgNode *highlighted_; // the node currently under the cursor
DlgModule *parent_; // parent of sub-dialogue
!
DlgPoint offset_; // The current offset in the graph view
bool changed_; // Whether there were changes since saving
int nid_; // Id to use for the next new node
--- 285,291 ----
DlgNode *highlighted_; // the node currently under the cursor
DlgModule *parent_; // parent of sub-dialogue
!
DlgPoint offset_; // The current offset in the graph view
+ bool displayed_; // Whether that (sub-)dialogue was in view
bool changed_; // Whether there were changes since saving
int nid_; // Id to use for the next new node
Index: gui_dlgedit.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_dlgedit.cc,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** gui_dlgedit.cc 2 Nov 2002 18:40:02 -0000 1.11
--- gui_dlgedit.cc 2 Nov 2002 21:35:55 -0000 1.12
***************
*** 445,448 ****
--- 445,449 ----
// update list of previously opened files
CfgData::data->addFile (file);
+ initRecentFiles ();
message->display (200);
***************
*** 541,544 ****
--- 542,546 ----
// update list of previously opened files
CfgData::data->addFile (file);
+ initRecentFiles ();
// update 'Revert to Saved' menu item
***************
*** 591,598 ****
// update the tree view
tree_->display (module);
// attach the dialogue to the view
! graph_->attachModule (module, center);
// update the custom code entry if neccessary
--- 593,606 ----
// update the tree view
+ // NOTE that this method does some magic: it will select and attach
+ // the sub-dialogue of 'module' that has been viewed before. In that
+ // case, 'module' must not be attached, as it is the toplevel dialogue.
tree_->display (module);
// attach the dialogue to the view
! // In case of a newly created or (re)loaded 'module', none of it's
! // sub-dialogues will have been in the view. Therefore, the call
! // above can't attach anything. Therefore we can attach 'module'.
! if (!graph_->getAttached ()) graph_->attachModule (module, center);
// update the custom code entry if neccessary
Index: gui_graph.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_graph.cc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** gui_graph.cc 2 Nov 2002 18:40:02 -0000 1.9
--- gui_graph.cc 2 Nov 2002 21:35:55 -0000 1.10
***************
*** 80,83 ****
--- 80,86 ----
// set the size of the dialogue
drawing_area.resize (graph->allocation.width, graph->allocation.height);
+
+ // tell the module that it is in view
+ module->setDisplayed (true);
// display the module
***************
*** 107,110 ****
--- 110,116 ----
void GuiGraph::switchModule (DlgModule *m)
{
+ // we're switching between sub-dialogues
+ if (module) module->setDisplayed (false);
+
detachModule ();
attachModule (m);
Index: gui_resources.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_resources.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** gui_resources.cc 2 Nov 2002 18:40:02 -0000 1.1
--- gui_resources.cc 2 Nov 2002 21:35:55 -0000 1.2
***************
*** 132,136 ****
else if (type == NARRATOR) return Color[GC_DARK_GREEN];
else return Color[GC_DARK_BLUE];
- break;
}
--- 132,135 ----
***************
*** 141,145 ****
else if (type == NARRATOR) return Color[GC_YELLOW];
else return Color[GC_RED];
- break;
}
--- 140,143 ----
***************
*** 148,157 ****
{
return Color[GC_GREEN];
- break;
}
// unknown
default:
! break;
}
--- 146,154 ----
{
return Color[GC_GREEN];
}
// unknown
default:
! return Color[GC_BLACK];
}
Index: gui_tree.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_tree.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** gui_tree.cc 2 Nov 2002 18:40:02 -0000 1.2
--- gui_tree.cc 2 Nov 2002 21:35:55 -0000 1.3
***************
*** 122,125 ****
--- 122,129 ----
gtk_ctree_node_set_row_data (GTK_CTREE (tree), node, (gpointer) module);
+ // display the module that has been in the view before
+ if (module->displayed ())
+ on_tree_select_row (GTK_CTREE (tree), (GList*) node, 0, this);
+
return node;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_module.cc,1.11,1.12 dlg_module.h,1.11,1.12 gui_dlgedit.cc,1.11,1.12 gui_graph.cc,1.9,1.10 gui_resources.cc,1.1,1.2 gui_tree.cc,1.2,1.3,
Kai Sterker <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_node_gfx.cc,NONE,1.1 gui_resources.cc,NONE,1.1 gui_resources.h,NONE,1.1 Makefile.am,1.50,1.51 dlg_arrow.cc,1.5,1.6 dlg_arrow.h,1.6,1.7 dlg_circle.cc,1.7,1.8 dlg_circle.h,1.5,1.6 dlg_module.cc,1.10,1.11 dlg_module.h,1.10,1.11 dlg_node.cc,1.2,1.3 dlg_node.h,1.4,1.5 dlg_node_gfx.h,1.3,1.4 gui_dlgedit.cc,1.10,1.11 gui_dlgedit.h,1.9,1.10 gui_graph.cc,1.8,1.9 gui_graph.h,1.8,1.9 gui_graph_events.cc,1.3,1.4 gui_list.h,1.3,1.4 gui_tooltip.cc,1.3,1.4 gui_tooltip.h,1.2,1.3 gui_tree.cc,1.1,1.2 gui_tree.h,1.1,1.2
- Next by Date:
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_arrow.cc,1.6,1.7 dlg_arrow.h,1.7,1.8 dlg_circle.cc,1.8,1.9 dlg_circle.h,1.6,1.7 dlg_module.cc,1.12,1.13 dlg_module.h,1.12,1.13 dlg_node.h,1.5,1.6 dlg_types.h,1.7,1.8 gui_graph.cc,1.10,1.11 lex.loadlg.cc,1.15,1.16 loadlg.l,1.12,1.13
- Previous by thread:
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_node_gfx.cc,NONE,1.1 gui_resources.cc,NONE,1.1 gui_resources.h,NONE,1.1 Makefile.am,1.50,1.51 dlg_arrow.cc,1.5,1.6 dlg_arrow.h,1.6,1.7 dlg_circle.cc,1.7,1.8 dlg_circle.h,1.5,1.6 dlg_module.cc,1.10,1.11 dlg_module.h,1.10,1.11 dlg_node.cc,1.2,1.3 dlg_node.h,1.4,1.5 dlg_node_gfx.h,1.3,1.4 gui_dlgedit.cc,1.10,1.11 gui_dlgedit.h,1.9,1.10 gui_graph.cc,1.8,1.9 gui_graph.h,1.8,1.9 gui_graph_events.cc,1.3,1.4 gui_list.h,1.3,1.4 gui_tooltip.cc,1.3,1.4 gui_tooltip.h,1.2,1.3 gui_tree.cc,1.1,1.2 gui_tree.h,1.1,1.2
- Next by thread:
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit dlg_arrow.cc,1.6,1.7 dlg_arrow.h,1.7,1.8 dlg_circle.cc,1.8,1.9 dlg_circle.h,1.6,1.7 dlg_module.cc,1.12,1.13 dlg_module.h,1.12,1.13 dlg_node.h,1.5,1.6 dlg_types.h,1.7,1.8 gui_graph.cc,1.10,1.11 lex.loadlg.cc,1.15,1.16 loadlg.l,1.12,1.13
- Index(es):