summaryrefslogtreecommitdiff
path: root/baobab/src/baobab-prefs.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-02-11 14:01:28 +0100
committerraveit65 <[email protected]>2020-03-09 17:19:32 +0100
commit2f6a5e1b7456fe3accfedd2b5051a96923e3c044 (patch)
tree9d957175da555ba3c3d0d42496add01aedbffca3 /baobab/src/baobab-prefs.c
parentebae269c7e5eb6a1d57a22ab690bccb87fd494b4 (diff)
downloadmate-utils-2f6a5e1b7456fe3accfedd2b5051a96923e3c044.tar.bz2
mate-utils-2f6a5e1b7456fe3accfedd2b5051a96923e3c044.tar.xz
Define custom macros for wrapping the calls to gtk_builder_get_object
Diffstat (limited to 'baobab/src/baobab-prefs.c')
-rw-r--r--baobab/src/baobab-prefs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/baobab/src/baobab-prefs.c b/baobab/src/baobab-prefs.c
index cdbb92c3..56e37e51 100644
--- a/baobab/src/baobab-prefs.c
+++ b/baobab/src/baobab-prefs.c
@@ -35,6 +35,7 @@
#include "baobab-prefs.h"
#define BAOBAB_PREFERENCES_UI_RESOURCE "/org/mate/disk-usage-analyzer/baobab-dialog-scan-props.ui"
+#define GET_WIDGET(x) (GTK_WIDGET (gtk_builder_get_object (builder, (x))))
enum
{
@@ -162,7 +163,7 @@ create_tree_props (GtkBuilder *builder, GtkTreeModel *model)
GtkTreeViewColumn *col;
GtkWidget *tvw;
- tvw = GTK_WIDGET (gtk_builder_get_object (builder , "tree_view_props"));
+ tvw = GET_WIDGET ("tree_view_props");
/* checkbox column */
cell = gtk_cell_renderer_toggle_new ();
@@ -294,7 +295,7 @@ baobab_prefs_dialog (void)
return;
}
- dlg = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_scan_props"));
+ dlg = GET_WIDGET ("dialog_scan_props");
gtk_window_set_transient_for (GTK_WINDOW (dlg),
GTK_WINDOW (baobab.window));
@@ -312,7 +313,7 @@ baobab_prefs_dialog (void)
create_tree_props (builder, GTK_TREE_MODEL (model));
fill_props_model (model);
- check_enablehome = GTK_WIDGET (gtk_builder_get_object (builder, "check_enable_home"));
+ check_enablehome = GET_WIDGET ("check_enable_home");
g_settings_bind (baobab.prefs_settings,
BAOBAB_SETTINGS_MONITOR_HOME,
check_enablehome, "active",