From bfe4ac492b868fdd85f3e514134f04428f29a646 Mon Sep 17 00:00:00 2001 From: Larry Hajali Date: Sun, 4 Jun 2017 09:52:06 -0700 Subject: academic/qalculate-gtk: Updated for version 0.9.12 Signed-off-by: Larry Hajali --- academic/qalculate-gtk/qalculate-gtk.SlackBuild | 6 +- academic/qalculate-gtk/qalculate-gtk.info | 6 +- .../qalculate-gtk/revert-gtk3-deprecation.patch | 66 ++++++++++++++++++++++ 3 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 academic/qalculate-gtk/revert-gtk3-deprecation.patch diff --git a/academic/qalculate-gtk/qalculate-gtk.SlackBuild b/academic/qalculate-gtk/qalculate-gtk.SlackBuild index 85cbbe3d86..48480b39f0 100644 --- a/academic/qalculate-gtk/qalculate-gtk.SlackBuild +++ b/academic/qalculate-gtk/qalculate-gtk.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=qalculate-gtk -VERSION=${VERSION:-0.9.11} +VERSION=${VERSION:-0.9.12} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -69,6 +69,10 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Revert gtk+3 deprecation. +# https://github.com/Qalculate/qalculate-gtk/commit/652371c4575cbbcd62351f07f45e369a2de7e101 +patch -p1 < $CWD/revert-gtk3-deprecation.patch + # Fix .desktop file. sed -i 's|.png||' data/$PRGNAM.desktop.in diff --git a/academic/qalculate-gtk/qalculate-gtk.info b/academic/qalculate-gtk/qalculate-gtk.info index 879c10545e..400d276f99 100644 --- a/academic/qalculate-gtk/qalculate-gtk.info +++ b/academic/qalculate-gtk/qalculate-gtk.info @@ -1,8 +1,8 @@ PRGNAM="qalculate-gtk" -VERSION="0.9.11" +VERSION="0.9.12" HOMEPAGE="http://qalculate.github.io/" -DOWNLOAD="https://github.com/Qalculate/qalculate-gtk/releases/download/v0.9.11/qalculate-gtk-0.9.11.tar.gz" -MD5SUM="3f81a7fcba203797185c3f0cb7b201c4" +DOWNLOAD="https://github.com/Qalculate/qalculate-gtk/releases/download/v0.9.12/qalculate-gtk-0.9.12.tar.gz" +MD5SUM="61065bd9e18e2ee4f48571de7ac7d2f4" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="libqalculate" diff --git a/academic/qalculate-gtk/revert-gtk3-deprecation.patch b/academic/qalculate-gtk/revert-gtk3-deprecation.patch new file mode 100644 index 0000000000..9eb81e6797 --- /dev/null +++ b/academic/qalculate-gtk/revert-gtk3-deprecation.patch @@ -0,0 +1,66 @@ +diff -Naur qalculate-gtk-0.9.12.orig/src/callbacks.cc qalculate-gtk-0.9.12/src/callbacks.cc +--- qalculate-gtk-0.9.12.orig/src/callbacks.cc 2017-03-19 07:28:32.000000000 +0000 ++++ qalculate-gtk-0.9.12/src/callbacks.cc 2017-06-04 16:43:47.433439521 +0000 +@@ -7194,7 +7194,7 @@ + } else if(response == GTK_RESPONSE_HELP) { + GError *error = NULL; + //gtk_show_uri(NULL, "ghelp:qalculate-gtk?qalculate-unit-creation", gtk_get_current_event_time(), &error); +- gtk_show_uri_on_window(GTK_WINDOW(gtk_builder_get_object(unitedit_builder, "unit_edit_dialog")), "file://" PACKAGE_DOC_DIR "/html/qalculate-units.html#qalculate-unit-creation", gtk_get_current_event_time(), &error); ++ gtk_show_uri(NULL, "file://" PACKAGE_DOC_DIR "/html/qalculate-units.html#qalculate-unit-creation", gtk_get_current_event_time(), &error); + if(error) { + gchar *error_str = g_locale_to_utf8(error->message, -1, NULL, NULL, NULL); + GtkWidget *d = gtk_message_dialog_new (GTK_WINDOW(gtk_builder_get_object(unitedit_builder, "unit_edit_dialog")), (GtkDialogFlags) 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Could not display help.\n%s"), error_str); +@@ -7539,7 +7539,7 @@ + } else if(response == GTK_RESPONSE_HELP) { + GError *error = NULL; + //gtk_show_uri(NULL, "ghelp:qalculate-gtk?qalculate-function-creation", gtk_get_current_event_time(), &error); +- gtk_show_uri_on_window(GTK_WINDOW(gtk_builder_get_object(functionedit_builder, "function_edit_dialog")), "file://" PACKAGE_DOC_DIR "/html/qalculate-functions.html#qalculate-function-creation", gtk_get_current_event_time(), &error); ++ gtk_show_uri(NULL, "file://" PACKAGE_DOC_DIR "/html/qalculate-functions.html#qalculate-function-creation", gtk_get_current_event_time(), &error); + if(error) { + gchar *error_str = g_locale_to_utf8(error->message, -1, NULL, NULL, NULL); + GtkWidget *d = gtk_message_dialog_new (GTK_WINDOW(gtk_builder_get_object(functionedit_builder, "function_edit_dialog")), (GtkDialogFlags) 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Could not display help.\n%s"), error_str); +@@ -7730,7 +7730,7 @@ + } else if(response == GTK_RESPONSE_HELP) { + GError *error = NULL; + //gtk_show_uri(NULL, "ghelp:qalculate-gtk?qalculate-variable-creation", gtk_get_current_event_time(), &error); +- gtk_show_uri_on_window(GTK_WINDOW(gtk_builder_get_object(unknownedit_builder, "unknown_edit_dialog")), "file://" PACKAGE_DOC_DIR "/html/qalculate-variables.html#qalculate-variable-creation", gtk_get_current_event_time(), &error); ++ gtk_show_uri(NULL, "file://" PACKAGE_DOC_DIR "/html/qalculate-variables.html#qalculate-variable-creation", gtk_get_current_event_time(), &error); + if(error) { + gchar *error_str = g_locale_to_utf8(error->message, -1, NULL, NULL, NULL); + GtkWidget *d = gtk_message_dialog_new (GTK_WINDOW(gtk_builder_get_object(unknownedit_builder, "unknown_edit_dialog")), (GtkDialogFlags) 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Could not display help.\n%s"), error_str); +@@ -7899,7 +7899,7 @@ + } else if(response == GTK_RESPONSE_HELP) { + GError *error = NULL; + //gtk_show_uri(NULL, "ghelp:qalculate-gtk?qalculate-variable-creation", gtk_get_current_event_time(), &error); +- gtk_show_uri_on_window(GTK_WINDOW(gtk_builder_get_object(variableedit_builder, "variable_edit_dialog")), "file://" PACKAGE_DOC_DIR "/html/qalculate-variables.html#qalculate-variable-creation", gtk_get_current_event_time(), &error); ++ gtk_show_uri(NULL, "file://" PACKAGE_DOC_DIR "/html/qalculate-variables.html#qalculate-variable-creation", gtk_get_current_event_time(), &error); + if(error) { + gchar *error_str = g_locale_to_utf8(error->message, -1, NULL, NULL, NULL); + GtkWidget *d = gtk_message_dialog_new (GTK_WINDOW(gtk_builder_get_object(variableedit_builder, "variable_edit_dialog")), (GtkDialogFlags) 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Could not display help.\n%s"), error_str); +@@ -8189,7 +8189,7 @@ + } else if(response == GTK_RESPONSE_HELP) { + GError *error = NULL; + //gtk_show_uri(NULL, "ghelp:qalculate-gtk?qalculate-vectors-matrices", gtk_get_current_event_time(), &error); +- gtk_show_uri_on_window(GTK_WINDOW(gtk_builder_get_object(matrixedit_builder, "matrix_edit_dialog")), "file://" PACKAGE_DOC_DIR "/html/qalculate-variables.html#qalculate-vectors-matrices", gtk_get_current_event_time(), &error); ++ gtk_show_uri(NULL, "file://" PACKAGE_DOC_DIR "/html/qalculate-variables.html#qalculate-vectors-matrices", gtk_get_current_event_time(), &error); + if(error) { + gchar *error_str = g_locale_to_utf8(error->message, -1, NULL, NULL, NULL); + GtkWidget *d = gtk_message_dialog_new (GTK_WINDOW(gtk_builder_get_object(matrixedit_builder, "matrix_edit_dialog")), (GtkDialogFlags) 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Could not display help.\n%s"), error_str); +@@ -14755,7 +14755,7 @@ + void on_menu_item_help_activate(GtkMenuItem*, gpointer) { + GError *error = NULL; + //gtk_show_uri(NULL, "ghelp:qalculate-gtk", gtk_get_current_event_time(), &error); +- gtk_show_uri_on_window(GTK_WINDOW(gtk_builder_get_object(main_builder, "main_window")), "file://" PACKAGE_DOC_DIR "/html/index.html", gtk_get_current_event_time(), &error); ++ gtk_show_uri(NULL, "file://" PACKAGE_DOC_DIR "/html/index.html", gtk_get_current_event_time(), &error); + if(error) { + gchar *error_str = g_locale_to_utf8(error->message, -1, NULL, NULL, NULL); + GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(gtk_builder_get_object(main_builder, "main_window")), (GtkDialogFlags) 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Could not display help for Qalculate!.\n%s"), error_str); +@@ -15699,7 +15699,7 @@ + void on_plot_button_help_clicked(GtkButton, gpointer) { + GError *error = NULL; + //gtk_show_uri(NULL, "ghelp:qalculate-gtk?qalculate-plotting", gtk_get_current_event_time(), &error); +- gtk_show_uri_on_window(GTK_WINDOW(gtk_builder_get_object(plot_builder, "plot_dialog")), "file://" PACKAGE_DOC_DIR "/html/qalculate-plotting.html", gtk_get_current_event_time(), &error); ++ gtk_show_uri(NULL, "file://" PACKAGE_DOC_DIR "/html/qalculate-plotting.html", gtk_get_current_event_time(), &error); + if(error) { + gchar *error_str = g_locale_to_utf8(error->message, -1, NULL, NULL, NULL); + GtkWidget *d = gtk_message_dialog_new (GTK_WINDOW(gtk_builder_get_object(plot_builder, "plot_dialog")), (GtkDialogFlags) 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Could not display help.\n%s"), error_str); -- cgit v1.2.3