Window: add HdyColumn
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "subprojects/libhandy"]
|
||||
path = subprojects/libhandy
|
||||
url = https://source.puri.sm/Librem5/libhandy.git
|
||||
18
meson.build
18
meson.build
@@ -149,9 +149,27 @@ add_project_arguments(common_flags + compiler_flags, language: 'c')
|
||||
glib_dep = dependency('glib-2.0', version: '>= 2.43.4')
|
||||
gtk_dep = dependency('gtk+-3.0', version: '>= 3.22.0')
|
||||
|
||||
libhandy_dep = dependency('libhandy-0.0', version: '>= 0.0.9', required: false)
|
||||
if not libhandy_dep.found()
|
||||
libhandy = subproject(
|
||||
'libhandy',
|
||||
default_options: [
|
||||
'examples=false',
|
||||
'glade_catalog=disabled',
|
||||
'introspection=disabled',
|
||||
'static=true',
|
||||
'tests=false',
|
||||
'vapi=false',
|
||||
]
|
||||
)
|
||||
libhandy_dep = libhandy.get_variable('libhandy_dep')
|
||||
endif
|
||||
|
||||
|
||||
teleport_deps = [
|
||||
glib_dep,
|
||||
gtk_dep,
|
||||
libhandy_dep,
|
||||
dependency('gio-2.0', version: '>= 2.43.4'),
|
||||
dependency('libsoup-2.4'),
|
||||
dependency('avahi-client'),
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
#define HANDY_USE_UNSTABLE_API
|
||||
#include <handy.h>
|
||||
|
||||
#include "teleport-app.h"
|
||||
#include "teleport-window.h"
|
||||
@@ -122,6 +124,7 @@ teleport_window_init (TeleportWindow *win)
|
||||
|
||||
priv = teleport_window_get_instance_private (win);
|
||||
|
||||
g_type_ensure (HDY_TYPE_COLUMN);
|
||||
gtk_widget_init_template (GTK_WIDGET (win));
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/com/frac_tion/teleport/settings.ui");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.8 -->
|
||||
<requires lib="libhandy" version="0.0"/>
|
||||
<template class="TeleportWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">Teleport</property>
|
||||
<property name="default_width">650</property>
|
||||
@@ -26,17 +27,21 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<child>
|
||||
<object class="HdyColumn">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="linear-growth-width">600</property>
|
||||
<property name="maximum-width">600</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="general-container">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin_top">12</property>
|
||||
<property name="margin_bottom">12</property>
|
||||
<property name="margin_left">24</property>
|
||||
<property name="margin_right">24</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="width-request">500</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="general-frame">
|
||||
<property name="visible">True</property>
|
||||
@@ -75,7 +80,6 @@
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
@@ -258,7 +262,6 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="editable">False</property>
|
||||
<property name="width-request">206</property>
|
||||
<property name="text">systemctl start avahi-daemon</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -326,6 +329,9 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
1
subprojects/libhandy
Submodule
1
subprojects/libhandy
Submodule
Submodule subprojects/libhandy added at 1d47eeb88b
Reference in New Issue
Block a user