Changeset 6559 for trunk/gtk/conf.c


Ignore:
Timestamp:
Aug 17, 2008, 12:39:26 PM (13 years ago)
Author:
muks
Message:

Don't show an error when transmission is run twice

Instead, present the main window. This commit also auto-generates
the dbus bindings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/conf.c

    r6166 r6559  
    7272/* errstr may be NULL, this might be called before GTK is initialized */
    7373static gboolean
    74 lockfile(const char * filename, char **errstr)
    75 {
    76     const int state = tr_lockfile( filename );
     74lockfile(const char * filename, tr_lockfile_state_t *tr_state, char **errstr)
     75{
     76    const tr_lockfile_state_t state = tr_lockfile( filename );
    7777    const gboolean success = state == TR_LOCKFILE_SUCCESS;
    7878
     
    9191    }
    9292
     93    if( tr_state != NULL)
     94        *tr_state = state;
     95
    9396    return success;
    9497}
     
    112115/* errstr may be NULL, this might be called before GTK is initialized */
    113116gboolean
    114 cf_lock( char ** errstr )
     117cf_lock( tr_lockfile_state_t *tr_state, char ** errstr )
    115118{
    116119    char * path = getLockFilename( );
    117     const gboolean didLock = lockfile( path, errstr );
     120    const gboolean didLock = lockfile( path, tr_state, errstr );
    118121    if( didLock )
    119122        gl_lockpath = g_strdup( path );
Note: See TracChangeset for help on using the changeset viewer.