From 0fc1a32ad048c67df6d6f070062168dba22fe358 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Sun, 13 Sep 2009 09:31:21 +0200 Subject: [PATCH] app: Kill GimpImageDock Get rid of GimpImageDock and make its subclasses inherit directly from GimpDock instead. --- app/widgets/Makefile.am | 2 -- app/widgets/gimpdockbook.c | 4 +-- app/widgets/gimpimagedock.c | 43 ----------------------------- app/widgets/gimpimagedock.h | 55 ------------------------------------- app/widgets/gimpmenudock.c | 2 +- app/widgets/gimpmenudock.h | 6 ++-- app/widgets/gimptoolbox.c | 2 +- app/widgets/gimptoolbox.h | 6 ++-- 8 files changed, 10 insertions(+), 110 deletions(-) delete mode 100644 app/widgets/gimpimagedock.c delete mode 100644 app/widgets/gimpimagedock.h diff --git a/app/widgets/Makefile.am b/app/widgets/Makefile.am index a8698a37c9..ca25311e28 100644 --- a/app/widgets/Makefile.am +++ b/app/widgets/Makefile.am @@ -179,8 +179,6 @@ libappwidgets_a_sources = \ gimphistogrameditor.h \ gimphistogramview.c \ gimphistogramview.h \ - gimpimagedock.c \ - gimpimagedock.h \ gimpimagecommenteditor.c \ gimpimagecommenteditor.h \ gimpimageeditor.c \ diff --git a/app/widgets/gimpdockbook.c b/app/widgets/gimpdockbook.c index 0793f4dde9..40aeb498ed 100644 --- a/app/widgets/gimpdockbook.c +++ b/app/widgets/gimpdockbook.c @@ -32,11 +32,11 @@ #include "core/gimpmarshal.h" #include "gimpdnd.h" +#include "gimpdock.h" #include "gimpdockable.h" #include "gimpdockbook.h" #include "gimpdocked.h" #include "gimphelp-ids.h" -#include "gimpimagedock.h" #include "gimpmenufactory.h" #include "gimpstringaction.h" #include "gimpuimanager.h" @@ -450,7 +450,7 @@ gimp_dockbook_create_tab_widget (GimpDockbook *dockbook, } /* EEK */ - if (GIMP_IS_IMAGE_DOCK (dockbook->dock) && + if (GIMP_IS_DOCK_WINDOW (dockbook->dock) && gimp_dock_window_get_ui_manager (GIMP_DOCK_WINDOW (dockbook->dock))) { const gchar *dialog_id; diff --git a/app/widgets/gimpimagedock.c b/app/widgets/gimpimagedock.c deleted file mode 100644 index c032edcbb0..0000000000 --- a/app/widgets/gimpimagedock.c +++ /dev/null @@ -1,43 +0,0 @@ -/* GIMP - The GNU Image Manipulation Program - * Copyright (C) 1995 Spencer Kimball and Peter Mattis - * - * gimpimagedock.c - * Copyright (C) 2001-2005 Michael Natterer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "config.h" - -#include - -#include "widgets-types.h" - -#include "gimpimagedock.h" - - -G_DEFINE_TYPE (GimpImageDock, gimp_image_dock, GIMP_TYPE_DOCK) - -#define parent_class gimp_image_dock_parent_class - - -static void -gimp_image_dock_class_init (GimpImageDockClass *klass) -{ -} - -static void -gimp_image_dock_init (GimpImageDock *dock) -{ -} diff --git a/app/widgets/gimpimagedock.h b/app/widgets/gimpimagedock.h deleted file mode 100644 index fbd5cfcb8f..0000000000 --- a/app/widgets/gimpimagedock.h +++ /dev/null @@ -1,55 +0,0 @@ -/* GIMP - The GNU Image Manipulation Program - * Copyright (C) 1995 Spencer Kimball and Peter Mattis - * - * gimpimagedock.h - * Copyright (C) 2001-2005 Michael Natterer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef __GIMP_IMAGE_DOCK_H__ -#define __GIMP_IMAGE_DOCK_H__ - - -#include "gimpdock.h" - - -#define GIMP_TYPE_IMAGE_DOCK (gimp_image_dock_get_type ()) -#define GIMP_IMAGE_DOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGE_DOCK, GimpImageDock)) -#define GIMP_IMAGE_DOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGE_DOCK, GimpImageDockClass)) -#define GIMP_IS_IMAGE_DOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_IMAGE_DOCK)) -#define GIMP_IS_IMAGE_DOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_IMAGE_DOCK)) -#define GIMP_IMAGE_DOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_IMAGE_DOCK, GimpImageDockClass)) - - -typedef struct _GimpImageDockClass GimpImageDockClass; - -/** - * Adds some GimpImage specific hooks and logic to GimpDock. - */ -struct _GimpImageDock -{ - GimpDock parent_instance; -}; - -struct _GimpImageDockClass -{ - GimpDockClass parent_class; -}; - - -GType gimp_image_dock_get_type (void) G_GNUC_CONST; - - -#endif /* __GIMP_IMAGE_DOCK_H__ */ diff --git a/app/widgets/gimpmenudock.c b/app/widgets/gimpmenudock.c index 3d0cd3fd06..6cf28a7fe1 100644 --- a/app/widgets/gimpmenudock.c +++ b/app/widgets/gimpmenudock.c @@ -87,7 +87,7 @@ static void gimp_menu_dock_auto_clicked (GtkWidget *widget, GimpDock *dock); -G_DEFINE_TYPE (GimpMenuDock, gimp_menu_dock, GIMP_TYPE_IMAGE_DOCK) +G_DEFINE_TYPE (GimpMenuDock, gimp_menu_dock, GIMP_TYPE_DOCK) #define parent_class gimp_menu_dock_parent_class diff --git a/app/widgets/gimpmenudock.h b/app/widgets/gimpmenudock.h index 6861968d63..f7b628abf0 100644 --- a/app/widgets/gimpmenudock.h +++ b/app/widgets/gimpmenudock.h @@ -22,7 +22,7 @@ #define __GIMP_MENU_DOCK_H__ -#include "gimpimagedock.h" +#include "gimpdock.h" #define GIMP_TYPE_MENU_DOCK (gimp_menu_dock_get_type ()) @@ -37,7 +37,7 @@ typedef struct _GimpMenuDockClass GimpMenuDockClass; struct _GimpMenuDock { - GimpImageDock parent_instance; + GimpDock parent_instance; GimpContainer *image_container; GimpContainer *display_container; @@ -53,7 +53,7 @@ struct _GimpMenuDock struct _GimpMenuDockClass { - GimpImageDockClass parent_class; + GimpDockClass parent_class; }; diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c index 5133851314..c81b87479d 100644 --- a/app/widgets/gimptoolbox.c +++ b/app/widgets/gimptoolbox.c @@ -129,7 +129,7 @@ static void toolbox_paste_received (GtkClipboard *clipboard, gpointer data); -G_DEFINE_TYPE (GimpToolbox, gimp_toolbox, GIMP_TYPE_IMAGE_DOCK) +G_DEFINE_TYPE (GimpToolbox, gimp_toolbox, GIMP_TYPE_DOCK) #define parent_class gimp_toolbox_parent_class diff --git a/app/widgets/gimptoolbox.h b/app/widgets/gimptoolbox.h index 8cf8ffff11..6d0d766e3a 100644 --- a/app/widgets/gimptoolbox.h +++ b/app/widgets/gimptoolbox.h @@ -19,7 +19,7 @@ #define __GIMP_TOOLBOX_H__ -#include "gimpimagedock.h" +#include "gimpdock.h" #define GIMP_TYPE_TOOLBOX (gimp_toolbox_get_type ()) @@ -34,7 +34,7 @@ typedef struct _GimpToolboxClass GimpToolboxClass; struct _GimpToolbox { - GimpImageDock parent_instance; + GimpDock parent_instance; GtkWidget *vbox; @@ -54,7 +54,7 @@ struct _GimpToolbox struct _GimpToolboxClass { - GimpImageDockClass parent_class; + GimpDockClass parent_class; };