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,
{"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
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);
break;
case GDK_KEY_F7:
{
- main_window_zoom(ZOOM_IN);
+ 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);
}
break;
case GDK_KEY_F8:
{
- main_window_zoom(ZOOM_OUT);
+ 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);
}
break;
case GDK_KEY_Escape:
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
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();
&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",
/* 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-*-*-*-*-*-*-*",
/* 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",
{"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",
{
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);
-}