ce-page-ethernet: Port to AdwBin
We add a scrolled window.
This commit is contained in:
parent
665288a47c
commit
f374c62b81
3 changed files with 120 additions and 109 deletions
|
@ -31,7 +31,7 @@
|
|||
|
||||
struct _CEPageEthernet
|
||||
{
|
||||
GtkGrid parent;
|
||||
AdwBin parent;
|
||||
|
||||
GtkComboBoxText *cloned_mac_combo;
|
||||
GtkComboBoxText *mac_combo;
|
||||
|
@ -46,7 +46,7 @@ struct _CEPageEthernet
|
|||
|
||||
static void ce_page_iface_init (CEPageInterface *);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (CEPageEthernet, ce_page_ethernet, GTK_TYPE_GRID,
|
||||
G_DEFINE_TYPE_WITH_CODE (CEPageEthernet, ce_page_ethernet, ADW_TYPE_BIN,
|
||||
G_IMPLEMENT_INTERFACE (ce_page_get_type (), ce_page_iface_init))
|
||||
|
||||
static void
|
||||
|
|
|
@ -21,12 +21,13 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <adwaita.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <NetworkManager.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
G_DECLARE_FINAL_TYPE (CEPageEthernet, ce_page_ethernet, CE, PAGE_ETHERNET, GtkGrid)
|
||||
G_DECLARE_FINAL_TYPE (CEPageEthernet, ce_page_ethernet, CE, PAGE_ETHERNET, AdwBin)
|
||||
|
||||
CEPageEthernet *ce_page_ethernet_new (NMConnection *connection,
|
||||
NMClient *client);
|
||||
|
|
|
@ -6,116 +6,126 @@
|
|||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<template class="CEPageEthernet" 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="CEPageEthernet" parent="AdwBin">
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">_Name</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">name_entry</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="name_entry">
|
||||
<property name="invisible_char">●</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">_MAC Address</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">mac_combo</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="mac_combo">
|
||||
<property name="has_entry">True</property>
|
||||
<property name="entry_text_column">0</property>
|
||||
<property name="id_column">1</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="cloned_mac_combo">
|
||||
<property name="has_entry">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="active_id">0</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
<child internal-child="entry">
|
||||
<object class="GtkEntry">
|
||||
<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">
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">_Name</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">name_entry</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="name_entry">
|
||||
<property name="invisible_char">●</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">_MAC Address</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">mac_combo</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="mac_combo">
|
||||
<property name="has_entry">True</property>
|
||||
<property name="entry_text_column">0</property>
|
||||
<property name="id_column">1</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="cloned_mac_combo">
|
||||
<property name="has_entry">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="active_id">0</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
<child internal-child="entry">
|
||||
<object class="GtkEntry">
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">M_TU</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">mtu_spin</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="valign">center</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">_Cloned Address</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">cloned_mac_combo</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="mtu_label">
|
||||
<property name="label" translatable="yes">bytes</property>
|
||||
<layout>
|
||||
<property name="column">2</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="mtu_spin">
|
||||
<property name="adjustment">mtu_adjustment</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">M_TU</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">mtu_spin</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="valign">center</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">_Cloned Address</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">cloned_mac_combo</property>
|
||||
<layout>
|
||||
<property name="column">0</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="mtu_label">
|
||||
<property name="label" translatable="yes">bytes</property>
|
||||
<layout>
|
||||
<property name="column">2</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="mtu_spin">
|
||||
<property name="adjustment">mtu_adjustment</property>
|
||||
<layout>
|
||||
<property name="column">1</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
|
|
Loading…
Add table
Reference in a new issue