source-dialog: better name the modes

Since we're not creating a calendar
as the default state, rename the mode
to NORMAL as it better describes the
dialog state.
This commit is contained in:
Georges Basile Stavracas Neto
2015-05-25 12:35:30 -04:00
committed by Erick Pérez Castellanos
parent ab46c242ae
commit 102b5431fd
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -341,7 +341,7 @@ response_signal (GtkDialog *dialog,
}
/* commit the new source */
if (priv->mode == GCAL_SOURCE_DIALOG_MODE_CREATE && response_id == GTK_RESPONSE_APPLY)
if (priv->mode == GCAL_SOURCE_DIALOG_MODE_NORMAL && response_id == GTK_RESPONSE_APPLY)
{
ESource *current_source, *other_source;
gint page;
@@ -361,7 +361,7 @@ response_signal (GtkDialog *dialog,
}
/* Destroy the source when the operation is cancelled */
if (priv->mode == GCAL_SOURCE_DIALOG_MODE_CREATE && response_id == GTK_RESPONSE_CANCEL)
if (priv->mode == GCAL_SOURCE_DIALOG_MODE_NORMAL && response_id == GTK_RESPONSE_CANCEL)
{
if (priv->local_source != NULL)
g_clear_object (&(priv->local_source));
+1 -1
View File
@@ -42,7 +42,7 @@ struct _GcalSourceDialogClass
typedef enum
{
GCAL_SOURCE_DIALOG_MODE_EDIT,
GCAL_SOURCE_DIALOG_MODE_CREATE
GCAL_SOURCE_DIALOG_MODE_NORMAL
} GcalSourceDialogMode;
GcalSourceDialog* gcal_source_dialog_new (void);
+1 -1
View File
@@ -894,7 +894,7 @@ show_source_dialog (GtkButton *button,
{
GcalWindowPrivate *priv = gcal_window_get_instance_private (GCAL_WINDOW (user_data));
gcal_source_dialog_set_mode (GCAL_SOURCE_DIALOG (priv->source_dialog), GCAL_SOURCE_DIALOG_MODE_CREATE);
gcal_source_dialog_set_mode (GCAL_SOURCE_DIALOG (priv->source_dialog), GCAL_SOURCE_DIALOG_MODE_NORMAL);
gtk_widget_hide (priv->calendar_popover);