commit - 1e8e75144f47a4dbbcbfbaafb07efe22983c690a
commit + 16b22a2b765ededd0b1d628dd6d8c3b54b0375e6
blob - 7b59474797bb03d6d6726e943b38773b68962f7e
blob + 92f8ed652b660be3e91400175492a8845566872d
--- src/compose.c
+++ src/compose.c
#include "filesel.h"
#include "procheader.h"
#include "procmime.h"
-#include "statusbar.h"
#include "quoted-printable.h"
#include "codeconv.h"
#include "utils.h"
blob - 186ee0d77f03615b70368563a63c202f43b711b2
blob + 46ac7693cd6b9c0f53511f61e9d74f96d17543ec
--- src/folderview.c
+++ src/folderview.c
gtk_cmctree_select(ctree, node);
gtk_cmclist_thaw(GTK_CMCLIST(ctree));
if ((folderview->summaryview->folder_item &&
- folderview->summaryview->folder_item->total_msgs > 0) ||
- prefs_common.layout_mode == SMALL_LAYOUT)
+ folderview->summaryview->folder_item->total_msgs > 0))
summary_select_node(folderview->summaryview,
folderview->summaryview->selected, OPEN_SELECTED_ON_FOLDER_OPEN);
else
blob - 9e0eb0ff956517615df44d7e046218515fac3e33
blob + a642bddb165276439f21607f7bd2cdfbd4af53c4
--- src/gtk/quicksearch.c
+++ src/gtk/quicksearch.c
GList *normal_search_strings;
GList *extended_search_strings;
-
+
AdvancedSearch *asearch;
gboolean want_reexec;
gboolean want_history;
}
do {
- gboolean active = quicksearch->request.matchstring != NULL
+ gboolean active = quicksearch->request.matchstring != NULL
&& g_strcmp0(quicksearch->request.matchstring, "");
advsearch_set(quicksearch->asearch, quicksearch->request.type,
quicksearch->request.matchstring);
{
GtkWidget *search_string_entry = quicksearch->search_string_entry;
- combobox_unset_popdown_strings(GTK_COMBO_BOX_TEXT(search_string_entry));
+ combobox_unset_popdown_strings(GTK_COMBO_BOX_TEXT(search_string_entry));
if (prefs_common.summary_quicksearch_type == ADVANCED_SEARCH_EXTENDED)
combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(search_string_entry),
- quicksearch->extended_search_strings);
+ quicksearch->extended_search_strings);
else
combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(search_string_entry),
quicksearch->normal_search_strings);
/* If the string entry is empty -> hide quicksearch bar. If not -> empty it */
if (!*str) {
summaryview_activate_quicksearch(
- mainwindow_get_mainwindow()->summaryview,
+ mainwindow_get_mainwindow()->summaryview,
FALSE);
} else {
quicksearch_set(quicksearch, prefs_common.summary_quicksearch_type, "");
{
gchar * cond_str;
MatcherList * matchers = NULL;
-
+
cm_return_val_if_fail(
mainwindow_get_mainwindow()->summaryview->quicksearch != NULL,
FALSE);
GtkWidget *box;
gboolean icon_visible;
- g_object_get(gtk_settings_get_default(),
- "gtk-button-images", &icon_visible,
+ g_object_get(gtk_settings_get_default(),
+ "gtk-button-images", &icon_visible,
NULL);
for (cur = children; cur; cur = cur->next)
gtk_container_remove(GTK_CONTAINER(button), GTK_WIDGET(cur->data));
-
+
g_list_free(children);
box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
-
+
gtk_container_add(GTK_CONTAINER(button), box);
if (icon_visible || !text || !*text || icon != NULL)
- gtk_box_pack_start(GTK_BOX(box), gtk_image_new_from_icon_name(icon,
+ gtk_box_pack_start(GTK_BOX(box), gtk_image_new_from_icon_name(icon,
GTK_ICON_SIZE_BUTTON), FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(box), gtk_label_new_with_mnemonic(text), FALSE, FALSE, 0);
gtk_widget_show_all(box);
_("_Information"));
quicksearch_set_button(GTK_BUTTON(quicksearch->search_condition_expression), NULL, _("E_dit"));
quicksearch_set_button(GTK_BUTTON(quicksearch->clear_search), "edit-clear-symbolic", _("C_lear"));
-
+
update_extended_buttons(quicksearch);
GTKUT_GDKRGBA_TO_GDKCOLOR(prefs_common.color[COL_QS_ACTIVE_BG],
{
switch (prefs_common.layout_mode) {
case NORMAL_LAYOUT:
- case WIDE_LAYOUT:
- case WIDE_MSGLIST_LAYOUT:
quicksearch_set_button(GTK_BUTTON(quicksearch->search_description),
"dialog-information-symbolic", _("_Information"));
quicksearch_set_button(GTK_BUTTON(quicksearch->search_condition_expression), NULL, _("E_dit"));
quicksearch_set_button(GTK_BUTTON(quicksearch->clear_search), "edit-clear-symbolic", _("C_lear"));
break;
- case SMALL_LAYOUT:
case VERTICAL_LAYOUT:
quicksearch_set_button(GTK_BUTTON(quicksearch->search_description), "dialog-information-symbolic", "");
quicksearch_set_button(GTK_BUTTON(quicksearch->search_condition_expression), NULL, _("E_dit"));
if (!mainwin || !mainwin->summaryview) {
return;
}
-
+
active_type = prefs_common_get_prefs()->summary_quicksearch_type;
quicksearch_set_type(quicksearch, active_type);
}
quicksearch->in_typing = FALSE;
quicksearch_set_matchstring(quicksearch, matchstring);
-
+
g_signal_handlers_block_by_func(G_OBJECT(gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry)))),
G_CALLBACK(searchbar_changed_cb), quicksearch);
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry)))),
quicksearch->active = active;
- if (active &&
+ if (active &&
(prefs_common.summary_quicksearch_type == ADVANCED_SEARCH_EXTENDED
&& !advsearch_has_proper_predicate(quicksearch->asearch)))
error = TRUE;
return;
matcher_parser_disable_warnings(TRUE);
-
+
do {
newstr = advsearch_expand_search_string((gchar *) strings->data);
if (newstr && newstr[0] != '\0') {
g_strdup(strings->data));
} else {
matcher_list = matcher_parser_get_cond(newstr, FALSE);
-
+
if (matcher_list) {
quicksearch->extended_search_strings =
g_list_prepend(
}
}
g_free(newstr);
-
+
} while ((strings = g_list_next(strings)) != NULL);
- matcher_parser_disable_warnings(FALSE);
+ matcher_parser_disable_warnings(FALSE);
quicksearch->normal_search_strings = g_list_reverse(quicksearch->normal_search_strings);
quicksearch->extended_search_strings = g_list_reverse(quicksearch->extended_search_strings);
blob - 87403208f7e53dc852476921bf6cea27dfc8bd38
blob + 52af49d26ed8665e0e73daadf62c07d6d5835b8a
--- src/mainwindow.c
+++ src/mainwindow.c
static GtkRadioActionEntry mainwin_layout_radio_entries[] = { /* set_layout_cb */
{"View/Layout/Standard", NULL, N_("_Standard"), NULL, NULL, NORMAL_LAYOUT }, /* radio NORMAL_LAYOUT */
{"View/Layout/ThreeColumns", NULL, N_("_Three columns"), NULL, NULL, VERTICAL_LAYOUT }, /* radio VERTICAL_LAYOUT */
- {"View/Layout/WideMessage", NULL, N_("_Wide message"), NULL, NULL, WIDE_LAYOUT }, /* radio WIDE_LAYOUT */
- {"View/Layout/WideMessageList", NULL, N_("W_ide message list"), NULL, NULL, WIDE_MSGLIST_LAYOUT }, /* radio WIDE_MSGLIST_LAYOUT */
- {"View/Layout/SmallScreen", NULL, N_("S_mall screen"), NULL, NULL, SMALL_LAYOUT }, /* radio SMALL_LAYOUT */
};
static GtkRadioActionEntry mainwin_sort_radio_entries[] = { /* sort_summary_cb */
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Layout", "View/Layout", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Layout", "Standard", "View/Layout/Standard", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Layout", "ThreeColumns", "View/Layout/ThreeColumns", GTK_UI_MANAGER_MENUITEM)
- MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Layout", "WideMessage", "View/Layout/WideMessage", GTK_UI_MANAGER_MENUITEM)
- MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Layout", "WideMessageList", "View/Layout/WideMessageList", GTK_UI_MANAGER_MENUITEM)
- MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Layout", "SmallScreen", "View/Layout/SmallScreen", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Separator2", "View/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Sort", "View/Sort", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Sort", "Number", "View/Sort/Number", GTK_UI_MANAGER_MENUITEM)
G_CALLBACK(mainwindow_visibility_event_cb), mainwin);
gtk_widget_add_events(GTK_WIDGET(window), GDK_VISIBILITY_NOTIFY_MASK);
- if (prefs_common.layout_mode == VERTICAL_LAYOUT ||
- prefs_common.layout_mode == SMALL_LAYOUT) {
+ if (prefs_common.layout_mode == VERTICAL_LAYOUT) {
summary_relayout(mainwin->summaryview);
}
summary_update_unread(mainwin->summaryview, NULL);
textview_reflect_prefs(mainwin->messageview->mimeview->textview);
summary_redisplay_msg(mainwin->summaryview);
- if (prefs_common.layout_mode == SMALL_LAYOUT) {
- if (mainwin->in_folder) {
- mainwindow_enter_folder(mainwin);
- } else {
- mainwindow_exit_folder(mainwin);
- }
- }
}
prefs_tag = 0;
return FALSE;
gtk_paned_set_position(GTK_PANED(paned), mid);
}
-static void mainwin_paned_show_first(GtkPaned *paned)
-{
- gint max;
- g_object_get (G_OBJECT(paned),
- "max-position",
- &max, NULL);
-
- if (gtk_paned_get_child1(GTK_PANED(paned)))
- gtk_widget_show(gtk_paned_get_child1(GTK_PANED(paned)));
- if (gtk_paned_get_child2(GTK_PANED(paned)))
- gtk_widget_hide(gtk_paned_get_child2(GTK_PANED(paned)));
- gtk_paned_set_position(GTK_PANED(paned), max);
-}
-
-static void mainwin_paned_show_last(GtkPaned *paned)
-{
- gint min;
- g_object_get (G_OBJECT(paned),
- "min-position",
- &min, NULL);
-
- if (gtk_paned_get_child1(GTK_PANED(paned)))
- gtk_widget_hide(gtk_paned_get_child1(GTK_PANED(paned)));
- if (gtk_paned_get_child2(GTK_PANED(paned)))
- gtk_widget_show(gtk_paned_get_child2(GTK_PANED(paned)));
- gtk_paned_set_position(GTK_PANED(paned), min);
-}
-
void main_window_toggle_message_view(MainWindow *mainwin)
{
SummaryView *summaryview = mainwin->summaryview;
switch (prefs_common.layout_mode) {
case NORMAL_LAYOUT:
case VERTICAL_LAYOUT:
- case SMALL_LAYOUT:
ppaned = mainwin->vpaned;
container = mainwin->hpaned;
if (gtk_widget_get_parent(ppaned) != NULL) {
g_object_unref(ppaned);
}
break;
- case WIDE_LAYOUT:
- container = mainwin->vpaned;
- if (gtk_widget_get_parent(mainwin->messageview->vbox) != NULL) {
- mainwin->messageview->visible = FALSE;
- summaryview->displayed = NULL;
- g_object_ref(mainwin->messageview->vbox);
- gtk_container_remove(GTK_CONTAINER(container), mainwin->messageview->vbox);
- } else {
- mainwin->messageview->visible = TRUE;
- gtk_container_add(GTK_CONTAINER(container), mainwin->messageview->vbox);
- g_object_unref(mainwin->messageview->vbox);
- }
- break;
- case WIDE_MSGLIST_LAYOUT:
- g_warning("can't hide messageview in this wide msglist layout");
- break;
}
if (messageview_is_visible(mainwin->messageview))
if (summary_is_list(mainwin->summaryview))
UPDATE_STATE(M_SUMMARY_ISLIST);
- if (prefs_common.layout_mode != SMALL_LAYOUT || mainwin->in_folder)
+ if (mainwin->in_folder)
UPDATE_STATE(M_IN_MSGLIST);
for (account_list = account_get_list(); account_list != NULL; account_list = account_list->next) {
} else {
gtkut_window_popup(mainwin->window);
}
-
- if (prefs_common.layout_mode == SMALL_LAYOUT) {
- if (mainwin->in_folder) {
- mainwindow_enter_folder(mainwin);
- } else {
- mainwindow_exit_folder(mainwin);
- }
- }
fix_folderview_scroll(mainwin);
}
GtkWidget *hpaned;
GtkWidget *vpaned;
GtkWidget *vbox_body = mainwin->vbox_body;
- gboolean first_set = (mainwin->hpaned == NULL);
debug_print("Setting widgets...\n");
mainwin->messageview->statusbar = mainwin->statusbar;
gtk_widget_destroy(mainwin->hpaned);
}
- cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/ShowHide/MessageView",
- (layout_mode != WIDE_MSGLIST_LAYOUT && layout_mode != SMALL_LAYOUT));
+ cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/ShowHide/MessageView", TRUE);
switch (layout_mode) {
case VERTICAL_LAYOUT:
case NORMAL_LAYOUT:
- case SMALL_LAYOUT:
hpaned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
if (layout_mode == VERTICAL_LAYOUT)
vpaned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
gtk_paned_add2(GTK_PANED(vpaned),
GTK_WIDGET_PTR(mainwin->messageview));
gtk_widget_show(vpaned);
- if (layout_mode == SMALL_LAYOUT && first_set) {
- mainwin_paned_show_first(GTK_PANED(hpaned));
- }
gtk_paned_set_position(GTK_PANED(hpaned),
prefs_common_get_prefs()->folderview_width);
}
break;
- case WIDE_LAYOUT:
- vpaned = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
- hpaned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
- gtk_box_pack_start(GTK_BOX(vbox_body), vpaned, TRUE, TRUE, 0);
- gtk_paned_add1(GTK_PANED(vpaned), hpaned);
-
- gtk_paned_add1(GTK_PANED(hpaned),
- GTK_WIDGET_PTR(mainwin->folderview));
- gtk_paned_add2(GTK_PANED(hpaned),
- GTK_WIDGET_PTR(mainwin->summaryview));
-
- gtk_widget_show(hpaned);
-
- if (messageview_is_visible(mainwin->messageview)) {
- gtk_paned_add2(GTK_PANED(vpaned),
- GTK_WIDGET_PTR(mainwin->messageview));
- } else {
- g_object_ref(GTK_WIDGET_PTR(mainwin->messageview));
- }
- gtk_widget_show(vpaned);
-
- gtk_paned_set_position(GTK_PANED(hpaned),
- prefs_common_get_prefs()->folderview_width);
-
- if (messageview_is_visible(mainwin->messageview)) {
- gtk_paned_set_position(GTK_PANED(vpaned),
- prefs_common_get_prefs()->summaryview_height);
- }
-
- break;
- case WIDE_MSGLIST_LAYOUT:
- vpaned = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
- hpaned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
- gtk_box_pack_start(GTK_BOX(vbox_body), vpaned, TRUE, TRUE, 0);
-
- gtk_paned_add1(GTK_PANED(vpaned),
- GTK_WIDGET_PTR(mainwin->summaryview));
- gtk_paned_add1(GTK_PANED(hpaned),
- GTK_WIDGET_PTR(mainwin->folderview));
-
- gtk_widget_show(hpaned);
-
- if (messageview_is_visible(mainwin->messageview)) {
- gtk_paned_add2(GTK_PANED(hpaned),
- GTK_WIDGET_PTR(mainwin->messageview));
- } else {
- g_object_ref(GTK_WIDGET_PTR(mainwin->messageview));
- }
- gtk_paned_add2(GTK_PANED(vpaned), hpaned);
- gtk_widget_show(vpaned);
-
- gtk_paned_set_position(GTK_PANED(hpaned),
- prefs_common_get_prefs()->folderview_width);
- gtk_paned_set_position(GTK_PANED(vpaned),
- prefs_common_get_prefs()->summaryview_height);
-
- break;
default:
g_warning("unknown layout");
return;
mainwin->hpaned = hpaned;
mainwin->vpaned = vpaned;
- if (layout_mode == SMALL_LAYOUT) {
- if (mainwin->messageview->visible)
- main_window_toggle_message_view(mainwin);
- }
+ gtk_window_set_default_size(GTK_WINDOW(mainwin->window),
+ prefs_common.mainwin_width,
+ prefs_common.mainwin_height);
- if (layout_mode == SMALL_LAYOUT && first_set) {
- gtk_widget_realize(mainwin->window);
- gtk_widget_realize(mainwin->folderview->ctree);
- gtk_widget_realize(mainwin->summaryview->hbox);
- gtk_widget_realize(mainwin->summaryview->hbox_l);
- gtk_paned_set_position(GTK_PANED(mainwin->hpaned), 800);
- } else {
- gtk_window_set_default_size(GTK_WINDOW(mainwin->window),
- prefs_common.mainwin_width,
- prefs_common.mainwin_height);
- }
-
if (mainwin->messageview->visible)
gtk_image_set_from_icon_name(GTK_IMAGE(mainwin->summaryview->toggle_arrow),
"pan-down-symbolic", GTK_ICON_SIZE_MENU);
case VERTICAL_LAYOUT:
cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Layout/ThreeColumns", TRUE);
break;
- case WIDE_LAYOUT:
- cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Layout/WideMessage", TRUE);
- break;
- case WIDE_MSGLIST_LAYOUT:
- cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Layout/WideMessageList", TRUE);
- break;
- case SMALL_LAYOUT:
- cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Layout/SmallScreen", TRUE);
- break;
}
if (folderwin) {
MainWindow *mainwin = (MainWindow *)data;
gint value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (current));
LayoutType layout_mode = value;
- LayoutType old_layout_mode = prefs_common.layout_mode;
if (mainwin->menu_lock_count) {
return;
}
return;
}
- if (!mainwin->messageview->visible && layout_mode != SMALL_LAYOUT)
+ if (!mainwin->messageview->visible)
main_window_toggle_message_view(mainwin);
- else if (mainwin->messageview->visible && layout_mode == SMALL_LAYOUT)
- main_window_toggle_message_view(mainwin);
main_window_separation_change(mainwin, layout_mode);
mainwindow_reset_paned(GTK_PANED(mainwin->vpaned));
- if (old_layout_mode == SMALL_LAYOUT && layout_mode != SMALL_LAYOUT) {
- mainwindow_reset_paned(GTK_PANED(mainwin->hpaned));
- if (layout_mode == VERTICAL_LAYOUT)
- mainwindow_reset_paned(GTK_PANED(mainwin->vpaned));
- }
- if (old_layout_mode != SMALL_LAYOUT && layout_mode == SMALL_LAYOUT) {
- mainwin_paned_show_first(GTK_PANED(mainwin->hpaned));
- mainwindow_exit_folder(mainwin);
- }
summary_relayout(mainwin->summaryview);
summary_update_unread(mainwin->summaryview, NULL);
}
}
void mainwindow_exit_folder(MainWindow *mainwin) {
- if (prefs_common.layout_mode == SMALL_LAYOUT) {
- folderview_close_opened(mainwin->folderview, FALSE);
- mainwin_paned_show_first(GTK_PANED(mainwin->hpaned));
- folderview_grab_focus(mainwin->folderview);
- }
mainwin->in_folder = FALSE;
main_window_set_menu_sensitive(mainwin);
}
void mainwindow_enter_folder(MainWindow *mainwin) {
- if (prefs_common.layout_mode == SMALL_LAYOUT) {
- mainwin_paned_show_last(GTK_PANED(mainwin->hpaned));
- }
mainwin->in_folder = TRUE;
main_window_set_menu_sensitive(mainwin);
}
blob - d58384b2c346335d17802e4c9cee3380277ab582
blob + 8aaded1f771c79d53caf2fb2077a69ebc7ec60f6
--- src/mainwindow.h
+++ src/mainwindow.h
{
NORMAL_LAYOUT = 0,
VERTICAL_LAYOUT = 1 << 0,
- WIDE_LAYOUT = 1 << 1,
- WIDE_MSGLIST_LAYOUT = 1 << 2,
- SMALL_LAYOUT
} LayoutType;
typedef enum
blob - 30101bff271285671f89309f73134a2f4b3ba62c
blob + e2b305244ddf0d623b96e61416529eac88104e4f
--- src/summaryview.c
+++ src/summaryview.c
quicksearch_show(quicksearch);
else
quicksearch_hide(quicksearch);
-
- if (prefs_common.layout_mode == WIDE_MSGLIST_LAYOUT ||
- prefs_common.layout_mode == SMALL_LAYOUT)
- gtk_widget_hide(summaryview->toggle_eventbox);
-
return summaryview;
}
switch (prefs_common.layout_mode) {
case NORMAL_LAYOUT:
- case WIDE_LAYOUT:
- case WIDE_MSGLIST_LAYOUT:
gtk_box_pack_start(GTK_BOX(summaryview->stat_box),
summaryview->hbox_l, TRUE, TRUE, 0);
gtk_box_pack_end(GTK_BOX(summaryview->stat_box),
summaryview->statlabel_msgs, FALSE, FALSE, HSPACING_NARROW);
gtk_widget_show_all(summaryview->stat_box);
gtk_widget_show_all(summaryview->stat_box2);
- if (prefs_common.layout_mode == WIDE_MSGLIST_LAYOUT ||
- prefs_common.layout_mode == SMALL_LAYOUT)
- gtk_widget_hide(summaryview->toggle_eventbox);
- else
- gtk_widget_show(summaryview->toggle_eventbox);
+ gtk_widget_show(summaryview->toggle_eventbox);
break;
case VERTICAL_LAYOUT:
- case SMALL_LAYOUT:
gtk_box_pack_start(GTK_BOX(summaryview->stat_box),
summaryview->hbox_l, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(summaryview->stat_box2),
summaryview->statlabel_msgs, FALSE, FALSE, HSPACING_NARROW);
gtk_widget_show_all(summaryview->stat_box);
gtk_widget_show_all(summaryview->stat_box2);
- if (prefs_common.layout_mode == SMALL_LAYOUT) {
- gtk_widget_hide(summaryview->toggle_eventbox);
- gtk_widget_hide(summaryview->statlabel_msgs);
- } else {
- gtk_widget_show(summaryview->toggle_eventbox);
- gtk_widget_show(summaryview->statlabel_msgs);
- }
-
+ gtk_widget_show(summaryview->toggle_eventbox);
+ gtk_widget_show(summaryview->statlabel_msgs);
break;
}
summary_set_column_order(summaryview);
SummaryColumnState *col_state = summaryview->col_state;
GtkCMCTree *ctree = GTK_CMCTREE(summaryview->ctree);
- if (!item || ((prefs_common.layout_mode == VERTICAL_LAYOUT || prefs_common.layout_mode == SMALL_LAYOUT) && prefs_common.two_line_vert) )
+ if (!item || ((prefs_common.layout_mode == VERTICAL_LAYOUT) && prefs_common.two_line_vert) )
return;
if (FOLDER_SHOWS_TO_HDR(item))
show_to = TRUE;
if (!is_refresh) {
main_create_mailing_list_menu (summaryview->mainwin, NULL);
- if (prefs_common.layout_mode == SMALL_LAYOUT) {
- if (item) {
- mainwindow_enter_folder(summaryview->mainwin);
- gtk_widget_grab_focus(summaryview->ctree);
- }
- }
}
if (!prefs_common.summary_quicksearch_sticky
&& (!prefs_common.summary_quicksearch_recurse
itstr = g_strdup("");
}
- if (prefs_common.layout_mode != SMALL_LAYOUT) {
- str = g_strconcat(n_selected ? itos(n_selected) : "",
- itstr, sel, spc, del, mv, cp, NULL);
- g_free(sel);
- g_free(del);
- g_free(mv);
- g_free(cp);
- g_free(itstr);
+ str = g_strconcat(n_selected ? itos(n_selected) : "",
+ itstr, sel, spc, del, mv, cp, NULL);
+ g_free(sel);
+ g_free(del);
+ g_free(mv);
+ g_free(cp);
+ g_free(itstr);
- gtk_label_set_text(GTK_LABEL(summaryview->statlabel_select), str);
- g_free(str);
+ gtk_label_set_text(GTK_LABEL(summaryview->statlabel_select), str);
+ g_free(str);
- str = g_strdup_printf(_("%d new, %d unread, %d total (%s)"),
- n_new, n_unread, n_total,
- to_human_readable((goffset)n_size));
- gtk_label_set_text(GTK_LABEL(summaryview->statlabel_msgs), str);
- g_free(str);
- } else {
- gchar *ssize, *tsize;
- if (n_selected) {
- ssize = g_strdup(to_human_readable((goffset)sel_size));
- tsize = g_strdup(to_human_readable((goffset)n_size));
- str = g_strdup_printf(_("%d/%d selected (%s/%s), %d unread"),
- n_selected, n_total, ssize, tsize, n_unread);
- g_free(ssize);
- g_free(tsize);
- } else
- str = g_strdup_printf(_("%d new, %d unread, %d total (%s)"),
- n_new, n_unread, n_total, to_human_readable((goffset)n_size));
- g_free(sel);
- g_free(del);
- g_free(mv);
- g_free(cp);
- g_free(itstr);
+ str = g_strdup_printf(_("%d new, %d unread, %d total (%s)"),
+ n_new, n_unread, n_total,
+ to_human_readable((goffset)n_size));
+ gtk_label_set_text(GTK_LABEL(summaryview->statlabel_msgs), str);
+ g_free(str);
- gtk_label_set_text(GTK_LABEL(summaryview->statlabel_select), str);
- g_free(str);
- }
-
summary_set_menu_sensitive(summaryview);
toolbar_main_set_sensitive(summaryview->mainwin);
}
const gchar *msgid = msginfo->msgid;
GHashTable *msgid_table = summaryview->msgid_table;
gboolean vert_layout = (prefs_common.layout_mode == VERTICAL_LAYOUT);
- gboolean small_layout = (prefs_common.layout_mode == SMALL_LAYOUT);
summary_set_header(summaryview, text, msginfo);
if (summaryview->col_state[summaryview->col_pos[S_COL_TAGS]].visible)
SET_TEXT(S_COL_TAGS);
- if ((vert_layout || small_layout) && prefs_common.two_line_vert)
+ if (vert_layout && prefs_common.two_line_vert)
g_free(text[summaryview->col_pos[S_COL_SUBJECT]]);
#undef SET_TEXT
GdkDisplay *display;
gboolean vert_layout = (prefs_common.layout_mode == VERTICAL_LAYOUT);
- gboolean small_layout = (prefs_common.layout_mode == SMALL_LAYOUT);
if (!mlist) return;
(ctree, NULL, node, text, 2,
NULL, NULL,
FALSE, FALSE);
- if ((vert_layout || small_layout) && prefs_common.two_line_vert)
+ if (vert_layout && prefs_common.two_line_vert)
g_free(text[summaryview->col_pos[S_COL_SUBJECT]]);
GTKUT_CTREE_NODE_SET_ROW_DATA(node, msginfo);
gchar *from_text = NULL, *to_text = NULL;
gboolean should_swap = FALSE;
gboolean vert_layout = (prefs_common.layout_mode == VERTICAL_LAYOUT);
- gboolean small_layout = (prefs_common.layout_mode == SMALL_LAYOUT);
static const gchar *color_dim_rgb = NULL;
if (!color_dim_rgb)
color_dim_rgb = gtkut_gdk_rgba_to_string(&summaryview->color_dim);
/* slow! */
if (summaryview->col_state[summaryview->col_pos[S_COL_DATE]].visible ||
- ((vert_layout || small_layout) && prefs_common.two_line_vert)) {
+ (vert_layout && prefs_common.two_line_vert)) {
if (msginfo->date_t && msginfo->date_t > 0) {
procheader_date_get_localtime(date_modified,
sizeof(date_modified),
else
text[col_pos[S_COL_SUBJECT]] = msginfo->subject ? msginfo->subject :
_("(No Subject)");
- if ((vert_layout || small_layout) && prefs_common.two_line_vert) {
+ if (vert_layout && prefs_common.two_line_vert) {
if (!FOLDER_SHOWS_TO_HDR(summaryview->folder_item)) {
gchar *tmp = g_markup_printf_escaped(g_strconcat("%s\n",
"<span color='%s' style='italic'>",
return;
}
- if (new_window && prefs_common.layout_mode != SMALL_LAYOUT) {
- MessageView *msgview;
-
- msgview = messageview_create_with_new_window(summaryview->mainwin);
+ if (new_window) {
+ MessageView *msgview = messageview_create_with_new_window(summaryview->mainwin);
val = messageview_show(msgview, msginfo, all_headers);
} else {
- MessageView *msgview;
-
- if (prefs_common.layout_mode == SMALL_LAYOUT) {
- if (summaryview->ext_messageview == NULL)
- summaryview->ext_messageview = messageview_create_with_new_window(summaryview->mainwin);
- else
- gtkut_window_popup(summaryview->ext_messageview->window);
- msgview = summaryview->ext_messageview;
- summaryview->displayed = row;
- val = messageview_show(msgview, msginfo, all_headers);
- if (mimeview_tree_is_empty(msgview->mimeview))
- gtk_widget_grab_focus(summaryview->ctree);
- gtkut_ctree_node_move_if_on_the_edge(ctree, row,
- GTK_CMCLIST(summaryview->ctree)->focus_row);
- } else {
- msgview = summaryview->messageview;
- summaryview->displayed = row;
- if (!messageview_is_visible(msgview) &&
- gtk_window_is_active(GTK_WINDOW(summaryview->mainwin->window))) {
- main_window_toggle_message_view(summaryview->mainwin);
- GTK_EVENTS_FLUSH();
- }
- val = messageview_show(msgview, msginfo, all_headers);
- if (mimeview_tree_is_empty(msgview->mimeview))
- gtk_widget_grab_focus(summaryview->ctree);
- gtkut_ctree_node_move_if_on_the_edge(ctree, row,
- GTK_CMCLIST(summaryview->ctree)->focus_row);
+ MessageView *msgview = summaryview->messageview;
+ summaryview->displayed = row;
+ if (!messageview_is_visible(msgview) &&
+ gtk_window_is_active(GTK_WINDOW(summaryview->mainwin->window))) {
+ main_window_toggle_message_view(summaryview->mainwin);
+ GTK_EVENTS_FLUSH();
}
+ val = messageview_show(msgview, msginfo, all_headers);
+ if (mimeview_tree_is_empty(msgview->mimeview))
+ gtk_widget_grab_focus(summaryview->ctree);
+ gtkut_ctree_node_move_if_on_the_edge(ctree, row,
+ GTK_CMCLIST(summaryview->ctree)->focus_row);
}
if (val == 0 && MSG_IS_UNREAD(msginfo->flags)) {
void summary_toggle_view(SummaryView *summaryview)
{
- if (prefs_common.layout_mode == SMALL_LAYOUT)
- return;
if (summary_is_locked(summaryview))
return;
if (!messageview_is_visible(summaryview->messageview) &&
MsgInfo *info = NULL;
GdkRectangle rect;
gboolean vert_layout = (prefs_common.layout_mode == VERTICAL_LAYOUT);
- gboolean small_layout = (prefs_common.layout_mode == SMALL_LAYOUT);
if (!prefs_common.show_tooltips)
return FALSE;
formatted = g_strdup(text);
g_strstrip(formatted);
- if ((vert_layout || small_layout) && prefs_common.two_line_vert)
+ if (vert_layout && prefs_common.two_line_vert)
gtk_tooltip_set_markup (tooltip, formatted);
else
gtk_tooltip_set_text (tooltip, formatted);
SummaryColumnType type;
gint pos;
gboolean vert_layout = (prefs_common.layout_mode == VERTICAL_LAYOUT);
- gboolean small_layout = (prefs_common.layout_mode == SMALL_LAYOUT);
memset(titles, 0, sizeof(titles));
col_state = prefs_summary_column_get_config();
FALSE);
if (((pos == summaryview->col_pos[S_COL_FROM] && !FOLDER_SHOWS_TO_HDR(summaryview->folder_item)) ||
(pos == summaryview->col_pos[S_COL_TO] && FOLDER_SHOWS_TO_HDR(summaryview->folder_item)) ||
- pos == summaryview->col_pos[S_COL_DATE]) && (vert_layout || small_layout) &&
+ pos == summaryview->col_pos[S_COL_DATE]) && vert_layout &&
prefs_common.two_line_vert)
gtk_cmclist_set_column_visibility
(GTK_CMCLIST(ctree), pos, FALSE);
(GTK_CMCLIST(ctree), pos, col_state[pos].visible);
}
if (prefs_common.two_line_vert)
- gtk_sctree_set_use_markup(GTK_SCTREE(ctree), summaryview->col_pos[S_COL_SUBJECT], vert_layout||small_layout);
+ gtk_sctree_set_use_markup(GTK_SCTREE(ctree), summaryview->col_pos[S_COL_SUBJECT], vert_layout);
/* connect signal to the buttons for sorting */
#define CLIST_BUTTON_SIGNAL_CONNECT(col, func) \
gtk_cmclist_set_row_height(GTK_CMCLIST(ctree), 0);
normal_row_height = GTK_CMCLIST(ctree)->row_height;
- if ((prefs_common.layout_mode == SMALL_LAYOUT || prefs_common.layout_mode == VERTICAL_LAYOUT) &&
+ if ((prefs_common.layout_mode == VERTICAL_LAYOUT) &&
prefs_common.two_line_vert) {
gtk_cmclist_set_row_height(GTK_CMCLIST(summaryview->ctree), 2*normal_row_height + 2);
}
GDK_ACTION_MOVE|GDK_ACTION_COPY|GDK_ACTION_DEFAULT, button, event,
-1, -1);
gtk_drag_set_icon_default(context);
- if (prefs_common.layout_mode == SMALL_LAYOUT) {
- GtkWidget *paned = gtk_widget_get_parent(GTK_WIDGET_PTR(summaryview));
- if (paned && GTK_IS_PANED(paned)) {
- mainwindow_reset_paned(GTK_PANED(paned));
- }
- }
}
static gboolean summary_return_to_list(void *data)
static void summary_drag_end (GtkWidget *widget,
GdkDragContext *drag_context,
SummaryView *summaryview)
-{
- if (prefs_common.layout_mode == SMALL_LAYOUT) {
- g_timeout_add(250, summary_return_to_list, summaryview);
- }
-}
+{}
static void summary_drag_data_get(GtkWidget *widget,
GdkDragContext *drag_context,
guint replied, forwarded, locked, ignored, watched;
static gboolean tips_initialized = FALSE;
- if (prefs_common.layout_mode != SMALL_LAYOUT) {
- if (tips_initialized) {
- summary_set_folder_pixmap(summaryview, STOCK_PIXMAP_DIR_OPEN);
- CLAWS_SET_TIP(summaryview->folder_pixmap_eventbox,
- NULL);
- tips_initialized = FALSE;
- }
+ if (!tips_initialized)
return;
- }
- folder_count_total_msgs(&new, &unread, &unreadmarked, &marked, &total,
- &replied, &forwarded, &locked, &ignored,
- &watched);
- if (removed_item) {
- total -= removed_item->total_msgs;
- new -= removed_item->new_msgs;
- unread -= removed_item->unread_msgs;
- }
-
- if (new > 0 || unread > 0) {
- tips_initialized = TRUE;
- summary_set_folder_pixmap(summaryview, STOCK_PIXMAP_DIR_OPEN_HRM);
- CLAWS_SET_TIP(summaryview->folder_pixmap_eventbox,
- _("Go back to the folder list (You have unread messages)"));
- } else {
- tips_initialized = TRUE;
- summary_set_folder_pixmap(summaryview, STOCK_PIXMAP_DIR_OPEN);
- CLAWS_SET_TIP(summaryview->folder_pixmap_eventbox,
- _("Go back to the folder list"));
- }
+ summary_set_folder_pixmap(summaryview, STOCK_PIXMAP_DIR_OPEN);
+ CLAWS_SET_TIP(summaryview->folder_pixmap_eventbox, NULL);
+ tips_initialized = FALSE;
}
static gboolean summary_update_folder_item_hook(gpointer source, gpointer data)