Changeset 8034 for trunk/gtk/main.c


Ignore:
Timestamp:
Mar 5, 2009, 5:18:36 PM (13 years ago)
Author:
charles
Message:

(trunk gtk) minor tweaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/main.c

    r8026 r8034  
    3636#include <glib/gstdio.h>
    3737
    38 #include <gdk/gdk.h>
    39 #ifdef GDK_WINDOWING_X11
    40  #include <X11/Xatom.h>
    41  #include <gdk/gdkx.h>
    42 #endif
    43 
    4438#include <libtransmission/transmission.h>
    4539#include <libtransmission/rpcimpl.h>
     
    6660#include "ui.h"
    6761
    68 #include <libtransmission/transmission.h>
    69 #include <libtransmission/version.h>
    70 
    7162#define MY_NAME "transmission"
    7263
    73 /* interval in milliseconds to update the torrent list display */
    74 #define UPDATE_INTERVAL         1666
    75 
    76 /* interval in milliseconds to check for stopped torrents and update display */
    77 #define EXIT_CHECK_INTERVAL     500
     64#define REFRESH_INTERVAL_SECONDS 2
    7865
    7966#if GTK_CHECK_VERSION( 2, 8, 0 )
     
    353340    gboolean            startpaused = FALSE;
    354341    gboolean            startminimized = FALSE;
    355     char *              domain = MY_NAME;
     342    const char *        domain = MY_NAME;
    356343    char *              configDir = NULL;
    357344    tr_lockfile_state_t tr_state;
     
    389376    gerr = NULL;
    390377    if( !gtk_init_with_args( &argc, &argv, _( "[torrent files]" ), entries,
    391                              domain, &gerr ) )
     378                             (char*)domain, &gerr ) )
    392379    {
    393380        fprintf( stderr, "%s\n", gerr->message );
     
    613600
    614601    /* start model update timer */
    615     cbdata->timer = g_timeout_add( UPDATE_INTERVAL, updatemodel, cbdata );
     602    cbdata->timer = gtr_timeout_add_seconds( REFRESH_INTERVAL_SECONDS, updatemodel, cbdata );
    616603    updatemodel( cbdata );
    617604
     
    901888{
    902889    GtkTargetEntry targets[] = {
    903         { "STRING",          0, 0 },
    904         { "text/plain",      0, 0 },
    905         { "text/uri-list",   0, 0 },
     890        { (char*)"STRING",          0, 0 },
     891        { (char*)"text/plain",      0, 0 },
     892        { (char*)"text/uri-list",   0, 0 },
    906893    };
    907894
Note: See TracChangeset for help on using the changeset viewer.