Changeset 5050
- Timestamp:
- Feb 16, 2008, 7:36:07 PM (14 years ago)
- Location:
- trunk/gtk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/torrent-cell-renderer.c
r5048 r5050 20 20 #include "tr_torrent.h" 21 21 #include "util.h" 22 23 /* #define TEST_RTL */ 22 24 23 25 enum … … 516 518 { 517 519 TorrentCellRenderer * self = TORRENT_CELL_RENDERER( cell ); 520 521 #ifdef TEST_RTL 522 GtkTextDirection real_dir = gtk_widget_get_direction( widget ); 523 gtk_widget_set_direction( widget, GTK_TEXT_DIR_RTL ); 524 #endif 525 518 526 if( self && self->priv->tor ) 519 527 { … … 650 658 } 651 659 } 660 661 #ifdef TEST_RTL 662 gtk_widget_set_direction( widget, real_dir ); 663 #endif 652 664 } 653 665 -
trunk/gtk/torrent-inspector.c
r5036 r5050 64 64 65 65 static gboolean 66 refresh_pieces (GtkWidget * da, GdkEventExpose * event UNUSED, gpointer gtor)66 refresh_pieces( GtkWidget * da, GdkEventExpose * event UNUSED, gpointer gtor ) 67 67 { 68 68 tr_torrent * tor = tr_torrent_handle( TR_TORRENT(gtor) ); … … 80 80 const int piece_w_int = (int) (piece_w + 1); /* pad for roundoff */ 81 81 const int piece_h_int = (int) (piece_h + 1); /* pad for roundoff */ 82 const gboolean rtl = gtk_widget_get_direction( da ) == GTK_TEXT_DIR_RTL; 83 82 84 guint8 * prev_color = NULL; 83 85 gboolean first_time = FALSE; … … 158 160 for (y=0; y<n_rows; ++y) { 159 161 for (x=0; x<n_cols; ++x) { 160 constint draw_x = grid_bounds.x + (int)(x * piece_w);161 constint draw_y = grid_bounds.y + (int)(y * piece_h);162 int draw_x = grid_bounds.x + (int)(x * piece_w); 163 int draw_y = grid_bounds.y + (int)(y * piece_h); 162 164 int color = BLACK; 163 165 int border = BLACK; 166 167 if( rtl ) 168 draw_x = grid_bounds.x + grid_bounds.width - (int)((x+1) * piece_w); 169 else 170 draw_x = grid_bounds.x + (int)(x * piece_w); 171 draw_y = grid_bounds.y + (int)(y * piece_h); 164 172 165 173 if (i < n_cells)
Note: See TracChangeset
for help on using the changeset viewer.