Accepting request 1153930 from GNOME:Apps
OBS-URL: https://build.opensuse.org/request/show/1153930 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/geeqie?expand=0&rev=33
This commit is contained in:
commit
f7b1ae4569
265
geeqie-2.2-fix-filelist-crash.patch
Normal file
265
geeqie-2.2-fix-filelist-crash.patch
Normal file
@ -0,0 +1,265 @@
|
||||
Based on:
|
||||
|
||||
From 439fc96a603c140926de30d2fa7f1b85e1e40905 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Clark <colin.clark@cclark.uk>
|
||||
Date: Thu, 29 Feb 2024 10:05:11 +0000
|
||||
Subject: [PATCH] Fix #1248: Crash when hiding file list
|
||||
|
||||
https://github.com/BestImageViewer/geeqie/issues/1248
|
||||
|
||||
Fix problems resulting from 6d72bf GTK4: Reduce the use of
|
||||
gtk_widget_destroy()
|
||||
Index: geeqie-2.2/src/bar-exif.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/bar-exif.cc
|
||||
+++ geeqie-2.2/src/bar-exif.cc
|
||||
@@ -119,7 +119,10 @@ static void bar_pane_exif_setup_entry_bo
|
||||
gboolean horizontal = !ee->editable;
|
||||
gboolean editable = ee->editable;
|
||||
|
||||
- if (ee->box) g_object_unref(ee->box);
|
||||
+ if (ee->box)
|
||||
+ {
|
||||
+ gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(ee->box)), ee->box);
|
||||
+ }
|
||||
|
||||
ee->box = horizontal ? gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0) : gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
|
||||
gq_gtk_container_add(GTK_WIDGET(ee->ebox), ee->box);
|
||||
@@ -600,7 +603,7 @@ static void bar_pane_exif_conf_dialog_cb
|
||||
static void bar_pane_exif_delete_entry_cb(GtkWidget *, gpointer data)
|
||||
{
|
||||
auto entry = static_cast<GtkWidget *>(data);
|
||||
- g_object_unref(entry);
|
||||
+ gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(entry)), entry);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GTK4
|
||||
Index: geeqie-2.2/src/bar.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/bar.cc
|
||||
+++ geeqie-2.2/src/bar.cc
|
||||
@@ -30,6 +30,17 @@
|
||||
#include "ui-menu.h"
|
||||
#include "ui-misc.h"
|
||||
|
||||
+
|
||||
+namespace
|
||||
+{
|
||||
+
|
||||
+void remove_child_from_parent(gpointer data)
|
||||
+{
|
||||
+ gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(GTK_WIDGET(data))), GTK_WIDGET(data));
|
||||
+}
|
||||
+
|
||||
+}
|
||||
+
|
||||
struct KnownPanes
|
||||
{
|
||||
PaneType type;
|
||||
@@ -275,7 +286,7 @@ static void height_spin_key_press_cb(Gtk
|
||||
{
|
||||
if ((keyval == GDK_KEY_Return || keyval == GDK_KEY_Escape))
|
||||
{
|
||||
- g_object_unref(GTK_WIDGET(data));
|
||||
+ gq_gtk_widget_destroy(GTK_WIDGET(data));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,7 +350,7 @@ static void bar_expander_height_cb(GtkWi
|
||||
static void bar_expander_delete_cb(GtkWidget *, gpointer data)
|
||||
{
|
||||
auto expander = static_cast<GtkWidget *>(data);
|
||||
- g_object_unref(expander);
|
||||
+ gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(expander)), expander);
|
||||
}
|
||||
|
||||
static void bar_expander_add_cb(GtkWidget *widget, gpointer)
|
||||
@@ -585,7 +596,7 @@ void bar_clear(GtkWidget *bar)
|
||||
|
||||
list = gtk_container_get_children(GTK_CONTAINER(bd->vbox));
|
||||
|
||||
- g_list_free_full(list, reinterpret_cast<GDestroyNotify>(g_object_unref));
|
||||
+ g_list_free_full(list, reinterpret_cast<GDestroyNotify>(remove_child_from_parent));
|
||||
}
|
||||
|
||||
void bar_write_config(GtkWidget *bar, GString *outstr, gint indent)
|
||||
Index: geeqie-2.2/src/collect-table.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/collect-table.cc
|
||||
+++ geeqie-2.2/src/collect-table.cc
|
||||
@@ -2642,7 +2642,7 @@ static void collection_table_destroy(Gtk
|
||||
{
|
||||
g_signal_handlers_disconnect_matched(G_OBJECT(ct->popup), G_SIGNAL_MATCH_DATA,
|
||||
0, 0, nullptr, nullptr, ct);
|
||||
- g_object_unref(ct->popup);
|
||||
+ gq_gtk_widget_destroy(ct->popup);
|
||||
}
|
||||
|
||||
if (ct->sync_idle_id) g_source_remove(ct->sync_idle_id);
|
||||
Index: geeqie-2.2/src/image.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/image.cc
|
||||
+++ geeqie-2.2/src/image.cc
|
||||
@@ -2162,7 +2162,7 @@ void image_set_frame(ImageWindow *imd, g
|
||||
if (imd->frame)
|
||||
{
|
||||
gtk_container_remove(GTK_CONTAINER(imd->frame), imd->pr);
|
||||
- g_object_unref(imd->frame);
|
||||
+ gtk_container_remove(GTK_CONTAINER(imd->widget), imd->frame);
|
||||
imd->frame = nullptr;
|
||||
}
|
||||
gq_gtk_box_pack_start(GTK_BOX(imd->widget), imd->pr, TRUE, TRUE, 0);
|
||||
Index: geeqie-2.2/src/pan-view/pan-view-filter.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/pan-view/pan-view-filter.cc
|
||||
+++ geeqie-2.2/src/pan-view/pan-view-filter.cc
|
||||
@@ -144,7 +144,7 @@ static void pan_filter_kw_button_cb(GtkB
|
||||
|
||||
/** @todo (xsdg): Fix filter element pointed object memory leak. */
|
||||
ui->filter_elements = g_list_delete_link(ui->filter_elements, cb_state->filter_element);
|
||||
- g_object_unref(GTK_WIDGET(widget));
|
||||
+ gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(GTK_WIDGET(widget))), GTK_WIDGET(widget));
|
||||
g_free(cb_state);
|
||||
|
||||
pan_filter_status(pw, _("Removed keyword…"));
|
||||
@@ -227,7 +227,7 @@ void pan_filter_toggle_cb(GtkWidget *but
|
||||
|
||||
parent = gtk_widget_get_parent(ui->filter_button_arrow);
|
||||
|
||||
- g_object_unref(ui->filter_button_arrow);
|
||||
+ gtk_container_remove(GTK_CONTAINER(parent), ui->filter_button_arrow);
|
||||
ui->filter_button_arrow = gtk_image_new_from_icon_name(GQ_ICON_PAN_UP, GTK_ICON_SIZE_BUTTON);
|
||||
|
||||
gq_gtk_box_pack_start(GTK_BOX(parent), ui->filter_button_arrow, FALSE, FALSE, 0);
|
||||
@@ -241,7 +241,7 @@ void pan_filter_toggle_cb(GtkWidget *but
|
||||
|
||||
parent = gtk_widget_get_parent(ui->filter_button_arrow);
|
||||
|
||||
- g_object_unref(ui->filter_button_arrow);
|
||||
+ gtk_container_remove(GTK_CONTAINER(parent), ui->filter_button_arrow);
|
||||
ui->filter_button_arrow = gtk_image_new_from_icon_name(GQ_ICON_PAN_DOWN, GTK_ICON_SIZE_BUTTON);
|
||||
|
||||
gq_gtk_box_pack_start(GTK_BOX(parent), ui->filter_button_arrow, FALSE, FALSE, 0);
|
||||
Index: geeqie-2.2/src/pan-view/pan-view-search.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/pan-view/pan-view-search.cc
|
||||
+++ geeqie-2.2/src/pan-view/pan-view-search.cc
|
||||
@@ -432,7 +432,7 @@ void pan_search_toggle_cb(GtkWidget *but
|
||||
|
||||
parent = gtk_widget_get_parent(ui->search_button_arrow);
|
||||
|
||||
- g_object_unref(ui->search_button_arrow);
|
||||
+ gtk_container_remove(GTK_CONTAINER(parent), ui->search_button_arrow);
|
||||
ui->search_button_arrow = gtk_image_new_from_icon_name(GQ_ICON_PAN_UP, GTK_ICON_SIZE_BUTTON);
|
||||
|
||||
gq_gtk_box_pack_start(GTK_BOX(parent), ui->search_button_arrow, FALSE, FALSE, 0);
|
||||
@@ -446,7 +446,7 @@ void pan_search_toggle_cb(GtkWidget *but
|
||||
|
||||
parent = gtk_widget_get_parent(ui->search_button_arrow);
|
||||
|
||||
- g_object_unref(ui->search_button_arrow);
|
||||
+ gtk_container_remove(GTK_CONTAINER(parent), ui->search_button_arrow);
|
||||
ui->search_button_arrow = gtk_image_new_from_icon_name(GQ_ICON_PAN_DOWN, GTK_ICON_SIZE_BUTTON);
|
||||
|
||||
gq_gtk_box_pack_start(GTK_BOX(parent), ui->search_button_arrow, FALSE, FALSE, 0);
|
||||
Index: geeqie-2.2/src/preferences.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/preferences.cc
|
||||
+++ geeqie-2.2/src/preferences.cc
|
||||
@@ -1477,7 +1477,7 @@ static void font_response_cb(GtkDialog *
|
||||
g_free(font);
|
||||
}
|
||||
|
||||
- g_object_unref(dialog);
|
||||
+ gq_gtk_widget_destroy(GTK_WIDGET(dialog));
|
||||
}
|
||||
|
||||
static void image_overlay_set_font_cb(GtkWidget *widget, gpointer)
|
||||
@@ -1522,7 +1522,7 @@ static void text_color_response_cb(GtkDi
|
||||
c_options->image_overlay.text_alpha = color.alpha * 255;
|
||||
}
|
||||
|
||||
- g_object_unref(dialog);
|
||||
+ gq_gtk_widget_destroy(GTK_WIDGET(dialog));
|
||||
}
|
||||
|
||||
static void image_overlay_set_text_color_cb(GtkWidget *widget, gpointer)
|
||||
Index: geeqie-2.2/src/ui-misc.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/ui-misc.cc
|
||||
+++ geeqie-2.2/src/ui-misc.cc
|
||||
@@ -806,7 +806,7 @@ static void date_selection_popup_hide(Da
|
||||
|
||||
gtk_widget_hide(ds->window);
|
||||
|
||||
- g_object_unref(ds->window);
|
||||
+ gq_gtk_widget_destroy(ds->window);
|
||||
ds->window = nullptr;
|
||||
ds->calendar = nullptr;
|
||||
|
||||
Index: geeqie-2.2/src/ui-utildlg.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/ui-utildlg.cc
|
||||
+++ geeqie-2.2/src/ui-utildlg.cc
|
||||
@@ -534,7 +534,7 @@ static gboolean appimage_notification_cl
|
||||
|
||||
if (appimage_data->window)
|
||||
{
|
||||
- g_object_unref(appimage_data->window);
|
||||
+ gq_gtk_widget_destroy(appimage_data->window);
|
||||
}
|
||||
|
||||
g_thread_pool_free(appimage_data->thread_pool, TRUE, TRUE);
|
||||
Index: geeqie-2.2/src/utilops.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/utilops.cc
|
||||
+++ geeqie-2.2/src/utilops.cc
|
||||
@@ -1980,8 +1980,7 @@ static void file_util_warn_op_in_progres
|
||||
|
||||
static void file_util_details_dialog_close_cb(GtkWidget *, gpointer data)
|
||||
{
|
||||
- g_object_unref(GTK_WIDGET(data));
|
||||
-
|
||||
+ gq_gtk_widget_destroy(GTK_WIDGET(data));
|
||||
}
|
||||
|
||||
static void file_util_details_dialog_destroy_cb(GtkWidget *widget, gpointer data)
|
||||
Index: geeqie-2.2/src/view-dir.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/view-dir.cc
|
||||
+++ geeqie-2.2/src/view-dir.cc
|
||||
@@ -130,7 +130,7 @@ static void vd_destroy_cb(GtkWidget *wid
|
||||
{
|
||||
g_signal_handlers_disconnect_matched(G_OBJECT(vd->popup), G_SIGNAL_MATCH_DATA,
|
||||
0, 0, nullptr, nullptr, vd);
|
||||
- g_object_unref(vd->popup);
|
||||
+ gq_gtk_widget_destroy(vd->popup);
|
||||
}
|
||||
|
||||
switch (vd->type)
|
||||
Index: geeqie-2.2/src/view-file/view-file-icon.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/view-file/view-file-icon.cc
|
||||
+++ geeqie-2.2/src/view-file/view-file-icon.cc
|
||||
@@ -368,7 +368,7 @@ static void tip_show(ViewFile *vf)
|
||||
|
||||
static void tip_hide(ViewFile *vf)
|
||||
{
|
||||
- if (VFICON(vf)->tip_window) g_object_unref(VFICON(vf)->tip_window);
|
||||
+ if (VFICON(vf)->tip_window) gq_gtk_widget_destroy(VFICON(vf)->tip_window);
|
||||
VFICON(vf)->tip_window = nullptr;
|
||||
}
|
||||
|
||||
Index: geeqie-2.2/src/view-file/view-file.cc
|
||||
===================================================================
|
||||
--- geeqie-2.2.orig/src/view-file/view-file.cc
|
||||
+++ geeqie-2.2/src/view-file/view-file.cc
|
||||
@@ -828,7 +828,7 @@ static void vf_destroy_cb(GtkWidget *wid
|
||||
{
|
||||
g_signal_handlers_disconnect_matched(G_OBJECT(vf->popup), G_SIGNAL_MATCH_DATA,
|
||||
0, 0, nullptr, nullptr, vf);
|
||||
- g_object_unref(vf->popup);
|
||||
+ gq_gtk_widget_destroy(vf->popup);
|
||||
}
|
||||
|
||||
if (vf->read_metadata_in_idle_id)
|
25
geeqie-2.2-fix-rename-crash.patch
Normal file
25
geeqie-2.2-fix-rename-crash.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From fef4012de70dc468b00c7d07549f7b447cf47f13 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Clark <colin.clark@cclark.uk>
|
||||
Date: Wed, 7 Feb 2024 16:20:11 +0000
|
||||
Subject: [PATCH] Fix #1242: Renaming files results in a crash
|
||||
|
||||
https://github.com/BestImageViewer/geeqie/issues/1242
|
||||
|
||||
Fix bug from GTK4: Reduce the use of gtk_widget_destroy() 6d72bf20cc
|
||||
---
|
||||
src/ui-tree-edit.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/ui-tree-edit.cc b/src/ui-tree-edit.cc
|
||||
index 2921d0de..c63dcd40 100644
|
||||
--- a/src/ui-tree-edit.cc
|
||||
+++ b/src/ui-tree-edit.cc
|
||||
@@ -38,7 +38,7 @@ static void tree_edit_close(TreeEditData *ted)
|
||||
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
|
||||
gdk_pointer_ungrab(GDK_CURRENT_TIME);
|
||||
|
||||
- g_object_unref(ted->window);
|
||||
+ gq_gtk_widget_destroy(ted->window);
|
||||
|
||||
g_free(ted->old_name);
|
||||
g_free(ted->new_name);
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 1 10:53:10 UTC 2024 - Michael Vetter <mvetter@suse.com>
|
||||
|
||||
- boo#1220031:
|
||||
* Fix crash when hiding files gh/BestImageViewer/geeqie#1248
|
||||
Add geeqie-2.2-fix-filelist-crash.patch
|
||||
* Fix crash when renaming files gh/BestImageViewer/geeqie#1242
|
||||
Add geeqie-2.2-fix-rename-crash.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 26 09:42:15 UTC 2024 - Marcel Kuehlhorn <tux93@opensuse.org>
|
||||
|
||||
|
@ -26,6 +26,10 @@ URL: http://www.geeqie.org
|
||||
Source0: https://github.com/BestImageViewer/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
|
||||
Source1: https://github.com/BestImageViewer/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz.asc
|
||||
Source2: geeqie.keyring
|
||||
# PATCH-FIX-UPSTREAM - gh/BestImageViewer/geeqie#1248
|
||||
Patch0: geeqie-2.2-fix-filelist-crash.patch
|
||||
# PATCH-FIX-UPSTREAM - gh/BestImageViewer/geeqie#1242
|
||||
Patch1: https://github.com/BestImageViewer/geeqie/commit/fef4012de70dc468b00c7d07549f7b447cf47f13.patch#/geeqie-2.2-fix-rename-crash.patch
|
||||
BuildRequires: c++_compiler
|
||||
BuildRequires: docbook_4
|
||||
BuildRequires: doxygen
|
||||
|
Loading…
Reference in New Issue
Block a user