summaryrefslogtreecommitdiff
path: root/src/disks.cpp
diff options
context:
space:
mode:
authormbkma <[email protected]>2021-12-21 23:47:49 +0100
committerRobert Antoni Buj Gelonch <[email protected]>2022-01-01 20:54:37 +0100
commit15519961f3e6f3b5295f4e253268a8dff8ce9eee (patch)
tree463e89d3754736eb73750d68e5b868b87fc782f1 /src/disks.cpp
parentabcef611612750d2147656af1ede1d619da09c22 (diff)
downloadmate-system-monitor-15519961f3e6f3b5295f4e253268a8dff8ce9eee.tar.bz2
mate-system-monitor-15519961f3e6f3b5295f4e253268a8dff8ce9eee.tar.xz
port interface to ui files
see https://gitlab.gnome.org/GNOME/gnome-system-monitor/-/commit/3df5cd02abaafe9789be53b5b78425126d7c1a07 and following commits
Diffstat (limited to 'src/disks.cpp')
-rw-r--r--src/disks.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/disks.cpp b/src/disks.cpp
index 7dd398a..a645492 100644
--- a/src/disks.cpp
+++ b/src/disks.cpp
@@ -390,10 +390,9 @@ cb_disks_column_resized(GtkWidget *widget, GParamSpec *pspec, gpointer data)
timeout_id = g_timeout_add (250, save_column_width, data);
}
-GtkWidget *
-create_disk_view(ProcData *procdata)
+void
+create_disk_view(ProcData *procdata, GtkBuilder *builder)
{
- GtkWidget *disk_box;
GtkWidget *scrolled;
GtkWidget *disk_tree;
GtkListStore *model;
@@ -412,18 +411,7 @@ create_disk_view(ProcData *procdata)
N_("Used")
};
- disk_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
-
- gtk_container_set_border_width(GTK_CONTAINER(disk_box), 12);
-
- scrolled = gtk_scrolled_window_new(NULL, NULL);
- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled),
- GTK_SHADOW_IN);
-
- gtk_box_pack_start(GTK_BOX(disk_box), scrolled, TRUE, TRUE, 0);
+ scrolled = GTK_WIDGET (gtk_builder_get_object (builder, "disks_scrolled"));
model = gtk_list_store_new(DISK_N_COLUMNS, /* n columns */
G_TYPE_STRING, /* DISK_DEVICE */
@@ -524,13 +512,9 @@ create_disk_view(ProcData *procdata)
/* numeric sort */
- gtk_widget_show_all(disk_box);
-
procman_get_tree_state(procdata->settings, disk_tree,
"disktreenew");
g_signal_connect (G_OBJECT(disk_tree), "columns-changed",
G_CALLBACK(cb_disk_columns_changed), procdata);
-
- return disk_box;
}