Commit e268e9b0 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

* gladeui/glade-project.c: Show selected widget when selection changes and

	Cancel any queued selection from glade_project_selection_changed.
parent d475acac
......@@ -12,6 +12,9 @@
Also release all cached pages in ->dispose() (which was leeking) and
ensure the class field always gets the same height.
* gladeui/glade-project.c: Show selected widget when selection changes and
Cancel any queued selection from glade_project_selection_changed.
2011-01-05 Tristan Van Berkom <tristanvb@openismus.com>
* gladeui/Makefile.am, gladeui/glade-signal-class.[ch], gladeui/glade-widget-adaptor.c,
......
......@@ -3286,15 +3286,30 @@ void
glade_project_selection_changed (GladeProject * project)
{
g_return_if_fail (GLADE_IS_PROJECT (project));
g_signal_emit (G_OBJECT (project),
glade_project_signals[SELECTION_CHANGED], 0);
if (g_list_length (project->priv->selection) == 1 &&
!GLADE_IS_PLACEHOLDER (project->priv->selection->data))
{
GladeWidget *gwidget =
glade_widget_get_from_gobject (G_OBJECT (project->priv->selection->data));
glade_widget_show (gwidget);
}
/* Cancel any idle we have */
if (project->priv->selection_changed_id > 0)
project->priv->selection_changed_id =
(g_source_remove (project->priv->selection_changed_id), 0);
}
static gboolean
selection_change_idle (GladeProject *project)
{
glade_project_selection_changed (project);
project->priv->selection_changed_id = 0;
glade_project_selection_changed (project);
return FALSE;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment