35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
$OpenBSD: patch-gtk_gtkfilechooserdefault_c,v 1.4 2018/06/24 07:12:33 ajacoutot Exp $
|
|
|
|
From 168434c4a1ba90609b6f58d0098436c6be7be75b Mon Sep 17 00:00:00 2001
|
|
From: Daniel Boles <dboles.src@gmail.com>
|
|
Date: Fri, 22 Jun 2018 15:10:56 +0100
|
|
Subject: [PATCH] FileChooserDefault: Avoid printf()ing a NULL char*
|
|
|
|
Index: gtk/gtkfilechooserdefault.c
|
|
--- gtk/gtkfilechooserdefault.c.orig
|
|
+++ gtk/gtkfilechooserdefault.c
|
|
@@ -2810,8 +2810,8 @@ bookmarks_check_remove_sensitivity (GtkFileChooserDefa
|
|
{
|
|
GtkTreeIter iter;
|
|
gboolean removable = FALSE;
|
|
+ gboolean have_bookmark_name = FALSE;
|
|
gchar *name = NULL;
|
|
- gchar *tip;
|
|
|
|
if (shortcuts_get_selected (impl, &iter))
|
|
{
|
|
@@ -2820,6 +2820,13 @@ bookmarks_check_remove_sensitivity (GtkFileChooserDefa
|
|
SHORTCUTS_COL_NAME, &name,
|
|
-1);
|
|
gtk_widget_set_sensitive (impl->browse_shortcuts_remove_button, removable);
|
|
+
|
|
+ have_bookmark_name = name != NULL && name[0] != '\0';
|
|
+ }
|
|
+
|
|
+ if (have_bookmark_name)
|
|
+ {
|
|
+ char *tip;
|
|
|
|
if (removable)
|
|
tip = g_strdup_printf (_("Remove the bookmark '%s'"), name);
|