(trunk gtk) the row and col arguments passed to gtk_table_attach() should be guint. we were using "int" in several places.

This commit is contained in:
Jordan Lee 2011-08-13 21:08:53 +00:00
parent c00b97169c
commit b5de483362
8 changed files with 69 additions and 87 deletions

View File

@ -468,7 +468,7 @@ idle_combo_new( void )
static GtkWidget*
options_page_new( struct DetailsImpl * d )
{
int row;
guint row;
gulong tag;
char buf[128];
GtkWidget *t, *w, *tb, *h;
@ -925,7 +925,7 @@ refreshInfo( struct DetailsImpl * di, tr_torrent ** torrents, int n )
static GtkWidget*
info_page_new( struct DetailsImpl * di )
{
int row = 0;
guint row = 0;
GtkTextBuffer * b;
GtkWidget *l, *w, *fr, *sw;
GtkWidget *t = hig_workarea_create( );
@ -2190,7 +2190,7 @@ on_edit_trackers( GtkButton * button, gpointer data )
if( tor != NULL )
{
int row;
guint row;
GtkWidget *w, *d, *fr, *t, *l, *sw;
GtkWindow * win = GTK_WINDOW( gtk_widget_get_toplevel( GTK_WIDGET( button ) ) );
GString * gstr = di->gstr; /* buffer for temporary strings */
@ -2301,7 +2301,7 @@ on_tracker_list_add_button_clicked( GtkButton * button UNUSED, gpointer gdi )
if( tor != NULL )
{
int row;
guint row;
GtkWidget * e;
GtkWidget * t;
GtkWidget * w;

View File

@ -25,8 +25,7 @@ hig_workarea_create( void )
}
void
hig_workarea_add_section_divider( GtkWidget * t,
int * row )
hig_workarea_add_section_divider( GtkWidget * t, guint * row )
{
GtkWidget * w = gtk_alignment_new( 0.0f, 0.0f, 0.0f, 0.0f );
@ -36,20 +35,16 @@ hig_workarea_add_section_divider( GtkWidget * t,
}
void
hig_workarea_add_section_title_widget( GtkWidget * t,
int * row,
GtkWidget * w )
hig_workarea_add_section_title_widget( GtkWidget * t, guint * row, GtkWidget * w )
{
gtk_table_attach( GTK_TABLE( t ), w, 0, 2, *row, *row + 1, ~0, 0, 0, 0 );
++ * row;
}
void
hig_workarea_add_section_title( GtkWidget * t,
int * row,
const char * section_title )
hig_workarea_add_section_title( GtkWidget * t, guint * row, const char * section_title )
{
char buf[512];
char buf[512];
GtkWidget * l;
g_snprintf( buf, sizeof( buf ), "<b>%s</b>", section_title );
@ -81,9 +76,7 @@ rowNew( GtkWidget * w )
}
void
hig_workarea_add_wide_control( GtkWidget * t,
int * row,
GtkWidget * w )
hig_workarea_add_wide_control( GtkWidget * t, guint * row, GtkWidget * w )
{
GtkWidget * r = rowNew( w );
@ -92,9 +85,7 @@ hig_workarea_add_wide_control( GtkWidget * t,
}
void
hig_workarea_add_wide_tall_control( GtkWidget * t,
int * row,
GtkWidget * w )
hig_workarea_add_wide_tall_control( GtkWidget * t, guint * row, GtkWidget * w )
{
GtkWidget * r = rowNew( w );
@ -107,8 +98,8 @@ hig_workarea_add_wide_tall_control( GtkWidget * t,
}
GtkWidget *
hig_workarea_add_wide_checkbutton( GtkWidget * t,
int * row,
hig_workarea_add_wide_checkbutton( GtkWidget * t,
guint * row,
const char * mnemonic_string,
gboolean is_active )
{
@ -120,9 +111,7 @@ hig_workarea_add_wide_checkbutton( GtkWidget * t,
}
void
hig_workarea_add_label_w( GtkWidget * t,
int row,
GtkWidget * l )
hig_workarea_add_label_w( GtkWidget * t, guint row, GtkWidget * l )
{
GtkWidget * w = rowNew( l );
@ -130,9 +119,7 @@ hig_workarea_add_label_w( GtkWidget * t,
}
GtkWidget*
hig_workarea_add_label( GtkWidget * t,
int row,
const char * mnemonic_string )
hig_workarea_add_label( GtkWidget * t, guint row, const char * mnemonic_string )
{
GtkWidget * l = gtk_label_new_with_mnemonic( mnemonic_string );
@ -141,9 +128,7 @@ hig_workarea_add_label( GtkWidget * t,
}
static void
hig_workarea_add_tall_control( GtkWidget * t,
int row,
GtkWidget * control )
hig_workarea_add_tall_control( GtkWidget * t, guint row, GtkWidget * control )
{
if( GTK_IS_MISC( control ) )
gtk_misc_set_alignment( GTK_MISC( control ), 0.0f, 0.5f );
@ -156,9 +141,7 @@ hig_workarea_add_tall_control( GtkWidget * t,
}
static void
hig_workarea_add_control( GtkWidget * t,
int row,
GtkWidget * control )
hig_workarea_add_control( GtkWidget * t, guint row, GtkWidget * control )
{
if( GTK_IS_MISC( control ) )
gtk_misc_set_alignment( GTK_MISC( control ), 0.0f, 0.5f );
@ -170,7 +153,7 @@ hig_workarea_add_control( GtkWidget * t,
void
hig_workarea_add_row_w( GtkWidget * t,
int * row,
guint * row,
GtkWidget * label,
GtkWidget * control,
GtkWidget * mnemonic )
@ -184,11 +167,11 @@ hig_workarea_add_row_w( GtkWidget * t,
}
GtkWidget*
hig_workarea_add_row( GtkWidget * t,
int * row,
hig_workarea_add_row( GtkWidget * t,
guint * row,
const char * mnemonic_string,
GtkWidget * control,
GtkWidget * mnemonic )
GtkWidget * control,
GtkWidget * mnemonic )
{
GtkWidget * l = gtk_label_new_with_mnemonic( mnemonic_string );
@ -197,11 +180,11 @@ hig_workarea_add_row( GtkWidget * t,
}
GtkWidget*
hig_workarea_add_tall_row( GtkWidget * table,
int * row,
hig_workarea_add_tall_row( GtkWidget * table,
guint * row,
const char * mnemonic_string,
GtkWidget * control,
GtkWidget * mnemonic )
GtkWidget * control,
GtkWidget * mnemonic )
{
GtkWidget * l = gtk_label_new_with_mnemonic( mnemonic_string );
GtkWidget * h = gtk_hbox_new( FALSE, 0 );
@ -221,8 +204,7 @@ hig_workarea_add_tall_row( GtkWidget * table,
}
void
hig_workarea_finish( GtkWidget * t,
int * row )
hig_workarea_finish( GtkWidget * t, guint * row )
{
gtk_table_resize( GTK_TABLE( t ), *row, 2 );
}

View File

@ -23,57 +23,57 @@
GtkWidget* hig_workarea_create( void );
void hig_workarea_add_section_divider( GtkWidget * table,
int * row );
guint * row );
void hig_workarea_add_section_title_widget( GtkWidget * t,
int * row,
guint * row,
GtkWidget * w );
void hig_workarea_add_section_title( GtkWidget * table,
int * row,
void hig_workarea_add_section_title( GtkWidget * table,
guint * row,
const char * section_title );
void hig_workarea_add_wide_tall_control( GtkWidget * table,
int * row,
guint * row,
GtkWidget * w );
void hig_workarea_add_wide_control( GtkWidget * table,
int * row,
guint * row,
GtkWidget * w );
GtkWidget* hig_workarea_add_wide_checkbutton( GtkWidget * table,
int * row,
GtkWidget* hig_workarea_add_wide_checkbutton( GtkWidget * table,
guint * row,
const char * mnemonic_string,
gboolean is_active );
GtkWidget* hig_workarea_add_label( GtkWidget * table,
int row,
GtkWidget* hig_workarea_add_label( GtkWidget * table,
guint row,
const char * mnemonic_string );
void hig_workarea_add_label_w( GtkWidget * table,
int row,
guint row,
GtkWidget * label_widget );
GtkWidget* hig_workarea_add_tall_row( GtkWidget * table,
int * row,
GtkWidget* hig_workarea_add_tall_row( GtkWidget * table,
guint * row,
const char * mnemonic_string,
GtkWidget * control,
GtkWidget * mnemonic_or_null_for_control );
GtkWidget * control,
GtkWidget * mnemonic_or_null_for_control );
GtkWidget* hig_workarea_add_row( GtkWidget * table,
int * row,
GtkWidget* hig_workarea_add_row( GtkWidget * table,
guint * row,
const char * mnemonic_string,
GtkWidget * control,
GtkWidget * mnemonic_or_null_for_control );
GtkWidget * control,
GtkWidget * mnemonic_or_null_for_control );
void hig_workarea_add_row_w( GtkWidget * table,
int * row,
guint * row,
GtkWidget * label,
GtkWidget * control,
GtkWidget * mnemonic_or_null_for_control );
void hig_workarea_finish( GtkWidget * table,
int * row );
guint * row );
enum
{

View File

@ -414,10 +414,10 @@ on_drag_data_received( GtkWidget * widget UNUSED,
GtkWidget*
gtr_torrent_creation_dialog_new( GtkWindow * parent, TrCore * core )
{
int row = 0;
const char * str;
GtkWidget * d, *t, *w, *l, *fr, *sw, *v;
GSList * slist;
guint row = 0;
MakeMetaUI * ui = g_new0 ( MakeMetaUI, 1 );
ui->core = core;

View File

@ -254,8 +254,8 @@ addTorrentFilters( GtkFileChooser * chooser )
GtkWidget*
gtr_torrent_options_dialog_new( GtkWindow * parent, TrCore * core, tr_ctor * ctor )
{
int row;
int col;
guint row;
guint col;
const char * str;
GtkWidget * w;
GtkWidget * d;
@ -479,7 +479,7 @@ onOpenURLResponse( GtkDialog * dialog, int response, gpointer user_data )
GtkWidget*
gtr_torrent_open_from_url_dialog_new( GtkWindow * parent, TrCore * core )
{
int row;
guint row;
GtkWidget * e;
GtkWidget * t;
GtkWidget * w;

View File

@ -147,7 +147,7 @@ gtr_relocate_dialog_new( GtkWindow * parent,
TrCore * core,
GSList * torrent_ids )
{
int row;
guint row;
GtkWidget * w;
GtkWidget * d;
GtkWidget * t;

View File

@ -128,7 +128,7 @@ gtr_stats_dialog_new( GtkWindow * parent, TrCore * core )
GtkWidget * d;
GtkWidget * t;
GtkWidget * l;
int row = 0;
guint row = 0;
struct stat_ui * ui = g_new0( struct stat_ui, 1 );
d = gtk_dialog_new_with_buttons( _( "Statistics" ),

View File

@ -262,7 +262,7 @@ downloadPage( GObject * core )
GtkWidget * w;
GtkWidget * l;
const char * s;
int row = 0;
guint row = 0;
t = hig_workarea_create( );
@ -314,12 +314,12 @@ downloadPage( GObject * core )
static GtkWidget*
torrentPage( GObject * core )
{
int row = 0;
const char * s;
GtkWidget * t;
GtkWidget * w;
GtkWidget * w2;
GtkWidget * l;
guint row = 0;
t = hig_workarea_create( );
hig_workarea_add_section_title( t, &row, _( "Adding" ) );
@ -371,10 +371,10 @@ torrentPage( GObject * core )
static GtkWidget*
desktopPage( GObject * core )
{
int row = 0;
GtkWidget * t;
GtkWidget * w;
const char * s;
guint row = 0;
t = hig_workarea_create( );
hig_workarea_add_section_title( t, &row, _( "Desktop" ) );
@ -522,7 +522,6 @@ new_encryption_combo( GObject * core, const char * key )
static GtkWidget*
privacyPage( GObject * core )
{
int row = 0;
const char * s;
GtkWidget * t;
GtkWidget * w;
@ -530,6 +529,7 @@ privacyPage( GObject * core )
GtkWidget * h;
GtkWidget * e;
struct blocklist_data * data;
guint row = 0;
data = g_new0( struct blocklist_data, 1 );
data->core = TR_CORE( core );
@ -792,11 +792,11 @@ remotePageFree( gpointer gpage )
static GtkWidget*
webPage( GObject * core )
{
const char * s;
int row = 0;
GtkWidget * t;
GtkWidget * w;
GtkWidget * h;
GtkWidget * t;
GtkWidget * w;
GtkWidget * h;
const char * s;
guint row = 0;
struct remote_page * page = g_new0( struct remote_page, 1 );
page->core = TR_CORE( core );
@ -1043,12 +1043,12 @@ bandwidthPageFree( gpointer gpage )
static GtkWidget*
bandwidthPage( GObject * core )
{
int row = 0;
const char * s;
GtkWidget * t;
GtkWidget * l;
GtkWidget * w, * w2, * h;
char buf[512];
guint row = 0;
struct BandwidthPage * page = tr_new0( struct BandwidthPage, 1 );
page->core = TR_CORE( core );
@ -1191,13 +1191,13 @@ onPortTest( GtkButton * button UNUSED, gpointer vdata )
static GtkWidget*
networkPage( GObject * core )
{
int row = 0;
const char * s;
GtkWidget * t;
GtkWidget * w;
GtkWidget * h;
GtkWidget * l;
GtkWidget * t;
GtkWidget * w;
GtkWidget * h;
GtkWidget * l;
const char * s;
struct network_page_data * data;
guint row = 0;
/* register to stop listening to core prefs changes when the page is destroyed */
data = g_new0( struct network_page_data, 1 );