jed-users mailing list

[2002 Date Index] [2002 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

wJed patch


Hi there!

I made some changes to 'wterm.c'. These changes keep only one instance of wJed
active. The reason I did this was (IMHO) the annoyance of having a new instance
of wJed open every time I open a text file from Explorer.

One thing I couldn't get to work fully in this patch: how to bring wJed to the
foreground. It isn't easy in Win2000 as MS changed the SetForegroundWindow()
behaviour. I can get wJed to pop-up when browsing for files with Explorer,
but when launching from command line the darn system just flashes wJed on
the taskbar but it won't pop up.

Design of the changes:
msw_init_term() looks for windows of the wjed-window class. If none are found,
the default init_application/init_instance is called. If one is found, the new
instance creates a shared memory area into which command-line arguments (file 
names) are copied, apart from command-line options. Then the new instance sends
a custom message to the first instance containing the size of data in the shared
memory area. The first instance then reads the file names from the shared memory,
opens those files, and brings the window to front.

--
jussi
 

Attachment: wterm.patch
Description: wterm.patch


[2002 date index] [2002 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]