[gnome-calendar/calendar-editor] source-dialog: remove unneeded fields
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] source-dialog: remove unneeded fields
- Date: Sun, 19 Apr 2015 14:21:01 +0000 (UTC)
commit 42c9ce71d4837e9645c86b0937abbf78b5e7a8fe
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Apr 19 11:20:20 2015 -0300
source-dialog: remove unneeded fields
data/ui/source-dialog.ui | 120 ----------------------------------------------
src/gcal-source-dialog.c | 83 --------------------------------
2 files changed, 0 insertions(+), 203 deletions(-)
---
diff --git a/data/ui/source-dialog.ui b/data/ui/source-dialog.ui
index e72f523..992f0d4 100644
--- a/data/ui/source-dialog.ui
+++ b/data/ui/source-dialog.ui
@@ -731,126 +731,6 @@
<property name="width">2</property>
</packing>
</child>
- <child>
- <object class="GtkFrame" id="web_details_frame">
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkGrid" id="web_details_grid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_bottom">18</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">12</property>
- <child>
- <object class="GtkLabel" id="web_title_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_bottom">6</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Calendar Details</property>
- <property name="xalign">0</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="web_name_dim_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Name</property>
- <property name="xalign">1</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="web_new_calendar_name_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <signal name="notify::text" handler="new_name_entry_text_changed"
object="GcalSourceDialog" swapped="no"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="web_author_dim_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Author</property>
- <property name="xalign">1</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="web_author_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="web_events_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="web_last_edited_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- </object>
- </child>
- <style>
- <class name="details-frame"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- <property name="width">2</property>
- </packing>
- </child>
</object>
<packing>
<property name="name">create</property>
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index f11e258..1de9648 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -50,12 +50,7 @@ typedef struct
GtkWidget *location_dim_label;
/* new source details */
- GtkWidget *author_label;
GtkWidget *calendar_address_entry;
- GtkWidget *web_author_label;
- GtkWidget *web_details_frame;
- GtkWidget *web_new_calendar_name_entry;
- GtkWidget *web_source_grid;
GtkWidget *web_sources_listbox;
GtkWidget *web_sources_revealer;
@@ -160,10 +155,6 @@ static void name_entry_text_changed (GObject *ob
GParamSpec *pspec,
gpointer user_data);
-static void new_name_entry_text_changed (GObject *object,
- GParamSpec *pspec,
- gpointer user_data);
-
static void online_accounts_settings_button_clicked (GtkWidget *button,
gpointer user_data);
@@ -187,9 +178,6 @@ static void response_signal (GtkDialog *di
gint response_id,
gpointer user_data);
-static void setup_source_details (GcalSourceDialog *dialog,
- ESource *source);
-
static void stack_visible_child_name_changed (GObject *object,
GParamSpec *pspec,
gpointer user_data);
@@ -447,8 +435,6 @@ clear_pages (GcalSourceDialog *dialog)
g_list_free_full (list, (GDestroyNotify) gtk_widget_destroy);
gtk_revealer_set_reveal_child (GTK_REVEALER (priv->web_sources_revealer), FALSE);
-
- gtk_widget_hide (priv->web_details_frame);
}
static void
@@ -654,33 +640,6 @@ name_entry_text_changed (GObject *object,
}
/**
- * new_name_entry_text_changed:
- *
- * Callend when the name entry of a
- * new to-be-added source is edited.
- * It changes the source's display
- * name, but wait's for the calendar's
- * 'response' signal to commit these
- * changes.
- *
- * Returns:
- */
-static void
-new_name_entry_text_changed (GObject *object,
- GParamSpec *pspec,
- gpointer user_data)
-{
- GcalSourceDialogPrivate *priv = GCAL_SOURCE_DIALOG (user_data)->priv;
- ESource *source = NULL;
-
- if (GTK_WIDGET (object) == priv->web_new_calendar_name_entry)
- source = priv->remote_source;
-
- if (source != NULL)
- e_source_set_display_name (source, gtk_entry_get_text (GTK_ENTRY (object)));
-}
-
-/**
* response_signal:
*
* Save the source when the dialog
@@ -979,42 +938,6 @@ calendar_listbox_row_activated (GtkListBox *box,
}
/**
- * setup_source_details:
- *
- * Setup the details frame of a given
- * calendar in proccess of creation.
- *
- * Returns:
- */
-static void
-setup_source_details (GcalSourceDialog *dialog,
- ESource *source)
-{
- GcalSourceDialogPrivate *priv = dialog->priv;
- gchar *email;
-
- /* Calendar name */
- gtk_entry_set_text (GTK_ENTRY (priv->web_new_calendar_name_entry), e_source_get_display_name (source));
-
- /* Email field */
- email = gcal_manager_query_client_data (priv->manager, source, CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS);
-
- if (email != NULL)
- {
- gtk_label_set_markup (GTK_LABEL (priv->web_author_label), email);
- }
- else
- {
- gchar *text = g_strdup_printf ("<i><small>%s</small></i>", _("No author"));
- gtk_label_set_markup (GTK_LABEL (priv->web_author_label), text);
-
- g_free (text);
- }
-
- gtk_widget_show_all (priv->web_details_frame);
-}
-
-/**
* pulse_web_entry:
*
* Update the url's entry with a pulse fraction.
@@ -1253,7 +1176,6 @@ validate_url_cb (GcalSourceDialog *dialog)
// Update buttons
gtk_widget_set_sensitive (priv->add_button, source != NULL);
- setup_source_details (dialog, source);
}
else
{
@@ -1505,7 +1427,6 @@ discover_sources_cb (GObject *source,
// Update button sensivity, etc
gtk_widget_set_sensitive (priv->add_button, source != NULL);
- setup_source_details (GCAL_SOURCE_DIALOG (user_data), E_SOURCE (source));
}
if (resource_path)
@@ -1817,9 +1738,6 @@ gcal_source_dialog_class_init (GcalSourceDialogClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, online_accounts_listbox);
gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, remove_button);
gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, stack);
- gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, web_details_frame);
- gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, web_new_calendar_name_entry);
- gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, web_source_grid);
gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, web_sources_listbox);
gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, web_sources_revealer);
@@ -1837,7 +1755,6 @@ gcal_source_dialog_class_init (GcalSourceDialogClass *klass)
gtk_widget_class_bind_template_callback (widget_class, description_label_link_activated);
gtk_widget_class_bind_template_callback (widget_class, hide_notification);
gtk_widget_class_bind_template_callback (widget_class, name_entry_text_changed);
- gtk_widget_class_bind_template_callback (widget_class, new_name_entry_text_changed);
gtk_widget_class_bind_template_callback (widget_class, notification_child_revealed_changed);
gtk_widget_class_bind_template_callback (widget_class, online_accounts_settings_button_clicked);
gtk_widget_class_bind_template_callback (widget_class, remove_button_clicked);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]