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:
committed by
Erick Pérez Castellanos
parent
ab46c242ae
commit
102b5431fd
@@ -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));
|
||||
|
||||
@@ -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
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user