aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2008-10-10 20:59:06 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2008-10-10 20:59:06 +0800
commit13d7c4e4cbb16663b23122d148dd8e814c49898e (patch)
treee459fb0a9b293477953c30e220a0ed8ae4b5c5f2 /widgets
parent17e15ca1bb0be832e31d8ae4cc818fd1cb03b951 (diff)
downloadgsoc2013-evolution-13d7c4e4cbb16663b23122d148dd8e814c49898e.tar.gz
gsoc2013-evolution-13d7c4e4cbb16663b23122d148dd8e814c49898e.tar.zst
gsoc2013-evolution-13d7c4e4cbb16663b23122d148dd8e814c49898e.zip
License changes
svn path=/trunk/; revision=36591
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/ChangeLog6
-rw-r--r--widgets/misc/e-reflow.c50
2 files changed, 26 insertions, 30 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 57e1d25b7a..4919624bf7 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-10 Sankar P <psankar@novell.com>
+
+License Changes + code cleanup
+
+ * e-reflow.c (e_reflow_event), (e_reflow_init):
+
2008-10-01 Milan Crha <mcrha@redhat.com>
** Part of fix for bug #554418
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c
index 2a2725c4ef..4e4587d3e5 100644
--- a/widgets/misc/e-reflow.c
+++ b/widgets/misc/e-reflow.c
@@ -1,26 +1,24 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * e-reflow.c
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
- * Authors:
- * Chris Lahey <clahey@ximian.com>
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License, version 2, as published by the Free Software Foundation.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
*
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
*
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * Authors:
+ * Chris Lahey <clahey@ximian.com>
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*/
-
#include <config.h>
#include <math.h>
@@ -956,14 +954,12 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
case 1:
{
GdkEventButton *button = (GdkEventButton *) event;
- double n_x, max_x;
+ double n_x;
n_x = button->x;
n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH;
n_x = fmod(n_x,(reflow->column_width + E_REFLOW_FULL_GUTTER));
- max_x = E_REFLOW_BORDER_WIDTH;
- max_x += (reflow->column_width + E_REFLOW_FULL_GUTTER) * reflow->column_count;
- if ( button->y >= E_REFLOW_BORDER_WIDTH && button->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER && max_x > button->x ) {
+ if ( button->y >= E_REFLOW_BORDER_WIDTH && button->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER ) {
/* don't allow to drag the first line*/
if (e_reflow_pick_line(reflow, button->x) == 0)
return TRUE;
@@ -1047,16 +1043,13 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
return TRUE;
} else {
GdkEventMotion *motion = (GdkEventMotion *) event;
- double n_x, max_x;
+ double n_x;
n_x = motion->x;
n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH;
n_x = fmod(n_x,(reflow->column_width + E_REFLOW_FULL_GUTTER));
- max_x = E_REFLOW_BORDER_WIDTH;
- max_x += (reflow->column_width + E_REFLOW_FULL_GUTTER) * reflow->column_count;
-
- if ( motion->y >= E_REFLOW_BORDER_WIDTH && motion->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER && max_x > motion->x) {
+ if ( motion->y >= E_REFLOW_BORDER_WIDTH && motion->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER ) {
if ( reflow->default_cursor_shown ) {
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, reflow->arrow_cursor);
reflow->default_cursor_shown = FALSE;
@@ -1072,14 +1065,12 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
case GDK_ENTER_NOTIFY:
if (!reflow->column_drag) {
GdkEventCrossing *crossing = (GdkEventCrossing *) event;
- double n_x, max_x;
+ double n_x;
n_x = crossing->x;
n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH;
n_x = fmod(n_x,(reflow->column_width + E_REFLOW_FULL_GUTTER));
- max_x = E_REFLOW_BORDER_WIDTH;
- max_x += (reflow->column_width + E_REFLOW_FULL_GUTTER) * reflow->column_count;
- if ( crossing->y >= E_REFLOW_BORDER_WIDTH && crossing->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER && max_x > crossing->x) {
+ if ( crossing->y >= E_REFLOW_BORDER_WIDTH && crossing->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER ) {
if ( reflow->default_cursor_shown ) {
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, reflow->arrow_cursor);
reflow->default_cursor_shown = FALSE;
@@ -1542,4 +1533,3 @@ e_reflow_init (EReflow *reflow)
e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(reflow), e_reflow_reflow);
}
-