Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rofi-calc for openSUSE:Factory 
checked in at 2024-04-02 16:40:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rofi-calc (Old)
 and      /work/SRC/openSUSE:Factory/.rofi-calc.new.1905 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rofi-calc"

Tue Apr  2 16:40:16 2024 rev:15 rq:1163544 version:2.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/rofi-calc/rofi-calc.changes      2023-04-29 
17:28:35.838656909 +0200
+++ /work/SRC/openSUSE:Factory/.rofi-calc.new.1905/rofi-calc.changes    
2024-04-02 16:40:31.785068196 +0200
@@ -1,0 +2,7 @@
+Fri Mar 29 14:13:52 UTC 2024 - Michael Vetter <mvet...@suse.com>
+
+- Update to 2.2.1:
+  * Fix skip escaping some unicode math symbols #109
+  * Fix functions crashing with libqalculate 5 #117
+
+-------------------------------------------------------------------

Old:
----
  v2.2.0.tar.gz

New:
----
  v2.2.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rofi-calc.spec ++++++
--- /var/tmp/diff_new_pack.tzqhZE/_old  2024-04-02 16:40:32.441092371 +0200
+++ /var/tmp/diff_new_pack.tzqhZE/_new  2024-04-02 16:40:32.445092519 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rofi-calc
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           rofi-calc
-Version:        2.2.0
+Version:        2.2.1
 Release:        0
 Summary:        Calculator for rofi
 License:        MIT

++++++ v2.2.0.tar.gz -> v2.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rofi-calc-2.2.0/CHANGELOG.md 
new/rofi-calc-2.2.1/CHANGELOG.md
--- old/rofi-calc-2.2.0/CHANGELOG.md    2023-04-27 16:16:00.000000000 +0200
+++ new/rofi-calc-2.2.1/CHANGELOG.md    2024-03-28 15:36:51.000000000 +0100
@@ -6,6 +6,10 @@
 and this project adheres to [Semantic Versioning](http://semver.org/).
 
 ## [Unreleased] - ReleaseDate
+- Fix skip escaping some unicode math symbols 
[#109](https://github.com/svenstaro/rofi-calc/pull/109) (thanks @arades79)
+- Fix functions crashing with libqalculate 5 
[#117](https://github.com/svenstaro/rofi-calc/issues/117) (thanks tiosgz)
+
+## [2.2.0] - 2023-04-27
 - Fix high CPU usage when input isn't empty 
[#66](https://github.com/svenstaro/rofi-calc/pull/66) (thanks @bootstrap-prime)
 - Add `-automatic-save-to-history` option 
[#87](https://github.com/svenstaro/rofi-calc/pull/87) (thanks @matejdro)
 
@@ -25,6 +29,8 @@
 - Add `-no-unicode` option to disable aforementioned unicode support
 
 <!-- next-url -->
-[Unreleased]: https://github.com/svenstaro/rofi-calc/compare/v2.0.0...HEAD
+[Unreleased]: https://github.com/svenstaro/rofi-calc/compare/v2.2.0...HEAD
+[2.2.0]: https://github.com/svenstaro/rofi-calc/compare/v2.1.0...v2.2.0
+[2.1.0]: https://github.com/svenstaro/rofi-calc/compare/v2.0.0...v2.1.0
 [2.0.0]: https://github.com/svenstaro/rofi-calc/compare/v1.9...v2.0.0
 [1.9]: https://github.com/svenstaro/rofi-calc/compare/v1.8...v1.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rofi-calc-2.2.0/README.md 
new/rofi-calc-2.2.1/README.md
--- old/rofi-calc-2.2.0/README.md       2023-04-27 16:16:00.000000000 +0200
+++ new/rofi-calc-2.2.1/README.md       2024-03-28 15:36:51.000000000 +0100
@@ -27,7 +27,7 @@
 
 ### Via package manager
 
-* [Arch Linux](https://www.archlinux.org/packages/community/x86_64/rofi-calc/)
+* [Arch Linux](https://archlinux.org/packages/extra/x86_64/rofi-calc/)
 * [FreeBSD](https://www.freshports.org/x11/rofi-calc/)
 * [Gentoo](https://packages.gentoo.org/packages/x11-misc/rofi-calc)
 * [openSUSE](https://software.opensuse.org/package/rofi-calc)
@@ -43,7 +43,7 @@
 * Debian: `apt install rofi-dev qalc libtool libtool-bin`
 * Ubuntu: `apt install rofi-dev qalc libtool`
 * Solus: `eopkg it rofi-devel libqalculate`
-* CentOS, Fedora: Install `qalculate` (find `rofi-devel` headers yourself)
+* CentOS, Fedora: Install `qalculate automake libtool` (find `rofi-devel` 
headers yourself)
 * Others: look it up :)
 
 Some distributions ship an [extremely 
outdated](https://github.com/svenstaro/rofi-calc/issues/7) version of 
`qalculate` so you might have to compile your own. If that is the case, see 
[here](https://github.com/svenstaro/rofi-calc/wiki/Installing-libqalculate-from-source).
@@ -52,12 +52,14 @@
 
 ```bash
 $ git clone https://github.com/svenstaro/rofi-calc.git
+$ cd rofi-calc/
+$ mkdir m4
 $ autoreconf -i
 $ mkdir build
 $ cd build/
 $ ../configure
 $ make
-$ make install
+# make install
 ```
 
 ## Advanced Usage
@@ -135,6 +137,26 @@
 - Use the `-hint-result` option to specify the text of the hint before result.
 - Use the `-hint-welcome` option to specify the welcome text.
 
+## Custom Rofi Theme compatibility
+
+If you are using a custom theme with rofi (e.g. `rofi -show drun -theme 
~/.config/rofi/mytheme.rasi`) and don't see the result of the calculation, 
that's because the rofi-calc mode relies on the `message` widget that might be 
hidden by some themes.
+
+In your `mytheme.rasi` file or any file, it might `@import`, look for the 
following
+```
+mainbox {
+    children: [...]
+}
+```
+make sure the list contains `message`<br>
+for example 
+```
+mainbox {
+    children: [inputbar, message, listview]
+}
+```
+Reference Rofi docs: 
[Layout](https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#layout),
 [Base 
Widgets](https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#base-widgets),
 
[Children](https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#children)
+
+
 ## Development
 
 If you're developing this, it might be helpful to start rofi directly with a 
locally compiled plugin like this:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rofi-calc-2.2.0/src/calc.c 
new/rofi-calc-2.2.1/src/calc.c
--- old/rofi-calc-2.2.0/src/calc.c      2023-04-27 16:16:00.000000000 +0200
+++ new/rofi-calc-2.2.1/src/calc.c      2024-03-28 15:36:51.000000000 +0100
@@ -407,7 +407,9 @@
             NULL);
     g_free(parts);
 
-    gchar *escaped_cmd = g_strescape(user_cmd, NULL);
+    // don't escape these utf-8 runes which appear in qalc output, the escape 
sequences are not recognized by shell (#108)
+    static const char *unescaped_chars = "·−×√²³⊻↊↋¬°";
+    gchar *escaped_cmd = g_strescape(user_cmd, unescaped_chars);
     gchar *complete_cmd = g_strdup_printf("/bin/sh -c \"%s\"", escaped_cmd);
     g_free(user_cmd);
     g_free(escaped_cmd);
@@ -529,8 +531,12 @@
     g_subprocess_wait_check_finish(process, res, &error);
 
     if (error != NULL) {
-        g_error("Process errored with: %s", error->message);
+        // With qalculate >= 5.0.0, exit status 1 can mean bad (or incomplete) 
input
+        if (error->domain != G_SPAWN_EXIT_ERROR || error-> code != 1) {
+            g_error("Process errored with: %s", error->message);
+        }
         g_error_free(error);
+        error = NULL;
     }
 
     unsigned int stdout_bufsize = 4096;
@@ -540,6 +546,7 @@
     if (error != NULL) {
         g_error("Process errored with: %s", error->message);
         g_error_free(error);
+        error = NULL;
     }
 
     unsigned int line_length = strcspn(stdout_buf, "\n");
@@ -549,6 +556,7 @@
     if (error != NULL) {
         g_error("Process errored with: %s", error->message);
         g_error_free(error);
+        error = NULL;
     }
 
     rofi_view_reload();

Reply via email to