From e87b3e8dbe619182d280c33bc7bed1c2913b7b0f Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Mon, 18 Feb 2019 21:44:17 +0100
Subject: Marked all panels as being able to get closed.

---
 src/gtkext/gtkdockable-int.h |  4 ----
 src/gtkext/gtkdockable.c     | 26 --------------------------
 src/gtkext/gtkdockable.h     |  3 ---
 src/gtkext/gtkdockstation.c  |  7 -------
 src/gui/panels/bookmarks.c   |  1 -
 src/gui/panels/panel-int.h   |  1 -
 src/gui/panels/panel.c       | 31 -------------------------------
 src/gui/panels/strings.c     |  1 -
 8 files changed, 74 deletions(-)

diff --git a/src/gtkext/gtkdockable-int.h b/src/gtkext/gtkdockable-int.h
index d4cd2d1..3295a14 100644
--- a/src/gtkext/gtkdockable-int.h
+++ b/src/gtkext/gtkdockable-int.h
@@ -35,9 +35,6 @@
 /* Indique si le composant représenté à du contenu à fouiller. */
 typedef bool (* can_dockable_search_fc) (const GtkDockable *);
 
-/* Indique si le composant peut être désencapsulé manuellement. */
-typedef bool (* can_dockable_be_closed_fc) (const GtkDockable *);
-
 /* Fournit le nom court du composant encapsulable. */
 typedef const char * (* get_dockable_name_fc) (const GtkDockable *);
 
@@ -57,7 +54,6 @@ struct _GtkDockableIface
     GTypeInterface base_iface;              /* A laisser en premier        */
 
     can_dockable_search_fc can_search;      /* Contenu fouillable ?        */
-    can_dockable_be_closed_fc can_be_closed;/* Fermeture possible ?        */
 
     get_dockable_name_fc get_name;          /* Nom pour titre              */
     get_dockable_desc_fc get_desc;          /* Description humaine         */
diff --git a/src/gtkext/gtkdockable.c b/src/gtkext/gtkdockable.c
index 71c6826..52c1696 100644
--- a/src/gtkext/gtkdockable.c
+++ b/src/gtkext/gtkdockable.c
@@ -215,32 +215,6 @@ bool gtk_dockable_can_search(const GtkDockable *dockable)
 *                                                                             *
 *  Paramètres  : dockable = instance GTK dont l'interface est à consulter.    *
 *                                                                             *
-*  Description : Indique si le composant peut être désencapsulé manuellement. *
-*                                                                             *
-*  Retour      : -                                                            *
-*                                                                             *
-*  Remarques   : -                                                            *
-*                                                                             *
-******************************************************************************/
-
-bool gtk_dockable_can_be_closed(const GtkDockable *dockable)
-{
-    bool result;                            /* Indication à retourner      */
-    GtkDockableIface *iface;                /* Interface utilisée          */
-
-    iface = GTK_DOCKABLE_GET_IFACE(dockable);
-
-    result = iface->can_be_closed(dockable);
-
-    return result;
-
-}
-
-
-/******************************************************************************
-*                                                                             *
-*  Paramètres  : dockable = instance GTK dont l'interface est à consulter.    *
-*                                                                             *
 *  Description : Fournit le composant graphique intégrable dans un ensemble.  *
 *                                                                             *
 *  Retour      : Composant graphique prêt à emploi.                           *
diff --git a/src/gtkext/gtkdockable.h b/src/gtkext/gtkdockable.h
index bf0c7e6..15bc08f 100644
--- a/src/gtkext/gtkdockable.h
+++ b/src/gtkext/gtkdockable.h
@@ -52,9 +52,6 @@ GType gtk_dockable_get_type(void) G_GNUC_CONST;
 /* Indique si le composant représenté à du contenu à fouiller. */
 bool gtk_dockable_can_search(const GtkDockable *);
 
-/* Indique si le composant peut être désencapsulé manuellement. */
-bool gtk_dockable_can_be_closed(const GtkDockable *);
-
 /* Fournit le nom court du composant encapsulable. */
 const char *gtk_dockable_get_name(const GtkDockable *);
 
diff --git a/src/gtkext/gtkdockstation.c b/src/gtkext/gtkdockstation.c
index b08c8db..7882351 100644
--- a/src/gtkext/gtkdockstation.c
+++ b/src/gtkext/gtkdockstation.c
@@ -231,13 +231,6 @@ static gboolean gtk_dock_station_switch_panel(GtkNotebook *notebook, gpointer *p
     else
         gtk_widget_hide(button);
 
-    button = GTK_WIDGET(g_object_get_data(G_OBJECT(station), "close"));
-
-    if (gtk_dockable_can_be_closed(dockable))
-        gtk_widget_show(button);
-    else
-        gtk_widget_hide(button);
-
     /* Remontée du changement d'onglet */
 
     g_signal_emit_by_name(station, "switch-widget", widget);
diff --git a/src/gui/panels/bookmarks.c b/src/gui/panels/bookmarks.c
index 91301bc..c141ff3 100644
--- a/src/gui/panels/bookmarks.c
+++ b/src/gui/panels/bookmarks.c
@@ -215,7 +215,6 @@ static void g_bookmarks_panel_class_init(GBookmarksPanelClass *klass)
     panel = G_PANEL_ITEM_CLASS(klass);
 
     panel->can_search = true;
-    panel->can_be_closed = true;
 
     panel->update_filtered = (update_filtered_fc)update_filtered_bookmarks;
 
diff --git a/src/gui/panels/panel-int.h b/src/gui/panels/panel-int.h
index a8326ad..07aafc1 100644
--- a/src/gui/panels/panel-int.h
+++ b/src/gui/panels/panel-int.h
@@ -99,7 +99,6 @@ struct _GPanelItemClass
     const char *bindings;                   /* Raccourci clavier éventuel  */
 
     bool can_search;                        /* Contenu fouillable ?        */
-    bool can_be_closed;                     /* Fermeture possible ?        */
 
     ack_dock_process_fc ack_dock;           /* Prise en compte d'accroche  */
     ack_undock_process_fc ack_undock;       /* Prise en compte de décroche */
diff --git a/src/gui/panels/panel.c b/src/gui/panels/panel.c
index 164fca7..e359962 100644
--- a/src/gui/panels/panel.c
+++ b/src/gui/panels/panel.c
@@ -57,9 +57,6 @@ static void g_panel_item_finalize(GPanelItem *);
 /* Détermine si un panneau peut être filtré. */
 static bool gtk_panel_item_can_search(const GPanelItem *);
 
-/* Détermine si un panneau peut être fermé. */
-static bool gtk_panel_item_can_be_closed(const GPanelItem *);
-
 /* Fournit le nom court du composant encapsulable. */
 static const char *gtk_panel_item_get_name(const GPanelItem *);
 
@@ -133,7 +130,6 @@ static void g_panel_item_class_init(GPanelItemClass *klass)
                  G_TYPE_NONE, 0);
 
     klass->can_search = false;
-    klass->can_be_closed = false;
 
 }
 
@@ -178,7 +174,6 @@ static void g_panel_item_init(GPanelItem *item)
 static void g_panel_item_dockable_interface_init(GtkDockableInterface *iface)
 {
     iface->can_search = (can_dockable_search_fc)gtk_panel_item_can_search;
-    iface->can_be_closed = (can_dockable_search_fc)gtk_panel_item_can_be_closed;
     iface->get_name = (get_dockable_name_fc)gtk_panel_item_get_name;
     iface->get_desc = (get_dockable_desc_fc)gtk_panel_item_get_desc;
     iface->get_widget = (get_dockable_widget_fc)gtk_panel_item_get_widget;
@@ -371,32 +366,6 @@ static bool gtk_panel_item_can_search(const GPanelItem *item)
 *                                                                             *
 *  Paramètres  : item = instance GTK dont l'interface est à consulter.        *
 *                                                                             *
-*  Description : Détermine si un panneau peut être fermé.                     *
-*                                                                             *
-*  Retour      : Bilan de la consultation.                                    *
-*                                                                             *
-*  Remarques   : -                                                            *
-*                                                                             *
-******************************************************************************/
-
-static bool gtk_panel_item_can_be_closed(const GPanelItem *item)
-{
-    bool result;                            /* Indication à retourner      */
-    GPanelItemClass *class;                 /* Classe de l'élément visé    */
-
-    class = G_PANEL_ITEM_GET_CLASS(item);
-
-    result = class->can_be_closed;
-
-    return result;
-
-}
-
-
-/******************************************************************************
-*                                                                             *
-*  Paramètres  : item = instance GTK dont l'interface est à consulter.        *
-*                                                                             *
 *  Description : Fournit le nom court du composant encapsulable.              *
 *                                                                             *
 *  Retour      : Désignation humaine pour titre d'onglet ou de fenêtre.       *
diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c
index 8814c0b..048fa28 100644
--- a/src/gui/panels/strings.c
+++ b/src/gui/panels/strings.c
@@ -259,7 +259,6 @@ static void g_strings_panel_class_init(GStringsPanelClass *klass)
     panel->bindings = "<Shift>F12";
 
     panel->can_search = true;
-    panel->can_be_closed = true;
 
     panel->update_filtered = (update_filtered_fc)update_filtered_strings;
 
-- 
cgit v0.11.2-87-g4458