summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcaja-private/caja-icon-container.c40
1 files changed, 4 insertions, 36 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index e3457f31..b9a7dfc4 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -4565,7 +4565,6 @@ size_allocate (GtkWidget *widget,
static void
realize (GtkWidget *widget)
{
- GdkBitmap *stipple;
GtkAdjustment *vadj, *hadj;
CajaIconContainer *container;
@@ -4581,15 +4580,10 @@ realize (GtkWidget *widget)
}
/* Set up DnD. */
- caja_icon_dnd_init (container, NULL);
+ caja_icon_dnd_init (container);
setup_label_gcs (container);
- stipple = eel_stipple_bitmap_for_screen
- (gdk_drawable_get_screen (GDK_DRAWABLE (gtk_widget_get_window (widget))));
-
- caja_icon_dnd_set_stipple (container, stipple);
-
hadj = gtk_layout_get_hadjustment (GTK_LAYOUT (widget));
g_signal_connect (hadj, "value_changed",
G_CALLBACK (handle_hadjustment_changed), widget);
@@ -4603,20 +4597,10 @@ realize (GtkWidget *widget)
static void
unrealize (GtkWidget *widget)
{
- int i;
CajaIconContainer *container;
container = CAJA_ICON_CONTAINER (widget);
- for (i = 0; i < LAST_LABEL_COLOR; i++)
- {
- if (container->details->label_gcs [i])
- {
- g_object_unref (container->details->label_gcs [i]);
- container->details->label_gcs [i] = NULL;
- }
- }
-
caja_icon_dnd_fini (container);
if (container->details->typeselect_flush_timeout)
@@ -9331,8 +9315,8 @@ caja_icon_container_set_single_click_mode (CajaIconContainer *container,
/* update the label color when the background changes */
-GdkGC *
-caja_icon_container_get_label_color_and_gc (CajaIconContainer *container,
+void
+caja_icon_container_get_label_color (CajaIconContainer *container,
GdkColor **color,
gboolean is_name,
gboolean is_highlight,
@@ -9388,28 +9372,12 @@ caja_icon_container_get_label_color_and_gc (CajaIconContainer *container,
{
*color = &container->details->label_colors [idx];
}
-
- return container->details->label_gcs [idx];
}
static void
setup_gc_with_fg (CajaIconContainer *container, int idx, guint32 color)
{
- GdkGC *gc;
- GdkColor gcolor;
-
- gcolor = eel_gdk_rgb_to_color (color);
- container->details->label_colors [idx] = gcolor;
-
- gc = gdk_gc_new (gtk_layout_get_bin_window (GTK_LAYOUT (container)));
- gdk_gc_set_rgb_fg_color (gc, &gcolor);
-
- if (container->details->label_gcs [idx])
- {
- g_object_unref (container->details->label_gcs [idx]);
- }
-
- container->details->label_gcs [idx] = gc;
+ container->details->label_colors [idx] = eel_gdk_rgb_to_color (color);
}
static void