modify fileio_extract_icon by using gio
@@ -1,6 +1,6 @@ | ||
1 | 1 | /* |
2 | 2 | Video maid |
3 | - copyright (c) 1998-2008 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
3 | + copyright (c) 1998-2009 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
4 | 4 | |
5 | 5 | This program is free software: you can redistribute it and/or modify |
6 | 6 | it under the terms of the GNU General Public License as published by |
@@ -31,7 +31,7 @@ | ||
31 | 31 | |
32 | 32 | |
33 | 33 | #define VMAID_VERSION_NOTICE "Video maid "VERSION" ("BUILD_ENVIRONMENT")" |
34 | -#define VMAID_COPYRIGHT_NOTICE "Copyright (C) 1998-2008 Kazuki IWAMOTO" | |
34 | +#define VMAID_COPYRIGHT_NOTICE "Copyright (C) 1998-2009 Kazuki IWAMOTO" | |
35 | 35 | |
36 | 36 | |
37 | 37 | typedef struct _VmaidCursor |
@@ -1,7 +1,34 @@ | ||
1 | -2008-08-29 Kazuki IWAMOTO <iwm@maid.org> | |
1 | +2009-11-29 Kazuki IWAMOTO <iwm@maid.org> | |
2 | 2 | |
3 | + * version 2.2.1 | |
4 | + | |
5 | +2009-11-29 Kazuki IWAMOTO <iwm@maid.org> | |
6 | + | |
7 | + * misc/fileio.c: modify fileio_extract_icon by using gio | |
8 | + | |
9 | + * w32loader/kernel32.c: modify format argument in g_print | |
10 | + | |
11 | +2009-03-24 Kazuki IWAMOTO <iwm@maid.org> | |
12 | + | |
13 | + * Makefile.msc.in: add max memory alloc option | |
14 | + | |
15 | + * orz/orz_comm_send.c: delete return value | |
16 | + | |
17 | + * avicore/aviplay.c: add cast in avi_play_value_changed | |
18 | + | |
19 | +2008-09-29 Kazuki IWAMOTO <iwm@maid.org> | |
20 | + | |
3 | 21 | * version 2.2.0 |
4 | 22 | |
23 | +2008-09-22 Kazuki IWAMOTO <iwm@maid.org> | |
24 | + | |
25 | + * Makefile.msc.in | |
26 | + * misc/misc.c: change locale directory | |
27 | + | |
28 | +2008-08-29 Kazuki IWAMOTO <iwm@maid.org> | |
29 | + | |
30 | + * version 2.1.9 | |
31 | + | |
5 | 32 | 2008-08-27 Kazuki IWAMOTO <iwm@maid.org> |
6 | 33 | |
7 | 34 | * Makefile.msc.in |
@@ -42,10 +69,6 @@ | ||
42 | 69 | * misc/misc.[ch] |
43 | 70 | * orz/orzmdi.c: add misc_close_* functions |
44 | 71 | |
45 | -2008-04-29 Kazuki IWAMOTO <iwm@maid.org> | |
46 | - | |
47 | - * version 2.1.9 | |
48 | - | |
49 | 72 | 2008-04-11 Kazuki IWAMOTO <iwm@maid.org> |
50 | 73 | |
51 | 74 | * misc/lisence.c |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /* |
2 | 2 | avicore |
3 | - copyright (c) 1998-2008 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
3 | + copyright (c) 1998-2009 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
4 | 4 | |
5 | 5 | This program is free software: you can redistribute it and/or modify |
6 | 6 | it under the terms of the GNU General Public License as published by |
@@ -605,7 +605,7 @@ | ||
605 | 605 | AviPlay *play) |
606 | 606 | { |
607 | 607 | avi_play_set_position_internal (play, |
608 | - gtk_range_get_value (GTK_RANGE (widget))); | |
608 | + (gint)gtk_range_get_value (GTK_RANGE (widget))); | |
609 | 609 | } |
610 | 610 | |
611 | 611 |
@@ -1,10 +1,10 @@ | ||
1 | 1 | /* |
2 | 2 | fileio |
3 | - copyright (c) 1998-2007 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
3 | + copyright (c) 1998-2009 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
4 | 4 | |
5 | - This program is free software; you can redistribute it and/or modify | |
5 | + This program is free software: you can redistribute it and/or modify | |
6 | 6 | it under the terms of the GNU General Public License as published by |
7 | - the Free Software Foundation; either version 2 of the License, or | |
7 | + the Free Software Foundation, either version 3 of the License, or | |
8 | 8 | (at your option) any later version. |
9 | 9 | |
10 | 10 | This program is distributed in the hope that it will be useful, |
@@ -13,8 +13,7 @@ | ||
13 | 13 | GNU General Public License for more details. |
14 | 14 | |
15 | 15 | You should have received a copy of the GNU General Public License |
16 | - along with this program; if not, write to the Free Software | |
17 | - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
16 | + along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | 17 | */ |
19 | 18 | #include "fileio.h" |
20 | 19 | #include <time.h> |
@@ -27,9 +26,11 @@ | ||
27 | 26 | #if GLIB_CHECK_VERSION(2,6,0) |
28 | 27 | # include <glib/gstdio.h> |
29 | 28 | #endif /* GLIB_CHECK_VERSION(2,6,0) */ |
30 | -#ifdef G_OS_WIN32 | |
29 | +#if defined (G_OS_WIN32) | |
31 | 30 | # include <shlwapi.h> |
32 | -#endif /* G_OS_WIN32 */ | |
31 | +#elif GLIB_CHECK_VERSION(2,16,0) | |
32 | +# include <gio/gio.h> | |
33 | +#endif /* GLIB_CHECK_VERSION(2,16,0) */ | |
33 | 34 | |
34 | 35 | |
35 | 36 | struct _FileIO |
@@ -1573,53 +1574,42 @@ | ||
1573 | 1574 | fileio_extract_icon (const gchar *file, |
1574 | 1575 | GtkIconSize icon_size) |
1575 | 1576 | { |
1576 | -#if defined (G_OS_WIN32) | |
1577 | +#if defined (G_OS_WIN32) || GLIB_CHECK_VERSION(2,16,0) || GLIB_CHECK_VERSION(2,4,0) && defined (MIMEFILE) | |
1577 | 1578 | gint icon_x, icon_y; |
1578 | 1579 | GdkPixbuf *pixbuf = NULL; |
1580 | +# ifdef G_OS_WIN32 | |
1579 | 1581 | HICON hIcon = NULL; |
1580 | 1582 | ICONINFO ii; |
1581 | 1583 | UINT uFlags; |
1582 | -# if GLIB_CHECK_VERSION(2,2,0) | |
1583 | - GtkSettings *settings; | |
1584 | -# endif /* GLIB_CHECK_VERSION(2,2,0) */ | |
1585 | -# if ! GLIB_CHECK_VERSION(2,6,0) | |
1584 | +# if ! GLIB_CHECK_VERSION(2,6,0) | |
1586 | 1585 | LPTSTR lpszFile; |
1587 | 1586 | SHFILEINFO shfi; |
1588 | -# ifdef UNICODE | |
1587 | +# ifdef UNICODE | |
1589 | 1588 | gchar *utf8str; |
1590 | -# endif /* UNICODE */ | |
1591 | -# endif /* not GLIB_CHECK_VERSION(2,6,0) */ | |
1589 | +# endif /* UNICODE */ | |
1590 | +# endif /* not GLIB_CHECK_VERSION(2,6,0) */ | |
1591 | +# endif /* G_OS_WIN32 */ | |
1592 | 1592 | |
1593 | - if (!file) | |
1593 | + if (!gtk_icon_size_lookup (icon_size, &icon_x, &icon_y)) | |
1594 | + switch (icon_size) | |
1595 | + { | |
1596 | + case GTK_ICON_SIZE_MENU: icon_x = 16; icon_y = 16; break; | |
1597 | + case GTK_ICON_SIZE_SMALL_TOOLBAR: icon_x = 18; icon_y = 18; break; | |
1598 | + case GTK_ICON_SIZE_LARGE_TOOLBAR: icon_x = 24; icon_y = 24; break; | |
1599 | + case GTK_ICON_SIZE_BUTTON: icon_x = 20; icon_y = 20; break; | |
1600 | + case GTK_ICON_SIZE_DND: icon_x = 32; icon_y = 32; break; | |
1601 | + case GTK_ICON_SIZE_DIALOG: icon_x = 48; icon_y = 48; break; | |
1602 | + default: icon_x = 0; icon_y = 0; | |
1603 | + } | |
1604 | + if (!file || icon_x <= 0 || icon_y <= 0) | |
1605 | +#endif /* defined (G_OS_WIN32) || GLIB_CHECK_VERSION(2,16,0) || GLIB_CHECK_VERSION(2,4,0) && defined (MIMEFILE) */ | |
1594 | 1606 | return NULL; |
1595 | - switch (icon_size) | |
1596 | - { | |
1597 | - case GTK_ICON_SIZE_MENU: icon_x = 16; icon_y = 16; break; | |
1598 | - case GTK_ICON_SIZE_SMALL_TOOLBAR: icon_x = 18; icon_y = 18; break; | |
1599 | - case GTK_ICON_SIZE_LARGE_TOOLBAR: icon_x = 24; icon_y = 24; break; | |
1600 | - case GTK_ICON_SIZE_BUTTON: icon_x = 20; icon_y = 20; break; | |
1601 | - case GTK_ICON_SIZE_DND: icon_x = 32; icon_y = 32; break; | |
1602 | - case GTK_ICON_SIZE_DIALOG: icon_x = 48; icon_y = 48; break; | |
1603 | - default: icon_x = 0; icon_y = 0; | |
1604 | - } | |
1605 | -# if GLIB_CHECK_VERSION(2,2,0) | |
1606 | - settings = gtk_settings_get_default (); | |
1607 | - if (settings) | |
1608 | - { | |
1609 | - gint w, h; | |
1610 | - | |
1611 | - if (gtk_icon_size_lookup_for_settings (settings, icon_size, &w, &h)) | |
1612 | - { | |
1613 | - icon_x = w; | |
1614 | - icon_y = h; | |
1615 | - } | |
1616 | - } | |
1607 | +#if defined (G_OS_WIN32) | |
1617 | 1608 | uFlags = ABS (GetSystemMetrics (SM_CXSMICON) - icon_x) |
1618 | 1609 | + ABS (GetSystemMetrics (SM_CYSMICON) - icon_y) |
1619 | 1610 | < ABS (GetSystemMetrics (SM_CXICON) - icon_x) |
1620 | 1611 | + ABS (GetSystemMetrics (SM_CYSMICON) - icon_y) |
1621 | 1612 | ? SHGFI_SMALLICON : SHGFI_LARGEICON; |
1622 | -# endif /* GLIB_CHECK_VERSION(2,2,0) */ | |
1623 | 1613 | # if GLIB_CHECK_VERSION(2,6,0) |
1624 | 1614 | if (G_WIN32_HAVE_WIDECHAR_API ()) |
1625 | 1615 | { |
@@ -1728,12 +1718,7 @@ | ||
1728 | 1718 | } |
1729 | 1719 | if (hIcon) |
1730 | 1720 | DestroyIcon (hIcon); |
1731 | - return pixbuf; | |
1732 | -#elif GLIB_CHECK_VERSION(2,4,0) && defined (MIMEFILE) | |
1733 | - GdkPixbuf *pixbuf = NULL; | |
1734 | - | |
1735 | - if (!file) | |
1736 | - return NULL; | |
1721 | +#elif GLIB_CHECK_VERSION(2,16,0) || GLIB_CHECK_VERSION(2,4,0) && defined (MIMEFILE) | |
1737 | 1722 | if (g_file_test (file, G_FILE_TEST_IS_DIR)) |
1738 | 1723 | { |
1739 | 1724 | const gchar *home; |
@@ -1752,139 +1737,119 @@ | ||
1752 | 1737 | } |
1753 | 1738 | else |
1754 | 1739 | { |
1755 | - gchar *text; | |
1756 | - gssize length; | |
1740 | + gchar *mime_type = NULL; | |
1741 | +# if GLIB_CHECK_VERSION(2,16,0) | |
1742 | + gboolean uncertain; | |
1743 | + gchar *content_type; | |
1757 | 1744 | |
1758 | - text = fileio_load (MIMEFILE, &length); | |
1759 | - if (text) | |
1745 | + content_type = g_content_type_guess (file, NULL, 0, &uncertain); | |
1746 | + if (content_type) | |
1760 | 1747 | { |
1761 | - gchar **mimes, *utf8str, *mime_type = NULL; | |
1762 | - gint i; | |
1763 | - | |
1764 | - text = g_realloc (text, length + 1); | |
1765 | - text[length] = '\0'; | |
1766 | - utf8str = g_filename_to_utf8 (file, -1, NULL, NULL, NULL); | |
1767 | - mimes = g_strsplit (text, "\n", 0); | |
1768 | - for (i = 0; mimes[i]; i++) | |
1748 | + mime_type = g_content_type_get_mime_type (content_type); | |
1749 | + g_free (content_type); | |
1750 | + } | |
1751 | +# endif /* GLIB_CHECK_VERSION(2,16,0) */ | |
1752 | +# ifdef MIMEFILE | |
1753 | +# if GLIB_CHECK_VERSION(2,16,0) | |
1754 | + if (!mime_type) | |
1755 | + { | |
1756 | +# endif /* GLIB_CHECK_VERSION(2,16,0) */ | |
1757 | + gchar *text; | |
1758 | + gssize length; | |
1759 | + text = fileio_load (MIMEFILE, &length); | |
1760 | + if (text) | |
1769 | 1761 | { |
1770 | - gchar **globs; | |
1762 | + gchar **mimes, *utf8str; | |
1763 | + gint i; | |
1771 | 1764 | |
1772 | - globs = g_strsplit (mimes[i], G_SEARCHPATH_SEPARATOR_S, 0); | |
1773 | - if (globs[0]) | |
1765 | + text = g_realloc (text, length + 1); | |
1766 | + text[length] = '\0'; | |
1767 | + utf8str = g_filename_to_utf8 (file, -1, NULL, NULL, NULL); | |
1768 | + mimes = g_strsplit (text, "\n", 0); | |
1769 | + for (i = 0; mimes[i]; i++) | |
1774 | 1770 | { |
1775 | - gint j; | |
1771 | + gchar **globs; | |
1776 | 1772 | |
1777 | - for (j = 1; globs[j]; j++) | |
1778 | - if (g_pattern_match_simple (globs[j], utf8str)) | |
1779 | - { | |
1780 | - mime_type = g_strdup (globs[0]); | |
1781 | - break; | |
1782 | - } | |
1773 | + globs = g_strsplit (mimes[i], G_SEARCHPATH_SEPARATOR_S, 0); | |
1774 | + if (globs[0]) | |
1775 | + { | |
1776 | + gint j; | |
1777 | + | |
1778 | + for (j = 1; globs[j]; j++) | |
1779 | + if (g_pattern_match_simple (globs[j], utf8str)) | |
1780 | + { | |
1781 | + mime_type = g_strdup (globs[0]); | |
1782 | + break; | |
1783 | + } | |
1784 | + } | |
1785 | + g_strfreev (globs); | |
1786 | + if (mime_type) | |
1787 | + break; | |
1783 | 1788 | } |
1784 | - g_strfreev (globs); | |
1785 | - if (mime_type) | |
1786 | - break; | |
1789 | + g_strfreev (mimes); | |
1790 | + g_free (utf8str); | |
1791 | + g_free (text); | |
1787 | 1792 | } |
1788 | - g_strfreev (mimes); | |
1789 | - g_free (utf8str); | |
1790 | - g_free (text); | |
1791 | - if (mime_type) | |
1793 | +# if GLIB_CHECK_VERSION(2,16,0) | |
1794 | + } | |
1795 | +# endif /* GLIB_CHECK_VERSION(2,16,0) */ | |
1796 | +# endif /* MIMEFILE */ | |
1797 | + if (mime_type) | |
1798 | + { | |
1799 | + gchar *icon_name, *separator; | |
1800 | + | |
1801 | + icon_name = g_strconcat ("gnome-mime-", mime_type, NULL); | |
1802 | + g_free (mime_type); | |
1803 | + separator = g_strchr (icon_name, '/'); | |
1804 | + if (separator) | |
1792 | 1805 | { |
1793 | - gchar *icon_name, *separator; | |
1806 | + GtkIconTheme *icon_theme; | |
1794 | 1807 | |
1795 | - icon_name = g_strconcat ("gnome-mime-", mime_type, NULL); | |
1796 | - g_free (mime_type); | |
1797 | - separator = g_strchr (icon_name, '/'); | |
1798 | - if (separator) | |
1808 | + *separator = '-'; | |
1809 | + icon_theme = gtk_icon_theme_get_default (); | |
1810 | + if (icon_theme) | |
1799 | 1811 | { |
1800 | - GtkIconTheme *icon_theme; | |
1812 | + gboolean result; | |
1801 | 1813 | |
1802 | - *separator = '-'; | |
1803 | - icon_theme = gtk_icon_theme_get_default (); | |
1804 | - if (icon_theme) | |
1814 | + result = gtk_icon_theme_has_icon (icon_theme, icon_name); | |
1815 | + if (!result) | |
1805 | 1816 | { |
1806 | - gboolean result; | |
1807 | - | |
1817 | + *separator = '\0'; | |
1808 | 1818 | result = gtk_icon_theme_has_icon (icon_theme, icon_name); |
1809 | - if (!result) | |
1810 | - { | |
1811 | - *separator = '\0'; | |
1812 | - result = gtk_icon_theme_has_icon (icon_theme, | |
1813 | - icon_name); | |
1814 | - } | |
1815 | - if (result) | |
1816 | - { | |
1817 | - gint icon_x, icon_y; | |
1819 | + } | |
1820 | + if (result) | |
1821 | + { | |
1818 | 1822 | # if GLIB_CHECK_VERSION(2,6,0) |
1819 | - gint *sizes; | |
1820 | -# endif /* not GLIB_CHECK_VERSION(2,6,0) */ | |
1821 | - GtkSettings *settings; | |
1823 | + gint *sizes; | |
1822 | 1824 | |
1823 | - switch (icon_size) | |
1824 | - { | |
1825 | - case GTK_ICON_SIZE_MENU: | |
1826 | - icon_x = icon_y = 16; | |
1827 | - break; | |
1828 | - case GTK_ICON_SIZE_SMALL_TOOLBAR: | |
1829 | - icon_x = icon_y = 18; | |
1830 | - break; | |
1831 | - case GTK_ICON_SIZE_LARGE_TOOLBAR: | |
1832 | - icon_x = icon_y = 24; | |
1833 | - break; | |
1834 | - case GTK_ICON_SIZE_BUTTON: | |
1835 | - icon_x = icon_y = 20; | |
1836 | - break; | |
1837 | - case GTK_ICON_SIZE_DND: | |
1838 | - icon_x = icon_y = 32; | |
1839 | - break; | |
1840 | - case GTK_ICON_SIZE_DIALOG: | |
1841 | - icon_x = icon_y = 48; | |
1842 | - break; | |
1843 | - default: | |
1844 | - icon_x = icon_y = 0; | |
1845 | - } | |
1846 | - settings = gtk_settings_get_default (); | |
1847 | - if (settings) | |
1848 | - { | |
1849 | - gint w, h; | |
1850 | - | |
1851 | - if (gtk_icon_size_lookup_for_settings (settings, | |
1852 | - icon_size, &w, &h)) | |
1853 | - { | |
1854 | - icon_x = w; | |
1855 | - icon_y = h; | |
1856 | - } | |
1857 | - } | |
1858 | -# if GLIB_CHECK_VERSION(2,6,0) | |
1859 | - sizes = gtk_icon_theme_get_icon_sizes (icon_theme, | |
1825 | + sizes = gtk_icon_theme_get_icon_sizes (icon_theme, | |
1860 | 1826 | icon_name); |
1861 | - if (sizes) | |
1862 | - { | |
1863 | - gint n = 0; | |
1827 | + if (sizes) | |
1828 | + { | |
1829 | + gint i, n = 0; | |
1864 | 1830 | |
1865 | - for (i = 0; sizes[i] > 0; i++) | |
1866 | - if (ABS (icon_x - sizes[i]) | |
1831 | + for (i = 0; sizes[i] > 0; i++) | |
1832 | + if (ABS (icon_x - sizes[i]) | |
1867 | 1833 | + ABS (icon_y - sizes[i]) |
1868 | 1834 | < ABS (icon_x - n) + ABS (icon_y - n)) |
1869 | - n = sizes[i]; | |
1870 | - g_free (sizes); | |
1871 | - if (n > 0) | |
1872 | - pixbuf = gtk_icon_theme_load_icon (icon_theme, | |
1835 | + n = sizes[i]; | |
1836 | + g_free (sizes); | |
1837 | + if (n > 0) | |
1838 | + pixbuf = gtk_icon_theme_load_icon (icon_theme, | |
1873 | 1839 | icon_name, n, 0, NULL); |
1874 | - } | |
1875 | - if (!pixbuf) | |
1840 | + } | |
1841 | + if (!pixbuf) | |
1876 | 1842 | # endif /* GLIB_CHECK_VERSION(2,6,0) */ |
1877 | - pixbuf = gtk_icon_theme_load_icon (icon_theme, | |
1843 | + pixbuf = gtk_icon_theme_load_icon (icon_theme, | |
1878 | 1844 | icon_name, (icon_x + icon_y) / 2, 0, NULL); |
1879 | - } | |
1880 | 1845 | } |
1881 | 1846 | } |
1882 | - g_free (icon_name); | |
1883 | 1847 | } |
1848 | + g_free (icon_name); | |
1884 | 1849 | } |
1885 | 1850 | } |
1851 | +#endif /* GLIB_CHECK_VERSION(2,16,0) || GLIB_CHECK_VERSION(2,4,0) && defined (MIMEFILE) */ | |
1852 | +#if defined (G_OS_WIN32) || GLIB_CHECK_VERSION(2,16,0) || GLIB_CHECK_VERSION(2,4,0) && defined (MIMEFILE) | |
1886 | 1853 | return pixbuf; |
1887 | -#else /* not G_OS_WIN32 && not MIMEFILE */ | |
1888 | - return NULL; | |
1889 | -#endif /* not G_OS_WIN32 && not MIMEFILE */ | |
1854 | +#endif /* defined (G_OS_WIN32) || GLIB_CHECK_VERSION(2,16,0) || GLIB_CHECK_VERSION(2,4,0) && defined (MIMEFILE) */ | |
1890 | 1855 | } |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /* |
2 | 2 | misc |
3 | - copyright (c) 1998-2007 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
3 | + copyright (c) 1998-2008 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
4 | 4 | |
5 | 5 | This program is free software; you can redistribute it and/or modify |
6 | 6 | it under the terms of the GNU General Public License as published by |
@@ -350,7 +350,8 @@ | ||
350 | 350 | { |
351 | 351 | gchar *dir; |
352 | 352 | |
353 | - dir = g_filename_from_utf8 (utf8str, -1, NULL, NULL, NULL); | |
353 | + dir = g_filename_from_utf8 | |
354 | + (utf8str, -1, NULL, NULL, NULL); | |
354 | 355 | g_free (utf8str); |
355 | 356 | if (dir) |
356 | 357 | { |
@@ -448,8 +449,14 @@ | ||
448 | 449 | if (!g_file_test (locale, G_FILE_TEST_EXISTS)) |
449 | 450 | { |
450 | 451 | g_free (locale); |
452 | +# if GLIB_CHECK_VERSION(2,16,0) | |
453 | + dirname = g_win32_get_package_installation_directory_of_module (NULL); | |
454 | + locale = g_build_filename (dirname, "share", "locale", NULL); | |
455 | + g_free (dirname); | |
456 | +# else /* not GLIB_CHECK_VERSION(2,16,0) */ | |
451 | 457 | locale = g_win32_get_package_installation_subdirectory |
452 | - (NULL, prgname, "lib" G_DIR_SEPARATOR_S "locale"); | |
458 | + (NULL, prgname, "share" G_DIR_SEPARATOR_S "locale"); | |
459 | +# endif /* not GLIB_CHECK_VERSION(2,16,0) */ | |
453 | 460 | } |
454 | 461 | # if GLIB_CHECK_VERSION(2,6,0) |
455 | 462 | # if GLIB_CHECK_VERSION(2,8,0) |
@@ -1,10 +1,10 @@ | ||
1 | 1 | /* |
2 | 2 | w32loader |
3 | - copyright (c) 1998-2007 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
3 | + copyright (c) 1998-2009 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
4 | 4 | |
5 | - This program is free software; you can redistribute it and/or modify | |
5 | + This program is free software: you can redistribute it and/or modify | |
6 | 6 | it under the terms of the GNU General Public License as published by |
7 | - the Free Software Foundation; either version 2 of the License, or | |
7 | + the Free Software Foundation, either version 3 of the License, or | |
8 | 8 | (at your option) any later version. |
9 | 9 | |
10 | 10 | This program is distributed in the hope that it will be useful, |
@@ -13,8 +13,7 @@ | ||
13 | 13 | GNU General Public License for more details. |
14 | 14 | |
15 | 15 | You should have received a copy of the GNU General Public License |
16 | - along with this program; if not, write to the Free Software | |
17 | - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
16 | + along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | 17 | */ |
19 | 18 | #include "kernel32.h" |
20 | 19 | #include "user32.h" |
@@ -7437,7 +7436,7 @@ | ||
7437 | 7436 | str = w32ldr_utf8_from_mb (lpOutputString); |
7438 | 7437 | if (str) |
7439 | 7438 | { |
7440 | - g_print (str); | |
7439 | + g_print ("%s", str); | |
7441 | 7440 | g_free (str); |
7442 | 7441 | } |
7443 | 7442 | } |
@@ -7453,7 +7452,7 @@ | ||
7453 | 7452 | str = g_utf16_to_utf8 (lpOutputString, -1, NULL, NULL, NULL); |
7454 | 7453 | if (str) |
7455 | 7454 | { |
7456 | - g_print (str); | |
7455 | + g_print ("%s", str); | |
7457 | 7456 | g_free (str); |
7458 | 7457 | } |
7459 | 7458 | } |
@@ -9685,7 +9684,7 @@ | ||
9685 | 9684 | buf[nNumberOfCharsToWrite] = '\0'; |
9686 | 9685 | str = w32ldr_utf8_from_mb (buf); |
9687 | 9686 | g_free (buf); |
9688 | - g_print (str); | |
9687 | + g_print ("%s", str); | |
9689 | 9688 | g_free (str); |
9690 | 9689 | if (lpNumberOfCharsWritten) |
9691 | 9690 | *lpNumberOfCharsWritten = nNumberOfCharsToWrite; |
@@ -9764,7 +9763,7 @@ | ||
9764 | 9763 | if (!lpBuffer) |
9765 | 9764 | return FALSE; |
9766 | 9765 | str = g_utf16_to_utf8 (lpBuffer, nNumberOfCharsToWrite, NULL, NULL, NULL); |
9767 | - g_print (str); | |
9766 | + g_print ("%s", str); | |
9768 | 9767 | g_free (str); |
9769 | 9768 | if (lpNumberOfCharsWritten) |
9770 | 9769 | *lpNumberOfCharsWritten = nNumberOfCharsToWrite; |
@@ -10,10 +10,10 @@ | ||
10 | 10 | MT=mt |
11 | 11 | !endif |
12 | 12 | |
13 | -CLFLAGS=/c /D_MBCS /DNDEBUG /DWIN32 /D_WINDOWS /D_WIN32_WINNT=0x0500 /DWINVER=0x0500 /D_CRT_SECURE_NO_DEPRECATE /Fo$@ /MD /nologo /O2 | |
13 | +CLFLAGS=/c /D_MBCS /DNDEBUG /DWIN32 /D_WINDOWS /D_WIN32_WINNT=0x0500 /DWINVER=0x0500 /D_CRT_SECURE_NO_DEPRECATE /Fo$@ /MD /nologo /O2 /Zm400 | |
14 | 14 | LNFLAGS=/INCREMENTAL:NO /MACHINE:IX86 /NOLOGO /OUT:$@ /RELEASE /SUBSYSTEM:WINDOWS |
15 | 15 | RCFLAGS=/c1252 /d_MBCS /dNDEBUG /dWIN32 /d_WINDOWS /d_WIN32_WINNT=0x0500 /dWINVER=0x0500 /fo$@ /l0 |
16 | -DEFINES=/DPACKAGE=\"vmaid\" /DVERSION=\"$(VERSION)\" /DBUILD_ENVIRONMENT=\"Windows\" /DENABLE_NLS=1 /DHAVE_FCNTL_H=1 /DHAVE_SYS_STAT_H=1 /DHAVE_SYS_TYPES_H=1 /DSTDC_HEADERS=1 | |
16 | +DEFINES=/DPACKAGE=\"vmaid\" /DVERSION=\"$(VERSION)\" /DBUILD_ENVIRONMENT=\"Windows\" /DENABLE_NLS=1 /DHAVE_FCNTL_H=1 /DHAVE_SYS_STAT_H=1 /DHAVE_SYS_TYPES_H=1 /DSTDC_HEADERS=1 /DUSE_THREAD=1 | |
17 | 17 | INCLUDES=/I$(TOP) |
18 | 18 | |
19 | 19 | all: avicore misc orz src locale\ja\LC_MESSAGES\vmaid.mo vmaid.exe |
@@ -36,8 +36,8 @@ | ||
36 | 36 | if not exist locale\ja\LC_MESSAGES mkdir locale\ja\LC_MESSAGES |
37 | 37 | msgfmt $** -o $@ |
38 | 38 | |
39 | -vmaid.exe: avicore\acm.obj avicore\avibase.obj avicore\aviclip.obj avicore\avicore.obj avicore\aviedit.obj avicore\aviextra.obj avicore\avifile.obj avicore\aviframe.obj avicore\avilang.obj avicore\avimemory.obj avicore\aviopen.obj avicore\avipcm.obj avicore\aviplay.obj avicore\avisave.obj avicore\avitext.obj avicore\chunk.obj avicore\icm.obj avicore\wave.obj misc\argument.obj misc\bitmap.obj misc\fileio.obj misc\gnugpl.obj misc\license.obj misc\misc.obj misc\pixbuf.obj misc\profile.obj misc\winmain.obj orz\orzaccel.obj orz\orzcomm.obj orz\orzhistory.obj orz\orzmdi.obj orz\orzpref.obj orz\orzwinmenu.obj src\change.obj src\codec.obj src\command.obj src\file.obj src\general.obj src\icons.obj src\jump.obj src\keyfile.obj src\menu.obj src\merge.obj src\preview.obj src\prop.obj src\sigfile.obj src\sigmain.obj src\size.obj src\thread.obj src\version.obj src\vmaid.obj | |
40 | - $(LINK) $(LNFLAGS) gdk_pixbuf-2.0.lib gdk-win32-2.0.lib glib-2.0.lib gobject-2.0.lib gtk-win32-2.0.lib intl.lib pango-1.0.lib advapi32.lib gdi32.lib ole32.lib shell32.lib shlwapi.lib user32.lib winmm.lib $** | |
39 | +vmaid.exe: avicore\acm.obj avicore\avibase.obj avicore\aviclip.obj avicore\avicore.obj avicore\aviedit.obj avicore\aviextra.obj avicore\avifile.obj avicore\aviframe.obj avicore\avilang.obj avicore\avimemory.obj avicore\aviopen.obj avicore\avipcm.obj avicore\aviplay.obj avicore\avisave.obj avicore\avitext.obj avicore\chunk.obj avicore\icm.obj avicore\wave.obj misc\argument.obj misc\bitmap.obj misc\fileio.obj misc\gnugpl.obj misc\license.obj misc\misc.obj misc\pixbuf.obj misc\profile.obj misc\winmain.obj orz\orzaccel.obj orz\orzcomm.obj orz\orzhistory.obj orz\orzmdi.obj orz\orzpref.obj orz\orzwinmenu.obj src\change.obj src\codec.obj src\command.obj src\file.obj src\general.obj src\icons.obj src\jump.obj src\keyfile.obj src\menu.obj src\merge.obj src\preview.obj src\prop.obj src\sigfile.obj src\sigmain.obj src\size.obj src\thread.obj src\version.obj src\vmaid.obj src\vmaid.res | |
40 | + $(LINK) $(LNFLAGS) gdk_pixbuf-2.0.lib gdk-win32-2.0.lib glib-2.0.lib gobject-2.0.lib gthread-2.0.lib gtk-win32-2.0.lib intl.lib pango-1.0.lib advapi32.lib gdi32.lib ole32.lib shell32.lib shlwapi.lib user32.lib winmm.lib $** | |
41 | 41 | if exist $@.manifest $(MT) -manifest $@.manifest -outputresource:$@ |
42 | 42 | |
43 | 43 | avicore\acm.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\wave.h |
@@ -193,8 +193,12 @@ | ||
193 | 193 | src\vmaid.obj: $(TOP)\$*.c $(TOP)\$*.h $(TOP)\gcommon.h $(TOP)\avicore\aviclip.h $(TOP)\avicore\avicore.h $(TOP)\avicore\wave.h $(TOP)\misc\argument.h $(TOP)\misc\bitmap.h $(TOP)\misc\gnugpl.h $(TOP)\misc\license.h $(TOP)\misc\misc.h $(TOP)\orz\orzaccel.h $(TOP)\orz\orzcomm.h $(TOP)\orz\orzhistory.h $(TOP)\orz\orzmdi.h $(TOP)\orz\orzwinmenu.h $(TOP)\src\file.h $(TOP)\src\general.h $(TOP)\src\icons.h $(TOP)\src\keyfile.h $(TOP)\src\menu.h $(TOP)\src\sigfile.h $(TOP)\src\sigmain.h $(TOP)\src\thread.h |
194 | 194 | $(CC) $(CLFLAGS) $(DEFINES) $(INCLUDES) $(TOP)\$*.c |
195 | 195 | |
196 | +src\vmaid.res: $(TOP)\$*.rc $(TOP)\$*.ico | |
197 | + $(RC) $(RCFLAGS) $(TOP)\$*.rc | |
198 | + | |
196 | 199 | clean: |
197 | 200 | if exist vmaid.exe del /q vmaid.exe |
201 | + if exist vmaid.exe.manifest del /q vmaid.exe.manifest | |
198 | 202 | if exist avicore\acm.obj del /q avicore\acm.obj |
199 | 203 | if exist avicore\avibase.obj del /q avicore\avibase.obj |
200 | 204 | if exist avicore\aviclip.obj del /q avicore\aviclip.obj |
@@ -246,6 +250,7 @@ | ||
246 | 250 | if exist src\thread.obj del /q src\thread.obj |
247 | 251 | if exist src\version.obj del /q src\version.obj |
248 | 252 | if exist src\vmaid.obj del /q src\vmaid.obj |
253 | + if exist src\vmaid.res del /q src\vmaid.res | |
249 | 254 | if exist locale\ja\LC_MESSAGES\vmaid.mo del /q locale\ja\LC_MESSAGES\vmaid.mo |
250 | 255 | if exist locale\ja\LC_MESSAGES rmdir /q locale\ja\LC_MESSAGES |
251 | 256 | if exist locale\ja rmdir /q locale\ja |
@@ -257,6 +262,8 @@ | ||
257 | 262 | copy /y vmaid.exe vmaid-$(VERSION)-win32\bin |
258 | 263 | mkdir vmaid-$(VERSION)-win32\doc |
259 | 264 | mkdir vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION) |
265 | + mkdir vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)\en | |
266 | + mkdir vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)\ja | |
260 | 267 | copy /y $(TOP)\AUTHORS vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION) |
261 | 268 | copy /y $(TOP)\CONTRIBUTORS vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION) |
262 | 269 | copy /y $(TOP)\COPYING vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION) |
@@ -265,10 +272,12 @@ | ||
265 | 272 | copy /y $(TOP)\INSTALL.ja vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION) |
266 | 273 | copy /y $(TOP)\NEWS vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION) |
267 | 274 | copy /y $(TOP)\README vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION) |
268 | - mkdir vmaid-$(VERSION)-win32\lib | |
269 | - mkdir vmaid-$(VERSION)-win32\lib\locale | |
270 | - mkdir vmaid-$(VERSION)-win32\lib\locale\ja | |
271 | - mkdir vmaid-$(VERSION)-win32\lib\locale\ja\LC_MESSAGES | |
272 | - copy /y locale\ja\LC_MESSAGES\vmaid.mo vmaid-$(VERSION)-win32\lib\locale\ja\LC_MESSAGES | |
275 | + copy /y $(TOP)\doc\en\*.html vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)\en | |
276 | + copy /y $(TOP)\doc\ja\*.html vmaid-$(VERSION)-win32\doc\vmaid-$(VERSION)\ja | |
277 | + mkdir vmaid-$(VERSION)-win32\share | |
278 | + mkdir vmaid-$(VERSION)-win32\share\locale | |
279 | + mkdir vmaid-$(VERSION)-win32\share\locale\ja | |
280 | + mkdir vmaid-$(VERSION)-win32\share\locale\ja\LC_MESSAGES | |
281 | + copy /y locale\ja\LC_MESSAGES\vmaid.mo vmaid-$(VERSION)-win32\share\locale\ja\LC_MESSAGES | |
273 | 282 | zip -9 -r vmaid-$(VERSION)-win32.zip vmaid-$(VERSION)-win32 |
274 | 283 | rmdir /q /s vmaid-$(VERSION)-win32 |
@@ -5,7 +5,7 @@ | ||
5 | 5 | dnl version number |
6 | 6 | MAJOR_VERSION=2 |
7 | 7 | MINOR_VERSION=2 |
8 | -MICRO_VERSION=0 | |
8 | +MICRO_VERSION=1 | |
9 | 9 | EXTRA_VERSION= |
10 | 10 | VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION |
11 | 11 |
@@ -1,6 +1,6 @@ | ||
1 | 1 | /* |
2 | 2 | orzcomm |
3 | - copyright (c) 1998-2008 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
3 | + copyright (c) 1998-2009 Kazuki IWAMOTO http://www.maid.org/ iwm@maid.org | |
4 | 4 | |
5 | 5 | This program is free software: you can redistribute it and/or modify |
6 | 6 | it under the terms of the GNU General Public License as published by |
@@ -433,7 +433,7 @@ | ||
433 | 433 | const gint argc, |
434 | 434 | gchar **argv) |
435 | 435 | { |
436 | - return orz_comm_send_with_files (comm, argc, argv, NULL); | |
436 | + orz_comm_send_with_files (comm, argc, argv, NULL); | |
437 | 437 | } |
438 | 438 | |
439 | 439 |
@@ -4,9 +4,9 @@ | ||
4 | 4 | # |
5 | 5 | msgid "" |
6 | 6 | msgstr "" |
7 | -"Project-Id-Version: vmaid 2.2.0\n" | |
8 | -"Report-Msgid-Bugs-To: \n" | |
9 | -"POT-Creation-Date: 2008-08-27 06:23+0900\n" | |
7 | +"Project-Id-Version: vmaid 2.2.1\n" | |
8 | +"Report-Msgid-Bugs-To: http://www.maid.org/\n" | |
9 | +"POT-Creation-Date: 2008-09-29 00:13+0900\n" | |
10 | 10 | "PO-Revision-Date: 2002-07-25 03:38+0900\n" |
11 | 11 | "Last-Translator: Kazuki IWAMOTO <iwm@maid.org>\n" |
12 | 12 | "Language-Team: Kazuki IWAMOTO <iwm@maid.org>\n" |
@@ -695,7 +695,6 @@ | ||
695 | 695 | msgid "_Recompress" |
696 | 696 | msgstr "再圧縮(_R)" |
697 | 697 | |
698 | -#. ja:ラベル | |
699 | 698 | #: avicore/aviextra.c:915 avicore/aviextra.c:1159 |
700 | 699 | msgid "_Compressor" |
701 | 700 | msgstr "圧縮(_C)" |
@@ -716,7 +715,6 @@ | ||
716 | 715 | msgid "PCM" |
717 | 716 | msgstr "PCM" |
718 | 717 | |
719 | -#. ja:ラジオボタン | |
720 | 718 | #: avicore/aviextra.c:1252 |
721 | 719 | msgid "_AVI" |
722 | 720 | msgstr "AVI(_A)" |
@@ -729,7 +727,6 @@ | ||
729 | 727 | msgid "_Bitmap" |
730 | 728 | msgstr "ビットマップ(_B)" |
731 | 729 | |
732 | -#. ja:ラベル | |
733 | 730 | #: avicore/aviextra.c:1300 |
734 | 731 | msgid "_Start" |
735 | 732 | msgstr "開始(_S)" |
@@ -800,7 +797,6 @@ | ||
800 | 797 | msgid "Frame %d, Time %02d:%02d:%02d" |
801 | 798 | msgstr "フレーム %d, 時間 %02d:%02d:%02d" |
802 | 799 | |
803 | -#. ja:中途半端にライセンスが表示されているとき | |
804 | 800 | #: misc/license.c:75 |
805 | 801 | msgid "Scroll is too fast! Do you really view the license?" |
806 | 802 | msgstr "スクロールが速すぎます! 本当にライセンスを読みましたか?" |
@@ -809,7 +805,6 @@ | ||
809 | 805 | msgid "License" |
810 | 806 | msgstr "ライセンス" |
811 | 807 | |
812 | -#. ja:ラベル | |
813 | 808 | #: misc/license.c:132 |
814 | 809 | msgid "View the license. Please scroll to view the entire license text." |
815 | 810 | msgstr "" |
@@ -816,7 +811,6 @@ | ||
816 | 811 | "ライセンスをお読みください。すべてのライセンス文を読むためにスクロールしてく" |
817 | 812 | "ださい。" |
818 | 813 | |
819 | -#. ja:ラジオボタン | |
820 | 814 | #: misc/license.c:135 |
821 | 815 | msgid "I agree." |
822 | 816 | msgstr "同意する" |
@@ -825,7 +819,6 @@ | ||
825 | 819 | msgid "I deny." |
826 | 820 | msgstr "同意しない" |
827 | 821 | |
828 | -#. ja:チェックボタン | |
829 | 822 | #: orz/orzpref.c:138 |
830 | 823 | msgid "_New File" |
831 | 824 | msgstr "新規ファイルを開く(_N)" |
@@ -834,12 +827,10 @@ | ||
834 | 827 | msgid "_Open Window" |
835 | 828 | msgstr "新規ウインドウを開く(_O)" |
836 | 829 | |
837 | -#. ja:ラベル | |
838 | 830 | #: orz/orzpref.c:169 |
839 | 831 | msgid "H_istory" |
840 | 832 | msgstr "ファイルの履歴(_I)" |
841 | 833 | |
842 | -#. ja:ラベル | |
843 | 834 | #: orz/orzpref.c:170 src/prop.c:297 src/size.c:240 |
844 | 835 | msgid "_Width" |
845 | 836 | msgstr "幅(_W)" |
@@ -848,7 +839,6 @@ | ||
848 | 839 | msgid "_Height" |
849 | 840 | msgstr "高さ(_H)" |
850 | 841 | |
851 | -#. ja:ラジオボタン | |
852 | 842 | #: orz/orzpref.c:176 |
853 | 843 | msgid "_Top" |
854 | 844 | msgstr "上(_T)" |
@@ -865,7 +855,6 @@ | ||
865 | 855 | msgid "_Bottom" |
866 | 856 | msgstr "下(_B)" |
867 | 857 | |
868 | -#. ja:フレームとボックス | |
869 | 858 | #: orz/orzpref.c:192 src/vmaid.c:125 src/sigmain.c:375 |
870 | 859 | msgid "Window Size" |
871 | 860 | msgstr "ウインドウのサイズ" |
@@ -910,7 +899,6 @@ | ||
910 | 899 | msgid "File" |
911 | 900 | msgstr "ファイル" |
912 | 901 | |
913 | -#. ja:リストボックス,時間 | |
914 | 902 | #: src/vmaid.c:335 |
915 | 903 | msgid "Time" |
916 | 904 | msgstr "時間" |
@@ -1118,12 +1106,10 @@ | ||
1118 | 1106 | msgid "32 bits" |
1119 | 1107 | msgstr "32ビット" |
1120 | 1108 | |
1121 | -#. ja:ラベル | |
1122 | 1109 | #: src/prop.c:167 |
1123 | 1110 | msgid "_Frame per second" |
1124 | 1111 | msgstr "1秒間のフレーム数(_F)" |
1125 | 1112 | |
1126 | -#. ja:ラベル | |
1127 | 1113 | #: src/prop.c:294 src/prop.c:453 |
1128 | 1114 | msgid "_Name" |
1129 | 1115 | msgstr "名前(_N)" |
@@ -1152,7 +1138,6 @@ | ||
1152 | 1138 | msgid "_Rate" |
1153 | 1139 | msgstr "レート(_R)" |
1154 | 1140 | |
1155 | -#. ja:ラジオボタン | |
1156 | 1141 | #: src/prop.c:468 |
1157 | 1142 | msgid "_Monophone" |
1158 | 1143 | msgstr "モノラル(_M)" |