talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit d0a49b7887a86e44df618c5268875cf85c0d861d
parent 70ec3f814ee4ffd16b9fb3540c9df486082a3e21
Author: paul <paul@claws-mail.org>
Date:   Fri, 22 May 2020 18:42:08 +0100

remove toolbar_detachable option

it breaks the toolbar

Diffstat:
Msrc/compose.c | 8++------
Msrc/mainwindow.c | 35++++-------------------------------
Msrc/messageview.c | 8++------
Msrc/mimeview.c | 2+-
Msrc/prefs_common.c | 6+++---
Msrc/prefs_common.h | 4++--
6 files changed, 14 insertions(+), 49 deletions(-)

diff --git a/src/compose.c b/src/compose.c @@ -1,6 +1,6 @@ /* * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2019 the Claws Mail team and Hiroyuki Yamamoto + * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -8002,11 +8002,7 @@ static Compose *compose_create(PrefsAccount *account, gtk_window_add_accel_group(GTK_WINDOW(window), gtk_ui_manager_get_accel_group(compose->ui_manager)); gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0); - if (prefs_common.toolbar_detachable) { - handlebox = gtk_handle_box_new(); - } else { - handlebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - } + handlebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0); gtk_widget_realize(handlebox); diff --git a/src/mainwindow.c b/src/mainwindow.c @@ -1,6 +1,6 @@ /* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - Copyright (C) 1999-2019 the Claws Mail team and Hiroyuki Yamamoto + Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -122,12 +122,6 @@ static void main_window_separation_change (MainWindow *mainwin, static void main_window_set_widgets (MainWindow *mainwin, LayoutType layout_mode); -static void toolbar_child_attached (GtkWidget *widget, - GtkWidget *child, - gpointer data); -static void toolbar_child_detached (GtkWidget *widget, - GtkWidget *child, - gpointer data); #ifndef GENERIC_UMPC static gboolean ac_label_button_pressed (GtkWidget *widget, GdkEventButton *event, @@ -1900,19 +1894,9 @@ MainWindow *main_window_create() gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0); - if (prefs_common.toolbar_detachable) { - handlebox = gtk_handle_box_new(); - gtk_widget_show(handlebox); - gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0); - g_signal_connect(G_OBJECT(handlebox), "child_attached", - G_CALLBACK(toolbar_child_attached), mainwin); - g_signal_connect(G_OBJECT(handlebox), "child_detached", - G_CALLBACK(toolbar_child_detached), mainwin); - } else { - handlebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - gtk_widget_show(handlebox); - gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0); - } + handlebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + gtk_widget_show(handlebox); + gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0); /* link window to mainwin->window to avoid gdk warnings */ mainwin->window = window; mainwin_list = g_list_append(mainwin_list, mainwin); @@ -3868,17 +3852,6 @@ void main_window_destroy_all(void) mainwin_list = NULL; } -static void toolbar_child_attached(GtkWidget *widget, GtkWidget *child, - gpointer data) -{ - gtk_widget_set_size_request(child, 1, -1); -} - -static void toolbar_child_detached(GtkWidget *widget, GtkWidget *child, - gpointer data) -{ - gtk_widget_set_size_request(child, -1, -1); -} #ifndef GENERIC_UMPC static gboolean ac_label_button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer data) diff --git a/src/messageview.c b/src/messageview.c @@ -1,6 +1,6 @@ /* * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2019 the Claws Mail team and Hiroyuki Yamamoto + * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -672,11 +672,7 @@ static void messageview_add_toolbar(MessageView *msgview, GtkWidget *window) cm_toggle_menu_set_active_full(msgview->ui_manager, "Menu/View/AllHeaders", prefs_common.show_all_headers); - if (prefs_common.toolbar_detachable) { - handlebox = gtk_handle_box_new(); - } else { - handlebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - } + handlebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0); gtk_widget_realize(handlebox); msgview->toolbar = toolbar_create(TOOLBAR_MSGVIEW, handlebox, diff --git a/src/mimeview.c b/src/mimeview.c @@ -2746,7 +2746,7 @@ static void icon_scroll_size_allocate_cb(GtkWidget *widget, gtk_layout_get_size(GTK_LAYOUT(mimeview->icon_scroll), &width, &height); gtk_layout_set_size(GTK_LAYOUT(mimeview->icon_scroll), - width, + MIN(grid_size.width, layout_size.width), MAX(grid_size.height, layout_size.height)); gtk_adjustment_set_step_increment(adj, 10); } diff --git a/src/prefs_common.c b/src/prefs_common.c @@ -1,6 +1,6 @@ /* * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2019 Hiroyuki Yamamoto and the Claws Mail team + * Copyright (C) 1999-2020 Hiroyuki Yamamoto and the Claws Mail team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -466,8 +466,6 @@ static PrefParam param[] = { {"toolbar_style", "1", &prefs_common.toolbar_style, P_ENUM, NULL, NULL, NULL}, #endif - {"toolbar_detachable", "FALSE", &prefs_common.toolbar_detachable, P_BOOL, - NULL, NULL, NULL}, {"show_col_headers", "TRUE", &prefs_common.show_col_headers, P_BOOL, NULL, NULL, NULL}, #ifndef GENERIC_UMPC @@ -934,6 +932,8 @@ static PrefParam param[] = { P_BOOL, NULL, NULL, NULL}, {"work_offline", "FALSE", &prefs_common.work_offline, P_BOOL, NULL, NULL, NULL}, + {"no_override_work_offline", "FALSE", &prefs_common.no_override_work_offline, P_BOOL, + NULL, NULL, NULL}, {"summary_quicksearch_type", "0", &prefs_common.summary_quicksearch_type, P_INT, NULL, NULL, NULL}, #ifndef GENERIC_UMPC diff --git a/src/prefs_common.h b/src/prefs_common.h @@ -1,6 +1,6 @@ /* * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2019 Hiroyuki Yamamoto and the Claws Mail team + * Copyright (C) 1999-20 Hiroyuki Yamamoto and the Claws Mail team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -278,7 +278,6 @@ struct _PrefsCommon gboolean goto_last_folder_on_startup; ToolbarStyle toolbar_style; - gboolean toolbar_detachable; gboolean show_statusbar; gboolean show_col_headers; @@ -466,6 +465,7 @@ struct _PrefsCommon /* boolean for work offline stored here for use in inc.c */ gboolean work_offline; + gboolean no_override_work_offline; gint summary_quicksearch_type; gint summary_quicksearch_sticky;