blob: 93a8771a414eac8c1ec09ce403fb6629222127ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2013 Red Hat, Inc.
*/
/**
* SECTION:nmt-newt-separator
* @short_description: Separator
*
* #NmtNewtSeparator is just a blank label, which is used in a few places
* where a widget is needed but none is desired, or to add blank space
* between widgets in containers that don't implement padding.
*/
#include "nm-default.h"
#include "nmt-newt-separator.h"
G_DEFINE_TYPE (NmtNewtSeparator, nmt_newt_separator, NMT_TYPE_NEWT_COMPONENT)
/**
* nmt_newt_separator_new:
*
* Creates a new #NmtNewtSeparator.
*
* Returns: a new #NmtNewtSeparator
*/
NmtNewtWidget *
nmt_newt_separator_new (void)
{
return g_object_new (NMT_TYPE_NEWT_SEPARATOR, NULL);
}
static void
nmt_newt_separator_init (NmtNewtSeparator *separator)
{
}
static newtComponent
nmt_newt_separator_build_component (NmtNewtComponent *component,
gboolean sensitive)
{
return newtLabel (-1, -1, " ");
}
static void
nmt_newt_separator_class_init (NmtNewtSeparatorClass *separator_class)
{
NmtNewtComponentClass *component_class = NMT_NEWT_COMPONENT_CLASS (separator_class);
/* virtual methods */
component_class->build_component = nmt_newt_separator_build_component;
}
|