Mailinglist Archive: yast-commit (723 mails)

< Previous Next >
[yast-commit] r47329 - in /trunk/gtk: ChangeLog src/YGSelectionModel.cc src/YGTable.cc
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Tue, 06 May 2008 16:22:02 -0000
  • Message-id: <20080506162202.DC61929A44@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Tue May 6 18:22:02 2008
New Revision: 47329

URL: http://svn.opensuse.org/viewcvs/yast?rev=47329&view=rev
Log:
* src/YGTable.cc (YGTree): fixed bug 381648 - 2nd issue - `open was not
working at start -- it seems GtkTreeView changes the collapse/expand
state when changing row properties. Also blocked item->setOpen() being
called at start.

* src/YGTable.cc: request bug 387114: don't grab focus when a ycp
program sets a row selected in a table-widget.

Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGSelectionModel.cc
trunk/gtk/src/YGTable.cc

Modified: trunk/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=47329&r1=47328&r2=47329&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Tue May 6 18:22:02 2008
@@ -1,3 +1,13 @@
+2008-05-06 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
+
+ * src/YGTable.cc (YGTree): fixed bug 381648 - 2nd issue - `open was not
+ working at start -- it seems GtkTreeView changes the collapse/expand
+ state when changing row properties. Also blocked item->setOpen() being
+ called at start.
+
+ * src/YGTable.cc: request bug 387114: don't grab focus when a ycp
+ program sets a row selected in a table-widget.
+
2008-05-05 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>

* Fixed y2log warnings across the various files: y2error() ->

Modified: trunk/gtk/src/YGSelectionModel.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGSelectionModel.cc?rev=47329&r1=47328&r2=47329&view=diff
==============================================================================
--- trunk/gtk/src/YGSelectionModel.cc (original)
+++ trunk/gtk/src/YGSelectionModel.cc Tue May 6 18:22:02 2008
@@ -61,6 +61,10 @@
doAddItem (*it);
if (empty || item->selected())
setFocusItem (&iter);
+
+ YTreeItem *tree_item = dynamic_cast <YTreeItem *> (item);
+ if (tree_item && tree_item->isOpen())
+ expand (&iter);
}

void YGSelectionModel::doDeleteAllItems()
@@ -135,10 +139,6 @@
gtk_tree_store_append (store, iter, NULL);
gtk_tree_store_set (store, iter, getPtrCol(), item, -1);
inner::setItemData (getModel(), iter, item);
-
- YTreeItem *tree_item = dynamic_cast <YTreeItem *> (item);
- if (tree_item && tree_item->isOpen())
- expand (iter);
}
else {
GtkListStore *store = getListStore();

Modified: trunk/gtk/src/YGTable.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGTable.cc?rev=47329&r1=47328&r2=47329&view=diff
==============================================================================
--- trunk/gtk/src/YGTable.cc (original)
+++ trunk/gtk/src/YGTable.cc Tue May 6 18:22:02 2008
@@ -110,7 +110,6 @@
gtk_tree_view_set_cursor (getView(), path, NULL, FALSE);
gtk_tree_view_scroll_to_cell (getView(), path, NULL, TRUE, 0.5,
0.5);
gtk_tree_path_free (path);
- gtk_widget_grab_focus (getWidget());
unblockEvents();
}

@@ -422,9 +421,13 @@
// YGSelectionModel
virtual void expand (GtkTreeIter *iter)
{
+ g_signal_handlers_block_by_func (getWidget(), (gpointer)
row_expanded_cb, this);
+
GtkTreePath *path = gtk_tree_model_get_path (getModel(), iter);
gtk_tree_view_expand_to_path (getView(), path);
gtk_tree_path_free (path);
+
+ g_signal_handlers_unblock_by_func (getWidget(), (gpointer)
row_expanded_cb, this);
}

// callbacks

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages