Changeset 6795 for trunk/gtk/notify.c


Ignore:
Timestamp:
Sep 23, 2008, 7:11:04 PM (13 years ago)
Author:
charles
Message:

run libT, cli, daemon, gtk through the source-code formatter "uncrustify" as promised/threatened

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/notify.c

    r6620 r6795  
    44 * This file is licensed by the GPL version 2.  Works owned by the
    55 * Transmission project are granted a special exemption to clause 2(b)
    6  * so that the bulk of its code can remain under the MIT license. 
     6 * so that the bulk of its code can remain under the MIT license.
    77 * This exemption does not extend to derived works not owned by
    88 * the Transmission project.
    9  * 
     9 *
    1010 * $Id$
    1111 */
     
    1313#include <string.h>
    1414#ifdef HAVE_GIO
    15 #include <gio/gio.h>
     15 #include <gio/gio.h>
    1616#endif
    1717#include <glib/gi18n.h>
     
    2121#ifndef HAVE_LIBNOTIFY
    2222
    23 void tr_notify_init( void ) { }
    24 void tr_notify_send( TrTorrent * tor UNUSED ) { }
     23void
     24tr_notify_init( void ) { }
     25void
     26tr_notify_send( TrTorrent * tor UNUSED ) { }
    2527
    2628#else
    27 #include <libnotify/notify.h>
     29 #include <libnotify/notify.h>
    2830
    2931void
     
    3537static void
    3638notifyCallback( NotifyNotification * n UNUSED,
    37                 const char         * action,
    38                 gpointer             gdata )
     39                const char *          action,
     40                gpointer               gdata )
    3941{
    4042    TrTorrent * gtor = TR_TORRENT( gdata );
     
    4648    else if( !strcmp( action, "file" ) )
    4749    {
    48         tr_torrent * tor = tr_torrent_handle( gtor );
     50        tr_torrent *    tor = tr_torrent_handle( gtor );
    4951        const tr_info * info = tr_torrent_info( gtor );
    50         char * path = g_build_filename( tr_torrentGetDownloadDir(tor), info->files[0].name, NULL );
     52        char *          path =
     53            g_build_filename( tr_torrentGetDownloadDir(
     54                                  tor ), info->files[0].name, NULL );
    5155        gtr_open_file( path );
    5256        g_free( path );
     
    5559
    5660void
    57 tr_notify_send(TrTorrent *tor)
    58 {
    59     const tr_info * info = tr_torrent_info( tor );
    60     NotifyNotification * n = notify_notification_new( _( "Torrent Complete" ), info->name, "transmission", NULL );
    61  
    62     if (info->fileCount == 1)
     61tr_notify_send( TrTorrent *tor )
     62{
     63    const tr_info *      info = tr_torrent_info( tor );
     64    NotifyNotification * n = notify_notification_new( _(
     65                                                          "Torrent Complete" ),
     66                                                      info->name,
     67                                                      "transmission", NULL );
     68
     69    if( info->fileCount == 1 )
    6370        notify_notification_add_action( n, "file", _( "Open File" ),
    64                                         NOTIFY_ACTION_CALLBACK(notifyCallback), tor, NULL);
     71                                        NOTIFY_ACTION_CALLBACK(
     72                                            notifyCallback ), tor, NULL );
    6573    notify_notification_add_action( n, "folder", _( "Open Folder" ),
    66                                     NOTIFY_ACTION_CALLBACK(notifyCallback), tor, NULL );
    67     notify_notification_show( n, NULL );
     74                                    NOTIFY_ACTION_CALLBACK(
     75                                        notifyCallback ), tor, NULL );
     76    notify_notification_show( n, NULL );
    6877}
    6978
Note: See TracChangeset for help on using the changeset viewer.