diff options
author | Tomasz Gąsior | 2017-09-20 10:25:51 +0200 |
---|---|---|
committer | Tomasz Gąsior | 2017-09-20 10:25:51 +0200 |
commit | 0c2a04f3237639f8da136f934548be987f344836 (patch) | |
tree | 6a69ec77b007eac87be376c364c7d3a80c5beabf | |
parent | d043f0d1d441b753677e9da8ef936331764c072a (diff) | |
download | aur-0c2a04f3237639f8da136f934548be987f344836.tar.gz |
Reorganized structure of package.
-rw-r--r-- | .SRCINFO | 36 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 102 | ||||
-rw-r--r-- | README.md | 27 | ||||
-rw-r--r-- | appearance__buttons-menus-icons.patch | 59 | ||||
-rw-r--r-- | appearance__file-chooser.patch (renamed from icons__file-chooser.patch) | 0 | ||||
-rw-r--r-- | appearance__print-dialog.patch (renamed from print-dialog__appearance.patch) | 0 | ||||
-rw-r--r-- | appearance__smaller-statusbar.patch (renamed from other__statusbar-size.patch) | 0 | ||||
-rwxr-xr-x | create-patch.sh (renamed from create-patch) | 10 | ||||
-rw-r--r-- | default-settings.patch | 48 | ||||
-rwxr-xr-x | do-mushrooms.sh | 51 | ||||
-rw-r--r-- | file-chooser__cwd-default.patch | 16 | ||||
-rw-r--r-- | icons__buttons.patch | 34 | ||||
-rw-r--r-- | icons__context-menus.patch | 189 | ||||
-rw-r--r-- | other__atk-bridge-errors.patch (renamed from fixes__atk-bridge-errors.patch) | 0 | ||||
-rw-r--r-- | other__visible-scrollbar.patch | 16 | ||||
-rw-r--r-- | other__window-background.patch (renamed from fixes__window-background.patch) | 0 | ||||
-rw-r--r-- | print-dialog__default-previewer.patch | 16 |
18 files changed, 213 insertions, 395 deletions
@@ -1,7 +1,7 @@ pkgbase = gtk3-mushrooms pkgdesc = GTK3 library with my modifications (see README). pkgver = 3.22.21 - pkgrel = 3 + pkgrel = 4 url = http://www.gtk.org/ arch = i686 arch = x86_64 @@ -36,54 +36,50 @@ pkgbase = gtk3-mushrooms optdepends = cantarell-fonts: default font provides = gtk3=3.22.21 conflicts = gtk3 + source = do-mushrooms.sh + source = appearance__buttons-menus-icons.patch + source = appearance__file-chooser.patch + source = appearance__print-dialog.patch + source = appearance__smaller-statusbar.patch source = csd__clean-headerbar.patch source = csd__disabled-by-default.patch source = csd__headerbar-title.patch source = csd__server-side-shadow.patch - source = file-chooser__cwd-default.patch + source = default-settings.patch source = file-chooser__places-sidebar.patch source = file-chooser__single-click.patch source = file-chooser__typeahead.patch - source = fixes__atk-bridge-errors.patch - source = fixes__window-background.patch - source = icons__buttons.patch - source = icons__context-menus.patch - source = icons__file-chooser.patch + source = other__atk-bridge-errors.patch source = other__mnemonics-delay.patch - source = other__statusbar-size.patch - source = other__visible-scrollbar.patch + source = other__window-background.patch source = popovers__color-chooser.patch source = popovers__file-chooser-list.patch source = popovers__menu-button.patch source = popovers__places-sidebar.patch - source = print-dialog__appearance.patch - source = print-dialog__default-previewer.patch source = smaller-adwaita.css source = https://download.gnome.org/sources/gtk+/3.22/gtk+-3.22.21.tar.xz source = settings.ini::https://git.archlinux.org/svntogit/packages.git/plain/trunk/settings.ini?h=packages/gtk3&id=712b5a879d9389efba706c8817607fa65ac562e9 source = gtk-query-immodules-3.0.hook::https://git.archlinux.org/svntogit/packages.git/plain/trunk/gtk-query-immodules-3.0.hook?h=packages/gtk3&id=712b5a879d9389efba706c8817607fa65ac562e9 + sha256sums = 69b8efb7b61089c4ca6328dcd910fd2a31075e1774d72463adb13e44e7ea8e86 + sha256sums = da8b8cd33750d38c607b4a4c5ae5dab9bf61c58aca12a095dfe6f555d3c9cd79 + sha256sums = b978504d311fb87505e1787a07c246310e3389840082f326e266193ad908c0f1 + sha256sums = b479fe0a82db21475fde30d9daad4360552b67957479773a1216058c7ff46629 + sha256sums = 7908611ae7f85a37542b1f1558f46f1d5f35fa1996551d4e61c163569ea3b0ac sha256sums = 7a1f4259502eea2f610df3ed8f82fc929fce1ebe92422327f54aa41ddf47e7f8 sha256sums = 58eb8466a76d6d48f32ec77365dc5436334e2aab9dd9df3ab59d5d55beb591cb sha256sums = a97f8b588ccfd55e78bccbbfa55b3ca62d5e1732cc815852b31ba9a6fa722494 sha256sums = 831e67a278152e93561658f364a10251ed07a9d05c60828b7ec1ab933ebe67b0 - sha256sums = 5f6dded28c77cfbd1c58f8c334c8544fc84093124f385f87dcf05eeb045bbd8b + sha256sums = 90fcf8ed5a40b01a2cbc5e255c05860d9960b51dda704bacfe3efe23a1b045bc sha256sums = 4d2fdb331e105c8512d3b2ad16b8c512b372fa3c3658c6881b1f89c9d78da7fb sha256sums = 9d07b362be00fa493642f680feeebc49cfae28f8f88c0e8c6de13b15323dacc9 sha256sums = fdc2c3d63c0fc94934c10a99189062955e8f40acd3bb883b739faefa86344c1f sha256sums = dcbdf52343748b7af621e98bf12d8c76097e0eb98ef02f594f95eefc5ae72575 - sha256sums = 4917fcb99dfe189f0f834a143bf85abb77f9ac0b8ec7a881aa4c8c1b897f6524 - sha256sums = 769ad0e70a6ac01c203417e50f06d64dbc9fd260707abf5289642ca5a4d4e7f4 - sha256sums = a2af0c7f29e9ae5e2a669f4ad131acab8d5cbd5d47cc3914750db25b8eeefe1e - sha256sums = b978504d311fb87505e1787a07c246310e3389840082f326e266193ad908c0f1 sha256sums = cf1e95e4a8c9d001d919fddeab9260b39e32739fe66440138dfc70182df5297a - sha256sums = 7908611ae7f85a37542b1f1558f46f1d5f35fa1996551d4e61c163569ea3b0ac - sha256sums = fa069d6ac463e5759e0073bb623ce3b495bd7a074bb13dbc25a12b7ce46f2024 + sha256sums = 4917fcb99dfe189f0f834a143bf85abb77f9ac0b8ec7a881aa4c8c1b897f6524 sha256sums = 64776101101b0ddc256e32a318f35526eb5e41b48aba7b7d30c39ef76db77ace sha256sums = e8d53849a3277fa0f0f729be2197970f28cd809070021d2f5ae1987df8250171 sha256sums = 4a239fb3f4dc128a64198ce9bcb9c4643541e366fd3fe19dfb45d23711727e18 sha256sums = a55a56aeb72715cb6ae39e440e01ff7492e484400f6e063368b74abf59d44fdb - sha256sums = b479fe0a82db21475fde30d9daad4360552b67957479773a1216058c7ff46629 - sha256sums = 23cdd8b8034e73bb852d42feaabf4f995983a032be479d9ce84e5858c0bd5c41 sha256sums = 0554ba2085fb8cec8e3b926efc250ae5c15cf47f2612c10cdd0e849bfb8d05a5 sha256sums = 1bd3c1a85cfb4db112cabb5379abb05a1a94fe43052d309d573493fca00e6b87 sha256sums = 01fc1d81dc82c4a052ac6e25bf9a04e7647267cc3017bc91f9ce3e63e5eb9202 diff --git a/.gitignore b/.gitignore index 28b8c7a7bc46..2d628dbff618 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,5 @@ pkg src -*.pkg.tar.xz - *.tar.xz gtk-query-immodules-3.0.hook settings.ini - -*.sh @@ -3,11 +3,11 @@ # This file is based on original PKGBUILD of GTK3 package. # https://git.archlinux.org/svntogit/packages.git/plain/trunk/PKGBUILD?h=packages/gtk3 -__arch_pkg_commit="712b5a879d9389efba706c8817607fa65ac562e9" +_arch_pkg_commit="712b5a879d9389efba706c8817607fa65ac562e9" pkgname=gtk3-mushrooms pkgver=3.22.21 -pkgrel=3 +pkgrel=4 pkgdesc="GTK3 library with my modifications (see README)." url="http://www.gtk.org/" conflicts=(gtk3) @@ -29,29 +29,29 @@ makedepends=( gobject-introspection libcanberra gtk-doc ) source=( + # Script applying patch. + "do-mushrooms.sh" + # Patch files. + "appearance__buttons-menus-icons.patch" + "appearance__file-chooser.patch" + "appearance__print-dialog.patch" + "appearance__smaller-statusbar.patch" "csd__clean-headerbar.patch" "csd__disabled-by-default.patch" "csd__headerbar-title.patch" "csd__server-side-shadow.patch" - "file-chooser__cwd-default.patch" + "default-settings.patch" "file-chooser__places-sidebar.patch" "file-chooser__single-click.patch" "file-chooser__typeahead.patch" - "fixes__atk-bridge-errors.patch" - "fixes__window-background.patch" - "icons__buttons.patch" - "icons__context-menus.patch" - "icons__file-chooser.patch" + "other__atk-bridge-errors.patch" "other__mnemonics-delay.patch" - "other__statusbar-size.patch" - "other__visible-scrollbar.patch" + "other__window-background.patch" "popovers__color-chooser.patch" "popovers__file-chooser-list.patch" "popovers__menu-button.patch" "popovers__places-sidebar.patch" - "print-dialog__appearance.patch" - "print-dialog__default-previewer.patch" # Theme CSS stylesheet. "smaller-adwaita.css" @@ -60,94 +60,41 @@ source=( "https://download.gnome.org/sources/gtk+/${pkgver%.*}/gtk+-$pkgver.tar.xz" # ArchLinux package files. - "settings.ini::https://git.archlinux.org/svntogit/packages.git/plain/trunk/settings.ini?h=packages/gtk3&id=$__arch_pkg_commit" - "gtk-query-immodules-3.0.hook::https://git.archlinux.org/svntogit/packages.git/plain/trunk/gtk-query-immodules-3.0.hook?h=packages/gtk3&id=$__arch_pkg_commit" + "settings.ini::https://git.archlinux.org/svntogit/packages.git/plain/trunk/settings.ini?h=packages/gtk3&id=$_arch_pkg_commit" + "gtk-query-immodules-3.0.hook::https://git.archlinux.org/svntogit/packages.git/plain/trunk/gtk-query-immodules-3.0.hook?h=packages/gtk3&id=$_arch_pkg_commit" ) sha256sums=( - # Patch files. + '69b8efb7b61089c4ca6328dcd910fd2a31075e1774d72463adb13e44e7ea8e86' + 'da8b8cd33750d38c607b4a4c5ae5dab9bf61c58aca12a095dfe6f555d3c9cd79' + 'b978504d311fb87505e1787a07c246310e3389840082f326e266193ad908c0f1' + 'b479fe0a82db21475fde30d9daad4360552b67957479773a1216058c7ff46629' + '7908611ae7f85a37542b1f1558f46f1d5f35fa1996551d4e61c163569ea3b0ac' '7a1f4259502eea2f610df3ed8f82fc929fce1ebe92422327f54aa41ddf47e7f8' '58eb8466a76d6d48f32ec77365dc5436334e2aab9dd9df3ab59d5d55beb591cb' 'a97f8b588ccfd55e78bccbbfa55b3ca62d5e1732cc815852b31ba9a6fa722494' '831e67a278152e93561658f364a10251ed07a9d05c60828b7ec1ab933ebe67b0' - '5f6dded28c77cfbd1c58f8c334c8544fc84093124f385f87dcf05eeb045bbd8b' + '90fcf8ed5a40b01a2cbc5e255c05860d9960b51dda704bacfe3efe23a1b045bc' '4d2fdb331e105c8512d3b2ad16b8c512b372fa3c3658c6881b1f89c9d78da7fb' '9d07b362be00fa493642f680feeebc49cfae28f8f88c0e8c6de13b15323dacc9' 'fdc2c3d63c0fc94934c10a99189062955e8f40acd3bb883b739faefa86344c1f' 'dcbdf52343748b7af621e98bf12d8c76097e0eb98ef02f594f95eefc5ae72575' - '4917fcb99dfe189f0f834a143bf85abb77f9ac0b8ec7a881aa4c8c1b897f6524' - '769ad0e70a6ac01c203417e50f06d64dbc9fd260707abf5289642ca5a4d4e7f4' - 'a2af0c7f29e9ae5e2a669f4ad131acab8d5cbd5d47cc3914750db25b8eeefe1e' - 'b978504d311fb87505e1787a07c246310e3389840082f326e266193ad908c0f1' 'cf1e95e4a8c9d001d919fddeab9260b39e32739fe66440138dfc70182df5297a' - '7908611ae7f85a37542b1f1558f46f1d5f35fa1996551d4e61c163569ea3b0ac' - 'fa069d6ac463e5759e0073bb623ce3b495bd7a074bb13dbc25a12b7ce46f2024' + '4917fcb99dfe189f0f834a143bf85abb77f9ac0b8ec7a881aa4c8c1b897f6524' '64776101101b0ddc256e32a318f35526eb5e41b48aba7b7d30c39ef76db77ace' 'e8d53849a3277fa0f0f729be2197970f28cd809070021d2f5ae1987df8250171' '4a239fb3f4dc128a64198ce9bcb9c4643541e366fd3fe19dfb45d23711727e18' 'a55a56aeb72715cb6ae39e440e01ff7492e484400f6e063368b74abf59d44fdb' - 'b479fe0a82db21475fde30d9daad4360552b67957479773a1216058c7ff46629' - '23cdd8b8034e73bb852d42feaabf4f995983a032be479d9ce84e5858c0bd5c41' - - # Theme CSS stylesheet. '0554ba2085fb8cec8e3b926efc250ae5c15cf47f2612c10cdd0e849bfb8d05a5' - - # GTK source code. '1bd3c1a85cfb4db112cabb5379abb05a1a94fe43052d309d573493fca00e6b87' - - # ArchLinux package files. '01fc1d81dc82c4a052ac6e25bf9a04e7647267cc3017bc91f9ce3e63e5eb9202' 'de46e5514ff39a7a65e01e485e874775ab1c0ad20b8e94ada43f4a6af1370845' ) -__patch_makefiles() -{ - __replace_string_in_file() - { - sed -i".bak" "s/$1/$2/" "$3" - [[ "$(cat "$3")" != "$(cat "$3.bak")" ]] || return 1 - rm "$3.bak" - } - - __replace_string_in_file \ - "SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite examples" \ - "SRC_SUBDIRS = gdk gtk libgail-util modules demos" \ - "Makefile.am" - - __replace_string_in_file \ - "SUBDIRS = po po-properties \$(SRC_SUBDIRS) docs m4macros build" \ - "SUBDIRS = po \$(SRC_SUBDIRS) m4macros build" \ - "Makefile.am" - - __replace_string_in_file \ - "SUBDIRS = gtk-demo widget-factory icon-browser" \ - "SUBDIRS = widget-factory" \ - "demos/Makefile.am" - - __replace_string_in_file "SUBDIRS += cloudprint" "" "modules/printbackends/Makefile.am" - __replace_string_in_file "SUBDIRS += cups" "" "modules/printbackends/Makefile.am" - __replace_string_in_file "gtk-update-icon-cache" "" "gtk/Makefile.am" -} - -__patch_gtk_code() -{ - for patchfile in $srcdir/*.patch; do - patch -d "gtk" -p 3 -i "$patchfile" - done - - cat "$srcdir/smaller-adwaita.css" >> "gtk/theme/Adwaita/gtk-contained.css" - cat "$srcdir/smaller-adwaita.css" >> "gtk/theme/Adwaita/gtk-contained-dark.css" -} - prepare() { cd "$srcdir/gtk+-$pkgver" - # Make building faster by skipping tests, code examples and unused elements. - __patch_makefiles - - # Apply patches to GTK code. - __patch_gtk_code - + ../do-mushrooms.sh NOCONFIGURE=1 ./autogen.sh } @@ -156,8 +103,7 @@ build() cd "$srcdir/gtk+-$pkgver" CXX=/bin/false ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ - --enable-x11-backend --enable-wayland-backend --disable-schemas-compile \ - --disable-gtk-doc-html --disable-installed-tests --disable-maintainer-mode + --enable-x11-backend --enable-wayland-backend --disable-schemas-compile --disable-gtk-doc-html # https://bugzilla.gnome.org/show_bug.cgi?id=655517 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool @@ -172,4 +118,4 @@ package() make -j 15 DESTDIR="$pkgdir" install install -Dm644 ../settings.ini "$pkgdir/usr/share/gtk-3.0/settings.ini" install -Dm644 ../gtk-query-immodules-3.0.hook "$pkgdir/usr/share/libalpm/hooks/gtk-query-immodules-3.0.hook" -} +}
\ No newline at end of file diff --git a/README.md b/README.md index c2949afd8afd..9a7c21f8fd50 100644 --- a/README.md +++ b/README.md @@ -18,23 +18,17 @@ File chooser * Annoying single-click "feature" in file list is disabled. You always have to double-click to choose file from list. See https://bugzilla.gnome.org/show_bug.cgi?id=758065. * Typeahead feature is restored. Recursive file search will not be ran automatically when you start typing. You can still search recursively by Left Alt + S shortcut. See https://bugzilla.gnome.org/show_bug.cgi?id=784029. -* Current working directory is opened by default instead of section with recently used files. * "Other locations" button is removed from places sidebar. All mounted devices and drives are accessible directly. +* Trash and XDG user directories (like Pictures, Downloads, Documents) are removed from places sidebar. You can add it as bookmarks. * File system button in places sidebar is labeled as "File System" instead of "Computer". -* Trash and XDG user directories (like Pictures, Downloads, Documents) are removed from places sidebar. They can be added as bookmarks. -Print dialog +Appearance --- -* Appearance of print dialog is less "gnomish" (natural margins are restored). -* Atril instead of Evince is set as default previewer. - -Icons ---- - -* Some GTK stock icons on buttons are restored. You can see it in GTK internal dialogs and in some applications. -* Context menus of text fields, links and labels have restored icons too. +* Some GTK stock icons on buttons and context menus are restored. You can see it in GTK internal dialogs and in some applications. * Regular colorized icons instead of symbolic icons are used in file chooser dialog. +* Appearance of print dialog is less "gnomish" (natural margins are restored). +* Statusbars are smaller regardless of used theme. Popovers --- @@ -42,18 +36,19 @@ Popovers * File chooser dialog, places sidebar and color chooser dialog use classic menu as context menu instead of popover. * Menus of menu buttons are displayed as classic menu instead of popover. -Others +Default settings --- -* Status bars are smaller regardless of used theme. * Scrollbars are always visible. You can enable invisible scrollbars by `GTK_OVERLAY_SCROLLING=1` environment variable. -* Delay before showing mnemonics is removed. You don't have to wait when you press Left Alt button. +* Current working directory is opened by default in file chooser dialog instead of section with recently used files. +* Atril instead of Evince is set as default previewer in printing dialog. -Fixes +Others --- +* Delay before showing mnemonics is removed. You don't have to wait when you press Left Alt button. * Window background is set properly to theme background color instead of solid black. See https://bugzilla.gnome.org/show_bug.cgi?id=771708. -* Errors in console output about disabled integration with Accessibility Toolkit are hidden. See https://unix.stackexchange.com/questions/230238. +* Errors in console output because of integration with Accessibility Toolkit are hidden. See https://unix.stackexchange.com/questions/230238. Adwaita theme --- diff --git a/appearance__buttons-menus-icons.patch b/appearance__buttons-menus-icons.patch new file mode 100644 index 000000000000..7d2c9b2a9998 --- /dev/null +++ b/appearance__buttons-menus-icons.patch @@ -0,0 +1,59 @@ +diff '--color=auto' -U 5 -r -Z -B ./org/gtk/gtkbutton.c ./mod/gtk/gtkbutton.c +--- ./org/gtk/gtkbutton.c 2017-08-22 12:22:29.000000000 +0200 ++++ ./mod/gtk/gtkbutton.c 2017-09-20 00:38:05.204450429 +0200 +@@ -2160,10 +2160,30 @@ + gchar *new_label; + + g_return_if_fail (GTK_IS_BUTTON (button)); + + priv = button->priv; ++ if (priv->image == NULL) { ++ gchar *use_this_icon = NULL; ++ if (g_strcmp0( label, _("_Select") ) == 0 || g_strcmp0( label, _("_OK") ) == 0) use_this_icon = "gtk-ok"; ++ else if (g_strcmp0( label, _("_Cancel") ) == 0) use_this_icon = "gtk-cancel"; ++ else if (g_strcmp0( label, _("_Close") ) == 0) use_this_icon = "gtk-close"; ++ else if (g_strcmp0( label, _("_Yes") ) == 0) use_this_icon = "gtk-yes"; ++ else if (g_strcmp0( label, _("_No") ) == 0) use_this_icon = "gtk-no"; ++ else if (g_strcmp0( label, _("_Print") ) == 0) use_this_icon = "gtk-print"; ++ else if (g_strcmp0( label, _("Pre_view") ) == 0) use_this_icon = "gtk-print-preview"; ++ else if (g_strcmp0( label, _("_Open") ) == 0) use_this_icon = "gtk-open"; ++ else if (g_strcmp0( label, _("_Save") ) == 0) use_this_icon = "gtk-save"; ++ else if (g_strcmp0( label, _("_Apply") ) == 0) use_this_icon = "gtk-apply"; ++ else if (g_strcmp0( label, _("_Stop") ) == 0) use_this_icon = "gtk-stop"; ++ else if (g_strcmp0( label, _("_Delete") ) == 0) use_this_icon = "gtk-delete"; ++ else if (g_strcmp0( label, _("_Remove") ) == 0) use_this_icon = "gtk-remove"; ++ else if (g_strcmp0( label, _("_Add") ) == 0) use_this_icon = "gtk-add"; ++ else if (g_strcmp0( label, _("_Help") ) == 0) use_this_icon = "gtk-help"; ++ if (use_this_icon) ++ g_object_set(button, "image", gtk_image_new_from_icon_name(use_this_icon, GTK_ICON_SIZE_BUTTON), NULL); ++ } + + new_label = g_strdup (label); + g_free (priv->label_text); + priv->label_text = new_label; + +diff '--color=auto' -U 5 -r -Z -B ./org/gtk/gtkmenuitem.c ./mod/gtk/gtkmenuitem.c +--- ./org/gtk/gtkmenuitem.c 2017-08-11 21:47:18.000000000 +0200 ++++ ./mod/gtk/gtkmenuitem.c 2017-09-19 20:17:55.937010353 +0200 +@@ -1006,10 +1006,21 @@ + * Returns: a new #GtkMenuItem + */ + GtkWidget* + gtk_menu_item_new_with_mnemonic (const gchar *label) + { ++ gchar *use_this_icon = NULL; ++ if (g_strcmp0( label, _("Copy _Link Address") ) == 0 || g_strcmp0( label, _("_Copy") ) == 0 ++ || g_strcmp0( label, _("Copy URL") ) == 0) use_this_icon = "gtk-copy"; ++ else if (g_strcmp0( label, _("Cu_t") ) == 0) use_this_icon = "gtk-cut"; ++ else if (g_strcmp0( label, _("_Paste") ) == 0) use_this_icon = "gtk-paste"; ++ else if (g_strcmp0( label, _("_Delete") ) == 0) use_this_icon = "gtk-delete"; ++ else if (g_strcmp0( label, _("Select _All") ) == 0) use_this_icon = "gtk-select-all"; ++ else if (g_strcmp0( label, _("_Open Link") ) == 0) use_this_icon = "gtk-jump-to"; ++ if (use_this_icon) ++ return g_object_new(GTK_TYPE_IMAGE_MENU_ITEM, "use-underline", TRUE, "label", label, ++ "image", gtk_image_new_from_icon_name(use_this_icon,GTK_ICON_SIZE_MENU), NULL); + return g_object_new (GTK_TYPE_MENU_ITEM, + "use-underline", TRUE, + "label", label, + NULL); + } diff --git a/icons__file-chooser.patch b/appearance__file-chooser.patch index 9d4eaa3a98a3..9d4eaa3a98a3 100644 --- a/icons__file-chooser.patch +++ b/appearance__file-chooser.patch diff --git a/print-dialog__appearance.patch b/appearance__print-dialog.patch index ef98c9592415..ef98c9592415 100644 --- a/print-dialog__appearance.patch +++ b/appearance__print-dialog.patch diff --git a/other__statusbar-size.patch b/appearance__smaller-statusbar.patch index c7721e445711..c7721e445711 100644 --- a/other__statusbar-size.patch +++ b/appearance__smaller-statusbar.patch diff --git a/create-patch b/create-patch.sh index 8fc1e724c2ca..548e20d10c0e 100755 --- a/create-patch +++ b/create-patch.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script is used to create patch files. +# This script is used to preview and save patch files. # Current working directory should contain two subdirectories: # * "org" — with oryginal GTK3 code, @@ -8,8 +8,6 @@ # Patch file is saved under name specified by first argument. if [[ -d ./org/gtk ]] && [[ -d ./mod/gtk ]] && [[ $1 ]]; then - # Save. - diff -U 5 -r -Z -B ./org/gtk ./mod/gtk > "$1.patch" - # Preview. - reset; diff --color=always -U 5 -r -Z -B ./org/gtk ./mod/gtk -fi + command="diff --color=auto -U 5 -r -Z -B ./org/gtk ./mod/gtk" + $command > "$1.patch"; reset; $command +fi
\ No newline at end of file diff --git a/default-settings.patch b/default-settings.patch new file mode 100644 index 000000000000..7c6e3770d5d0 --- /dev/null +++ b/default-settings.patch @@ -0,0 +1,48 @@ +diff -U 5 -r -Z -B ./org/gtk/gtkscrolledwindow.c ./mod/gtk/gtkscrolledwindow.c +--- ./org/gtk/gtkscrolledwindow.c 2017-09-02 00:17:12.000000000 +0200 ++++ ./mod/gtk/gtkscrolledwindow.c 2017-09-19 18:52:20.393422563 +0200 +@@ -4408,11 +4408,11 @@ + GtkScrolledWindowPrivate *priv = scrolled_window->priv; + gboolean use_indicators; + + use_indicators = priv->overlay_scrolling; + +- if (g_strcmp0 (g_getenv ("GTK_OVERLAY_SCROLLING"), "0") == 0) ++ if (g_strcmp0 (g_getenv ("GTK_OVERLAY_SCROLLING"), "1") != 0) + use_indicators = FALSE; + + if (priv->use_indicators != use_indicators) + { + priv->use_indicators = use_indicators; +diff -U 5 -r -Z -B ./org/gtk/gtksettings.c ./mod/gtk/gtksettings.c +--- ./org/gtk/gtksettings.c 2017-08-11 21:47:18.000000000 +0200 ++++ ./mod/gtk/gtksettings.c 2017-09-19 18:52:39.926756865 +0200 +@@ -59,11 +59,11 @@ + #include "deprecated/gtkrc.h" + + #ifdef GDK_WINDOWING_QUARTZ + #define PRINT_PREVIEW_COMMAND "open -a /Applications/Preview.app %f" + #else +-#define PRINT_PREVIEW_COMMAND "evince --unlink-tempfile --preview --print-settings %s %f" ++#define PRINT_PREVIEW_COMMAND "atril --unlink-tempfile --preview --print-settings %s %f" + #endif + + /** + * SECTION:gtksettings + * @Short_description: Sharing settings between applications +diff -U 5 -r -Z -B ./org/gtk/org.gtk.Settings.FileChooser.gschema.xml ./mod/gtk/org.gtk.Settings.FileChooser.gschema.xml +--- ./org/gtk/org.gtk.Settings.FileChooser.gschema.xml 2016-10-22 06:17:51.000000000 +0200 ++++ ./mod/gtk/org.gtk.Settings.FileChooser.gschema.xml 2017-09-19 18:51:32.836753540 +0200 +@@ -117,11 +117,11 @@ + <description> + The size (width, height) of the GtkFileChooserDialog's window, in pixels. + </description> + </key> + <key name='startup-mode' enum='org.gtk.Settings.FileChooser.StartupMode'> +- <default>'recent'</default> ++ <default>'cwd'</default> + <summary>Startup mode</summary> + <description> + Either "recent" or "cwd"; controls whether the file chooser + starts up showing the list of recently-used files, or the + contents of the current working directory. diff --git a/do-mushrooms.sh b/do-mushrooms.sh new file mode 100755 index 000000000000..a732d64f1b64 --- /dev/null +++ b/do-mushrooms.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# This script is used to apply Mushroom's patches to GTK source code. + +# Current working directory should be set to main directory of GTK source code. +# Script should be placed beside patches files. + +patch_makefiles() +{ + _replace_string_in_file() + { + sed -i".bak" "s/$1/$2/" "$3" + rm "$3.bak" + } + + _replace_string_in_file \ + "SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite examples" \ + "SRC_SUBDIRS = gdk gtk libgail-util modules demos" \ + "Makefile.am" + + _replace_string_in_file \ + "SUBDIRS = po po-properties \$(SRC_SUBDIRS) docs m4macros build" \ + "SUBDIRS = po \$(SRC_SUBDIRS) m4macros build" \ + "Makefile.am" + + _replace_string_in_file \ + "SUBDIRS = gtk-demo widget-factory icon-browser" \ + "SUBDIRS = widget-factory" \ + "demos/Makefile.am" + + _replace_string_in_file "SUBDIRS += cloudprint" "" "modules/printbackends/Makefile.am" + _replace_string_in_file "SUBDIRS += cups" "" "modules/printbackends/Makefile.am" + _replace_string_in_file "gtk-update-icon-cache" "" "gtk/Makefile.am" +} + +patch_gtk_code() +{ + patches_dir=$(dirname `realpath "$0"`) + + for patch_file in $patches_dir/*.patch; do + patch -d "gtk" -p 3 -i "$patch_file" + done + + cat "$patches_dir/smaller-adwaita.css" | tee -a gtk/theme/Adwaita/gtk-contained{,-dark}.css > /dev/null +} + +# Make building faster by skipping tests, code examples and unused elements. +patch_makefiles + +# Apply patches to GTK code. +patch_gtk_code
\ No newline at end of file diff --git a/file-chooser__cwd-default.patch b/file-chooser__cwd-default.patch deleted file mode 100644 index ff2de3b44f5f..000000000000 --- a/file-chooser__cwd-default.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -U 5 -r -Z -B ./org/gtk/org.gtk.Settings.FileChooser.gschema.xml ./mod/gtk/org.gtk.Settings.FileChooser.gschema.xml ---- ./org/gtk/org.gtk.Settings.FileChooser.gschema.xml 2017-07-19 04:55:39.000000000 +0200 -+++ ./mod/gtk/org.gtk.Settings.FileChooser.gschema.xml 2017-07-30 13:14:27.850096140 +0200 -@@ -117,11 +117,11 @@ - <description> - The size (width, height) of the GtkFileChooserDialog's window, in pixels. - </description> - </key> - <key name='startup-mode' enum='org.gtk.Settings.FileChooser.StartupMode'> -- <default>'recent'</default> -+ <default>'cwd'</default> - <summary>Startup mode</summary> - <description> - Either "recent" or "cwd"; controls whether the file chooser - starts up showing the list of recently-used files, or the - contents of the current working directory. diff --git a/icons__buttons.patch b/icons__buttons.patch deleted file mode 100644 index 6a57faf2a60c..000000000000 --- a/icons__buttons.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -U 5 -r -Z -B ./org/gtk/gtkbutton.c ./mod/gtk/gtkbutton.c ---- ./org/gtk/gtkbutton.c 2017-07-19 04:55:39.000000000 +0200 -+++ ./mod/gtk/gtkbutton.c 2017-07-30 13:51:31.303539641 +0200 -@@ -2169,10 +2169,30 @@ - GtkButtonPrivate *priv; - gchar *new_label; - - g_return_if_fail (GTK_IS_BUTTON (button)); - -+ if (!gtk_button_get_image(GTK_BUTTON(button))) { -+ gchar *use_this_icon = NULL; -+ if (g_strcmp0( label, _("_Select") ) == 0 || g_strcmp0( label, _("_OK") ) == 0) use_this_icon = "gtk-ok"; -+ else if (g_strcmp0( label, _("_Cancel") ) == 0) use_this_icon = "gtk-cancel"; -+ else if (g_strcmp0( label, _("_Close") ) == 0) use_this_icon = "gtk-close"; -+ else if (g_strcmp0( label, _("_Yes") ) == 0) use_this_icon = "gtk-yes"; -+ else if (g_strcmp0( label, _("_No") ) == 0) use_this_icon = "gtk-no"; -+ else if (g_strcmp0( label, _("_Print") ) == 0) use_this_icon = "gtk-print"; -+ else if (g_strcmp0( label, _("Pre_view") ) == 0) use_this_icon = "gtk-print-preview"; -+ else if (g_strcmp0( label, _("_Open") ) == 0) use_this_icon = "gtk-open"; -+ else if (g_strcmp0( label, _("_Save") ) == 0) use_this_icon = "gtk-save"; -+ else if (g_strcmp0( label, _("_Apply") ) == 0) use_this_icon = "gtk-apply"; -+ else if (g_strcmp0( label, _("_Stop") ) == 0) use_this_icon = "gtk-stop"; -+ else if (g_strcmp0( label, _("_Delete") ) == 0) use_this_icon = "gtk-delete"; -+ else if (g_strcmp0( label, _("_Remove") ) == 0) use_this_icon = "gtk-remove"; -+ else if (g_strcmp0( label, _("_Add") ) == 0) use_this_icon = "gtk-add"; -+ else if (g_strcmp0( label, _("_Help") ) == 0) use_this_icon = "gtk-help"; -+ if (use_this_icon) -+ g_object_set(button, "image", gtk_image_new_from_icon_name(use_this_icon,GTK_ICON_SIZE_BUTTON), NULL); -+ } - priv = button->priv; - - new_label = g_strdup (label); - g_free (priv->label_text); - priv->label_text = new_label; diff --git a/icons__context-menus.patch b/icons__context-menus.patch deleted file mode 100644 index 27027d2b8b26..000000000000 --- a/icons__context-menus.patch +++ /dev/null @@ -1,189 +0,0 @@ -diff -U 5 -r -Z -B ./org/gtk/deprecated/gtkimagemenuitem.c ./mod/gtk/deprecated/gtkimagemenuitem.c ---- ./org/gtk/deprecated/gtkimagemenuitem.c 2017-08-22 14:33:11.000000000 +0200 -+++ ./mod/gtk/deprecated/gtkimagemenuitem.c 2017-08-26 18:50:45.994104623 +0200 -@@ -489,10 +489,22 @@ - gtk_image_menu_item_set_label (GtkMenuItem *menu_item, - const gchar *label) - { - GtkImageMenuItemPrivate *priv = GTK_IMAGE_MENU_ITEM (menu_item)->priv; - -+ if (!gtk_image_menu_item_get_image(GTK_IMAGE_MENU_ITEM(menu_item))) { -+ gchar *use_this_icon = NULL; -+ if (g_strcmp0( label, _("Copy _Link Address") ) == 0 || g_strcmp0( label, _("_Copy") ) == 0 -+ || g_strcmp0( label, _("Copy URL") ) == 0) use_this_icon = "gtk-copy"; -+ else if (g_strcmp0( label, _("Cu_t") ) == 0) use_this_icon = "gtk-cut"; -+ else if (g_strcmp0( label, _("_Paste") ) == 0) use_this_icon = "gtk-paste"; -+ else if (g_strcmp0( label, _("_Delete") ) == 0) use_this_icon = "gtk-delete"; -+ else if (g_strcmp0( label, _("Select _All") ) == 0) use_this_icon = "gtk-select-all"; -+ else if (g_strcmp0( label, _("_Open Link") ) == 0) use_this_icon = "gtk-jump-to"; -+ if (use_this_icon) -+ g_object_set(menu_item, "image", gtk_image_new_from_icon_name(use_this_icon,GTK_ICON_SIZE_MENU), NULL); -+ } - if (priv->label != label) - { - g_free (priv->label); - priv->label = g_strdup (label); - -diff -U 5 -r -Z -B ./org/gtk/gtkentry.c ./mod/gtk/gtkentry.c ---- ./org/gtk/gtkentry.c 2017-08-22 14:33:11.000000000 +0200 -+++ ./mod/gtk/gtkentry.c 2017-08-26 18:50:46.004104623 +0200 -@@ -9480,11 +9480,11 @@ - GtkWidget *menu, - const gchar *label, - const gchar *signal, - gboolean sensitive) - { -- GtkWidget *menuitem = gtk_menu_item_new_with_mnemonic (label); -+ GtkWidget *menuitem = gtk_image_menu_item_new_with_mnemonic (label); - - g_object_set_qdata (G_OBJECT (menuitem), quark_gtk_signal, (char *)signal); - g_signal_connect (menuitem, "activate", - G_CALLBACK (activate_cb), entry); - -@@ -9549,22 +9549,22 @@ - info_entry_priv->current_pos != info_entry_priv->selection_bound); - - append_action_signal (entry, menu, _("_Paste"), "paste-clipboard", - info_entry_priv->editable && clipboard_contains_text); - -- menuitem = gtk_menu_item_new_with_mnemonic (_("_Delete")); -+ menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Delete")); - gtk_widget_set_sensitive (menuitem, info_entry_priv->editable && info_entry_priv->current_pos != info_entry_priv->selection_bound); - g_signal_connect_swapped (menuitem, "activate", - G_CALLBACK (gtk_entry_delete_cb), entry); - gtk_widget_show (menuitem); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - - menuitem = gtk_separator_menu_item_new (); - gtk_widget_show (menuitem); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - -- menuitem = gtk_menu_item_new_with_mnemonic (_("Select _All")); -+ menuitem = gtk_image_menu_item_new_with_mnemonic (_("Select _All")); - gtk_widget_set_sensitive (menuitem, gtk_entry_buffer_get_length (info_entry_priv->buffer) > 0); - g_signal_connect_swapped (menuitem, "activate", - G_CALLBACK (gtk_entry_select_all), entry); - gtk_widget_show (menuitem); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); -Tylko w ./mod/gtk: gtkentry.c.orig -diff -U 5 -r -Z -B ./org/gtk/gtklabel.c ./mod/gtk/gtklabel.c ---- ./org/gtk/gtklabel.c 2017-08-22 14:33:11.000000000 +0200 -+++ ./mod/gtk/gtklabel.c 2017-08-26 18:50:46.007437956 +0200 -@@ -6562,11 +6562,11 @@ - GtkWidget *menu, - const gchar *text, - const gchar *signal, - gboolean sensitive) - { -- GtkWidget *menuitem = gtk_menu_item_new_with_mnemonic (text); -+ GtkWidget *menuitem = gtk_image_menu_item_new_with_mnemonic (text); - - g_object_set_qdata (G_OBJECT (menuitem), quark_gtk_signal, (char *)signal); - g_signal_connect (menuitem, "activate", - G_CALLBACK (activate_cb), label); - -@@ -6653,20 +6653,20 @@ - link = gtk_label_get_focus_link (label); - - if (!have_selection && link) - { - /* Open Link */ -- menuitem = gtk_menu_item_new_with_mnemonic (_("_Open Link")); -+ menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Open Link")); - g_object_set_qdata (G_OBJECT (menuitem), quark_link, link); - gtk_widget_show (menuitem); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - - g_signal_connect (G_OBJECT (menuitem), "activate", - G_CALLBACK (open_link_activate_cb), label); - - /* Copy Link Address */ -- menuitem = gtk_menu_item_new_with_mnemonic (_("Copy _Link Address")); -+ menuitem = gtk_image_menu_item_new_with_mnemonic (_("Copy _Link Address")); - g_object_set_qdata (G_OBJECT (menuitem), quark_link, link); - gtk_widget_show (menuitem); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - - g_signal_connect (G_OBJECT (menuitem), "activate", -@@ -6676,20 +6676,20 @@ - { - append_action_signal (label, menu, _("Cu_t"), "cut-clipboard", FALSE); - append_action_signal (label, menu, _("_Copy"), "copy-clipboard", have_selection); - append_action_signal (label, menu, _("_Paste"), "paste-clipboard", FALSE); - -- menuitem = gtk_menu_item_new_with_mnemonic (_("_Delete")); -+ menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Delete")); - gtk_widget_set_sensitive (menuitem, FALSE); - gtk_widget_show (menuitem); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - - menuitem = gtk_separator_menu_item_new (); - gtk_widget_show (menuitem); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - -- menuitem = gtk_menu_item_new_with_mnemonic (_("Select _All")); -+ menuitem = gtk_image_menu_item_new_with_mnemonic (_("Select _All")); - g_signal_connect_swapped (menuitem, "activate", - G_CALLBACK (gtk_label_select_all), label); - gtk_widget_show (menuitem); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); - } -Tylko w ./mod/gtk: gtklabel.c.orig -diff -U 5 -r -Z -B ./org/gtk/gtklinkbutton.c ./mod/gtk/gtklinkbutton.c ---- ./org/gtk/gtklinkbutton.c 2017-08-22 14:33:11.000000000 +0200 -+++ ./mod/gtk/gtklinkbutton.c 2017-08-26 18:50:46.010771290 +0200 -@@ -365,11 +365,11 @@ - - gtk_menu_attach_to_widget (GTK_MENU (priv->popup_menu), - GTK_WIDGET (link_button), - popup_menu_detach); - -- menu_item = gtk_menu_item_new_with_mnemonic (_("Copy URL")); -+ menu_item = gtk_image_menu_item_new_with_mnemonic (_("Copy URL")); - g_signal_connect (menu_item, "activate", - G_CALLBACK (copy_activate_cb), link_button); - gtk_widget_show (menu_item); - gtk_menu_shell_append (GTK_MENU_SHELL (priv->popup_menu), menu_item); - -diff -U 5 -r -Z -B ./org/gtk/gtktextview.c ./mod/gtk/gtktextview.c ---- ./org/gtk/gtktextview.c 2017-08-22 14:33:11.000000000 +0200 -+++ ./mod/gtk/gtktextview.c 2017-08-26 18:56:24.100788042 +0200 -@@ -9315,11 +9315,11 @@ - GtkWidget *menu, - const gchar *label, - const gchar *signal, - gboolean sensitive) - { -- GtkWidget *menuitem = gtk_menu_item_new_with_mnemonic (label); -+ GtkWidget *menuitem = gtk_image_menu_item_new_with_mnemonic (label); - - g_object_set_qdata (G_OBJECT (menuitem), quark_gtk_signal, (char *)signal); - g_signal_connect (menuitem, "activate", - G_CALLBACK (activate_cb), text_view); - -@@ -9452,11 +9452,11 @@ - append_action_signal (text_view, priv->popup_menu, _("_Copy"), "copy-clipboard", - have_selection); - append_action_signal (text_view, priv->popup_menu, _("_Paste"), "paste-clipboard", - can_insert && clipboard_contains_text); - -- menuitem = gtk_menu_item_new_with_mnemonic (_("_Delete")); -+ menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Delete")); - gtk_widget_set_sensitive (menuitem, - have_selection && - range_contains_editable_text (&sel_start, &sel_end, - priv->editable)); - g_signal_connect_swapped (menuitem, "activate", -@@ -9466,11 +9466,11 @@ - - menuitem = gtk_separator_menu_item_new (); - gtk_widget_show (menuitem); - gtk_menu_shell_append (GTK_MENU_SHELL (priv->popup_menu), menuitem); - -- menuitem = gtk_menu_item_new_with_mnemonic (_("Select _All")); -+ menuitem = gtk_image_menu_item_new_with_mnemonic (_("Select _All")); - gtk_widget_set_sensitive (menuitem, - gtk_text_buffer_get_char_count (priv->buffer) > 0); - g_signal_connect (menuitem, "activate", - G_CALLBACK (select_all_cb), text_view); - gtk_widget_show (menuitem); diff --git a/fixes__atk-bridge-errors.patch b/other__atk-bridge-errors.patch index 23ea58b757c0..23ea58b757c0 100644 --- a/fixes__atk-bridge-errors.patch +++ b/other__atk-bridge-errors.patch diff --git a/other__visible-scrollbar.patch b/other__visible-scrollbar.patch deleted file mode 100644 index a460ace8f3f6..000000000000 --- a/other__visible-scrollbar.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -U 5 -r -Z -B ./org/gtk/gtkscrolledwindow.c ./mod/gtk/gtkscrolledwindow.c ---- ./org/gtk/gtkscrolledwindow.c 2017-09-02 00:17:12.000000000 +0200 -+++ ./mod/gtk/gtkscrolledwindow.c 2017-09-13 02:08:37.984051605 +0200 -@@ -4408,11 +4408,11 @@ - GtkScrolledWindowPrivate *priv = scrolled_window->priv; - gboolean use_indicators; - - use_indicators = priv->overlay_scrolling; - -- if (g_strcmp0 (g_getenv ("GTK_OVERLAY_SCROLLING"), "0") == 0) -+ if (g_strcmp0 (g_getenv ("GTK_OVERLAY_SCROLLING"), "1") != 0) - use_indicators = FALSE; - - if (priv->use_indicators != use_indicators) - { - priv->use_indicators = use_indicators; diff --git a/fixes__window-background.patch b/other__window-background.patch index 468aacb57b43..468aacb57b43 100644 --- a/fixes__window-background.patch +++ b/other__window-background.patch diff --git a/print-dialog__default-previewer.patch b/print-dialog__default-previewer.patch deleted file mode 100644 index 0a5c65a94877..000000000000 --- a/print-dialog__default-previewer.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -U 5 -r -Z -B ./org/gtk/gtksettings.c ./mod/gtk/gtksettings.c ---- ./org/gtk/gtksettings.c 2017-07-19 04:55:39.000000000 +0200 -+++ ./mod/gtk/gtksettings.c 2017-07-30 13:33:42.580153355 +0200 -@@ -59,11 +59,11 @@ - #include "deprecated/gtkrc.h" - - #ifdef GDK_WINDOWING_QUARTZ - #define PRINT_PREVIEW_COMMAND "open -a /Applications/Preview.app %f" - #else --#define PRINT_PREVIEW_COMMAND "evince --unlink-tempfile --preview --print-settings %s %f" -+#define PRINT_PREVIEW_COMMAND "atril --unlink-tempfile --preview --print-settings %s %f" - #endif - - /** - * SECTION:gtksettings - * @Short_description: Sharing settings between applications |