source-dialog: prototype impl of modes
This commit is contained in:
committed by
Erick Pérez Castellanos
parent
c1791cd446
commit
667717a7ef
@@ -129,3 +129,23 @@ gcal_source_dialog_set_manager (GcalSourceDialog *dialog,
|
||||
|
||||
/* TODO: connect ::source-added & ::source-removed signals */
|
||||
}
|
||||
|
||||
/**
|
||||
* gcal_source_dialog_set_mode:
|
||||
*
|
||||
* Set the source dialog mode. Creation
|
||||
* mode means that a new calendar will
|
||||
* be created, while edit mode means a
|
||||
* calendar will be edited.
|
||||
*
|
||||
* Returns:
|
||||
*/
|
||||
gcal_source_dialog_set_mode (GcalSourceDialog *dialog,
|
||||
GcalSourceDialogMode mode)
|
||||
{
|
||||
GcalSourceDialogPrivate *priv = dialog->priv;
|
||||
|
||||
priv->mode = mode;
|
||||
|
||||
/* TODO: change UI */
|
||||
}
|
||||
|
||||
@@ -36,11 +36,20 @@ struct _GcalSourceDialogClass
|
||||
GtkDialogClass parent;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GCAL_SOURCE_DIALOG_MODE_EDIT,
|
||||
GCAL_SOURCE_DIALOG_MODE_CREATE
|
||||
} GcalSourceDialogMode;
|
||||
|
||||
GcalSourceDialog* gcal_source_dialog_new (void);
|
||||
|
||||
void gcal_source_dialog_set_manager (GcalSourceDialog *dialog,
|
||||
GcalManager *manager);
|
||||
|
||||
void gcal_source_dialog_set_mode (GcalSourceDialog *dialog,
|
||||
GcalSourceDialogMode mode);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GCAL_SOURCE_DIALOG_H */
|
||||
|
||||
Reference in New Issue
Block a user