Changeset 5496


Ignore:
Timestamp:
Apr 3, 2008, 2:11:15 AM (14 years ago)
Author:
charles
Message:

(gtk) "open torrent" --> "add torrent"

Location:
trunk
Files:
6 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/gtk/Makefile.am

    r5318 r5496  
    1616noinst_HEADERS = \
    1717    actions.h \
     18    add-dialog.h \
    1819    conf.h \
    1920    details.h \
     
    2728    msgwin.h \
    2829    notify.h \
    29     open-dialog.h \
    3030    stats.h \
    3131    sexy-icon-entry.h \
     
    4444transmission_SOURCES = \
    4545    actions.c \
     46    add-dialog.c \
    4647    conf.c \
    4748    details.c \
     
    5455    msgwin.c \
    5556    notify.c \
    56     open-dialog.c \
    5757    sexy-icon-entry.c \
    5858    stats.c \
  • trunk/gtk/actions.c

    r5442 r5496  
    100100  { "edit-menu", NULL, N_("_Edit"), NULL, NULL, NULL },
    101101  { "help-menu", NULL, N_("_Help"), NULL, NULL, NULL },
    102   { "open-torrent-toolbar", GTK_STOCK_OPEN, NULL, NULL, N_("Open a torrent"), G_CALLBACK(action_cb) },
    103   { "open-torrent-menu", GTK_STOCK_OPEN, N_("_Open..."), NULL, N_("Open a torrent"), G_CALLBACK(action_cb) },
     102  { "add-torrent-toolbar", GTK_STOCK_ADD, NULL, NULL, N_("Add a torrent"), G_CALLBACK(action_cb) },
     103  { "add-torrent-menu", GTK_STOCK_ADD, N_("_Add..."), NULL, N_("Add a torrent"), G_CALLBACK(action_cb) },
    104104  { "start-torrent", GTK_STOCK_MEDIA_PLAY,
    105105    N_("_Start"), "<control>S", N_("Start torrent"), G_CALLBACK(action_cb) },
  • trunk/gtk/add-dialog.c

    r5492 r5496  
    1313#include <glib/gi18n.h>
    1414#include <gtk/gtk.h>
     15#include "add-dialog.h"
    1516#include "conf.h"
    1617#include "file-list.h"
    1718#include "hig.h"
    18 #include "open-dialog.h"
    1919#include "tr-prefs.h"
    2020
    21 struct OpenData
     21struct AddData
    2222{
    2323    TrCore * core;
     
    3232
    3333static void
    34 deleteOldTorrent( struct OpenData * data )
     34deleteOldTorrent( struct AddData * data )
    3535{
    3636    if( data->gtor )
     
    4545
    4646static void
    47 openResponseCB( GtkDialog * dialog, gint response, gpointer gdata )
    48 {
    49     struct OpenData * data = gdata;
     47addResponseCB( GtkDialog * dialog, gint response, gpointer gdata )
     48{
     49    struct AddData * data = gdata;
    5050
    5151    if( data->gtor )
     
    7070
    7171static void
    72 updateTorrent( struct OpenData * o )
     72updateTorrent( struct AddData * o )
    7373{
    7474    if( o->gtor )
     
    8181sourceChanged( GtkFileChooserButton * b, gpointer gdata )
    8282{
    83     struct OpenData * data = gdata;
     83    struct AddData * data = gdata;
    8484
    8585    deleteOldTorrent( data );
     
    107107verifyRequested( GtkButton * button UNUSED, gpointer gdata )
    108108{
    109     struct OpenData * data = gdata;
     109    struct AddData * data = gdata;
    110110    if( data->gtor )
    111111        tr_torrentVerify( tr_torrent_handle( data->gtor ) );
     
    115115destinationChanged( GtkFileChooserButton * b, gpointer gdata )
    116116{
    117     struct OpenData * data = gdata;
     117    struct AddData * data = gdata;
    118118
    119119    g_free( data->destination );
     
    145145
    146146GtkWidget*
    147 openSingleTorrentDialog( GtkWindow  * parent,
    148                          TrCore     * core,
    149                          tr_ctor    * ctor )
     147addSingleTorrentDialog( GtkWindow  * parent,
     148                        TrCore     * core,
     149                        tr_ctor    * ctor )
    150150{
    151151    int row;
     
    156156    GtkWidget * t;
    157157    GtkWidget * l;
    158     struct OpenData * data;
     158    struct AddData * data;
    159159    uint8_t flag;
    160160
     
    163163            GTK_DIALOG_DESTROY_WITH_PARENT|GTK_DIALOG_NO_SEPARATOR,
    164164            GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
    165             GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
     165            GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT,
    166166            NULL );
    167167    gtk_dialog_set_default_response( GTK_DIALOG( d ),
     
    175175        g_assert_not_reached( );
    176176
    177     data = g_new0( struct OpenData, 1 );
     177    data = g_new0( struct AddData, 1 );
    178178    data->core = core;
    179179    data->ctor = ctor;
     
    182182    data->list = file_list_new( NULL );
    183183    data->trash_check = gtk_check_button_new_with_mnemonic( _( "Mo_ve source file to Trash" ) );
    184     data->run_check = gtk_check_button_new_with_mnemonic( _( "_Start when opened" ) );
     184    data->run_check = gtk_check_button_new_with_mnemonic( _( "_Start when added" ) );
    185185
    186186    g_signal_connect( G_OBJECT( d ), "response",
    187                       G_CALLBACK( openResponseCB ), data );
     187                      G_CALLBACK( addResponseCB ), data );
    188188
    189189    t = gtk_table_new( 6, 2, FALSE );
     
    282282
    283283GtkWidget*
    284 openDialog( GtkWindow * parent,
    285             TrCore    * core )
     284addDialog( GtkWindow * parent,
     285           TrCore    * core )
    286286{
    287287    GtkWidget * w;
     
    292292                                     GTK_FILE_CHOOSER_ACTION_OPEN,
    293293                                     GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
    294                                      GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
     294                                     GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT,
    295295                                     NULL );
    296296    gtk_dialog_set_alternative_button_order( GTK_DIALOG( w ),
  • trunk/gtk/add-dialog.h

    r5492 r5496  
    1111 */
    1212
    13 #ifndef TR_GTK_OPEN_DIALOG_H
    14 #define TR_GTK_OPEN_DIALOG_H
     13#ifndef TR_GTK_ADD_DIALOG_H
     14#define TR_GTK_ADD_DIALOG_H
    1515
    1616#include <gtk/gtkwindow.h>
     
    1818
    1919/* This dialog assumes ownership of the ctor */
    20 GtkWidget* openSingleTorrentDialog( GtkWindow  * parent,
    21                                     TrCore     * core,
    22                                     tr_ctor    * ctor );
     20GtkWidget* addSingleTorrentDialog( GtkWindow  * parent,
     21                                   TrCore     * core,
     22                                   tr_ctor    * ctor );
    2323
    24 GtkWidget* openDialog( GtkWindow * parent,
    25                        TrCore    * core );
     24GtkWidget* addDialog( GtkWindow * parent,
     25                      TrCore    * core );
    2626
    27 #endif /* TR_GTK_OPEN_DIALOG */
     27#endif /* TR_GTK_ADD_DIALOG */
  • trunk/gtk/main.c

    r5333 r5496  
    4242
    4343#include "actions.h"
     44#include "add-dialog.h"
    4445#include "conf.h"
    4546#include "details.h"
     
    5051#include "msgwin.h"
    5152#include "notify.h"
    52 #include "open-dialog.h"
    5353#include "stats.h"
    5454#include "tr-core.h"
     
    781781{
    782782    struct cbdata * cbdata = gdata;
    783     GtkWidget * w = openSingleTorrentDialog( cbdata->wind, core, ctor );
     783    GtkWidget * w = addSingleTorrentDialog( cbdata->wind, core, ctor );
    784784#if GTK_CHECK_VERSION(2,8,0)
    785785    g_signal_connect( w, "focus-in-event", G_CALLBACK(on_main_window_focus_in),  cbdata );
     
    10101010    gboolean changed = FALSE;
    10111011
    1012     if ( !strcmp (action_name, "open-torrent-menu") || !strcmp( action_name, "open-torrent-toolbar" ))
    1013     {
    1014         openDialog( data->wind, data->core );
     1012    if ( !strcmp (action_name, "add-torrent-menu") ||
     1013         !strcmp( action_name, "add-torrent-toolbar" ))
     1014    {
     1015        addDialog( data->wind, data->core );
    10151016    }
    10161017    else if (!strcmp (action_name, "show-stats"))
  • trunk/gtk/tr-prefs.c

    r5484 r5496  
    231231
    232232    t = hig_workarea_create( );
    233     hig_workarea_add_section_title( t, &row, _( "Opening Torrents" ) );
     233    hig_workarea_add_section_title( t, &row, _( "Adding Torrents" ) );
    234234
    235235#ifdef HAVE_GIO
     
    246246        hig_workarea_add_wide_control( t, &row, w );
    247247
    248         s = _( "_Start when opened" );
     248        s = _( "_Start when added" );
    249249        w = new_check_button( s, PREF_KEY_START, core );
    250250        hig_workarea_add_wide_control( t, &row, w );
  • trunk/gtk/ui.h

    r5314 r5496  
    33"  <menubar name='main-window-menu'>\n"
    44"    <menu action='torrent-menu'>\n"
    5 "      <menuitem action='open-torrent-menu'/>\n"
     5"      <menuitem action='add-torrent-menu'/>\n"
    66"      <menuitem action='new-torrent'/>\n"
    77"      <separator/>\n"
     
    4747"\n"
    4848"  <toolbar name='main-window-toolbar'>\n"
    49 "    <toolitem action='open-torrent-toolbar'/>\n"
     49"    <toolitem action='add-torrent-toolbar'/>\n"
    5050"    <toolitem action='start-torrent'/>\n"
    5151"    <toolitem action='pause-torrent'/>\n"
     
    6868"\n"
    6969"  <popup name='icon-popup'>\n"
    70 "    <menuitem action='open-torrent-menu'/>\n"
     70"    <menuitem action='add-torrent-menu'/>\n"
    7171"    <separator/>\n"
    7272"    <menuitem action='toggle-main-window'/>\n"
  • trunk/po/POTFILES.in

    r5430 r5496  
    11[encoding: UTF-8]
    22gtk/actions.c
     3gtk/add-dialog.c
    34gtk/conf.c
    45gtk/details.c
     
    1112gtk/msgwin.c
    1213gtk/notify.c
    13 gtk/open-dialog.c
    1414gtk/sexy-icon-entry.c
    1515gtk/stats.c
Note: See TracChangeset for help on using the changeset viewer.