mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-04 20:07:36 +00:00
Remove encryption indicator
Not used anymore since we switched to libcall-ui. Should've been removed as a part of !425.
This commit is contained in:
parent
3aba0bf34d
commit
dc96d892f5
7 changed files with 0 additions and 241 deletions
|
@ -11,7 +11,6 @@ src/calls-call-window.c
|
|||
src/calls-contacts-box.c
|
||||
src/calls-contacts-provider.c
|
||||
src/calls-contacts-row.c
|
||||
src/calls-encryption-indicator.c
|
||||
src/calls-history-box.c
|
||||
src/calls-in-app-notification.c
|
||||
src/calls-main-window.c
|
||||
|
@ -29,7 +28,6 @@ src/ui/call-record-row.ui
|
|||
src/ui/call-selector-item.ui
|
||||
src/ui/call-window.ui
|
||||
src/ui/contacts-box.ui
|
||||
src/ui/encryption-indicator.ui
|
||||
src/ui/history-box.ui
|
||||
src/ui/history-header-bar.ui
|
||||
src/ui/in-app-notification.ui
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "calls-dbus-manager.h"
|
||||
#include "calls-history-box.h"
|
||||
#include "calls-new-call-box.h"
|
||||
#include "calls-encryption-indicator.h"
|
||||
#include "calls-ringer.h"
|
||||
#include "calls-notifier.h"
|
||||
#include "calls-record-store.h"
|
||||
|
@ -652,7 +651,6 @@ calls_application_class_init (CallsApplicationClass *klass)
|
|||
application_class->dbus_register = calls_application_dbus_register;
|
||||
application_class->dbus_unregister = calls_application_dbus_unregister;
|
||||
|
||||
g_type_ensure (CALLS_TYPE_ENCRYPTION_INDICATOR);
|
||||
g_type_ensure (CALLS_TYPE_HISTORY_BOX);
|
||||
g_type_ensure (CALLS_TYPE_NEW_CALL_BOX);
|
||||
}
|
||||
|
|
|
@ -1,138 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2018 Purism SPC
|
||||
*
|
||||
* This file is part of Calls.
|
||||
*
|
||||
* Calls 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calls 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 Calls. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Adrien Plazas <adrien.plazas@puri.sm>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
|
||||
#include "calls-encryption-indicator.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
struct _CallsEncryptionIndicator
|
||||
{
|
||||
GtkStack parent_instance;
|
||||
|
||||
GtkBox *is_not_encrypted;
|
||||
GtkBox *is_encrypted;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (CallsEncryptionIndicator, calls_encryption_indicator, GTK_TYPE_STACK);
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_ENCRYPTED,
|
||||
PROP_LAST_PROP,
|
||||
};
|
||||
static GParamSpec *props[PROP_LAST_PROP];
|
||||
|
||||
|
||||
void
|
||||
calls_encryption_indicator_set_encrypted (CallsEncryptionIndicator *self,
|
||||
gboolean encrypted)
|
||||
{
|
||||
g_return_if_fail (CALLS_IS_ENCRYPTION_INDICATOR (self));
|
||||
|
||||
encrypted = !!encrypted;
|
||||
|
||||
gtk_stack_set_visible_child (
|
||||
GTK_STACK (self),
|
||||
GTK_WIDGET (encrypted ? self->is_encrypted : self->is_not_encrypted));
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
calls_encryption_indicator_get_encrypted (CallsEncryptionIndicator *self)
|
||||
{
|
||||
g_return_val_if_fail (CALLS_IS_ENCRYPTION_INDICATOR (self), FALSE);
|
||||
|
||||
return gtk_stack_get_visible_child (GTK_STACK (self)) == GTK_WIDGET (self->is_encrypted);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
calls_encryption_indicator_init (CallsEncryptionIndicator *self)
|
||||
{
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
CallsEncryptionIndicator *self = CALLS_ENCRYPTION_INDICATOR (object);
|
||||
|
||||
switch (property_id) {
|
||||
case PROP_ENCRYPTED:
|
||||
calls_encryption_indicator_set_encrypted (self, g_value_get_boolean (value));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
CallsEncryptionIndicator *self = CALLS_ENCRYPTION_INDICATOR (object);
|
||||
|
||||
switch (property_id) {
|
||||
case PROP_ENCRYPTED:
|
||||
g_value_set_boolean (value, calls_encryption_indicator_get_encrypted (self));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
calls_encryption_indicator_class_init (CallsEncryptionIndicatorClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
|
||||
object_class->set_property = set_property;
|
||||
object_class->get_property = get_property;
|
||||
|
||||
props[PROP_ENCRYPTED] =
|
||||
g_param_spec_boolean ("encrypted",
|
||||
"Encrypted",
|
||||
"The party participating in the call",
|
||||
FALSE,
|
||||
G_PARAM_READWRITE);
|
||||
|
||||
g_object_class_install_properties (object_class, PROP_LAST_PROP, props);
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Calls/ui/encryption-indicator.ui");
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsEncryptionIndicator, is_not_encrypted);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsEncryptionIndicator, is_encrypted);
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2018 Purism SPC
|
||||
*
|
||||
* This file is part of Calls.
|
||||
*
|
||||
* Calls 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Calls 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 Calls. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Adrien Plazas <adrien.plazas@puri.sm>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CALLS_ENCRYPTION_INDICATOR_H__
|
||||
#define CALLS_ENCRYPTION_INDICATOR_H__
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CALLS_TYPE_ENCRYPTION_INDICATOR (calls_encryption_indicator_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (CallsEncryptionIndicator, calls_encryption_indicator, CALLS, ENCRYPTION_INDICATOR, GtkStack);
|
||||
|
||||
|
||||
void calls_encryption_indicator_set_encrypted (CallsEncryptionIndicator *self,
|
||||
gboolean encrypted);
|
||||
gboolean calls_encryption_indicator_get_encrypted (CallsEncryptionIndicator *self);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* CALLS_ENCRYPTION_INDICATOR_H__ */
|
||||
|
|
@ -4,7 +4,6 @@
|
|||
<file preprocess="xml-stripblanks">main-window.ui</file>
|
||||
<file preprocess="xml-stripblanks">call-selector-item.ui</file>
|
||||
<file preprocess="xml-stripblanks">call-window.ui</file>
|
||||
<file preprocess="xml-stripblanks">encryption-indicator.ui</file>
|
||||
<file preprocess="xml-stripblanks">history-box.ui</file>
|
||||
<file preprocess="xml-stripblanks">history-header-bar.ui</file>
|
||||
<file preprocess="xml-stripblanks">new-call-box.ui</file>
|
||||
|
|
|
@ -90,7 +90,6 @@ calls_sources = files(['calls-message-source.c', 'calls-message-source.h',
|
|||
'calls-provider.c', 'calls-provider.h',
|
||||
'calls-call-selector-item.c', 'calls-call-selector-item.h',
|
||||
'calls-call-window.c', 'calls-call-window.h',
|
||||
'calls-encryption-indicator.c', 'calls-encryption-indicator.h',
|
||||
'calls-history-box.c', 'calls-history-box.h',
|
||||
'calls-new-call-box.c', 'calls-new-call-box.h',
|
||||
'calls-main-window.c', 'calls-main-window.h',
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<template class="CallsEncryptionIndicator" parent="GtkStack">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="is_not_encrypted">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">changes-allow-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">This call is not encrypted</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="is_encrypted">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">changes-prevent-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">This call is encrypted</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
Loading…
Reference in a new issue