[evolution/wip/webkit2] Bug 256919 - Minor Free/Busy settings tab changes



commit 4e70b4f80fb9260922ff5d77276f136fd62b2841
Author: Milan Crha <mcrha redhat com>
Date:   Fri Apr 3 13:04:55 2015 +0200

    Bug 256919 - Minor Free/Busy settings tab changes

 modules/calendar/e-calendar-preferences.ui   |    4 ++-
 plugins/publish-calendar/publish-calendar.c  |   49 +-------------------------
 plugins/publish-calendar/publish-calendar.ui |   15 --------
 3 files changed, 4 insertions(+), 64 deletions(-)
---
diff --git a/modules/calendar/e-calendar-preferences.ui b/modules/calendar/e-calendar-preferences.ui
index 207b6e9..0df6088 100644
--- a/modules/calendar/e-calendar-preferences.ui
+++ b/modules/calendar/e-calendar-preferences.ui
@@ -1432,7 +1432,9 @@
                     <child>
                       <object class="GtkLabel" id="label33">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">Template:</property>
+                        <property name="label" translatable="yes">_Template:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic-widget">template_url</property>
                       </object>
                       <packing>
                         <property name="position">0</property>
diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c
index f3423ba..dfa4e17 100644
--- a/plugins/publish-calendar/publish-calendar.c
+++ b/plugins/publish-calendar/publish-calendar.c
@@ -646,16 +646,6 @@ url_list_changed (PublishUIData *ui)
 }
 
 static void
-update_url_enable_button (EPublishUri *url,
-                          GtkWidget *url_enable)
-{
-       g_return_if_fail (url_enable != NULL);
-       g_return_if_fail (GTK_IS_BUTTON (url_enable));
-
-       gtk_button_set_label (GTK_BUTTON (url_enable), url && url->enabled ? _("_Disable") : _("E_nable"));
-}
-
-static void
 url_list_enable_toggled (GtkCellRendererToggle *renderer,
                          const gchar *path_string,
                          PublishUIData *ui)
@@ -673,8 +663,6 @@ url_list_enable_toggled (GtkCellRendererToggle *renderer,
 
                url->enabled = !url->enabled;
 
-               update_url_enable_button (url, ui->url_enable);
-
                gtk_list_store_set (GTK_LIST_STORE (model), &iter, URL_LIST_ENABLED_COLUMN, url->enabled, -1);
 
                url_list_changed (ui);
@@ -695,14 +683,10 @@ selection_changed (GtkTreeSelection *selection,
                gtk_tree_model_get (model, &iter, URL_LIST_URL_COLUMN, &url, -1);
                gtk_widget_set_sensitive (ui->url_edit, TRUE);
                gtk_widget_set_sensitive (ui->url_remove, TRUE);
-               gtk_widget_set_sensitive (ui->url_enable, TRUE);
        } else {
                gtk_widget_set_sensitive (ui->url_edit, FALSE);
                gtk_widget_set_sensitive (ui->url_remove, FALSE);
-               gtk_widget_set_sensitive (ui->url_enable, FALSE);
        }
-
-       update_url_enable_button (url, ui->url_enable);
 }
 
 static void
@@ -821,9 +805,6 @@ url_remove_clicked (GtkButton *button,
                } else {
                        gtk_widget_set_sensitive (ui->url_edit, FALSE);
                        gtk_widget_set_sensitive (ui->url_remove, FALSE);
-                       gtk_widget_set_sensitive (ui->url_enable, FALSE);
-
-                       update_url_enable_button (NULL, ui->url_enable);
                }
 
                publish_uris = g_slist_remove (publish_uris, url);
@@ -837,28 +818,6 @@ url_remove_clicked (GtkButton *button,
 }
 
 static void
-url_enable_clicked (GtkButton *button,
-                    PublishUIData *ui)
-{
-       EPublishUri *url = NULL;
-       GtkTreeSelection *selection;
-       GtkTreeModel *model;
-       GtkTreeIter iter;
-
-       selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ui->treeview));
-       if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
-               gtk_tree_model_get (model, &iter, URL_LIST_URL_COLUMN, &url, -1);
-               url->enabled = !url->enabled;
-
-               update_url_enable_button (url, ui->url_enable);
-
-               gtk_list_store_set (GTK_LIST_STORE (model), &iter, URL_LIST_ENABLED_COLUMN, url->enabled, -1);
-               gtk_tree_selection_select_iter (selection, &iter);
-               url_list_changed (ui);
-       }
-}
-
-static void
 online_state_changed (EShell *shell)
 {
        online = e_shell_get_online (shell);
@@ -915,8 +874,6 @@ publish_calendar_locations (EPlugin *epl,
        ui->url_add = e_builder_get_widget (builder, "url add");
        ui->url_edit = e_builder_get_widget (builder, "url edit");
        ui->url_remove = e_builder_get_widget (builder, "url remove");
-       ui->url_enable = e_builder_get_widget (builder, "url enable");
-       update_url_enable_button (NULL, ui->url_enable);
        g_signal_connect (
                ui->url_add, "clicked",
                G_CALLBACK (url_add_clicked), ui);
@@ -926,13 +883,9 @@ publish_calendar_locations (EPlugin *epl,
        g_signal_connect (
                ui->url_remove, "clicked",
                G_CALLBACK (url_remove_clicked), ui);
-       g_signal_connect (
-               ui->url_enable, "clicked",
-               G_CALLBACK (url_enable_clicked), ui);
+
        gtk_widget_set_sensitive (GTK_WIDGET (ui->url_edit), FALSE);
        gtk_widget_set_sensitive (GTK_WIDGET (ui->url_remove), FALSE);
-       gtk_widget_set_sensitive (GTK_WIDGET (ui->url_enable), FALSE);
-       gtk_button_set_use_underline (GTK_BUTTON (ui->url_enable), TRUE);
 
        l = publish_uris;
        while (l) {
diff --git a/plugins/publish-calendar/publish-calendar.ui b/plugins/publish-calendar/publish-calendar.ui
index f59ba9f..c6eee86 100644
--- a/plugins/publish-calendar/publish-calendar.ui
+++ b/plugins/publish-calendar/publish-calendar.ui
@@ -761,21 +761,6 @@
             <property name="position">2</property>
           </packing>
         </child>
-        <child>
-          <object class="GtkButton" id="url enable">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="can_default">True</property>
-            <property name="receives_default">True</property>
-            <property name="label" translatable="yes">E_nable</property>
-            <property name="use_underline">True</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">3</property>
-          </packing>
-        </child>
       </object>
       <packing>
         <property name="expand">False</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]