comparison src/layout_image.c @ 1043:5fc64d6252e7

Replaced gtk depreceated code.
author bruclik
date Sun, 07 Sep 2008 23:01:30 +0000
parents 86148ec8a299
children 81ec7d977d5f
comparison
equal deleted inserted replaced
1042:e59a9c96d290 1043:5fc64d6252e7
1505 1505
1506 if (!lw->split_images[i]) 1506 if (!lw->split_images[i])
1507 { 1507 {
1508 lw->split_images[i] = image_new(TRUE); 1508 lw->split_images[i] = image_new(TRUE);
1509 1509
1510 #if GTK_CHECK_VERSION(2,12,0)
1511 g_object_ref(lw->split_images[i]->widget);
1512 #else
1510 gtk_widget_ref(lw->split_images[i]->widget); 1513 gtk_widget_ref(lw->split_images[i]->widget);
1511 1514 #endif
1512 image_background_set_color(lw->split_images[i], options->image.use_custom_border_color ? &options->image.border_color : NULL); 1515 image_background_set_color(lw->split_images[i], options->image.use_custom_border_color ? &options->image.border_color : NULL);
1513 1516
1514 image_auto_refresh_enable(lw->split_images[i], TRUE); 1517 image_auto_refresh_enable(lw->split_images[i], TRUE);
1515 1518
1516 layout_image_dnd_init(lw, i); 1519 layout_image_dnd_init(lw, i);
1597 1600
1598 for (i = 1; i < MAX_SPLIT_IMAGES; i++) 1601 for (i = 1; i < MAX_SPLIT_IMAGES; i++)
1599 { 1602 {
1600 if (lw->split_images[i]) 1603 if (lw->split_images[i])
1601 { 1604 {
1605 #if GTK_CHECK_VERSION(2,12,0)
1606 g_object_unref(lw->split_images[i]->widget);
1607 #else
1602 gtk_widget_unref(lw->split_images[i]->widget); 1608 gtk_widget_unref(lw->split_images[i]->widget);
1609 #endif
1603 lw->split_images[i] = NULL; 1610 lw->split_images[i] = NULL;
1604 } 1611 }
1605 } 1612 }
1606 1613
1607 1614
1651 1658
1652 for (i = 2; i < MAX_SPLIT_IMAGES; i++) 1659 for (i = 2; i < MAX_SPLIT_IMAGES; i++)
1653 { 1660 {
1654 if (lw->split_images[i]) 1661 if (lw->split_images[i])
1655 { 1662 {
1663 #if GTK_CHECK_VERSION(2,12,0)
1664 g_object_unref(lw->split_images[i]->widget);
1665 #else
1656 gtk_widget_unref(lw->split_images[i]->widget); 1666 gtk_widget_unref(lw->split_images[i]->widget);
1667 #endif
1657 lw->split_images[i] = NULL; 1668 lw->split_images[i] = NULL;
1658 } 1669 }
1659 } 1670 }
1660 1671
1661 if (!lw->image || lw->active_split_image < 0 || lw->active_split_image > 1) 1672 if (!lw->image || lw->active_split_image < 0 || lw->active_split_image > 1)
1727 1738
1728 for (i = 4; i < MAX_SPLIT_IMAGES; i++) 1739 for (i = 4; i < MAX_SPLIT_IMAGES; i++)
1729 { 1740 {
1730 if (lw->split_images[i]) 1741 if (lw->split_images[i])
1731 { 1742 {
1743 #if GTK_CHECK_VERSION(2,12,0)
1744 g_object_unref(lw->split_images[i]->widget);
1745 #else
1732 gtk_widget_unref(lw->split_images[i]->widget); 1746 gtk_widget_unref(lw->split_images[i]->widget);
1747 #endif
1733 lw->split_images[i] = NULL; 1748 lw->split_images[i] = NULL;
1734 } 1749 }
1735 } 1750 }
1736 1751
1737 1752