Jiri Svoboda Homepage
Navigation
Root page
    Personals
        My computer history
        My articles
    Flight Simulators
    CGS (paper computer)
    Atari (8-bit)
    x86
        Text games
        Rally
    iPAQ (Linuxed)
        Atari 800
        iMessage
    Java
        DK Mapa
    RC Models
    Links
    Tečkovací hra

Hosted on
vpsfree.cz

Powered by
Java

Associated with
hacker emblem

Censored?
cenzuruje váš poskytovatel připojení?

kinderporno.cz
...je to jen záminka.



Links
abclinuxu.cz

root.cz



iMessage
Note: This page is now marked as obsolete and is here for historical reasons only.

iMessage

iPAQ (and GTK+) specific xmessage replacement

iMessage program displays a window containing a message from a command line or standard input. On the bottom of the window is row of command line defined buttons. Clicking on any of these buttons will cause iMessage to exit. Which button was pressed is both returned in exit status and printed to standard output.
Returned value is 0 for first button, 1 for second button and so on... Window close button is equivalent to most right button (usually "Cancel" button).

Usage

iMessage message [button1] [button2] ...
if 'message' is '-', stdin is used

Note: With Matchbox window manager, you need Matchbox v0.2 or higher for no fullscreen window.

Examples

Invocation:
iMessage "just a message"
iMessage "Are you sure?" Yes No "I don't know"
ls -1p | iMessage -
lsmod | grep "ir" | iMessage -
cat foo.txt | iMessage - Yes No


Evaluation:
#!/bin/bash
iMessage "Delete foo.txt?" Yes No Rename
RETVAL=$?
case "$RETVAL" in
 0)
  rm -f foo.txt
  ;;
 2)
  mv -f foo.txt foo.txt.old
  ;;
esac
#end


iMessage "Would you like to do it?" Yes No | other_script_that_reads_from_stdin
iMessage "Would you like to do it?" Yes No > any_file


Versions

version 0.1
  • first (not public) release
  • thoughts about comaptibility with old xmessage - rejected
  • gtk_dialog_new() and gtk_label_new() used, sometimes ugly on iPAQ :-(

version 0.2
  • first public release
  • major rewrite of interface
  • gtk_window_new(GTK_WINDOW_DIALOG) now used instead of gtk_dialog_new()
  • gtk_scrolled_window_new() now used instead of gtk_label_new()


Download

Source code: iMessage.c
Binary package: imessage_0.2_arm.ipk


Screenshots


simple message
(iMessage "just a message")

more complicated message
(ls -1p | iMessage - More buttons possible too)


Links

Familiar Linux (Linux distribution for iPAQ handhelds)




created: April 13, 2002, last modification: April 13, 2002

Design based on VERSION 1.0 from oswd.org
Copyright ©1996-2010 Jiří Svoboda
e-mail address