From a0090a06021b5fbae1ec94b48978114abc247175 Mon Sep 17 00:00:00 2001 From: lenemter Date: Sat, 10 Jun 2023 15:19:17 +0900 Subject: [PATCH 1/6] Replace grids with boxes --- data/EntryPopover.css | 4 +- meson.build | 2 +- src/MainWindow.vala | 40 ++++++++-------- src/Widgets/EditableLabel.vala | 15 +++--- src/Widgets/EntryPopover/DateTime.vala | 16 +++---- src/Widgets/EntryPopover/Generic.vala | 2 +- src/Widgets/EntryPopover/Location.vala | 18 ++++---- src/Widgets/ListSettingsPopover.vala | 46 ++++++++++--------- src/Widgets/ScheduledRow.vala | 9 ++-- ...istGrid.vala => ScheduledTaskListBox.vala} | 16 +++---- src/Widgets/SourceRow.vala | 11 ++--- src/Widgets/TaskRow.vala | 29 ++++++------ 12 files changed, 104 insertions(+), 104 deletions(-) rename src/Widgets/{ScheduledTaskListGrid.vala => ScheduledTaskListBox.vala} (97%) diff --git a/data/EntryPopover.css b/data/EntryPopover.css index 4c024df936..489b6e8a4e 100644 --- a/data/EntryPopover.css +++ b/data/EntryPopover.css @@ -18,7 +18,7 @@ * */ -entry-popover grid { +entry-popover box { border-radius: 3px; background: @SILVER_300; } @@ -29,7 +29,7 @@ entry-popover button { font-weight: 600; } -entry-popover.error grid { +entry-popover.error box { background: alpha (@error_color, 0.2); } diff --git a/meson.build b/meson.build index 22aafc0643..e6197e170d 100644 --- a/meson.build +++ b/meson.build @@ -72,7 +72,7 @@ executable( 'src/Widgets/EntryPopover/Location.vala', 'src/Widgets/ScheduledRow.vala', 'src/Widgets/SourceRow.vala', - 'src/Widgets/ScheduledTaskListGrid.vala', + 'src/Widgets/ScheduledTaskListBox.vala', 'src/Widgets/TaskListGrid.vala', 'src/Widgets/TaskRow.vala', 'src/Widgets/ListSettingsPopover.vala', diff --git a/src/MainWindow.vala b/src/MainWindow.vala index c220c7a1cc..332eec5a08 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -108,18 +108,17 @@ public class Tasks.MainWindow : Hdy.ApplicationWindow { text = _("Online Accounts Settings…") }; - var add_tasklist_grid = new Gtk.Grid () { + var add_tasklist_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 3) { margin_top = 3, - margin_bottom = 3, - row_spacing = 3 + margin_bottom = 3 }; - add_tasklist_grid.attach (add_tasklist_buttonbox, 0, 0); - add_tasklist_grid.attach (new Gtk.Separator (Gtk.Orientation.HORIZONTAL), 0, 1); - add_tasklist_grid.attach (online_accounts_button, 0, 2); - add_tasklist_grid.show_all (); + add_tasklist_box.add (add_tasklist_buttonbox); + add_tasklist_box.add (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); + add_tasklist_box.add (online_accounts_button); + add_tasklist_box.show_all (); var add_tasklist_popover = new Gtk.Popover (null); - add_tasklist_popover.add (add_tasklist_grid); + add_tasklist_popover.add (add_tasklist_box); var add_tasklist_button = new Gtk.MenuButton () { label = _("Add Task List…"), @@ -134,24 +133,23 @@ public class Tasks.MainWindow : Hdy.ApplicationWindow { unowned Gtk.StyleContext actionbar_style_context = actionbar.get_style_context (); actionbar_style_context.add_class (Gtk.STYLE_CLASS_FLAT); - var sidebar = new Gtk.Grid (); - sidebar.attach (sidebar_header, 0, 0); - sidebar.attach (scrolledwindow, 0, 1); - sidebar.attach (actionbar, 0, 2); + var sidebar = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); + sidebar.get_style_context ().add_class (Gtk.STYLE_CLASS_SIDEBAR); + sidebar.add (sidebar_header); + sidebar.add (scrolledwindow); + sidebar.add (actionbar); - unowned Gtk.StyleContext sidebar_style_context = sidebar.get_style_context (); - sidebar_style_context.add_class (Gtk.STYLE_CLASS_SIDEBAR); task_list_grid_stack = new Gtk.Stack (); - var main_grid = new Gtk.Grid (); - main_grid.get_style_context ().add_class (Gtk.STYLE_CLASS_BACKGROUND); - main_grid.attach (main_header, 0, 0); - main_grid.attach (task_list_grid_stack, 0, 1); + var main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); + main_box.get_style_context ().add_class (Gtk.STYLE_CLASS_BACKGROUND); + main_box.add (main_header); + main_box.add (task_list_grid_stack); var paned = new Gtk.Paned (Gtk.Orientation.HORIZONTAL); paned.pack1 (sidebar, false, false); - paned.pack2 (main_grid, true, false); + paned.pack2 (main_box, true, false); add (paned); @@ -207,9 +205,9 @@ public class Tasks.MainWindow : Hdy.ApplicationWindow { ((SimpleAction) lookup_action (ACTION_DELETE_SELECTED_LIST)).set_enabled (Tasks.Application.model.is_remove_task_list_supported (source)); } else if (row is Tasks.Widgets.ScheduledRow) { - var scheduled_task_list_grid = (Tasks.Widgets.ScheduledTaskListGrid) task_list_grid_stack.get_child_by_name (SCHEDULED_LIST_UID); + var scheduled_task_list_grid = (Tasks.Widgets.ScheduledTaskListBox) task_list_grid_stack.get_child_by_name (SCHEDULED_LIST_UID); if (scheduled_task_list_grid == null) { - scheduled_task_list_grid = new Tasks.Widgets.ScheduledTaskListGrid (Tasks.Application.model); + scheduled_task_list_grid = new Tasks.Widgets.ScheduledTaskListBox (Tasks.Application.model); task_list_grid_stack.add_named (scheduled_task_list_grid, SCHEDULED_LIST_UID); } diff --git a/src/Widgets/EditableLabel.vala b/src/Widgets/EditableLabel.vala index c3eea22939..a87868e0cb 100644 --- a/src/Widgets/EditableLabel.vala +++ b/src/Widgets/EditableLabel.vala @@ -27,7 +27,7 @@ public class Tasks.Widgets.EditableLabel : Gtk.EventBox { private Gtk.Label title; private Gtk.Entry entry; private Gtk.Stack stack; - private Gtk.Grid grid; + private Gtk.Box box; public string text { get; set; } @@ -44,7 +44,7 @@ public class Tasks.Widgets.EditableLabel : Gtk.EventBox { changed (); } - stack.set_visible_child (grid); + stack.set_visible_child (box); } } } @@ -81,12 +81,11 @@ public class Tasks.Widgets.EditableLabel : Gtk.EventBox { }; button_revealer.add (edit_button); - grid = new Gtk.Grid () { - valign = Gtk.Align.CENTER, - column_spacing = 12 + box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12) { + valign = Gtk.Align.CENTER }; - grid.add (title); - grid.add (button_revealer); + box.add (title); + box.add (button_revealer); entry = new Gtk.Entry () { hexpand = true @@ -97,7 +96,7 @@ public class Tasks.Widgets.EditableLabel : Gtk.EventBox { hhomogeneous = false, transition_type = Gtk.StackTransitionType.CROSSFADE }; - stack.add (grid); + stack.add (box); stack.add (entry); add (stack); diff --git a/src/Widgets/EntryPopover/DateTime.vala b/src/Widgets/EntryPopover/DateTime.vala index 6b9a9012b5..ed516506ae 100644 --- a/src/Widgets/EntryPopover/DateTime.vala +++ b/src/Widgets/EntryPopover/DateTime.vala @@ -56,16 +56,16 @@ public class Tasks.Widgets.EntryPopover.DateTime : Generic { text = _("Today") }; - var grid = new Gtk.Grid () { - margin_top= 3 + var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { + margin_top = 3 }; - grid.attach (today_button, 0, 0); - grid.attach (today_separator, 0, 1); - grid.attach (calendar, 0, 2); - grid.attach (timepicker_revealer, 0, 3); - grid.show_all (); + box.add (today_button); + box.add (today_separator); + box.add (calendar); + box.add (timepicker_revealer); + box.show_all (); - popover.add (grid); + popover.add (box); popover.show.connect (on_popover_show); diff --git a/src/Widgets/EntryPopover/Generic.vala b/src/Widgets/EntryPopover/Generic.vala index 06740be456..f3bbb85367 100644 --- a/src/Widgets/EntryPopover/Generic.vala +++ b/src/Widgets/EntryPopover/Generic.vala @@ -77,7 +77,7 @@ public abstract class Tasks.Widgets.EntryPopover.Generic : Gtk.EventBox { }; delete_button_revealer.add (delete_button); - var button_box = new Gtk.Grid (); + var button_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); button_box.add (popover_button); button_box.add (delete_button_revealer); button_box.get_style_context ().add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); diff --git a/src/Widgets/EntryPopover/Location.vala b/src/Widgets/EntryPopover/Location.vala index e24bed151f..bc2a2d210f 100644 --- a/src/Widgets/EntryPopover/Location.vala +++ b/src/Widgets/EntryPopover/Location.vala @@ -61,17 +61,19 @@ public class Tasks.Widgets.EntryPopover.Location : Generic { hexpand = true }; - var grid = new Gtk.Grid () { - margin = 12, - row_spacing = 12 + var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12) { + margin_top = 12, + margin_bottom = 12, + margin_start = 12, + margin_end = 12 }; - grid.attach (search_entry, 0, 0); - grid.attach (location_mode, 0, 1); - grid.attach (map_frame, 0, 2); - grid.show_all (); + box.add (search_entry); + box.add (location_mode); + box.add (map_frame); + box.show_all (); - popover.add (grid); + popover.add (box); popover.show.connect (on_popover_show); notify["value"].connect (on_value_changed); diff --git a/src/Widgets/ListSettingsPopover.vala b/src/Widgets/ListSettingsPopover.vala index 04ce2e39a4..3cbb66f624 100644 --- a/src/Widgets/ListSettingsPopover.vala +++ b/src/Widgets/ListSettingsPopover.vala @@ -96,20 +96,22 @@ public class Tasks.Widgets.ListSettingsPopover : Gtk.Popover { color_button_none = new Gtk.RadioButton.from_widget (color_button_blue); - var color_grid = new Gtk.Grid () { - column_spacing = 6, - margin = 12 + var color_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { + margin_top = 12, + margin_bottom = 12, + margin_start = 12, + margin_end = 12 }; - color_grid.add (color_button_blue); - color_grid.add (color_button_mint); - color_grid.add (color_button_green); - color_grid.add (color_button_yellow); - color_grid.add (color_button_orange); - color_grid.add (color_button_red); - color_grid.add (color_button_pink); - color_grid.add (color_button_purple); - color_grid.add (color_button_brown); - color_grid.add (color_button_slate); + color_box.add (color_button_blue); + color_box.add (color_button_mint); + color_box.add (color_button_green); + color_box.add (color_button_yellow); + color_box.add (color_button_orange); + color_box.add (color_button_red); + color_box.add (color_button_pink); + color_box.add (color_button_purple); + color_box.add (color_button_brown); + color_box.add (color_button_slate); var show_completed_button = new Granite.SwitchModelButton (_("Show Completed")) { margin_top = 3 @@ -126,17 +128,17 @@ public class Tasks.Widgets.ListSettingsPopover : Gtk.Popover { delete_list_menuitem.add (delete_list_accel_label); delete_list_menuitem.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); - var grid = new Gtk.Grid () { - orientation = Gtk.Orientation.VERTICAL, - margin_top = margin_bottom = 3 + var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { + margin_top = 3, + margin_bottom = 3 }; - grid.add (color_grid); - grid.add (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); - grid.add (show_completed_button); - grid.add (delete_list_menuitem); - grid.show_all (); + box.add (color_box); + box.add (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); + box.add (show_completed_button); + box.add (delete_list_menuitem); + box.show_all (); - add (grid); + add (box); color_button_red.toggled.connect (() => { if (color_button_red.active) { diff --git a/src/Widgets/ScheduledRow.vala b/src/Widgets/ScheduledRow.vala index 3c79403f48..3144e6dbbd 100644 --- a/src/Widgets/ScheduledRow.vala +++ b/src/Widgets/ScheduledRow.vala @@ -30,14 +30,13 @@ public class Tasks.Widgets.ScheduledRow : Gtk.ListBoxRow { margin_end = 9 }; - var grid = new Gtk.Grid () { - column_spacing = 6, + var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { margin_start = 12, margin_end = 6 }; - grid.add (icon); - grid.add (display_name_label); + box.add (icon); + box.add (display_name_label); - add (grid); + add (box); } } diff --git a/src/Widgets/ScheduledTaskListGrid.vala b/src/Widgets/ScheduledTaskListBox.vala similarity index 97% rename from src/Widgets/ScheduledTaskListGrid.vala rename to src/Widgets/ScheduledTaskListBox.vala index 053f1094f6..1fb70dd4d3 100644 --- a/src/Widgets/ScheduledTaskListGrid.vala +++ b/src/Widgets/ScheduledTaskListBox.vala @@ -18,7 +18,7 @@ * */ -public class Tasks.Widgets.ScheduledTaskListGrid : Gtk.Grid { +public class Tasks.Widgets.ScheduledTaskListBox : Gtk.Box { private Gee.Map views; private const string QUERY = "AND (NOT is-completed?) (has-start?)"; @@ -66,7 +66,7 @@ public class Tasks.Widgets.ScheduledTaskListGrid : Gtk.Grid { private Gtk.Label scheduled_title; private Gtk.ListBox task_list; - public ScheduledTaskListGrid (Tasks.TaskModel model) { + public ScheduledTaskListBox (Tasks.TaskModel model) { Object (model: model); } @@ -101,19 +101,19 @@ public class Tasks.Widgets.ScheduledTaskListGrid : Gtk.Grid { task_list.get_style_context ().add_class (Gtk.STYLE_CLASS_BACKGROUND); var scrolled_window = new Gtk.ScrolledWindow (null, null) { - expand = true, + hexpand = true, + vexpand = true, hscrollbar_policy = Gtk.PolicyType.NEVER }; scrolled_window.add (task_list); - column_spacing = 12; - attach (scheduled_title, 0, 0); - attach (scrolled_window, 0, 1); + orientation = Gtk.Orientation.VERTICAL; + add (scheduled_title); + add (scrolled_window); + show_all (); task_list.row_activated.connect (on_row_activated); - show_all (); - model.task_list_added.connect (add_task_list); model.task_list_modified.connect (modify_task_list); model.task_list_removed.connect (remove_task_list); diff --git a/src/Widgets/SourceRow.vala b/src/Widgets/SourceRow.vala index 889377db94..39506b0087 100644 --- a/src/Widgets/SourceRow.vala +++ b/src/Widgets/SourceRow.vala @@ -67,19 +67,18 @@ public class Tasks.Widgets.SourceRow : Gtk.ListBoxRow { status_stack.add_named (status_image, "image"); status_stack.add_named (spinner, "spinner"); - var grid = new Gtk.Grid () { - column_spacing = 6, + var box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { margin_start = 12, margin_end = 6 }; - grid.add (source_color); - grid.add (display_name_label); - grid.add (status_stack); + box.add (source_color); + box.add (display_name_label); + box.add (status_stack); revealer = new Gtk.Revealer () { reveal_child = true }; - revealer.add (grid); + revealer.add (box); add (revealer); get_style_context ().add_provider (listrow_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); diff --git a/src/Widgets/TaskRow.vala b/src/Widgets/TaskRow.vala index 5970a13d3b..144029a863 100644 --- a/src/Widgets/TaskRow.vala +++ b/src/Widgets/TaskRow.vala @@ -212,15 +212,15 @@ public class Tasks.Widgets.TaskRow : Gtk.ListBoxRow { }; description_label_revealer.add (description_label); - var task_grid = new Gtk.Grid (); - task_grid.add (due_datetime_popover_revealer); - task_grid.add (location_popover_revealer); - task_grid.add (description_label_revealer); + var task_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); + task_box.add (due_datetime_popover_revealer); + task_box.add (location_popover_revealer); + task_box.add (description_label_revealer); task_detail_revealer = new Gtk.Revealer () { transition_type = Gtk.RevealerTransitionType.SLIDE_UP }; - task_detail_revealer.add (task_grid); + task_detail_revealer.add (task_box); var description_textview = new Granite.HyperTextView () { border_width = 12, @@ -251,22 +251,23 @@ public class Tasks.Widgets.TaskRow : Gtk.ListBoxRow { button_box.add (cancel_button); button_box.add (save_button); - var form_grid = new Gtk.Grid () { - column_spacing = 12, - row_spacing = 12, - margin_top = margin_bottom = 6 + var form_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12) { + margin_top = 6, + margin_bottom = 6 }; - form_grid.attach (description_frame, 0, 0); - form_grid.attach (button_box, 0, 1); + form_box.add (description_frame); + form_box.add (button_box); task_form_revealer = new Gtk.Revealer () { transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN }; - task_form_revealer.add (form_grid); + task_form_revealer.add (form_box); var grid = new Gtk.Grid () { - margin = 6, - margin_start = margin_end = 12, + margin_top = 6, + margin_bottom = 6, + margin_start = 12, + margin_end = 12, column_spacing = 6, row_spacing = 3 }; From 134d2414433867c58e9d3a4bcfcea2fcb6a6022d Mon Sep 17 00:00:00 2001 From: lenemter Date: Sat, 10 Jun 2023 15:20:59 +0900 Subject: [PATCH 2/6] Don't use `margin` and `expand` --- src/MainWindow.vala | 3 ++- src/Widgets/EntryPopover/DateTime.vala | 14 +++++++++----- src/Widgets/TaskListGrid.vala | 3 ++- src/Widgets/TaskRow.vala | 3 ++- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 332eec5a08..05783ec353 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -95,7 +95,8 @@ public class Tasks.MainWindow : Hdy.ApplicationWindow { listbox.add (scheduled_row); var scrolledwindow = new Gtk.ScrolledWindow (null, null) { - expand = true, + hexpand = true, + vexpand = true, hscrollbar_policy = Gtk.PolicyType.NEVER }; scrolledwindow.add (listbox); diff --git a/src/Widgets/EntryPopover/DateTime.vala b/src/Widgets/EntryPopover/DateTime.vala index ed516506ae..e27ac1880d 100644 --- a/src/Widgets/EntryPopover/DateTime.vala +++ b/src/Widgets/EntryPopover/DateTime.vala @@ -31,18 +31,22 @@ public class Tasks.Widgets.EntryPopover.DateTime : Generic { construct { calendar = new Gtk.Calendar () { - margin = 6 + margin_top = 6, + margin_bottom = 6, + margin_start = 6, + margin_end = 6 }; calendar.get_style_context ().add_class (Gtk.STYLE_CLASS_BACKGROUND); timepicker = new Granite.Widgets.TimePicker () { - margin = 12, - margin_top = 0 + margin_top = 0, + margin_bottom = 12, + margin_start = 12, + margin_end = 12 }; timepicker_revealer = new Gtk.Revealer () { - reveal_child = true, - margin = 0 + reveal_child = true }; timepicker_revealer.add (timepicker); diff --git a/src/Widgets/TaskListGrid.vala b/src/Widgets/TaskListGrid.vala index 944a9d6d7d..62fb2c5ea9 100644 --- a/src/Widgets/TaskListGrid.vala +++ b/src/Widgets/TaskListGrid.vala @@ -109,7 +109,8 @@ public class Tasks.Widgets.TaskListGrid : Gtk.Grid { task_list.get_style_context ().add_class (Gtk.STYLE_CLASS_BACKGROUND); var scrolled_window = new Gtk.ScrolledWindow (null, null) { - expand = true, + hexpand = true, + vexpand = true, hscrollbar_policy = Gtk.PolicyType.NEVER }; scrolled_window.add (task_list); diff --git a/src/Widgets/TaskRow.vala b/src/Widgets/TaskRow.vala index 144029a863..5ad228f363 100644 --- a/src/Widgets/TaskRow.vala +++ b/src/Widgets/TaskRow.vala @@ -283,7 +283,8 @@ public class Tasks.Widgets.TaskRow : Gtk.ListBoxRow { revealer.add (grid); event_box = new Gtk.EventBox () { - expand = true, + hexpand = true, + vexpand = true, above_child = false }; event_box.add_events ( From a85508633569bf7269055a182647698cfdd03ed9 Mon Sep 17 00:00:00 2001 From: lenemter Date: Sat, 10 Jun 2023 15:29:21 +0900 Subject: [PATCH 3/6] Update copyrights --- data/EditableLabel.css | 21 +++------------------ src/Location.vala | 20 +++----------------- src/MainWindow.vala | 21 +++------------------ src/Widgets/EditableLabel.vala | 23 ++++------------------- src/Widgets/EntryPopover/DateTime.vala | 20 +++----------------- src/Widgets/EntryPopover/Generic.vala | 20 +++----------------- src/Widgets/ListSettingsPopover.vala | 21 +++------------------ src/Widgets/ScheduledRow.vala | 21 +++------------------ src/Widgets/ScheduledTaskListBox.vala | 21 +++------------------ src/Widgets/SourceRow.vala | 21 +++------------------ src/Widgets/TaskListGrid.vala | 21 +++------------------ src/Widgets/TaskRow.vala | 21 +++------------------ 12 files changed, 37 insertions(+), 214 deletions(-) diff --git a/data/EditableLabel.css b/data/EditableLabel.css index 94c2c429b3..5a50ac8902 100644 --- a/data/EditableLabel.css +++ b/data/EditableLabel.css @@ -1,22 +1,7 @@ /* -* Copyright 2019 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -* -*/ + * Copyright 2019-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ .editable-label entry { background: transparent; diff --git a/src/Location.vala b/src/Location.vala index d4ac13815a..ffbdf23f9b 100644 --- a/src/Location.vala +++ b/src/Location.vala @@ -1,21 +1,7 @@ /* -* Copyright 2020 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -*/ + * Copyright 2020-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ public struct Tasks.Location { string postal_address; diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 05783ec353..821a322f55 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -1,22 +1,7 @@ /* -* Copyright 2019 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -* -*/ + * Copyright 2019-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ public class Tasks.MainWindow : Hdy.ApplicationWindow { public const string ACTION_GROUP_PREFIX = "win"; diff --git a/src/Widgets/EditableLabel.vala b/src/Widgets/EditableLabel.vala index a87868e0cb..ba3538dc5f 100644 --- a/src/Widgets/EditableLabel.vala +++ b/src/Widgets/EditableLabel.vala @@ -1,23 +1,8 @@ /* -* Copyright (c) 2016 elementary LLC. (https://github.com/elementary/photos) -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; either -* version 2.1 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 -* -* Authored by: Corentin Noël -*/ + * Copyright 2016-2023 elementary, Inc. (https://elementary.io) + * Copyright 2016 Corentin Noël + * SPDX-License-Identifier: LGPL-2.1-or-later + */ public class Tasks.Widgets.EditableLabel : Gtk.EventBox { public signal void changed (); diff --git a/src/Widgets/EntryPopover/DateTime.vala b/src/Widgets/EntryPopover/DateTime.vala index e27ac1880d..e74fb968c7 100644 --- a/src/Widgets/EntryPopover/DateTime.vala +++ b/src/Widgets/EntryPopover/DateTime.vala @@ -1,21 +1,7 @@ /* -* Copyright 2021 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -*/ + * Copyright 2021-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ public class Tasks.Widgets.EntryPopover.DateTime : Generic { private Gtk.Calendar calendar; diff --git a/src/Widgets/EntryPopover/Generic.vala b/src/Widgets/EntryPopover/Generic.vala index f3bbb85367..492f97fcf8 100644 --- a/src/Widgets/EntryPopover/Generic.vala +++ b/src/Widgets/EntryPopover/Generic.vala @@ -1,21 +1,7 @@ /* -* Copyright 2021 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -*/ + * Copyright 2021-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ public abstract class Tasks.Widgets.EntryPopover.Generic : Gtk.EventBox { public signal string? value_format (T value); diff --git a/src/Widgets/ListSettingsPopover.vala b/src/Widgets/ListSettingsPopover.vala index 3cbb66f624..dc7fd4ee5f 100644 --- a/src/Widgets/ListSettingsPopover.vala +++ b/src/Widgets/ListSettingsPopover.vala @@ -1,22 +1,7 @@ /* -* Copyright 2019 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -* -*/ + * Copyright 2019-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ public class Tasks.Widgets.ListSettingsPopover : Gtk.Popover { public E.Source source { get; set; } diff --git a/src/Widgets/ScheduledRow.vala b/src/Widgets/ScheduledRow.vala index 3144e6dbbd..c4059c707a 100644 --- a/src/Widgets/ScheduledRow.vala +++ b/src/Widgets/ScheduledRow.vala @@ -1,22 +1,7 @@ /* -* Copyright 2019 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -* -*/ + * Copyright 2019-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ public class Tasks.Widgets.ScheduledRow : Gtk.ListBoxRow { diff --git a/src/Widgets/ScheduledTaskListBox.vala b/src/Widgets/ScheduledTaskListBox.vala index 1fb70dd4d3..d24ac8464f 100644 --- a/src/Widgets/ScheduledTaskListBox.vala +++ b/src/Widgets/ScheduledTaskListBox.vala @@ -1,22 +1,7 @@ /* -* Copyright 2019 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -* -*/ + * Copyright 2019-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ public class Tasks.Widgets.ScheduledTaskListBox : Gtk.Box { private Gee.Map views; diff --git a/src/Widgets/SourceRow.vala b/src/Widgets/SourceRow.vala index 39506b0087..d889d38237 100644 --- a/src/Widgets/SourceRow.vala +++ b/src/Widgets/SourceRow.vala @@ -1,22 +1,7 @@ /* -* Copyright 2019 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -* -*/ + * Copyright 2019-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ public class Tasks.Widgets.SourceRow : Gtk.ListBoxRow { public E.Source source { get; construct; } diff --git a/src/Widgets/TaskListGrid.vala b/src/Widgets/TaskListGrid.vala index 62fb2c5ea9..11ee20d5b3 100644 --- a/src/Widgets/TaskListGrid.vala +++ b/src/Widgets/TaskListGrid.vala @@ -1,22 +1,7 @@ /* -* Copyright 2019 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -* -*/ + * Copyright 2019-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ public class Tasks.Widgets.TaskListGrid : Gtk.Grid { public E.Source source { get; construct; } diff --git a/src/Widgets/TaskRow.vala b/src/Widgets/TaskRow.vala index 5ad228f363..0313e5eb4c 100644 --- a/src/Widgets/TaskRow.vala +++ b/src/Widgets/TaskRow.vala @@ -1,22 +1,7 @@ /* -* Copyright 2019 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -* -*/ + * Copyright 2019-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ public class Tasks.Widgets.TaskRow : Gtk.ListBoxRow { From 5da373e33335cbf5fa6518d7d657480fe0db311a Mon Sep 17 00:00:00 2001 From: lenemter Date: Sat, 10 Jun 2023 15:30:58 +0900 Subject: [PATCH 4/6] Fix copyrights --- data/EditableLabel.css | 21 ++++++++++++++++++--- data/EntryPopover.css | 21 +++------------------ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/data/EditableLabel.css b/data/EditableLabel.css index 5a50ac8902..94c2c429b3 100644 --- a/data/EditableLabel.css +++ b/data/EditableLabel.css @@ -1,7 +1,22 @@ /* - * Copyright 2019-2023 elementary, Inc. (https://elementary.io) - * SPDX-License-Identifier: GPL-3.0-or-later - */ +* Copyright 2019 elementary, Inc. (https://elementary.io) +* +* 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 3 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 +* +*/ .editable-label entry { background: transparent; diff --git a/data/EntryPopover.css b/data/EntryPopover.css index 489b6e8a4e..9341cde330 100644 --- a/data/EntryPopover.css +++ b/data/EntryPopover.css @@ -1,22 +1,7 @@ /* -* Copyright 2020 elementary, Inc. (https://elementary.io) -* -* 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 3 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 -* -*/ + * Copyright 2020-2023 elementary, Inc. (https://elementary.io) + * SPDX-License-Identifier: GPL-3.0-or-later + */ entry-popover box { border-radius: 3px; From 05ef2ff0372e67c5727011ff4b6f1652c626b755 Mon Sep 17 00:00:00 2001 From: lenemter Date: Sat, 10 Jun 2023 15:32:52 +0900 Subject: [PATCH 5/6] Revert changes to Location.vala --- src/Location.vala | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Location.vala b/src/Location.vala index ffbdf23f9b..f003873c14 100644 --- a/src/Location.vala +++ b/src/Location.vala @@ -1,6 +1,20 @@ /* - * Copyright 2020-2023 elementary, Inc. (https://elementary.io) - * SPDX-License-Identifier: GPL-3.0-or-later + * Copyright 2020 elementary, Inc. (https://elementary.io) + * + * 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 3 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 */ public struct Tasks.Location { From f1402ee4498f04c8a3d6b83b115349f4ff224d6c Mon Sep 17 00:00:00 2001 From: lenemter Date: Sat, 10 Jun 2023 15:33:43 +0900 Subject: [PATCH 6/6] Remove extra spaces --- src/Location.vala | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Location.vala b/src/Location.vala index f003873c14..d4ac13815a 100644 --- a/src/Location.vala +++ b/src/Location.vala @@ -1,21 +1,21 @@ /* - * Copyright 2020 elementary, Inc. (https://elementary.io) - * - * 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 3 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 - */ +* Copyright 2020 elementary, Inc. (https://elementary.io) +* +* 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 3 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 +*/ public struct Tasks.Location { string postal_address;