[gnome-disk-utility/udisks2-port] Add WIP iSCSI patches
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Add WIP iSCSI patches
- Date: Wed, 15 Jun 2011 15:52:39 +0000 (UTC)
commit eaae307896dbccc3b4dcd5b1600c27792abeccf4
Author: David Zeuthen <davidz redhat com>
Date: Wed Jun 15 11:30:22 2011 -0400
Add WIP iSCSI patches
Signed-off-by: David Zeuthen <davidz redhat com>
data/ui/palimpsest.ui | 173 ++++++++++++++++++------------
src/palimpsest/gdudevicetreemodel.c | 200 +++++++++++++++++++++++++++--------
src/palimpsest/gduwindow.c | 49 +++++++++-
3 files changed, 312 insertions(+), 110 deletions(-)
---
diff --git a/data/ui/palimpsest.ui b/data/ui/palimpsest.ui
index d7866c5..0c1f758 100644
--- a/data/ui/palimpsest.ui
+++ b/data/ui/palimpsest.ui
@@ -82,6 +82,50 @@
<property name="position">0</property>
</packing>
</child>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button3">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button4">
+ <property name="label" translatable="yes">C_hange</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkTable" id="table2">
<property name="visible">True</property>
@@ -119,13 +163,32 @@
<property name="position">2</property>
</packing>
</child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">button3</action-widget>
+ <action-widget response="-5">button4</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkDialog" id="change-partition-type-dialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
<child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area4">
+ <object class="GtkButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="button3">
+ <object class="GtkButton" id="button1">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -140,7 +203,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="button4">
+ <object class="GtkButton" id="button2">
<property name="label" translatable="yes">C_hange</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -156,26 +219,13 @@
</packing>
</child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
</child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-6">button3</action-widget>
- <action-widget response="-5">button4</action-widget>
- </action-widgets>
- </object>
- <object class="GtkDialog" id="change-partition-type-dialog">
- <property name="can_focus">False</property>
- <property name="border_width">12</property>
- <property name="resizable">False</property>
- <property name="modal">True</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
@@ -225,44 +275,6 @@
<property name="position">2</property>
</packing>
</child>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button1">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button2">
- <property name="label" translatable="yes">C_hange</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
</object>
</child>
<action-widgets>
@@ -381,6 +393,33 @@
</packing>
</child>
<child>
+ <object class="GtkAlignment" id="alignment1x">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label4x">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Page not implemented yet</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label3x">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">not_implemented</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -1212,7 +1251,7 @@
</child>
</object>
<packing>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child type="tab">
@@ -1222,7 +1261,7 @@
<property name="label" translatable="yes">devtab</property>
</object>
<packing>
- <property name="position">1</property>
+ <property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -1454,17 +1493,17 @@
</child>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="iscsitab_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">iscsi</property>
+ <property name="label" translatable="yes">iscsi target</property>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">3</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -1474,7 +1513,7 @@
<property name="can_focus">False</property>
</object>
<packing>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
<child type="tab">
@@ -1484,7 +1523,7 @@
<property name="label" translatable="yes">new</property>
</object>
<packing>
- <property name="position">3</property>
+ <property name="position">4</property>
<property name="tab_fill">False</property>
</packing>
</child>
diff --git a/src/palimpsest/gdudevicetreemodel.c b/src/palimpsest/gdudevicetreemodel.c
index 006430c..5a2facc 100644
--- a/src/palimpsest/gdudevicetreemodel.c
+++ b/src/palimpsest/gdudevicetreemodel.c
@@ -40,9 +40,10 @@ struct _GduDeviceTreeModel
GtkTreeIter block_iter;
gboolean block_iter_valid;
- GList *current_iscsi_targets_and_luns;
- GtkTreeIter iscsi_targets_iter;
- gboolean iscsi_targets_iter_valid;
+ /* These are UDisksObjects for collections, targets and LUNs */
+ GList *current_iscsi_objects;
+ GtkTreeIter iscsi_iter;
+ gboolean iscsi_iter_valid;
};
typedef struct
@@ -852,17 +853,17 @@ update_blocks (GduDeviceTreeModel *model)
/* ---------------------------------------------------------------------------------------------------- */
static GtkTreeIter *
-get_iscsi_header_iter (GduDeviceTreeModel *model)
+get_iscsi_iter (GduDeviceTreeModel *model)
{
gchar *s;
- if (model->iscsi_targets_iter_valid)
+ if (model->iscsi_iter_valid)
goto out;
s = g_strdup_printf ("<small><span foreground=\"#555555\">%s</span></small>",
- _("iSCSI Targets"));
+ _("iSCSI"));
gtk_tree_store_insert_with_values (GTK_TREE_STORE (model),
- &model->iscsi_targets_iter,
+ &model->iscsi_iter,
NULL, /* GtkTreeIter *parent */
0,
GDU_DEVICE_TREE_MODEL_COLUMN_IS_HEADING, TRUE,
@@ -871,23 +872,85 @@ get_iscsi_header_iter (GduDeviceTreeModel *model)
-1);
g_free (s);
- model->iscsi_targets_iter_valid = TRUE;
+ model->iscsi_iter_valid = TRUE;
out:
- return &model->iscsi_targets_iter;
+ return &model->iscsi_iter;
}
static void
-nuke_iscsi_targets_header (GduDeviceTreeModel *model)
+nuke_iscsi_iter (GduDeviceTreeModel *model)
{
- if (model->iscsi_targets_iter_valid)
+ if (model->iscsi_iter_valid)
{
- gtk_tree_store_remove (GTK_TREE_STORE (model), &model->iscsi_targets_iter);
- model->iscsi_targets_iter_valid = FALSE;
+ gtk_tree_store_remove (GTK_TREE_STORE (model), &model->iscsi_iter);
+ model->iscsi_iter_valid = FALSE;
}
}
static void
+add_iscsi_collection (GduDeviceTreeModel *model,
+ UDisksObject *object,
+ GtkTreeIter *parent)
+{
+ UDisksIScsiCollection *collection;
+ const gchar *mechanism;
+ GIcon *icon;
+ gchar *s;
+ gchar *sort_key;
+ GtkTreeIter iter;
+
+ collection = udisks_object_peek_iscsi_collection (object);
+ mechanism = udisks_iscsi_collection_get_mechanism (collection);
+
+ icon = g_themed_icon_new_with_default_fallbacks ("network_local");
+ if (g_strcmp0 (mechanism, "sendtargets") == 0)
+ {
+ s = g_strdup_printf ("%s\n"
+ "<small><span foreground=\"#555555\">%s</span></small>",
+ _("SendTargets Discovery"),
+ udisks_iscsi_collection_get_discovery_address (collection));
+ }
+ else if (g_strcmp0 (mechanism, "isns") == 0)
+ {
+ s = g_strdup_printf ("%s\n"
+ "<small><span foreground=\"#555555\">%s</span></small>",
+ _("iSNS Discovery"),
+ udisks_iscsi_collection_get_discovery_address (collection));
+ }
+ else if (g_strcmp0 (mechanism, "static") == 0)
+ {
+ s = g_strdup (_("Statically Configured"));
+ }
+ else if (g_strcmp0 (mechanism, "firmware") == 0)
+ {
+ s = g_strdup (_("Configured by Firmware"));
+ }
+ else
+ {
+ /* This is a fallback */
+ s = g_strdup_printf ("%s\n"
+ "<small><span foreground=\"#555555\">%s</span></small>",
+ mechanism,
+ udisks_iscsi_collection_get_discovery_address (collection));
+ }
+
+ sort_key = g_strdup (g_dbus_object_get_object_path (G_DBUS_OBJECT (object))); /* for now */
+ gtk_tree_store_insert_with_values (GTK_TREE_STORE (model),
+ &iter,
+ parent,
+ 0,
+ GDU_DEVICE_TREE_MODEL_COLUMN_ICON, icon,
+ GDU_DEVICE_TREE_MODEL_COLUMN_NAME, s,
+ GDU_DEVICE_TREE_MODEL_COLUMN_SORT_KEY, sort_key,
+ GDU_DEVICE_TREE_MODEL_COLUMN_OBJECT, object,
+ -1);
+ g_object_unref (icon);
+ g_free (sort_key);
+ g_free (s);
+}
+
+static void
add_iscsi_target (GduDeviceTreeModel *model,
UDisksObject *object,
GtkTreeIter *parent)
@@ -955,11 +1018,35 @@ remove_iscsi_target (GduDeviceTreeModel *model,
;
}
-static gboolean
-should_include_iscsi_target (UDisksObject *object)
+static gint
+count_targets_for_collection (GDBusObjectManager *object_manager,
+ UDisksIScsiCollection *collection)
{
- /* for now, just include all of them */
- return TRUE;
+ gint ret;
+ GList *l;
+ GList *objects;
+ GDBusObject *collection_object;
+ const gchar *collection_object_path;
+
+ collection_object = g_dbus_interface_get_object (G_DBUS_INTERFACE (collection));
+ collection_object_path = g_dbus_object_get_object_path (collection_object);
+
+ ret = 0;
+ objects = g_dbus_object_manager_get_objects (object_manager);
+ for (l = objects; l != NULL; l = l->next)
+ {
+ UDisksObject *object = UDISKS_OBJECT (l->data);
+ UDisksIScsiTarget *target;
+ target = udisks_object_peek_iscsi_target (object);
+ if (target == NULL)
+ continue;
+ if (g_strcmp0 (udisks_iscsi_target_get_collection (target), collection_object_path) == 0)
+ ret++;
+ }
+ g_list_foreach (objects, (GFunc) g_object_unref, NULL);
+ g_list_free (objects);
+
+ return ret;
}
static void
@@ -967,7 +1054,7 @@ update_iscsi_targets (GduDeviceTreeModel *model)
{
GDBusObjectManager *object_manager;
GList *objects;
- GList *iscsi_targets_and_luns;
+ GList *iscsi_objects;
GList *added;
GList *removed;
GList *l;
@@ -975,22 +1062,33 @@ update_iscsi_targets (GduDeviceTreeModel *model)
object_manager = udisks_client_get_object_manager (model->client);
objects = g_dbus_object_manager_get_objects (object_manager);
- iscsi_targets_and_luns = NULL;
+ iscsi_objects = NULL;
for (l = objects; l != NULL; l = l->next)
{
UDisksObject *object = UDISKS_OBJECT (l->data);
UDisksIScsiTarget *target;
+ UDisksIScsiCollection *collection;
- target = udisks_object_peek_iscsi_target (object);
- if (target == NULL)
- continue;
+ collection = udisks_object_peek_iscsi_collection (object);
+ if (collection != NULL)
+ {
+ /* Don't include an object for static or firmware unless they are non-empty */
+ if (g_strcmp0 (udisks_iscsi_collection_get_mechanism (collection), "static") == 0 ||
+ g_strcmp0 (udisks_iscsi_collection_get_mechanism (collection), "firmware") == 0)
+ {
+ if (count_targets_for_collection (object_manager, collection) == 0)
+ continue;
+ }
+ iscsi_objects = g_list_prepend (iscsi_objects, g_object_ref (object));
+ }
- if (should_include_iscsi_target (object))
+ target = udisks_object_peek_iscsi_target (object);
+ if (target != NULL)
{
GList *ll;
const gchar *target_object_path;
- iscsi_targets_and_luns = g_list_prepend (iscsi_targets_and_luns, g_object_ref (object));
+ iscsi_objects = g_list_prepend (iscsi_objects, g_object_ref (object));
/* also include the LUNs that are associated with this target */
target_object_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (object));
@@ -1004,17 +1102,17 @@ update_iscsi_targets (GduDeviceTreeModel *model)
if (g_strcmp0 (udisks_lun_get_iscsi_target (lun), target_object_path) == 0)
{
if (should_include_lun (lun_object, TRUE))
- iscsi_targets_and_luns = g_list_prepend (iscsi_targets_and_luns, g_object_ref (lun_object));
+ iscsi_objects = g_list_prepend (iscsi_objects, g_object_ref (lun_object));
}
}
}
}
}
- iscsi_targets_and_luns = g_list_sort (iscsi_targets_and_luns, (GCompareFunc) _g_dbus_object_compare);
- model->current_iscsi_targets_and_luns = g_list_sort (model->current_iscsi_targets_and_luns, (GCompareFunc) _g_dbus_object_compare);
- diff_sorted_lists (model->current_iscsi_targets_and_luns,
- iscsi_targets_and_luns,
+ iscsi_objects = g_list_sort (iscsi_objects, (GCompareFunc) _g_dbus_object_compare);
+ model->current_iscsi_objects = g_list_sort (model->current_iscsi_objects, (GCompareFunc) _g_dbus_object_compare);
+ diff_sorted_lists (model->current_iscsi_objects,
+ iscsi_objects,
(GCompareFunc) _g_dbus_object_compare,
&added,
&removed);
@@ -1023,33 +1121,51 @@ update_iscsi_targets (GduDeviceTreeModel *model)
{
UDisksObject *object = UDISKS_OBJECT (l->data);
- g_assert (g_list_find (model->current_iscsi_targets_and_luns, object) != NULL);
+ g_assert (g_list_find (model->current_iscsi_objects, object) != NULL);
- model->current_iscsi_targets_and_luns = g_list_remove (model->current_iscsi_targets_and_luns, object);
+ model->current_iscsi_objects = g_list_remove (model->current_iscsi_objects, object);
remove_iscsi_target (model, object);
g_object_unref (object);
}
- /* Two passes: first add the iSCSI targets ... */
+ /* Three passes: first add the iSCSI collections ... */
+ for (l = added; l != NULL; l = l->next)
+ {
+ UDisksObject *object = UDISKS_OBJECT (l->data);
+ if (udisks_object_peek_iscsi_collection (object) != NULL)
+ {
+ model->current_iscsi_objects = g_list_prepend (model->current_iscsi_objects,
+ g_object_ref (object));
+ add_iscsi_collection (model, object, get_iscsi_iter (model));
+ }
+ }
+ /* ... then the targets ... */
for (l = added; l != NULL; l = l->next)
{
UDisksObject *object = UDISKS_OBJECT (l->data);
if (udisks_object_peek_iscsi_target (object) != NULL)
{
- model->current_iscsi_targets_and_luns = g_list_prepend (model->current_iscsi_targets_and_luns,
- g_object_ref (object));
- add_iscsi_target (model, object, get_iscsi_header_iter (model));
+ GtkTreeIter iter;
+ GtkTreeIter *piter;
+ model->current_iscsi_objects = g_list_prepend (model->current_iscsi_objects,
+ g_object_ref (object));
+ piter = &iter;
+ if (!find_iter_for_object_path (model,
+ udisks_iscsi_target_get_collection (udisks_object_peek_iscsi_target (object)),
+ &iter))
+ piter = get_iscsi_iter (model);
+ add_iscsi_target (model, object, piter);
}
}
- /* ... and then the LUNs */
+ /* ... and finally the LUNs */
for (l = added; l != NULL; l = l->next)
{
UDisksObject *object = UDISKS_OBJECT (l->data);
if (udisks_object_peek_lun (object) != NULL)
{
GtkTreeIter iter;
- model->current_iscsi_targets_and_luns = g_list_prepend (model->current_iscsi_targets_and_luns,
- g_object_ref (object));
+ model->current_iscsi_objects = g_list_prepend (model->current_iscsi_objects,
+ g_object_ref (object));
g_warn_if_fail (find_iter_for_object_path (model,
udisks_lun_get_iscsi_target (udisks_object_peek_lun (object)),
&iter));
@@ -1057,13 +1173,13 @@ update_iscsi_targets (GduDeviceTreeModel *model)
}
}
- if (g_list_length (model->current_iscsi_targets_and_luns) == 0)
- nuke_iscsi_targets_header (model);
+ if (g_list_length (model->current_iscsi_objects) == 0)
+ nuke_iscsi_iter (model);
g_list_free (added);
g_list_free (removed);
- g_list_foreach (iscsi_targets_and_luns, (GFunc) g_object_unref, NULL);
- g_list_free (iscsi_targets_and_luns);
+ g_list_foreach (iscsi_objects, (GFunc) g_object_unref, NULL);
+ g_list_free (iscsi_objects);
g_list_foreach (objects, (GFunc) g_object_unref, NULL);
g_list_free (objects);
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index 5b8779c..a2a747e 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -37,8 +37,10 @@
typedef enum
{
DETAILS_PAGE_NOT_SELECTED,
+ DETAILS_PAGE_NOT_IMPLEMENTED,
DETAILS_PAGE_DEVICE,
DETAILS_PAGE_ISCSI_TARGET,
+ DETAILS_PAGE_ISCSI_SENDTARGETS_COLLECTION,
} DetailsPage;
struct _GduWindow
@@ -89,6 +91,10 @@ static void setup_iscsi_target_page (GduWindow *window, UDisksObject *object);
static void update_iscsi_target_page (GduWindow *window);
static void teardown_iscsi_target_page (GduWindow *window);
+//static void setup_iscsi_sendtargets_collection_page (GduWindow *window, UDisksObject *object);
+//static void update_iscsi_sendtargets_collection_page (GduWindow *window);
+//static void teardown_iscsi_sendtargets_collection_page (GduWindow *window);
+
static void on_volume_grid_changed (GduVolumeGrid *grid,
gpointer user_data);
@@ -216,6 +222,8 @@ static void
set_selected_object (GduWindow *window,
UDisksObject *object)
{
+ UDisksIScsiCollection *collection;
+
if (object != NULL)
{
if (udisks_object_peek_lun (object) != NULL ||
@@ -227,9 +235,15 @@ set_selected_object (GduWindow *window,
{
select_details_page (window, object, DETAILS_PAGE_ISCSI_TARGET);
}
+ else if ((collection = udisks_object_peek_iscsi_collection (object)) != NULL &&
+ g_strcmp0 (udisks_iscsi_collection_get_mechanism (collection), "sendtargets") == 0)
+ {
+ select_details_page (window, object, DETAILS_PAGE_ISCSI_SENDTARGETS_COLLECTION);
+ }
else
{
- g_assert_not_reached ();
+ g_warning ("no page for object %s", g_dbus_object_get_object_path (G_DBUS_OBJECT (object)));
+ select_details_page (window, NULL, DETAILS_PAGE_NOT_IMPLEMENTED);
}
}
else
@@ -669,6 +683,9 @@ teardown_details_page (GduWindow *window,
case DETAILS_PAGE_NOT_SELECTED:
break;
+ case DETAILS_PAGE_NOT_IMPLEMENTED:
+ break;
+
case DETAILS_PAGE_DEVICE:
teardown_device_page (window);
break;
@@ -676,6 +693,10 @@ teardown_details_page (GduWindow *window,
case DETAILS_PAGE_ISCSI_TARGET:
teardown_iscsi_target_page (window);
break;
+
+ case DETAILS_PAGE_ISCSI_SENDTARGETS_COLLECTION:
+ //TODO: teardown_iscsi_sendtargets_collection_page (window);
+ break;
}
}
@@ -807,6 +828,9 @@ setup_details_page (GduWindow *window,
case DETAILS_PAGE_NOT_SELECTED:
break;
+ case DETAILS_PAGE_NOT_IMPLEMENTED:
+ break;
+
case DETAILS_PAGE_DEVICE:
setup_device_page (window, object);
break;
@@ -814,6 +838,10 @@ setup_details_page (GduWindow *window,
case DETAILS_PAGE_ISCSI_TARGET:
setup_iscsi_target_page (window, object);
break;
+
+ case DETAILS_PAGE_ISCSI_SENDTARGETS_COLLECTION:
+ //TODO: setup_iscsi_sendtargets_collection_page (window, object);
+ break;
}
}
@@ -830,6 +858,9 @@ update_details_page (GduWindow *window,
case DETAILS_PAGE_NOT_SELECTED:
break;
+ case DETAILS_PAGE_NOT_IMPLEMENTED:
+ break;
+
case DETAILS_PAGE_DEVICE:
update_device_page (window);
break;
@@ -837,6 +868,10 @@ update_details_page (GduWindow *window,
case DETAILS_PAGE_ISCSI_TARGET:
update_iscsi_target_page (window);
break;
+
+ case DETAILS_PAGE_ISCSI_SENDTARGETS_COLLECTION:
+ //TODO: update_iscsi_sendtargets_collection_page (window);
+ break;
}
}
@@ -877,6 +912,10 @@ update_all (GduWindow *window,
/* Nothing to update */
break;
+ case DETAILS_PAGE_NOT_IMPLEMENTED:
+ /* Nothing to update */
+ break;
+
case DETAILS_PAGE_DEVICE:
/* this is a little too inclusive.. */
if (gdu_volume_grid_includes_object (GDU_VOLUME_GRID (window->volume_grid), object))
@@ -892,6 +931,14 @@ update_all (GduWindow *window,
}
/* Nothing to update */
break;
+
+ case DETAILS_PAGE_ISCSI_SENDTARGETS_COLLECTION:
+ if (object == window->current_object)
+ {
+ update_details_page (window, window->current_page);
+ }
+ /* Nothing to update */
+ break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]