forked from linuxmint/nemo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnemo-places-tree-view.c
97 lines (78 loc) · 4.25 KB
/
nemo-places-tree-view.c
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
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, write to the
Free Software Foundation, Inc., 51 Franklin Street - Suite 500,
Boston, MA 02110-1335, USA.
*/
#include "nemo-places-tree-view.h"
G_DEFINE_TYPE (NemoPlacesTreeView, nemo_places_tree_view,
GTK_TYPE_TREE_VIEW);
static void nemo_places_tree_view_finalize (GObject *gobject);
static gpointer parent_class;
static void
nemo_places_tree_view_init (NemoPlacesTreeView *tree_view)
{
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (tree_view)), "places-treeview");
}
static void
nemo_places_tree_view_class_init (NemoPlacesTreeViewClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS(klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = nemo_places_tree_view_finalize;
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boxed ("disk-full-bg-color",
"Unselected disk indicator background color",
"Unselected disk indicator background color",
GDK_TYPE_COLOR,
G_PARAM_READABLE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boxed ("disk-full-fg-color",
"Unselected disk indicator foreground color",
"Unselected disk indicator foreground color",
GDK_TYPE_COLOR,
G_PARAM_READABLE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("disk-full-bar-width",
"Disk indicator bar width",
"Disk indicator bar width",
0, G_MAXINT, 2,
G_PARAM_READABLE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("disk-full-bar-radius",
"Disk indicator bar radius (usually half the width)",
"Disk indicator bar radius (usually half the width)",
0, G_MAXINT, 1,
G_PARAM_READABLE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("disk-full-bottom-padding",
"Extra padding under the disk indicator",
"Extra padding under the disk indicator",
0, G_MAXINT, 1,
G_PARAM_READABLE));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("disk-full-max-length",
"Maximum length of the disk indicator",
"Maximum length of the disk indicator",
0, G_MAXINT, 70,
G_PARAM_READABLE));
}
GtkWidget *
nemo_places_tree_view_new (void)
{
return g_object_new (NEMO_TYPE_PLACES_TREE_VIEW, NULL);
}
static void
nemo_places_tree_view_finalize (GObject *object)
{
G_OBJECT_CLASS (parent_class)->finalize (object);
}