ce-page-security: Port to AdwBin
We add a scrolled window.
This commit is contained in:
parent
15694399dd
commit
4f8789c466
3 changed files with 51 additions and 40 deletions
|
@ -31,7 +31,7 @@
|
|||
|
||||
struct _CEPageSecurity
|
||||
{
|
||||
GtkGrid parent;
|
||||
AdwBin parent;
|
||||
|
||||
GtkBox *box;
|
||||
GtkComboBox *security_combo;
|
||||
|
@ -45,7 +45,7 @@ struct _CEPageSecurity
|
|||
|
||||
static void ce_page_iface_init (CEPageInterface *);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (CEPageSecurity, ce_page_security, GTK_TYPE_GRID,
|
||||
G_DEFINE_TYPE_WITH_CODE (CEPageSecurity, ce_page_security, ADW_TYPE_BIN,
|
||||
G_IMPLEMENT_INTERFACE (ce_page_get_type (), ce_page_iface_init))
|
||||
|
||||
enum {
|
||||
|
|
|
@ -21,12 +21,13 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <adwaita.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <NetworkManager.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
G_DECLARE_FINAL_TYPE (CEPageSecurity, ce_page_security, CE, PAGE_SECURITY, GtkGrid)
|
||||
G_DECLARE_FINAL_TYPE (CEPageSecurity, ce_page_security, CE, PAGE_SECURITY, AdwBin)
|
||||
|
||||
CEPageSecurity *ce_page_security_new (NMConnection *connection);
|
||||
|
||||
|
|
|
@ -1,44 +1,54 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<template class="CEPageSecurity" parent="GtkGrid">
|
||||
<property name="margin_start">50</property>
|
||||
<property name="margin_end">50</property>
|
||||
<property name="margin_top">12</property>
|
||||
<property name="margin_bottom">12</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="row_spacing">10</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<template class="CEPageSecurity" parent="AdwBin">
|
||||
<child>
|
||||
<object class="GtkLabel" id="security_label">
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">S_ecurity</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">security_combo</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="security_combo">
|
||||
<property name="hexpand">True</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box">
|
||||
<property name="orientation">vertical</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="propagate-natural-height">True</property>
|
||||
<property name="propagate-natural-width">True</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="margin_start">50</property>
|
||||
<property name="margin_end">50</property>
|
||||
<property name="margin_top">12</property>
|
||||
<property name="margin_bottom">12</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="row_spacing">10</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="security_label">
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">S_ecurity</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">security_combo</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="security_combo">
|
||||
<property name="hexpand">True</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box">
|
||||
<property name="orientation">vertical</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Reference in a new issue