Line |
Branch |
Exec |
Source |
1 |
|
|
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 |
|
|
/* cc-list-row.c |
3 |
|
|
* |
4 |
|
|
* Copyright 2020 Red Hat Inc. |
5 |
|
|
* |
6 |
|
|
* This program is free software: you can redistribute it and/or modify |
7 |
|
|
* it under the terms of the GNU General Public License as published by |
8 |
|
|
* the Free Software Foundation, either version 3 of the License, or |
9 |
|
|
* (at your option) any later version. |
10 |
|
|
* |
11 |
|
|
* This program is distributed in the hope that it will be useful, |
12 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
|
|
* GNU General Public License for more details. |
15 |
|
|
* |
16 |
|
|
* You should have received a copy of the GNU General Public License |
17 |
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 |
|
|
* |
19 |
|
|
* Author(s): |
20 |
|
|
* Bastien Nocera <hadess@hadess.net> |
21 |
|
|
* |
22 |
|
|
* SPDX-License-Identifier: GPL-3.0-or-later |
23 |
|
|
*/ |
24 |
|
|
|
25 |
|
|
#undef G_LOG_DOMAIN |
26 |
|
|
#define G_LOG_DOMAIN "cc-power-profile-info-row" |
27 |
|
|
|
28 |
|
|
#include <config.h> |
29 |
|
|
|
30 |
|
|
#include <glib/gi18n.h> |
31 |
|
|
#include "cc-power-profile-info-row.h" |
32 |
|
|
|
33 |
|
|
struct _CcPowerProfileInfoRow |
34 |
|
|
{ |
35 |
|
|
AdwActionRow parent_instance; |
36 |
|
|
}; |
37 |
|
|
|
38 |
|
✗ |
G_DEFINE_TYPE (CcPowerProfileInfoRow, cc_power_profile_info_row, ADW_TYPE_ACTION_ROW) |
39 |
|
|
|
40 |
|
|
static void |
41 |
|
✗ |
cc_power_profile_info_row_class_init (CcPowerProfileInfoRowClass *klass) |
42 |
|
|
{ |
43 |
|
✗ |
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); |
44 |
|
|
|
45 |
|
✗ |
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/power/cc-power-profile-info-row.ui"); |
46 |
|
✗ |
} |
47 |
|
|
|
48 |
|
|
static void |
49 |
|
✗ |
cc_power_profile_info_row_init (CcPowerProfileInfoRow *self) |
50 |
|
|
{ |
51 |
|
✗ |
gtk_widget_init_template (GTK_WIDGET (self)); |
52 |
|
✗ |
} |
53 |
|
|
|
54 |
|
|
CcPowerProfileInfoRow * |
55 |
|
✗ |
cc_power_profile_info_row_new (const char *text) |
56 |
|
|
{ |
57 |
|
|
CcPowerProfileInfoRow *self; |
58 |
|
|
|
59 |
|
✗ |
self = g_object_new (CC_TYPE_POWER_PROFILE_INFO_ROW, NULL); |
60 |
|
✗ |
adw_preferences_row_set_title (ADW_PREFERENCES_ROW (self), text); |
61 |
|
|
|
62 |
|
✗ |
return self; |
63 |
|
|
} |
64 |
|
|
|