File: skin.cpp

package info (click to toggle)
stardict 3.0.1-9.3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,916 kB
  • ctags: 10,187
  • sloc: cpp: 45,541; sh: 9,360; xml: 4,151; ansic: 2,090; makefile: 552
file content (68 lines) | stat: -rw-r--r-- 2,208 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* 
 * This file part of StarDict - A international dictionary for GNOME.
 * http://stardict.sourceforge.net
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifdef HAVE_CONFIG_H
#  include "config.h"
#endif

#include <cstdlib>
#include <cstring>

#include "conf.h"
#include "utils.h"

#include "skin.h"

void AppSkin::load()
{		
	watch_cursor.reset(gdk_cursor_new(GDK_WATCH));
	std::string pixmaps_dir(gStarDictDataDir+ G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S);
	std::string filename;
#ifdef _WIN32			
	filename=pixmaps_dir+"stardict.png";
	icon.reset(load_image_from_file(filename));
#else
	icon.reset(load_image_from_file(GNOME_ICONDIR"/stardict.png"));
#ifdef CONFIG_GPE
	filename=pixmaps_dir+"docklet_gpe_normal.png";
#else
	filename=pixmaps_dir+"docklet_normal.png";
#endif
	docklet_normal_icon.reset(load_image_from_file(filename));
#ifdef CONFIG_GPE
	filename=pixmaps_dir+"docklet_gpe_scan.png";
#else
	filename=pixmaps_dir+"docklet_scan.png";
#endif
	docklet_scan_icon.reset(load_image_from_file(filename));
#ifdef CONFIG_GPE
	filename=pixmaps_dir+"docklet_gpe_stop.png";
#else
	filename=pixmaps_dir+"docklet_stop.png";
#endif
	docklet_stop_icon.reset(load_image_from_file(filename));
#endif
	filename=pixmaps_dir+"index_wazard.png";
	index_wazard.reset(load_image_from_file(filename));
	filename=pixmaps_dir+"index_appendix.png";
	index_appendix.reset(load_image_from_file(filename));
	filename=pixmaps_dir+"index_dictlist.png";
	index_dictlist.reset(load_image_from_file(filename));
	filename=pixmaps_dir+"index_translate.png";
	index_translate.reset(load_image_from_file(filename));
}