From 4a1da3ff75cab25485bbbc8552b2bc26d4b0cd55 Mon Sep 17 00:00:00 2001 From: Carsten Schurig Date: Tue, 11 Dec 2001 21:53:17 +0000 Subject: [PATCH] fixing a typo in filtering.c removing the extra menu from email/news button --- src/filtering.c | 4 ++-- src/mainwindow.c | 54 ++---------------------------------------------- src/mainwindow.h | 1 - 3 files changed, 4 insertions(+), 55 deletions(-) diff --git a/src/filtering.c b/src/filtering.c index c36b32b5b..09863f8d1 100644 --- a/src/filtering.c +++ b/src/filtering.c @@ -450,12 +450,12 @@ static gboolean filteringaction_apply(FilteringAction * action, MsgInfo * info, case MATCHACTION_EXECUTE: cmd = matching_build_command(action->destination, info); if (cmd == NULL) - return TRUE; + return FALSE; else { system(cmd); g_free(cmd); } - return FALSE; + return TRUE; default: return FALSE; diff --git a/src/mainwindow.c b/src/mainwindow.c index 9986ffd74..63be84af8 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -122,9 +122,6 @@ static void toolbar_compose_news_cb (GtkWidget *widget, gpointer data); static void toolbar_compose_mail_cb (GtkWidget *widget, gpointer data); -static void toolbar_compose_popup_cb (GtkWidget *widget, - GdkEventButton *event, - gpointer data); static void toolbar_reply_cb (GtkWidget *widget, gpointer data); static void toolbar_reply_popup_cb (GtkWidget *widget, @@ -646,11 +643,6 @@ static GtkItemFactoryEntry mainwin_entries[] = {N_("/_Help/---"), NULL, NULL, 0, ""}, {N_("/_Help/_About"), NULL, about_show, 0, NULL} }; -static GtkItemFactoryEntry compose_popup_entries[] = -{ - {N_("/Compose an _email message"), NULL, compose_mail_cb, 0, NULL}, - {N_("/Compose a _news message"), NULL, compose_news_cb, 0, NULL} -}; static GtkItemFactoryEntry reply_popup_entries[] = { {N_("/Reply with _quote"), NULL, reply_cb, COMPOSE_REPLY_WITH_QUOTE, NULL}, @@ -739,11 +731,6 @@ MainWindow *main_window_create(SeparateType type) gtk_widget_show(handlebox); gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0); - /* create the popup menu for the compose button */ - n_menu_entries = sizeof(compose_popup_entries) / - sizeof(compose_popup_entries[0]); - compose_popup = popupmenu_create(window, compose_popup_entries, n_menu_entries, - "", mainwin); /* create the popup menus for the reply buttons specials */ n_menu_entries = sizeof(reply_popup_entries) / sizeof(reply_popup_entries[0]); @@ -826,7 +813,6 @@ MainWindow *main_window_create(SeparateType type) mainwin->statuslabel = statuslabel; mainwin->ac_button = ac_button; mainwin->ac_label = ac_label; - mainwin->compose_popup = compose_popup; mainwin->reply_popup = reply_popup; mainwin->replyall_popup = replyall_popup; mainwin->replysender_popup = replysender_popup; @@ -1478,15 +1464,6 @@ void main_window_set_menu_sensitive(MainWindow *mainwin) {NULL, 0} }; - - /* the Email/News popup in the toolbar */ - static const struct { - gchar *const entry; - SensitiveCond cond; - } entry_compose_popup[] = { - {"/Compose a news message", M_HAVE_NEWS_ACCOUNT}, - {NULL, 0} - }; ifactory = gtk_item_factory_from_widget(mainwin->menubar); state = main_window_get_current_state(mainwin); @@ -1495,15 +1472,6 @@ void main_window_set_menu_sensitive(MainWindow *mainwin) sensitive = ((entry[i].cond & state) == entry[i].cond); menu_set_sensitive(ifactory, entry[i].entry, sensitive); } - - /* the Email/News popup in the toolbar */ - ifactory = gtk_item_factory_from_widget(mainwin->compose_popup); - - for (i = 0; entry_compose_popup[i].entry != NULL; i++) { - sensitive = ((entry_compose_popup[i].cond & state) == entry_compose_popup[i].cond); - menu_set_sensitive(ifactory, entry_compose_popup[i].entry, sensitive); - } - } void main_window_popup(MainWindow *mainwin) @@ -1805,7 +1773,7 @@ static void main_window_toolbar_create(MainWindow *mainwin, CREATE_TOOLBAR_ICON(stock_mail_compose_xpm); compose_mail_btn = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), _("Email"), - _("Compose an email message - Right button: more options"), + _("Compose an email message"), "New", icon_wid, toolbar_compose_mail_cb, @@ -1816,7 +1784,7 @@ static void main_window_toolbar_create(MainWindow *mainwin, CREATE_TOOLBAR_ICON(stock_news_compose_xpm); compose_news_btn = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), _("News"), - _("Compose a news message - Right button: more options"), + _("Compose a news message"), "New", icon_wid, toolbar_compose_news_cb, @@ -1921,14 +1889,6 @@ static void main_window_toolbar_create(MainWindow *mainwin, mainwin); */ - gtk_signal_connect(GTK_OBJECT(compose_mail_btn), "button_press_event", - GTK_SIGNAL_FUNC(toolbar_compose_popup_cb), - mainwin); - - gtk_signal_connect(GTK_OBJECT(compose_news_btn), "button_press_event", - GTK_SIGNAL_FUNC(toolbar_compose_popup_cb), - mainwin); - gtk_signal_connect(GTK_OBJECT(reply_btn), "button_press_event", GTK_SIGNAL_FUNC(toolbar_reply_popup_cb), mainwin); @@ -1968,16 +1928,6 @@ static void main_window_toolbar_create(MainWindow *mainwin, } /* callback functions */ -static void toolbar_compose_popup_cb(GtkWidget *widget, GdkEventButton *event, gpointer data) -{ - MainWindow *mainwindow = (MainWindow *) data; - - if (!event) return; - - if (event->button == 3) - gtk_menu_popup(GTK_MENU(mainwindow->compose_popup), NULL, NULL, NULL, NULL, 1, 0); -} - static void toolbar_reply_popup_cb(GtkWidget *widget, GdkEventButton *event, gpointer data) { MainWindow *mainwindow = (MainWindow *) data; diff --git a/src/mainwindow.h b/src/mainwindow.h index 2c0de261e..704314cdf 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -91,7 +91,6 @@ struct _MainWindow GtkWidget *compose_mail_btn; GtkWidget *compose_news_btn; ComposeButtonType compose_btn_type; - GtkWidget *compose_popup; /* for the reply buttons */ GtkWidget *reply_btn; -- 2.25.1