blob: c0dde744bc162b5710f234292973bbb30bbe059b (
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
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 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 "libnm/nm-default-client.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;
}
|