Initial Packaging
This commit is contained in:
parent
04b0c98b9e
commit
84e0bb3bb6
@ -0,0 +1,86 @@
|
|||||||
|
From 41f0321b2ee83e1bd670177e5960c4d5dcbb281f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Anders Kaseorg <andersk@mit.edu>
|
||||||
|
Date: Mon, 28 Mar 2022 23:16:26 -0700
|
||||||
|
Subject: [PATCH] Enable Ctrl+PgUp/PgDn to switch tabs if there are multiple
|
||||||
|
tabs
|
||||||
|
|
||||||
|
Users expect Ctrl+PgUp/PgDn to switch tabs, but some terminal
|
||||||
|
applications want to be able to use these keys themselves. Make the
|
||||||
|
same compromise that gnome-terminal does, and let these keys switch
|
||||||
|
tabs _if_ there are multiple tabs in the current window to switch
|
||||||
|
between.
|
||||||
|
|
||||||
|
Fixes https://gitlab.gnome.org/GNOME/console/-/issues/118.
|
||||||
|
|
||||||
|
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
|
||||||
|
---
|
||||||
|
src/kgx-pages.c | 19 +++++++++++++++++++
|
||||||
|
src/kgx-pages.h | 1 +
|
||||||
|
src/kgx-window.c | 9 +++++----
|
||||||
|
3 files changed, 25 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/kgx-pages.c b/src/kgx-pages.c
|
||||||
|
index 0b7c37a..4084efd 100644
|
||||||
|
--- a/src/kgx-pages.c
|
||||||
|
+++ b/src/kgx-pages.c
|
||||||
|
@@ -819,6 +819,25 @@ kgx_pages_current_status (KgxPages *self)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+/**
|
||||||
|
+ * kgx_pages_count:
|
||||||
|
+ * @self: the #KgxPages
|
||||||
|
+ *
|
||||||
|
+ * Returns: number of #KgxTab s in @self
|
||||||
|
+ */
|
||||||
|
+int
|
||||||
|
+kgx_pages_count (KgxPages *self)
|
||||||
|
+{
|
||||||
|
+ KgxPagesPrivate *priv;
|
||||||
|
+
|
||||||
|
+ g_return_val_if_fail (KGX_IS_PAGES (self), KGX_NONE);
|
||||||
|
+
|
||||||
|
+ priv = kgx_pages_get_instance_private (self);
|
||||||
|
+
|
||||||
|
+ return hdy_tab_view_get_n_pages (HDY_TAB_VIEW (priv->view));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* kgx_pages_get_children:
|
||||||
|
* @self: the #KgxPages
|
||||||
|
diff --git a/src/kgx-pages.h b/src/kgx-pages.h
|
||||||
|
index 9fbaae6..9a03c77 100644
|
||||||
|
--- a/src/kgx-pages.h
|
||||||
|
+++ b/src/kgx-pages.h
|
||||||
|
@@ -45,6 +45,7 @@ void kgx_pages_add_page (KgxPages *self,
|
||||||
|
KgxTab *page);
|
||||||
|
void kgx_pages_remove_page (KgxPages *self,
|
||||||
|
KgxTab *page);
|
||||||
|
+int kgx_pages_count (KgxPages *self);
|
||||||
|
GPtrArray *kgx_pages_get_children (KgxPages *self);
|
||||||
|
void kgx_pages_focus_page (KgxPages *self,
|
||||||
|
KgxTab *page);
|
||||||
|
diff --git a/src/kgx-window.c b/src/kgx-window.c
|
||||||
|
index acddf60..3bc1d0c 100644
|
||||||
|
--- a/src/kgx-window.c
|
||||||
|
+++ b/src/kgx-window.c
|
||||||
|
@@ -260,10 +260,11 @@ key_press_event (GtkWidget *widget,
|
||||||
|
*
|
||||||
|
* See https://gitlab.gnome.org/GNOME/libhandy/-/issues/422
|
||||||
|
*/
|
||||||
|
- if ((keyval == GDK_KEY_Page_Up ||
|
||||||
|
- keyval == GDK_KEY_KP_Page_Up ||
|
||||||
|
- keyval == GDK_KEY_Page_Down ||
|
||||||
|
- keyval == GDK_KEY_KP_Page_Down ||
|
||||||
|
+ if ((((keyval == GDK_KEY_Page_Up ||
|
||||||
|
+ keyval == GDK_KEY_KP_Page_Up ||
|
||||||
|
+ keyval == GDK_KEY_Page_Down ||
|
||||||
|
+ keyval == GDK_KEY_KP_Page_Down) &&
|
||||||
|
+ kgx_pages_count (KGX_PAGES (self->pages)) <= 1) ||
|
||||||
|
keyval == GDK_KEY_Home ||
|
||||||
|
keyval == GDK_KEY_KP_Home ||
|
||||||
|
keyval == GDK_KEY_End ||
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
||||||
BIN
gnome-console-42.beta.tar.xz
Normal file
BIN
gnome-console-42.beta.tar.xz
Normal file
Binary file not shown.
68
gnome-console.spec
Normal file
68
gnome-console.spec
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
%global tarball_version %%(echo %{version} | tr '~' '.')
|
||||||
|
|
||||||
|
Name: gnome-console
|
||||||
|
Version: 42~beta
|
||||||
|
Release: 1
|
||||||
|
Summary: Simple user-friendly terminal emulator for the GNOME desktop
|
||||||
|
License: GPLv3+
|
||||||
|
URL: https://gitlab.gnome.org/GNOME/console
|
||||||
|
Source: https://download.gnome.org/sources/gnome-console/42/gnome-console-%{tarball_version}.tar.xz
|
||||||
|
|
||||||
|
Patch0: 0001-Enable-Ctrl-PgUp-PgDn-to-switch-tabs-if-there-are-mu.patch
|
||||||
|
|
||||||
|
BuildRequires: meson >= 0.59.0
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: pkgconfig(gio-2.0) >= 2.66
|
||||||
|
BuildRequires: pkgconfig(gtk+-3.0) >= 3.24
|
||||||
|
BuildRequires: pkgconfig(libhandy-1) >= 1.5
|
||||||
|
BuildRequires: pkgconfig(vte-2.91) >= 0.67
|
||||||
|
BuildRequires: pkgconfig(libgtop-2.0)
|
||||||
|
BuildRequires: pkgconfig(gsettings-desktop-schemas)
|
||||||
|
BuildRequires: sassc
|
||||||
|
BuildRequires: /usr/bin/desktop-file-validate
|
||||||
|
#BuildRequires: /usr/bin/appstreamcli
|
||||||
|
BuildRequires: pkgconfig(libnautilus-extension)
|
||||||
|
BuildRequires: pkgconfig(gio-unix-2.0)
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package nautilus
|
||||||
|
Summary: Nautilus integration with %{name}
|
||||||
|
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||||
|
Supplements: (nautilus and %{name})
|
||||||
|
|
||||||
|
%description nautilus
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n %{name}-%{tarball_version}
|
||||||
|
sed -i -r -e '/(werror=|glib_compile_schemas|gtk_update_icon_cache|update_desktop_database)/s/true/false/' meson.build
|
||||||
|
|
||||||
|
%build
|
||||||
|
%meson -D nautilus=enabled -D sassc=enabled
|
||||||
|
%meson_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%meson_install
|
||||||
|
%find_lang kgx
|
||||||
|
|
||||||
|
%check
|
||||||
|
desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Console.desktop
|
||||||
|
#appstreamcli validate --no-net %{buildroot}%{_metainfodir}/org.gnome.Console.metainfo.xml
|
||||||
|
|
||||||
|
%files -f kgx.lang
|
||||||
|
%{_bindir}/kgx
|
||||||
|
%{_datadir}/applications/org.gnome.Console.desktop
|
||||||
|
%{_metainfodir}/org.gnome.Console.metainfo.xml
|
||||||
|
%{_datadir}/glib-2.0/schemas/org.gnome.Console.gschema.xml
|
||||||
|
%{_datadir}/dbus-1/services/org.gnome.Console.service
|
||||||
|
%{_datadir}/icons/hicolor/scalable/apps/org.gnome.Console.svg
|
||||||
|
%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Console-symbolic.svg
|
||||||
|
|
||||||
|
%files nautilus
|
||||||
|
%{_libdir}/nautilus/extensions-3.0/libkgx-nautilus.so
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Apr 15 2022 lin zhang <lin.zhang@turbolinux.com.cn> 42~beta-1
|
||||||
|
- Initial Packaging
|
||||||
4
gnome-console.yaml
Normal file
4
gnome-console.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: gitlab.gnome
|
||||||
|
src_repo: gnome-console
|
||||||
|
tag_prefix: ^v
|
||||||
|
seperator: .
|
||||||
Loading…
x
Reference in New Issue
Block a user