nonprism.patch 5.6 KB

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