Skip to content
  • Victor Nikulshin's avatar
    Call Ring ID accepted as command line argument · 167bbb6d
    Victor Nikulshin authored
    Allows gnome-ring to accept as the first command-line argument and
    automatically call a target RingID in the form of 'ring' URI scheme:
    "ring:[0-9a-z]{40}".
    
    It is possible to use filename and URI parsing capabilities of
    GTK applications to extract RingID from command-line argument
    if it is provided.
    
    This patch implements the 'open' hook of the GTK-application,
    as recommended by GTK documentation, to correctly communicate data
    between multiple running instance of the application. By doing this,
    the following behavior is achieved:
    
    1. If gnome-ring is not yet running and it is invoked with
    a command-line argument, a new application instance will be initialized
    and will start a new call at once.
    
    2. If gnome-ring is already running, the 'open' event with the RingID
    will be dispatched to the primary application instance and make it start
    a new call.
    
    = Testing the patch
    
    Apply the patch, recompile gnome-ring and execute it
    with the command-line argument in the Ring URI-scheme format:
    
    gnome-ring 'ring:0000000000000000000000000000000000000000'
    
    = Expected behaviour
    
    The main application window will appear and automatically start
    a call to the destination RingID.
    
    [GR: fix ci msg line lenght (limit to 72)]
    [GR: fix naked raw ptr and build warnings]
    
    Change-Id: I109f118fb4765e764dc399486091e456ef19117e
    Tuleap: #1539
    167bbb6d