mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
page: start porting to GTK 4
More work to be done, but setup the base object.
This commit is contained in:
@ -31,7 +31,7 @@ typedef struct
|
|||||||
gchar *title;
|
gchar *title;
|
||||||
} SysprofPagePrivate;
|
} SysprofPagePrivate;
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_PRIVATE (SysprofPage, sysprof_page, GTK_TYPE_BIN)
|
G_DEFINE_TYPE_WITH_PRIVATE (SysprofPage, sysprof_page, GTK_TYPE_WIDGET)
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PROP_0,
|
PROP_0,
|
||||||
@ -157,6 +157,7 @@ static void
|
|||||||
sysprof_page_class_init (SysprofPageClass *klass)
|
sysprof_page_class_init (SysprofPageClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
|
|
||||||
object_class->finalize = sysprof_page_finalize;
|
object_class->finalize = sysprof_page_finalize;
|
||||||
object_class->get_property = sysprof_page_get_property;
|
object_class->get_property = sysprof_page_get_property;
|
||||||
@ -173,6 +174,8 @@ sysprof_page_class_init (SysprofPageClass *klass)
|
|||||||
(G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS));
|
(G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_object_class_install_properties (object_class, N_PROPS, properties);
|
g_object_class_install_properties (object_class, N_PROPS, properties);
|
||||||
|
|
||||||
|
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@ -32,11 +32,11 @@ G_BEGIN_DECLS
|
|||||||
#define SYSPROF_TYPE_PAGE (sysprof_page_get_type())
|
#define SYSPROF_TYPE_PAGE (sysprof_page_get_type())
|
||||||
|
|
||||||
SYSPROF_AVAILABLE_IN_ALL
|
SYSPROF_AVAILABLE_IN_ALL
|
||||||
G_DECLARE_DERIVABLE_TYPE (SysprofPage, sysprof_page, SYSPROF, PAGE, GtkBin)
|
G_DECLARE_DERIVABLE_TYPE (SysprofPage, sysprof_page, SYSPROF, PAGE, GtkWidget)
|
||||||
|
|
||||||
struct _SysprofPageClass
|
struct _SysprofPageClass
|
||||||
{
|
{
|
||||||
GtkBinClass parent_class;
|
GtkWidgetClass parent_class;
|
||||||
|
|
||||||
void (*load_async) (SysprofPage *self,
|
void (*load_async) (SysprofPage *self,
|
||||||
SysprofCaptureReader *reader,
|
SysprofCaptureReader *reader,
|
||||||
|
|||||||
Reference in New Issue
Block a user