commit: Modeless Word Count for gtk.


Subject: commit: Modeless Word Count for gtk.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Thu May 25 2000 - 00:10:24 CDT


CVS:
----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: src/af/xap/xp/xap_Dlg_Insert_Symbol.cpp
CVS: src/af/xap/xp/xap_Dlg_Insert_Symbol.h
CVS: src/af/xap/xp/xap_String_Id.h
CVS: src/wp/ap/beos/ap_BeOSDialog_WordCount.h
CVS: src/wp/ap/qnx/ap_QNXDialog_WordCount.h
CVS: src/wp/ap/unix/ap_UnixDialog_WordCount.cpp
CVS: src/wp/ap/unix/ap_UnixDialog_WordCount.h
CVS: src/wp/ap/win/ap_Win32Dialog_WordCount.h
CVS: src/wp/ap/xp/ap_Dialog_WordCount.cpp
CVS: src/wp/ap/xp/ap_Dialog_WordCount.h
CVS: src/wp/ap/xp/ap_EditMethods.cpp src/wp/ap/xp/ap_String_Id.h
CVS:
----------------------------------------------------------------------

Modeles Word Count dialog for Unix. Other platforms should compile but all
will crash on invocing "Word Count". Significant new features include,
auto updating option, label of current document, automatic statistics
updates upon entering a frame.

I've tested that the gnome platform compiles but it crashes immediately
upon invoking "Word Count". I might be able to fix this myself but it will
require me understanding how the gnome front end is built on top of the
unix code. I guess I should learn this!

In writing this I discovered an interesting problem with the timer code.
At least in unix, the

timer->set(time_in_milliseconds)

actually executes a

gtk_timer_add(timer)

call. This means that if you do a timer.set() to an already running timer
you end up with two timers running. This is not good. To get around this
problem always do a

timer->stop()
timer->set(ime_in_milliseconds)

The timer->stop() removes the timer from the gtk list of timers. The
timer->set(... ) adds it with the new time interval.

Just a litle tip.

Enjoy the modeless wordCount.

Cheers

Martin

PS. Next is find/replace I think.



This archive was generated by hypermail 2b25 : Thu May 25 2000 - 00:10:31 CDT