Commit bc41f73c authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Only set the text if it is not NULL. (#319930, Thomas Klausner)

2005-10-27  Matthias Clasen  <mclasen@redhat.com>

	* demos/gtk-demo/clipboard.c (paste_received): Only set the
	text if it is not NULL.  (#319930, Thomas Klausner)

	* gtk/gtkselection.c (gtk_selection_data_get_pixbuf): Close the
	loader before trying to get the pixbuf.  (#319930, Thomas Klausner)
parent e80f12b6
2005-10-27 Matthias Clasen <mclasen@redhat.com>
* demos/gtk-demo/clipboard.c (paste_received): Only set the
text if it is not NULL. (#319930, Thomas Klausner)
* gtk/gtkselection.c (gtk_selection_data_get_pixbuf): Close the
loader before trying to get the pixbuf. (#319930, Thomas Klausner)
2005-10-26 Matthias Clasen <mclasen@redhat.com> 2005-10-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilesystem.c (gtk_file_system_module_load): * gtk/gtkfilesystem.c (gtk_file_system_module_load):
......
2005-10-27 Matthias Clasen <mclasen@redhat.com>
* demos/gtk-demo/clipboard.c (paste_received): Only set the
text if it is not NULL. (#319930, Thomas Klausner)
* gtk/gtkselection.c (gtk_selection_data_get_pixbuf): Close the
loader before trying to get the pixbuf. (#319930, Thomas Klausner)
2005-10-26 Matthias Clasen <mclasen@redhat.com> 2005-10-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilesystem.c (gtk_file_system_module_load): * gtk/gtkfilesystem.c (gtk_file_system_module_load):
......
...@@ -41,7 +41,8 @@ paste_received (GtkClipboard *clipboard, ...@@ -41,7 +41,8 @@ paste_received (GtkClipboard *clipboard,
entry = GTK_WIDGET (user_data); entry = GTK_WIDGET (user_data);
/* Set the entry text */ /* Set the entry text */
gtk_entry_set_text (GTK_ENTRY (entry), text); if(text)
gtk_entry_set_text (GTK_ENTRY (entry), text);
} }
void void
......
...@@ -1416,16 +1416,16 @@ gtk_selection_data_get_pixbuf (GtkSelectionData *selection_data) ...@@ -1416,16 +1416,16 @@ gtk_selection_data_get_pixbuf (GtkSelectionData *selection_data)
{ {
loader = gdk_pixbuf_loader_new (); loader = gdk_pixbuf_loader_new ();
if (gdk_pixbuf_loader_write (loader, gdk_pixbuf_loader_write (loader,
selection_data->data, selection_data->data,
selection_data->length, selection_data->length,
NULL)) NULL);
result = gdk_pixbuf_loader_get_pixbuf (loader); gdk_pixbuf_loader_close (loader, NULL);
result = gdk_pixbuf_loader_get_pixbuf (loader);
if (result) if (result)
g_object_ref (result); g_object_ref (result);
gdk_pixbuf_loader_close (loader, NULL);
g_object_unref (loader); g_object_unref (loader);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment