source-dialog: rename class to GcalSourceDialog
This commit is contained in:
committed by
Erick Pérez Castellanos
parent
095fd60ba8
commit
08f4853a2a
+2
-2
@@ -33,11 +33,11 @@ gnome_calendar_SOURCES = \
|
|||||||
gcal-window.c \
|
gcal-window.c \
|
||||||
gcal-view.c \
|
gcal-view.c \
|
||||||
gcal-view.h \
|
gcal-view.h \
|
||||||
gcal-source-dialog.c \
|
|
||||||
gcal-source-dialog.h \
|
|
||||||
gcal-subscriber-view.c \
|
gcal-subscriber-view.c \
|
||||||
gcal-subscriber-view.h \
|
gcal-subscriber-view.h \
|
||||||
gcal-subscriber-view-private.h \
|
gcal-subscriber-view-private.h \
|
||||||
|
gcal-source-dialog.c \
|
||||||
|
gcal-source-dialog.h \
|
||||||
gcal-month-view.c \
|
gcal-month-view.c \
|
||||||
gcal-month-view.h \
|
gcal-month-view.h \
|
||||||
gcal-week-view.c \
|
gcal-week-view.c \
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
/* gcal-source-dialog.c
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "gcal-source-dialog.h"
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
gint mode : 1;
|
||||||
|
|
||||||
|
/* manager */
|
||||||
|
GcalManager *manager;
|
||||||
|
} GcalSourceDialogPrivate;
|
||||||
|
|
||||||
|
G_DEFINE_TYPE_WITH_PRIVATE (GcalSourceDialog, gcal_source_dialog, GTK_TYPE_DIALOG)
|
||||||
|
|
||||||
|
enum {
|
||||||
|
PROP_0,
|
||||||
|
LAST_PROP
|
||||||
|
};
|
||||||
|
|
||||||
|
static GParamSpec *gParamSpecs [LAST_PROP];
|
||||||
|
|
||||||
|
GcalSourceDialog *
|
||||||
|
gcal_source_dialog_new (void)
|
||||||
|
{
|
||||||
|
return g_object_new (GCAL_TYPE_SOURCE_DIALOG, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gcal_source_dialog_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
GcalSourceDialog *self = (GcalSourceDialog *)object;
|
||||||
|
GcalSourceDialogPrivate *priv = gcal_source_dialog_get_instance_private (self);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (gcal_source_dialog_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gcal_source_dialog_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GcalSourceDialog *self = GCAL_SOURCE_DIALOG (object);
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gcal_source_dialog_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GcalSourceDialog *self = GCAL_SOURCE_DIALOG (object);
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gcal_source_dialog_class_init (GcalSourceDialogClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
|
object_class->finalize = gcal_source_dialog_finalize;
|
||||||
|
object_class->get_property = gcal_source_dialog_get_property;
|
||||||
|
object_class->set_property = gcal_source_dialog_set_property;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gcal_source_dialog_init (GcalSourceDialog *self)
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -17,24 +17,24 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef GCAL_SOURCE_MANAGER_H
|
#ifndef GCAL_SOURCE_DIALOG_H
|
||||||
#define GCAL_SOURCE_MANAGER_H
|
#define GCAL_SOURCE_DIALOG_H
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GCAL_TYPE_SOURCE_MANAGER (gcal_source_manager_get_type())
|
#define GCAL_TYPE_SOURCE_DIALOG (gcal_source_dialog_get_type())
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (GcalSourceManager, gcal_source_manager, GCAL, SOURCE_MANAGER, GtkDialog)
|
G_DECLARE_FINAL_TYPE (GcalSourceDialog, gcal_source_dialog, GCAL, SOURCE_DIALOG, GtkDialog)
|
||||||
|
|
||||||
struct _GcalSourceManagerClass
|
struct _GcalSourceDialogClass
|
||||||
{
|
{
|
||||||
GtkDialogClass parent;
|
GtkDialogClass parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
GcalSourceManager *gcal_source_manager_new (void);
|
GcalSourceManager *gcal_source_dialog_new (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* GCAL_SOURCE_MANAGER_H */
|
#endif /* GCAL_SOURCE_DIALOG_H */
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
/* gcal-source-manager.c
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "gcal-manager.h"
|
|
||||||
|
|
||||||
#include "gcal-source-manager.h"
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
SOURCE_DIALOG_EDIT_MODE,
|
|
||||||
SOURCE_DIALOG_CREATE_MODE
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
gint mode : 1;
|
|
||||||
|
|
||||||
/* manager */
|
|
||||||
GcalManager *manager;
|
|
||||||
} GcalSourceManagerPrivate;
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_PRIVATE (GcalSourceManager, gcal_source_manager, GTK_TYPE_DIALOG)
|
|
||||||
|
|
||||||
enum {
|
|
||||||
PROP_0,
|
|
||||||
LAST_PROP
|
|
||||||
};
|
|
||||||
|
|
||||||
static GParamSpec *gParamSpecs [LAST_PROP];
|
|
||||||
|
|
||||||
GcalSourceManager *
|
|
||||||
gcal_source_manager_new (void)
|
|
||||||
{
|
|
||||||
return g_object_new (GCAL_TYPE_SOURCE_MANAGER, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gcal_source_manager_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
GcalSourceManager *self = (GcalSourceManager *)object;
|
|
||||||
GcalSourceManagerPrivate *priv = gcal_source_manager_get_instance_private (self);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (gcal_source_manager_parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gcal_source_manager_get_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GcalSourceManager *self = GCAL_SOURCE_MANAGER (object);
|
|
||||||
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gcal_source_manager_set_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GcalSourceManager *self = GCAL_SOURCE_MANAGER (object);
|
|
||||||
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gcal_source_manager_class_init (GcalSourceManagerClass *klass)
|
|
||||||
{
|
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
||||||
|
|
||||||
object_class->finalize = gcal_source_manager_finalize;
|
|
||||||
object_class->get_property = gcal_source_manager_get_property;
|
|
||||||
object_class->set_property = gcal_source_manager_set_property;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gcal_source_manager_init (GcalSourceManager *self)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user