[gnome-flashback] desktop: pass GfIconView to GfMonitorView
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] desktop: pass GfIconView to GfMonitorView
- Date: Sun, 24 Nov 2019 16:49:09 +0000 (UTC)
commit 70f07346ab5d4c9d55cfd8c5cff30ae9bcb1eaa4
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Nov 24 15:11:32 2019 +0200
desktop: pass GfIconView to GfMonitorView
gnome-flashback/libdesktop/gf-icon-view.c | 1 +
gnome-flashback/libdesktop/gf-monitor-view.c | 20 ++++++++++++++++++++
gnome-flashback/libdesktop/gf-monitor-view.h | 1 +
3 files changed, 22 insertions(+)
---
diff --git a/gnome-flashback/libdesktop/gf-icon-view.c b/gnome-flashback/libdesktop/gf-icon-view.c
index 190c154..2d945d4 100644
--- a/gnome-flashback/libdesktop/gf-icon-view.c
+++ b/gnome-flashback/libdesktop/gf-icon-view.c
@@ -1721,6 +1721,7 @@ create_monitor_view (GfIconView *self,
gdk_monitor_get_workarea (monitor, &workarea);
view = gf_monitor_view_new (monitor,
+ self,
GF_DUMMY_ICON (self->dummy_icon),
column_spacing,
row_spacing);
diff --git a/gnome-flashback/libdesktop/gf-monitor-view.c b/gnome-flashback/libdesktop/gf-monitor-view.c
index 274e2e3..bd9e84f 100644
--- a/gnome-flashback/libdesktop/gf-monitor-view.c
+++ b/gnome-flashback/libdesktop/gf-monitor-view.c
@@ -30,6 +30,8 @@ struct _GfMonitorView
gboolean grid_points;
+ GfIconView *icon_view;
+
GfDummyIcon *dummy_icon;
guint column_spacing;
guint row_spacing;
@@ -64,6 +66,8 @@ enum
PROP_GRID_POINTS,
+ PROP_ICON_VIEW,
+
PROP_DUMMY_ICON,
PROP_COLUMN_SPACING,
PROP_ROW_SPACING,
@@ -584,6 +588,11 @@ gf_monitor_view_set_property (GObject *object,
gtk_widget_queue_draw (GTK_WIDGET (self));
break;
+ case PROP_ICON_VIEW:
+ g_assert (self->icon_view == NULL);
+ self->icon_view = g_value_get_object (value);
+ break;
+
case PROP_DUMMY_ICON:
g_assert (self->dummy_icon == NULL);
self->dummy_icon = g_value_get_object (value);
@@ -655,6 +664,15 @@ install_properties (GObjectClass *object_class)
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS);
+ view_properties[PROP_ICON_VIEW] =
+ g_param_spec_object ("icon-view",
+ "icon-view",
+ "icon-view",
+ GF_TYPE_ICON_VIEW,
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_WRITABLE |
+ G_PARAM_STATIC_STRINGS);
+
view_properties[PROP_DUMMY_ICON] =
g_param_spec_object ("dummy-icon",
"dummy-icon",
@@ -726,12 +744,14 @@ gf_monitor_view_init (GfMonitorView *self)
GtkWidget *
gf_monitor_view_new (GdkMonitor *monitor,
+ GfIconView *icon_view,
GfDummyIcon *dummy_icon,
guint column_spacing,
guint row_spacing)
{
return g_object_new (GF_TYPE_MONITOR_VIEW,
"monitor", monitor,
+ "icon-view", icon_view,
"dummy-icon", dummy_icon,
"column-spacing", column_spacing,
"row-spacing", row_spacing,
diff --git a/gnome-flashback/libdesktop/gf-monitor-view.h b/gnome-flashback/libdesktop/gf-monitor-view.h
index c7d1785..30a4dc4 100644
--- a/gnome-flashback/libdesktop/gf-monitor-view.h
+++ b/gnome-flashback/libdesktop/gf-monitor-view.h
@@ -27,6 +27,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GfMonitorView, gf_monitor_view, GF, MONITOR_VIEW, GtkFixed)
GtkWidget *gf_monitor_view_new (GdkMonitor *monitor,
+ GfIconView *icon_view,
GfDummyIcon *dummy_icon,
guint column_spacing,
guint row_spacing);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]