[nautilus/wip/antoniof/gtk4-preparation-step-properties-cleanup: 60/66] general: Drop uses of GtkContainer:border-width
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-preparation-step-properties-cleanup: 60/66] general: Drop uses of GtkContainer:border-width
- Date: Sun, 17 Oct 2021 14:23:51 +0000 (UTC)
commit 62df5a5d1ea274b4d1a97b65c2fd8f8d31c20c8f
Author: Ernestas Kulik <ernestask gnome org>
Date: Thu Jul 5 13:52:15 2018 +0300
general: Drop uses of GtkContainer:border-width
In preparation for porting to GTK4.
Rebased and ammeded by António Fernandes <antoniof gnome org>
src/nautilus-list-view.c | 2 +-
src/nautilus-search-popover.c | 1 -
src/resources/ui/nautilus-batch-rename-dialog.ui | 1 -
src/resources/ui/nautilus-file-properties-change-permissions.ui | 2 +-
src/resources/ui/nautilus-properties-window.ui | 8 ++++----
src/resources/ui/nautilus-search-popover.ui | 2 +-
src/resources/ui/nautilus-toolbar.ui | 2 +-
test/interactive/test-copy.c | 2 +-
test/interactive/test.c | 5 +----
test/interactive/test.h | 3 +--
10 files changed, 11 insertions(+), 17 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 2af647d7d..07e15dce5 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -3423,7 +3423,7 @@ create_column_editor (NautilusListView *view)
gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
- gtk_container_set_border_width (GTK_CONTAINER (box), 12);
+ g_object_set (box, "margin", 12, NULL);
gtk_widget_set_hexpand (box, TRUE);
gtk_widget_set_vexpand (box, TRUE);
gtk_widget_show (box);
diff --git a/src/nautilus-search-popover.c b/src/nautilus-search-popover.c
index 4ab345608..d823cdbb9 100644
--- a/src/nautilus-search-popover.c
+++ b/src/nautilus-search-popover.c
@@ -592,7 +592,6 @@ show_other_types_dialog (NautilusSearchPopover *popover)
gtk_widget_set_vexpand (scrolled, TRUE);
gtk_widget_show (scrolled);
- gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 0);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), scrolled, FALSE, TRUE,
0);
treeview = gtk_tree_view_new ();
diff --git a/src/resources/ui/nautilus-batch-rename-dialog.ui
b/src/resources/ui/nautilus-batch-rename-dialog.ui
index be7886f36..850458266 100644
--- a/src/resources/ui/nautilus-batch-rename-dialog.ui
+++ b/src/resources/ui/nautilus-batch-rename-dialog.ui
@@ -32,7 +32,6 @@
</action-widgets>
<child internal-child="vbox">
<object class="GtkBox" id="vbox">
- <property name="border-width">0</property>
<child>
<object class="GtkGrid" id="grid">
<property name="visible">True</property>
diff --git a/src/resources/ui/nautilus-file-properties-change-permissions.ui
b/src/resources/ui/nautilus-file-properties-change-permissions.ui
index 122fd1ffd..a35214c76 100644
--- a/src/resources/ui/nautilus-file-properties-change-permissions.ui
+++ b/src/resources/ui/nautilus-file-properties-change-permissions.ui
@@ -33,7 +33,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
- <property name="border_width">6</property>
+ <property name="margin">6</property>
<property name="orientation">vertical</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
diff --git a/src/resources/ui/nautilus-properties-window.ui b/src/resources/ui/nautilus-properties-window.ui
index 19b47085a..5ad7171a1 100644
--- a/src/resources/ui/nautilus-properties-window.ui
+++ b/src/resources/ui/nautilus-properties-window.ui
@@ -29,7 +29,7 @@
<object class="GtkBox" id="basic_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">18</property>
+ <property name="margin">18</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
@@ -478,7 +478,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">False</property>
- <property name="border_width">5</property>
+ <property name="margin">5</property>
<property name="row_spacing">10</property>
<property name="column_spacing">10</property>
<child>
@@ -763,7 +763,7 @@
<child>
<object class="GtkBox" id="permissions_box">
<property name="can_focus">False</property>
- <property name="border_width">18</property>
+ <property name="margin">18</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="not_the_owner_label">
@@ -1273,7 +1273,7 @@
<child>
<object class="GtkBox" id="open_with_box">
<property name="can_focus">False</property>
- <property name="border_width">18</property>
+ <property name="margin">18</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
diff --git a/src/resources/ui/nautilus-search-popover.ui b/src/resources/ui/nautilus-search-popover.ui
index 37de70206..c4fad1e18 100644
--- a/src/resources/ui/nautilus-search-popover.ui
+++ b/src/resources/ui/nautilus-search-popover.ui
@@ -8,7 +8,7 @@
<object class="GtkGrid" >
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">20</property>
+ <property name="margin">20</property>
<property name="row_spacing">8</property>
<property name="column_spacing">18</property>
<child>
diff --git a/src/resources/ui/nautilus-toolbar.ui b/src/resources/ui/nautilus-toolbar.ui
index cde9d0e70..ce91bcb2f 100644
--- a/src/resources/ui/nautilus-toolbar.ui
+++ b/src/resources/ui/nautilus-toolbar.ui
@@ -312,7 +312,7 @@
<property name="width_request">160</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">9</property>
+ <property name="margin">9</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="view_menu_zoom_section">
diff --git a/test/interactive/test-copy.c b/test/interactive/test-copy.c
index 194eda444..d48182ebd 100644
--- a/test/interactive/test-copy.c
+++ b/test/interactive/test-copy.c
@@ -68,7 +68,7 @@ main (int argc,
dest = g_file_new_for_commandline_arg (argv[i]);
- window = test_window_new ("copy test", 5);
+ window = test_window_new ("copy test");
gtk_widget_show (window);
diff --git a/test/interactive/test.c b/test/interactive/test.c
index 43e8fbc43..34a5fa8c4 100644
--- a/test/interactive/test.c
+++ b/test/interactive/test.c
@@ -31,8 +31,7 @@ test_delete_event (GtkWidget *widget,
}
GtkWidget *
-test_window_new (const char *title,
- guint border_width)
+test_window_new (const char *title)
{
GtkWidget *window;
@@ -46,8 +45,6 @@ test_window_new (const char *title,
g_signal_connect (window, "delete_event",
G_CALLBACK (test_delete_event), NULL);
- gtk_container_set_border_width (GTK_CONTAINER (window), border_width);
-
return window;
}
diff --git a/test/interactive/test.h b/test/interactive/test.h
index fc20a7727..b8ce09a23 100644
--- a/test/interactive/test.h
+++ b/test/interactive/test.h
@@ -13,8 +13,7 @@ int test_quit (int ex
void test_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer callback_data);
-GtkWidget *test_window_new (const char *title,
- guint border_width);
+GtkWidget *test_window_new (const char *title);
void test_gtk_widget_set_background_image (GtkWidget *widget,
const char *image_name);
void test_gtk_widget_set_background_color (GtkWidget *widget,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]