Don't leak the tooltip object.
2004-03-17 Morten Welinder <terra@gnome.org> * tests/prop-editor.c (create_prop_editor): Don't leak the tooltip object.
This commit is contained in:
		
				
					committed by
					
						
						Morten Welinder
					
				
			
			
				
	
			
			
			
						parent
						
							3c20703bd7
						
					
				
				
					commit
					c25fece766
				
			@ -1,5 +1,8 @@
 | 
			
		||||
2004-03-17  Morten Welinder  <terra@gnome.org>
 | 
			
		||||
 | 
			
		||||
	* tests/prop-editor.c (create_prop_editor): Don't leak the tooltip
 | 
			
		||||
	object.
 | 
			
		||||
 | 
			
		||||
	* gtk/gtkfilechooserdefault.c (check_icon_theme): Do nothing if we
 | 
			
		||||
	have no screen.  Fixes #137260.
 | 
			
		||||
	(shortcuts_add_bookmark_from_path): Simplify using check_is_folder
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,8 @@
 | 
			
		||||
2004-03-17  Morten Welinder  <terra@gnome.org>
 | 
			
		||||
 | 
			
		||||
	* tests/prop-editor.c (create_prop_editor): Don't leak the tooltip
 | 
			
		||||
	object.
 | 
			
		||||
 | 
			
		||||
	* gtk/gtkfilechooserdefault.c (check_icon_theme): Do nothing if we
 | 
			
		||||
	have no screen.  Fixes #137260.
 | 
			
		||||
	(shortcuts_add_bookmark_from_path): Simplify using check_is_folder
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,8 @@
 | 
			
		||||
2004-03-17  Morten Welinder  <terra@gnome.org>
 | 
			
		||||
 | 
			
		||||
	* tests/prop-editor.c (create_prop_editor): Don't leak the tooltip
 | 
			
		||||
	object.
 | 
			
		||||
 | 
			
		||||
	* gtk/gtkfilechooserdefault.c (check_icon_theme): Do nothing if we
 | 
			
		||||
	have no screen.  Fixes #137260.
 | 
			
		||||
	(shortcuts_add_bookmark_from_path): Simplify using check_is_folder
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,8 @@
 | 
			
		||||
2004-03-17  Morten Welinder  <terra@gnome.org>
 | 
			
		||||
 | 
			
		||||
	* tests/prop-editor.c (create_prop_editor): Don't leak the tooltip
 | 
			
		||||
	object.
 | 
			
		||||
 | 
			
		||||
	* gtk/gtkfilechooserdefault.c (check_icon_theme): Do nothing if we
 | 
			
		||||
	have no screen.  Fixes #137260.
 | 
			
		||||
	(shortcuts_add_bookmark_from_path): Simplify using check_is_folder
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,8 @@
 | 
			
		||||
2004-03-17  Morten Welinder  <terra@gnome.org>
 | 
			
		||||
 | 
			
		||||
	* tests/prop-editor.c (create_prop_editor): Don't leak the tooltip
 | 
			
		||||
	object.
 | 
			
		||||
 | 
			
		||||
	* gtk/gtkfilechooserdefault.c (check_icon_theme): Do nothing if we
 | 
			
		||||
	have no screen.  Fixes #137260.
 | 
			
		||||
	(shortcuts_add_bookmark_from_path): Simplify using check_is_folder
 | 
			
		||||
 | 
			
		||||
@ -772,6 +772,12 @@ properties_from_type (GObject     *object,
 | 
			
		||||
  return sw;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
kill_tips (GtkWindow *win, GtkObject *tips)
 | 
			
		||||
{
 | 
			
		||||
  gtk_object_destroy (tips);
 | 
			
		||||
  g_object_unref (tips);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Pass zero for type if you want all properties */
 | 
			
		||||
GtkWidget*
 | 
			
		||||
@ -799,8 +805,11 @@ create_prop_editor (GObject   *object,
 | 
			
		||||
			   gtk_widget_get_screen (GTK_WIDGET (object)));
 | 
			
		||||
 | 
			
		||||
  tips = gtk_tooltips_new ();
 | 
			
		||||
  g_signal_connect_swapped (win, "destroy",
 | 
			
		||||
			    G_CALLBACK (gtk_object_destroy), tips);
 | 
			
		||||
  g_object_ref (tips);
 | 
			
		||||
  gtk_object_sink (GTK_OBJECT (tips));
 | 
			
		||||
 | 
			
		||||
  /* Kill the tips when the widget goes away.  */
 | 
			
		||||
  g_signal_connect (G_OBJECT (win), "destroy", G_CALLBACK (kill_tips), tips);
 | 
			
		||||
 | 
			
		||||
  /* hold a weak ref to the object we're editing */
 | 
			
		||||
  g_object_set_data_full (G_OBJECT (object), "prop-editor-win", win, model_destroy);
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user