1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Authors: Jeffrey Stedfast <fejj@ximian.com>
5 * Copyright 2003 Ximian, Inc. (www.ximian.com)
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 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 #include "vgtoolprefs.h"
31 static void vg_tool_prefs_class_init (VgToolPrefsClass
*klass
);
32 static void vg_tool_prefs_init (VgToolPrefs
*prefs
);
33 static void vg_tool_prefs_destroy (GtkObject
*obj
);
34 static void vg_tool_prefs_finalize (GObject
*obj
);
36 static void tool_prefs_apply (VgToolPrefs
*prefs
);
37 static void tool_prefs_get_argv (VgToolPrefs
*prefs
, const char *tool
, GPtrArray
*argv
);
40 static GtkVBoxClass
*parent_class
= NULL
;
44 vg_tool_prefs_get_type (void)
46 static GType type
= 0;
49 static const GTypeInfo info
= {
50 sizeof (VgToolPrefsClass
),
51 NULL
, /* base_class_init */
52 NULL
, /* base_class_finalize */
53 (GClassInitFunc
) vg_tool_prefs_class_init
,
54 NULL
, /* class_finalize */
55 NULL
, /* class_data */
58 (GInstanceInitFunc
) vg_tool_prefs_init
,
61 type
= g_type_register_static (GTK_TYPE_VBOX
, "VgToolPrefs", &info
, 0);
68 vg_tool_prefs_class_init (VgToolPrefsClass
*klass
)
70 GObjectClass
*object_class
= G_OBJECT_CLASS (klass
);
71 GtkObjectClass
*gtk_object_class
= GTK_OBJECT_CLASS (klass
);
73 parent_class
= g_type_class_ref (GTK_TYPE_VBOX
);
75 object_class
->finalize
= vg_tool_prefs_finalize
;
76 gtk_object_class
->destroy
= vg_tool_prefs_destroy
;
79 klass
->apply
= tool_prefs_apply
;
80 klass
->get_argv
= tool_prefs_get_argv
;
84 vg_tool_prefs_init (VgToolPrefs
*prefs
)
90 vg_tool_prefs_finalize (GObject
*obj
)
92 G_OBJECT_CLASS (parent_class
)->finalize (obj
);
96 vg_tool_prefs_destroy (GtkObject
*obj
)
98 GTK_OBJECT_CLASS (parent_class
)->destroy (obj
);
103 tool_prefs_apply (VgToolPrefs
*prefs
)
110 vg_tool_prefs_apply (VgToolPrefs
*prefs
)
112 g_return_if_fail (VG_IS_TOOL_PREFS (prefs
));
114 VG_TOOL_PREFS_GET_CLASS (prefs
)->apply (prefs
);
119 tool_prefs_get_argv (VgToolPrefs
*prefs
, const char *tool
, GPtrArray
*argv
)
126 vg_tool_prefs_get_argv (VgToolPrefs
*prefs
, const char *tool
, GPtrArray
*argv
)
128 g_return_if_fail (VG_IS_TOOL_PREFS (prefs
));
129 g_return_if_fail (argv
!= NULL
);
131 VG_TOOL_PREFS_GET_CLASS (prefs
)->get_argv (prefs
, tool
, argv
);