Ticket #687: Transmission-HIG-for-details-dialog.diff

File Transmission-HIG-for-details-dialog.diff, 10.9 KB (added by LucaFerretti, 14 years ago)

The proposed patch

  • gtk/torrent-inspector.c

     
    721721    hig_workarea_add_row (t, &row, name, fr, NULL);
    722722
    723723  hig_workarea_add_section_divider (t, &row);
    724   hig_workarea_add_section_title (t, &row, _("Created By"));
     724  hig_workarea_add_section_title (t, &row, _("Created by"));
    725725  hig_workarea_add_section_spacer (t, row, 2);
    726726 
    727727    g_snprintf (name, sizeof(name), namefmt, _("Creator"));
     
    738738  hig_workarea_add_section_title (t, &row, _("Location"));
    739739  hig_workarea_add_section_spacer (t, row, 3);
    740740
    741     g_snprintf (name, sizeof(name), namefmt, _("Downloaded Data"));
     741    g_snprintf (name, sizeof(name), namefmt, _("Downloaded data"));
    742742    l = gtk_label_new (tr_torrentGetFolder (tor));
    743743    gtk_label_set_ellipsize( GTK_LABEL( l ), PANGO_ELLIPSIZE_END );
    744744    hig_workarea_add_row (t, &row, name, l, NULL);
    745745
    746     g_snprintf (name, sizeof(name), namefmt, _("Torrent File Path"));
     746    g_snprintf (name, sizeof(name), namefmt, _("Torrent file path"));
    747747    dname = g_path_get_dirname (info->torrent);
    748748    l = gtk_label_new ( dname );
    749749    gtk_label_set_ellipsize( GTK_LABEL( l ), PANGO_ELLIPSIZE_END );
    750750    hig_workarea_add_row (t, &row, name, l, NULL);
    751751    g_free (dname);
    752752
    753     g_snprintf (name, sizeof(name), namefmt, _("Torrent File Name"));
     753    g_snprintf (name, sizeof(name), namefmt, _("Torrent file name"));
    754754    bname = g_path_get_basename (info->torrent);
    755755    l = gtk_label_new (bname);
    756756    gtk_label_set_ellipsize( GTK_LABEL( l ), PANGO_ELLIPSIZE_END );
     
    874874    hig_workarea_add_row (t, &row, _("Ratio:"), l, NULL);
    875875
    876876    l = a->swarm_lb = gtk_label_new (NULL);
    877     hig_workarea_add_row (t, &row, _("Swarm Rate:"), l, NULL);
     877    hig_workarea_add_row (t, &row, _("Swarm rate:"), l, NULL);
    878878
    879879    l = a->err_lb = gtk_label_new (NULL);
    880880    hig_workarea_add_row (t, &row, _("Error:"), l, NULL);
     
    890890  hig_workarea_add_section_spacer (t, row, 3);
    891891
    892892    l = a->date_added_lb = gtk_label_new (NULL);
    893     hig_workarea_add_row (t, &row, _("Added:"), l, NULL);
     893    hig_workarea_add_row (t, &row, _("Date added:"), l, NULL);
    894894
    895895    l = a->last_activity_lb = gtk_label_new (NULL);
    896     hig_workarea_add_row (t, &row, _("Last Activity"), l, NULL);
     896    hig_workarea_add_row (t, &row, _("Last activity"), l, NULL);
    897897
    898898  hig_workarea_add_section_divider (t, &row);
    899899  hig_workarea_finish (t, &row);
     
    12741274   
    12751275    col = GTK_TREE_VIEW_COLUMN (g_object_new (GTK_TYPE_TREE_VIEW_COLUMN,
    12761276        "expand", TRUE,
    1277         "title", _("File"),
     1277    /* Translators: this is a column header in Files tab, Details dialog;
     1278       Don't include the prefix "filedetails|" in the translation. */                                 
     1279        "title", Q_("filedetails|File"),
    12781280        NULL));
    12791281    rend = gtk_cell_renderer_pixbuf_new();
    12801282    gtk_tree_view_column_pack_start( col, rend, FALSE );
     
    12871289    gtk_tree_view_append_column( GTK_TREE_VIEW( view ), col );
    12881290    /* add progress column */
    12891291    rend = gtk_cell_renderer_progress_new();
    1290     col = gtk_tree_view_column_new_with_attributes (
    1291       _("Progress"), rend, "value", FC_PROG, NULL);
     1292    /* Translators: this is a column header in Files tab, Details dialog;
     1293       Don't include the prefix "filedetails|" in the translation. */
     1294    col = gtk_tree_view_column_new_with_attributes (Q_("filedetails|Progress"),
     1295                                                    rend,
     1296                                                    "value", FC_PROG,
     1297                                                    NULL);
    12921298    gtk_tree_view_column_set_sort_column_id( col, FC_PROG );
    12931299    gtk_tree_view_append_column( GTK_TREE_VIEW( view ), col );
    12941300    /* set up view */
     
    13001306    col = gtk_tree_view_column_new ();
    13011307    gtk_tree_view_column_set_sort_column_id( col, FC_ENABLED );
    13021308    rend = enabled_rend = gtk_cell_renderer_toggle_new  ();
    1303     col = gtk_tree_view_column_new_with_attributes (_("Download"),
     1309    /* Translators: this is a column header in Files tab, Details dialog;
     1310       Don't include the prefix "filedetails|" in the translation.
     1311       Please note the items for this column are checkboxes (yes/no) */
     1312    col = gtk_tree_view_column_new_with_attributes (Q_("filedetails|Download"),
    13041313                                                    rend,
    13051314                                                    "active", FC_ENABLED,
    13061315                                                    NULL);
     
    13101319    model = priority_model_new ();
    13111320    col = gtk_tree_view_column_new ();
    13121321    gtk_tree_view_column_set_sort_column_id( col, FC_PRIORITY );
    1313     gtk_tree_view_column_set_title (col, _("Priority"));
     1322    /* Translators: this is a column header in Files tab, Details dialog;
     1323       Don't include the prefix "filedetails|" in the translation. */
     1324    gtk_tree_view_column_set_title (col, Q_("filedetails|Priority"));
    13141325    rend = priority_rend = gtk_cell_renderer_combo_new ();
    13151326    gtk_tree_view_column_pack_start (col, rend, TRUE);
    13161327    g_object_set (G_OBJECT(rend), "model", model,
     
    14371448  int i, row;
    14381449  gboolean b;
    14391450  GtkAdjustment *a;
    1440   GtkWidget *t, *w, *tb;
     1451  GtkWidget *t, *w, *tb, *hb, *mis;
    14411452  tr_torrent * tor = tr_torrent_handle (gtor);
    14421453
    14431454  row = 0;
     
    14451456  hig_workarea_add_section_title (t, &row, _("Speed Limits") );
    14461457  hig_workarea_add_section_spacer (t, row, 2);
    14471458
    1448     tb = gtk_check_button_new_with_mnemonic (_("Limit _Download Speed (KiB/s):"));
     1459    tb = gtk_check_button_new_with_mnemonic (_("Limit _download speed to:"));
    14491460    b = tr_torrentGetSpeedMode(tor,TR_DOWN) == TR_SPEEDLIMIT_SINGLE;
    14501461    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tb), b );
    14511462    g_signal_connect (tb, "toggled", G_CALLBACK(dl_speed_toggled_cb), gtor);
    14521463
    14531464    i = tr_torrentGetSpeedLimit( tor, TR_DOWN );
     1465    hb = gtk_hbox_new ( FALSE, 6 );
    14541466    a = (GtkAdjustment*) gtk_adjustment_new (i, 0.0, G_MAXDOUBLE, 1, 1, 1);
    14551467    w = gtk_spin_button_new (a, 1, 0);
    14561468    g_signal_connect (w, "value-changed", G_CALLBACK(dl_speed_spun_cb), gtor);
    14571469    g_signal_connect (tb, "toggled", G_CALLBACK(sensitize_from_check_cb), w);
    14581470    sensitize_from_check_cb (GTK_TOGGLE_BUTTON(tb), w);
    1459     hig_workarea_add_row_w (t, &row, tb, w, NULL);
     1471    gtk_box_pack_start ( GTK_BOX (hb), GTK_WIDGET (w), FALSE, TRUE, 0);
     1472    mis = gtk_label_new (_("kiB/s"));
     1473    gtk_box_pack_start ( GTK_BOX (hb), GTK_WIDGET (mis), FALSE, TRUE, 0);
     1474    hig_workarea_add_row_w (t, &row, tb, hb, NULL);
    14601475
    1461     tb = gtk_check_button_new_with_mnemonic (_("Limit _Upload Speed (KiB/s):"));
     1476    tb = gtk_check_button_new_with_mnemonic (_("Limit _upload speed to:"));
    14621477    b = tr_torrentGetSpeedMode(tor,TR_UP) == TR_SPEEDLIMIT_SINGLE;
    14631478    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tb), b );
    14641479    g_signal_connect (tb, "toggled", G_CALLBACK(ul_speed_toggled_cb), gtor);
    14651480
    14661481    i = tr_torrentGetSpeedLimit( tor, TR_UP );
     1482    hb = gtk_hbox_new ( FALSE, 6 );
    14671483    a = (GtkAdjustment*) gtk_adjustment_new (i, 0.0, G_MAXDOUBLE, 1, 1, 1);
    14681484    w = gtk_spin_button_new (a, 1, 0);
    14691485    g_signal_connect (w, "value-changed", G_CALLBACK(ul_speed_spun_cb), gtor);
    14701486    g_signal_connect (tb, "toggled", G_CALLBACK(sensitize_from_check_cb), w);
    14711487    sensitize_from_check_cb (GTK_TOGGLE_BUTTON(tb), w);
    1472     hig_workarea_add_row_w (t, &row, tb, w, NULL);
     1488    gtk_box_pack_start ( GTK_BOX (hb), GTK_WIDGET (w), FALSE, TRUE, 0);
     1489    mis = gtk_label_new (_("kiB/s"));
     1490    gtk_box_pack_start ( GTK_BOX (hb), GTK_WIDGET (mis), FALSE, TRUE, 0);   
     1491    hig_workarea_add_row_w (t, &row, tb, hb, NULL);
    14731492
    14741493  hig_workarea_add_section_divider (t, &row);
    14751494  hig_workarea_add_section_title (t, &row, _("Peer Connections"));
     
    14781497    maxConnectedPeers = tr_torrentGetMaxConnectedPeers( tor );
    14791498    w = gtk_spin_button_new_with_range( 1, 3000, 5 );
    14801499    gtk_spin_button_set_value( GTK_SPIN_BUTTON( w ), maxConnectedPeers );
    1481     hig_workarea_add_row( t, &row, _( "Maximum connected peers:" ), w, NULL );
     1500    hb = gtk_hbox_new ( FALSE, 6 );
     1501    gtk_box_pack_start ( GTK_BOX (hb), GTK_WIDGET (w), FALSE, TRUE, 0);
     1502    mis = gtk_label_new (_("peers"));
     1503    gtk_box_pack_start ( GTK_BOX (hb), GTK_WIDGET (mis), FALSE, TRUE, 0);   
     1504    hig_workarea_add_row( t, &row, _( "Connect at maximum to:" ), hb, NULL );
    14821505    g_signal_connect( w, "value-changed", G_CALLBACK( max_peers_spun_cb ), gtor );
    14831506
    14841507#if 0
    1485     tb = gtk_check_button_new_with_mnemonic (_("_Stop Seeding at Ratio:"));
     1508    tb = gtk_check_button_new_with_mnemonic (_("_Stop seeding at ratio:"));
    14861509    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tb), gtor->seeding_cap_enabled);
    14871510    g_signal_connect (tb, "toggled", G_CALLBACK(seeding_cap_toggled_cb), gtor);
    14881511    a = (GtkAdjustment*) gtk_adjustment_new (gtor->seeding_cap, 0.0, G_MAXDOUBLE, 1, 1, 1);
     
    15551578  gtk_window_set_role (GTK_WINDOW(d), "tr-info" );
    15561579  g_signal_connect (d, "response", G_CALLBACK (response_cb), gtor);
    15571580  gtk_dialog_set_has_separator( GTK_DIALOG( d ), FALSE );
     1581  gtk_container_set_border_width (GTK_CONTAINER (d), 5);
     1582  gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (d)->vbox), 2);
    15581583  g_object_weak_ref (G_OBJECT(gtor), torrent_destroyed, d);
     1584 
    15591585
    15601586  /* add the notebook */
    15611587  n = gtk_notebook_new ();
     1588  gtk_container_set_border_width ( GTK_CONTAINER ( n ), 5 );
    15621589
    15631590  w = activity_page_new (gtor);
    15641591  g_object_set_data (G_OBJECT(d), "activity-top", w);
    15651592  gtk_notebook_append_page (GTK_NOTEBOOK(n), w,
    1566                             gtk_label_new_with_mnemonic (_("_Activity")));
     1593                            gtk_label_new (_("Activity")));
    15671594
    15681595  w = peer_page_new (gtor);
    15691596  g_object_set_data (G_OBJECT(d), "peers-top", w);
    15701597  gtk_notebook_append_page (GTK_NOTEBOOK(n),  w,
    1571                             gtk_label_new_with_mnemonic (_("_Peers")));
     1598                            gtk_label_new (_("Peers")));
    15721599
    15731600  gtk_notebook_append_page (GTK_NOTEBOOK(n),
    15741601                            info_page_new (tor),
    1575                             gtk_label_new_with_mnemonic (_("_Info")));
     1602                            gtk_label_new (_("Info")));
    15761603
    15771604  w = file_page_new (gtor);
    15781605  g_object_set_data (G_OBJECT(d), "files-top", w);
    15791606  gtk_notebook_append_page (GTK_NOTEBOOK(n), w,
    1580                             gtk_label_new_with_mnemonic (_("_Files")));
     1607                            gtk_label_new (_("Files")));
    15811608
    15821609  w = options_page_new (gtor);
    15831610  g_object_set_data (G_OBJECT(d), "options-top", w);
    15841611  gtk_notebook_append_page (GTK_NOTEBOOK(n), w,
    1585                             gtk_label_new_with_mnemonic (_("_Options")));
     1612                            gtk_label_new (_("Options")));
    15861613
    15871614  gtk_box_pack_start_defaults (GTK_BOX(GTK_DIALOG(d)->vbox), n);
    15881615
  • gtk/hig.c

     
    5757
    5858        /* spacer to move the fields a little to the right of the name header */
    5959        w = gtk_alignment_new (0.0f, 0.0f, 0.0f, 0.0f);
    60         gtk_widget_set_size_request (w, 18u, 0u);
     60        gtk_widget_set_size_request (w, 12u, 0u);
    6161        gtk_table_attach (GTK_TABLE(table), w, 0, 1, row, row+items_in_section, 0, 0, 0, 0);
    6262
    6363        /* spacer between the controls and their labels */