[Commits] [SCM] claws branch, master, updated. 3.14.1-108-g0b238a2
wwp at claws-mail.org
wwp at claws-mail.org
Tue Jan 10 09:34:40 CET 2017
The branch, master has been updated
via 0b238a22d6a19f34672bc8a7efb66e171398acad (commit)
from e3cd98f9f35659223f166886529e5e8a679390a1 (commit)
Summary of changes:
src/plugins/vcalendar/month-view.c | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
- Log -----------------------------------------------------------------
commit 0b238a22d6a19f34672bc8a7efb66e171398acad
Author: wwp <wwp at free.fr>
Date: Tue Jan 10 09:31:34 2017 +0100
Don't behave as if avail_d was not hardcoded, it is hardcoded
to 7, and do it properly.
Saves us a warning and solves Coverity #1372366.
diff --git a/src/plugins/vcalendar/month-view.c b/src/plugins/vcalendar/month-view.c
index b859252..430f6e7 100644
--- a/src/plugins/vcalendar/month-view.c
+++ b/src/plugins/vcalendar/month-view.c
@@ -815,32 +815,31 @@ static void build_month_view_table(month_win *mw)
GtkWidget *vp;
time_t t = time(NULL);
GtkWidget *arrow;
- int avail_w = 0, avail_d = 0;
+ int avail_w = 0, avail_d = 7;
int avail_h = 0;
int weekoffset = -1;
GDate *date;
- int first_week=0;
+ int first_week = 0;
if (mainwindow_get_mainwindow()) {
- GtkAllocation allocation;
- SummaryView *summaryview = mainwindow_get_mainwindow()->summaryview;
- GTK_EVENTS_FLUSH();
- allocation = summaryview->mainwidget_book->allocation;
-
- avail_w = allocation.width - 25 - 2*(mw->hour_req.width);
- avail_h = allocation.height - 20;
- if (avail_h < 250)
- avail_h = 250;
- avail_d = avail_w / mw->StartDate_button_req.width;
- }
- avail_d = 7;
+ GtkAllocation allocation;
+ SummaryView *summaryview = mainwindow_get_mainwindow()->summaryview;
+ GTK_EVENTS_FLUSH();
+ allocation = summaryview->mainwidget_book->allocation;
+
+ avail_w = allocation.width - 25 - 2*(mw->hour_req.width);
+ avail_h = allocation.height - 20;
+ if (avail_h < 250)
+ avail_h = 250;
+ /* avail_d = avail_w / mw->StartDate_button_req.width; */
+ }
+
gtk_widget_set_size_request(mw->StartDate_button, avail_w / avail_d,
(avail_h)/6);
gtk_widget_size_request(mw->StartDate_button, &mw->StartDate_button_req);
/* initial values */
- if (avail_d)
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(mw->day_spin), avail_d);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(mw->day_spin), avail_d);
#ifdef G_OS_WIN32
if (t < 0)
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list