summaryrefslogtreecommitdiff
path: root/nonprism/sylpheed/nonprism.patch
blob: 50d00063441bcc0dbcc7dd27f8a075b0938fbcdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
diff -Nur a/src/setup.c b/src/setup.c
--- a/src/setup.c	2010-08-19 02:23:28.000000000 -0300
+++ b/src/setup.c	2013-10-23 15:10:24.439721307 -0200
@@ -327,10 +327,6 @@
 	GtkWidget *cancel_btn;
 	GtkWidget *pop3_radio;
 	GtkWidget *imap_radio;
-#if USE_SSL
-	GtkWidget *pop3g_radio;
-	GtkWidget *imapg_radio;
-#endif
 	GtkWidget *name_entry;
 	GtkWidget *addr_entry;
 	GtkWidget *id_entry;
@@ -378,15 +374,8 @@
 {
 	SETUP_TYPE_POP3,
 	SETUP_TYPE_IMAP,
-#if USE_SSL
-	SETUP_TYPE_POP3G,
-	SETUP_TYPE_IMAPG
-#endif
 };
 
-#define GMAIL_POP3_SERVER	"pop.gmail.com"
-#define GMAIL_IMAP_SERVER	"imap.gmail.com"
-#define GMAIL_SMTP_SERVER	"smtp.gmail.com"
 #define POP3_PORT		110
 #define IMAP_PORT		143
 #define SMTP_PORT		25
@@ -410,14 +399,6 @@
 	serv = gtk_entry_get_text(GTK_ENTRY(setupac.serv_entry));
 	smtp = gtk_entry_get_text(GTK_ENTRY(setupac.smtp_entry));
 
-#if USE_SSL
-	if (setupac.type == SETUP_TYPE_POP3G ||
-	    setupac.type == SETUP_TYPE_IMAPG) {
-		if (GTK_WIDGET(editable) == setupac.addr_entry)
-			gtk_entry_set_text(GTK_ENTRY(setupac.id_entry), addr);
-	}
-#endif
-
 	if (page == SETUP_PAGE_ADDRESS && name && *name && addr && *addr)
 		next_enable = TRUE;
 	else if (page == SETUP_PAGE_ACCOUNT &&
@@ -436,8 +417,6 @@
 	p = str = gtk_entry_get_text(GTK_ENTRY(entry));
 	if (!str || *p == '\0')
 		return FALSE;
-	if (!strcmp(str, "(username)@gmail.com"))
-		return FALSE;
 
 	while (*p) {
 		c = *p;
@@ -480,14 +459,6 @@
 	} else if (response_id == GTK_RESPONSE_ACCEPT) {
 		if (prev_page == SETUP_PAGE_ADDRESS) {
 			if (entry_is_valid(setupac.addr_entry)) {
-#if USE_SSL
-				if (setupac.type == SETUP_TYPE_POP3G ||
-				    setupac.type == SETUP_TYPE_IMAPG)
-					gtk_notebook_set_current_page
-						(GTK_NOTEBOOK(setupac.notebook),
-						 SETUP_PAGE_FINISH);
-				else
-#endif
 					gtk_notebook_set_current_page
 						(GTK_NOTEBOOK(setupac.notebook), page + 1);
 			} else
@@ -508,10 +479,6 @@
 		if (prev_page == SETUP_PAGE_START) {
 			setupac.type = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(setupac.pop3_radio)) ? SETUP_TYPE_POP3
 				: gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(setupac.imap_radio)) ? SETUP_TYPE_IMAP
-#if USE_SSL
-				: gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(setupac.pop3g_radio)) ? SETUP_TYPE_POP3G
-				: gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(setupac.imapg_radio)) ? SETUP_TYPE_IMAPG
-#endif
 				: SETUP_TYPE_POP3;
 		}
 	} else if (response_id == GTK_RESPONSE_REJECT) {
@@ -539,28 +506,6 @@
 			gtk_widget_set_sensitive(setupac.serv_entry, TRUE);
 			gtk_widget_set_sensitive(setupac.smtp_entry, TRUE);
 			break;
-#if USE_SSL
-		case SETUP_TYPE_POP3G:
-			if (prev_page == SETUP_PAGE_START)
-				gtk_entry_set_text(GTK_ENTRY(setupac.addr_entry), "(username)@gmail.com");
-			gtk_widget_set_sensitive(setupac.id_entry, FALSE);
-			gtk_label_set_text(GTK_LABEL(setupac.serv_label_name1), _("POP3 server:"));
-			gtk_entry_set_text(GTK_ENTRY(setupac.serv_entry), GMAIL_POP3_SERVER);
-			gtk_widget_set_sensitive(setupac.serv_entry, FALSE);
-			gtk_entry_set_text(GTK_ENTRY(setupac.smtp_entry), GMAIL_SMTP_SERVER);
-			gtk_widget_set_sensitive(setupac.smtp_entry, FALSE);
-			break;
-		case SETUP_TYPE_IMAPG:
-			if (prev_page == SETUP_PAGE_START)
-				gtk_entry_set_text(GTK_ENTRY(setupac.addr_entry), "(username)@gmail.com");
-			gtk_widget_set_sensitive(setupac.id_entry, FALSE);
-			gtk_label_set_text(GTK_LABEL(setupac.serv_label_name1), _("IMAP4 server:"));
-			gtk_entry_set_text(GTK_ENTRY(setupac.serv_entry), GMAIL_IMAP_SERVER);
-			gtk_widget_set_sensitive(setupac.serv_entry, FALSE);
-			gtk_entry_set_text(GTK_ENTRY(setupac.smtp_entry), GMAIL_SMTP_SERVER);
-			gtk_widget_set_sensitive(setupac.smtp_entry, FALSE);
-			break;
-#endif /* USE_SSL */
 		}
 	} else if (page == SETUP_PAGE_FINISH) {
 		prev_enable = FALSE;
@@ -595,24 +540,6 @@
 			setupac.smtp_auth = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(setupac.smtpauth_chkbtn));
 			gtk_label_set_text(GTK_LABEL(setupac.serv_label_name2), _("IMAP4 server:"));
 			break;
-#if USE_SSL
-		case SETUP_TYPE_POP3G:
-			setupac.serv_ssl = TRUE;
-			setupac.smtp_ssl = TRUE;
-			setupac.smtp_auth = TRUE;
-			setupac.serv_port = POP3S_PORT;
-			setupac.smtp_port = SMTPS_PORT;
-			gtk_label_set_text(GTK_LABEL(setupac.serv_label_name2), _("POP3 server:"));
-			break;
-		case SETUP_TYPE_IMAPG:
-			setupac.serv_ssl = TRUE;
-			setupac.smtp_ssl = TRUE;
-			setupac.smtp_auth = TRUE;
-			setupac.serv_port = IMAPS_PORT;
-			setupac.smtp_port = SMTPS_PORT;
-			gtk_label_set_text(GTK_LABEL(setupac.serv_label_name2), _("IMAP4 server:"));
-			break;
-#endif /* USE_SSL */
 		}
 
 		GET_STR(name, name_entry);
@@ -756,14 +683,6 @@
 	setupac.imap_radio = gtk_radio_button_new_with_label_from_widget
 		(GTK_RADIO_BUTTON(setupac.pop3_radio), "IMAP4");
 	gtk_box_pack_start(GTK_BOX(vbox), setupac.imap_radio, FALSE, FALSE, 0);
-#if USE_SSL
-	setupac.pop3g_radio = gtk_radio_button_new_with_label_from_widget
-		(GTK_RADIO_BUTTON(setupac.pop3_radio), "POP3 (Gmail)");
-	gtk_box_pack_start(GTK_BOX(vbox), setupac.pop3g_radio, FALSE, FALSE, 0);
-	setupac.imapg_radio = gtk_radio_button_new_with_label_from_widget
-		(GTK_RADIO_BUTTON(setupac.pop3_radio), "IMAP4 (Gmail)");
-	gtk_box_pack_start(GTK_BOX(vbox), setupac.imapg_radio, FALSE, FALSE, 0);
-#endif
 
 	/* Page 2 */
 	vbox = gtk_vbox_new(FALSE, 12);
@@ -991,18 +910,6 @@
 #endif
 		ac->imapport = setupac.serv_port;
 		break;
-#if USE_SSL
-	case SETUP_TYPE_POP3G:
-		ac->protocol = A_POP3;
-		ac->ssl_pop = SSL_TUNNEL;
-		ac->popport = setupac.serv_port;
-		break;
-	case SETUP_TYPE_IMAPG:
-		ac->protocol = A_IMAP4;
-		ac->ssl_imap = SSL_TUNNEL;
-		ac->imapport = setupac.serv_port;
-		break;
-#endif /* USE_SSL */
 	}
 
 	g_free(ac->sig_text);