[nautilus/new-properties-extension] f
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/new-properties-extension] f
- Date: Tue, 29 May 2018 21:01:27 +0000 (UTC)
commit 88dc0d6ee40b1242b5cd236a5e43a054c96224d5
Author: Carlos Soriano <csoriano redhat com>
Date: Tue May 29 23:00:50 2018 +0200
f
.../nautilus-image-properties-page-provider.c | 41 ++++++++++++++++++----
1 file changed, 34 insertions(+), 7 deletions(-)
---
diff --git a/extensions/image-properties/nautilus-image-properties-page-provider.c
b/extensions/image-properties/nautilus-image-properties-page-provider.c
index e064d4b88..b4b8c2a7a 100644
--- a/extensions/image-properties/nautilus-image-properties-page-provider.c
+++ b/extensions/image-properties/nautilus-image-properties-page-provider.c
@@ -72,7 +72,7 @@ is_mime_type_supported (const char *mime_type)
return FALSE;
}
-static GList *
+static NautilusPropertyPageModel*
get_model (NautilusPropertyPageModelProvider *provider,
GList *files)
{
@@ -80,6 +80,11 @@ get_model (NautilusPropertyPageModelProvider *provider,
g_autofree char *mime_type = NULL;
NautilusImagesPropertiesPage *image_properties_page;
NautilusPropertyPageModel *property_page;
+ GList *sections = NULL;
+ GList *items = NULL;
+ NautilusPropertyPageModelSection *section1;
+ NautilusPropertyPageModelItem *item1;
+ NautilusPropertyPageModelItem *item2;
if (files == NULL || files->next != NULL)
{
@@ -92,20 +97,42 @@ get_model (NautilusPropertyPageModelProvider *provider,
{
return NULL;
}
- image_properties_page = nautilus_image_properties_page_new ();
+
+ section1 = g_new (NautilusPropertyPageModelSection, 1);
+ section1->title = g_strdup ("Test section");
+ section1->id = 1;
+
+ item1 = g_new (NautilusPropertyPageModelItem, 1);
+ item1->section_id = 1;
+ item1->field = g_strdup ("Test item field");
+ item1->value = g_strdup ("Test item value");
+
+ item2 = g_new (NautilusPropertyPageModelItem, 1);
+ item2->section_id = 1;
+ item2->field = g_strdup ("Test item field 2");
+ item2->value = g_strdup ("Test item value 2");
+
+ sections = g_list_append (NULL, section1);
+ items = g_list_append (NULL, item1);
+ items = g_list_append (items, item2);
+
+ g_print ("HEEEREEEE\n");
property_page = nautilus_property_page_model_new (NAUTILUS_IMAGE_PROPERTIES_PAGE_NAME,
- "Image",
- GTK_WIDGET (image_properties_page));
+ sections,
+ items);
+ /*
+ image_properties_page = nautilus_image_properties_page_new ();
nautilus_image_properties_page_load_from_file_info (image_properties_page, file_info);
+ */
- return g_list_prepend (NULL, property_page);
+ return property_page;
}
static void
-property_page_provider_iface_init (NautilusPropertyPageProviderInterface *iface)
+property_page_provider_iface_init (NautilusPropertyPageModelProviderInterface *iface)
{
- iface->get_pages = get_pages;
+ iface->get_model = get_model;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]