1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
3 margins.c for ObConf, the configuration tool for Openbox
4 Copyright (c) 2003-2007 Dana Jansens
5 Copyright (c) 2003 Tim Riley
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 See the COPYING file for a copy of the GNU General Public License.
23 static gboolean mapping = FALSE;
25 void margins_setup_tab()
27 GtkWidget *w, *w1, *w2, *w3;
34 w = get_widget("margins_left");
35 gtk_spin_button_set_value(GTK_SPIN_BUTTON(w),
36 tree_get_int("margins/left", 0));
38 w = get_widget("margins_right");
39 gtk_spin_button_set_value(GTK_SPIN_BUTTON(w),
40 tree_get_int("margins/right", 0));
42 w = get_widget("margins_top");
43 gtk_spin_button_set_value(GTK_SPIN_BUTTON(w),
44 tree_get_int("margins/top", 0));
46 w = get_widget("margins_bottom");
47 gtk_spin_button_set_value(GTK_SPIN_BUTTON(w),
48 tree_get_int("margins/bottom", 0));
53 void on_margins_left_value_changed(GtkSpinButton *w, gpointer data)
57 tree_set_int("margins/left", gtk_spin_button_get_value_as_int(w));
60 void on_margins_right_value_changed(GtkSpinButton *w, gpointer data)
64 tree_set_int("margins/right", gtk_spin_button_get_value_as_int(w));
67 void on_margins_top_value_changed(GtkSpinButton *w, gpointer data)
71 tree_set_int("margins/top", gtk_spin_button_get_value_as_int(w));
74 void on_margins_bottom_value_changed(GtkSpinButton *w, gpointer data)
78 tree_set_int("margins/bottom", gtk_spin_button_get_value_as_int(w));