comparison src/preferences.c @ 736:a7289f9e8d29

Fix signed vs unsigned warnings. In most cases, gint was used instead of guint.
author zas_
date Thu, 22 May 2008 13:00:45 +0000
parents 57f759d012c7
children ff51413f098d
comparison
equal deleted inserted replaced
735:df6c11709106 736:a7289f9e8d29
517 static void thumb_size_menu_cb(GtkWidget *combo, gpointer data) 517 static void thumb_size_menu_cb(GtkWidget *combo, gpointer data)
518 { 518 {
519 gint n; 519 gint n;
520 520
521 n = gtk_combo_box_get_active(GTK_COMBO_BOX(combo)); 521 n = gtk_combo_box_get_active(GTK_COMBO_BOX(combo));
522 522 if (n < 0) return;
523 if (n >= 0 && n < sizeof(thumb_size_list) / sizeof(ThumbSize)) 523
524 if ((guint) n < sizeof(thumb_size_list) / sizeof(ThumbSize))
524 { 525 {
525 c_options->thumbnails.max_width = thumb_size_list[n].w; 526 c_options->thumbnails.max_width = thumb_size_list[n].w;
526 c_options->thumbnails.max_height = thumb_size_list[n].h; 527 c_options->thumbnails.max_height = thumb_size_list[n].h;
527 } 528 }
528 else if (n > 0) 529 else
529 { 530 {
530 c_options->thumbnails.max_width = options->thumbnails.max_width; 531 c_options->thumbnails.max_width = options->thumbnails.max_width;
531 c_options->thumbnails.max_height = options->thumbnails.max_height; 532 c_options->thumbnails.max_height = options->thumbnails.max_height;
532 } 533 }
533 } 534 }
544 pref_table_label(table, column, row, text, 0.0); 545 pref_table_label(table, column, row, text, 0.0);
545 546
546 combo = gtk_combo_box_new_text(); 547 combo = gtk_combo_box_new_text();
547 548
548 current = -1; 549 current = -1;
549 for (i = 0; i < sizeof(thumb_size_list) / sizeof(ThumbSize); i++) 550 for (i = 0; (guint) i < sizeof(thumb_size_list) / sizeof(ThumbSize); i++)
550 { 551 {
551 gint w, h; 552 gint w, h;
552 gchar *buf; 553 gchar *buf;
553 554
554 w = thumb_size_list[i].w; 555 w = thumb_size_list[i].w;