malcontent-control: Add widgets from gnome-control-center
Add `CcCarousel` and `CcAppPermissions` from gnome-control-center and rename the files. None of the contents of the files have been changed yet. The files are from git master of gnome-control-center on 2020-01-08. `carousel.{c,h,ui}` are licensed under GPLv2+, and are copyright 2016 Red Hat, Inc. The original author was Felipe Borges. `user-controls.{c,h,ui}` are licensed under GPLv3+, and are copyright 2018, 2019 Endless, Inc. `gs-content-rating.{c,h}` are originally from gnome-software, are licensed under GPLv2+, and are copyright 2015, 2016 Richard Hughes. He was also the original author. These files are needed by `user-controls.{c,h}`. `user-image.{c,h}` are licensed under GPLv2+ and are copyright 2015, Red Hat, Inc. The original author was Ondrej Holy. This code will not stay as copy-paste code for too long. The ultimate plan is to rework most of the widgets: • `CcCarousel`: Will be reworked to provide more information about the screen time usage of each user. It will become a summary widget as well as a selector. • `GsContentRating`: Will be abstracted out into libappstream-glib, or some other suitable library, where its implementation can be shared between gnome-software and malcontent. • `CcUserControls`: Will be reworked as the UI of malcontent evolves. Will also be removed from gnome-control-center once malcontent-control is released. • `CcUserImage`: As per `CcCarousel`, this will evolve into a new widget. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
b0f72c432f
commit
aa6ece8a91
11 changed files with 3323 additions and 0 deletions
32
malcontent-control/user-image.h
Normal file
32
malcontent-control/user-image.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* (C) Copyright 2015 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <act/act.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CC_TYPE_USER_IMAGE (cc_user_image_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (CcUserImage, cc_user_image, CC, USER_IMAGE, GtkImage)
|
||||
|
||||
GtkWidget *cc_user_image_new (void);
|
||||
void cc_user_image_set_user (CcUserImage *image, ActUser *user);
|
||||
|
||||
G_END_DECLS
|
Loading…
Add table
Add a link
Reference in a new issue