mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
Select the first row in the object view when making the profile
This commit is contained in:
19
sysprof.c
19
sysprof.c
@ -93,6 +93,7 @@ struct Application
|
|||||||
|
|
||||||
char * loaded_profile;
|
char * loaded_profile;
|
||||||
|
|
||||||
|
gboolean inhibit_forced_redraw;
|
||||||
gboolean profile_from_file; /* FIXME - not10: This is a kludge. Figure out how
|
gboolean profile_from_file; /* FIXME - not10: This is a kludge. Figure out how
|
||||||
* to maintain the application model properly
|
* to maintain the application model properly
|
||||||
*
|
*
|
||||||
@ -284,8 +285,6 @@ set_busy (GtkWidget *widget,
|
|||||||
|
|
||||||
if (cursor)
|
if (cursor)
|
||||||
gdk_cursor_unref (cursor);
|
gdk_cursor_unref (cursor);
|
||||||
|
|
||||||
gdk_display_flush (gdk_display_get_default ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -643,11 +642,20 @@ ensure_profile (Application *app)
|
|||||||
collector_stop (app->collector);
|
collector_stop (app->collector);
|
||||||
collector_reset (app->collector);
|
collector_reset (app->collector);
|
||||||
|
|
||||||
fill_lists (app);
|
|
||||||
|
|
||||||
app->state = DISPLAYING;
|
app->state = DISPLAYING;
|
||||||
|
|
||||||
update_sensitivity (app);
|
update_sensitivity (app);
|
||||||
|
|
||||||
|
app->inhibit_forced_redraw = TRUE;
|
||||||
|
|
||||||
|
fill_main_list (app);
|
||||||
|
|
||||||
|
/* This has the side effect of selecting the first row, which in turn causes
|
||||||
|
* the other lists to be filled out
|
||||||
|
*/
|
||||||
|
gtk_widget_grab_focus (GTK_WIDGET (app->object_view));
|
||||||
|
|
||||||
|
app->inhibit_forced_redraw = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1198,7 +1206,8 @@ on_object_selection_changed (GtkTreeSelection *selection,
|
|||||||
|
|
||||||
update_screenshot_window (app);
|
update_screenshot_window (app);
|
||||||
|
|
||||||
gdk_window_process_all_updates (); /* Display updated selection */
|
if (!app->inhibit_forced_redraw)
|
||||||
|
gdk_window_process_all_updates (); /* Display updated selection */
|
||||||
|
|
||||||
fill_descendants_tree (app);
|
fill_descendants_tree (app);
|
||||||
fill_callers_list (app);
|
fill_callers_list (app);
|
||||||
|
|||||||
Reference in New Issue
Block a user