nautilus r14711 - in trunk: . libnautilus-private
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r14711 - in trunk: . libnautilus-private
- Date: Thu, 9 Oct 2008 10:30:38 +0000 (UTC)
Author: alexl
Date: Thu Oct 9 10:30:38 2008
New Revision: 14711
URL: http://svn.gnome.org/viewvc/nautilus?rev=14711&view=rev
Log:
2008-10-09 Alexander Larsson <alexl redhat com>
* libnautilus-private/nautilus-horizontal-splitter.c:
(nautilus_horizontal_splitter_button_press):
(nautilus_horizontal_splitter_button_release):
Don't toggle the splitter when dragging (#555619)
Patch from Christoph Reiter
Modified:
trunk/ChangeLog
trunk/libnautilus-private/nautilus-horizontal-splitter.c
Modified: trunk/libnautilus-private/nautilus-horizontal-splitter.c
==============================================================================
--- trunk/libnautilus-private/nautilus-horizontal-splitter.c (original)
+++ trunk/libnautilus-private/nautilus-horizontal-splitter.c Thu Oct 9 10:30:38 2008
@@ -29,7 +29,6 @@
#include <stdlib.h>
struct NautilusHorizontalSplitterDetails {
- double press_x;
guint32 press_time;
int press_position;
int saved_size;
@@ -37,7 +36,7 @@
#define CLOSED_THRESHOLD 4
#define NOMINAL_SIZE 148
-#define SPLITTER_CLICK_SLOP 1
+#define SPLITTER_CLICK_SLOP 4
#define SPLITTER_CLICK_TIMEOUT 400
static void nautilus_horizontal_splitter_class_init (NautilusHorizontalSplitterClass *horizontal_splitter_class);
@@ -193,7 +192,6 @@
(GTK_WIDGET_CLASS, button_press_event, (widget, event));
if (result) {
- splitter->details->press_x = event->x;
splitter->details->press_time = event->time;
splitter->details->press_position = position;
}
@@ -207,14 +205,16 @@
{
gboolean result;
NautilusHorizontalSplitter *splitter;
- int delta, delta_time;
+ int position, delta, delta_time;
splitter = NAUTILUS_HORIZONTAL_SPLITTER (widget);
+ position = gtk_paned_get_position (GTK_PANED (widget));
+
result = EEL_CALL_PARENT_WITH_RETURN_VALUE
(GTK_WIDGET_CLASS, button_release_event, (widget, event));
if (result) {
- delta = abs (event->x - splitter->details->press_x);
+ delta = abs (position - splitter->details->press_position);
delta_time = event->time - splitter->details->press_time;
if (delta < SPLITTER_CLICK_SLOP && delta_time < SPLITTER_CLICK_TIMEOUT) {
nautilus_horizontal_splitter_toggle_position (splitter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]