mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-ui: add API to reload pages
This can be useful when the page is interactive and needs to reload.
This commit is contained in:
@ -22,7 +22,9 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "sysprof-display.h"
|
||||
#include "sysprof-page.h"
|
||||
#include "sysprof-ui-private.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@ -233,3 +235,14 @@ sysprof_page_set_hadjustment (SysprofPage *self,
|
||||
if (SYSPROF_PAGE_GET_CLASS (self)->set_hadjustment)
|
||||
SYSPROF_PAGE_GET_CLASS (self)->set_hadjustment (self, hadjustment);
|
||||
}
|
||||
|
||||
void
|
||||
sysprof_page_reload (SysprofPage *self)
|
||||
{
|
||||
GtkWidget *display;
|
||||
|
||||
g_return_if_fail (SYSPROF_IS_PAGE (self));
|
||||
|
||||
if ((display = gtk_widget_get_ancestor (GTK_WIDGET (self), SYSPROF_TYPE_DISPLAY)))
|
||||
_sysprof_display_reload_page (SYSPROF_DISPLAY (display), self);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user