mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
visualizers: clear selected row when showing details
The details don't correspond to any selected row, so clear the row when we switch to the details page.
This commit is contained in:
@ -327,7 +327,11 @@ change_page_cb (GSimpleAction *action,
|
|||||||
if (g_variant_is_of_type (param, G_VARIANT_TYPE_STRING))
|
if (g_variant_is_of_type (param, G_VARIANT_TYPE_STRING))
|
||||||
{
|
{
|
||||||
const gchar *str = g_variant_get_string (param, NULL);
|
const gchar *str = g_variant_get_string (param, NULL);
|
||||||
|
|
||||||
gtk_stack_set_visible_child_name (priv->pages, str);
|
gtk_stack_set_visible_child_name (priv->pages, str);
|
||||||
|
|
||||||
|
if (g_str_equal (str, "details"))
|
||||||
|
sysprof_visualizers_frame_unselect_row (priv->visualizers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -747,3 +747,11 @@ sysprof_visualizers_frame_get_hadjustment (SysprofVisualizersFrame *self)
|
|||||||
|
|
||||||
return gtk_range_get_adjustment (GTK_RANGE (self->hscrollbar));
|
return gtk_range_get_adjustment (GTK_RANGE (self->hscrollbar));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
sysprof_visualizers_frame_unselect_row (SysprofVisualizersFrame *self)
|
||||||
|
{
|
||||||
|
g_return_if_fail (SYSPROF_IS_VISUALIZERS_FRAME (self));
|
||||||
|
|
||||||
|
gtk_list_box_unselect_all (self->groups);
|
||||||
|
}
|
||||||
|
|||||||
@ -45,5 +45,6 @@ gboolean sysprof_visualizers_frame_load_finish (SysprofVis
|
|||||||
GError **error);
|
GError **error);
|
||||||
GtkSizeGroup *sysprof_visualizers_frame_get_size_group (SysprofVisualizersFrame *self);
|
GtkSizeGroup *sysprof_visualizers_frame_get_size_group (SysprofVisualizersFrame *self);
|
||||||
GtkAdjustment *sysprof_visualizers_frame_get_hadjustment (SysprofVisualizersFrame *self);
|
GtkAdjustment *sysprof_visualizers_frame_get_hadjustment (SysprofVisualizersFrame *self);
|
||||||
|
void sysprof_visualizers_frame_unselect_row (SysprofVisualizersFrame *self);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|||||||
@ -193,7 +193,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="hexpand">False</property>
|
<property name="hexpand">False</property>
|
||||||
<property name="selection_mode">browse</property>
|
<property name="selection_mode">single</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="left-column"/>
|
<class name="left-column"/>
|
||||||
<class name="visualizer-groups"/>
|
<class name="visualizer-groups"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user