aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-account-editor-news.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-account-editor-news.c')
-rw-r--r--mail/mail-account-editor-news.c193
1 files changed, 0 insertions, 193 deletions
diff --git a/mail/mail-account-editor-news.c b/mail/mail-account-editor-news.c
deleted file mode 100644
index 1c980a9d6d..0000000000
--- a/mail/mail-account-editor-news.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Cloned from mail-account-editor by Sam Creasey <sammy@oh.verio.com>
- *
- * Authors:
- * Jeffrey Stedfast <fejj@ximian.com>
- * Dan Winship <danw@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
-#include <camel/camel-url.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-gui-utils.h>
-
-#include "mail-account-editor-news.h"
-#include "mail-session.h"
-
-static void mail_account_editor_news_class_init (MailAccountEditorNewsClass *class);
-static void mail_account_editor_news_finalize (GtkObject *obj);
-
-static GnomeDialogClass *parent_class;
-
-
-GtkType
-mail_account_editor_news_get_type ()
-{
- static GtkType type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "MailAccountEditorNews",
- sizeof (MailAccountEditorNews),
- sizeof (MailAccountEditorNewsClass),
- (GtkClassInitFunc) mail_account_editor_news_class_init,
- (GtkObjectInitFunc) NULL,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (gnome_dialog_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-mail_account_editor_news_class_init (MailAccountEditorNewsClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
- parent_class = gtk_type_class (gnome_dialog_get_type ());
-
- object_class->finalize = mail_account_editor_news_finalize;
-}
-
-static void
-mail_account_editor_news_finalize (GtkObject *obj)
-{
- MailAccountEditorNews *editor = (MailAccountEditorNews *) obj;
-
- gtk_object_unref (GTK_OBJECT (editor->xml));
-
- ((GtkObjectClass *)(parent_class))->finalize (obj);
-}
-
-static gboolean
-apply_changes(MailAccountEditorNews *editor)
-{
-
- CamelURL *url;
- GtkEntry *service_ent;
-
- service_ent = GTK_ENTRY(glade_xml_get_widget(editor->xml, "source_name"));
- url = g_new0 (CamelURL, 1);
-
- url->protocol = g_strdup("nntp");
- url->host = g_strdup(gtk_entry_get_text(service_ent));
- if(strlen(url->host) == 0) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("You have not filled in all of the required information."));
- camel_url_free(url);
- return FALSE;
- }
-
- if(editor->service->url == NULL)
- mail_config_add_news(editor->service);
-
- editor->service->url = camel_url_to_string(url, 0);
-
- mail_config_write();
- return TRUE;
-}
-
-static void
-apply_clicked (GtkWidget *widget, gpointer data)
-{
- MailAccountEditorNews *editor = data;
-
- apply_changes (editor);
-}
-
-static void
-ok_clicked (GtkWidget *widget, gpointer data)
-{
- MailAccountEditorNews *editor = data;
-
- if (apply_changes (editor))
- gtk_widget_destroy (GTK_WIDGET (editor));
-}
-
-static void
-cancel_clicked (GtkWidget *widget, gpointer data)
-{
- MailAccountEditorNews *editor = data;
-
- gtk_widget_destroy (GTK_WIDGET (editor));
-}
-
-MailAccountEditorNews *
-mail_account_editor_news_new (MailConfigService *service)
-{
- MailAccountEditorNews *editor;
- GtkEntry *service_ent;
-
- editor = (MailAccountEditorNews *) gtk_type_new (mail_account_editor_news_get_type ());
-
- editor->service = service;
- editor->xml = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", NULL);
-
- /* get our toplevel widget and reparent it */
- editor->notebook = GTK_NOTEBOOK (glade_xml_get_widget (editor->xml, "news_editor_notebook"));
- gtk_widget_reparent (GTK_WIDGET (editor->notebook), GNOME_DIALOG (editor)->vbox);
-
- /* give our dialog an OK button and title */
- gtk_window_set_title (GTK_WINDOW (editor), _("Evolution News Editor"));
- gtk_window_set_policy (GTK_WINDOW (editor), FALSE, TRUE, TRUE);
- gtk_window_set_modal (GTK_WINDOW (editor), TRUE);
- gnome_dialog_append_buttons (GNOME_DIALOG (editor),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_APPLY,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- gnome_dialog_button_connect (GNOME_DIALOG (editor), 0 /* OK */,
- GTK_SIGNAL_FUNC (ok_clicked),
- editor);
- gnome_dialog_button_connect (GNOME_DIALOG (editor), 1 /* APPLY */,
- GTK_SIGNAL_FUNC (apply_clicked),
- editor);
- gnome_dialog_button_connect (GNOME_DIALOG (editor), 2 /* CANCEL */,
- GTK_SIGNAL_FUNC (cancel_clicked),
- editor);
-
- if(service->url) {
- CamelURL *url;
-
- url = camel_url_new(service->url, NULL);
-
- if(url->host) {
- service_ent = GTK_ENTRY(glade_xml_get_widget(editor->xml, "source_name"));
- gtk_entry_set_text(service_ent, url->host);
- }
-
- camel_url_free(url);
- }
-
- return editor;
-}
/td>Take in olivierd@'s commit bit on his request.rene2017-03-192-2/+2 * - Update to 1.6.3danilo2017-03-022-5/+4 * - Bump PORTREVISION. Lazarus was update to 1.6.4acm2017-03-021-2/+2 * - Bump PORTREVISION. Freepascal was updatedacm2017-02-271-0/+1 * Update to 0.7.8tobik2017-02-252-5/+4 * - Update to 1.6.11olivierd2017-02-156-102/+11 * Update to 0.20.7.vanilla2017-01-312-3/+4 * Reset mva@'s ports, he handed in his ports bit.rene2017-01-231-1/+1 * Reset sanpei@'s ports after 18 months of inactivity.rene2017-01-231-1/+1 * Update WWW: SF redirects to https://sourceforge.net/projects/<PROJECT_NAME>/sunpoet2017-01-211-1/+1 * Add new mirror, it avoids to change value of MASTER_SITES in LXQt related portsolivierd2017-01-151-2/+1 * Update to 0.11.3olivierd2017-01-152-4/+4 * - update from 3.8.4 to 3.8.5misha2017-01-132-6/+10 * Use archivers/libunrar5 for the unrar libraryjhale2017-01-111-1/+2 * Chase update of graphics/poppler (and slaves ports) in revision r430777olivierd2017-01-071-0/+1 * Update to 0.11.2olivierd2017-01-032-2/+2 * Update to 0.5.1olivier2017-01-023-34/+14 * Update to 0.7.7.rakuco2016-12-272-5/+4 * Reset ports per maintainer request.rene2016-12-261-3/+2 * Unbreak fetcholivierd2016-12-241-0/+1 * - Update to 0.11.1olivierd2016-12-234-10/+13 * Update to 0.11.2olivierd2016-12-232-10/+9 * - Update to 1.2.5olivierd2016-12-223-42/+17 * Remove libintl.so.9 compatibility link that was added in r374303 totijl2016-12-095-5/+5 * Remove libtiff.so.4 compatibility links that were added in r374303 totijl2016-12-091-1/+1 * Don't quote {} in find -exec calls.mat2016-12-011-2/+2 * - Bump PORTREVISION. Lazarus was updated to 1.6.2acm2016-11-221-1/+2 * - Fix linker errorolivierd2016-11-201-1/+2 * Add:olivierd2016-11-199-0/+102 * Spell CHOSEN_COMPILER_TYPE correctlyantoine2016-11-131-1/+1 * - Fix build on 9.x by specifying c++ standard requirementsamdmi32016-11-121-1/+1 * x11-fm/doublecmd: update 0.7.5 -> 0.7.6robak2016-11-092-8/+8 * - Update to 1.6.2danilo2016-11-093-9/+17 * Use USES=pathfix where applicable.mat2016-10-211-11/+0 * ${RM} already has -f.mat2016-10-213-4/+4 * - Update to 1.4.9danilo2016-10-022-6/+12 * Update to 3.8.4olivierd2016-09-273-4/+6 * Small and highly customizable twin-panel file manager with support for plugins.olivierd2016-09-206-0/+438 * Update to 0.7.5olivierd2016-09-142-4/+4 * Chase update of Poppler after revision r421386olivierd2016-09-061-1/+1 * - Add 2 patches, which avoid crashes:olivierd2016-08-313-1/+80 * - Update to 0.7.4amdmi32016-08-252-3/+4 * Replace Mk/bsd.kde4.mk by Mk/Uses/kde.mk in preparation for KDE Frameworks andtcberner2016-08-241-2/+2 * - Pet portlintamdmi32016-08-171-9/+6 * x11-fm/rodent: Fix LIB_DEPENDS broken by r300560 (July 2012)marino2016-08-041-1/+2 * - Update to version 0.7.3pawel2016-07-312-3/+6 * Update to 1.42.madpilot2016-07-292-5/+4 * Update graphics/exiv2 to 0.25.tcberner2016-07-271-0/+1 * When there is a do-install target, do not use a post-install target, domat2016-07-191-1/+1 * Remove expired ports without open PRs:rene2016-07-0512-402/+0 * Reset ports maintained by horia@racoviceanu.com.rakuco2016-06-281-1/+1 * Deprecate ports broken for more than 6 monthsantoine2016-06-041-0/+3 * Remove expired misc/kdehier4 and update all of its consumers to not reference...rene2016-05-261-1/+1 * Remove NLS, DOCS, EXAMPLES and IPV6 from OPTIONS_DEFAULT, they are enabled by...amdmi32016-05-241-1/+1 * Update to 3.8.3olivierd2016-05-232-3/+4 * - Fix trailing whitespace in pkg-messagesamdmi32016-05-191-1/+1 * - Fix trailing whitespace in pkg-descrs, categories [p-x]*amdmi32016-05-195-12/+12 * - No need to specify master site subdirectory when it's the same as defaultamdmi32016-05-18