mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprof: introduce libadwaita
This commit is contained in:
@ -18,6 +18,7 @@ sysprof_deps = [
|
||||
libsysprof_dep,
|
||||
libsysprof_ui_dep,
|
||||
dependency('pangoft2', required: false),
|
||||
dependency('libadwaita-1'),
|
||||
]
|
||||
|
||||
sysprof = executable('sysprof', sysprof_resources + sysprof_sources,
|
||||
|
||||
@ -27,10 +27,10 @@
|
||||
|
||||
struct _SysprofApplication
|
||||
{
|
||||
GtkApplication parent_instance;
|
||||
AdwApplication parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (SysprofApplication, sysprof_application, GTK_TYPE_APPLICATION)
|
||||
G_DEFINE_TYPE (SysprofApplication, sysprof_application, ADW_TYPE_APPLICATION)
|
||||
|
||||
struct {
|
||||
const gchar *action_name;
|
||||
|
||||
@ -18,13 +18,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <adwaita.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define SYSPROF_TYPE_APPLICATION (sysprof_application_get_type())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (SysprofApplication, sysprof_application, SYSPROF, APPLICATION, GtkApplication)
|
||||
G_DECLARE_FINAL_TYPE (SysprofApplication, sysprof_application, SYSPROF, APPLICATION, AdwApplication)
|
||||
|
||||
SysprofApplication *sysprof_application_new (void);
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
struct _SysprofWindow
|
||||
{
|
||||
GtkApplicationWindow parent_instance;
|
||||
AdwApplicationWindow parent_instance;
|
||||
|
||||
EggBindingGroup *bindings;
|
||||
|
||||
@ -40,7 +40,7 @@ struct _SysprofWindow
|
||||
GtkMenuButton *menu_button;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (SysprofWindow, sysprof_window, GTK_TYPE_APPLICATION_WINDOW)
|
||||
G_DEFINE_TYPE (SysprofWindow, sysprof_window, ADW_TYPE_APPLICATION_WINDOW)
|
||||
|
||||
/**
|
||||
* sysprof_window_new:
|
||||
|
||||
@ -20,13 +20,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <adwaita.h>
|
||||
|
||||
#include "sysprof-application.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define SYSPROF_TYPE_WINDOW (sysprof_window_get_type())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (SysprofWindow, sysprof_window, SYSPROF, WINDOW, GtkApplicationWindow)
|
||||
G_DECLARE_FINAL_TYPE (SysprofWindow, sysprof_window, SYSPROF, WINDOW, AdwApplicationWindow)
|
||||
|
||||
GtkWidget *sysprof_window_new (SysprofApplication *application);
|
||||
void sysprof_window_new_tab (SysprofWindow *self);
|
||||
|
||||
@ -1,54 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<interface>
|
||||
<template class="SysprofWindow" parent="GtkApplicationWindow">
|
||||
<template class="SysprofWindow" parent="AdwApplicationWindow">
|
||||
<style>
|
||||
<class name="org-gnome-Sysprof"/>
|
||||
</style>
|
||||
<property name="default-height">750</property>
|
||||
<property name="icon-name">org.gnome.Sysprof-symbolic</property>
|
||||
<property name="show-menubar">false</property>
|
||||
<property name="title" translatable="yes">Sysprof</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="show-title-buttons">true</property>
|
||||
<property name="visible">true</property>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="menu_button">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="show-title-buttons">true</property>
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">open-menu-symbolic</property>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="menu_button">
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">open-menu-symbolic</property>
|
||||
<property name="visible">true</property>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child type="start">
|
||||
<object class="GtkButton" id="open_button">
|
||||
<property name="label" translatable="yes">_Open</property>
|
||||
<property name="action-name">app.open-capture</property>
|
||||
<property name="use-underline">true</property>
|
||||
<property name="tooltip-text" translatable="yes">Open Recording… (Ctrl+O)</property>
|
||||
<property name="visible">true</property>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
<child type="end">
|
||||
<object class="GtkLabel" id="stat_label">
|
||||
<property name="margin-end">12</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="start">
|
||||
<object class="GtkButton" id="open_button">
|
||||
<property name="label" translatable="yes">_Open</property>
|
||||
<property name="action-name">app.open-capture</property>
|
||||
<property name="use-underline">true</property>
|
||||
<property name="tooltip-text" translatable="yes">Open Recording… (Ctrl+O)</property>
|
||||
<property name="visible">true</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkLabel" id="stat_label">
|
||||
<property name="margin-end">12</property>
|
||||
<property name="xalign">1</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="SysprofNotebook" id="notebook">
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="SysprofDisplay">
|
||||
<object class="SysprofNotebook" id="notebook">
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="SysprofDisplay">
|
||||
<property name="visible">true</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
Reference in New Issue
Block a user