[xdg-desktop-portal-gnome/gbsneto/post-restore-screencast-cleanups: 16/17] remotedesktopdialog: Simplify widgetry
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [xdg-desktop-portal-gnome/gbsneto/post-restore-screencast-cleanups: 16/17] remotedesktopdialog: Simplify widgetry
- Date: Mon, 22 Nov 2021 14:32:05 +0000 (UTC)
commit d23034e7ae09eea116389fd47bf32d102aecdbca
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Nov 15 18:32:02 2021 -0300
remotedesktopdialog: Simplify widgetry
Remove this boxes inside frames inside notebooks madness. Leave
just the listbox there. Apply the "content" CSS class to this
listbox and remove the row header function.
src/remotedesktopdialog.c | 18 ------------------
src/remotedesktopdialog.ui | 33 +++++----------------------------
2 files changed, 5 insertions(+), 46 deletions(-)
---
diff --git a/src/remotedesktopdialog.c b/src/remotedesktopdialog.c
index f9089aa..fc53023 100644
--- a/src/remotedesktopdialog.c
+++ b/src/remotedesktopdialog.c
@@ -242,21 +242,6 @@ on_selected_rows_changed (GtkListBox *box,
update_button_sensitivity (dialog);
}
-static void
-update_device_list_box_header (GtkListBoxRow *row,
- GtkListBoxRow *before,
- gpointer user_data)
-{
- GtkWidget *header;
-
- if (before)
- header = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
- else
- header = NULL;
-
- gtk_list_box_row_set_header (row, header);
-}
-
static void
on_has_selection_changed (ScreenCastWidget *screen_cast_widget,
gboolean has_selection,
@@ -327,9 +312,6 @@ remote_desktop_dialog_new (const char *app_id,
gtk_list_box_set_selection_mode (GTK_LIST_BOX (dialog->device_list),
GTK_SELECTION_MULTIPLE);
- gtk_list_box_set_header_func (GTK_LIST_BOX (dialog->device_list),
- update_device_list_box_header,
- NULL, NULL);
g_signal_connect (dialog->device_list, "row-activated",
G_CALLBACK (on_row_activated),
diff --git a/src/remotedesktopdialog.ui b/src/remotedesktopdialog.ui
index 260fdcc..33b19a5 100644
--- a/src/remotedesktopdialog.ui
+++ b/src/remotedesktopdialog.ui
@@ -63,37 +63,14 @@
</attributes>
</object>
</child>
+
<child>
- <object class="GtkFrame">
- <property name="valign">start</property>
+ <object class="GtkListBox" id="device_list">
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<style>
- <class name="view"/>
+ <class name="content" />
</style>
- <property name="child">
- <object class="GtkStack">
- <property name="hexpand">1</property>
- <property name="vexpand">1</property>
- <property name="transition_type">crossfade</property>
- <child>
- <object class="GtkNotebook" id="notebook_view">
- <property name="show_tabs">0</property>
- <property name="show_border">0</property>
- <child>
- <object class="GtkBox" id="box3">
- <property name="can_focus">0</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkListBox" id="device_list">
- <property name="hexpand">1</property>
- <property name="vexpand">1</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </property>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]