[Patch] fixes
Nicolas Centa <[email protected]> Mon, 27 Oct 2003 16:12:33 +0100
| Newsgroups | gmane.editors.mlview.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Some fixes. (when you select a node it doesn't expand this node any more, when you copy and paste a node it doesn't expand the pasted node any more, and you can edit the nodes in the icon tree - the editing was broken) Nicolas Centa "HappyPeng"
patch.diff
(application/octet-stream, 2.8 KB)
? depcomp
? install-sh
? missing
? mkinstalldirs
? patch.diff
? schemas/Makefile.in
Index: src/mlview-icon-tree.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-icon-tree.c,v
retrieving revision 1.2
diff -a -u -r1.2 mlview-icon-tree.c
--- src/mlview-icon-tree.c 26 Oct 2003 19:09:52 -0000 1.2
+++ src/mlview-icon-tree.c 27 Oct 2003 15:01:25 -0000
@@ -765,6 +765,9 @@
"editable", IS_EDITABLE_COLUMN,
NULL);
gtk_tree_view_append_column (tree_view, column);
+ g_signal_connect (G_OBJECT (renderer),
+ "edited", G_CALLBACK (node_cell_edited_cb),
+ a_this);
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes
Index: src/mlview-tree-editor2.c
===================================================================
RCS file: /cvs/gnome/mlview/src/mlview-tree-editor2.c,v
retrieving revision 1.41
diff -a -u -r1.41 mlview-tree-editor2.c
--- src/mlview-tree-editor2.c 26 Oct 2003 09:53:13 -0000 1.41
+++ src/mlview-tree-editor2.c 27 Oct 2003 15:01:27 -0000
@@ -3366,8 +3366,6 @@
tree_view = mlview_tree_editor2_get_tree_view (a_this) ;
mlview_tree_editor2_get_iter (a_this, a_inserted_node,
&iter) ;
- mlview_utils_gtk_tree_view_expand_row_to_depth2
- (tree_view, &iter, -1) ;
mlview_tree_editor2_select_node (a_this, a_inserted_node) ;
status = mlview_tree_editor2_update_visual_node
(a_this, &iter);
@@ -3637,7 +3635,7 @@
xmlNode *a_node)
{
enum MlViewStatus status = MLVIEW_OK ;
- GtkTreePath *tree_path = NULL ;
+ GtkTreePath *tree_path = NULL, *parent_path = NULL ;
GtkTreeIter iter = {0} ;
GtkTreeModel * model = NULL ;
GtkTreeView *tree_view = NULL ;
@@ -3650,16 +3648,26 @@
g_return_if_fail (model) ;
tree_view = mlview_tree_editor2_get_tree_view (a_this) ;
g_return_if_fail (tree_view) ;
+
tree_path = gtk_tree_model_get_path (model, &iter) ;
+ parent_path = gtk_tree_path_copy (tree_path);
+ gtk_tree_path_up (parent_path);
+
g_return_if_fail (tree_path) ;
tree_sel = gtk_tree_view_get_selection (tree_view) ;
g_return_if_fail (tree_sel) ;
- gtk_tree_view_expand_to_path (tree_view, tree_path) ;
+
+ gtk_tree_view_expand_to_path (tree_view, parent_path) ;
+
gtk_tree_selection_select_path (tree_sel, tree_path);
if (tree_path) {
gtk_tree_path_free (tree_path) ;
tree_path = NULL ;
}
+ if (parent_path) {
+ gtk_tree_path_free (parent_path) ;
+ parent_path = NULL ;
+ }
}
/**