[gnome-photos/wip/abono/sidebar: 626/635] Introduce properties sidebar
- From: Alessandro Bono <abono src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/abono/sidebar: 626/635] Introduce properties sidebar
- Date: Thu, 2 Nov 2017 15:45:55 +0000 (UTC)
commit 2cd804e0dd8427d747ff3a42c46a67ad78a479ad
Author: Alessandro Bono <abono gnome org>
Date: Thu Oct 27 13:15:39 2016 +0200
Introduce properties sidebar
po/POTFILES.in | 1 +
src/Makefile.am | 3 ++
src/photos-properties-sidebar.c | 64 ++++++++++++++++++++++++++++++++++++++
src/photos-properties-sidebar.h | 35 ++++++++++++++++++++
src/photos-properties-sidebar.ui | 40 +++++++++++++++++++++++
src/photos.gresource.xml | 1 +
6 files changed, 144 insertions(+), 0 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8ae5598..51ef830 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -30,6 +30,7 @@ src/photos-print-notification.c
src/photos-print-operation.c
src/photos-print-setup.c
src/photos-properties-dialog.c
+src/photos-properties-sidebar.ui
src/photos-search-match-manager.c
src/photos-search-type-manager.c
src/photos-selection-menu.ui
diff --git a/src/Makefile.am b/src/Makefile.am
index 543f1c9..ca23b95 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -198,6 +198,8 @@ gnome_photos_SOURCES = \
photos-print-setup.h \
photos-properties-dialog.c \
photos-properties-dialog.h \
+ photos-properties-sidebar.c \
+ photos-properties-sidebar.h \
photos-quarks.c \
photos-quarks.h \
photos-query.c \
@@ -377,6 +379,7 @@ EXTRA_DIST = \
photos-marshalers.list \
photos-menus.ui \
photos-preview-menu.ui \
+ photos-properties-sidebar.ui \
photos-selection-menu.ui \
photos-selection-toolbar.ui \
photos-share-dialog.ui \
diff --git a/src/photos-properties-sidebar.c b/src/photos-properties-sidebar.c
new file mode 100644
index 0000000..28040d1
--- /dev/null
+++ b/src/photos-properties-sidebar.c
@@ -0,0 +1,64 @@
+/*
+ * Photos - access, organize and share your photos on GNOME
+ * Copyright © 2016 Alessandro Bono
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+#include "photos-base-item.h"
+#include "photos-properties-sidebar.h"
+
+struct _PhotosPropertiesSidebar
+{
+ GtkScrolledWindow parent_instance;
+ PhotosBaseItem *item;
+};
+
+struct _PhotosPropertiesSidebarClass
+{
+ GtkScrolledWindowClass parent_class;
+};
+
+G_DEFINE_TYPE (PhotosPropertiesSidebar, photos_properties_sidebar, GTK_TYPE_SCROLLED_WINDOW)
+
+GtkWidget *
+photos_properties_sidebar_new (void)
+{
+ return g_object_new (PHOTOS_TYPE_PROPERTIES_SIDEBAR, NULL);
+}
+
+static void
+photos_properties_sidebar_finalize (GObject *object)
+{
+ G_OBJECT_CLASS (photos_properties_sidebar_parent_class)->finalize (object);
+}
+
+static void
+photos_properties_sidebar_class_init (PhotosPropertiesSidebarClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ object_class->finalize = photos_properties_sidebar_finalize;
+
+ gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Photos/properties-sidebar.ui");
+}
+
+static void
+photos_properties_sidebar_init (PhotosPropertiesSidebar *self)
+{
+ gtk_widget_init_template (GTK_WIDGET (self));
+}
diff --git a/src/photos-properties-sidebar.h b/src/photos-properties-sidebar.h
new file mode 100644
index 0000000..6bfa3e3
--- /dev/null
+++ b/src/photos-properties-sidebar.h
@@ -0,0 +1,35 @@
+/*
+ * Photos - access, organize and share your photos on GNOME
+ * Copyright © 2016 Alessandro Bono
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+#ifndef PHOTOS_PROPERTIES_SIDEBAR_H
+#define PHOTOS_PROPERTIES_SIDEBAR_H
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define PHOTOS_TYPE_PROPERTIES_SIDEBAR (photos_properties_sidebar_get_type ())
+G_DECLARE_FINAL_TYPE (PhotosPropertiesSidebar, photos_properties_sidebar, PHOTOS, PROPERTIES_SIDEBAR,
GtkScrolledWindow);
+
+GtkWidget *photos_properties_sidebar_new (void);
+
+G_END_DECLS
+
+#endif /* PHOTOS_PROPERTIES_SIDEBAR_H */
diff --git a/src/photos-properties-sidebar.ui b/src/photos-properties-sidebar.ui
new file mode 100644
index 0000000..ee0328d
--- /dev/null
+++ b/src/photos-properties-sidebar.ui
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
+<interface>
+ <requires lib="gtk+" version="3.20"/>
+ <template class="PhotosPropertiesSidebar" parent="GtkScrolledWindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">False</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkViewport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="margin_left">9</property>
+ <property name="margin_right">9</property>
+ <property name="margin_top">9</property>
+ <property name="margin_bottom">9</property>
+ <property name="orientation">vertical</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="hexpand">True</property>
+ <property name="label">Test Sidebar</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/src/photos.gresource.xml b/src/photos.gresource.xml
index f0676a7..70dadfd 100644
--- a/src/photos.gresource.xml
+++ b/src/photos.gresource.xml
@@ -29,6 +29,7 @@
<file alias="main-toolbar.ui" preprocess="xml-stripblanks"
compressed="true">photos-main-toolbar.ui</file>
<file alias="main-window.ui" preprocess="xml-stripblanks" compressed="true">photos-main-window.ui</file>
<file alias="preview-menu.ui" preprocess="xml-stripblanks"
compressed="true">photos-preview-menu.ui</file>
+ <file alias="properties-sidebar.ui" preprocess="xml-stripblanks"
compressed="true">photos-properties-sidebar.ui</file>
<file alias="selection-menu.ui" preprocess="xml-stripblanks"
compressed="true">photos-selection-menu.ui</file>
<file alias="selection-toolbar.ui" preprocess="xml-stripblanks"
compressed="true">photos-selection-toolbar.ui</file>
<file alias="share-dialog.ui" preprocess="xml-stripblanks"
compressed="true">photos-share-dialog.ui</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]