Updated Spanish translation
[anjuta-git-plugin.git] / plugins / valgrind / vgtoolprefs.c
blob41c1ab8b6cf5cb11340886c82ce024e29ea9ac6c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
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.
24 #ifdef HAVE_CONFIG_H
25 #include <config.h>
26 #endif
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;
43 GType
44 vg_tool_prefs_get_type (void)
46 static GType type = 0;
48 if (!type) {
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 */
56 sizeof (VgToolPrefs),
57 0, /* n_preallocs */
58 (GInstanceInitFunc) vg_tool_prefs_init,
61 type = g_type_register_static (GTK_TYPE_VBOX, "VgToolPrefs", &info, 0);
64 return type;
67 static void
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;
78 /* virtual methods */
79 klass->apply = tool_prefs_apply;
80 klass->get_argv = tool_prefs_get_argv;
83 static void
84 vg_tool_prefs_init (VgToolPrefs *prefs)
89 static void
90 vg_tool_prefs_finalize (GObject *obj)
92 G_OBJECT_CLASS (parent_class)->finalize (obj);
95 static void
96 vg_tool_prefs_destroy (GtkObject *obj)
98 GTK_OBJECT_CLASS (parent_class)->destroy (obj);
102 static void
103 tool_prefs_apply (VgToolPrefs *prefs)
109 void
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);
118 static void
119 tool_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv)
125 void
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);