From f7276747ab4240532078ae7d4385ef0a705f82a0 Mon Sep 17 00:00:00 2001 From: Ramiro Estrugo Date: Tue, 29 Aug 2000 02:11:38 +0000 Subject: Add unref/ref functions for gcs that take NULL. * libnautilus-extensions/nautilus-buffered-widget.c: (nautilus_buffered_widget_initialize), (nautilus_buffered_widget_destroy), (buffered_widget_update_pixbuf), (create_background_pixbuf_from_none), (create_background_pixbuf_from_solid), (create_background_pixbuf_from_ancestor), (create_background_pixbuf), (nautilus_buffered_widget_get_vertical_offset), (nautilus_buffered_widget_set_background_type), (nautilus_buffered_widget_get_background_type), (nautilus_buffered_widget_set_background_color), (nautilus_buffered_widget_get_background_color): * libnautilus-extensions/nautilus-buffered-widget.h: * libnautilus-extensions/nautilus-gdk-extensions.c: (nautilus_gdk_gc_ref_if_not_null), (nautilus_gdk_gc_unref_if_not_null): * libnautilus-extensions/nautilus-gdk-extensions.h: Add unref/ref functions for gcs that take NULL. * libnautilus-extensions/nautilus-label.c: (nautilus_label_new): * libnautilus-extensions/nautilus-label.h: Make the constructor work just like GtkLabel by accepting a string. * components/music/nautilus-music-view.c: (nautilus_music_view_initialize), (add_play_controls): Use the new NautilusLabel constructor. * components/services/nautilus-dependent-shared/shared-service-widg ets.c: (create_label_widget): Use the new NautilusLabel constructor. * src/nautilus-first-time-druid.c: (make_anti_aliased_label), (set_up_update_feedback_page): Use the new NautilusLabel constructor. * src/nautilus-property-browser.c: (nautilus_property_browser_initialize), (make_properties_from_directory_path), (make_properties_from_xml_node), (make_category_link): Use the new NautilusLabel constructor. Fix the tile names to be antialises by using the new buffered widget SOLID background mode. * src/nautilus-sidebar-title.c: (sidebar_create_smooth_components_if_needed): Use the new NautilusLabel constructor. * src/nautilus-theme-selector.c: (nautilus_theme_selector_initialize): Use the new NautilusLabel constructor. * test/test-nautilus-image.c: (main): * test/test-nautilus-label.c: (main): Use the new NautilusLabel constructor. --- test/test-nautilus-image.c | 4 +--- test/test-nautilus-label.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/test-nautilus-image.c b/test/test-nautilus-image.c index 8361672d1..8d2af9786 100644 --- a/test/test-nautilus-image.c +++ b/test/test-nautilus-image.c @@ -609,7 +609,7 @@ main (int argc, char* argv[]) main_box = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), main_box); - label = nautilus_label_new (); + label = nautilus_label_new ("Label that doesn't suck\nFoo\nBar"); bottom_box = gtk_vbox_new (FALSE, 4); @@ -623,8 +623,6 @@ main (int argc, char* argv[]) gtk_box_pack_start (GTK_BOX (bottom_box), tool_box2, TRUE, TRUE, 0); gtk_box_pack_end (GTK_BOX (bottom_box), tool_box3, TRUE, TRUE, 10); - nautilus_label_set_text (NAUTILUS_LABEL (label), "Label that doesn't suck\nFoo\nBar"); - gtk_box_pack_start (GTK_BOX (main_box), label, TRUE, TRUE, 10); gtk_box_pack_end (GTK_BOX (main_box), bottom_box, TRUE, TRUE, 10); diff --git a/test/test-nautilus-label.c b/test/test-nautilus-label.c index 217780490..ce4aabfa7 100644 --- a/test/test-nautilus-label.c +++ b/test/test-nautilus-label.c @@ -635,7 +635,7 @@ main (int argc, char* argv[]) main_box = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), main_box); - label = nautilus_label_new (); + label = nautilus_label_new ("Label that doesn't suck\nFoo\nBar"); bottom_box = gtk_vbox_new (FALSE, 4); @@ -649,8 +649,6 @@ main (int argc, char* argv[]) gtk_box_pack_start (GTK_BOX (bottom_box), tool_box2, TRUE, TRUE, 0); gtk_box_pack_end (GTK_BOX (bottom_box), tool_box3, TRUE, TRUE, 10); - nautilus_label_set_text (NAUTILUS_LABEL (label), "Label that doesn't suck\nFoo\nBar"); - gtk_box_pack_start (GTK_BOX (main_box), label, TRUE, TRUE, 10); gtk_box_pack_end (GTK_BOX (main_box), bottom_box, TRUE, TRUE, 10); -- cgit v1.2.1