[gnome-disk-utility/new-ui] Nuke unused GduSection subclasses



commit cdb6ea84233e44ac848694574af60d2c8ac8bf95
Author: David Zeuthen <davidz redhat com>
Date:   Wed Dec 2 13:49:52 2009 -0500

    Nuke unused GduSection subclasses

 src/palimpsest/Makefile.am                         |    8 -
 .../gdu-section-create-partition-table.c           |  251 -------
 .../gdu-section-create-partition-table.h           |   58 --
 src/palimpsest/gdu-section-encrypted.c             |  288 --------
 src/palimpsest/gdu-section-encrypted.h             |   58 --
 src/palimpsest/gdu-section-filesystem.c            |  266 -------
 src/palimpsest/gdu-section-filesystem.h            |   58 --
 src/palimpsest/gdu-section-no-media.c              |  154 ----
 src/palimpsest/gdu-section-no-media.h              |   58 --
 src/palimpsest/gdu-section-partition.c             |  641 ----------------
 src/palimpsest/gdu-section-partition.h             |   58 --
 src/palimpsest/gdu-section-swapspace.c             |  110 ---
 src/palimpsest/gdu-section-swapspace.h             |   58 --
 src/palimpsest/gdu-section-unallocated.c           |  768 --------------------
 src/palimpsest/gdu-section-unallocated.h           |   58 --
 src/palimpsest/gdu-section-unrecognized.c          |  512 -------------
 src/palimpsest/gdu-section-unrecognized.h          |   58 --
 src/palimpsest/gdu-shell.c                         |   56 --
 18 files changed, 0 insertions(+), 3518 deletions(-)
---
diff --git a/src/palimpsest/Makefile.am b/src/palimpsest/Makefile.am
index ec8fdee..1fab22b 100644
--- a/src/palimpsest/Makefile.am
+++ b/src/palimpsest/Makefile.am
@@ -7,15 +7,7 @@ palimpsest_SOURCES = 									\
 						gdu-main.c				\
 	gdu-shell.h				gdu-shell.c				\
 	gdu-section.h				gdu-section.c				\
-	gdu-section-create-partition-table.h	gdu-section-create-partition-table.c	\
-	gdu-section-partition.h			gdu-section-partition.c			\
-	gdu-section-unallocated.h		gdu-section-unallocated.c		\
-	gdu-section-unrecognized.h		gdu-section-unrecognized.c		\
-	gdu-section-filesystem.h		gdu-section-filesystem.c		\
-	gdu-section-swapspace.h			gdu-section-swapspace.c			\
-	gdu-section-encrypted.h			gdu-section-encrypted.c			\
 	gdu-section-linux-md-drive.h		gdu-section-linux-md-drive.c		\
-	gdu-section-no-media.h			gdu-section-no-media.c			\
 	gdu-section-drive.h			gdu-section-drive.c			\
 	gdu-section-volumes.h			gdu-section-volumes.c			\
 	gdu-section-hub.h			gdu-section-hub.c			\
diff --git a/src/palimpsest/gdu-shell.c b/src/palimpsest/gdu-shell.c
index 2dbfba2..73b997e 100644
--- a/src/palimpsest/gdu-shell.c
+++ b/src/palimpsest/gdu-shell.c
@@ -34,15 +34,7 @@
 
 #include "gdu-shell.h"
 
-#include "gdu-section-partition.h"
-#include "gdu-section-create-partition-table.h"
-#include "gdu-section-unallocated.h"
-#include "gdu-section-unrecognized.h"
-#include "gdu-section-filesystem.h"
-#include "gdu-section-swapspace.h"
-#include "gdu-section-encrypted.h"
 #include "gdu-section-linux-md-drive.h"
-#include "gdu-section-no-media.h"
 #include "gdu-section-drive.h"
 #include "gdu-section-volumes.h"
 #include "gdu-section-hub.h"
@@ -225,56 +217,8 @@ compute_sections_to_show (GduShell *shell)
                         //sections_to_show = g_list_append (sections_to_show, (gpointer) GDU_TYPE_SECTION_NO_MEDIA);
 
                 }
-
-        } else if (GDU_IS_VOLUME (shell->priv->presentable_now_showing) && device != NULL) {
-
-                if (gdu_device_is_partition (device))
-                        sections_to_show = g_list_append (sections_to_show, (gpointer) GDU_TYPE_SECTION_PARTITION);
-
-                if (gdu_presentable_is_recognized (shell->priv->presentable_now_showing)) {
-                        const char *usage;
-                        const char *type;
-
-                        usage = gdu_device_id_get_usage (device);
-                        type = gdu_device_id_get_type (device);
-
-                        if (usage != NULL && strcmp (usage, "filesystem") == 0) {
-                                sections_to_show = g_list_append (sections_to_show, (gpointer) GDU_TYPE_SECTION_FILESYSTEM);
-                        } else if (usage != NULL && strcmp (usage, "crypto") == 0) {
-                                sections_to_show = g_list_append (sections_to_show, (gpointer) GDU_TYPE_SECTION_ENCRYPTED);
-                        } else if (usage != NULL && strcmp (usage, "other") == 0 &&
-                                   type != NULL && strcmp (type, "swap") == 0) {
-                                sections_to_show = g_list_append (sections_to_show, (gpointer) GDU_TYPE_SECTION_SWAPSPACE);
-                        }
-                } else {
-                        GduPresentable *toplevel_presentable;
-                        GduDevice *toplevel_device;
-
-                        sections_to_show = g_list_append (sections_to_show, (gpointer) GDU_TYPE_SECTION_UNRECOGNIZED);
-
-                        /* Also show a "Create partition table" section for a volume if the drive isn't partitioned */
-                        toplevel_presentable = gdu_presentable_get_toplevel (shell->priv->presentable_now_showing);
-                        if (toplevel_presentable != NULL) {
-                                toplevel_device = gdu_presentable_get_device (toplevel_presentable);
-
-                                if (toplevel_device != NULL) {
-                                        if (!gdu_device_is_partition_table (toplevel_device)) {
-                                                sections_to_show = g_list_append (
-                                                                                  sections_to_show, (gpointer) GDU_TYPE_SECTION_CREATE_PARTITION_TABLE);
-                                        }
-                                        g_object_unref (toplevel_device);
-                                }
-                                g_object_unref (toplevel_presentable);
-                        }
-                }
-
-        } else if (GDU_IS_VOLUME_HOLE (shell->priv->presentable_now_showing)) {
-
-                sections_to_show = g_list_append (sections_to_show,
-                                                  (gpointer) GDU_TYPE_SECTION_UNALLOCATED);
         }
 
-
         if (device != NULL)
                 g_object_unref (device);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]