aboutsummaryrefslogtreecommitdiff
path: root/academic/qalculate-gtk/revert-gtk3-deprecation.patch
blob: 9eb81e6797355a46e6c67580a2a559cd0497eb16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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);