From b84370efe8a5948770cd0b2a515d2f2b06d014cc Mon Sep 17 00:00:00 2001 From: Bob Ham Date: Wed, 3 Jul 2019 15:06:08 +0100 Subject: [PATCH] src: Remove extraneous classes, Calls{History,NewCall}HeaderBar And add missing HDY type ensures. --- src/calls-application.c | 8 +++--- src/calls-history-header-bar.c | 49 --------------------------------- src/calls-history-header-bar.h | 38 ------------------------- src/calls-new-call-header-bar.c | 49 --------------------------------- src/calls-new-call-header-bar.h | 38 ------------------------- src/meson.build | 2 -- 6 files changed, 4 insertions(+), 180 deletions(-) delete mode 100644 src/calls-history-header-bar.c delete mode 100644 src/calls-history-header-bar.h delete mode 100644 src/calls-new-call-header-bar.c delete mode 100644 src/calls-new-call-header-bar.h diff --git a/src/calls-application.c b/src/calls-application.c index d1c6f62..79b8531 100644 --- a/src/calls-application.c +++ b/src/calls-application.c @@ -26,8 +26,6 @@ */ #include "config.h" -#include "calls-new-call-header-bar.h" -#include "calls-history-header-bar.h" #include "calls-history-box.h" #include "calls-new-call-box.h" #include "calls-encryption-indicator.h" @@ -313,10 +311,12 @@ calls_application_class_init (CallsApplicationClass *klass) g_type_ensure (CALLS_TYPE_ENCRYPTION_INDICATOR); g_type_ensure (CALLS_TYPE_HISTORY_BOX); - g_type_ensure (CALLS_TYPE_HISTORY_HEADER_BAR); g_type_ensure (CALLS_TYPE_NEW_CALL_BOX); - g_type_ensure (CALLS_TYPE_NEW_CALL_HEADER_BAR); g_type_ensure (HDY_TYPE_DIALER); + g_type_ensure (HDY_TYPE_HEADER_BAR); + g_type_ensure (HDY_TYPE_SQUEEZER); + g_type_ensure (HDY_TYPE_VIEW_SWITCHER); + g_type_ensure (HDY_TYPE_VIEW_SWITCHER_BAR); } diff --git a/src/calls-history-header-bar.c b/src/calls-history-header-bar.c deleted file mode 100644 index 86cc6a4..0000000 --- a/src/calls-history-header-bar.c +++ /dev/null @@ -1,49 +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 . - * - * Author: Adrien Plazas - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -#include "calls-history-header-bar.h" - -struct _CallsHistoryHeaderBar -{ - GtkHeaderBar parent_instance; -}; - -G_DEFINE_TYPE (CallsHistoryHeaderBar, calls_history_header_bar, GTK_TYPE_HEADER_BAR); - - -static void -calls_history_header_bar_init (CallsHistoryHeaderBar *self) -{ - gtk_widget_init_template (GTK_WIDGET (self)); -} - - -static void -calls_history_header_bar_class_init (CallsHistoryHeaderBarClass *klass) -{ - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - - gtk_widget_class_set_template_from_resource (widget_class, "/sm/puri/calls/ui/history-header-bar.ui"); -} - diff --git a/src/calls-history-header-bar.h b/src/calls-history-header-bar.h deleted file mode 100644 index b7958af..0000000 --- a/src/calls-history-header-bar.h +++ /dev/null @@ -1,38 +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 . - * - * Author: Adrien Plazas - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -#ifndef CALLS_HISTORY_HEADER_BAR_H__ -#define CALLS_HISTORY_HEADER_BAR_H__ - -#include - -G_BEGIN_DECLS - -#define CALLS_TYPE_HISTORY_HEADER_BAR (calls_history_header_bar_get_type ()) - -G_DECLARE_FINAL_TYPE (CallsHistoryHeaderBar, calls_history_header_bar, CALLS, HISTORY_HEADER_BAR, GtkHeaderBar); - -G_END_DECLS - -#endif /* CALLS_HISTORY_HEADER_BAR_H__ */ diff --git a/src/calls-new-call-header-bar.c b/src/calls-new-call-header-bar.c deleted file mode 100644 index cbdca6e..0000000 --- a/src/calls-new-call-header-bar.c +++ /dev/null @@ -1,49 +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 . - * - * Author: Adrien Plazas - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -#include "calls-new-call-header-bar.h" - -struct _CallsNewCallHeaderBar -{ - GtkHeaderBar parent_instance; -}; - -G_DEFINE_TYPE (CallsNewCallHeaderBar, calls_new_call_header_bar, GTK_TYPE_HEADER_BAR); - - -static void -calls_new_call_header_bar_init (CallsNewCallHeaderBar *self) -{ - gtk_widget_init_template (GTK_WIDGET (self)); -} - - -static void -calls_new_call_header_bar_class_init (CallsNewCallHeaderBarClass *klass) -{ - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - - gtk_widget_class_set_template_from_resource (widget_class, "/sm/puri/calls/ui/new-call-header-bar.ui"); -} - diff --git a/src/calls-new-call-header-bar.h b/src/calls-new-call-header-bar.h deleted file mode 100644 index 7eae143..0000000 --- a/src/calls-new-call-header-bar.h +++ /dev/null @@ -1,38 +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 . - * - * Author: Adrien Plazas - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -#ifndef CALLS_NEW_CALL_HEADER_BAR_H__ -#define CALLS_NEW_CALL_HEADER_BAR_H__ - -#include - -G_BEGIN_DECLS - -#define CALLS_TYPE_NEW_CALL_HEADER_BAR (calls_new_call_header_bar_get_type ()) - -G_DECLARE_FINAL_TYPE (CallsNewCallHeaderBar, calls_new_call_header_bar, CALLS, NEW_CALL_HEADER_BAR, GtkHeaderBar); - -G_END_DECLS - -#endif /* CALLS_NEW_CALL_HEADER_BAR_H__ */ diff --git a/src/meson.build b/src/meson.build index 86880ce..6d93862 100644 --- a/src/meson.build +++ b/src/meson.build @@ -46,9 +46,7 @@ calls_sources = files(['calls-message-source.c', 'calls-message-source.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-history-header-bar.c', 'calls-history-header-bar.h', 'calls-new-call-box.c', 'calls-new-call-box.h', - 'calls-new-call-header-bar.c', 'calls-new-call-header-bar.h', 'calls-main-window.c', 'calls-main-window.h', 'calls-ringer.c', 'calls-ringer.h', 'calls-application.c', 'calls-application.h',