From 91496a8c11f3382aef898fc21a8321d14fb9e068 Mon Sep 17 00:00:00 2001 From: Dmitry Butskoy Date: Fri, 18 Dec 2020 00:58:20 +0300 Subject: [PATCH 1/3] Upgrade to 7.3 --- .gitignore | 1 + sources | 2 +- yad-7.2-hscroll-policy.patch | 12 ++++ yad-7.2-sep-column.patch | 12 ++++ yad-7.2-warnings.patch | 127 +++++++++++++++++++++++++++++++++++ yad-7.2-window-icon.patch | 66 ++++++++++++++++++ yad-7.3-size-request.patch | 17 +++++ yad.spec | 79 +++++++++++++--------- 8 files changed, 283 insertions(+), 33 deletions(-) create mode 100644 yad-7.2-hscroll-policy.patch create mode 100644 yad-7.2-sep-column.patch create mode 100644 yad-7.2-warnings.patch create mode 100644 yad-7.2-window-icon.patch create mode 100644 yad-7.3-size-request.patch diff --git a/.gitignore b/.gitignore index 7031f29..91d9c1f 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ /yad-0.38.2.tar.xz /yad-0.39.0.tar.xz /yad-0.40.0.tar.xz +/yad-7.3.tar.xz diff --git a/sources b/sources index b5ad373..9f83344 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (yad-0.40.0.tar.xz) = 103193b316b74cafe8ef3da982df66e3dae17a206bc1c6852eb321507bba93fc7b54c25e959d2dbbdddc267c72b639a8cd9f1f22c03c9bccce283b4c29b8af44 +SHA512 (yad-7.3.tar.xz) = 335f3f325917e61dcb14f932cac3f1c63485c7797075b736968a6288e32e6c4a7aeea8b38c93493619b0c8a00e3aee72661079147cd8a19c3ca67d0e33b5db92 diff --git a/yad-7.2-hscroll-policy.patch b/yad-7.2-hscroll-policy.patch new file mode 100644 index 0000000..0864be2 --- /dev/null +++ b/yad-7.2-hscroll-policy.patch @@ -0,0 +1,12 @@ +diff -Nrbu yad-7.2/src/option.c yad-7.2-OK/src/option.c +--- yad-7.2/src/option.c 2020-10-24 03:22:22.795884753 +0300 ++++ yad-7.2-OK/src/option.c 2020-10-24 03:09:01.305076745 +0300 +@@ -1268,7 +1268,7 @@ + else + g_printerr (_("Unknown scrollbar policy type: %s\n"), value); + +- if (option_name[0] == 'h') ++ if (strcmp (option_name, "--hscroll-policy") == 0) + options.hscroll_policy = pt; + else + options.vscroll_policy = pt; diff --git a/yad-7.2-sep-column.patch b/yad-7.2-sep-column.patch new file mode 100644 index 0000000..5005206 --- /dev/null +++ b/yad-7.2-sep-column.patch @@ -0,0 +1,12 @@ +diff -Nrbu yad-7.2/src/list.c yad-7.2-OK/src/list.c +--- yad-7.2/src/list.c 2020-09-11 12:05:18.000000000 +0300 ++++ yad-7.2-OK/src/list.c 2020-10-21 19:43:39.183644629 +0300 +@@ -1118,7 +1118,7 @@ + return FALSE; + + gtk_tree_model_get (m, it, options.list_data.sep_column - 1, &name, -1); +- return (strcmp (name, options.list_data.sep_value) == 0); ++ return (name && strcmp (name, options.list_data.sep_value) == 0); + } + + static inline void diff --git a/yad-7.2-warnings.patch b/yad-7.2-warnings.patch new file mode 100644 index 0000000..5051abf --- /dev/null +++ b/yad-7.2-warnings.patch @@ -0,0 +1,127 @@ +diff -Nrup -U 8 yad-7.2/src/calendar.c yad-7.2-OK/src/calendar.c +--- yad-7.2/src/calendar.c 2019-02-20 06:36:51.000000000 +0300 ++++ yad-7.2-OK/src/calendar.c 2020-10-21 20:49:57.078416723 +0300 +@@ -42,17 +42,18 @@ parse_details () + + /* read details file */ + while (!feof (f)) + { + gchar buf[4096], **dtl; + + /* read string */ + memset (buf, 0, 4096); +- fgets (buf, 4096, f); ++ if (!fgets (buf, 4096, f)) ++ break; + if (strlen (buf) > 0) + { + dtl = g_strsplit (buf, " ", 2); + g_hash_table_insert (details, dtl[0], dtl[1]); + } + } + + fclose (f); +diff -Nrup -U 8 yad-7.2/src/main.c yad-7.2-OK/src/main.c +--- yad-7.2/src/main.c 2020-05-06 23:35:01.000000000 +0300 ++++ yad-7.2-OK/src/main.c 2020-10-21 21:17:31.777549376 +0300 +@@ -200,17 +200,17 @@ create_layout (GtkWidget *dlg) + else + gtk_label_set_text (GTK_LABEL (text), buf); + g_free (buf); + + gtk_widget_set_name (text, "yad-dialog-label"); + gtk_label_set_line_wrap (GTK_LABEL (text), TRUE); + gtk_label_set_selectable (GTK_LABEL (text), options.data.selectable_labels); + gtk_label_set_justify (GTK_LABEL (text), options.data.text_align); +- gtk_widget_set_state_flags (text, GTK_STATE_NORMAL, FALSE); ++ gtk_widget_set_state_flags (text, GTK_STATE_FLAG_NORMAL, FALSE); + gtk_label_set_xalign (GTK_LABEL (text), options.data.text_align); + gtk_widget_set_can_focus (text, FALSE); + } + } + + /* create main widget */ + switch (options.mode) + { +diff -Nrup -U 8 yad-7.2/src/option.c yad-7.2-OK/src/option.c +--- yad-7.2/src/option.c 2020-10-21 21:19:07.309807437 +0300 ++++ yad-7.2-OK/src/option.c 2020-10-21 21:09:54.549100492 +0300 +@@ -1113,17 +1113,17 @@ set_ellipsize (const gchar * option_name + } + + static gboolean + set_orient (const gchar * option_name, const gchar * value, gpointer data, GError ** err) + { + if (strncasecmp (value, "hor", 3) == 0) + options.paned_data.orient = GTK_ORIENTATION_HORIZONTAL; + else if (strncasecmp (value, "vert", 4) == 0) +- options.print_data.type = GTK_ORIENTATION_VERTICAL; ++ options.paned_data.orient = GTK_ORIENTATION_VERTICAL; + else + g_printerr (_("Unknown orientation: %s\n"), value); + + return TRUE; + } + + static gboolean + set_print_type (const gchar * option_name, const gchar * value, gpointer data, GError ** err) +diff -Nrup -U 8 yad-7.2/src/util.c yad-7.2-OK/src/util.c +--- yad-7.2/src/util.c 2020-09-11 12:05:18.000000000 +0300 ++++ yad-7.2-OK/src/util.c 2020-10-21 21:04:54.744429260 +0300 +@@ -193,17 +193,17 @@ update_preview (GtkFileChooser * chooser + else + pb = gdk_pixbuf_new_from_file_at_scale (file, 128, 128, TRUE, NULL); + if (pb) + { + struct stat st; + gchar *smtime; + + stat (file, &st); +- smtime = g_strdup_printf ("%d", st.st_mtime); ++ smtime = g_strdup_printf ("%lu", (unsigned long) st.st_mtime); + g_free (file); + + /* save thumbnail */ + if (options.common_data.large_preview) + { + g_mkdir_with_parents (large_path, 0755); + file = g_strdup_printf ("%s/%s.png", large_path, g_checksum_get_string (chs)); + } +@@ -703,16 +703,18 @@ pango_to_css (gchar *font) + + desc = pango_font_description_from_string (font); + mask = pango_font_description_get_set_fields (desc); + + if (mask & PANGO_FONT_MASK_STYLE) + { + switch (pango_font_description_get_style (desc)) + { ++ case PANGO_STYLE_NORMAL: ++ break; + case PANGO_STYLE_OBLIQUE: + g_string_append (str, "oblique "); + break; + case PANGO_STYLE_ITALIC: + g_string_append (str, "italic "); + break; + } + } +@@ -736,16 +738,18 @@ pango_to_css (gchar *font) + g_string_append (str, "Light "); + break; + case PANGO_WEIGHT_SEMILIGHT: + g_string_append (str, "Semilight "); + break; + case PANGO_WEIGHT_BOOK: + g_string_append (str, "Book "); + break; ++ case PANGO_WEIGHT_NORMAL: ++ break; + case PANGO_WEIGHT_MEDIUM: + g_string_append (str, "Medium "); + break; + case PANGO_WEIGHT_SEMIBOLD: + g_string_append (str, "Semibold "); + break; + case PANGO_WEIGHT_BOLD: + g_string_append (str, "Bold "); diff --git a/yad-7.2-window-icon.patch b/yad-7.2-window-icon.patch new file mode 100644 index 0000000..23af5bc --- /dev/null +++ b/yad-7.2-window-icon.patch @@ -0,0 +1,66 @@ +diff -Nrup -U 8 yad-7.2/src/html.c yad-7.2-OK/src/html.c +--- yad-7.2/src/html.c 2020-09-21 21:14:31.000000000 +0300 ++++ yad-7.2-OK/src/html.c 2020-10-21 20:10:42.333945968 +0300 +@@ -343,17 +343,17 @@ html_create_widget (GtkWidget * dlg) + g_signal_connect (view, "decide-policy", G_CALLBACK (policy_cb), NULL); + g_signal_connect (view, "load-changed", G_CALLBACK (loaded_cb), NULL); + + if (options.html_data.browser) + { + g_signal_connect (view, "context-menu", G_CALLBACK (menu_cb), NULL); + if (!options.data.dialog_title) + g_signal_connect (view, "notify::title", G_CALLBACK (title_cb), dlg); +- if (strcmp (options.data.window_icon, "yad") == 0) ++ if (!options.data.window_icon || strcmp (options.data.window_icon, "yad") == 0) + g_signal_connect (view, "notify::favicon", G_CALLBACK (icon_cb), dlg); + } + else + { + g_object_set (G_OBJECT(settings), "enable-caret-browsing", FALSE, NULL); + g_object_set (G_OBJECT(settings), "enable-developer-extras", FALSE, NULL); + g_object_set (G_OBJECT(settings), "enable-html5-database", FALSE, NULL); + g_object_set (G_OBJECT(settings), "enable-html5-local-storage", FALSE, NULL); +diff -Nrup -U 8 yad-7.2/src/main.c yad-7.2-OK/src/main.c +--- yad-7.2/src/main.c 2020-05-06 23:35:01.000000000 +0300 ++++ yad-7.2-OK/src/main.c 2020-10-21 20:09:55.152313327 +0300 +@@ -354,16 +354,18 @@ create_dialog (void) + /* set window icon */ + if (options.data.window_icon) + { + if (g_file_test (options.data.window_icon, G_FILE_TEST_EXISTS)) + gtk_window_set_icon_from_file (GTK_WINDOW (dlg), options.data.window_icon, NULL); + else + gtk_window_set_icon_name (GTK_WINDOW (dlg), options.data.window_icon); + } ++ else ++ gtk_window_set_icon_name (GTK_WINDOW (dlg), "yad"); + + /* set window borders */ + if (options.data.borders < 0) + options.data.borders = 2; + gtk_container_set_border_width (GTK_CONTAINER (dlg), (guint) options.data.borders); + + /* set window size and position */ + if (!options.data.maximized && !options.data.fullscreen) +diff -Nrup -U 8 yad-7.2/src/option.c yad-7.2-OK/src/option.c +--- yad-7.2/src/option.c 2020-10-21 20:13:05.839828545 +0300 ++++ yad-7.2-OK/src/option.c 2020-10-21 20:08:57.372763224 +0300 +@@ -1490,17 +1490,17 @@ yad_options_init (void) + options.vscroll_policy = GTK_POLICY_AUTOMATIC; + + /* plug settings */ + options.plug = -1; + options.tabnum = 0; + + /* Initialize general data */ + options.data.dialog_title = NULL; +- options.data.window_icon = "yad"; ++ options.data.window_icon = NULL; + #ifndef STANDALONE + options.data.width = g_settings_get_int (settings, "width"); + options.data.height = g_settings_get_int (settings, "height"); + #else + options.data.width = options.data.height = -1; + #endif + options.data.use_posx = FALSE; + options.data.posx = 0; diff --git a/yad-7.3-size-request.patch b/yad-7.3-size-request.patch new file mode 100644 index 0000000..edd5142 --- /dev/null +++ b/yad-7.3-size-request.patch @@ -0,0 +1,17 @@ +diff -Nrup -U 4 yad-7.3/src/main.c yad-7.3-OK/src/main.c +--- yad-7.3/src/main.c 2020-11-01 01:11:21.039606281 +0300 ++++ yad-7.3-OK/src/main.c 2020-11-01 01:08:25.420968575 +0300 +@@ -536,8 +536,13 @@ create_dialog (void) + + /* parse geometry or move window, if given. must be after showing widget */ + if (!options.data.maximized && !options.data.fullscreen) + { ++ gint mw, nw; ++ ++ gtk_widget_get_preferred_width (dlg, &mw, &nw); ++ gtk_widget_set_size_request (dlg, nw, -1); ++ + parse_geometry (); + g_signal_connect (G_OBJECT (dlg), "realize", G_CALLBACK (realize_cb), NULL); + gtk_widget_show_all (dlg); + } diff --git a/yad.spec b/yad.spec index 62ae41a..fec02c5 100644 --- a/yad.spec +++ b/yad.spec @@ -1,48 +1,51 @@ Name: yad -Version: 0.40.0 -Release: 2%{?dist} +Version: 7.3 +Release: 1%{?dist} Summary: Display graphical dialogs from shell scripts or command line Group: Applications/System License: GPLv3+ URL: http://sourceforge.net/projects/yad-dialog/ -Source0: http://downloads.sourceforge.net/%{name}-dialog/%{name}-%{version}.tar.xz +Source0: https://github.com/v1cont/yad/releases/download/v%{version}/yad-%{version}.tar.xz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch1: yad-7.2-sep-column.patch +Patch2: yad-7.2-window-icon.patch +Patch3: yad-7.2-warnings.patch +Patch4: yad-7.2-hscroll-policy.patch +Patch5: yad-7.3-size-request.patch -%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 -BuildRequires: gtk3-devel >= 3.0.0 -%else -BuildRequires: gtk2-devel >= 2.20.1 -%endif +BuildRequires: gtk3-devel >= 3.22.0 +BuildRequires: webkitgtk4-devel BuildRequires: desktop-file-utils BuildRequires: perl(XML::Parser) BuildRequires: intltool >= 0.40.0 BuildRequires: pkgconfig BuildRequires: gettext +BuildRequires: gtksourceview3-devel +BuildRequires: gspell-devel -%if 0%{?fedora} <= 26 || 0%{?rhel} >= 7 -BuildRequires: webkitgtk3-devel -%endif %description Yad (yet another dialog) is a fork of zenity with many improvements, such as custom buttons, additional dialogs, pop-up menu in notification icon and more. + %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + %build -%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 -%configure --enable-icon-browser --enable-html --with-gtk=gtk3 -%else -%configure --enable-icon-browser --enable-html --with-gtk=gtk2 -%endif +%configure --disable-pfd make %{?_smp_mflags} + %install -rm -rf %{buildroot} make install DESTDIR=%{buildroot} %find_lang %{name} @@ -55,30 +58,42 @@ desktop-file-install --remove-key Encoding \ --dir=%{buildroot}%{_datadir}/applications \ %{buildroot}%{_datadir}/applications/%{name}-icon-browser.desktop -%clean -rm -rf %{buildroot} %post -touch --no-create %{_datadir}/icons/hicolor &>/dev/null -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +update-desktop-database %{_datadir}/applications &>/dev/null || : +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + %postun -if [ $1 -eq 0 ]; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +update-desktop-database %{_datadir}/applications &>/dev/null || : +if [ $1 -eq 0 ] ; then + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi + +%posttrans +/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + %files -f %{name}.lang -%defattr(-,root,root,-) -%doc README.md ChangeLog.old AUTHORS COPYING NEWS THANKS TODO -%{_bindir}/%{name} -%{_bindir}/%{name}-icon-browser -%{_datadir}/icons/hicolor/*/apps/%{name}.png -%{_datadir}/applications/%{name}-icon-browser.desktop +%doc README.md AUTHORS NEWS THANKS TODO +%license COPYING +%{_bindir}/* +%{_datadir}/icons/hicolor/*/apps/* +%{_datadir}/applications/*.desktop +%{_datadir}/glib-2.0/schemas/* %{_datadir}/aclocal/%{name}.m4 -%{_mandir}/man1/%{name}.1.* +%{_mandir}/*/* + %changelog +* Mon Oct 26 2020 Dmitry Butskoy - 7.3-1 +- Upgrade to 7.3 +- add some upstream patches + * Sun Nov 19 2017 Oliver Haessler - 0.40.0-2 - added BuildRequires: webkitgtk43-devel for Fedora <=26 and EPEL (#1455282) From 0940c8641103dceee358da980b1b6bfb1797a6d3 Mon Sep 17 00:00:00 2001 From: Dmitry Butskoy Date: Sat, 6 Mar 2021 01:53:27 +0300 Subject: [PATCH 2/3] Update to 8.0 --- .gitignore | 1 + sources | 2 +- yad-7.2-hscroll-policy.patch | 12 ---- yad-7.2-sep-column.patch | 12 ---- yad-7.2-warnings.patch | 127 ----------------------------------- yad-7.2-window-icon.patch | 66 ------------------ yad.spec | 15 ++--- 7 files changed, 7 insertions(+), 228 deletions(-) delete mode 100644 yad-7.2-hscroll-policy.patch delete mode 100644 yad-7.2-sep-column.patch delete mode 100644 yad-7.2-warnings.patch delete mode 100644 yad-7.2-window-icon.patch diff --git a/.gitignore b/.gitignore index 91d9c1f..add5b05 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ /yad-0.39.0.tar.xz /yad-0.40.0.tar.xz /yad-7.3.tar.xz +/yad-8.0.tar.xz diff --git a/sources b/sources index 9f83344..35713b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (yad-7.3.tar.xz) = 335f3f325917e61dcb14f932cac3f1c63485c7797075b736968a6288e32e6c4a7aeea8b38c93493619b0c8a00e3aee72661079147cd8a19c3ca67d0e33b5db92 +SHA512 (yad-8.0.tar.xz) = d47a6c0c4d47357ee9801f8f89319d20241479b2287f3da3b5c1edc7a9ccc6933b18d4cd6c539b0ceb854c957cd8eda7b7c7c5721bf04416e25b2c59eb51a466 diff --git a/yad-7.2-hscroll-policy.patch b/yad-7.2-hscroll-policy.patch deleted file mode 100644 index 0864be2..0000000 --- a/yad-7.2-hscroll-policy.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nrbu yad-7.2/src/option.c yad-7.2-OK/src/option.c ---- yad-7.2/src/option.c 2020-10-24 03:22:22.795884753 +0300 -+++ yad-7.2-OK/src/option.c 2020-10-24 03:09:01.305076745 +0300 -@@ -1268,7 +1268,7 @@ - else - g_printerr (_("Unknown scrollbar policy type: %s\n"), value); - -- if (option_name[0] == 'h') -+ if (strcmp (option_name, "--hscroll-policy") == 0) - options.hscroll_policy = pt; - else - options.vscroll_policy = pt; diff --git a/yad-7.2-sep-column.patch b/yad-7.2-sep-column.patch deleted file mode 100644 index 5005206..0000000 --- a/yad-7.2-sep-column.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nrbu yad-7.2/src/list.c yad-7.2-OK/src/list.c ---- yad-7.2/src/list.c 2020-09-11 12:05:18.000000000 +0300 -+++ yad-7.2-OK/src/list.c 2020-10-21 19:43:39.183644629 +0300 -@@ -1118,7 +1118,7 @@ - return FALSE; - - gtk_tree_model_get (m, it, options.list_data.sep_column - 1, &name, -1); -- return (strcmp (name, options.list_data.sep_value) == 0); -+ return (name && strcmp (name, options.list_data.sep_value) == 0); - } - - static inline void diff --git a/yad-7.2-warnings.patch b/yad-7.2-warnings.patch deleted file mode 100644 index 5051abf..0000000 --- a/yad-7.2-warnings.patch +++ /dev/null @@ -1,127 +0,0 @@ -diff -Nrup -U 8 yad-7.2/src/calendar.c yad-7.2-OK/src/calendar.c ---- yad-7.2/src/calendar.c 2019-02-20 06:36:51.000000000 +0300 -+++ yad-7.2-OK/src/calendar.c 2020-10-21 20:49:57.078416723 +0300 -@@ -42,17 +42,18 @@ parse_details () - - /* read details file */ - while (!feof (f)) - { - gchar buf[4096], **dtl; - - /* read string */ - memset (buf, 0, 4096); -- fgets (buf, 4096, f); -+ if (!fgets (buf, 4096, f)) -+ break; - if (strlen (buf) > 0) - { - dtl = g_strsplit (buf, " ", 2); - g_hash_table_insert (details, dtl[0], dtl[1]); - } - } - - fclose (f); -diff -Nrup -U 8 yad-7.2/src/main.c yad-7.2-OK/src/main.c ---- yad-7.2/src/main.c 2020-05-06 23:35:01.000000000 +0300 -+++ yad-7.2-OK/src/main.c 2020-10-21 21:17:31.777549376 +0300 -@@ -200,17 +200,17 @@ create_layout (GtkWidget *dlg) - else - gtk_label_set_text (GTK_LABEL (text), buf); - g_free (buf); - - gtk_widget_set_name (text, "yad-dialog-label"); - gtk_label_set_line_wrap (GTK_LABEL (text), TRUE); - gtk_label_set_selectable (GTK_LABEL (text), options.data.selectable_labels); - gtk_label_set_justify (GTK_LABEL (text), options.data.text_align); -- gtk_widget_set_state_flags (text, GTK_STATE_NORMAL, FALSE); -+ gtk_widget_set_state_flags (text, GTK_STATE_FLAG_NORMAL, FALSE); - gtk_label_set_xalign (GTK_LABEL (text), options.data.text_align); - gtk_widget_set_can_focus (text, FALSE); - } - } - - /* create main widget */ - switch (options.mode) - { -diff -Nrup -U 8 yad-7.2/src/option.c yad-7.2-OK/src/option.c ---- yad-7.2/src/option.c 2020-10-21 21:19:07.309807437 +0300 -+++ yad-7.2-OK/src/option.c 2020-10-21 21:09:54.549100492 +0300 -@@ -1113,17 +1113,17 @@ set_ellipsize (const gchar * option_name - } - - static gboolean - set_orient (const gchar * option_name, const gchar * value, gpointer data, GError ** err) - { - if (strncasecmp (value, "hor", 3) == 0) - options.paned_data.orient = GTK_ORIENTATION_HORIZONTAL; - else if (strncasecmp (value, "vert", 4) == 0) -- options.print_data.type = GTK_ORIENTATION_VERTICAL; -+ options.paned_data.orient = GTK_ORIENTATION_VERTICAL; - else - g_printerr (_("Unknown orientation: %s\n"), value); - - return TRUE; - } - - static gboolean - set_print_type (const gchar * option_name, const gchar * value, gpointer data, GError ** err) -diff -Nrup -U 8 yad-7.2/src/util.c yad-7.2-OK/src/util.c ---- yad-7.2/src/util.c 2020-09-11 12:05:18.000000000 +0300 -+++ yad-7.2-OK/src/util.c 2020-10-21 21:04:54.744429260 +0300 -@@ -193,17 +193,17 @@ update_preview (GtkFileChooser * chooser - else - pb = gdk_pixbuf_new_from_file_at_scale (file, 128, 128, TRUE, NULL); - if (pb) - { - struct stat st; - gchar *smtime; - - stat (file, &st); -- smtime = g_strdup_printf ("%d", st.st_mtime); -+ smtime = g_strdup_printf ("%lu", (unsigned long) st.st_mtime); - g_free (file); - - /* save thumbnail */ - if (options.common_data.large_preview) - { - g_mkdir_with_parents (large_path, 0755); - file = g_strdup_printf ("%s/%s.png", large_path, g_checksum_get_string (chs)); - } -@@ -703,16 +703,18 @@ pango_to_css (gchar *font) - - desc = pango_font_description_from_string (font); - mask = pango_font_description_get_set_fields (desc); - - if (mask & PANGO_FONT_MASK_STYLE) - { - switch (pango_font_description_get_style (desc)) - { -+ case PANGO_STYLE_NORMAL: -+ break; - case PANGO_STYLE_OBLIQUE: - g_string_append (str, "oblique "); - break; - case PANGO_STYLE_ITALIC: - g_string_append (str, "italic "); - break; - } - } -@@ -736,16 +738,18 @@ pango_to_css (gchar *font) - g_string_append (str, "Light "); - break; - case PANGO_WEIGHT_SEMILIGHT: - g_string_append (str, "Semilight "); - break; - case PANGO_WEIGHT_BOOK: - g_string_append (str, "Book "); - break; -+ case PANGO_WEIGHT_NORMAL: -+ break; - case PANGO_WEIGHT_MEDIUM: - g_string_append (str, "Medium "); - break; - case PANGO_WEIGHT_SEMIBOLD: - g_string_append (str, "Semibold "); - break; - case PANGO_WEIGHT_BOLD: - g_string_append (str, "Bold "); diff --git a/yad-7.2-window-icon.patch b/yad-7.2-window-icon.patch deleted file mode 100644 index 23af5bc..0000000 --- a/yad-7.2-window-icon.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff -Nrup -U 8 yad-7.2/src/html.c yad-7.2-OK/src/html.c ---- yad-7.2/src/html.c 2020-09-21 21:14:31.000000000 +0300 -+++ yad-7.2-OK/src/html.c 2020-10-21 20:10:42.333945968 +0300 -@@ -343,17 +343,17 @@ html_create_widget (GtkWidget * dlg) - g_signal_connect (view, "decide-policy", G_CALLBACK (policy_cb), NULL); - g_signal_connect (view, "load-changed", G_CALLBACK (loaded_cb), NULL); - - if (options.html_data.browser) - { - g_signal_connect (view, "context-menu", G_CALLBACK (menu_cb), NULL); - if (!options.data.dialog_title) - g_signal_connect (view, "notify::title", G_CALLBACK (title_cb), dlg); -- if (strcmp (options.data.window_icon, "yad") == 0) -+ if (!options.data.window_icon || strcmp (options.data.window_icon, "yad") == 0) - g_signal_connect (view, "notify::favicon", G_CALLBACK (icon_cb), dlg); - } - else - { - g_object_set (G_OBJECT(settings), "enable-caret-browsing", FALSE, NULL); - g_object_set (G_OBJECT(settings), "enable-developer-extras", FALSE, NULL); - g_object_set (G_OBJECT(settings), "enable-html5-database", FALSE, NULL); - g_object_set (G_OBJECT(settings), "enable-html5-local-storage", FALSE, NULL); -diff -Nrup -U 8 yad-7.2/src/main.c yad-7.2-OK/src/main.c ---- yad-7.2/src/main.c 2020-05-06 23:35:01.000000000 +0300 -+++ yad-7.2-OK/src/main.c 2020-10-21 20:09:55.152313327 +0300 -@@ -354,16 +354,18 @@ create_dialog (void) - /* set window icon */ - if (options.data.window_icon) - { - if (g_file_test (options.data.window_icon, G_FILE_TEST_EXISTS)) - gtk_window_set_icon_from_file (GTK_WINDOW (dlg), options.data.window_icon, NULL); - else - gtk_window_set_icon_name (GTK_WINDOW (dlg), options.data.window_icon); - } -+ else -+ gtk_window_set_icon_name (GTK_WINDOW (dlg), "yad"); - - /* set window borders */ - if (options.data.borders < 0) - options.data.borders = 2; - gtk_container_set_border_width (GTK_CONTAINER (dlg), (guint) options.data.borders); - - /* set window size and position */ - if (!options.data.maximized && !options.data.fullscreen) -diff -Nrup -U 8 yad-7.2/src/option.c yad-7.2-OK/src/option.c ---- yad-7.2/src/option.c 2020-10-21 20:13:05.839828545 +0300 -+++ yad-7.2-OK/src/option.c 2020-10-21 20:08:57.372763224 +0300 -@@ -1490,17 +1490,17 @@ yad_options_init (void) - options.vscroll_policy = GTK_POLICY_AUTOMATIC; - - /* plug settings */ - options.plug = -1; - options.tabnum = 0; - - /* Initialize general data */ - options.data.dialog_title = NULL; -- options.data.window_icon = "yad"; -+ options.data.window_icon = NULL; - #ifndef STANDALONE - options.data.width = g_settings_get_int (settings, "width"); - options.data.height = g_settings_get_int (settings, "height"); - #else - options.data.width = options.data.height = -1; - #endif - options.data.use_posx = FALSE; - options.data.posx = 0; diff --git a/yad.spec b/yad.spec index fec02c5..bd019cf 100644 --- a/yad.spec +++ b/yad.spec @@ -1,5 +1,5 @@ Name: yad -Version: 7.3 +Version: 8.0 Release: 1%{?dist} Summary: Display graphical dialogs from shell scripts or command line @@ -8,11 +8,7 @@ License: GPLv3+ URL: http://sourceforge.net/projects/yad-dialog/ Source0: https://github.com/v1cont/yad/releases/download/v%{version}/yad-%{version}.tar.xz -Patch1: yad-7.2-sep-column.patch -Patch2: yad-7.2-window-icon.patch -Patch3: yad-7.2-warnings.patch -Patch4: yad-7.2-hscroll-policy.patch -Patch5: yad-7.3-size-request.patch +Patch1: yad-7.3-size-request.patch BuildRequires: gtk3-devel >= 3.22.0 BuildRequires: webkitgtk4-devel @@ -33,10 +29,6 @@ custom buttons, additional dialogs, pop-up menu in notification icon and more. %prep %setup -q %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 %build @@ -90,6 +82,9 @@ fi %changelog +* Sat Mar 6 2021 Dmitry Butskoy - 8.0-1 +- Update to 8.0 + * Mon Oct 26 2020 Dmitry Butskoy - 7.3-1 - Upgrade to 7.3 - add some upstream patches From 3ead978d79a3bea7027045a619f869a783445110 Mon Sep 17 00:00:00 2001 From: Dmitry Butskoy Date: Wed, 14 Apr 2021 21:32:58 +0300 Subject: [PATCH 3/3] Update to 9.3 --- .gitignore | 1 + sources | 2 +- yad.spec | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index add5b05..369ed60 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ /yad-0.40.0.tar.xz /yad-7.3.tar.xz /yad-8.0.tar.xz +/yad-9.3.tar.xz diff --git a/sources b/sources index 35713b9..9966185 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (yad-8.0.tar.xz) = d47a6c0c4d47357ee9801f8f89319d20241479b2287f3da3b5c1edc7a9ccc6933b18d4cd6c539b0ceb854c957cd8eda7b7c7c5721bf04416e25b2c59eb51a466 +SHA512 (yad-9.3.tar.xz) = e280123ac969beaaaf6d51eafdd3dc15b0214cc93e9e6389f9c775339d18bd0fb0d3f2cd168f886e5d87013f515721cc6f2b859d37aac59c0aa9255ff512be72 diff --git a/yad.spec b/yad.spec index bd019cf..9e0296e 100644 --- a/yad.spec +++ b/yad.spec @@ -1,5 +1,5 @@ Name: yad -Version: 8.0 +Version: 9.3 Release: 1%{?dist} Summary: Display graphical dialogs from shell scripts or command line @@ -32,7 +32,7 @@ custom buttons, additional dialogs, pop-up menu in notification icon and more. %build -%configure --disable-pfd +%configure make %{?_smp_mflags} @@ -40,6 +40,8 @@ make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} +rm -f %{buildroot}%{_bindir}/pfd + %find_lang %{name} # Encoding key in group "Desktop Entry" is deprecated. @@ -82,6 +84,9 @@ fi %changelog +* Wed Apr 14 2021 Dmitry Butskoy - 9.3-1 +- Update to 9.3 + * Sat Mar 6 2021 Dmitry Butskoy - 8.0-1 - Update to 8.0