From 3ed8ccbf6e8de9d32c88d5465dc483b015ec9796 Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Mon, 24 Jul 2006 09:01:30 +0000 Subject: Removed "Subscribe" and "Unsubscribe" buttons. Fixes #331509. svn path=/trunk/; revision=32398 --- mail/ChangeLog | 12 ++++ mail/em-subscribe-editor.c | 56 ---------------- mail/mail-dialogs.glade | 160 +-------------------------------------------- 3 files changed, 13 insertions(+), 215 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 55e115d59e..793a5bca8d 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,15 @@ +2006-07-24 Sushma Rai + + * em-subscribe-editor.c (_EMSubscribeEditor): Removed the members + subscribe_button and unsubscribe_button. + (sub_do_subscribe)(sub_subscribe)(sub_editor_subscribe) + (sub_editor_unsubscribe): Removed. + (sub_selection_changed)(em_subscribe_editor_new): Removed the handling + for the subscribe and unsubscribe buttons. + + * mail-dialogs.glade: Removed "Subscribe" and "Unsubscribe" buttons. + Fixes #331509. + 2006-07-22 Yuri Pankov Reviewed by Harish Krishnaswamy diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c index dda439d358..4aa6842102 100644 --- a/mail/em-subscribe-editor.c +++ b/mail/em-subscribe-editor.c @@ -75,8 +75,6 @@ struct _EMSubscribeEditor { GtkWidget *optionmenu; GtkWidget *none_selected; /* 'please select a xxx' message */ GtkWidget *none_selected_item; - GtkWidget *subscribe_button; - GtkWidget *unsubscribe_button; GtkWidget *progress; }; @@ -429,35 +427,6 @@ sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node) /* ********************************************************************** */ /* (un) subscribes the current selection */ -static void sub_do_subscribe(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, void *data) -{ - EMSubscribe *sub = data; - EMSubscribeNode *node; - gboolean subscribed; - - gtk_tree_model_get(model, iter, 0, &subscribed, 2, &node, -1); - if (sub->subscribed_state ^ subscribed) { - char *spath; - - spath = gtk_tree_path_to_string(path); - gtk_tree_store_set((GtkTreeStore *)model, iter, 0, subscribed, -1); - sub_subscribe_folder(sub, node, sub->subscribed_state, spath); - g_free(spath); - } -} - -static void -sub_subscribe(EMSubscribe *sub, gboolean subscribed) -{ - GtkTreeSelection *selection; - - if (sub->tree == NULL) - return; - - sub->subscribed_state = subscribed; - selection = gtk_tree_view_get_selection (sub->tree); - gtk_tree_selection_selected_foreach(selection, sub_do_subscribe, sub); -} static void sub_subscribe_toggled(GtkCellRendererToggle *render, const char *spath, EMSubscribe *sub) @@ -508,8 +477,6 @@ sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub) else if (sub->selected_subscribed_count == 0) dounsub = FALSE; - gtk_widget_set_sensitive(sub->editor->subscribe_button, dosub); - gtk_widget_set_sensitive(sub->editor->unsubscribe_button, dounsub); } /* double-clicking causes a node item to be evaluated directly */ @@ -721,24 +688,6 @@ sub_editor_refresh(GtkWidget *w, EMSubscribeEditor *se) sub_queue_fill_level(sub, NULL); } -static void -sub_editor_subscribe(GtkWidget *w, EMSubscribeEditor *se) -{ - d(printf("subscribe clicked, current = %p\n", se->current)); - - if (se->current) - sub_subscribe(se->current, TRUE); -} - -static void -sub_editor_unsubscribe(GtkWidget *w, EMSubscribeEditor *se) -{ - d(printf("unsubscribe clicked\n")); - - if (se->current) - sub_subscribe(se->current, FALSE); -} - static void sub_editor_got_store(char *uri, CamelStore *store, void *data) { @@ -861,11 +810,6 @@ GtkDialog *em_subscribe_editor_new(void) se->vbox = glade_xml_get_widget(xml, "tree_box"); - se->subscribe_button = glade_xml_get_widget (xml, "subscribe_button"); - g_signal_connect(se->subscribe_button, "clicked", G_CALLBACK(sub_editor_subscribe), se); - se->unsubscribe_button = glade_xml_get_widget (xml, "unsubscribe_button"); - g_signal_connect(se->unsubscribe_button, "clicked", G_CALLBACK(sub_editor_unsubscribe), se); - /* FIXME: This is just to get the shadow, is there a better way? */ w = gtk_label_new(_("Please select a server.")); se->none_selected = gtk_viewport_new(NULL, NULL); diff --git a/mail/mail-dialogs.glade b/mail/mail-dialogs.glade index 45677b6ffe..398875ff3c 100644 --- a/mail/mail-dialogs.glade +++ b/mail/mail-dialogs.glade @@ -698,165 +698,7 @@ 6 - - True - GTK_BUTTONBOX_START - 6 - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-add - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Subscribe - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-remove - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - _Unsubscribe - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - - - 0 - False - False - GTK_PACK_END - + -- cgit v1.2.3