aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorIain Holmes <ih@csd.abdn.ac.uk>2000-03-01 05:43:45 +0800
committeriholmes <iholmes@localhost>2000-03-01 05:43:45 +0800
commit2fa1ed250656c38c4ad72525dd13a030de4bf061 (patch)
tree6f64e8f2fa7f7a59e06cee0e2050668ac0b17161 /widgets
parent832150b0dda320f18f1aedf2da23d0b087cde748 (diff)
downloadgsoc2013-evolution-2fa1ed250656c38c4ad72525dd13a030de4bf061.tar.gz
gsoc2013-evolution-2fa1ed250656c38c4ad72525dd13a030de4bf061.tar.zst
gsoc2013-evolution-2fa1ed250656c38c4ad72525dd13a030de4bf061.zip
Don't show the tooltip if the text is being editted or isn't clipped.
2000-02-29 Iain Holmes <ih@csd.abdn.ac.uk> * widgets/e-text/e-text.c: Don't show the tooltip if the text is being editted or isn't clipped. Remove the tooltip when editting starts. * widgets/e-text/Makefile.am: Build the test program svn path=/trunk/; revision=1994
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-text/Makefile.am13
-rw-r--r--widgets/e-text/e-text.c21
-rw-r--r--widgets/text/e-text.c21
3 files changed, 49 insertions, 6 deletions
diff --git a/widgets/e-text/Makefile.am b/widgets/e-text/Makefile.am
index ec7795f283..d0ee56e5e1 100644
--- a/widgets/e-text/Makefile.am
+++ b/widgets/e-text/Makefile.am
@@ -11,3 +11,16 @@ libetext_a_SOURCES = \
e-text-event-processor.h \
e-text-event-processor-emacs-like.c \
e-text-event-processor-emacs-like.h
+
+noinst_PROGRAMS = \
+ e-text-test
+
+e_text_test_SOURCES = \
+ e-text-test.c
+
+e_text_test_LDADD = \
+ libetext.a \
+ $(EXTRA_GNOME_LIBS) \
+ $(top_builddir)/e-util/libeutil.la
+
+e_text_test_LDFLAGS = `gnome-config --libs gdk_pixbuf`
diff --git a/widgets/e-text/e-text.c b/widgets/e-text/e-text.c
index 8bb19728c1..daa607007e 100644
--- a/widgets/e-text/e-text.c
+++ b/widgets/e-text/e-text.c
@@ -1830,8 +1830,14 @@ _do_tooltip (gpointer data)
gint x, y, pointer_x, pointer_y, scr_w, scr_h, tip_w, tip_h;
int i;
+ if (text->editing)
+ return FALSE;
+
lines = text->lines;
+ if (lines->length <= lines->ellipsis_length)
+ return FALSE;
+
scr_w = gdk_screen_width ();
scr_h = gdk_screen_height ();
gdk_window_get_pointer (NULL, &pointer_x, &pointer_y, NULL);
@@ -1938,6 +1944,14 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
break;
case GDK_BUTTON_PRESS: /* Fall Through */
case GDK_BUTTON_RELEASE:
+ text->tooltip_count --;
+ if ( text->tooltip_count == 0 && text->clip) {
+ gtk_timeout_remove (text->tooltip_timeout);
+ if (text->tooltip_window) {
+ gtk_widget_destroy (text->tooltip_window);
+ text->tooltip_window = NULL;
+ }
+ }
if ((!text->editing)
&& text->editable
&& event->type == GDK_BUTTON_RELEASE
@@ -1991,9 +2005,10 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
}
break;
case GDK_ENTER_NOTIFY:
- if ( text->tooltip_count == 0 )
+ if ( text->tooltip_count == 0 && text->clip) {
text->tooltip_timeout = gtk_timeout_add (1000, _do_tooltip, text);
- text->tooltip_count ++;
+ text->tooltip_count ++;
+ }
text->pointer_in = TRUE;
if (text->editing) {
if ( text->default_cursor_shown ) {
@@ -2004,7 +2019,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
break;
case GDK_LEAVE_NOTIFY:
text->tooltip_count --;
- if ( text->tooltip_count == 0 ) {
+ if ( text->tooltip_count == 0 && text->clip) {
gtk_timeout_remove (text->tooltip_timeout);
if (text->tooltip_window) {
gtk_widget_destroy (text->tooltip_window);
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 8bb19728c1..daa607007e 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -1830,8 +1830,14 @@ _do_tooltip (gpointer data)
gint x, y, pointer_x, pointer_y, scr_w, scr_h, tip_w, tip_h;
int i;
+ if (text->editing)
+ return FALSE;
+
lines = text->lines;
+ if (lines->length <= lines->ellipsis_length)
+ return FALSE;
+
scr_w = gdk_screen_width ();
scr_h = gdk_screen_height ();
gdk_window_get_pointer (NULL, &pointer_x, &pointer_y, NULL);
@@ -1938,6 +1944,14 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
break;
case GDK_BUTTON_PRESS: /* Fall Through */
case GDK_BUTTON_RELEASE:
+ text->tooltip_count --;
+ if ( text->tooltip_count == 0 && text->clip) {
+ gtk_timeout_remove (text->tooltip_timeout);
+ if (text->tooltip_window) {
+ gtk_widget_destroy (text->tooltip_window);
+ text->tooltip_window = NULL;
+ }
+ }
if ((!text->editing)
&& text->editable
&& event->type == GDK_BUTTON_RELEASE
@@ -1991,9 +2005,10 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
}
break;
case GDK_ENTER_NOTIFY:
- if ( text->tooltip_count == 0 )
+ if ( text->tooltip_count == 0 && text->clip) {
text->tooltip_timeout = gtk_timeout_add (1000, _do_tooltip, text);
- text->tooltip_count ++;
+ text->tooltip_count ++;
+ }
text->pointer_in = TRUE;
if (text->editing) {
if ( text->default_cursor_shown ) {
@@ -2004,7 +2019,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
break;
case GDK_LEAVE_NOTIFY:
text->tooltip_count --;
- if ( text->tooltip_count == 0 ) {
+ if ( text->tooltip_count == 0 && text->clip) {
gtk_timeout_remove (text->tooltip_timeout);
if (text->tooltip_window) {
gtk_widget_destroy (text->tooltip_window);
15 +0800'>2011-12-254-10/+10 * . Update to tzupdater 1.3.45.glewis2011-12-254-10/+10 * Update to 1.6 release.ale2011-12-232-3/+3 * Update to 4.7 release and add a workaround for GUI hanging (java bug #7027598).ale2011-12-233-6/+6 * Update to 1.5.7 release.ale2011-12-232-3/+3 * - Point at the homepage consistently as defined by rubygems.orgpgollucci2011-12-201-1/+1 * - Update to 2.2.4nivit2011-12-133-23/+53 * . Fix bogus symlinks being installed as plugins rather than the actualglewis2011-12-082-1/+10 * - Update to b24. [1]jkim2011-12-013-17/+16 * Update to Update 29.jkim2011-12-016-12/+19 * . Update the build and install targets used to the current recommendations.glewis2011-11-272-1/+42 * - Update to 5.5miwi2011-11-222-3/+3 * Update to 1.1.4.jkim2011-11-092-3/+3 * Make compilation from source an option-- maven downloads extra files, thuscrees2011-11-072-7/+37 * Remove ports@ ports that have been DEPRECATED for at least 1 monthdougb2011-11-0210-651/+0 * USE_ZIP is needed on 7.4 or extract fails on 0-byte filescrees2011-11-021-0/+1 * audio/mp3butler Depends on audio/p5-MusicBrainz-Client which is DEPRECATEDdougb2011-11-0112-1091/+0 * - Update to 7.1 betagahr2011-10-273-7136/+7195 * - Update to 7.0.1gahr2011-10-273-18/+31 * - Update to 1.0.4wen2011-10-263-12/+26 * Remove more tags from pkg-descr files fo the form:dougb2011-10-2412-36/+0 * . Update to tzupdater 1.3.42.glewis2011-10-244-10/+10 * . Update to tzupdater 1.3.42.glewis2011-10-246-12/+16 * . Update to tzupdater 1.3.42.glewis2011-10-246-10/+14 * Remove expired port:rene2011-10-235-74/+0 * - Chase editors/emacs updateashish2011-10-171-1/+1 * - Update maintainer email addressswills2011-10-171-1/+1 * (1) Activate mod_dav_svn in "post-install" target, as it is not activatedlev2011-10-171-1/+1 * Update subversion to 1.7.0.lev2011-10-161-1/+4 * For ports that have an EXPIRATION_DATE which has already passed, butdougb2011-10-091-3/+3 * The Netty is an effort to provide an asynchronouspawel2011-10-024-0/+54 * Update to 1.1.3.jkim2011-09-292-3/+3 * - Add LDFLAGS to CONFIGURE_ENV and MAKE_ENV (as it was done with LDFLAGS)amdmi32011-09-246-8/+10 * Back to the futurebapt2011-09-231-1/+1 * Update email address for ports maintained by aldis@bsdroot.lv --> graudeejs@g...crees2011-09-171-1/+1 * Add rjb, Ruby Java Bridge via JNIarved2011-09-124-0/+30 * - set for deletion in a month, it's been a long time sine it disappeared fromitetcu2011-09-101-1/+3 * Chase editors/emacs updateashish2011-09-081-1/+1 * . Use dirrmtry on the lib/applet directory since the amd64 tarballs don'tglewis2011-09-052-2/+2 * Make portlint happy.jkim2011-09-011-5/+10 * Update to 1.1.2.jkim2011-09-012-3/+3 * . Update to the docs for 6 Update 25.glewis2011-08-292-5/+5 * Chase editors/emacs update.ashish2011-08-281-1/+1 * Fix portscout check.ale2011-08-231-1/+1 * . Update to tzupdater 1.3.40.glewis2011-08-222-5/+5 * . Update to tzupdater 1.3.40.glewis2011-08-222-5/+5 * . Update to tzupdater 1.3.40.glewis2011-08-228-20/+20 * . Remove jdk14-doc since jdk14 was removed 2011/06/28.glewis2011-08-154-56/+0 * Was too fast, add WANT_GNOME for these ports have optional USE_GNOME components.kwm2011-08-121-0/+1 * Remove USE_GNOME=gnometarget from ports. It has been a empty keyword sincekwm2011-08-121-1/+0 * - Add an additional patch to support i386 CPUs without CMOV instructionjkim2011-08-103-5/+185 * Java 1.3 has been deorbited.linimon2011-08-083-55/+0 * - fix typo that caused failure to installgahr2011-08-031-2/+2 * Remove WWW entries from unmaintained ports that return 404 or where the domainehaupt2011-08-031-2/+0 * Mark BROKEN: Does not fetchbapt2011-08-031-0/+2 * - make maven binary executablegahr2011-08-021-0/+4 * Update master_sitebapt2011-08-021-1/+1 * Deprecate unmaintained ports marked as BROKEN for more then 6 monthbapt2011-08-021-0/+3 * - Unbreakpav2011-07-282-9/+8 * - Mark BROKEN: does not packagepav2011-07-271-0/+2 * - Mark BROKEN: unfetchablepav2011-07-251-0/+2 * Remove Java 1.4 ports, they were already disconnected from bsd.java.mkrene2011-07-2110-3772/+0 * Remove broken, Java 1.4-only ports:rene2011-07-2112-1110/+0 * Remove expired ports:rene2011-07-2144-4330/+0 * Now that the Java 1.3 and Java 1.4 ports are deprecated and will expire soon,linimon2011-07-2163-89/+64 * Disconnect the following deprecated ports that only work with java1.4:linimon2011-07-211-1/+0 * . Chase re-rolled JAR file.glewis2011-07-171-2/+2 * . Fix the packing list by not installing efj.sh for now.glewis2011-07-151-9/+10 * . Install the actual files rather than symlinks.glewis2011-07-142-1/+10 * Remove expired ports:rene2011-07-1411-181/+0 * Specify JAVA_VERSION correctly to fix another build breakage.jkim2011-07-141-1/+3 * Replace "readlink -f" with realpath(1). This should fix "make test" onjkim2011-07-131-3/+5 * Fix various build and installation issues.jkim2011-07-133-17/+160 * Add LICENSE.jkim2011-07-121-0/+1 * Fix build with Rhino support.jkim2011-07-121-1/+2 * - Update to build 23.jkim2011-07-127-2163/+5079 * The IcedTea-Web project provides a Free Software web browser plugin runningjkim2011-07-125-0/+157 * . Add entries for the test distfiles.glewis2011-07-111-0/+4 * . Unbreak and update to 3.7.0.glewis2011-07-116-422/+1224 * . Try harder to make sure the flags returned from getFlags isn't negative,glewis2011-07-082-0/+18 * Mark BROKEN: does not buildrene2011-07-031-0/+1 * Upgrade to version 0.5 and fix WWW tag.olgeni2011-07-023-7/+8 * . Update to tzupdater 1.3.39.glewis2011-06-292-5/+5 * . Update to Build 147.glewis2011-06-293-641/+641 * These ports depend on deprecated Java 1.4, set them to expire in one month.rene2011-06-291-0/+3 * Mark deprecated and set expiration date to 2011-07-28rene2011-06-292-0/+6 * Remove expired port:rene2011-06-2923-2168/+0 * Ignore 1.46 (not backward compatible) version.ale2011-06-281-0/+2 * . Update to tzupdater 1.3.39.glewis2011-06-282-5/+5 * . Update to tzupdater 1.3.39.glewis2011-06-288-20/+20 * - Update to 2.6hq2011-06-28