comparison src/bar_exif.c @ 489:3809ffa3567b

Save state and width of exif, info and sort panels to rc file. Width is restored only if save windows dimensions is set.
author zas_
date Tue, 22 Apr 2008 22:44:10 +0000
parents 48c8e49b571c
children 00462776e9a2
comparison
equal deleted inserted replaced
488:a884e7fa26aa 489:3809ffa3567b
507 if (!eb) return; 507 if (!eb) return;
508 508
509 gtk_widget_destroy(eb->vbox); 509 gtk_widget_destroy(eb->vbox);
510 } 510 }
511 511
512 static void bar_exif_size(ExifBar *eb, gint val) 512 static void bar_exif_width(ExifBar *eb, gint val)
513 { 513 {
514 gint size; 514 gint size;
515 515
516 size = eb->vbox->allocation.width; 516 size = eb->vbox->allocation.width;
517 size = CLAMP(size + val, EXIF_BAR_SIZE_INCREMENT * 2, EXIF_BAR_SIZE_INCREMENT * 16); 517 size = CLAMP(size + val, EXIF_BAR_SIZE_INCREMENT * 2, EXIF_BAR_SIZE_INCREMENT * 16);
518 518
519 gtk_widget_set_size_request(eb->vbox, size, -1); 519 gtk_widget_set_size_request(eb->vbox, size, -1);
520 options->panels.exif.width = eb->vbox->allocation.width;
520 } 521 }
521 522
522 static void bar_exif_larger(GtkWidget *widget, gpointer data) 523 static void bar_exif_larger(GtkWidget *widget, gpointer data)
523 { 524 {
524 ExifBar *eb = data; 525 ExifBar *eb = data;
525 526
526 bar_exif_size(eb, EXIF_BAR_SIZE_INCREMENT); 527 bar_exif_width(eb, EXIF_BAR_SIZE_INCREMENT);
527 } 528 }
528 529
529 static void bar_exif_smaller(GtkWidget *widget, gpointer data) 530 static void bar_exif_smaller(GtkWidget *widget, gpointer data)
530 { 531 {
531 ExifBar *eb = data; 532 ExifBar *eb = data;
532 533
533 bar_exif_size(eb, -EXIF_BAR_SIZE_INCREMENT); 534 bar_exif_width(eb, -EXIF_BAR_SIZE_INCREMENT);
534 } 535 }
535 536
536 static void bar_exif_destroy(GtkWidget *widget, gpointer data) 537 static void bar_exif_destroy(GtkWidget *widget, gpointer data)
537 { 538 {
538 ExifBar *eb = data; 539 ExifBar *eb = data;