[gnome-calendar/calendar-management] sources-dialog: initial stup implementation



commit 4d77eaee7da580a690e87281a9df2def2682869e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Jan 13 20:07:24 2015 -0200

    sources-dialog: initial stup implementation
    
    Does actually nothin at the moment.

 src/Makefile.am                  |    2 +
 src/gcal-source-manager-dialog.c |   74 ++++++++++++++++++++++++++++++++++++++
 src/gcal-source-manager-dialog.h |   53 +++++++++++++++++++++++++++
 3 files changed, 129 insertions(+), 0 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 6c9fc56..c2ab0c1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -40,6 +40,8 @@ gnome_calendar_SOURCES =                                  \
     gcal-year-view.h                                      \
     gcal-search-view.h                                    \
     gcal-search-view.c                                    \
+    gcal-source-manager-dialog.c                          \
+    gcal-source-manager-dialog.h                          \
     gcal-event-widget.c                                   \
     gcal-event-widget.h                                   \
     gcal-edit-dialog.c                                    \
diff --git a/src/gcal-source-manager-dialog.c b/src/gcal-source-manager-dialog.c
new file mode 100644
index 0000000..2828c52
--- /dev/null
+++ b/src/gcal-source-manager-dialog.c
@@ -0,0 +1,74 @@
+#include "gcal-source-manager-dialog.h"
+
+struct _GcalSourceManagerDialogPrivate
+{
+
+};
+
+enum {
+  PROP_0,
+  LAST_PROP
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE (GcalSourceManagerDialog, gcal_source_manager_dialog, GTK_TYPE_DIALOG)
+
+GcalSourceManagerDialog *
+gcal_source_manager_dialog_new (void)
+{
+  return g_object_new (GCAL_TYPE_SOURCE_MANAGER_DIALOG, NULL);
+}
+
+static void
+gcal_source_manager_dialog_finalize (GObject *object)
+{
+  G_OBJECT_CLASS (gcal_source_manager_dialog_parent_class)->finalize (object);
+}
+
+static void
+gcal_source_manager_dialog_get_property (GObject    *object,
+                                         guint       prop_id,
+                                         GValue     *value,
+                                         GParamSpec *pspec)
+{
+  GcalSourceManagerDialog *self = GCAL_SOURCE_MANAGER_DIALOG (object);
+
+  switch (prop_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+gcal_source_manager_dialog_set_property (GObject      *object,
+                                         guint         prop_id,
+                                         const GValue *value,
+                                         GParamSpec   *pspec)
+{
+  GcalSourceManagerDialog *self = GCAL_SOURCE_MANAGER_DIALOG (object);
+
+  switch (prop_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+gcal_source_manager_dialog_class_init (GcalSourceManagerDialogClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = gcal_source_manager_dialog_finalize;
+  object_class->get_property = gcal_source_manager_dialog_get_property;
+  object_class->set_property = gcal_source_manager_dialog_set_property;
+
+  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
+                                               "/org/gnome/calendar/source-manager-dialog.ui");
+}
+
+static void
+gcal_source_manager_dialog_init (GcalSourceManagerDialog *self)
+{
+  gtk_widget_init_template (GTK_WIDGET (self));
+}
diff --git a/src/gcal-source-manager-dialog.h b/src/gcal-source-manager-dialog.h
new file mode 100644
index 0000000..446d243
--- /dev/null
+++ b/src/gcal-source-manager-dialog.h
@@ -0,0 +1,53 @@
+/* gcal-source-manager-dialog.h
+ *
+ * Copyright (C) 2015 Georges Basile Stavracas Neto <georges stavracas gmail 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/>.
+ */
+#ifndef GCAL_SOURCE_MANAGER_DIALOG_H
+#define GCAL_SOURCE_MANAGER_DIALOG_H
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GCAL_TYPE_SOURCE_MANAGER_DIALOG            (gcal_source_manager_dialog_get_type())
+#define GCAL_SOURCE_MANAGER_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GCAL_TYPE_SOURCE_MANAGER_DIALOG, GcalSourceManagerDialog))
+#define GCAL_SOURCE_MANAGER_DIALOG_CONST(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GCAL_TYPE_SOURCE_MANAGER_DIALOG, GcalSourceManagerDialog const))
+#define GCAL_SOURCE_MANAGER_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
GCAL_TYPE_SOURCE_MANAGER_DIALOG, GcalSourceManagerDialogClass))
+#define GCAL_IS_SOURCE_MANAGER_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
GCAL_TYPE_SOURCE_MANAGER_DIALOG))
+#define GCAL_IS_SOURCE_MANAGER_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
GCAL_TYPE_SOURCE_MANAGER_DIALOG))
+#define GCAL_SOURCE_MANAGER_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
GCAL_TYPE_SOURCE_MANAGER_DIALOG, GcalSourceManagerDialogClass))
+
+typedef struct _GcalSourceManagerDialog        GcalSourceManagerDialog;
+typedef struct _GcalSourceManagerDialogClass   GcalSourceManagerDialogClass;
+typedef struct _GcalSourceManagerDialogPrivate GcalSourceManagerDialogPrivate;
+
+struct _GcalSourceManagerDialog
+{
+  GtkDialog parent;
+};
+
+struct _GcalSourceManagerDialogClass
+{
+  GtkDialogClass parent;
+};
+
+GType                           gcal_source_manager_dialog_get_type     (void);
+
+GcalSourceManagerDialog*        gcal_source_manager_dialog_new          (void);
+
+G_END_DECLS
+
+#endif /* GCAL_SOURCE_MANAGER_DIALOG_H */


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