Refine debian/rules
[debian/lxappearance.git] / debian / patches / lxappearance-0.4.0+git20100807.patch
CommitLineData
017636fe
AL
1diff --git a/Makefile.am b/Makefile.am
2index ca014cc..01adef9 100644
3--- a/Makefile.am
4+++ b/Makefile.am
5@@ -1,36 +1,7 @@
6 NULL=
7
8-SUBDIRS = src po man
9-
10-ui_in_files= \
11- data/lxappearance.glade \
12- data/demo.glade \
13- $(NULL)
14-uidir=$(datadir)/lxappearance
15-ui_DATA = $(ui_in_files:.glade=.ui)
16-
17-%.ui: %.glade
18- cp $< $@
19-
20-support_scriptdir=$(datadir)/lxappearance
21-support_script_DATA= \
22- scripts/install-icon-theme.sh \
23- $(NULL)
24-
25-desktopdir=$(datadir)/applications
26-desktop_in_files=lxappearance.desktop.in
27-desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
28-@INTLTOOL_DESKTOP_RULE@
29-
30-install-data-hook:
31- for script in $(DESTDIR)$(support_scriptdir)/*.sh; do \
32- chmod +x $$script; \
33- done
34+SUBDIRS=src po data
35
36 EXTRA_DIST = \
37- autogen.sh \
38- $(ui_DATA) \
39- $(support_script_DATA) \
40- $(desktop_DATA) \
41 $(NULL)
42
43diff --git a/autogen.sh b/autogen.sh
44index 869cae8..aaaed56 100755
45--- a/autogen.sh
46+++ b/autogen.sh
47@@ -7,7 +7,7 @@ AM_INSTALLED_VERSION=$($AUTOMAKE --version | sed -e '2,$ d' -e 's/.* \([0-9]*\.[
48 if [ "$AM_INSTALLED_VERSION" != "1.10" \
49 -a "$AM_INSTALLED_VERSION" != "1.11" ];then
50 echo
51- echo "You must have automake > 1.10 or 1.11 installed to compile lxappearance."
52+ echo "You must have automake > 1.10 or 1.11 installed to compile this program."
53 echo "Install the appropriate package for your distribution,"
54 echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
55 exit 1
56diff --git a/configure.ac b/configure.ac
57new file mode 100644
58index 0000000..a80dbe5
59--- /dev/null
60+++ b/configure.ac
61@@ -0,0 +1,114 @@
62+# -*- Autoconf -*-
63+# Process this file with autoconf to produce a configure script.
64+
65+prog_name = lxappearance
66+
67+AC_PREREQ([2.63])
68+AC_INIT([lxappearance], [0.5.0], [http://lxde.org/])
69+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
70+
71+AC_CONFIG_HEADERS([config.h])
72+
73+# Checks for programs.
74+AC_PROG_CC
75+# AM_PROG_LIBTOOL
76+
77+# Checks for libraries.
78+
79+# Checks for header files.
80+AC_HEADER_STDC
81+
82+# Checks for typedefs, structures, and compiler characteristics.
83+
84+# Checks for library functions.
85+
86+# intltool
87+IT_PROG_INTLTOOL([0.40.0])
88+
89+PKG_CHECK_MODULES(XLIB, "x11")
90+AC_SUBST(XLIB_CFLAGS)
91+AC_SUBST(XLIB_LIBS)
92+
93+gtk_modules="gtk+-2.0 >= 2.12.0 gthread-2.0"
94+PKG_CHECK_MODULES(GTK, [$gtk_modules])
95+AC_SUBST(GTK_CFLAGS)
96+AC_SUBST(GTK_LIBS)
97+
98+gmodule_modules="gmodule-export-2.0"
99+PKG_CHECK_MODULES(GMODULE, [$gmodule_modules])
100+AC_SUBST(GMODULE_CFLAGS)
101+AC_SUBST(GMODULE_LIBS)
102+
103+# gio_modules="gthread-2.0 gio-unix-2.0 glib-2.0 >= 2.18.0"
104+# PKG_CHECK_MODULES(GIO, [$gio_modules])
105+# AC_SUBST(GIO_CFLAGS)
106+# AC_SUBST(GIO_LIBS)
107+
108+# menu_modules="libmenu-cache >= 0.3.2"
109+# PKG_CHECK_MODULES(MENU_CACHE, [$menu_modules])
110+# AC_SUBST(MENU_CACHE_CFLAGS)
111+# AC_SUBST(MENU_CACHE_LIBS)
112+
113+AC_ARG_ENABLE(debug,
114+ [AC_HELP_STRING([--enable-debug],
115+ [build libfm with debug support @<:@default=no@:>@])],
116+ [enable_debug="${enableval}"],
117+ [enable_debug=no]
118+)
119+if test "$enable_debug" = "yes"; then
120+ # turn on debug and disable optimization
121+ CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG -O0 -g"
122+else
123+ # turn off glib debug checks
124+ CPPFLAGS="$CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
125+fi
126+
127+# Generate po/LINGUAS on the fly rather than relying on translators
128+# to maintain it manually. This also overcome the problem that Transifex
129+# cannot add a language to po/LINGUAS if a new po file is submitted.
130+rm -f $srcdir/po/LINGUAS
131+for po_file in `ls $srcdir/po/*.po | sort`;
132+do
133+ lang=`echo "$po_file" | sed "s|.*/po/\(.*\)\.po|\1|g"`
134+ echo $lang >> $srcdir/po/LINGUAS
135+done
136+
137+GETTEXT_PACKAGE=lxappearance
138+AC_SUBST(GETTEXT_PACKAGE)
139+AM_GLIB_GNU_GETTEXT
140+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
141+
142+AC_CONFIG_FILES([
143+ Makefile
144+ src/Makefile
145+ data/Makefile
146+ data/ui/Makefile
147+ data/ui/about.glade
148+ data/lxappearance.pc
149+ po/Makefile.in
150+])
151+
152+AC_OUTPUT
153+
154+if test x"$sysconfdir" != x'/etc'; then
155+ echo
156+ echo
157+ echo 'Error: sysconfdir is not /etc.'
158+ echo 'Please consider passing --sysconfdir=/etc to configure.';
159+ echo 'Otherwise default config files will be installed to wrong place.'
160+ echo
161+ echo
162+else
163+ echo
164+ echo lxappearance....................... : Version $VERSION
165+ echo
166+ echo Enable debug....................: "$enable_debug"
167+ echo Prefix..........................: $prefix
168+ echo
169+ echo The binary will be installed in $prefix/bin
170+ echo
171+ echo http://lxde.org/
172+ echo
173+ echo "Ready to make lxappearance. Type 'make' to continue."
174+ echo
175+fi
176diff --git a/data/Makefile.am b/data/Makefile.am
177new file mode 100644
178index 0000000..06ccfdd
179--- /dev/null
180+++ b/data/Makefile.am
181@@ -0,0 +1,19 @@
182+NULL=
183+
184+SUBDIRS= \
185+ ui \
186+ $(NULL)
187+
188+pkgconfigdir = $(libdir)/pkgconfig
189+pkgconfig_DATA = lxappearance.pc
190+
191+desktopdir=$(datadir)/applications
192+desktop_in_files = \
193+ lxappearance.desktop.in \
194+ $(NULL)
195+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
196+@INTLTOOL_DESKTOP_RULE@
197+
198+EXTRA_DIST= \
199+ $(desktop_DATA) \
200+ $(NULL)
201diff --git a/data/lxappearance.desktop.in b/data/lxappearance.desktop.in
202new file mode 100644
203index 0000000..39f22bf
204--- /dev/null
205+++ b/data/lxappearance.desktop.in
206@@ -0,0 +1,9 @@
207+[Desktop Entry]
208+Type=Application
209+_Name=Customize Look and Feel
210+_GenericName=Customize Look and Feel
211+_Comment=Customizes look and feel of your desktop and applications
212+Icon=preferences-desktop-theme
213+Exec=lxappearance
214+StartupNotify=true
215+Categories=Settings;DesktopSettings;GTK;X-LXDE-Settings;
216diff --git a/data/lxappearance.pc.in b/data/lxappearance.pc.in
217new file mode 100644
218index 0000000..9abd35e
219--- /dev/null
220+++ b/data/lxappearance.pc.in
221@@ -0,0 +1,10 @@
222+prefix=@prefix@
223+exec_prefix=@exec_prefix@
224+libdir=@libdir@
225+includedir=@includedir@
226+datadir=@datadir@
227+
228+Name: lxappearance
229+Description: Tool used to customize look and feel of gtk+ applications.
230+Requires: gtk+-2.0 >= 2.12
231+Version: @VERSION@
232diff --git a/data/ui/Makefile.am b/data/ui/Makefile.am
233new file mode 100644
234index 0000000..f14c11f
235--- /dev/null
236+++ b/data/ui/Makefile.am
237@@ -0,0 +1,22 @@
238+NULL=
239+
240+# GtkBuilder UI definition files
241+uidir=$(datadir)/lxappearance/ui
242+ui_in_files= \
243+ about.glade \
244+ lxappearance.glade \
245+ $(NULL)
246+ui_DATA = $(ui_in_files:.glade=.ui)
247+
248+CLEANFILES = \
249+ $(ui_DATA) \
250+ $(NULL)
251+
252+# Purge GtkBuilder UI files
253+%.ui: %.glade
254+ cp $< $@
255+ $(top_srcdir)/src/xml-purge $@
256+
257+EXTRA_DIST= \
258+ $(ui_DATA) \
259+ $(NULL)
260diff --git a/data/ui/about.glade.in b/data/ui/about.glade.in
261new file mode 100644
262index 0000000..0227724
263--- /dev/null
264+++ b/data/ui/about.glade.in
265@@ -0,0 +1,52 @@
266+<?xml version="1.0"?>
267+<interface>
268+ <!-- interface-requires gtk+ 2.12 -->
269+ <!-- interface-naming-policy toplevel-contextual -->
270+ <object class="GtkAboutDialog" id="dlg">
271+ <property name="border_width">5</property>
272+ <property name="window_position">center-on-parent</property>
273+ <property name="type_hint">dialog</property>
274+ <property name="has_separator">False</property>
275+ <property name="program_name">LXAppearance</property>
276+ <property name="version">@VERSION@</property>
277+ <property name="copyright" translatable="yes">Copyright (C) 2010 LXDE Project</property>
278+ <property name="comments" translatable="yes">Customizes look and feel of your desktop</property>
279+ <property name="website">http://lxde.org/</property>
280+ <property name="license">Copyright (C) 2010 LXDE Team
281+
282+This program is free software; you can redistribute it and/or
283+modify it under the terms of the GNU General Public License
284+as published by the Free Software Foundation; either version 2
285+of the License, or (at your option) any later version.
286+
287+This program is distributed in the hope that it will be useful,
288+but WITHOUT ANY WARRANTY; without even the implied warranty of
289+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
290+GNU General Public License for more details.
291+
292+You should have received a copy of the GNU General Public License
293+along with this program; if not, write to the Free Software
294+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</property>
295+ <property name="authors">&#x6D2A;&#x4EFB;&#x8AED; Hong Jen Yee (PCMan) &lt;pcman.tw@gmail.com&gt;</property>
296+ <property name="translator_credits" translatable="yes" comments="Please replace this line with your own names, one name per line. ">translator-credits</property>
297+ <property name="artists"></property>
298+ <property name="wrap_license">True</property>
299+ <child internal-child="vbox">
300+ <object class="GtkVBox" id="dialog-vbox1">
301+ <property name="visible">True</property>
302+ <property name="spacing">2</property>
303+ <child internal-child="action_area">
304+ <object class="GtkHButtonBox" id="dialog-action_area1">
305+ <property name="visible">True</property>
306+ <property name="layout_style">end</property>
307+ </object>
308+ <packing>
309+ <property name="expand">False</property>
310+ <property name="pack_type">end</property>
311+ <property name="position">0</property>
312+ </packing>
313+ </child>
314+ </object>
315+ </child>
316+ </object>
317+</interface>
318diff --git a/data/ui/lxappearance.glade b/data/ui/lxappearance.glade
319new file mode 100644
320index 0000000..b65bb40
321--- /dev/null
322+++ b/data/ui/lxappearance.glade
323@@ -0,0 +1,1588 @@
324+<?xml version="1.0"?>
325+<interface>
326+ <requires lib="gtk+" version="2.16"/>
327+ <!-- interface-naming-policy project-wide -->
328+ <object class="GtkAdjustment" id="cursor_size_adj">
329+ <property name="lower">1</property>
330+ <property name="upper">138</property>
331+ <property name="step_increment">1</property>
332+ <property name="page_increment">10</property>
333+ <property name="page_size">10</property>
334+ </object>
335+ <object class="GtkListStore" id="icon_demo_store">
336+ <columns>
337+ <!-- column-name icon-name -->
338+ <column type="gchararray"/>
339+ </columns>
340+ <data>
341+ <row>
342+ <col id="0">user-home</col>
343+ </row>
344+ <row>
345+ <col id="0">user-desktop</col>
346+ </row>
347+ <row>
348+ <col id="0">folder</col>
349+ </row>
350+ <row>
351+ <col id="0">folder-remote</col>
352+ </row>
353+ <row>
354+ <col id="0">user-trash</col>
355+ </row>
356+ <row>
357+ <col id="0">x-office-document</col>
358+ </row>
359+ <row>
360+ <col id="0">application-x-executable</col>
361+ </row>
362+ <row>
363+ <col id="0">image-x-generic</col>
364+ </row>
365+ <row>
366+ <col id="0">text-x-generic</col>
367+ </row>
368+ <row>
369+ <col id="0">text-html</col>
370+ </row>
371+ </data>
372+ </object>
373+ <object class="GtkListStore" id="tb_style_store">
374+ <columns>
375+ <!-- column-name item -->
376+ <column type="gchararray"/>
377+ </columns>
378+ <data>
379+ <row>
380+ <col id="0" translatable="yes">Icons only</col>
381+ </row>
382+ <row>
383+ <col id="0" translatable="yes">Text only</col>
384+ </row>
385+ <row>
386+ <col id="0" translatable="yes">Text below icons</col>
387+ </row>
388+ <row>
389+ <col id="0" translatable="yes">Text beside icons</col>
390+ </row>
391+ </data>
392+ </object>
393+ <object class="GtkListStore" id="tb_icon_size_store">
394+ <columns>
395+ <!-- column-name name -->
396+ <column type="gchararray"/>
397+ </columns>
398+ <data>
399+ <row>
400+ <col id="0" translatable="yes">Same as menu items</col>
401+ </row>
402+ <row>
403+ <col id="0" translatable="yes">Small toolbar icon</col>
404+ </row>
405+ <row>
406+ <col id="0" translatable="yes">Large toolbar icon</col>
407+ </row>
408+ <row>
409+ <col id="0" translatable="yes">Same as buttons</col>
410+ </row>
411+ <row>
412+ <col id="0" translatable="yes">Same as drag icons</col>
413+ </row>
414+ <row>
415+ <col id="0" translatable="yes">Same as dialogs</col>
416+ </row>
417+ </data>
418+ </object>
419+ <object class="GtkDialog" id="dlg">
420+ <property name="border_width">5</property>
421+ <property name="title" translatable="yes">Customize Look and Feel</property>
422+ <property name="default_width">540</property>
423+ <property name="icon_name">preferences-desktop-theme</property>
424+ <property name="type_hint">normal</property>
425+ <property name="has_separator">False</property>
426+ <child internal-child="vbox">
427+ <object class="GtkVBox" id="dialog-vbox1">
428+ <property name="visible">True</property>
429+ <property name="spacing">2</property>
430+ <child>
431+ <object class="GtkNotebook" id="notebook">
432+ <property name="visible">True</property>
433+ <property name="can_focus">True</property>
434+ <child>
435+ <object class="GtkHBox" id="hbox2">
436+ <property name="visible">True</property>
437+ <property name="border_width">12</property>
438+ <property name="spacing">6</property>
439+ <child>
440+ <object class="GtkScrolledWindow" id="scrolledwindow2">
441+ <property name="width_request">150</property>
442+ <property name="visible">True</property>
443+ <property name="can_focus">True</property>
444+ <property name="hscrollbar_policy">automatic</property>
445+ <property name="vscrollbar_policy">automatic</property>
446+ <property name="shadow_type">etched-in</property>
447+ <child>
448+ <object class="GtkTreeView" id="widget_theme_view">
449+ <property name="visible">True</property>
450+ <property name="can_focus">True</property>
451+ <property name="has_focus">True</property>
452+ <property name="headers_visible">False</property>
453+ <child>
454+ <object class="GtkTreeViewColumn" id="treeviewcolumn3">
455+ <child>
456+ <object class="GtkCellRendererText" id="cellrenderertext7"/>
457+ <attributes>
458+ <attribute name="text">0</attribute>
459+ </attributes>
460+ </child>
461+ </object>
462+ </child>
463+ </object>
464+ </child>
465+ </object>
466+ <packing>
467+ <property name="position">0</property>
468+ </packing>
469+ </child>
470+ <child>
471+ <object class="GtkVBox" id="vbox6">
472+ <property name="visible">True</property>
473+ <property name="spacing">6</property>
474+ <child>
475+ <object class="GtkLabel" id="label11">
476+ <property name="visible">True</property>
477+ <property name="xalign">0</property>
478+ <property name="label" translatable="yes">Preview of the selected widget style</property>
479+ </object>
480+ <packing>
481+ <property name="expand">False</property>
482+ <property name="position">0</property>
483+ </packing>
484+ </child>
485+ <child>
486+ <object class="GtkFrame" id="frame1">
487+ <property name="visible">True</property>
488+ <property name="label_xalign">0</property>
489+ <child>
490+ <object class="GtkEventBox" id="demo">
491+ <property name="visible">True</property>
492+ <child>
493+ <object class="GtkEventBox" id="eventbox1">
494+ <property name="visible">True</property>
495+ <property name="border_width">10</property>
496+ <child>
497+ <object class="GtkVBox" id="demo_vbox">
498+ <property name="visible">True</property>
499+ <property name="border_width">2</property>
500+ <child>
501+ <object class="GtkMenuBar" id="menubar1">
502+ <property name="visible">True</property>
503+ <child>
504+ <object class="GtkMenuItem" id="menuitem1">
505+ <property name="visible">True</property>
506+ <property name="label" translatable="yes">_File</property>
507+ <property name="use_underline">True</property>
508+ <child type="submenu">
509+ <object class="GtkMenu" id="menuitem1_menu">
510+ <child>
511+ <object class="GtkImageMenuItem" id="new1">
512+ <property name="label">gtk-new</property>
513+ <property name="visible">True</property>
514+ <property name="use_underline">True</property>
515+ <property name="use_stock">True</property>
516+ </object>
517+ </child>
518+ <child>
519+ <object class="GtkImageMenuItem" id="open1">
520+ <property name="label">gtk-open</property>
521+ <property name="visible">True</property>
522+ <property name="use_underline">True</property>
523+ <property name="use_stock">True</property>
524+ </object>
525+ </child>
526+ <child>
527+ <object class="GtkImageMenuItem" id="save1">
528+ <property name="label">gtk-save</property>
529+ <property name="visible">True</property>
530+ <property name="use_underline">True</property>
531+ <property name="use_stock">True</property>
532+ </object>
533+ </child>
534+ <child>
535+ <object class="GtkImageMenuItem" id="save_as1">
536+ <property name="label">gtk-save-as</property>
537+ <property name="visible">True</property>
538+ <property name="use_underline">True</property>
539+ <property name="use_stock">True</property>
540+ </object>
541+ </child>
542+ <child>
543+ <object class="GtkSeparatorMenuItem" id="separatormenuitem1">
544+ <property name="visible">True</property>
545+ </object>
546+ </child>
547+ <child>
548+ <object class="GtkImageMenuItem" id="quit1">
549+ <property name="label">gtk-quit</property>
550+ <property name="visible">True</property>
551+ <property name="use_underline">True</property>
552+ <property name="use_stock">True</property>
553+ </object>
554+ </child>
555+ </object>
556+ </child>
557+ </object>
558+ </child>
559+ <child>
560+ <object class="GtkMenuItem" id="menuitem2">
561+ <property name="visible">True</property>
562+ <property name="label" translatable="yes">_Edit</property>
563+ <property name="use_underline">True</property>
564+ <child type="submenu">
565+ <object class="GtkMenu" id="menuitem2_menu">
566+ <child>
567+ <object class="GtkImageMenuItem" id="cut1">
568+ <property name="label">gtk-cut</property>
569+ <property name="visible">True</property>
570+ <property name="use_underline">True</property>
571+ <property name="use_stock">True</property>
572+ </object>
573+ </child>
574+ <child>
575+ <object class="GtkImageMenuItem" id="copy1">
576+ <property name="label">gtk-copy</property>
577+ <property name="visible">True</property>
578+ <property name="use_underline">True</property>
579+ <property name="use_stock">True</property>
580+ </object>
581+ </child>
582+ <child>
583+ <object class="GtkImageMenuItem" id="paste1">
584+ <property name="label">gtk-paste</property>
585+ <property name="visible">True</property>
586+ <property name="use_underline">True</property>
587+ <property name="use_stock">True</property>
588+ </object>
589+ </child>
590+ <child>
591+ <object class="GtkImageMenuItem" id="delete1">
592+ <property name="label">gtk-delete</property>
593+ <property name="visible">True</property>
594+ <property name="use_underline">True</property>
595+ <property name="use_stock">True</property>
596+ </object>
597+ </child>
598+ </object>
599+ </child>
600+ </object>
601+ </child>
602+ <child>
603+ <object class="GtkMenuItem" id="menuitem4">
604+ <property name="visible">True</property>
605+ <property name="label" translatable="yes">_Help</property>
606+ <property name="use_underline">True</property>
607+ <child type="submenu">
608+ <object class="GtkMenu" id="menuitem4_menu">
609+ <child>
610+ <object class="GtkImageMenuItem" id="about1">
611+ <property name="label">gtk-about</property>
612+ <property name="visible">True</property>
613+ <property name="use_underline">True</property>
614+ <property name="use_stock">True</property>
615+ </object>
616+ </child>
617+ </object>
618+ </child>
619+ </object>
620+ </child>
621+ </object>
622+ <packing>
623+ <property name="expand">False</property>
624+ <property name="fill">False</property>
625+ <property name="position">0</property>
626+ </packing>
627+ </child>
628+ <child>
629+ <object class="GtkHandleBox" id="handlebox1">
630+ <property name="visible">True</property>
631+ <child>
632+ <object class="GtkToolbar" id="toolbar">
633+ <property name="visible">True</property>
634+ <property name="toolbar_style">icons</property>
635+ <property name="show_arrow">False</property>
636+ <child>
637+ <object class="GtkToolButton" id="toolbutton1">
638+ <property name="visible">True</property>
639+ <property name="is_important">True</property>
640+ <property name="stock_id">gtk-go-back</property>
641+ </object>
642+ <packing>
643+ <property name="expand">False</property>
644+ <property name="homogeneous">True</property>
645+ </packing>
646+ </child>
647+ <child>
648+ <object class="GtkToolButton" id="toolbutton2">
649+ <property name="visible">True</property>
650+ <property name="stock_id">gtk-go-forward</property>
651+ </object>
652+ <packing>
653+ <property name="expand">False</property>
654+ <property name="homogeneous">True</property>
655+ </packing>
656+ </child>
657+ <child>
658+ <object class="GtkToolButton" id="toolbutton3">
659+ <property name="visible">True</property>
660+ <property name="is_important">True</property>
661+ <property name="stock_id">gtk-stop</property>
662+ </object>
663+ <packing>
664+ <property name="expand">False</property>
665+ <property name="homogeneous">True</property>
666+ </packing>
667+ </child>
668+ <child>
669+ <object class="GtkToolItem" id="toolbutton4">
670+ <property name="visible">True</property>
671+ <child>
672+ <object class="GtkEntry" id="entry1">
673+ <property name="visible">True</property>
674+ <property name="can_focus">True</property>
675+ <property name="invisible_char">&#x25CF;</property>
676+ </object>
677+ </child>
678+ </object>
679+ <packing>
680+ <property name="expand">True</property>
681+ <property name="homogeneous">True</property>
682+ </packing>
683+ </child>
684+ </object>
685+ </child>
686+ </object>
687+ <packing>
688+ <property name="expand">False</property>
689+ <property name="fill">False</property>
690+ <property name="position">1</property>
691+ </packing>
692+ </child>
693+ <child>
694+ <object class="GtkNotebook" id="notebook2">
695+ <property name="visible">True</property>
696+ <property name="can_focus">True</property>
697+ <property name="border_width">5</property>
698+ <child>
699+ <object class="GtkHBox" id="hbox3">
700+ <property name="visible">True</property>
701+ <child>
702+ <object class="GtkFrame" id="frame2">
703+ <property name="visible">True</property>
704+ <property name="border_width">4</property>
705+ <property name="label_xalign">0</property>
706+ <child>
707+ <object class="GtkAlignment" id="alignment2">
708+ <property name="visible">True</property>
709+ <property name="bottom_padding">4</property>
710+ <property name="left_padding">4</property>
711+ <child>
712+ <object class="GtkVBox" id="vbox7">
713+ <property name="visible">True</property>
714+ <property name="spacing">4</property>
715+ <child>
716+ <object class="GtkRadioButton" id="radiobutton1">
717+ <property name="label" translatable="yes">Radio Button</property>
718+ <property name="visible">True</property>
719+ <property name="can_focus">True</property>
720+ <property name="receives_default">False</property>
721+ <property name="use_underline">True</property>
722+ <property name="draw_indicator">True</property>
723+ </object>
724+ <packing>
725+ <property name="expand">False</property>
726+ <property name="fill">False</property>
727+ <property name="position">0</property>
728+ </packing>
729+ </child>
730+ <child>
731+ <object class="GtkCheckButton" id="checkbutton1">
732+ <property name="label" translatable="yes">Check Button</property>
733+ <property name="visible">True</property>
734+ <property name="can_focus">True</property>
735+ <property name="receives_default">False</property>
736+ <property name="use_underline">True</property>
737+ <property name="draw_indicator">True</property>
738+ </object>
739+ <packing>
740+ <property name="expand">False</property>
741+ <property name="fill">False</property>
742+ <property name="position">1</property>
743+ </packing>
744+ </child>
745+ <child>
746+ <object class="GtkHBox" id="hbox4">
747+ <property name="visible">True</property>
748+ <child>
749+ <object class="GtkSpinButton" id="spinbutton1">
750+ <property name="visible">True</property>
751+ <property name="can_focus">True</property>
752+ <property name="invisible_char">&#x25CF;</property>
753+ <property name="climb_rate">1</property>
754+ </object>
755+ <packing>
756+ <property name="position">0</property>
757+ </packing>
758+ </child>
759+ <child>
760+ <object class="GtkButton" id="button1">
761+ <property name="visible">True</property>
762+ <property name="can_focus">True</property>
763+ <property name="receives_default">True</property>
764+ <child>
765+ <object class="GtkAlignment" id="alignment3">
766+ <property name="visible">True</property>
767+ <property name="xscale">0</property>
768+ <property name="yscale">0</property>
769+ <child>
770+ <object class="GtkHBox" id="hbox6">
771+ <property name="visible">True</property>
772+ <property name="spacing">2</property>
773+ <child>
774+ <object class="GtkImage" id="image1">
775+ <property name="visible">True</property>
776+ <property name="stock">gtk-find</property>
777+ </object>
778+ <packing>
779+ <property name="expand">False</property>
780+ <property name="fill">False</property>
781+ <property name="position">0</property>
782+ </packing>
783+ </child>
784+ <child>
785+ <object class="GtkLabel" id="label18">
786+ <property name="visible">True</property>
787+ <property name="label" translatable="yes">button</property>
788+ <property name="use_underline">True</property>
789+ </object>
790+ <packing>
791+ <property name="expand">False</property>
792+ <property name="fill">False</property>
793+ <property name="position">1</property>
794+ </packing>
795+ </child>
796+ </object>
797+ </child>
798+ </object>
799+ </child>
800+ </object>
801+ <packing>
802+ <property name="expand">False</property>
803+ <property name="fill">False</property>
804+ <property name="position">1</property>
805+ </packing>
806+ </child>
807+ </object>
808+ <packing>
809+ <property name="expand">False</property>
810+ <property name="position">2</property>
811+ </packing>
812+ </child>
813+ </object>
814+ </child>
815+ </object>
816+ </child>
817+ <child type="label">
818+ <object class="GtkLabel" id="label16">
819+ <property name="visible">True</property>
820+ <property name="label" translatable="yes">Demo</property>
821+ <property name="use_markup">True</property>
822+ </object>
823+ </child>
824+ </object>
825+ <packing>
826+ <property name="position">0</property>
827+ </packing>
828+ </child>
829+ <child>
830+ <object class="GtkVBox" id="vbox9">
831+ <property name="visible">True</property>
832+ <property name="border_width">4</property>
833+ <child>
834+ <object class="GtkProgressBar" id="progressbar1">
835+ <property name="visible">True</property>
836+ <property name="show_text">True</property>
837+ <property name="fraction">0.60000002384200002</property>
838+ <property name="pulse_step">0.10000000149</property>
839+ <property name="text">60 %</property>
840+ </object>
841+ <packing>
842+ <property name="expand">False</property>
843+ <property name="fill">False</property>
844+ <property name="position">0</property>
845+ </packing>
846+ </child>
847+ <child>
848+ <object class="GtkHScale" id="hscale1">
849+ <property name="visible">True</property>
850+ <property name="can_focus">True</property>
851+ </object>
852+ <packing>
853+ <property name="expand">False</property>
854+ <property name="position">1</property>
855+ </packing>
856+ </child>
857+ <child>
858+ <object class="GtkComboBox" id="combobox2">
859+ <property name="visible">True</property>
860+ <child>
861+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
862+ <attributes>
863+ <attribute name="text">0</attribute>
864+ </attributes>
865+ </child>
866+ </object>
867+ <packing>
868+ <property name="expand">False</property>
869+ <property name="position">2</property>
870+ </packing>
871+ </child>
872+ </object>
873+ <packing>
874+ <property name="position">1</property>
875+ </packing>
876+ </child>
877+ </object>
878+ </child>
879+ <child type="tab">
880+ <object class="GtkLabel" id="label13">
881+ <property name="visible">True</property>
882+ <property name="label" translatable="yes">Page1</property>
883+ </object>
884+ <packing>
885+ <property name="tab_fill">False</property>
886+ </packing>
887+ </child>
888+ <child>
889+ <object class="GtkScrolledWindow" id="scrolledwindow6">
890+ <property name="visible">True</property>
891+ <property name="can_focus">True</property>
892+ <property name="hscrollbar_policy">never</property>
893+ <property name="shadow_type">in</property>
894+ <child>
895+ <object class="GtkTreeView" id="demo_treeview">
896+ <property name="visible">True</property>
897+ <property name="can_focus">True</property>
898+ <property name="model">icon_demo_store</property>
899+ <property name="headers_clickable">False</property>
900+ <property name="rules_hint">True</property>
901+ <child>
902+ <object class="GtkTreeViewColumn" id="treeviewcolumn1">
903+ <property name="title">column</property>
904+ <child>
905+ <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
906+ <attributes>
907+ <attribute name="icon-name">0</attribute>
908+ </attributes>
909+ </child>
910+ </object>
911+ </child>
912+ <child>
913+ <object class="GtkTreeViewColumn" id="treeviewcolumn2">
914+ <property name="title">column</property>
915+ <child>
916+ <object class="GtkCellRendererText" id="cellrenderertext6"/>
917+ <attributes>
918+ <attribute name="text">0</attribute>
919+ </attributes>
920+ </child>
921+ </object>
922+ </child>
923+ </object>
924+ </child>
925+ </object>
926+ <packing>
927+ <property name="position">1</property>
928+ </packing>
929+ </child>
930+ <child type="tab">
931+ <object class="GtkLabel" id="label14">
932+ <property name="visible">True</property>
933+ <property name="label" translatable="yes">Page2</property>
934+ </object>
935+ <packing>
936+ <property name="position">1</property>
937+ <property name="tab_fill">False</property>
938+ </packing>
939+ </child>
940+ </object>
941+ <packing>
942+ <property name="position">2</property>
943+ </packing>
944+ </child>
945+ <child>
946+ <object class="GtkStatusbar" id="statusbar1">
947+ <property name="visible">True</property>
948+ <property name="spacing">2</property>
949+ </object>
950+ <packing>
951+ <property name="expand">False</property>
952+ <property name="fill">False</property>
953+ <property name="position">3</property>
954+ </packing>
955+ </child>
956+ </object>
957+ </child>
958+ </object>
959+ </child>
960+ </object>
961+ </child>
962+ <child type="label_item">
963+ <placeholder/>
964+ </child>
965+ </object>
966+ <packing>
967+ <property name="expand">False</property>
968+ <property name="position">1</property>
969+ </packing>
970+ </child>
971+ <child>
972+ <object class="GtkHBox" id="hbox8">
973+ <property name="visible">True</property>
974+ <property name="spacing">12</property>
975+ <child>
976+ <object class="GtkLabel" id="label12">
977+ <property name="visible">True</property>
978+ <property name="xalign">0</property>
979+ <property name="label" translatable="yes">Default font:</property>
980+ </object>
981+ <packing>
982+ <property name="expand">False</property>
983+ <property name="position">0</property>
984+ </packing>
985+ </child>
986+ <child>
987+ <object class="GtkFontButton" id="default_font">
988+ <property name="visible">True</property>
989+ <property name="can_focus">True</property>
990+ <property name="receives_default">True</property>
991+ </object>
992+ <packing>
993+ <property name="position">1</property>
994+ </packing>
995+ </child>
996+ </object>
997+ <packing>
998+ <property name="expand">False</property>
999+ <property name="position">2</property>
1000+ </packing>
1001+ </child>
1002+ </object>
1003+ <packing>
1004+ <property name="position">1</property>
1005+ </packing>
1006+ </child>
1007+ </object>
1008+ </child>
1009+ <child type="tab">
1010+ <object class="GtkLabel" id="label1">
1011+ <property name="visible">True</property>
1012+ <property name="label" translatable="yes">Widget</property>
1013+ </object>
1014+ <packing>
1015+ <property name="tab_fill">False</property>
1016+ </packing>
1017+ </child>
1018+ <child>
1019+ <object class="GtkVBox" id="color_page">
1020+ <property name="visible">True</property>
1021+ <property name="border_width">12</property>
1022+ <property name="spacing">6</property>
1023+ <child>
1024+ <object class="GtkLabel" id="no_custom_colors">
1025+ <property name="xalign">0</property>
1026+ <property name="label" translatable="yes">Color scheme is not supported by currently selected widget theme.</property>
1027+ </object>
1028+ <packing>
1029+ <property name="expand">False</property>
1030+ <property name="position">0</property>
1031+ </packing>
1032+ </child>
1033+ <child>
1034+ <object class="GtkCheckButton" id="custom_colors">
1035+ <property name="label" translatable="yes">Use customized color scheme</property>
1036+ <property name="visible">True</property>
1037+ <property name="can_focus">True</property>
1038+ <property name="receives_default">False</property>
1039+ <property name="draw_indicator">True</property>
1040+ </object>
1041+ <packing>
1042+ <property name="expand">False</property>
1043+ <property name="position">1</property>
1044+ </packing>
1045+ </child>
1046+ <child>
1047+ <object class="GtkTable" id="color_table">
1048+ <property name="visible">True</property>
1049+ <property name="n_rows">5</property>
1050+ <property name="n_columns">3</property>
1051+ <property name="column_spacing">12</property>
1052+ <property name="row_spacing">6</property>
1053+ <child>
1054+ <object class="GtkLabel" id="label3">
1055+ <property name="visible">True</property>
1056+ <property name="xalign">0</property>
1057+ <property name="label" translatable="yes">Normal windows:</property>
1058+ </object>
1059+ <packing>
1060+ <property name="top_attach">1</property>
1061+ <property name="bottom_attach">2</property>
1062+ <property name="x_options">GTK_FILL</property>
1063+ <property name="y_options">GTK_FILL</property>
1064+ </packing>
1065+ </child>
1066+ <child>
1067+ <object class="GtkLabel" id="label8">
1068+ <property name="visible">True</property>
1069+ <property name="xalign">0</property>
1070+ <property name="label" translatable="yes">Text windows:</property>
1071+ </object>
1072+ <packing>
1073+ <property name="top_attach">2</property>
1074+ <property name="bottom_attach">3</property>
1075+ <property name="x_options">GTK_FILL</property>
1076+ <property name="y_options">GTK_FILL</property>
1077+ </packing>
1078+ </child>
1079+ <child>
1080+ <object class="GtkLabel" id="label15">
1081+ <property name="visible">True</property>
1082+ <property name="xalign">0</property>
1083+ <property name="label" translatable="yes">Selected items:</property>
1084+ </object>
1085+ <packing>
1086+ <property name="top_attach">3</property>
1087+ <property name="bottom_attach">4</property>
1088+ <property name="x_options">GTK_FILL</property>
1089+ <property name="y_options">GTK_FILL</property>
1090+ </packing>
1091+ </child>
1092+ <child>
1093+ <object class="GtkLabel" id="label17">
1094+ <property name="visible">True</property>
1095+ <property name="xalign">0</property>
1096+ <property name="label" translatable="yes">Tooltips:</property>
1097+ </object>
1098+ <packing>
1099+ <property name="top_attach">4</property>
1100+ <property name="bottom_attach">5</property>
1101+ <property name="x_options">GTK_FILL</property>
1102+ <property name="y_options">GTK_FILL</property>
1103+ </packing>
1104+ </child>
1105+ <child>
1106+ <object class="GtkLabel" id="label20">
1107+ <property name="visible">True</property>
1108+ <property name="label" translatable="yes">Background</property>
1109+ </object>
1110+ <packing>
1111+ <property name="left_attach">1</property>
1112+ <property name="right_attach">2</property>
1113+ <property name="x_options">GTK_FILL</property>
1114+ <property name="y_options">GTK_FILL</property>
1115+ </packing>
1116+ </child>
1117+ <child>
1118+ <object class="GtkLabel" id="label21">
1119+ <property name="visible">True</property>
1120+ <property name="label" translatable="yes">Foreground</property>
1121+ </object>
1122+ <packing>
1123+ <property name="left_attach">2</property>
1124+ <property name="right_attach">3</property>
1125+ <property name="x_options">GTK_FILL</property>
1126+ <property name="y_options">GTK_FILL</property>
1127+ </packing>
1128+ </child>
1129+ <child>
1130+ <object class="GtkColorButton" id="bg_color">
1131+ <property name="visible">True</property>
1132+ <property name="can_focus">True</property>
1133+ <property name="receives_default">True</property>
1134+ <property name="color">#000000000000</property>
1135+ </object>
1136+ <packing>
1137+ <property name="left_attach">1</property>
1138+ <property name="right_attach">2</property>
1139+ <property name="top_attach">1</property>
1140+ <property name="bottom_attach">2</property>
1141+ <property name="y_options">GTK_FILL</property>
1142+ </packing>
1143+ </child>
1144+ <child>
1145+ <object class="GtkColorButton" id="fg_color">
1146+ <property name="visible">True</property>
1147+ <property name="can_focus">True</property>
1148+ <property name="receives_default">True</property>
1149+ <property name="color">#000000000000</property>
1150+ </object>
1151+ <packing>
1152+ <property name="left_attach">2</property>
1153+ <property name="right_attach">3</property>
1154+ <property name="top_attach">1</property>
1155+ <property name="bottom_attach">2</property>
1156+ <property name="y_options">GTK_FILL</property>
1157+ </packing>
1158+ </child>
1159+ <child>
1160+ <object class="GtkColorButton" id="base_color">
1161+ <property name="visible">True</property>
1162+ <property name="can_focus">True</property>
1163+ <property name="receives_default">True</property>
1164+ <property name="color">#000000000000</property>
1165+ </object>
1166+ <packing>
1167+ <property name="left_attach">1</property>
1168+ <property name="right_attach">2</property>
1169+ <property name="top_attach">2</property>
1170+ <property name="bottom_attach">3</property>
1171+ <property name="y_options">GTK_FILL</property>
1172+ </packing>
1173+ </child>
1174+ <child>
1175+ <object class="GtkColorButton" id="text_color">
1176+ <property name="visible">True</property>
1177+ <property name="can_focus">True</property>
1178+ <property name="receives_default">True</property>
1179+ <property name="color">#000000000000</property>
1180+ </object>
1181+ <packing>
1182+ <property name="left_attach">2</property>
1183+ <property name="right_attach">3</property>
1184+ <property name="top_attach">2</property>
1185+ <property name="bottom_attach">3</property>
1186+ <property name="y_options">GTK_FILL</property>
1187+ </packing>
1188+ </child>
1189+ <child>
1190+ <object class="GtkColorButton" id="selected_bg_color">
1191+ <property name="visible">True</property>
1192+ <property name="can_focus">True</property>
1193+ <property name="receives_default">True</property>
1194+ <property name="color">#000000000000</property>
1195+ </object>
1196+ <packing>
1197+ <property name="left_attach">1</property>
1198+ <property name="right_attach">2</property>
1199+ <property name="top_attach">3</property>
1200+ <property name="bottom_attach">4</property>
1201+ <property name="y_options">GTK_FILL</property>
1202+ </packing>
1203+ </child>
1204+ <child>
1205+ <object class="GtkColorButton" id="selected_fg_color">
1206+ <property name="visible">True</property>
1207+ <property name="can_focus">True</property>
1208+ <property name="receives_default">True</property>
1209+ <property name="color">#000000000000</property>
1210+ </object>
1211+ <packing>
1212+ <property name="left_attach">2</property>
1213+ <property name="right_attach">3</property>
1214+ <property name="top_attach">3</property>
1215+ <property name="bottom_attach">4</property>
1216+ <property name="y_options">GTK_FILL</property>
1217+ </packing>
1218+ </child>
1219+ <child>
1220+ <object class="GtkColorButton" id="tooltip_bg_color">
1221+ <property name="visible">True</property>
1222+ <property name="can_focus">True</property>
1223+ <property name="receives_default">True</property>
1224+ <property name="color">#000000000000</property>
1225+ </object>
1226+ <packing>
1227+ <property name="left_attach">1</property>
1228+ <property name="right_attach">2</property>
1229+ <property name="top_attach">4</property>
1230+ <property name="bottom_attach">5</property>
1231+ <property name="y_options">GTK_FILL</property>
1232+ </packing>
1233+ </child>
1234+ <child>
1235+ <object class="GtkColorButton" id="tooltip_fg_color">
1236+ <property name="visible">True</property>
1237+ <property name="can_focus">True</property>
1238+ <property name="receives_default">True</property>
1239+ <property name="color">#000000000000</property>
1240+ </object>
1241+ <packing>
1242+ <property name="left_attach">2</property>
1243+ <property name="right_attach">3</property>
1244+ <property name="top_attach">4</property>
1245+ <property name="bottom_attach">5</property>
1246+ <property name="y_options">GTK_FILL</property>
1247+ </packing>
1248+ </child>
1249+ <child>
1250+ <placeholder/>
1251+ </child>
1252+ </object>
1253+ <packing>
1254+ <property name="expand">False</property>
1255+ <property name="position">2</property>
1256+ </packing>
1257+ </child>
1258+ </object>
1259+ <packing>
1260+ <property name="position">1</property>
1261+ </packing>
1262+ </child>
1263+ <child type="tab">
1264+ <object class="GtkLabel" id="label9">
1265+ <property name="visible">True</property>
1266+ <property name="label" translatable="yes">Color</property>
1267+ </object>
1268+ <packing>
1269+ <property name="position">1</property>
1270+ <property name="tab_fill">False</property>
1271+ </packing>
1272+ </child>
1273+ <child>
1274+ <object class="GtkHBox" id="hbox1">
1275+ <property name="visible">True</property>
1276+ <property name="border_width">12</property>
1277+ <property name="spacing">6</property>
1278+ <child>
1279+ <object class="GtkVBox" id="vbox10">
1280+ <property name="visible">True</property>
1281+ <property name="spacing">6</property>
1282+ <child>
1283+ <object class="GtkScrolledWindow" id="scrolledwindow1">
1284+ <property name="width_request">150</property>
1285+ <property name="visible">True</property>
1286+ <property name="can_focus">True</property>
1287+ <property name="hscrollbar_policy">automatic</property>
1288+ <property name="vscrollbar_policy">automatic</property>
1289+ <property name="shadow_type">etched-in</property>
1290+ <child>
1291+ <object class="GtkTreeView" id="icon_theme_view">
1292+ <property name="visible">True</property>
1293+ <property name="can_focus">True</property>
1294+ <property name="headers_visible">False</property>
1295+ <child>
1296+ <object class="GtkTreeViewColumn" id="treeviewcolumn4">
1297+ <child>
1298+ <object class="GtkCellRendererText" id="cellrenderertext8"/>
1299+ <attributes>
1300+ <attribute name="text">0</attribute>
1301+ </attributes>
1302+ </child>
1303+ </object>
1304+ </child>
1305+ </object>
1306+ </child>
1307+ </object>
1308+ <packing>
1309+ <property name="position">0</property>
1310+ </packing>
1311+ </child>
1312+ <child>
1313+ <object class="GtkButton" id="install_icon_theme">
1314+ <property name="label" translatable="yes">Install</property>
1315+ <property name="visible">True</property>
1316+ <property name="can_focus">True</property>
1317+ <property name="receives_default">True</property>
1318+ <property name="image">image2</property>
1319+ </object>
1320+ <packing>
1321+ <property name="expand">False</property>
1322+ <property name="position">1</property>
1323+ </packing>
1324+ </child>
1325+ <child>
1326+ <object class="GtkButton" id="remove_icon_theme">
1327+ <property name="label" translatable="yes">Remove</property>
1328+ <property name="visible">True</property>
1329+ <property name="can_focus">True</property>
1330+ <property name="receives_default">True</property>
1331+ <property name="image">image3</property>
1332+ </object>
1333+ <packing>
1334+ <property name="expand">False</property>
1335+ <property name="position">2</property>
1336+ </packing>
1337+ </child>
1338+ </object>
1339+ <packing>
1340+ <property name="position">0</property>
1341+ </packing>
1342+ </child>
1343+ <child>
1344+ <object class="GtkVBox" id="vbox2">
1345+ <property name="visible">True</property>
1346+ <property name="spacing">18</property>
1347+ <child>
1348+ <object class="GtkVBox" id="vbox4">
1349+ <property name="visible">True</property>
1350+ <child>
1351+ <object class="GtkLabel" id="label6">
1352+ <property name="visible">True</property>
1353+ <property name="xalign">0</property>
1354+ <property name="label" translatable="yes">Preview of the selected icon theme</property>
1355+ </object>
1356+ <packing>
1357+ <property name="expand">False</property>
1358+ <property name="position">0</property>
1359+ </packing>
1360+ </child>
1361+ <child>
1362+ <object class="GtkScrolledWindow" id="scrolledwindow3">
1363+ <property name="visible">True</property>
1364+ <property name="can_focus">True</property>
1365+ <property name="hscrollbar_policy">automatic</property>
1366+ <property name="vscrollbar_policy">automatic</property>
1367+ <property name="shadow_type">etched-in</property>
1368+ <child>
1369+ <object class="GtkIconView" id="icon_demo_view">
1370+ <property name="visible">True</property>
1371+ <property name="can_focus">True</property>
1372+ <property name="model">icon_demo_store</property>
1373+ <child>
1374+ <object class="GtkCellRendererPixbuf" id="cellrenderertext3">
1375+ <property name="stock_size">6</property>
1376+ </object>
1377+ <attributes>
1378+ <attribute name="icon-name">0</attribute>
1379+ </attributes>
1380+ </child>
1381+ </object>
1382+ </child>
1383+ </object>
1384+ <packing>
1385+ <property name="position">1</property>
1386+ </packing>
1387+ </child>
1388+ </object>
1389+ <packing>
1390+ <property name="position">0</property>
1391+ </packing>
1392+ </child>
1393+ </object>
1394+ <packing>
1395+ <property name="position">1</property>
1396+ </packing>
1397+ </child>
1398+ </object>
1399+ <packing>
1400+ <property name="position">2</property>
1401+ </packing>
1402+ </child>
1403+ <child type="tab">
1404+ <object class="GtkLabel" id="label2">
1405+ <property name="visible">True</property>
1406+ <property name="label" translatable="yes">Icon Theme</property>
1407+ </object>
1408+ <packing>
1409+ <property name="position">2</property>
1410+ <property name="tab_fill">False</property>
1411+ </packing>
1412+ </child>
1413+ <child>
1414+ <object class="GtkHBox" id="hbox7">
1415+ <property name="visible">True</property>
1416+ <property name="border_width">12</property>
1417+ <property name="spacing">6</property>
1418+ <child>
1419+ <object class="GtkVBox" id="vbox3">
1420+ <property name="visible">True</property>
1421+ <property name="spacing">6</property>
1422+ <child>
1423+ <object class="GtkScrolledWindow" id="scrolledwindow4">
1424+ <property name="width_request">150</property>
1425+ <property name="visible">True</property>
1426+ <property name="can_focus">True</property>
1427+ <property name="hscrollbar_policy">automatic</property>
1428+ <property name="vscrollbar_policy">automatic</property>
1429+ <property name="shadow_type">etched-in</property>
1430+ <child>
1431+ <object class="GtkTreeView" id="cursor_theme_view">
1432+ <property name="visible">True</property>
1433+ <property name="can_focus">True</property>
1434+ <property name="headers_visible">False</property>
1435+ <child>
1436+ <object class="GtkTreeViewColumn" id="treeviewcolumn5">
1437+ <child>
1438+ <object class="GtkCellRendererText" id="cellrenderertext9"/>
1439+ <attributes>
1440+ <attribute name="text">0</attribute>
1441+ </attributes>
1442+ </child>
1443+ </object>
1444+ </child>
1445+ </object>
1446+ </child>
1447+ </object>
1448+ <packing>
1449+ <property name="position">0</property>
1450+ </packing>
1451+ </child>
1452+ <child>
1453+ <object class="GtkButton" id="install_cursor_theme">
1454+ <property name="label" translatable="yes">Install</property>
1455+ <property name="visible">True</property>
1456+ <property name="can_focus">True</property>
1457+ <property name="receives_default">True</property>
1458+ <property name="image">image4</property>
1459+ </object>
1460+ <packing>
1461+ <property name="expand">False</property>
1462+ <property name="position">1</property>
1463+ </packing>
1464+ </child>
1465+ <child>
1466+ <object class="GtkButton" id="remove_cursor_theme">
1467+ <property name="label" translatable="yes">Remove</property>
1468+ <property name="visible">True</property>
1469+ <property name="can_focus">True</property>
1470+ <property name="receives_default">True</property>
1471+ <property name="image">image5</property>
1472+ </object>
1473+ <packing>
1474+ <property name="expand">False</property>
1475+ <property name="position">2</property>
1476+ </packing>
1477+ </child>
1478+ </object>
1479+ <packing>
1480+ <property name="position">0</property>
1481+ </packing>
1482+ </child>
1483+ <child>
1484+ <object class="GtkVBox" id="vbox11">
1485+ <property name="visible">True</property>
1486+ <property name="spacing">6</property>
1487+ <child>
1488+ <object class="GtkLabel" id="label7">
1489+ <property name="visible">True</property>
1490+ <property name="xalign">0</property>
1491+ <property name="label" translatable="yes">Preview of the selected cursor theme</property>
1492+ </object>
1493+ <packing>
1494+ <property name="expand">False</property>
1495+ <property name="position">0</property>
1496+ </packing>
1497+ </child>
1498+ <child>
1499+ <object class="GtkScrolledWindow" id="scrolledwindow5">
1500+ <property name="visible">True</property>
1501+ <property name="can_focus">True</property>
1502+ <property name="hscrollbar_policy">automatic</property>
1503+ <property name="vscrollbar_policy">automatic</property>
1504+ <property name="shadow_type">etched-in</property>
1505+ <child>
1506+ <object class="GtkIconView" id="cursor_demo_view">
1507+ <property name="visible">True</property>
1508+ <property name="can_focus">True</property>
1509+ </object>
1510+ </child>
1511+ </object>
1512+ <packing>
1513+ <property name="position">1</property>
1514+ </packing>
1515+ </child>
1516+ <child>
1517+ <object class="GtkLabel" id="label26">
1518+ <property name="xalign">0</property>
1519+ <property name="label" translatable="yes">Size of cursors</property>
1520+ </object>
1521+ <packing>
1522+ <property name="expand">False</property>
1523+ <property name="position">2</property>
1524+ </packing>
1525+ </child>
1526+ <child>
1527+ <object class="GtkHBox" id="hbox5">
1528+ <property name="spacing">12</property>
1529+ <child>
1530+ <object class="GtkLabel" id="label29">
1531+ <property name="visible">True</property>
1532+ <property name="label" translatable="yes">Smaller</property>
1533+ </object>
1534+ <packing>
1535+ <property name="expand">False</property>
1536+ <property name="position">0</property>
1537+ </packing>
1538+ </child>
1539+ <child>
1540+ <object class="GtkHScale" id="cursor_size">
1541+ <property name="visible">True</property>
1542+ <property name="can_focus">True</property>
1543+ <property name="update_policy">delayed</property>
1544+ <property name="adjustment">cursor_size_adj</property>
1545+ <property name="digits">0</property>
1546+ <property name="value_pos">left</property>
1547+ </object>
1548+ <packing>
1549+ <property name="position">1</property>
1550+ </packing>
1551+ </child>
1552+ <child>
1553+ <object class="GtkLabel" id="label27">
1554+ <property name="visible">True</property>
1555+ <property name="label" translatable="yes">Bigger</property>
1556+ </object>
1557+ <packing>
1558+ <property name="expand">False</property>
1559+ <property name="position">2</property>
1560+ </packing>
1561+ </child>
1562+ </object>
1563+ <packing>
1564+ <property name="expand">False</property>
1565+ <property name="position">3</property>
1566+ </packing>
1567+ </child>
1568+ <child>
1569+ <object class="GtkLabel" id="label30">
1570+ <property name="visible">True</property>
1571+ <property name="xalign">0</property>
1572+ <property name="yalign">0</property>
1573+ <property name="label" translatable="yes">&lt;b&gt;Note:&lt;/b&gt; Not all of the desktop applications support changing cursor theme on-the-fly. So your changes here might not be fully applied to all applications till next login.</property>
1574+ <property name="use_markup">True</property>
1575+ <property name="wrap">True</property>
1576+ </object>
1577+ <packing>
1578+ <property name="expand">False</property>
1579+ <property name="position">4</property>
1580+ </packing>
1581+ </child>
1582+ </object>
1583+ <packing>
1584+ <property name="position">1</property>
1585+ </packing>
1586+ </child>
1587+ </object>
1588+ <packing>
1589+ <property name="position">3</property>
1590+ </packing>
1591+ </child>
1592+ <child type="tab">
1593+ <object class="GtkLabel" id="label5">
1594+ <property name="visible">True</property>
1595+ <property name="label" translatable="yes">Mouse Cursor</property>
1596+ </object>
1597+ <packing>
1598+ <property name="position">3</property>
1599+ <property name="tab_fill">False</property>
1600+ </packing>
1601+ </child>
1602+ <child>
1603+ <object class="GtkVBox" id="wm_page">
1604+ <property name="border_width">12</property>
1605+ <property name="spacing">18</property>
1606+ <child>
1607+ <placeholder/>
1608+ </child>
1609+ </object>
1610+ <packing>
1611+ <property name="position">4</property>
1612+ </packing>
1613+ </child>
1614+ <child type="tab">
1615+ <object class="GtkLabel" id="label10">
1616+ <property name="visible">True</property>
1617+ <property name="label" translatable="yes">Window Border</property>
1618+ </object>
1619+ <packing>
1620+ <property name="position">4</property>
1621+ <property name="tab_fill">False</property>
1622+ </packing>
1623+ </child>
1624+ <child>
1625+ <object class="GtkVBox" id="vbox1">
1626+ <property name="visible">True</property>
1627+ <property name="border_width">12</property>
1628+ <property name="spacing">18</property>
1629+ <child>
1630+ <object class="GtkFrame" id="frame4">
1631+ <property name="visible">True</property>
1632+ <property name="label_xalign">0</property>
1633+ <property name="shadow_type">none</property>
1634+ <child>
1635+ <object class="GtkAlignment" id="alignment4">
1636+ <property name="visible">True</property>
1637+ <property name="left_padding">12</property>
1638+ <child>
1639+ <object class="GtkVBox" id="vbox5">
1640+ <property name="visible">True</property>
1641+ <property name="spacing">6</property>
1642+ <child>
1643+ <object class="GtkTable" id="table2">
1644+ <property name="visible">True</property>
1645+ <property name="n_rows">2</property>
1646+ <property name="n_columns">2</property>
1647+ <property name="column_spacing">12</property>
1648+ <property name="row_spacing">6</property>
1649+ <child>
1650+ <object class="GtkLabel" id="label24">
1651+ <property name="visible">True</property>
1652+ <property name="xalign">0</property>
1653+ <property name="label" translatable="yes">Toolbar Style: </property>
1654+ </object>
1655+ <packing>
1656+ <property name="x_options">GTK_FILL</property>
1657+ <property name="y_options">GTK_FILL</property>
1658+ </packing>
1659+ </child>
1660+ <child>
1661+ <object class="GtkLabel" id="label25">
1662+ <property name="visible">True</property>
1663+ <property name="xalign">0</property>
1664+ <property name="label" translatable="yes">Toolbar Icon Size: </property>
1665+ </object>
1666+ <packing>
1667+ <property name="top_attach">1</property>
1668+ <property name="bottom_attach">2</property>
1669+ <property name="x_options">GTK_FILL</property>
1670+ <property name="y_options">GTK_FILL</property>
1671+ </packing>
1672+ </child>
1673+ <child>
1674+ <object class="GtkComboBox" id="tb_style">
1675+ <property name="visible">True</property>
1676+ <property name="model">tb_style_store</property>
1677+ <child>
1678+ <object class="GtkCellRendererText" id="cellrenderertext2"/>
1679+ <attributes>
1680+ <attribute name="text">0</attribute>
1681+ </attributes>
1682+ </child>
1683+ </object>
1684+ <packing>
1685+ <property name="left_attach">1</property>
1686+ <property name="right_attach">2</property>
1687+ <property name="x_options">GTK_FILL</property>
1688+ <property name="y_options">GTK_FILL</property>
1689+ </packing>
1690+ </child>
1691+ <child>
1692+ <object class="GtkComboBox" id="tb_icon_size">
1693+ <property name="visible">True</property>
1694+ <property name="model">tb_icon_size_store</property>
1695+ <child>
1696+ <object class="GtkCellRendererText" id="cellrenderertext5"/>
1697+ <attributes>
1698+ <attribute name="text">0</attribute>
1699+ </attributes>
1700+ </child>
1701+ </object>
1702+ <packing>
1703+ <property name="left_attach">1</property>
1704+ <property name="right_attach">2</property>
1705+ <property name="top_attach">1</property>
1706+ <property name="bottom_attach">2</property>
1707+ <property name="x_options">GTK_FILL</property>
1708+ <property name="y_options">GTK_FILL</property>
1709+ </packing>
1710+ </child>
1711+ </object>
1712+ <packing>
1713+ <property name="position">0</property>
1714+ </packing>
1715+ </child>
1716+ <child>
1717+ <object class="GtkCheckButton" id="button_images">
1718+ <property name="label" translatable="yes">Show images on buttons</property>
1719+ <property name="visible">True</property>
1720+ <property name="can_focus">True</property>
1721+ <property name="receives_default">False</property>
1722+ <property name="draw_indicator">True</property>
1723+ </object>
1724+ <packing>
1725+ <property name="position">1</property>
1726+ </packing>
1727+ </child>
1728+ <child>
1729+ <object class="GtkCheckButton" id="menu_images">
1730+ <property name="label" translatable="yes">Show images in menus</property>
1731+ <property name="visible">True</property>
1732+ <property name="can_focus">True</property>
1733+ <property name="receives_default">False</property>
1734+ <property name="draw_indicator">True</property>
1735+ </object>
1736+ <packing>
1737+ <property name="position">2</property>
1738+ </packing>
1739+ </child>
1740+ </object>
1741+ </child>
1742+ </object>
1743+ </child>
1744+ <child type="label">
1745+ <object class="GtkLabel" id="label19">
1746+ <property name="visible">True</property>
1747+ <property name="label" translatable="yes">&lt;b&gt;GUI Options&lt;/b&gt;</property>
1748+ <property name="use_markup">True</property>
1749+ </object>
1750+ </child>
1751+ </object>
1752+ <packing>
1753+ <property name="expand">False</property>
1754+ <property name="fill">False</property>
1755+ <property name="position">0</property>
1756+ </packing>
1757+ </child>
1758+ <child>
1759+ <object class="GtkFrame" id="sound_effect">
1760+ <property name="label_xalign">0</property>
1761+ <property name="shadow_type">none</property>
1762+ <child>
1763+ <object class="GtkAlignment" id="alignment5">
1764+ <property name="visible">True</property>
1765+ <property name="left_padding">12</property>
1766+ <child>
1767+ <object class="GtkVBox" id="vbox13">
1768+ <property name="visible">True</property>
1769+ <property name="spacing">6</property>
1770+ <child>
1771+ <object class="GtkCheckButton" id="event_sound">
1772+ <property name="label" translatable="yes">Play event sounds</property>
1773+ <property name="visible">True</property>
1774+ <property name="can_focus">True</property>
1775+ <property name="receives_default">False</property>
1776+ <property name="draw_indicator">True</property>
1777+ </object>
1778+ <packing>
1779+ <property name="position">0</property>
1780+ </packing>
1781+ </child>
1782+ <child>
1783+ <object class="GtkCheckButton" id="input_feedback_sound">
1784+ <property name="label" translatable="yes">play event sounds as feedback to user input</property>
1785+ <property name="visible">True</property>
1786+ <property name="can_focus">True</property>
1787+ <property name="receives_default">False</property>
1788+ <property name="draw_indicator">True</property>
1789+ </object>
1790+ <packing>
1791+ <property name="position">1</property>
1792+ </packing>
1793+ </child>
1794+ </object>
1795+ </child>
1796+ </object>
1797+ </child>
1798+ <child type="label">
1799+ <object class="GtkLabel" id="label28">
1800+ <property name="visible">True</property>
1801+ <property name="label" translatable="yes">&lt;b&gt;Sound Effect&lt;/b&gt;</property>
1802+ <property name="use_markup">True</property>
1803+ </object>
1804+ </child>
1805+ </object>
1806+ <packing>
1807+ <property name="expand">False</property>
1808+ <property name="fill">False</property>
1809+ <property name="position">1</property>
1810+ </packing>
1811+ </child>
1812+ </object>
1813+ <packing>
1814+ <property name="position">5</property>
1815+ </packing>
1816+ </child>
1817+ <child type="tab">
1818+ <object class="GtkLabel" id="label4">
1819+ <property name="visible">True</property>
1820+ <property name="label" translatable="yes">Other</property>
1821+ </object>
1822+ <packing>
1823+ <property name="position">5</property>
1824+ <property name="tab_fill">False</property>
1825+ </packing>
1826+ </child>
1827+ </object>
1828+ <packing>
1829+ <property name="position">1</property>
1830+ </packing>
1831+ </child>
1832+ <child internal-child="action_area">
1833+ <object class="GtkHButtonBox" id="dialog-action_area1">
1834+ <property name="visible">True</property>
1835+ <property name="layout_style">end</property>
1836+ <child>
1837+ <object class="GtkButton" id="about">
1838+ <property name="label">gtk-about</property>
1839+ <property name="visible">True</property>
1840+ <property name="can_focus">True</property>
1841+ <property name="receives_default">True</property>
1842+ <property name="use_stock">True</property>
1843+ </object>
1844+ <packing>
1845+ <property name="expand">False</property>
1846+ <property name="fill">False</property>
1847+ <property name="position">0</property>
1848+ <property name="secondary">True</property>
1849+ </packing>
1850+ </child>
1851+ <child>
1852+ <object class="GtkButton" id="apply">
1853+ <property name="label">gtk-apply</property>
1854+ <property name="visible">True</property>
1855+ <property name="sensitive">False</property>
1856+ <property name="can_focus">True</property>
1857+ <property name="receives_default">True</property>
1858+ <property name="use_stock">True</property>
1859+ </object>
1860+ <packing>
1861+ <property name="expand">False</property>
1862+ <property name="fill">False</property>
1863+ <property name="position">1</property>
1864+ </packing>
1865+ </child>
1866+ <child>
1867+ <object class="GtkButton" id="close">
1868+ <property name="label">gtk-close</property>
1869+ <property name="visible">True</property>
1870+ <property name="can_focus">True</property>
1871+ <property name="receives_default">True</property>
1872+ <property name="use_stock">True</property>
1873+ </object>
1874+ <packing>
1875+ <property name="expand">False</property>
1876+ <property name="fill">False</property>
1877+ <property name="position">1</property>
1878+ </packing>
1879+ </child>
1880+ </object>
1881+ <packing>
1882+ <property name="expand">False</property>
1883+ <property name="pack_type">end</property>
1884+ <property name="position">0</property>
1885+ </packing>
1886+ </child>
1887+ </object>
1888+ </child>
1889+ <action-widgets>
1890+ <action-widget response="1">about</action-widget>
1891+ <action-widget response="-10">apply</action-widget>
1892+ <action-widget response="-7">close</action-widget>
1893+ </action-widgets>
1894+ </object>
1895+ <object class="GtkImage" id="image2">
1896+ <property name="visible">True</property>
1897+ <property name="stock">gtk-add</property>
1898+ </object>
1899+ <object class="GtkImage" id="image3">
1900+ <property name="visible">True</property>
1901+ <property name="stock">gtk-remove</property>
1902+ </object>
1903+ <object class="GtkImage" id="image4">
1904+ <property name="visible">True</property>
1905+ <property name="stock">gtk-add</property>
1906+ </object>
1907+ <object class="GtkImage" id="image5">
1908+ <property name="visible">True</property>
1909+ <property name="stock">gtk-remove</property>
1910+ </object>
1911+</interface>
1912diff --git a/po/Makefile.in.in b/po/Makefile.in.in
1913index 402a25f..cc8a222 100644
1914--- a/po/Makefile.in.in
1915+++ b/po/Makefile.in.in
1916@@ -129,7 +129,7 @@ install-data-yes: all
1917 done
1918
1919 # Empty stubs to satisfy archaic automake needs
1920-dvi info tags TAGS ID:
1921+dvi info ctags tags CTAGS TAGS ID:
1922
1923 # Define this as empty until I found a useful application.
1924 install-exec installcheck:
1925diff --git a/po/POTFILES.in b/po/POTFILES.in
1926index 94e457b..4072671 100644
1927--- a/po/POTFILES.in
1928+++ b/po/POTFILES.in
1929@@ -1,9 +1,6 @@
1930 # List of source files containing translatable strings.
1931
1932-src/main.c
1933-src/main-dlg.c
1934-src/demo.c
1935-data/demo.glade
1936-data/lxappearance.glade
1937-# files added by intltool-prepare
1938-lxappearance.desktop.in
1939+data/lxappearance.desktop.in
1940+data/ui/about.glade.in
1941+data/ui/lxappearance.glade
1942+src/utils.c
1943diff --git a/po/POTFILES.skip b/po/POTFILES.skip
1944new file mode 100644
1945index 0000000..9686cfe
1946--- /dev/null
1947+++ b/po/POTFILES.skip
1948@@ -0,0 +1 @@
1949+# List of source files which should be skipped during translation
1950diff --git a/po/lxappearance.pot b/po/lxappearance.pot
1951new file mode 100644
1952index 0000000..10bd1d5
1953--- /dev/null
1954+++ b/po/lxappearance.pot
1955@@ -0,0 +1,253 @@
1956+# SOME DESCRIPTIVE TITLE.
1957+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
1958+# This file is distributed under the same license as the PACKAGE package.
1959+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
1960+#
1961+#, fuzzy
1962+msgid ""
1963+msgstr ""
1964+"Project-Id-Version: PACKAGE VERSION\n"
1965+"Report-Msgid-Bugs-To: \n"
1966+"POT-Creation-Date: 2010-08-08 01:59+0800\n"
1967+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1968+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1969+"Language-Team: LANGUAGE <LL@li.org>\n"
1970+"MIME-Version: 1.0\n"
1971+"Content-Type: text/plain; charset=CHARSET\n"
1972+"Content-Transfer-Encoding: 8bit\n"
1973+
1974+#: ../data/lxappearance.desktop.in.h:1 ../data/ui/lxappearance.glade.h:9
1975+msgid "Customize Look and Feel"
1976+msgstr ""
1977+
1978+#: ../data/lxappearance.desktop.in.h:2
1979+msgid "Customizes look and feel of your desktop and applications"
1980+msgstr ""
1981+
1982+#: ../data/ui/about.glade.in.h:1
1983+msgid "Copyright (C) 2010 LXDE Project"
1984+msgstr ""
1985+
1986+#: ../data/ui/about.glade.in.h:2
1987+msgid "Customizes look and feel of your desktop"
1988+msgstr ""
1989+
1990+#. Please replace this line with your own names, one name per line.
1991+#: ../data/ui/about.glade.in.h:4
1992+msgid "translator-credits"
1993+msgstr ""
1994+
1995+#: ../data/ui/lxappearance.glade.h:1
1996+msgid "<b>GUI Options</b>"
1997+msgstr ""
1998+
1999+#: ../data/ui/lxappearance.glade.h:2
2000+msgid ""
2001+"<b>Note:</b> Not all of the desktop applications support changing cursor "
2002+"theme on-the-fly. So your changes here might not be fully applied to all "
2003+"applications till next login."
2004+msgstr ""
2005+
2006+#: ../data/ui/lxappearance.glade.h:3
2007+msgid "<b>Sound Effect</b>"
2008+msgstr ""
2009+
2010+#: ../data/ui/lxappearance.glade.h:4
2011+msgid "Background"
2012+msgstr ""
2013+
2014+#: ../data/ui/lxappearance.glade.h:5
2015+msgid "Bigger"
2016+msgstr ""
2017+
2018+#: ../data/ui/lxappearance.glade.h:6
2019+msgid "Check Button"
2020+msgstr ""
2021+
2022+#: ../data/ui/lxappearance.glade.h:7
2023+msgid "Color"
2024+msgstr ""
2025+
2026+#: ../data/ui/lxappearance.glade.h:8
2027+msgid "Color scheme is not supported by currently selected widget theme."
2028+msgstr ""
2029+
2030+#: ../data/ui/lxappearance.glade.h:10
2031+msgid "Default font:"
2032+msgstr ""
2033+
2034+#: ../data/ui/lxappearance.glade.h:11
2035+msgid "Demo"
2036+msgstr ""
2037+
2038+#: ../data/ui/lxappearance.glade.h:12
2039+msgid "Foreground"
2040+msgstr ""
2041+
2042+#: ../data/ui/lxappearance.glade.h:13
2043+msgid "Icon Theme"
2044+msgstr ""
2045+
2046+#: ../data/ui/lxappearance.glade.h:14
2047+msgid "Icons only"
2048+msgstr ""
2049+
2050+#: ../data/ui/lxappearance.glade.h:15
2051+msgid "Install"
2052+msgstr ""
2053+
2054+#: ../data/ui/lxappearance.glade.h:16
2055+msgid "Large toolbar icon"
2056+msgstr ""
2057+
2058+#: ../data/ui/lxappearance.glade.h:17
2059+msgid "Mouse Cursor"
2060+msgstr ""
2061+
2062+#: ../data/ui/lxappearance.glade.h:18
2063+msgid "Normal windows:"
2064+msgstr ""
2065+
2066+#: ../data/ui/lxappearance.glade.h:19
2067+msgid "Other"
2068+msgstr ""
2069+
2070+#: ../data/ui/lxappearance.glade.h:20
2071+msgid "Page1"
2072+msgstr ""
2073+
2074+#: ../data/ui/lxappearance.glade.h:21
2075+msgid "Page2"
2076+msgstr ""
2077+
2078+#: ../data/ui/lxappearance.glade.h:22
2079+msgid "Play event sounds"
2080+msgstr ""
2081+
2082+#: ../data/ui/lxappearance.glade.h:23
2083+msgid "Preview of the selected cursor theme"
2084+msgstr ""
2085+
2086+#: ../data/ui/lxappearance.glade.h:24
2087+msgid "Preview of the selected icon theme"
2088+msgstr ""
2089+
2090+#: ../data/ui/lxappearance.glade.h:25
2091+msgid "Preview of the selected widget style"
2092+msgstr ""
2093+
2094+#: ../data/ui/lxappearance.glade.h:26
2095+msgid "Radio Button"
2096+msgstr ""
2097+
2098+#: ../data/ui/lxappearance.glade.h:27
2099+msgid "Remove"
2100+msgstr ""
2101+
2102+#: ../data/ui/lxappearance.glade.h:28
2103+msgid "Same as buttons"
2104+msgstr ""
2105+
2106+#: ../data/ui/lxappearance.glade.h:29
2107+msgid "Same as dialogs"
2108+msgstr ""
2109+
2110+#: ../data/ui/lxappearance.glade.h:30
2111+msgid "Same as drag icons"
2112+msgstr ""
2113+
2114+#: ../data/ui/lxappearance.glade.h:31
2115+msgid "Same as menu items"
2116+msgstr ""
2117+
2118+#: ../data/ui/lxappearance.glade.h:32
2119+msgid "Selected items:"
2120+msgstr ""
2121+
2122+#: ../data/ui/lxappearance.glade.h:33
2123+msgid "Show images in menus"
2124+msgstr ""
2125+
2126+#: ../data/ui/lxappearance.glade.h:34
2127+msgid "Show images on buttons"
2128+msgstr ""
2129+
2130+#: ../data/ui/lxappearance.glade.h:35
2131+msgid "Size of cursors"
2132+msgstr ""
2133+
2134+#: ../data/ui/lxappearance.glade.h:36
2135+msgid "Small toolbar icon"
2136+msgstr ""
2137+
2138+#: ../data/ui/lxappearance.glade.h:37
2139+msgid "Smaller"
2140+msgstr ""
2141+
2142+#: ../data/ui/lxappearance.glade.h:38
2143+msgid "Text below icons"
2144+msgstr ""
2145+
2146+#: ../data/ui/lxappearance.glade.h:39
2147+msgid "Text beside icons"
2148+msgstr ""
2149+
2150+#: ../data/ui/lxappearance.glade.h:40
2151+msgid "Text only"
2152+msgstr ""
2153+
2154+#: ../data/ui/lxappearance.glade.h:41
2155+msgid "Text windows:"
2156+msgstr ""
2157+
2158+#: ../data/ui/lxappearance.glade.h:42
2159+msgid "Toolbar Icon Size: "
2160+msgstr ""
2161+
2162+#: ../data/ui/lxappearance.glade.h:43
2163+msgid "Toolbar Style: "
2164+msgstr ""
2165+
2166+#: ../data/ui/lxappearance.glade.h:44
2167+msgid "Tooltips:"
2168+msgstr ""
2169+
2170+#: ../data/ui/lxappearance.glade.h:45
2171+msgid "Use customized color scheme"
2172+msgstr ""
2173+
2174+#: ../data/ui/lxappearance.glade.h:46
2175+msgid "Widget"
2176+msgstr ""
2177+
2178+#: ../data/ui/lxappearance.glade.h:47
2179+msgid "Window Border"
2180+msgstr ""
2181+
2182+#: ../data/ui/lxappearance.glade.h:48
2183+msgid "_Edit"
2184+msgstr ""
2185+
2186+#: ../data/ui/lxappearance.glade.h:49
2187+msgid "_File"
2188+msgstr ""
2189+
2190+#: ../data/ui/lxappearance.glade.h:50
2191+msgid "_Help"
2192+msgstr ""
2193+
2194+#: ../data/ui/lxappearance.glade.h:51
2195+msgid "button"
2196+msgstr ""
2197+
2198+#: ../data/ui/lxappearance.glade.h:52
2199+msgid "play event sounds as feedback to user input"
2200+msgstr ""
2201+
2202+#: ../src/utils.c:212
2203+msgid "Select an icon theme"
2204+msgstr ""
2205+
2206+#: ../src/utils.c:219
2207+msgid "*.tar.gz, *.tar.bz2 (Icon Theme)"
2208+msgstr ""
2209diff --git a/po/zh_TW.po b/po/zh_TW.po
2210index 5a4db14..3e05395 100644
2211--- a/po/zh_TW.po
2212+++ b/po/zh_TW.po
2213@@ -7,209 +7,248 @@ msgid ""
2214 msgstr ""
2215 "Project-Id-Version: 0.1\n"
2216 "Report-Msgid-Bugs-To: \n"
2217-"POT-Creation-Date: 2009-12-20 15:11+0100\n"
2218-"PO-Revision-Date: 2009-12-19 14:33+0800\n"
2219+"POT-Creation-Date: 2010-08-08 01:59+0800\n"
2220+"PO-Revision-Date: 2010-08-08 01:59+0800\n"
2221 "Last-Translator: 洪任諭 <pcman.tw@gmail.com>\n"
2222-"Language-Team: zh_TW <LL@li.org>\n"
2223+"Language-Team: zh_TW <zh@li.org>\n"
2224 "MIME-Version: 1.0\n"
2225 "Content-Type: text/plain; charset=utf-8\n"
2226 "Content-Transfer-Encoding: 8bit\n"
2227-"X-Generator: Pootle 1.1.0\n"
2228 "X-Poedit-Language: Chinese\n"
2229 "X-Poedit-Country: TAIWAN\n"
2230-"X-Poedit-SourceCharset: iso-8859-1\n"
2231+"X-Poedit-SourceCharset: utf-8\n"
2232
2233-#: ../src/main-dlg.c:650
2234-msgid "Select an icon theme"
2235-msgstr "選擇一個圖示佈景主題"
2236+#: ../data/lxappearance.desktop.in.h:1
2237+#: ../data/ui/lxappearance.glade.h:9
2238+msgid "Customize Look and Feel"
2239+msgstr "自訂外觀風格"
2240
2241-#: ../src/main-dlg.c:657
2242-msgid "*.tar.gz, *.tar.bz2 (Icon Theme)"
2243-msgstr "*.tar.gz, *.tar.bz2 (圖示佈景主題)"
2244+#: ../data/lxappearance.desktop.in.h:2
2245+msgid "Customizes look and feel of your desktop and applications"
2246+msgstr "自訂桌面和應用程式的外觀風格"
2247+
2248+#: ../data/ui/about.glade.in.h:1
2249+msgid "Copyright (C) 2010 LXDE Project"
2250+msgstr "版權所有 (C) 2010 LXDE 專案"
2251+
2252+#: ../data/ui/about.glade.in.h:2
2253+msgid "Customizes look and feel of your desktop"
2254+msgstr "自訂桌面外觀風格"
2255+
2256+#. Please replace this line with your own names, one name per line.
2257+#: ../data/ui/about.glade.in.h:4
2258+msgid "translator-credits"
2259+msgstr "洪任諭 (PCMan) <pcman.tw@gmail.com>"
2260+
2261+#: ../data/ui/lxappearance.glade.h:1
2262+msgid "<b>GUI Options</b>"
2263+msgstr "<b>圖形介面選項</b>"
2264
2265-#: ../src/demo.c:56
2266-msgid "Column"
2267-msgstr "欄位"
2268+#: ../data/ui/lxappearance.glade.h:2
2269+msgid "<b>Note:</b> Not all of the desktop applications support changing cursor theme on-the-fly. So your changes here might not be fully applied to all applications till next login."
2270+msgstr "<b>注意:</b>並非所有桌面應用程式都能支援動態變更滑鼠游標,所以你的部份變更可能要到下次登入時才會被完全套用。"
2271
2272-#: ../src/demo.c:65
2273-msgid "Item"
2274-msgstr "項目"
2275+#: ../data/ui/lxappearance.glade.h:3
2276+msgid "<b>Sound Effect</b>"
2277+msgstr "<b>音效</b>"
2278
2279-#: ../data/demo.glade.h:1
2280+#: ../data/ui/lxappearance.glade.h:4
2281+msgid "Background"
2282+msgstr "背景"
2283+
2284+#: ../data/ui/lxappearance.glade.h:5
2285+msgid "Bigger"
2286+msgstr "較大"
2287+
2288+#: ../data/ui/lxappearance.glade.h:6
2289 msgid "Check Button"
2290-msgstr "Check Button"
2291+msgstr "核取方塊"
2292+
2293+#: ../data/ui/lxappearance.glade.h:7
2294+msgid "Color"
2295+msgstr "色彩"
2296+
2297+#: ../data/ui/lxappearance.glade.h:8
2298+msgid "Color scheme is not supported by currently selected widget theme."
2299+msgstr "目前選取的佈景主題不支援變更色彩"
2300
2301-#: ../data/demo.glade.h:2
2302+#: ../data/ui/lxappearance.glade.h:10
2303+msgid "Default font:"
2304+msgstr "預設字型:"
2305+
2306+#: ../data/ui/lxappearance.glade.h:11
2307 msgid "Demo"
2308 msgstr "展示"
2309
2310-#: ../data/demo.glade.h:3
2311-msgid "Radio Button"
2312-msgstr "Radio Button"
2313+#: ../data/ui/lxappearance.glade.h:12
2314+msgid "Foreground"
2315+msgstr "前景"
2316
2317-#: ../data/demo.glade.h:4
2318-msgid "Tab1"
2319-msgstr "分頁1"
2320+#: ../data/ui/lxappearance.glade.h:13
2321+msgid "Icon Theme"
2322+msgstr "圖示佈景主題"
2323
2324-#: ../data/demo.glade.h:5
2325-msgid "Tab2"
2326-msgstr "分頁2"
2327+#: ../data/ui/lxappearance.glade.h:14
2328+msgid "Icons only"
2329+msgstr "只有圖示"
2330
2331-#: ../data/demo.glade.h:6
2332-msgid "Tab3"
2333-msgstr "分頁3"
2334+#: ../data/ui/lxappearance.glade.h:15
2335+msgid "Install"
2336+msgstr "安裝"
2337
2338-#: ../data/demo.glade.h:7
2339-msgid "Tab4"
2340-msgstr "分頁4"
2341+#: ../data/ui/lxappearance.glade.h:16
2342+msgid "Large toolbar icon"
2343+msgstr "大型工具列圖示"
2344
2345-#: ../data/demo.glade.h:8
2346-msgid "Test Item 1"
2347-msgstr "測試項目1"
2348+#: ../data/ui/lxappearance.glade.h:17
2349+msgid "Mouse Cursor"
2350+msgstr "滑鼠游標"
2351
2352-#: ../data/demo.glade.h:9
2353-msgid "Test Item 2"
2354-msgstr "測試項目2"
2355+#: ../data/ui/lxappearance.glade.h:18
2356+msgid "Normal windows:"
2357+msgstr "正常視窗:"
2358
2359-#: ../data/demo.glade.h:10
2360-msgid "Test Item 3"
2361-msgstr "測試項目3"
2362+#: ../data/ui/lxappearance.glade.h:19
2363+msgid "Other"
2364+msgstr "其他"
2365
2366-#: ../data/demo.glade.h:11
2367-msgid "Type some characters here to test currently selected font."
2368-msgstr "在這裡打一些字測試目前選擇的字型"
2369+#: ../data/ui/lxappearance.glade.h:20
2370+msgid "Page1"
2371+msgstr "第一頁"
2372
2373-#: ../data/demo.glade.h:12
2374-msgid "_Edit"
2375-msgstr "編輯(_E)"
2376+#: ../data/ui/lxappearance.glade.h:21
2377+msgid "Page2"
2378+msgstr "第二頁"
2379
2380-#: ../data/demo.glade.h:13
2381-msgid "_File"
2382-msgstr "檔案(_F)"
2383+#: ../data/ui/lxappearance.glade.h:22
2384+msgid "Play event sounds"
2385+msgstr "播放事件音效"
2386
2387-#: ../data/demo.glade.h:14
2388-msgid "_Help"
2389-msgstr "說明(_H)"
2390+#: ../data/ui/lxappearance.glade.h:23
2391+msgid "Preview of the selected cursor theme"
2392+msgstr "預覽選取的滑鼠游標佈景主題"
2393
2394-#: ../data/demo.glade.h:15
2395-msgid "button"
2396-msgstr "按鈕"
2397+#: ../data/ui/lxappearance.glade.h:24
2398+msgid "Preview of the selected icon theme"
2399+msgstr "預覽選取的圖示佈景主題"
2400
2401-#: ../data/lxappearance.glade.h:1
2402-msgid "<b>Preview</b>"
2403-msgstr "<b>預覽</b>"
2404+#: ../data/ui/lxappearance.glade.h:25
2405+msgid "Preview of the selected widget style"
2406+msgstr "預覽選取的視窗元件佈景主題"
2407
2408-#: ../data/lxappearance.glade.h:2
2409-msgid "Appearance Settings"
2410-msgstr "外觀設定"
2411+#: ../data/ui/lxappearance.glade.h:26
2412+msgid "Radio Button"
2413+msgstr "Radio 按鈕"
2414
2415-#: ../data/lxappearance.glade.h:3
2416-msgid "Available Cursor Themes"
2417-msgstr "可用的滑鼠游標佈景主題"
2418+#: ../data/ui/lxappearance.glade.h:27
2419+msgid "Remove"
2420+msgstr "移除"
2421
2422-#: ../data/lxappearance.glade.h:4
2423-msgid "Available Icon Themes"
2424-msgstr "可用的圖示佈景主題"
2425+#: ../data/ui/lxappearance.glade.h:28
2426+msgid "Same as buttons"
2427+msgstr "和按鈕相同"
2428
2429-#: ../data/lxappearance.glade.h:5
2430-msgid "Available Window Themes"
2431-msgstr "可用的視窗佈景主題"
2432+#: ../data/ui/lxappearance.glade.h:29
2433+msgid "Same as dialogs"
2434+msgstr "和對話框相同"
2435
2436-#: ../data/lxappearance.glade.h:6
2437-msgid "Cursor"
2438-msgstr "游標"
2439+#: ../data/ui/lxappearance.glade.h:30
2440+msgid "Same as drag icons"
2441+msgstr "和滑鼠拖放時相同"
2442
2443-#: ../data/lxappearance.glade.h:7
2444-msgid "Icon"
2445-msgstr "圖示"
2446+#: ../data/ui/lxappearance.glade.h:31
2447+msgid "Same as menu items"
2448+msgstr "和選單項目相同"
2449
2450-#: ../data/lxappearance.glade.h:8
2451-msgid "Icons only"
2452-msgstr "只顯示圖示"
2453+#: ../data/ui/lxappearance.glade.h:32
2454+msgid "Selected items:"
2455+msgstr "選取的項目:"
2456
2457-#: ../data/lxappearance.glade.h:9
2458-msgid "Large"
2459-msgstr "大"
2460+#: ../data/ui/lxappearance.glade.h:33
2461+msgid "Show images in menus"
2462+msgstr "在選單中顯示圖示"
2463
2464-#: ../data/lxappearance.glade.h:10
2465-msgid "Other"
2466-msgstr "其他"
2467+#: ../data/ui/lxappearance.glade.h:34
2468+msgid "Show images on buttons"
2469+msgstr "在按鈕上顯示圖示"
2470+
2471+#: ../data/ui/lxappearance.glade.h:35
2472+msgid "Size of cursors"
2473+msgstr "游標大小"
2474
2475-#: ../data/lxappearance.glade.h:11
2476-msgid "Size"
2477-msgstr "大小"
2478+#: ../data/ui/lxappearance.glade.h:36
2479+msgid "Small toolbar icon"
2480+msgstr "小型工具列圖示"
2481
2482-#: ../data/lxappearance.glade.h:12
2483-msgid "Small"
2484-msgstr "小"
2485+#: ../data/ui/lxappearance.glade.h:37
2486+msgid "Smaller"
2487+msgstr "較小"
2488
2489-#: ../data/lxappearance.glade.h:13
2490+#: ../data/ui/lxappearance.glade.h:38
2491 msgid "Text below icons"
2492 msgstr "文字在圖示下方"
2493
2494-#: ../data/lxappearance.glade.h:14
2495+#: ../data/ui/lxappearance.glade.h:39
2496 msgid "Text beside icons"
2497 msgstr "文字在圖示旁"
2498
2499-#: ../data/lxappearance.glade.h:15
2500+#: ../data/ui/lxappearance.glade.h:40
2501 msgid "Text only"
2502-msgstr "只顯示文字"
2503+msgstr "只有文字"
2504+
2505+#: ../data/ui/lxappearance.glade.h:41
2506+msgid "Text windows:"
2507+msgstr "文字視窗:"
2508+
2509+#: ../data/ui/lxappearance.glade.h:42
2510+msgid "Toolbar Icon Size: "
2511+msgstr "工具列圖示大小:"
2512
2513-#: ../data/lxappearance.glade.h:16
2514+#: ../data/ui/lxappearance.glade.h:43
2515 msgid "Toolbar Style: "
2516-msgstr "工具列樣式:"
2517-
2518-#: ../data/lxappearance.glade.h:17
2519-msgid "Window"
2520-msgstr "視窗"
2521-
2522-#: ../data/lxappearance.glade.h:18
2523-msgid "_Font:"
2524-msgstr "字型"
2525-
2526-#: ../data/lxappearance.glade.h:19
2527-msgid "_Install"
2528-msgstr "安裝(_I)"
2529-
2530-#: ../lxappearance.desktop.in.h:1
2531-msgid "Appearance"
2532-msgstr "外觀設定"
2533-
2534-#: ../lxappearance.desktop.in.h:2
2535-msgid "Customize the look of the desktop"
2536-msgstr "自訂桌面外觀"
2537-
2538-#~ msgid "Back"
2539-#~ msgstr "上一頁"
2540-
2541-#~ msgid "Forward"
2542-#~ msgstr "下一頁"
2543-
2544-#~ msgid "Stop"
2545-#~ msgstr "停止"
2546-
2547-#~ msgid ""
2548-#~ "Test Item 1\n"
2549-#~ "Test Item 2\n"
2550-#~ "Test Item 3"
2551-#~ msgstr ""
2552-#~ "測試項目 1\n"
2553-#~ "測試項目 2\n"
2554-#~ "測試項目 3"
2555-
2556-#~ msgid "Couldn't find pixmap file: %s"
2557-#~ msgstr "沒發現pixmap 檔:%s"
2558-
2559-#~ msgid ""
2560-#~ "Icons only\n"
2561-#~ "Text only\n"
2562-#~ "Text below icons\n"
2563-#~ "Text beside icons"
2564-#~ msgstr ""
2565-#~ "只有小圖示\n"
2566-#~ "只有文字\n"
2567-#~ "文字在圖示之下\n"
2568-#~ "文字在圖示中間"
2569-
2570-#~ msgid "Available Fonts"
2571-#~ msgstr "可用的字型"
2572+msgstr "工具列風格:"
2573+
2574+#: ../data/ui/lxappearance.glade.h:44
2575+msgid "Tooltips:"
2576+msgstr "工具提示:"
2577+
2578+#: ../data/ui/lxappearance.glade.h:45
2579+msgid "Use customized color scheme"
2580+msgstr "使用自訂的色彩"
2581+
2582+#: ../data/ui/lxappearance.glade.h:46
2583+msgid "Widget"
2584+msgstr "圖形元件"
2585+
2586+#: ../data/ui/lxappearance.glade.h:47
2587+msgid "Window Border"
2588+msgstr "視窗邊框"
2589+
2590+#: ../data/ui/lxappearance.glade.h:48
2591+msgid "_Edit"
2592+msgstr "編輯(_E)"
2593+
2594+#: ../data/ui/lxappearance.glade.h:49
2595+msgid "_File"
2596+msgstr "檔案(_F)"
2597+
2598+#: ../data/ui/lxappearance.glade.h:50
2599+msgid "_Help"
2600+msgstr "說明(_H)"
2601+
2602+#: ../data/ui/lxappearance.glade.h:51
2603+msgid "button"
2604+msgstr "按鈕"
2605+
2606+#: ../data/ui/lxappearance.glade.h:52
2607+msgid "play event sounds as feedback to user input"
2608+msgstr "使用者輸入時播放回饋音效"
2609+
2610+#: ../src/utils.c:212
2611+msgid "Select an icon theme"
2612+msgstr "選取一個圖示佈景主題"
2613+
2614+#: ../src/utils.c:219
2615+msgid "*.tar.gz, *.tar.bz2 (Icon Theme)"
2616+msgstr "*.tar.gz, *.tar.bz2 (圖示佈景主題)"
2617+
2618diff --git a/src/Makefile.am b/src/Makefile.am
2619index 4296a6c..f9ae7c9 100644
2620--- a/src/Makefile.am
2621+++ b/src/Makefile.am
2622@@ -1,22 +1,51 @@
2623 NULL=
2624
2625-INCLUDES = \
2626- -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
2627+AM_CPPFLAGS = \
2628+ -I$(srcdir) \
2629+ -DPACKAGE_DATA_DIR=\""$(datadir)/lxappearance"\" \
2630+ -DPACKAGE_UI_DIR=\""$(datadir)/lxappearance/ui"\" \
2631+ -DPACKAGE_LIB_DIR=\""$(libdir)"\" \
2632 -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
2633- $(PACKAGE_CFLAGS) \
2634 $(NULL)
2635
2636-bin_PROGRAMS = lxappearance
2637+lxappearance_includedir = $(includedir)/lxappearance
2638+lxappearance_include_HEADERS = lxappearance.h
2639
2640+bin_PROGRAMS = lxappearance
2641 lxappearance_SOURCES = \
2642- main.c \
2643- main-dlg.c main-dlg.h \
2644- demo.c demo.h \
2645+ lxappearance.c \
2646+ lxappearance.h \
2647+ widget-theme.c \
2648+ widget-theme.h \
2649+ color-scheme.c \
2650+ color-scheme.h \
2651+ icon-theme.c \
2652+ icon-theme.h \
2653+ cursor-theme.c \
2654+ cursor-theme.h \
2655+ other.c \
2656+ other.h \
2657+ utils.c \
2658+ utils.h \
2659+ plugin.c \
2660+ plugin.h \
2661 $(NULL)
2662
2663 lxappearance_CFLAGS = \
2664- -Wl,--export-dynamic \
2665+ $(GTK_CFLAGS) \
2666+ $(GMODULE_CFLAGS) \
2667 -Werror-implicit-function-declaration \
2668 $(NULL)
2669
2670-lxappearance_LDADD = $(PACKAGE_LIBS) $(INTLLIBS)
2671+lxappearance_LDADD = \
2672+ $(GTK_LIBS) \
2673+ $(GMODULE_LIBS) \
2674+ $(INTLLIBS) \
2675+ $(NULL)
2676+
2677+
2678+# Little program to optimize size of xml files
2679+noinst_PROGRAMS=xml-purge
2680+xml_purge_SOURCES=$(top_srcdir)/src/xml-purge.c
2681+xml_purge_CFLAGS=$(GTK_CFLAGS)
2682+xml_purge_LDADD=$(GTK_LIBS)
2683diff --git a/src/color-scheme.c b/src/color-scheme.c
2684new file mode 100644
2685index 0000000..4b78193
2686--- /dev/null
2687+++ b/src/color-scheme.c
2688@@ -0,0 +1,294 @@
2689+// color-scheme.c
2690+//
2691+// Copyright 2010 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
2692+//
2693+// This program is free software; you can redistribute it and/or modify
2694+// it under the terms of the GNU General Public License as published by
2695+// the Free Software Foundation; either version 2 of the License, or
2696+// (at your option) any later version.
2697+//
2698+// This program is distributed in the hope that it will be useful,
2699+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2700+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2701+// GNU General Public License for more details.
2702+//
2703+// You should have received a copy of the GNU General Public License
2704+// along with this program; if not, write to the Free Software
2705+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
2706+// MA 02110-1301, USA.
2707+
2708+#include "lxappearance.h"
2709+#include "color-scheme.h"
2710+#include <string.h>
2711+
2712+static GRegex* gtkrc_include_reg = NULL;
2713+static GRegex* gtkrc_color_scheme_reg = NULL;
2714+
2715+/* http://live.gnome.org/GnomeArt/Tutorials/GtkThemes/SymbolicColors/#Default_colors_in_GNOME */
2716+static const char* gnome_color_names[] = {
2717+ "fg_color", /* The base for the foreground colors. */
2718+ "bg_color", /* Color to generate the background colors from. */
2719+ "base_color", /* The base color. */
2720+ "text_color", /* The text color in input widgets. */
2721+ "selected_bg_color", /* Color for the background of selected text. */
2722+ "selected_fg_color", /* Color of selected text. */
2723+ "tooltip_bg_color", /* Background color of tooltips. */
2724+ "tooltip_fg_color", /* Text color for text in tooltips. */
2725+};
2726+
2727+char* color_scheme_hash_to_str(GHashTable* hash)
2728+{
2729+ GHashTableIter it;
2730+ char* key, *val;
2731+ GString* ret = g_string_sized_new(100);
2732+ g_hash_table_iter_init (&it, hash);
2733+ while(g_hash_table_iter_next(&it, (gpointer*)&key, (gpointer*)&val))
2734+ g_string_append_printf(ret, "%s:%s\n", key, val);
2735+ return g_string_free(ret, FALSE);
2736+}
2737+
2738+void color_scheme_str_to_hash(GHashTable* hash, const char* color_str)
2739+{
2740+ /* g_debug("color_str: %s", color_str); */
2741+ /* split color scheme string into key/value pairs */
2742+ char** pairs = g_strsplit_set(color_str, "\n;", -1);
2743+ char** pair;
2744+ for(pair = pairs; *pair; ++pair)
2745+ {
2746+ char* name = strtok(*pair, ": \t");
2747+ /* g_debug("color_name = %s", name); */
2748+ if(name)
2749+ {
2750+ char* val = strtok(NULL, " \t");
2751+ if(val)
2752+ g_hash_table_replace(hash, g_strdup(name), g_strdup(val));
2753+ }
2754+ }
2755+ g_strfreev(pairs);
2756+}
2757+
2758+static void on_color_set(GtkColorButton* btn, const char* color_name)
2759+{
2760+ GdkColor clr;
2761+ char* color_str;
2762+ gtk_color_button_get_color(btn, &clr);
2763+ color_str = gdk_color_to_string(&clr);
2764+
2765+ g_hash_table_replace(app.color_scheme_hash, g_strdup(color_name), color_str);
2766+ g_free(app.color_scheme);
2767+ app.color_scheme = color_scheme_hash_to_str(app.color_scheme_hash);
2768+
2769+ g_object_set(gtk_settings_get_default(), "gtk-color-scheme", app.color_scheme, NULL);
2770+
2771+ lxappearance_changed();
2772+}
2773+
2774+static void update_color_buttons()
2775+{
2776+ int i;
2777+ /* set the color to buttons */
2778+ GHashTable* hash;
2779+
2780+ /* if custom color scheme is not used, use the default one. */
2781+ if(app.color_scheme)
2782+ hash = app.color_scheme_hash;
2783+ else
2784+ hash = app.default_color_scheme_hash;
2785+
2786+ for(i = 0; i < 8; ++i)
2787+ {
2788+ GtkWidget* btn = app.color_btns[i];
2789+ const char* color_name = gnome_color_names[i];
2790+ const char* color_str = (const char*)g_hash_table_lookup(hash, color_name);
2791+ /* g_debug("%s ='%s'", gnome_color_names[i], color_str); */
2792+ if(color_str)
2793+ {
2794+ GdkColor clr;
2795+ if(gdk_color_parse(color_str, &clr))
2796+ {
2797+ /* prevent invoking color-set handlers here. */
2798+ g_signal_handlers_block_by_func(btn, on_color_set, (gpointer)color_name);
2799+ gtk_color_button_set_color(GTK_COLOR_BUTTON(btn), &clr);
2800+ g_signal_handlers_unblock_by_func(btn, on_color_set, (gpointer)color_name);
2801+ }
2802+ gtk_widget_set_sensitive(btn, TRUE);
2803+ }
2804+ else
2805+ gtk_widget_set_sensitive(btn, FALSE);
2806+ }
2807+}
2808+
2809+static void hash_table_copy(GHashTable* dest, GHashTable* src)
2810+{
2811+ GHashTableIter it;
2812+ char* key, *val;
2813+ g_hash_table_remove_all(dest);
2814+ g_hash_table_iter_init(&it, src);
2815+ while(g_hash_table_iter_next(&it, (gpointer*)&key, (gpointer*)&val))
2816+ g_hash_table_insert(dest, g_strdup(key), g_strdup(val));
2817+}
2818+
2819+static void on_custom_color_toggled(GtkToggleButton* btn, gpointer user_data)
2820+{
2821+ g_free(app.color_scheme);
2822+ if(gtk_toggle_button_get_active(btn)) /* use customized color scheme. */
2823+ {
2824+ gtk_widget_set_sensitive(app.color_table, TRUE);
2825+ /* copy default colors to custom color hash table */
2826+ hash_table_copy(app.color_scheme_hash, app.default_color_scheme_hash);
2827+ app.color_scheme = color_scheme_hash_to_str(app.color_scheme_hash);
2828+ g_object_set(gtk_settings_get_default(), "gtk-color-scheme", app.color_scheme, NULL);
2829+ }
2830+ else /* use default colors provided by the theme. */
2831+ {
2832+ char* color_scheme_str;
2833+ gtk_widget_set_sensitive(app.color_table, FALSE);
2834+ /* restore default colors */
2835+ app.color_scheme = NULL;
2836+ g_hash_table_remove_all(app.color_scheme_hash);
2837+ if(g_hash_table_size(app.default_color_scheme_hash) > 0)
2838+ color_scheme_str = color_scheme_hash_to_str(app.default_color_scheme_hash);
2839+ else
2840+ color_scheme_str = g_strdup("");
2841+ g_object_set(gtk_settings_get_default(), "gtk-color-scheme", color_scheme_str, NULL);
2842+ g_free(color_scheme_str);
2843+ }
2844+ update_color_buttons();
2845+
2846+ lxappearance_changed();
2847+}
2848+
2849+void color_scheme_init(GtkBuilder* b)
2850+{
2851+ int i;
2852+ /* regular expressions used to parse gtkrc files */
2853+ gtkrc_include_reg = g_regex_new(
2854+ "[\\s]*include[\\s]+(\"([^\"]+)\"|'([^']+)')",
2855+ G_REGEX_MULTILINE|G_REGEX_OPTIMIZE, 0, NULL);
2856+
2857+ gtkrc_color_scheme_reg = g_regex_new(
2858+ "[\\s]*(gtk-color-scheme|gtk_color_scheme)[\\s]*=[\\s]*(\"([^\"]+)\"|'([^']+)')",
2859+ G_REGEX_MULTILINE|G_REGEX_OPTIMIZE, 0, NULL);
2860+
2861+ app.color_table = GTK_WIDGET(gtk_builder_get_object(b, "color_table"));
2862+ app.custom_colors = GTK_WIDGET(gtk_builder_get_object(b, "custom_colors"));
2863+ app.no_custom_colors = GTK_WIDGET(gtk_builder_get_object(b, "no_custom_colors"));
2864+
2865+ /* toggle the check box if we have custom color scheme */
2866+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(app.custom_colors), app.color_scheme != NULL);
2867+ g_signal_connect(app.custom_colors, "toggled", G_CALLBACK(on_custom_color_toggled), NULL);
2868+
2869+ /* hash table of the default color scheme of currently selected theme. */
2870+ app.default_color_scheme_hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
2871+
2872+ for(i = 0; i < 8; ++i)
2873+ app.color_btns[i] = GTK_WIDGET(gtk_builder_get_object(b, gnome_color_names[i]));;
2874+
2875+ /* update color scheme page for currently selected gtk theme. */
2876+ color_scheme_update();
2877+
2878+ for(i = 0; i < 8; ++i)
2879+ g_signal_connect(app.color_btns[i], "color-set", G_CALLBACK(on_color_set), (gpointer)gnome_color_names[i]);
2880+}
2881+
2882+/* return FALSE when the gtkrc file does not exists. */
2883+gboolean gtkrc_file_get_color_scheme(const char* gtkrc_file, GHashTable* hash)
2884+{
2885+ char* content;
2886+ /* g_debug("check: %s", gtkrc_file); */
2887+ if(g_file_get_contents(gtkrc_file, &content, NULL, NULL))
2888+ {
2889+ GMatchInfo* match_info;
2890+
2891+ /* find gtkrc files included in this file. */
2892+ g_regex_match(gtkrc_include_reg, content, 0, &match_info);
2893+ while(g_match_info_matches (match_info))
2894+ {
2895+ gchar* include = g_match_info_fetch(match_info, 2);
2896+ /* try to load color schemes in every included gtkrc file. */
2897+ if(!g_path_is_absolute(include)) /* make a full path when needed. */
2898+ {
2899+ char* dirname = g_path_get_dirname(gtkrc_file);
2900+ char* file = g_build_filename(dirname, include, NULL);
2901+ g_free(dirname);
2902+ g_free(include);
2903+ include = file;
2904+ }
2905+ gtkrc_file_get_color_scheme(include, hash);
2906+ g_free(include);
2907+ g_match_info_next(match_info, NULL);
2908+ }
2909+
2910+ /* try to extract gtk-color-scheme from the gtkrc file. */
2911+ g_regex_match(gtkrc_color_scheme_reg, content, 0, &match_info);
2912+ while(g_match_info_matches (match_info))
2913+ {
2914+ char *color_scheme_str = g_match_info_fetch(match_info, 3);
2915+ /* need to unescape the string to replace "\\n" with "\n" */
2916+ char* unescaped = g_strcompress(color_scheme_str);
2917+ g_free (color_scheme_str);
2918+ color_scheme_str_to_hash(hash, unescaped);
2919+ g_free(unescaped);
2920+ g_match_info_next(match_info, NULL);
2921+ }
2922+ g_match_info_free(match_info);
2923+ g_free(content);
2924+ }
2925+ else
2926+ return FALSE;
2927+ return TRUE;
2928+}
2929+
2930+/* update the color scheme page for currently selected gtk theme.
2931+ * called when currently selected gtk theme gets changed. */
2932+void color_scheme_update()
2933+{
2934+ /* the current gtk theme gets changed.
2935+ * reload the default color scheme of current theme. */
2936+ g_hash_table_remove_all(app.default_color_scheme_hash);
2937+
2938+ if(app.widget_theme)
2939+ {
2940+ gboolean file_found;
2941+ char* gtkrc = g_build_filename(g_get_home_dir(), ".themes", app.widget_theme, "gtk-2.0/gtkrc", NULL);
2942+ /* if the theme is found in user-custom theme dir */
2943+ file_found = gtkrc_file_get_color_scheme(gtkrc, app.default_color_scheme_hash);
2944+ g_free(gtkrc);
2945+
2946+ if(!file_found)
2947+ {
2948+ /* if the theme is found in system-wide theme dir */
2949+ gtkrc = g_build_filename(gtk_rc_get_theme_dir(), app.widget_theme, "gtk-2.0/gtkrc", NULL);
2950+ gtkrc_file_get_color_scheme(gtkrc, app.default_color_scheme_hash);
2951+ g_free(gtkrc);
2952+ }
2953+ app.color_scheme_supported = (g_hash_table_size(app.default_color_scheme_hash) > 0);
2954+ }
2955+ else
2956+ app.color_scheme_supported = FALSE;
2957+
2958+ if(app.color_scheme_supported)
2959+ {
2960+ gtk_widget_set_sensitive(app.custom_colors, TRUE);
2961+ gtk_widget_set_sensitive(app.color_table, app.color_scheme != NULL);
2962+ gtk_widget_hide(app.no_custom_colors);
2963+
2964+ /* if customized color scheme is not used,
2965+ * use default colors of the theme. */
2966+ if(!app.color_scheme)
2967+ {
2968+ char* color_scheme_str = color_scheme_hash_to_str(app.default_color_scheme_hash);
2969+ g_object_set(gtk_settings_get_default(), "gtk-color-scheme", color_scheme_str, NULL);
2970+ g_free(color_scheme_str);
2971+ }
2972+ }
2973+ else
2974+ {
2975+ gtk_widget_set_sensitive(app.color_table, FALSE);
2976+ gtk_widget_set_sensitive(app.custom_colors, FALSE);
2977+ gtk_widget_show(app.no_custom_colors);
2978+ }
2979+ /* set the color to buttons */
2980+ update_color_buttons();
2981+}
2982+
2983diff --git a/src/color-scheme.h b/src/color-scheme.h
2984new file mode 100644
2985index 0000000..7397143
2986--- /dev/null
2987+++ b/src/color-scheme.h
2988@@ -0,0 +1,44 @@
2989+// color-scheme.h
2990+//
2991+// Copyright 2010 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
2992+//
2993+// This program is free software; you can redistribute it and/or modify
2994+// it under the terms of the GNU General Public License as published by
2995+// the Free Software Foundation; either version 2 of the License, or
2996+// (at your option) any later version.
2997+//
2998+// This program is distributed in the hope that it will be useful,
2999+// but WITHOUT ANY WARRANTY; without even the implied warranty of
3000+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3001+// GNU General Public License for more details.
3002+//
3003+// You should have received a copy of the GNU General Public License
3004+// along with this program; if not, write to the Free Software
3005+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
3006+// MA 02110-1301, USA.
3007+
3008+
3009+#ifndef __COLOR_SCHEME_H__
3010+#define __COLOR_SCHEME_H__
3011+
3012+G_BEGIN_DECLS
3013+
3014+/* initialize gtk color scheme support. */
3015+void color_scheme_init(GtkBuilder* b);
3016+
3017+/* update the color scheme page for currently selected gtk theme.
3018+ * should be called when currently selected gtk theme gets changed. */
3019+void color_scheme_update();
3020+
3021+/* load gtk-color-scheme from gtkrc file into hash table if it's available. */
3022+gboolean gtkrc_file_get_color_scheme(const char* gtkrc_file, GHashTable* hash);
3023+
3024+/* convert a color scheme hash table to string */
3025+char* color_scheme_hash_to_str(GHashTable* hash);
3026+
3027+/* merge a color scheme string to hash table. */
3028+void color_scheme_str_to_hash(GHashTable* hash, const char* color_str);
3029+
3030+G_END_DECLS
3031+
3032+#endif /* __COLOR_SCHEME_H__ */
3033diff --git a/src/cursor-theme.c b/src/cursor-theme.c
3034new file mode 100644
3035index 0000000..4e77d68
3036--- /dev/null
3037+++ b/src/cursor-theme.c
3038@@ -0,0 +1,127 @@
3039+/*
3040+ * cursor-theme.c
3041+ *
3042+ * Copyright 2010 PCMan <pcman.tw@gmail.com>
3043+ *
3044+ * This program is free software; you can redistribute it and/or modify
3045+ * it under the terms of the GNU General Public License as published by
3046+ * the Free Software Foundation; either version 2 of the License, or
3047+ * (at your option) any later version.
3048+ *
3049+ * This program is distributed in the hope that it will be useful,
3050+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3051+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3052+ * GNU General Public License for more details.
3053+ *
3054+ * You should have received a copy of the GNU General Public License
3055+ * along with this program; if not, write to the Free Software
3056+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
3057+ * MA 02110-1301, USA.
3058+ */
3059+
3060+#include "cursor-theme.h"
3061+#include "icon-theme.h"
3062+#include "lxappearance.h"
3063+#include <gdk/gdkx.h>
3064+
3065+static void update_cursor_demo()
3066+{
3067+ GtkListStore* store = gtk_list_store_new(1, GDK_TYPE_PIXBUF);
3068+ GdkCursor* cursor;
3069+ GdkCursorType types[] = {
3070+ GDK_LEFT_PTR,
3071+ GDK_HAND2,
3072+ GDK_WATCH,
3073+ GDK_FLEUR,
3074+ GDK_XTERM,
3075+ GDK_LEFT_SIDE,
3076+ GDK_TOP_LEFT_CORNER,
3077+ GDK_SB_H_DOUBLE_ARROW};
3078+ int i, n;
3079+ for(i = 0; i < G_N_ELEMENTS(types); ++i)
3080+ {
3081+ GtkTreeIter it;
3082+ cursor = gdk_cursor_new(types[i]);
3083+ GdkPixbuf* pix = gdk_cursor_get_image(cursor);
3084+ gdk_cursor_unref(cursor);
3085+ gtk_list_store_insert_with_values(store, &it, -1, 0, pix, -1);
3086+ g_object_unref(pix);
3087+ }
3088+ gtk_icon_view_set_model(GTK_ICON_VIEW(app.cursor_demo_view), GTK_TREE_MODEL(store));
3089+ g_object_unref(store);
3090+
3091+ /* gtk+ programs should reload named cursors correctly.
3092+ * However, if the cursor is inherited from the root window,
3093+ * gtk+ won't change it. So we need to update the cursor of root window.
3094+ * Unfortunately, this doesn't work for non-gtk+ programs.
3095+ * KDE programs seem to require special handling with XFixes */
3096+ cursor = gdk_cursor_new(GDK_LEFT_PTR);
3097+ i = gdk_display_get_n_screens(gdk_display_get_default());
3098+ while(--i >= 0)
3099+ {
3100+ GdkScreen* screen = gdk_display_get_screen(gdk_display_get_default(), i);
3101+ gdk_window_set_cursor(gdk_screen_get_root_window(screen), cursor);
3102+ }
3103+ gdk_cursor_unref(cursor);
3104+}
3105+
3106+static void on_cursor_theme_sel_changed(GtkTreeSelection* tree_sel, gpointer user_data)
3107+{
3108+ GtkTreeModel* model;
3109+ GtkTreeIter it;
3110+ if(gtk_tree_selection_get_selected(tree_sel, &model, &it))
3111+ {
3112+ IconTheme* theme;
3113+ gtk_tree_model_get(model, &it, 1, &theme, -1);
3114+ if(g_strcmp0(theme->name, app.cursor_theme))
3115+ {
3116+ g_free(app.cursor_theme);
3117+ app.cursor_theme = g_strdup(theme->name);
3118+ g_object_set(gtk_settings_get_default(), "gtk-cursor-theme-name", app.cursor_theme, NULL);
3119+
3120+ update_cursor_demo();
3121+ lxappearance_changed();
3122+ }
3123+
3124+ gtk_widget_set_sensitive(app.cursor_theme_remove_btn, theme->is_removable);
3125+ }
3126+}
3127+
3128+static void on_cursor_theme_size_changed(GtkRange* range, gpointer user_data)
3129+{
3130+ int size = (int)gtk_range_get_value(range);
3131+ if(size != app.cursor_theme_size)
3132+ {
3133+ app.cursor_theme_size = size;
3134+ g_object_set(gtk_settings_get_default(), "gtk-cursor-theme-size", size, NULL);
3135+
3136+ update_cursor_demo();
3137+ lxappearance_changed();
3138+ }
3139+}
3140+
3141+void cursor_theme_init(GtkBuilder* b)
3142+{
3143+ int max_cursor_w, max_cursor_h, max_size;
3144+ GtkTreeSelection* sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(app.cursor_theme_view));
3145+ /* treeview and model are already set up in icon_theme_init() */
3146+ g_signal_connect(sel, "changed", G_CALLBACK(on_cursor_theme_sel_changed), NULL);
3147+
3148+ gdk_display_get_maximal_cursor_size(gdk_display_get_default(), &max_cursor_w, &max_cursor_h);
3149+ max_size = MAX(max_cursor_w, max_cursor_h);
3150+
3151+ /* FIXME: this isn't fully working... */
3152+ app.cursor_size_range = GTK_WIDGET(gtk_builder_get_object(b, "cursor_size"));
3153+ if(max_size < 128)
3154+ gtk_range_set_range(GTK_RANGE(app.cursor_size_range), 1, max_size + 10); /* 10 is page size */
3155+ gtk_range_set_value(GTK_RANGE(app.cursor_size_range), app.cursor_theme_size);
3156+ g_signal_connect(app.cursor_size_range, "value-changed", G_CALLBACK(on_cursor_theme_size_changed), NULL);
3157+
3158+ /* set up demo for cursors */
3159+ app.cursor_demo_view = GTK_WIDGET(gtk_builder_get_object(b, "cursor_demo_view"));
3160+ gtk_icon_view_set_pixbuf_column(GTK_ICON_VIEW(app.cursor_demo_view), 0);
3161+ update_cursor_demo();
3162+
3163+ /* install and remove */
3164+ /* this part is already done in icon-theme.c */
3165+}
3166diff --git a/src/cursor-theme.h b/src/cursor-theme.h
3167new file mode 100644
3168index 0000000..5d5c567
3169--- /dev/null
3170+++ b/src/cursor-theme.h
3171@@ -0,0 +1,33 @@
3172+/*
3173+ * cursor-theme.h
3174+ *
3175+ * Copyright 2010 PCMan <pcman.tw@gmail.com>
3176+ *
3177+ * This program is free software; you can redistribute it and/or modify
3178+ * it under the terms of the GNU General Public License as published by
3179+ * the Free Software Foundation; either version 2 of the License, or
3180+ * (at your option) any later version.
3181+ *
3182+ * This program is distributed in the hope that it will be useful,
3183+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3184+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3185+ * GNU General Public License for more details.
3186+ *
3187+ * You should have received a copy of the GNU General Public License
3188+ * along with this program; if not, write to the Free Software
3189+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
3190+ * MA 02110-1301, USA.
3191+ */
3192+
3193+#ifndef _CURSOR_THEME_H_
3194+#define _CURSOR_THEME_H_