[Commits] jpilot.c 1.18.2.37 1.18.2.38 main.c 1.115.2.262 1.115.2.263 mainwindow.c 1.274.2.355 1.274.2.356 matcher.c 1.75.2.79 1.75.2.80 prefs_common.c 1.204.2.212 1.204.2.213 prefs_common.h 1.103.2.141 1.103.2.142 procmsg.c 1.150.2.131 1.150.2.132
colin at claws-mail.org
colin at claws-mail.org
Fri Nov 23 20:29:17 CET 2012
Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv1449/src
Modified Files:
Tag: gtk2
jpilot.c main.c mainwindow.c matcher.c prefs_common.c
prefs_common.h procmsg.c
Log Message:
2012-11-23 [colin] 3.9.0cvs20
* src/jpilot.c
* src/main.c
* src/mainwindow.c
* src/matcher.c
* src/prefs_common.c
* src/prefs_common.h
* src/procmsg.c
* src/common/socket.c
* src/common/socket.h
* src/common/ssl.c
* src/common/ssl_certificate.c
* src/common/ssl_certificate.h
* src/etpan/imap-thread.c
* src/etpan/nntp-thread.c
Cleanup some warnings and deprecated types. Patch by
Christian Hesse, fixing bug #2617. Thanks!
Index: prefs_common.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_common.c,v
retrieving revision 1.204.2.212
retrieving revision 1.204.2.213
diff -u -d -r1.204.2.212 -r1.204.2.213
--- prefs_common.c 7 Jul 2012 07:09:29 -0000 1.204.2.212
+++ prefs_common.c 23 Nov 2012 19:29:15 -0000 1.204.2.213
@@ -95,8 +95,6 @@
&prefs_common.newmail_notify_cmd, P_STRING, NULL, NULL, NULL},
/* new fonts */
- {"widget_font_gtk2", NULL,
- &prefs_common.widgetfont, P_STRING, NULL, NULL, NULL},
{"message_font_gtk2", "Monospace 9",
&prefs_common.textfont, P_STRING, NULL, NULL, NULL},
{"print_font_gtk2", "Monospace 9",
@@ -317,8 +315,6 @@
/* Display */
/* Obsolete fonts. For coexisting with Gtk+-1.2 version */
- {"widget_font", NULL,
- &prefs_common.widgetfont_gtk1, P_STRING, NULL, NULL, NULL},
{"message_font", "-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*",
&prefs_common.textfont_gtk1, P_STRING, NULL, NULL, NULL},
{"small_font", "-*-helvetica-medium-r-normal--10-*-*-*-*-*-*-*",
@@ -330,8 +326,6 @@
/* new fonts */
#ifndef GENERIC_UMPC
- {"widget_font_gtk2", NULL,
- &SPECIFIC_PREFS.widgetfont, P_STRING, NULL, NULL, NULL},
{"message_font_gtk2", "Monospace 9",
&SPECIFIC_PREFS.textfont, P_STRING, NULL, NULL, NULL},
{"print_font_gtk2", "Monospace 9",
@@ -343,8 +337,6 @@
{"bold_font_gtk2", "Sans Bold 9",
&SPECIFIC_PREFS.boldfont, P_STRING, NULL, NULL, NULL},
#else
- {"widget_font_gtk2", NULL,
- &SPECIFIC_PREFS.widgetfont, P_STRING, NULL, NULL, NULL},
{"message_font_gtk2", "Monospace 8",
&SPECIFIC_PREFS.textfont, P_STRING, NULL, NULL, NULL},
{"print_font_gtk2", "Monospace 8",
@@ -1632,3 +1624,26 @@
{
return &prefs_common;
}
+
+void prefs_common_zoom_font(gchar **font, ZoomType type)
+{
+ PangoFontDescription *font_desc;
+ int size;
+
+ if (font == NULL || *font == '\0')
+ return;
+
+ font_desc = pango_font_description_from_string(*font);
+ size = pango_font_description_get_size(font_desc)/PANGO_SCALE;
+
+ if (type == ZOOM_IN && size < 30)
+ size++;
+ if (type == ZOOM_OUT && size > 5)
+ size--;
+
+ pango_font_description_set_size(font_desc, size*PANGO_SCALE);
+
+ g_free(*font);
+ *font = pango_font_description_to_string(font_desc);
+ pango_font_description_free(font_desc);
+}
Index: matcher.c
===================================================================
RCS file: /home/claws-mail/claws/src/matcher.c,v
retrieving revision 1.75.2.79
retrieving revision 1.75.2.80
diff -u -d -r1.75.2.79 -r1.75.2.80
--- matcher.c 18 Nov 2012 19:50:36 -0000 1.75.2.79
+++ matcher.c 23 Nov 2012 19:29:15 -0000 1.75.2.80
@@ -2429,6 +2429,7 @@
FILE *dst = g_fopen(newpath, "wb");
gchar buf[BUFFSIZE];
int r;
+
if (src == NULL) {
perror("fopen");
if (dst)
Index: mainwindow.c
===================================================================
RCS file: /home/claws-mail/claws/src/mainwindow.c,v
retrieving revision 1.274.2.355
retrieving revision 1.274.2.356
diff -u -d -r1.274.2.355 -r1.274.2.356
--- mainwindow.c 15 Nov 2012 13:41:05 -0000 1.274.2.355
+++ mainwindow.c 23 Nov 2012 19:29:15 -0000 1.274.2.356
@@ -274,6 +274,10 @@
static void attract_by_subject_cb(GtkAction *action,
gpointer data);
+static void zoom_in_cb (GtkAction *action,
+ gpointer data);
+static void zoom_out_cb (GtkAction *action,
+ gpointer data);
static void delete_duplicated_cb (GtkAction *action,
gpointer data);
static void delete_duplicated_all_cb (GtkAction *action,
@@ -547,6 +551,9 @@
{"View/SetColumns/Folderlist", NULL, N_("In _folder list..."), NULL, NULL, G_CALLBACK(set_folder_display_item_cb) },
{"View/SetColumns/Messagelist", NULL, N_("In _message list..."), NULL, NULL, G_CALLBACK(set_summary_display_item_cb) },
{"View/---", NULL, "---" },
+ {"View/Zoom", NULL, N_("_Zoom") },
+ {"View/Zoom/In", NULL, N_("_In"), "<control>plus", NULL, G_CALLBACK(zoom_in_cb) },
+ {"View/Zoom/Out", NULL, N_("_Out"), "<control>minus", NULL, G_CALLBACK(zoom_out_cb) },
#ifndef GENERIC_UMPC
@@ -1350,6 +1357,25 @@
gtk_widget_show(mainwin->warning_btn);
}
+static void main_window_zoom(ZoomType type)
+{
+ static gboolean zooming = FALSE;
+
+ if (zooming)
+ return;
+ zooming = TRUE;
+
+ prefs_common_zoom_font(&prefs_common.textfont, type);
+ prefs_common_zoom_font(&prefs_common.printfont, type);
+ prefs_common_zoom_font(&prefs_common.boldfont, type);
+ prefs_common_zoom_font(&prefs_common.normalfont, type);
+ prefs_common_zoom_font(&prefs_common.smallfont, type);
+
+ main_window_reflect_prefs_all();
+
+ zooming = FALSE;
+}
+
void mainwindow_clear_error(MainWindow *mainwin)
{
gtk_widget_hide(mainwin->warning_btn);
@@ -1407,50 +1433,12 @@
break;
case GDK_KEY_F7:
{
- PangoFontDescription *font_desc;
- int size;
- font_desc = pango_font_description_from_string(prefs_common.normalfont);
- size = pango_font_description_get_size(font_desc)/PANGO_SCALE;
- if (size < 30) {
- size++; pango_font_description_set_size(font_desc, size*PANGO_SCALE);
- g_free(prefs_common.normalfont);
- prefs_common.normalfont = pango_font_description_to_string(font_desc);
- main_window_reflect_prefs_all();
- }
- pango_font_description_free(font_desc);
- font_desc = pango_font_description_from_string(prefs_common.textfont);
- size = pango_font_description_get_size(font_desc)/PANGO_SCALE;
- if (size < 30) {
- size++; pango_font_description_set_size(font_desc, size*PANGO_SCALE);
- g_free(prefs_common.textfont);
- prefs_common.textfont = pango_font_description_to_string(font_desc);
- main_window_reflect_prefs_all();
- }
- pango_font_description_free(font_desc);
+ main_window_zoom(ZOOM_IN);
}
break;
case GDK_KEY_F8:
{
- PangoFontDescription *font_desc;
- int size;
- font_desc = pango_font_description_from_string(prefs_common.normalfont);
- size = pango_font_description_get_size(font_desc)/PANGO_SCALE;
- if (size > 5) {
- size--; pango_font_description_set_size(font_desc, size*PANGO_SCALE);
- g_free(prefs_common.normalfont);
- prefs_common.normalfont = pango_font_description_to_string(font_desc);
- main_window_reflect_prefs_all();
- }
- pango_font_description_free(font_desc);
- font_desc = pango_font_description_from_string(prefs_common.textfont);
- size = pango_font_description_get_size(font_desc)/PANGO_SCALE;
- if (size > 5) {
- size--; pango_font_description_set_size(font_desc, size*PANGO_SCALE);
- g_free(prefs_common.textfont);
- prefs_common.textfont = pango_font_description_to_string(font_desc);
- main_window_reflect_prefs_all();
- }
- pango_font_description_free(font_desc);
+ main_window_zoom(ZOOM_OUT);
}
break;
case GDK_KEY_Escape:
@@ -1719,6 +1707,11 @@
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "SetColumns", "View/SetColumns", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/SetColumns", "Folderlist", "View/SetColumns/Folderlist", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/SetColumns", "Messagelist", "View/SetColumns/Messagelist", GTK_UI_MANAGER_MENUITEM)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Separator0", "View/---", GTK_UI_MANAGER_SEPARATOR)
+
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Zoom", "View/Zoom", GTK_UI_MANAGER_MENU)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Zoom", "In", "View/Zoom/In", GTK_UI_MANAGER_MENUITEM)
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Zoom", "Out", "View/Zoom/Out", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Separator1", "View/---", GTK_UI_MANAGER_SEPARATOR)
#ifndef MAEMO
@@ -4704,6 +4697,16 @@
summary_collapse_threads(mainwin->summaryview);
}
+static void zoom_in_cb(GtkAction *action, gpointer data)
+{
+ main_window_zoom(ZOOM_IN);
+}
+
+static void zoom_out_cb(GtkAction *action, gpointer data)
+{
+ main_window_zoom(ZOOM_OUT);
+}
+
static void set_summary_display_item_cb(GtkAction *action, gpointer data)
{
prefs_summary_column_open();
Index: procmsg.c
===================================================================
RCS file: /home/claws-mail/claws/src/procmsg.c,v
retrieving revision 1.150.2.131
retrieving revision 1.150.2.132
diff -u -d -r1.150.2.131 -r1.150.2.132
--- procmsg.c 12 Oct 2012 15:13:16 -0000 1.150.2.131
+++ procmsg.c 23 Nov 2012 19:29:15 -0000 1.150.2.132
@@ -1161,6 +1161,7 @@
gchar buf[1024];
gchar *p;
int r;
+
cm_return_if_fail(msginfo);
if (procmime_msginfo_is_encrypted(msginfo))
Index: prefs_common.h
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_common.h,v
retrieving revision 1.103.2.141
retrieving revision 1.103.2.142
diff -u -d -r1.103.2.141 -r1.103.2.142
--- prefs_common.h 7 Jul 2012 07:30:56 -0000 1.103.2.141
+++ prefs_common.h 23 Nov 2012 19:29:15 -0000 1.103.2.142
@@ -56,6 +56,11 @@
CTE_8BIT
} TransferEncodingMethod;
+typedef enum {
+ ZOOM_IN,
+ ZOOM_OUT
+} ZoomType;
+
typedef enum
{
/* U = unread, N = new, M = marked */
@@ -195,13 +200,11 @@
gchar *smallfont_gtk1;
/* new fonts */
- gchar *widgetfont;
gchar *textfont;
gchar *printfont;
gchar *boldfont;
gchar *normalfont;
gchar *smallfont;
- gchar *titlefont;
gboolean use_different_print_font;
gboolean derive_from_normal_font;
@@ -544,4 +547,5 @@
const gchar *prefs_common_translated_header_name(const gchar *header_name);
const gchar *prefs_common_get_uri_cmd(void);
const gchar *prefs_common_get_ext_editor_cmd(void);
+void prefs_common_zoom_font(gchar **font, ZoomType type);
#endif /* __PREFS_COMMON_H__ */
Index: main.c
===================================================================
RCS file: /home/claws-mail/claws/src/main.c,v
retrieving revision 1.115.2.262
retrieving revision 1.115.2.263
diff -u -d -r1.115.2.262 -r1.115.2.263
--- main.c 15 Nov 2012 14:27:36 -0000 1.115.2.262
+++ main.c 23 Nov 2012 19:29:15 -0000 1.115.2.263
@@ -94,6 +94,7 @@
#include "account.h"
#include "procmsg.h"
#include "inc.h"
+#include "imap.h"
#include "import.h"
#include "manage_window.h"
#include "alertpanel.h"
Index: jpilot.c
===================================================================
RCS file: /home/claws-mail/claws/src/jpilot.c,v
retrieving revision 1.18.2.37
retrieving revision 1.18.2.38
diff -u -d -r1.18.2.37 -r1.18.2.38
--- jpilot.c 19 Sep 2012 15:13:59 -0000 1.18.2.37
+++ jpilot.c 23 Nov 2012 19:29:15 -0000 1.18.2.38
@@ -540,6 +540,8 @@
fseek(in, 0, SEEK_SET);
r = fread(&rdbh, sizeof(RawDBHeader), 1, in);
+ if (r < 1)
+ return MGU_ERROR_READ;
if (feof(in)) {
return MGU_EOF;
}
More information about the Commits
mailing list