summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-10-09 10:30:38 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-10-09 10:30:38 +0000
commit6f2e10df9d18ef97163b3a765285a03739408cb1 (patch)
treed314b0f0526ce343f787dd9c4fe57894fa28f8ac
parent2a691e62f7c99888f68c032492e44a982c2a850f (diff)
downloadnautilus-6f2e10df9d18ef97163b3a765285a03739408cb1.tar.gz
Don't toggle the splitter when dragging (#555619) Patch from Christoph
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 svn path=/trunk/; revision=14711
-rw-r--r--ChangeLog8
-rw-r--r--libnautilus-private/nautilus-horizontal-splitter.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 8dfd19a81..aa814cad4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
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
+
+2008-10-09 Alexander Larsson <alexl@redhat.com>
+
* cut-n-paste-code/libegg/eggdesktopfile.c:
* cut-n-paste-code/libegg/eggdesktopfile.h:
* cut-n-paste-code/libegg/eggsmclient-xsmp.c:
diff --git a/libnautilus-private/nautilus-horizontal-splitter.c b/libnautilus-private/nautilus-horizontal-splitter.c
index f4abe86cf..d5ddd22f1 100644
--- a/libnautilus-private/nautilus-horizontal-splitter.c
+++ b/libnautilus-private/nautilus-horizontal-splitter.c
@@ -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 @@ struct NautilusHorizontalSplitterDetails {
#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 @@ nautilus_horizontal_splitter_button_press (GtkWidget *widget, GdkEventButton *ev
(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 @@ nautilus_horizontal_splitter_button_release (GtkWidget *widget, GdkEventButton *
{
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);