Merge branch 'dboles/gtk2-filechooser-bookmark-null-name' into 'gtk-2-24'
FileChooserDefault: Avoid printf()ing a NULL char* See merge request GNOME/gtk!213
This commit is contained in:
@@ -2810,8 +2810,8 @@ bookmarks_check_remove_sensitivity (GtkFileChooserDefault *impl)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gboolean removable = FALSE;
|
||||
gboolean have_name = FALSE;
|
||||
gchar *name = NULL;
|
||||
gchar *tip;
|
||||
|
||||
if (shortcuts_get_selected (impl, &iter))
|
||||
{
|
||||
@@ -2821,6 +2821,13 @@ bookmarks_check_remove_sensitivity (GtkFileChooserDefault *impl)
|
||||
-1);
|
||||
gtk_widget_set_sensitive (impl->browse_shortcuts_remove_button, removable);
|
||||
|
||||
have_name = name != NULL && name[0] != '\0';
|
||||
}
|
||||
|
||||
if (have_name)
|
||||
{
|
||||
char *tip;
|
||||
|
||||
if (removable)
|
||||
tip = g_strdup_printf (_("Remove the bookmark '%s'"), name);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user