diff --git a/ChangeLog b/ChangeLog index 4b4e2e2d7f..79fbb0a411 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-02-08 Michael Natterer + + * libgimp/gimpfileselection.[ch] + * libgimp/gimppatheditor.[ch]: unref pixmaps here, too. + 2000-02-08 Michael Natterer * app/gimpdnd.[ch]: added a frame around all dnd previews. Fixed a diff --git a/libgimp/gimpfileselection.c b/libgimp/gimpfileselection.c index e3317adde6..f4d6a4307e 100644 --- a/libgimp/gimpfileselection.c +++ b/libgimp/gimpfileselection.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * gimpfileselection.c - * Copyright (C) 1999 Michael Natterer + * Copyright (C) 1999 Michael Natterer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -82,6 +82,16 @@ gimp_file_selection_destroy (GtkObject *object) if (gfs->title) g_free (gfs->title); + if (gfs->yes_pixmap) + gdk_pixmap_unref (gfs->yes_pixmap); + if (gfs->yes_mask) + gdk_bitmap_unref (gfs->yes_mask); + + if (gfs->no_pixmap) + gdk_pixmap_unref (gfs->no_pixmap); + if (gfs->no_mask) + gdk_bitmap_unref (gfs->no_mask); + if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } diff --git a/libgimp/gimpfileselection.h b/libgimp/gimpfileselection.h index f7615a6d6c..2343a07170 100644 --- a/libgimp/gimpfileselection.h +++ b/libgimp/gimpfileselection.h @@ -2,7 +2,7 @@ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * gimpfileselection.h - * Copyright (C) 1999 Michael Natterer + * Copyright (C) 1999 Michael Natterer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libgimp/gimppatheditor.c b/libgimp/gimppatheditor.c index 028ac49d71..e0f47a9b68 100644 --- a/libgimp/gimppatheditor.c +++ b/libgimp/gimppatheditor.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * gimppatheditor.c - * Copyright (C) 1999 Michael Natterer + * Copyright (C) 1999 Michael Natterer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -41,11 +41,6 @@ static void gimp_path_editor_move_callback (GtkWidget *widget, gpointer data) static void gimp_path_editor_filesel_callback (GtkWidget *widget, gpointer data); static void gimp_path_editor_delete_callback (GtkWidget *widget, gpointer data); -/* -static void gimp_path_editor_check_path (GimpPathEditor *gpe, - GtkWidget *list_item); -*/ - enum { PATH_CHANGED, @@ -260,6 +255,9 @@ gimp_path_editor_realize (GtkWidget *widget) gtk_widget_show (gtk_pixmap); gtk_widget_show (gpe->new_button); + gdk_pixmap_unref (pixmap); + gdk_bitmap_unref (mask); + pixmap = gdk_pixmap_create_from_xpm_d (widget->window, &mask, &style->bg[GTK_STATE_NORMAL], @@ -269,6 +267,9 @@ gimp_path_editor_realize (GtkWidget *widget) gtk_widget_show (gtk_pixmap); gtk_widget_show (gpe->up_button); + gdk_pixmap_unref (pixmap); + gdk_bitmap_unref (mask); + pixmap = gdk_pixmap_create_from_xpm_d (widget->window, &mask, &style->bg[GTK_STATE_NORMAL], @@ -278,6 +279,9 @@ gimp_path_editor_realize (GtkWidget *widget) gtk_widget_show (gtk_pixmap); gtk_widget_show (gpe->down_button); + gdk_pixmap_unref (pixmap); + gdk_bitmap_unref (mask); + pixmap = gdk_pixmap_create_from_xpm_d (widget->window, &mask, &style->bg[GTK_STATE_NORMAL], @@ -287,12 +291,8 @@ gimp_path_editor_realize (GtkWidget *widget) gtk_widget_show (gtk_pixmap); gtk_widget_show (gpe->delete_button); - /* - for (list = GTK_LIST (gpe->dir_list)->children; list; list = list->next) - { - gimp_path_editor_check_path (gpe, GTK_WIDGET (list->data)); - } - */ + gdk_pixmap_unref (pixmap); + gdk_bitmap_unref (mask); } gchar * @@ -505,15 +505,5 @@ gimp_path_editor_filesel_callback (GtkWidget *widget, (GtkDestroyNotify) g_free); } - /* gimp_path_editor_check_path (gpe, gpe->selected_item); */ - gtk_signal_emit (GTK_OBJECT (gpe), gimp_path_editor_signals[PATH_CHANGED]); } - -/* -static void gimp_path_editor_check_path (GimpPathEditor *gpe, - GtkWidget *list_item) -{ - g_print ("check path\n"); -} -*/ diff --git a/libgimp/gimppatheditor.h b/libgimp/gimppatheditor.h index 66cc77179d..0c19a3c7ae 100644 --- a/libgimp/gimppatheditor.h +++ b/libgimp/gimppatheditor.h @@ -2,7 +2,7 @@ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * gimppatheditor.h - * Copyright (C) 1999 Michael Natterer + * Copyright (C) 1999 Michael Natterer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libgimpwidgets/gimpfileentry.c b/libgimpwidgets/gimpfileentry.c index e3317adde6..f4d6a4307e 100644 --- a/libgimpwidgets/gimpfileentry.c +++ b/libgimpwidgets/gimpfileentry.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * gimpfileselection.c - * Copyright (C) 1999 Michael Natterer + * Copyright (C) 1999 Michael Natterer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -82,6 +82,16 @@ gimp_file_selection_destroy (GtkObject *object) if (gfs->title) g_free (gfs->title); + if (gfs->yes_pixmap) + gdk_pixmap_unref (gfs->yes_pixmap); + if (gfs->yes_mask) + gdk_bitmap_unref (gfs->yes_mask); + + if (gfs->no_pixmap) + gdk_pixmap_unref (gfs->no_pixmap); + if (gfs->no_mask) + gdk_bitmap_unref (gfs->no_mask); + if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } diff --git a/libgimpwidgets/gimpfileentry.h b/libgimpwidgets/gimpfileentry.h index f7615a6d6c..2343a07170 100644 --- a/libgimpwidgets/gimpfileentry.h +++ b/libgimpwidgets/gimpfileentry.h @@ -2,7 +2,7 @@ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * gimpfileselection.h - * Copyright (C) 1999 Michael Natterer + * Copyright (C) 1999 Michael Natterer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libgimpwidgets/gimpfileselection.c b/libgimpwidgets/gimpfileselection.c index e3317adde6..f4d6a4307e 100644 --- a/libgimpwidgets/gimpfileselection.c +++ b/libgimpwidgets/gimpfileselection.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * gimpfileselection.c - * Copyright (C) 1999 Michael Natterer + * Copyright (C) 1999 Michael Natterer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -82,6 +82,16 @@ gimp_file_selection_destroy (GtkObject *object) if (gfs->title) g_free (gfs->title); + if (gfs->yes_pixmap) + gdk_pixmap_unref (gfs->yes_pixmap); + if (gfs->yes_mask) + gdk_bitmap_unref (gfs->yes_mask); + + if (gfs->no_pixmap) + gdk_pixmap_unref (gfs->no_pixmap); + if (gfs->no_mask) + gdk_bitmap_unref (gfs->no_mask); + if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } diff --git a/libgimpwidgets/gimpfileselection.h b/libgimpwidgets/gimpfileselection.h index f7615a6d6c..2343a07170 100644 --- a/libgimpwidgets/gimpfileselection.h +++ b/libgimpwidgets/gimpfileselection.h @@ -2,7 +2,7 @@ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * gimpfileselection.h - * Copyright (C) 1999 Michael Natterer + * Copyright (C) 1999 Michael Natterer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libgimpwidgets/gimppatheditor.c b/libgimpwidgets/gimppatheditor.c index 028ac49d71..e0f47a9b68 100644 --- a/libgimpwidgets/gimppatheditor.c +++ b/libgimpwidgets/gimppatheditor.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * gimppatheditor.c - * Copyright (C) 1999 Michael Natterer + * Copyright (C) 1999 Michael Natterer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -41,11 +41,6 @@ static void gimp_path_editor_move_callback (GtkWidget *widget, gpointer data) static void gimp_path_editor_filesel_callback (GtkWidget *widget, gpointer data); static void gimp_path_editor_delete_callback (GtkWidget *widget, gpointer data); -/* -static void gimp_path_editor_check_path (GimpPathEditor *gpe, - GtkWidget *list_item); -*/ - enum { PATH_CHANGED, @@ -260,6 +255,9 @@ gimp_path_editor_realize (GtkWidget *widget) gtk_widget_show (gtk_pixmap); gtk_widget_show (gpe->new_button); + gdk_pixmap_unref (pixmap); + gdk_bitmap_unref (mask); + pixmap = gdk_pixmap_create_from_xpm_d (widget->window, &mask, &style->bg[GTK_STATE_NORMAL], @@ -269,6 +267,9 @@ gimp_path_editor_realize (GtkWidget *widget) gtk_widget_show (gtk_pixmap); gtk_widget_show (gpe->up_button); + gdk_pixmap_unref (pixmap); + gdk_bitmap_unref (mask); + pixmap = gdk_pixmap_create_from_xpm_d (widget->window, &mask, &style->bg[GTK_STATE_NORMAL], @@ -278,6 +279,9 @@ gimp_path_editor_realize (GtkWidget *widget) gtk_widget_show (gtk_pixmap); gtk_widget_show (gpe->down_button); + gdk_pixmap_unref (pixmap); + gdk_bitmap_unref (mask); + pixmap = gdk_pixmap_create_from_xpm_d (widget->window, &mask, &style->bg[GTK_STATE_NORMAL], @@ -287,12 +291,8 @@ gimp_path_editor_realize (GtkWidget *widget) gtk_widget_show (gtk_pixmap); gtk_widget_show (gpe->delete_button); - /* - for (list = GTK_LIST (gpe->dir_list)->children; list; list = list->next) - { - gimp_path_editor_check_path (gpe, GTK_WIDGET (list->data)); - } - */ + gdk_pixmap_unref (pixmap); + gdk_bitmap_unref (mask); } gchar * @@ -505,15 +505,5 @@ gimp_path_editor_filesel_callback (GtkWidget *widget, (GtkDestroyNotify) g_free); } - /* gimp_path_editor_check_path (gpe, gpe->selected_item); */ - gtk_signal_emit (GTK_OBJECT (gpe), gimp_path_editor_signals[PATH_CHANGED]); } - -/* -static void gimp_path_editor_check_path (GimpPathEditor *gpe, - GtkWidget *list_item) -{ - g_print ("check path\n"); -} -*/ diff --git a/libgimpwidgets/gimppatheditor.h b/libgimpwidgets/gimppatheditor.h index 66cc77179d..0c19a3c7ae 100644 --- a/libgimpwidgets/gimppatheditor.h +++ b/libgimpwidgets/gimppatheditor.h @@ -2,7 +2,7 @@ * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball * * gimppatheditor.h - * Copyright (C) 1999 Michael Natterer + * Copyright (C) 1999 Michael Natterer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public