summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMubashshir2023-10-06 03:44:27 +0600
committerMubashshir2023-10-06 03:44:27 +0600
commit375b86ffe759848350a7825ec86686a7f45534be (patch)
tree5f0295ed5cc591d2c394fbec741c6a1139116ab9
parente0d0562292972dd0024d4edbc9edd78f5137af7e (diff)
downloadaur-375b86ffe759848350a7825ec86686a7f45534be.tar.gz
Publish v46.1 with proper menubar patch
This patch moves menubar from under headerbar to inside the document view. Signed-off-by: Mubashshir <ahmubashshir@gmail.com>
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD12
-rw-r--r--data.patch20
-rw-r--r--menubar.patch65
4 files changed, 74 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2e886709e350..5cf1dabe6c8a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,10 @@
pkgbase = gedit-menubar
pkgdesc = GNOME Text Editor (Patched to show menubar)
- pkgver = 44.2
+ pkgver = 46.1
pkgrel = 1
url = https://wiki.gnome.org/Apps/Gedit
arch = x86_64
- groups = gnome
+ groups = gnome-extra
license = GPL
makedepends = appstream-glib
makedepends = desktop-file-utils
@@ -14,9 +14,9 @@ pkgbase = gedit-menubar
makedepends = meson
makedepends = vala
makedepends = yelp-tools
- depends = amtk
depends = gsettings-desktop-schemas
depends = gspell
+ depends = libgedit-amtk
depends = libpeas
depends = python-gobject
depends = tepl
@@ -24,11 +24,11 @@ pkgbase = gedit-menubar
provides = gedit
conflicts = gedit-code-assistance<=3.16.0+4+gd19b879-1
conflicts = gedit
- source = git+https://gitlab.gnome.org/GNOME/gedit.git#tag=44.2
+ source = git+https://gitlab.gnome.org/GNOME/gedit.git#tag=46.1
source = git+https://gitlab.gnome.org/GNOME/libgd.git
source = menubar.patch
sha256sums = SKIP
sha256sums = SKIP
- sha256sums = 7b7bbcf115ee7a755ef039676a799bd0d2a95c36f4793e484bf296823efb2c32
+ sha256sums = a711518646e2d0727927ea88d59010ece1611f1e00436a7276f934a628491c6a
pkgname = gedit-menubar
diff --git a/PKGBUILD b/PKGBUILD
index 895ac9452ea9..c233255dd37c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,16 +4,16 @@
# match! alpha[0-9]*$
pkgname=gedit-menubar
-pkgver=44.2
+pkgver=46.1
pkgrel=1
pkgdesc="GNOME Text Editor (Patched to show menubar)"
url="https://wiki.gnome.org/Apps/Gedit"
arch=(x86_64)
license=(GPL)
depends=(
- amtk
gsettings-desktop-schemas
gspell
+ libgedit-amtk
libpeas
python-gobject
tepl
@@ -31,18 +31,17 @@ makedepends=(
optdepends=('gedit-plugins: Additional features')
conflicts=('gedit-code-assistance<=3.16.0+4+gd19b879-1' 'gedit')
provides=('gedit')
-groups=(gnome)
+groups=(gnome-extra)
source=("git+https://gitlab.gnome.org/GNOME/gedit.git#tag=$pkgver"
"git+https://gitlab.gnome.org/GNOME/libgd.git"
"menubar.patch")
sha256sums=('SKIP'
'SKIP'
- '7b7bbcf115ee7a755ef039676a799bd0d2a95c36f4793e484bf296823efb2c32')
+ 'a711518646e2d0727927ea88d59010ece1611f1e00436a7276f934a628491c6a')
pkgver() {
- cd ${pkgname%-*}
- git describe --tags | sed 's/-/+/g'
+ git -C ${pkgname%-*} describe --tags | sed 's/-/+/g'
}
prepare() {
@@ -50,6 +49,7 @@ prepare() {
git submodule init
git submodule set-url subprojects/libgd "$srcdir/libgd"
git -c protocol.file.allow=always submodule update
+
patch -p1 < "$srcdir/menubar.patch"
}
diff --git a/data.patch b/data.patch
deleted file mode 100644
index 5b4b67850224..000000000000
--- a/data.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/data/meson.build b/data/meson.build
-index bb6138763..28d72a1e2 100644
---- a/data/meson.build
-+++ b/data/meson.build
-@@ -4,7 +4,6 @@ install_man('gedit.1')
-
- appdata = 'org.gnome.gedit.appdata.xml'
- appdata_file = i18n.merge_file(
-- appdata,
- input: appdata + '.in',
- output: appdata,
- po_dir: '../po/',
-@@ -23,7 +22,6 @@ endif
-
- desktop_file = 'org.gnome.gedit.desktop'
- desktop_output_file = i18n.merge_file(
-- desktop_file,
- type: 'desktop',
- input: desktop_file + '.in',
- output: desktop_file,
diff --git a/menubar.patch b/menubar.patch
index ad3cc58c592f..4e6727e6b771 100644
--- a/menubar.patch
+++ b/menubar.patch
@@ -1,8 +1,8 @@
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
-index 5532d5975..671208c35 100644
+index 9ddac418d..d1cbd0dae 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
-@@ -627,6 +627,7 @@ add_accelerator (GtkApplication *app,
+@@ -641,6 +641,7 @@ add_accelerator (GtkApplication *app,
static gboolean
show_menubar (void)
{
@@ -10,3 +10,64 @@ index 5532d5975..671208c35 100644
GtkSettings *settings = gtk_settings_get_default ();
gboolean result;
+@@ -1172,6 +1173,7 @@ gedit_app_create_window_impl (GeditApp *app)
+ GeditWindow *window;
+
+ window = g_object_new (GEDIT_TYPE_WINDOW, "application", app, NULL);
++ _gedit_window_set_menu_bar_from_app (window, GTK_APPLICATION(app));
+
+ gedit_debug_message (DEBUG_APP, "Window created");
+
+diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
+index 930899bb5..968eccc30 100644
+--- a/gedit/gedit-window.c
++++ b/gedit/gedit-window.c
+@@ -2781,6 +2781,34 @@ gedit_window_init (GeditWindow *window)
+ gedit_debug_message (DEBUG_WINDOW, "END");
+ }
+
++void
++_gedit_window_set_menu_bar_from_app (GeditWindow *window, GtkApplication *app)
++{
++ GtkWidget *container;
++ GtkWidget *menubar;
++ GMenuModel *menumodel;
++ gboolean visible;
++
++ g_object_get(G_OBJECT(window), "show-menubar", &visible, NULL);
++ if(! visible) return;
++
++ menumodel = gtk_application_get_menubar(app);
++ if(! menumodel) return;
++
++ menubar = gtk_menu_bar_new_from_model(menumodel);
++ gtk_widget_show_all(menubar);
++
++ container = gtk_paned_get_child2(GTK_PANED(window->priv->hpaned));
++ if(! GTK_IS_BOX(container)) {
++ g_free(menubar);
++ return;
++ }
++
++ g_object_set(G_OBJECT(window), "show-menubar", FALSE, NULL);
++ gtk_box_pack_start(GTK_BOX(container), menubar, FALSE, FALSE, 0);
++ gtk_box_reorder_child(GTK_BOX(container), menubar, 0);
++}
++
+ /**
+ * gedit_window_get_active_view:
+ * @window: a #GeditWindow.
+diff --git a/gedit/gedit-window.h b/gedit/gedit-window.h
+index 8417cb1b2..1c1d9608d 100644
+--- a/gedit/gedit-window.h
++++ b/gedit/gedit-window.h
+@@ -152,6 +152,9 @@ GList *_gedit_window_get_all_tabs (GeditWindow *window);
+
+ GFile *_gedit_window_pop_last_closed_doc (GeditWindow *window);
+
++void _gedit_window_set_menu_bar_from_app (GeditWindow *window,
++ GtkApplication *app);
++
+ G_END_DECLS
+
+ #endif /* GEDIT_WINDOW_H */