[gnome-builder] newcomers: add newcomers plugin for project grid
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] newcomers: add newcomers plugin for project grid
- Date: Fri, 17 Nov 2017 22:53:16 +0000 (UTC)
commit 6a99877ebc41081ca7e0fe30bb16bd634fdb9d10
Author: Christian Hergert <chergert redhat com>
Date: Fri Nov 17 14:44:56 2017 -0800
newcomers: add newcomers plugin for project grid
This adds back the newcomers feature, but as a separate plugin
utilizing the new IdeGreeterSection plugin API.
meson_options.txt | 1 +
po/POTFILES.in | 1 +
src/plugins/meson.build | 1 +
src/plugins/newcomers/gbp-newcomers-project.c | 165 ++++++++++++++++++++
src/plugins/newcomers/gbp-newcomers-project.h | 33 ++++
src/plugins/newcomers/gbp-newcomers-project.ui | 27 ++++
src/plugins/newcomers/gbp-newcomers-section.c | 126 +++++++++++++++
src/plugins/newcomers/gbp-newcomers-section.h | 29 ++++
src/plugins/newcomers/gbp-newcomers-section.ui | 99 ++++++++++++
src/plugins/newcomers/icons/org.gnome.Calendar.png | Bin 0 -> 197273 bytes
src/plugins/newcomers/icons/org.gnome.Games.png | Bin 0 -> 173231 bytes
src/plugins/newcomers/icons/org.gnome.Maps.png | Bin 0 -> 43685 bytes
src/plugins/newcomers/icons/org.gnome.Music.png | Bin 0 -> 93983 bytes
src/plugins/newcomers/icons/org.gnome.Nautilus.png | Bin 0 -> 60905 bytes
src/plugins/newcomers/icons/org.gnome.Photos.png | Bin 0 -> 60258 bytes
src/plugins/newcomers/icons/org.gnome.Polari.png | Bin 0 -> 42950 bytes
src/plugins/newcomers/icons/org.gnome.Todo.png | Bin 0 -> 85334 bytes
src/plugins/newcomers/meson.build | 20 +++
src/plugins/newcomers/newcomers-plugin.c | 30 ++++
src/plugins/newcomers/newcomers.gresource.xml | 25 +++
src/plugins/newcomers/newcomers.plugin | 8 +
21 files changed, 565 insertions(+), 0 deletions(-)
---
diff --git a/meson_options.txt b/meson_options.txt
index 34cba80..f4a00e2 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -53,6 +53,7 @@ option('with_meson_templates', type: 'boolean')
option('with_mingw', type: 'boolean')
option('with_mono', type: 'boolean')
option('with_notification', type: 'boolean')
+option('with_newcomers', type: 'boolean')
option('with_npm', type: 'boolean')
option('with_phpize', type: 'boolean')
option('with_project_tree', type: 'boolean')
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e684ccf..3cc6748 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -173,6 +173,7 @@ src/plugins/jedi/jedi_plugin.py
src/plugins/meson/gbp-meson-build-system.c
src/plugins/meson-templates/meson_templates.py
src/plugins/mingw/ide-mingw-device-provider.c
+src/plugins/newcomers/gbp-newcomers-section.ui
src/plugins/notification/ide-notification-addin.c
src/plugins/project-tree/gb-new-file-popover.c
src/plugins/project-tree/gb-new-file-popover.ui
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index 1039193..10eadee 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -46,6 +46,7 @@ subdir('meson')
subdir('meson-templates')
subdir('mingw')
subdir('mono')
+subdir('newcomers')
subdir('notification')
subdir('npm')
subdir('phpize')
diff --git a/src/plugins/newcomers/gbp-newcomers-project.c b/src/plugins/newcomers/gbp-newcomers-project.c
new file mode 100644
index 0000000..966fbbe
--- /dev/null
+++ b/src/plugins/newcomers/gbp-newcomers-project.c
@@ -0,0 +1,165 @@
+/* gbp-newcomers-project.c
+ *
+ * Copyright (C) 2017 Christian Hergert <chergert redhat com>
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#define G_LOG_DOMAIN "gbp-newcomers-project"
+
+#include "gbp-newcomers-project.h"
+
+struct _GbpNewcomersProject
+{
+ GtkFlowBoxChild parent_instance;
+
+ gchar *uri;
+
+ GtkLabel *label;
+ GtkImage *icon;
+};
+
+enum {
+ PROP_0,
+ PROP_ICON_NAME,
+ PROP_NAME,
+ PROP_URI,
+ N_PROPS
+};
+
+G_DEFINE_TYPE (GbpNewcomersProject, gbp_newcomers_project, GTK_TYPE_FLOW_BOX_CHILD)
+
+static GParamSpec *properties [N_PROPS];
+
+static void
+gbp_newcomers_project_destroy (GtkWidget *widget)
+{
+ GbpNewcomersProject *self = GBP_NEWCOMERS_PROJECT (widget);
+
+ g_clear_pointer (&self->uri, g_free);
+
+ GTK_WIDGET_CLASS (gbp_newcomers_project_parent_class)->destroy (widget);
+}
+
+static void
+gbp_newcomers_project_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GbpNewcomersProject *self = GBP_NEWCOMERS_PROJECT (object);
+
+ switch (prop_id)
+ {
+ case PROP_URI:
+ g_value_set_string (value, gbp_newcomers_project_get_uri (self));
+ break;
+
+ case PROP_NAME:
+ g_value_set_string (value, gbp_newcomers_project_get_name (self));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+gbp_newcomers_project_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GbpNewcomersProject *self = GBP_NEWCOMERS_PROJECT (object);
+
+ switch (prop_id)
+ {
+ case PROP_URI:
+ self->uri = g_value_dup_string (value);
+ break;
+
+ case PROP_NAME:
+ gtk_label_set_label (self->label, g_value_get_string (value));
+ break;
+
+ case PROP_ICON_NAME:
+ g_object_set (self->icon, "icon-name", g_value_get_string (value), NULL);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+gbp_newcomers_project_class_init (GbpNewcomersProjectClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ object_class->get_property = gbp_newcomers_project_get_property;
+ object_class->set_property = gbp_newcomers_project_set_property;
+
+ widget_class->destroy = gbp_newcomers_project_destroy;
+
+ properties [PROP_ICON_NAME] =
+ g_param_spec_string ("icon-name",
+ "Icon Name",
+ "The icon to load",
+ NULL,
+ (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ properties [PROP_NAME] =
+ g_param_spec_string ("name",
+ "Name",
+ "The name of the newcomer project",
+ NULL,
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ properties [PROP_URI] =
+ g_param_spec_string ("uri",
+ "Uri",
+ "The URL of the project's source code repository",
+ NULL,
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_properties (object_class, N_PROPS, properties);
+
+ gtk_widget_class_set_template_from_resource (widget_class,
+
"/org/gnome/builder/plugins/newcomers-plugin/gbp-newcomers-project.ui");
+ gtk_widget_class_bind_template_child (widget_class, GbpNewcomersProject, label);
+ gtk_widget_class_bind_template_child (widget_class, GbpNewcomersProject, icon);
+}
+
+static void
+gbp_newcomers_project_init (GbpNewcomersProject *self)
+{
+ gtk_widget_init_template (GTK_WIDGET (self));
+}
+
+const gchar *
+gbp_newcomers_project_get_name (GbpNewcomersProject *self)
+{
+ g_return_val_if_fail (GBP_IS_NEWCOMERS_PROJECT (self), NULL);
+
+ return self->label ? gtk_label_get_label (self->label) : NULL;
+}
+
+const gchar *
+gbp_newcomers_project_get_uri (GbpNewcomersProject *self)
+{
+ g_return_val_if_fail (GBP_IS_NEWCOMERS_PROJECT (self), NULL);
+
+ return self->uri;
+}
diff --git a/src/plugins/newcomers/gbp-newcomers-project.h b/src/plugins/newcomers/gbp-newcomers-project.h
new file mode 100644
index 0000000..1ff89a5
--- /dev/null
+++ b/src/plugins/newcomers/gbp-newcomers-project.h
@@ -0,0 +1,33 @@
+/* ide-newcomer-project.h
+ *
+ * Copyright (C) 2017 Christian Hergert <chergert redhat com>
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_NEWCOMERS_PROJECT (gbp_newcomers_project_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpNewcomersProject, gbp_newcomers_project, GBP, NEWCOMERS_PROJECT, GtkFlowBoxChild)
+
+const gchar *gbp_newcomers_project_get_name (GbpNewcomersProject *self);
+const gchar *gbp_newcomers_project_get_uri (GbpNewcomersProject *self);
+GIcon *gbp_newcomers_project_get_icon (GbpNewcomersProject *self);
+
+G_END_DECLS
diff --git a/src/plugins/newcomers/gbp-newcomers-project.ui b/src/plugins/newcomers/gbp-newcomers-project.ui
new file mode 100644
index 0000000..699c87a
--- /dev/null
+++ b/src/plugins/newcomers/gbp-newcomers-project.ui
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <template class="GbpNewcomersProject" parent="GtkFlowBoxChild">
+ <property name="border-width">12</property>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="expand">true</property>
+ <property name="spacing">6</property>
+ <property name="visible">true</property>
+ <child>
+ <object class="GtkImage" id="icon">
+ <property name="expand">true</property>
+ <property name="pixel-size">96</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label">
+ <property name="expand">true</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/src/plugins/newcomers/gbp-newcomers-section.c b/src/plugins/newcomers/gbp-newcomers-section.c
new file mode 100644
index 0000000..56dce74
--- /dev/null
+++ b/src/plugins/newcomers/gbp-newcomers-section.c
@@ -0,0 +1,126 @@
+/* gbp-newcomers-section.c
+ *
+ * Copyright (C) 2017 Christian Hergert <chergert redhat com>
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#define G_LOG_DOMAIN "gbp-newcomers-section"
+
+#include <ide.h>
+
+#include "gbp-newcomers-project.h"
+#include "gbp-newcomers-section.h"
+
+struct _GbpNewcomersSection
+{
+ GtkBin parent_instance;
+ GtkFlowBox *flowbox;
+};
+
+static gint
+gbp_newcomers_section_get_priority (IdeGreeterSection *section)
+{
+ return 100;
+}
+
+static void
+gbp_newcomers_section_filter_child (GtkWidget *child,
+ gpointer user_data)
+{
+ DzlPatternSpec *spec = user_data;
+ gboolean visible = TRUE;
+
+ g_assert (GBP_IS_NEWCOMERS_PROJECT (child));
+
+ if (spec != NULL)
+ {
+ const gchar *name;
+
+ name = gbp_newcomers_project_get_name (GBP_NEWCOMERS_PROJECT (child));
+ visible = dzl_pattern_spec_match (spec, name);
+ }
+
+ gtk_widget_set_visible (child, visible);
+}
+
+static void
+gbp_newcomers_section_filter (IdeGreeterSection *section,
+ DzlPatternSpec *spec)
+{
+ GbpNewcomersSection *self = (GbpNewcomersSection *)section;
+
+ g_assert (GBP_IS_NEWCOMERS_SECTION (self));
+
+ gtk_container_foreach (GTK_CONTAINER (self->flowbox),
+ gbp_newcomers_section_filter_child,
+ spec);
+}
+
+static void
+greeter_section_iface_init (IdeGreeterSectionInterface *iface)
+{
+ iface->get_priority = gbp_newcomers_section_get_priority;
+ iface->filter = gbp_newcomers_section_filter;
+}
+
+G_DEFINE_TYPE_WITH_CODE (GbpNewcomersSection, gbp_newcomers_section, GTK_TYPE_BIN,
+ G_IMPLEMENT_INTERFACE (IDE_TYPE_GREETER_SECTION,
+ greeter_section_iface_init))
+
+static void
+gbp_newcomers_section_child_activated (GbpNewcomersSection *self,
+ GbpNewcomersProject *project,
+ GtkFlowBox *flowbox)
+{
+ g_autoptr(IdeProjectInfo) project_info = NULL;
+ g_autoptr(IdeVcsUri) vcs_uri = NULL;
+ const gchar *name;
+ const gchar *uri;
+
+ g_assert (GBP_IS_NEWCOMERS_SECTION (self));
+ g_assert (GBP_IS_NEWCOMERS_PROJECT (project));
+ g_assert (GTK_IS_FLOW_BOX (flowbox));
+
+ name = gbp_newcomers_project_get_name (project);
+ uri = gbp_newcomers_project_get_uri (project);
+ vcs_uri = ide_vcs_uri_new (uri);
+
+ project_info = g_object_new (IDE_TYPE_PROJECT_INFO,
+ "vcs-uri", vcs_uri,
+ "name", name,
+ NULL);
+
+ ide_greeter_section_emit_project_activated (IDE_GREETER_SECTION (self), project_info);
+}
+
+static void
+gbp_newcomers_section_class_init (GbpNewcomersSectionClass *klass)
+{
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ gtk_widget_class_set_css_name (widget_class, "newcomers");
+ gtk_widget_class_set_template_from_resource (widget_class,
+
"/org/gnome/builder/plugins/newcomers-plugin/gbp-newcomers-section.ui");
+ gtk_widget_class_bind_template_child (widget_class, GbpNewcomersSection, flowbox);
+ gtk_widget_class_bind_template_callback (widget_class, gbp_newcomers_section_child_activated);
+
+ g_type_ensure (GBP_TYPE_NEWCOMERS_PROJECT);
+}
+
+static void
+gbp_newcomers_section_init (GbpNewcomersSection *self)
+{
+ gtk_widget_init_template (GTK_WIDGET (self));
+}
diff --git a/src/plugins/newcomers/gbp-newcomers-section.h b/src/plugins/newcomers/gbp-newcomers-section.h
new file mode 100644
index 0000000..a1e9ee2
--- /dev/null
+++ b/src/plugins/newcomers/gbp-newcomers-section.h
@@ -0,0 +1,29 @@
+/* gbp-newcomers-section.h
+ *
+ * Copyright (C) 2017 Christian Hergert <chergert redhat com>
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_NEWCOMERS_SECTION (gbp_newcomers_section_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpNewcomersSection, gbp_newcomers_section, GBP, NEWCOMERS_SECTION, GtkBin)
+
+G_END_DECLS
diff --git a/src/plugins/newcomers/gbp-newcomers-section.ui b/src/plugins/newcomers/gbp-newcomers-section.ui
new file mode 100644
index 0000000..c679e2e
--- /dev/null
+++ b/src/plugins/newcomers/gbp-newcomers-section.ui
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <template class="GbpNewcomersSection" parent="GtkBin">
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <property name="visible">true</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">true</property>
+ <property name="label" translatable="yes">Newcomer Projects</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFlowBox" id="flowbox">
+ <property name="visible">true</property>
+ <property name="halign">center</property>
+ <property name="valign">start</property>
+ <property name="selection-mode">browse</property>
+ <property name="min-children-per-line">3</property>
+ <property name="max-children-per-line">5</property>
+ <signal name="child-activated" handler="gbp_newcomers_section_child_activated" swapped="true"
object="GbpNewcomersSection"/>
+ <child>
+ <object class="GbpNewcomersProject">
+ <property name="name" translatable="yes">Polari</property>
+ <property name="icon-name">org.gnome.Polari</property>
+ <property name="uri">https://gitlab.gnome.org/GNOME/polari.git</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GbpNewcomersProject">
+ <property name="name" translatable="yes">Games</property>
+ <property name="icon-name">org.gnome.Games</property>
+ <property name="uri">https://git.gnome.org/browse/gnome-games</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GbpNewcomersProject">
+ <property name="name" translatable="yes">Maps</property>
+ <property name="icon-name">org.gnome.Maps</property>
+ <property name="uri">https://git.gnome.org/browse/gnome-maps</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GbpNewcomersProject">
+ <property name="name" translatable="yes">Todo</property>
+ <property name="icon-name">org.gnome.Todo</property>
+ <property name="uri">https://gitlab.gnome.org/GNOME/gnome-todo.git</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GbpNewcomersProject">
+ <property name="name" translatable="yes">Music</property>
+ <property name="icon-name">org.gnome.Music</property>
+ <property name="uri">https://git.gnome.org/browse/gnome-music</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GbpNewcomersProject">
+ <property name="name" translatable="yes">Nautilus</property>
+ <property name="icon-name">org.gnome.Nautilus</property>
+ <property name="uri">https://gitlab.gnome.org/GNOME/nautilus.git</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GbpNewcomersProject">
+ <property name="name" translatable="yes">Photos</property>
+ <property name="icon-name">org.gnome.Photos</property>
+ <property name="uri">https://git.gnome.org/browse/gnome-photos</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GbpNewcomersProject">
+ <property name="name" translatable="yes">Calendar</property>
+ <property name="icon-name">org.gnome.Calendar</property>
+ <property name="uri">https://git.gnome.org/browse/gnome-calendar.git</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/src/plugins/newcomers/icons/org.gnome.Calendar.png
b/src/plugins/newcomers/icons/org.gnome.Calendar.png
new file mode 100644
index 0000000..8c07c2a
Binary files /dev/null and b/src/plugins/newcomers/icons/org.gnome.Calendar.png differ
diff --git a/src/plugins/newcomers/icons/org.gnome.Games.png b/src/plugins/newcomers/icons/org.gnome.Games.png
new file mode 100644
index 0000000..32e7ecd
Binary files /dev/null and b/src/plugins/newcomers/icons/org.gnome.Games.png differ
diff --git a/src/plugins/newcomers/icons/org.gnome.Maps.png b/src/plugins/newcomers/icons/org.gnome.Maps.png
new file mode 100644
index 0000000..b476d84
Binary files /dev/null and b/src/plugins/newcomers/icons/org.gnome.Maps.png differ
diff --git a/src/plugins/newcomers/icons/org.gnome.Music.png b/src/plugins/newcomers/icons/org.gnome.Music.png
new file mode 100644
index 0000000..e66ecb3
Binary files /dev/null and b/src/plugins/newcomers/icons/org.gnome.Music.png differ
diff --git a/src/plugins/newcomers/icons/org.gnome.Nautilus.png
b/src/plugins/newcomers/icons/org.gnome.Nautilus.png
new file mode 100644
index 0000000..f7147a8
Binary files /dev/null and b/src/plugins/newcomers/icons/org.gnome.Nautilus.png differ
diff --git a/src/plugins/newcomers/icons/org.gnome.Photos.png
b/src/plugins/newcomers/icons/org.gnome.Photos.png
new file mode 100644
index 0000000..a7c76c0
Binary files /dev/null and b/src/plugins/newcomers/icons/org.gnome.Photos.png differ
diff --git a/src/plugins/newcomers/icons/org.gnome.Polari.png
b/src/plugins/newcomers/icons/org.gnome.Polari.png
new file mode 100644
index 0000000..431d437
Binary files /dev/null and b/src/plugins/newcomers/icons/org.gnome.Polari.png differ
diff --git a/src/plugins/newcomers/icons/org.gnome.Todo.png b/src/plugins/newcomers/icons/org.gnome.Todo.png
new file mode 100644
index 0000000..0ddb14d
Binary files /dev/null and b/src/plugins/newcomers/icons/org.gnome.Todo.png differ
diff --git a/src/plugins/newcomers/meson.build b/src/plugins/newcomers/meson.build
new file mode 100644
index 0000000..f461394
--- /dev/null
+++ b/src/plugins/newcomers/meson.build
@@ -0,0 +1,20 @@
+if get_option('with_newcomers')
+
+newcomers_resources = gnome.compile_resources(
+ 'newcomers-resources',
+ 'newcomers.gresource.xml',
+ c_name: 'gbp_newcomers',
+)
+
+newcomers_sources = [
+ 'newcomers-plugin.c',
+ 'gbp-newcomers-project.c',
+ 'gbp-newcomers-project.h',
+ 'gbp-newcomers-section.c',
+ 'gbp-newcomers-section.h',
+]
+
+gnome_builder_plugins_sources += files(newcomers_sources)
+gnome_builder_plugins_sources += newcomers_resources[0]
+
+endif
diff --git a/src/plugins/newcomers/newcomers-plugin.c b/src/plugins/newcomers/newcomers-plugin.c
new file mode 100644
index 0000000..3bb5e70
--- /dev/null
+++ b/src/plugins/newcomers/newcomers-plugin.c
@@ -0,0 +1,30 @@
+/* newcomers-plugin.c
+ *
+ * Copyright (C) 2017 Christian Hergert <chergert redhat com>
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <libpeas/peas.h>
+#include <ide.h>
+
+#include "gbp-newcomers-section.h"
+
+void
+gbp_newcomers_register_types (PeasObjectModule *module)
+{
+ peas_object_module_register_extension_type (module,
+ IDE_TYPE_GREETER_SECTION,
+ GBP_TYPE_NEWCOMERS_SECTION);
+}
diff --git a/src/plugins/newcomers/newcomers.gresource.xml b/src/plugins/newcomers/newcomers.gresource.xml
new file mode 100644
index 0000000..cf4d2b1
--- /dev/null
+++ b/src/plugins/newcomers/newcomers.gresource.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>newcomers.plugin</file>
+ </gresource>
+
+ <gresource prefix="/org/gnome/builder/plugins/newcomers-plugin">
+ <file>gbp-newcomers-project.ui</file>
+ <file>gbp-newcomers-section.ui</file>
+ </gresource>
+
+ <!-- Icons used by the greeter for newcomer projects -->
+ <gresource prefix="/org/gnome/builder/icons">
+ <file alias="256x256/apps/org.gnome.Maps.png">icons/org.gnome.Maps.png</file>
+ <file alias="256x256/apps/org.gnome.Music.png">icons/org.gnome.Music.png</file>
+ <file alias="256x256/apps/org.gnome.Photos.png">icons/org.gnome.Photos.png</file>
+ <file alias="512x512/apps/org.gnome.Calendar.png">icons/org.gnome.Calendar.png</file>
+ <file alias="512x512/apps/org.gnome.Games.png">icons/org.gnome.Games.png</file>
+ <file alias="512x512/apps/org.gnome.Nautilus.png">icons/org.gnome.Nautilus.png</file>
+ <file alias="512x512/apps/org.gnome.Polari.png">icons/org.gnome.Polari.png</file>
+ <file alias="512x512/apps/org.gnome.Todo.png">icons/org.gnome.Todo.png</file>
+ </gresource>
+
+</gresources>
diff --git a/src/plugins/newcomers/newcomers.plugin b/src/plugins/newcomers/newcomers.plugin
new file mode 100644
index 0000000..fe9f44e
--- /dev/null
+++ b/src/plugins/newcomers/newcomers.plugin
@@ -0,0 +1,8 @@
+[Plugin]
+Module=newcomers-plugin
+Name=GNOME Newcomers
+Description=Integration with GNOME newcomers initiative
+Authors=Christian Hergert <christian hergert me>
+Copyright=Copyright © 2017 Christian Hergert
+Builtin=true
+Embedded=gbp_newcomers_register_types
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]