[gnome-builder/wip/project-selector: 21/67] initial-setup: play with some new ideas for initial setup



commit c01505c7dcef2bb3a362fc051f11f8e073b41438
Author: Christian Hergert <christian hergert me>
Date:   Wed Apr 1 20:07:35 2015 -0700

    initial-setup: play with some new ideas for initial setup
    
    Alternate design experiment

 data/ui/gb-initial-setup-dialog.ui          |  331 +++++++++++++++++++++++++++
 src/app/gb-application.c                    |    5 +-
 src/gnome-builder.mk                        |    3 +
 src/initial-setup/gb-initial-setup-dialog.c |  273 ++++++++++++++++++++++
 src/initial-setup/gb-initial-setup-dialog.h |   47 ++++
 src/resources/gnome-builder.gresource.xml   |    1 +
 6 files changed, 658 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/gb-initial-setup-dialog.ui b/data/ui/gb-initial-setup-dialog.ui
new file mode 100644
index 0000000..9e19efe
--- /dev/null
+++ b/data/ui/gb-initial-setup-dialog.ui
@@ -0,0 +1,331 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.15 -->
+  <template class="GbInitialSetupDialog" parent="GtkApplicationWindow">
+    <property name="default-width">800</property>
+    <property name="default-height">600</property>
+    <child type="titlebar">
+      <object class="GtkHeaderBar" id="header_bar">
+        <property name="show-close-button">true</property>
+        <property name="visible">true</property>
+        <child>
+          <object class="GtkButton" id="back_button">
+            <property name="visible">false</property>
+            <style>
+              <class name="image-button"/>
+            </style>
+            <child>
+              <object class="GtkImage">
+                <property name="icon-name">go-previous-symbolic</property>
+                <property name="visible">true</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child>
+      <object class="GtkStack" id="stack">
+        <property name="expand">true</property>
+        <property name="transition-type">slide-left-right</property>
+        <property name="visible">true</property>
+        <child>
+          <object class="GtkBox" id="page_select_project">
+            <property name="orientation">vertical</property>
+            <property name="visible">true</property>
+            <child>
+              <object class="GtkBox">
+                <property name="orientation">vertical</property>
+                <property name="expand">true</property>
+                <property name="visible">true</property>
+                <child type="center">
+                  <object class="GbScrolledWindow">
+                    <property name="valign">center</property>
+                    <property name="vexpand">false</property>
+                    <property name="halign">center</property>
+                    <property name="hexpand">false</property>
+                    <property name="max-content-height">600</property>
+                    <property name="max-content-width">500</property>
+                    <property name="min-content-height">100</property>
+                    <property name="min-content-width">400</property>
+                    <property name="shadow-type">in</property>
+                    <property name="visible">true</property>
+                    <child>
+                      <object class="GtkListBox" id="select_list_box">
+                        <property name="selection-mode">none</property>
+                        <property name="visible">true</property>
+                        <child>
+                          <object class="GtkListBoxRow" id="row_new_project">
+                            <property name="activatable">true</property>
+                            <property name="visible">true</property>
+                            <child>
+                              <object class="GtkBox">
+                                <property name="orientation">horizontal</property>
+                                <property name="margin">12</property>
+                                <property name="visible">true</property>
+                                <child>
+                                  <object class="GtkLabel">
+                                    <property name="label" translatable="yes">New Project</property>
+                                    <property name="hexpand">true</property>
+                                    <property name="visible">true</property>
+                                    <property name="xalign">0.0</property>
+                                    <style>
+                                      <class name="dim-label"/>
+                                    </style>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkArrow">
+                                    <property name="arrow-type">right</property>
+                                    <property name="hexpand">false</property>
+                                    <property name="visible">true</property>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkListBoxRow" id="row_open_project">
+                            <property name="visible">true</property>
+                            <child>
+                              <object class="GtkBox">
+                                <property name="orientation">horizontal</property>
+                                <property name="margin">12</property>
+                                <property name="visible">true</property>
+                                <child>
+                                  <object class="GtkLabel">
+                                    <property name="label" translatable="yes">Open Project</property>
+                                    <property name="hexpand">true</property>
+                                    <property name="visible">true</property>
+                                    <property name="xalign">0.0</property>
+                                    <style>
+                                      <class name="dim-label"/>
+                                    </style>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkArrow">
+                                    <property name="arrow-type">right</property>
+                                    <property name="hexpand">false</property>
+                                    <property name="visible">true</property>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkListBoxRow" id="row_recent_projects">
+                            <property name="visible">true</property>
+                            <property name="activatable">false</property>
+                            <property name="selectable">false</property>
+                            <child>
+                              <object class="GtkBox">
+                                <property name="orientation">horizontal</property>
+                                <property name="margin">12</property>
+                                <property name="visible">true</property>
+                                <child>
+                                  <object class="GtkLabel">
+                                    <property name="label" translatable="yes">Recent Projects</property>
+                                    <property name="hexpand">true</property>
+                                    <property name="visible">true</property>
+                                    <property name="xalign">0.0</property>
+                                    <style>
+                                      <class name="dim-label"/>
+                                    </style>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkListBoxRow" id="row_view_more">
+                            <property name="visible">true</property>
+                            <child>
+                              <object class="GtkImage">
+                                <property name="margin">12</property>
+                                <property name="icon-name">view-more-symbolic</property>
+                                <property name="visible">true</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkBox" id="page_open_project">
+            <property name="orientation">vertical</property>
+            <property name="visible">true</property>
+            <child>
+              <object class="GtkBox">
+                <property name="expand">true</property>
+                <property name="visible">true</property>
+                <child type="center">
+                  <object class="GbScrolledWindow">
+                    <property name="halign">center</property>
+                    <property name="hexpand">false</property>
+                    <property name="max-content-height">600</property>
+                    <property name="max-content-width">500</property>
+                    <property name="min-content-height">20</property>
+                    <property name="min-content-width">400</property>
+                    <property name="shadow-type">in</property>
+                    <property name="valign">center</property>
+                    <property name="vexpand">false</property>
+                    <property name="visible">true</property>
+                    <child>
+                      <object class="GtkListBox" id="open_list_box">
+                        <property name="selection-mode">none</property>
+                        <property name="visible">true</property>
+                        <child>
+                          <object class="GtkListBoxRow" id="row_open_existing_project">
+                            <property name="visible">true</property>
+                            <child>
+                              <object class="GtkBox">
+                                <property name="orientation">horizontal</property>
+                                <property name="margin">12</property>
+                                <property name="spacing">12</property>
+                                <property name="visible">true</property>
+                                <child>
+                                  <object class="GtkImage">
+                                    <property name="icon-name">folder</property>
+                                    <property name="pixel-size">32</property>
+                                    <property name="visible">true</property>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel">
+                                    <property name="label" translatable="yes">From existing project on this 
computer</property>
+                                    <property name="hexpand">true</property>
+                                    <property name="visible">true</property>
+                                    <property name="xalign">0.0</property>
+                                    <style>
+                                      <class name="dim-label"/>
+                                    </style>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkListBoxRow" id="row_open_remove_project">
+                            <property name="visible">true</property>
+                            <child>
+                              <object class="GtkBox">
+                                <property name="orientation">horizontal</property>
+                                <property name="margin">12</property>
+                                <property name="spacing">12</property>
+                                <property name="visible">true</property>
+                                <child>
+                                  <object class="GtkImage">
+                                    <property name="icon-name">gitg</property>
+                                    <property name="pixel-size">32</property>
+                                    <property name="visible">true</property>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel">
+                                    <property name="label" translatable="yes">From remote source code 
repository</property>
+                                    <property name="hexpand">true</property>
+                                    <property name="visible">true</property>
+                                    <property name="xalign">0.0</property>
+                                    <style>
+                                      <class name="dim-label"/>
+                                    </style>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkBox" id="page_new_project">
+            <property name="orientation">vertical</property>
+            <property name="expand">true</property>
+            <property name="visible">true</property>
+            <child type="center">
+              <object class="GtkGrid">
+                <property name="column-spacing">12</property>
+                <property name="row-spacing">12</property>
+                <property name="halign">center</property>
+                <property name="hexpand">false</property>
+                <property name="valign">center</property>
+                <property name="vexpand">false</property>
+                <property name="visible">true</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="label" translatable="yes">Name</property>
+                    <property name="visible">true</property>
+                    <property name="xalign">1.0</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="left-attach">0</property>
+                    <property name="width">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry">
+                    <property name="hexpand">true</property>
+                    <property name="width-chars">35</property>
+                    <property name="visible">true</property>
+                  </object>
+                  <packing>
+                    <property name="left-attach">1</property>
+                    <property name="width">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="label" translatable="yes">Location</property>
+                    <property name="visible">true</property>
+                    <property name="xalign">1.0</property>
+                    <style>
+                      <class name="dim-label"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="top-attach">1</property>
+                    <property name="left-attach">0</property>
+                    <property name="width">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFileChooserButton">
+                    <property name="action">select-folder</property>
+                    <property name="width-chars">35</property>
+                    <property name="hexpand">true</property>
+                    <property name="visible">true</property>
+                  </object>
+                  <packing>
+                    <property name="top-attach">1</property>
+                    <property name="left-attach">1</property>
+                    <property name="width">2</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/src/app/gb-application.c b/src/app/gb-application.c
index 796f9e1..a57ff00 100644
--- a/src/app/gb-application.c
+++ b/src/app/gb-application.c
@@ -32,6 +32,7 @@
 #include "gb-editor-document.h"
 #include "gb-editor-workspace.h"
 #include "gb-glib.h"
+#include "gb-initial-setup-dialog.h"
 #include "gb-project-window.h"
 #include "gb-resources.h"
 #include "gb-workbench.h"
@@ -479,14 +480,14 @@ gb_application_show_projects_window (GbApplication *self)
 
   for (; windows; windows = windows->next)
     {
-      if (GB_IS_PROJECT_WINDOW (windows->data))
+      if (GB_IS_INITIAL_SETUP_DIALOG (windows->data))
         {
           gtk_window_present (windows->data);
           return;
         }
     }
 
-  window = g_object_new (GB_TYPE_PROJECT_WINDOW,
+  window = g_object_new (GB_TYPE_INITIAL_SETUP_DIALOG,
                          "application", self,
                          NULL);
   gtk_window_maximize (GTK_WINDOW (window));
diff --git a/src/gnome-builder.mk b/src/gnome-builder.mk
index 5246e04..bfb725b 100644
--- a/src/gnome-builder.mk
+++ b/src/gnome-builder.mk
@@ -68,6 +68,8 @@ libgnome_builder_la_SOURCES = \
        src/html/gb-html-document.h \
        src/html/gb-html-view.c \
        src/html/gb-html-view.h \
+       src/initial-setup/gb-initial-setup-dialog.c \
+       src/initial-setup/gb-initial-setup-dialog.h \
        src/keybindings/gb-keybindings.c \
        src/keybindings/gb-keybindings.h \
        src/nautilus/nautilus-floating-bar.c \
@@ -174,6 +176,7 @@ libgnome_builder_la_CFLAGS = \
        -I$(top_srcdir)/src/gd \
        -I$(top_srcdir)/src/gedit \
        -I$(top_srcdir)/src/html \
+       -I$(top_srcdir)/src/initial-setup \
        -I$(top_srcdir)/src/keybindings \
        -I$(top_srcdir)/src/nautilus \
        -I$(top_srcdir)/src/preferences \
diff --git a/src/initial-setup/gb-initial-setup-dialog.c b/src/initial-setup/gb-initial-setup-dialog.c
new file mode 100644
index 0000000..c97e673
--- /dev/null
+++ b/src/initial-setup/gb-initial-setup-dialog.c
@@ -0,0 +1,273 @@
+/* gb-initial-setup-dialog.c
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * 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 <glib/gi18n.h>
+
+#include "gb-initial-setup-dialog.h"
+#include "gb-scrolled-window.h"
+#include "gb-widget.h"
+
+struct _GbInitialSetupDialog
+{
+  GtkApplicationWindow  parent_instance;
+
+  GbInitialSetupPage    page;
+
+  GtkButton            *back_button;
+  GtkHeaderBar         *header_bar;
+  GtkWidget            *page_new_project;
+  GtkWidget            *page_open_project;
+  GtkWidget            *page_select_project;
+  GtkListBoxRow        *row_open_project;
+  GtkListBoxRow        *row_view_more;
+  GtkListBoxRow        *row_recent_projects;
+  GtkListBoxRow        *row_new_project;
+  GtkListBox           *select_list_box;
+  GtkStack             *stack;
+};
+
+G_DEFINE_TYPE (GbInitialSetupDialog, gb_initial_setup_dialog, GTK_TYPE_APPLICATION_WINDOW)
+
+enum {
+  PROP_0,
+  PROP_PAGE,
+  LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+GbInitialSetupPage
+gb_initial_setup_dialog_get_page (GbInitialSetupDialog *self)
+{
+  g_return_val_if_fail (GB_IS_INITIAL_SETUP_DIALOG (self), 0);
+
+  return self->page;
+}
+
+void
+gb_initial_setup_dialog_set_page (GbInitialSetupDialog *self,
+                                  GbInitialSetupPage    page)
+{
+  g_return_if_fail (GB_IS_INITIAL_SETUP_DIALOG (self));
+  g_return_if_fail (page >= GB_INITIAL_SETUP_PAGE_SELECT_PROJECT);
+  g_return_if_fail (page <= GB_INITIAL_SETUP_PAGE_NEW_PROJECT);
+
+  if (page != self->page)
+    {
+      GtkWidget *child = NULL;
+      gboolean back_button_visible = FALSE;
+      const gchar *label;
+
+      self->page = page;
+
+      switch (page)
+        {
+        case GB_INITIAL_SETUP_PAGE_SELECT_PROJECT:
+          child = self->page_select_project;
+          label = _("Select Project");
+          break;
+
+        case GB_INITIAL_SETUP_PAGE_NEW_PROJECT:
+          child = self->page_new_project;
+          label = _("New Project");
+          back_button_visible = TRUE;
+          break;
+
+        case GB_INITIAL_SETUP_PAGE_OPEN_PROJECT:
+          child = self->page_open_project;
+          label = _("Open Project");
+          back_button_visible = TRUE;
+          break;
+
+        default:
+          g_assert_not_reached ();
+          break;
+        }
+
+      g_print ("Changing page to %s\n", label);
+
+      gtk_stack_set_visible_child (self->stack, child);
+      gtk_header_bar_set_title (self->header_bar, label);
+      gtk_widget_set_visible (GTK_WIDGET (self->back_button), back_button_visible);
+
+      g_object_notify_by_pspec (G_OBJECT (self), gParamSpecs [PROP_PAGE]);
+    }
+}
+
+static void
+gb_initial_setup_dialog_show_more (GbInitialSetupDialog *self)
+{
+  g_assert (GB_INITIAL_SETUP_DIALOG (self));
+}
+
+static void
+gb_initial_setup_dialog__select_list_box_row_activated (GbInitialSetupDialog *self,
+                                                        GtkListBoxRow        *row,
+                                                        GtkListBox           *list_box)
+{
+  g_assert (GB_IS_INITIAL_SETUP_DIALOG (self));
+  g_assert (GTK_IS_LIST_BOX_ROW (row));
+  g_assert (GTK_IS_LIST_BOX (list_box));
+
+  if (row == self->row_new_project)
+    gb_initial_setup_dialog_set_page (self, GB_INITIAL_SETUP_PAGE_NEW_PROJECT);
+  else if (row == self->row_open_project)
+    gb_initial_setup_dialog_set_page (self, GB_INITIAL_SETUP_PAGE_OPEN_PROJECT);
+  else if (row == self->row_view_more)
+    gb_initial_setup_dialog_show_more (self);
+}
+
+static void
+gb_initial_setup_dialog__back_button_clicked (GbInitialSetupDialog *self,
+                                              GtkButton            *back_button)
+{
+  g_assert (GB_IS_INITIAL_SETUP_DIALOG (self));
+  g_assert (GTK_IS_BUTTON (back_button));
+
+  gb_initial_setup_dialog_set_page (self, GB_INITIAL_SETUP_PAGE_SELECT_PROJECT);
+}
+
+static void
+gb_initial_setup_dialog_finalize (GObject *object)
+{
+  //GbInitialSetupDialog *self = (GbInitialSetupDialog *)object;
+
+  G_OBJECT_CLASS (gb_initial_setup_dialog_parent_class)->finalize (object);
+}
+
+static void
+gb_initial_setup_dialog_get_property (GObject    *object,
+                                      guint       prop_id,
+                                      GValue     *value,
+                                      GParamSpec *pspec)
+{
+  GbInitialSetupDialog *self = GB_INITIAL_SETUP_DIALOG (object);
+
+  switch (prop_id)
+    {
+    case PROP_PAGE:
+      g_value_set_enum (value, gb_initial_setup_dialog_get_page (self));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+gb_initial_setup_dialog_set_property (GObject      *object,
+                                      guint         prop_id,
+                                      const GValue *value,
+                                      GParamSpec   *pspec)
+{
+  GbInitialSetupDialog *self = GB_INITIAL_SETUP_DIALOG (object);
+
+  switch (prop_id)
+    {
+    case PROP_PAGE:
+      gb_initial_setup_dialog_set_page (self, g_value_get_enum (value));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+gb_initial_setup_dialog_class_init (GbInitialSetupDialogClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+  object_class->finalize = gb_initial_setup_dialog_finalize;
+  object_class->get_property = gb_initial_setup_dialog_get_property;
+  object_class->set_property = gb_initial_setup_dialog_set_property;
+
+  gParamSpecs [PROP_PAGE] =
+    g_param_spec_enum ("page",
+                       _("Page"),
+                       _("The current setup page."),
+                       GB_TYPE_INITIAL_SETUP_PAGE,
+                       GB_INITIAL_SETUP_PAGE_SELECT_PROJECT,
+                       (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (object_class, PROP_PAGE, gParamSpecs [PROP_PAGE]);
+
+  GB_WIDGET_CLASS_TEMPLATE (widget_class, "gb-initial-setup-dialog.ui");
+
+  GB_WIDGET_CLASS_BIND (widget_class, GbInitialSetupDialog, back_button);
+  GB_WIDGET_CLASS_BIND (widget_class, GbInitialSetupDialog, header_bar);
+  GB_WIDGET_CLASS_BIND (widget_class, GbInitialSetupDialog, page_new_project);
+  GB_WIDGET_CLASS_BIND (widget_class, GbInitialSetupDialog, page_open_project);
+  GB_WIDGET_CLASS_BIND (widget_class, GbInitialSetupDialog, page_select_project);
+  GB_WIDGET_CLASS_BIND (widget_class, GbInitialSetupDialog, row_open_project);
+  GB_WIDGET_CLASS_BIND (widget_class, GbInitialSetupDialog, row_view_more);
+  GB_WIDGET_CLASS_BIND (widget_class, GbInitialSetupDialog, row_recent_projects);
+  GB_WIDGET_CLASS_BIND (widget_class, GbInitialSetupDialog, row_new_project);
+  GB_WIDGET_CLASS_BIND (widget_class, GbInitialSetupDialog, select_list_box);
+  GB_WIDGET_CLASS_BIND (widget_class, GbInitialSetupDialog, stack);
+
+  g_type_ensure (GB_TYPE_SCROLLED_WINDOW);
+}
+
+static void
+gb_initial_setup_dialog_init (GbInitialSetupDialog *self)
+{
+  gtk_widget_init_template (GTK_WIDGET (self));
+
+  gb_initial_setup_dialog_set_page (self, GB_INITIAL_SETUP_PAGE_SELECT_PROJECT);
+
+  g_signal_connect_object (self->back_button,
+                           "clicked",
+                           G_CALLBACK (gb_initial_setup_dialog__back_button_clicked),
+                           self,
+                           G_CONNECT_SWAPPED);
+
+  g_signal_connect_object (self->select_list_box,
+                           "row-activated",
+                           G_CALLBACK (gb_initial_setup_dialog__select_list_box_row_activated),
+                           self,
+                           G_CONNECT_SWAPPED);
+}
+
+GType
+gb_initial_setup_page_get_type (void)
+{
+  static gsize type_id;
+
+  if (g_once_init_enter (&type_id))
+    {
+      static const GEnumValue values[] = {
+        { GB_INITIAL_SETUP_PAGE_SELECT_PROJECT,
+          "GB_INITIAL_SETUP_PAGE_SELECT_PROJECT",
+          "select-project" },
+        { GB_INITIAL_SETUP_PAGE_OPEN_PROJECT,
+          "GB_INITIAL_SETUP_PAGE_OPEN_PROJECT",
+          "open-project" },
+        { GB_INITIAL_SETUP_PAGE_NEW_PROJECT,
+          "GB_INITIAL_SETUP_PAGE_NEW_PROJECT",
+          "new-project" },
+        { 0 }
+      };
+      gsize _type_id;
+
+      _type_id = g_enum_register_static ("GbInitialSetupPage", values);
+      g_once_init_leave (&type_id, _type_id);
+    }
+
+  return type_id;
+}
diff --git a/src/initial-setup/gb-initial-setup-dialog.h b/src/initial-setup/gb-initial-setup-dialog.h
new file mode 100644
index 0000000..1686b23
--- /dev/null
+++ b/src/initial-setup/gb-initial-setup-dialog.h
@@ -0,0 +1,47 @@
+/* gb-initial-setup-dialog.h
+ *
+ * Copyright (C) 2015 Christian Hergert <christian hergert me>
+ *
+ * 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/>.
+ */
+
+#ifndef GB_INITIAL_SETUP_DIALOG_H
+#define GB_INITIAL_SETUP_DIALOG_H
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GB_TYPE_INITIAL_SETUP_DIALOG (gb_initial_setup_dialog_get_type())
+#define GB_TYPE_INITIAL_SETUP_PAGE   (gb_initial_setup_page_get_type())
+
+typedef enum
+{
+  GB_INITIAL_SETUP_PAGE_SELECT_PROJECT = 1,
+  GB_INITIAL_SETUP_PAGE_OPEN_PROJECT,
+  GB_INITIAL_SETUP_PAGE_NEW_PROJECT,
+} GbInitialSetupPage;
+
+G_DECLARE_FINAL_TYPE (GbInitialSetupDialog, gb_initial_setup_dialog,
+                      GB, INITIAL_SETUP_DIALOG,
+                      GtkApplicationWindow)
+
+GType              gb_initial_setup_page_get_type   (void);
+GbInitialSetupPage gb_initial_setup_dialog_get_page (GbInitialSetupDialog *self);
+void               gb_initial_setup_dialog_set_page (GbInitialSetupDialog *self,
+                                                     GbInitialSetupPage    page);
+
+G_END_DECLS
+
+#endif /* GB_INITIAL_SETUP_DIALOG_H */
diff --git a/src/resources/gnome-builder.gresource.xml b/src/resources/gnome-builder.gresource.xml
index bcad354..35c0422 100644
--- a/src/resources/gnome-builder.gresource.xml
+++ b/src/resources/gnome-builder.gresource.xml
@@ -34,6 +34,7 @@
     <file alias="ui/gb-editor-view.ui">../../data/ui/gb-editor-view.ui</file>
     <file alias="ui/gb-editor-workspace.ui">../../data/ui/gb-editor-workspace.ui</file>
     <file alias="ui/gb-html-view.ui">../../data/ui/gb-html-view.ui</file>
+    <file alias="ui/gb-initial-setup-dialog.ui">../../data/ui/gb-initial-setup-dialog.ui</file>
     <file alias="ui/gb-preferences-page-editor.ui">../../data/ui/gb-preferences-page-editor.ui</file>
     <file 
alias="ui/gb-preferences-page-experimental.ui">../../data/ui/gb-preferences-page-experimental.ui</file>
     <file alias="ui/gb-preferences-page-git.ui">../../data/ui/gb-preferences-page-git.ui</file>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]