mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 23:20:54 +00:00
sysprof: introduce libadwaita
This commit is contained in:
@ -18,6 +18,7 @@ sysprof_deps = [
|
|||||||
libsysprof_dep,
|
libsysprof_dep,
|
||||||
libsysprof_ui_dep,
|
libsysprof_ui_dep,
|
||||||
dependency('pangoft2', required: false),
|
dependency('pangoft2', required: false),
|
||||||
|
dependency('libadwaita-1'),
|
||||||
]
|
]
|
||||||
|
|
||||||
sysprof = executable('sysprof', sysprof_resources + sysprof_sources,
|
sysprof = executable('sysprof', sysprof_resources + sysprof_sources,
|
||||||
|
|||||||
@ -27,10 +27,10 @@
|
|||||||
|
|
||||||
struct _SysprofApplication
|
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 {
|
struct {
|
||||||
const gchar *action_name;
|
const gchar *action_name;
|
||||||
|
|||||||
@ -18,13 +18,13 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <adwaita.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define SYSPROF_TYPE_APPLICATION (sysprof_application_get_type())
|
#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);
|
SysprofApplication *sysprof_application_new (void);
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
struct _SysprofWindow
|
struct _SysprofWindow
|
||||||
{
|
{
|
||||||
GtkApplicationWindow parent_instance;
|
AdwApplicationWindow parent_instance;
|
||||||
|
|
||||||
EggBindingGroup *bindings;
|
EggBindingGroup *bindings;
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ struct _SysprofWindow
|
|||||||
GtkMenuButton *menu_button;
|
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:
|
* sysprof_window_new:
|
||||||
|
|||||||
@ -20,13 +20,15 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <adwaita.h>
|
||||||
|
|
||||||
#include "sysprof-application.h"
|
#include "sysprof-application.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define SYSPROF_TYPE_WINDOW (sysprof_window_get_type())
|
#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);
|
GtkWidget *sysprof_window_new (SysprofApplication *application);
|
||||||
void sysprof_window_new_tab (SysprofWindow *self);
|
void sysprof_window_new_tab (SysprofWindow *self);
|
||||||
|
|||||||
@ -1,54 +1,61 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<interface>
|
<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="default-height">750</property>
|
||||||
<property name="icon-name">org.gnome.Sysprof-symbolic</property>
|
<property name="icon-name">org.gnome.Sysprof-symbolic</property>
|
||||||
<property name="show-menubar">false</property>
|
|
||||||
<property name="title" translatable="yes">Sysprof</property>
|
<property name="title" translatable="yes">Sysprof</property>
|
||||||
<child type="titlebar">
|
<child>
|
||||||
<object class="GtkHeaderBar">
|
<object class="GtkBox">
|
||||||
<property name="show-title-buttons">true</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="visible">true</property>
|
<child>
|
||||||
<child type="end">
|
<object class="GtkHeaderBar">
|
||||||
<object class="GtkMenuButton" id="menu_button">
|
<property name="show-title-buttons">true</property>
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
<child>
|
<child type="end">
|
||||||
<object class="GtkImage">
|
<object class="GtkMenuButton" id="menu_button">
|
||||||
<property name="icon-name">open-menu-symbolic</property>
|
<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>
|
<property name="visible">true</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<style>
|
<child type="end">
|
||||||
<class name="image-button"/>
|
<object class="GtkLabel" id="stat_label">
|
||||||
</style>
|
<property name="margin-end">12</property>
|
||||||
|
<property name="xalign">1</property>
|
||||||
|
<style>
|
||||||
|
<class name="dim-label"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</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>
|
<child>
|
||||||
<object class="SysprofDisplay">
|
<object class="SysprofNotebook" id="notebook">
|
||||||
<property name="visible">true</property>
|
<property name="visible">true</property>
|
||||||
|
<child>
|
||||||
|
<object class="SysprofDisplay">
|
||||||
|
<property name="visible">true</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
Reference in New Issue
Block a user