]> granicus.if.org Git - transmission/commitdiff
(trunk gtk) the row and col arguments passed to gtk_table_attach() should be guint...
authorJordan Lee <jordan@transmissionbt.com>
Sat, 13 Aug 2011 21:08:53 +0000 (21:08 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sat, 13 Aug 2011 21:08:53 +0000 (21:08 +0000)
gtk/details.c
gtk/hig.c
gtk/hig.h
gtk/makemeta-ui.c
gtk/open-dialog.c
gtk/relocate.c
gtk/stats.c
gtk/tr-prefs.c

index e5680714318e5e80673d80ece1e845aa2f7d92dd..bfd924a0691e33a2d0898f2511b032a2f3e501ce 100644 (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;
index 5c3b82625e2bac7dd200a6e67ec860e7357f6422..0449dc349971788d582198b1a4ab00c247c655cb 100644 (file)
--- a/gtk/hig.c
+++ b/gtk/hig.c
@@ -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 );
 }
index 2ab84ce7339fbab37cf1561e1116dc689edd08cd..1e1ed6c3507f2d3ad6d18605aa1c7f11de0aad20 100644 (file)
--- a/gtk/hig.h
+++ b/gtk/hig.h
 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
 {
index ea3146691e4b332f358e0669b714b1e0c42a7f5c..efc3e5a4103ce6b3d0a093f833cdb19e0dd12cd7 100644 (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;
index 6f0ab3652d729534e152a9c30f0366084cd4e91e..790ff68f4c2bcca9b911463d6f0e48ca052e7570 100644 (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;
index 0e9a9903804f528ba64b1bbc5845ddde06093645..e71da52dee0ac653ad9c03bd463d63d2edfcfa23 100644 (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;
index 456e35938e19b8e20490797fdbdba141d950f15f..8a7a878c3deb53d88e9e689516dfd20ea7ac2d08 100644 (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" ),
index fd3351e472f45bf7736b0b9ff5eec073e11c4995..6033e6f821a9e1d8a1e1755f2f21833ad1a76fe0 100644 (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 );