Преглед изворни кода

Migrate to TDE build system and fix crashes

tags/r14.0.0
Timothy Pearson пре 6 година
родитељ
комит
acc82b617d
13 измењених фајлова са 396 додато и 671 уклоњено
  1. 0
    8
      Makefile.am
  2. 199
    31
      config.h.in
  3. 0
    132
      configure.ac
  4. 153
    0
      configure.in.in
  5. 10
    10
      tdegtk/Makefile.am
  6. 0
    173
      tdegtk/raico-blur.c
  7. 0
    67
      tdegtk/raico-blur.h
  8. 0
    72
      tdegtk/tdegtk-cairo-support.c
  9. 3
    0
      tdegtk/tdegtk-draw.cpp
  10. 0
    157
      tdegtk/tdegtk-engine.c
  11. 1
    1
      tdegtk/tdegtk-support.c
  12. 15
    12
      tdegtk/tdegtk-theme.cpp
  13. 15
    8
      tests/Makefile.am

+ 0
- 8
Makefile.am Прегледај датотеку

@@ -1,5 +1,4 @@
1 1
 SUBDIRS = \
2
-	build \
3 2
 	tdegtk \
4 3
 	rc \
5 4
 	tests
@@ -11,13 +10,6 @@ EXTRA_DIST = autogen.sh COPYING
11 10
 DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
12 11
 
13 12
 MAINTAINERCLEANFILES = \
14
-	build/compile \
15
-	build/config.guess \
16
-	build/config.sub \
17
-	build/depcomp \
18
-	build/install-sh \
19
-	build/ltmain.sh \
20
-	build/missing \
21 13
 	Makefile.in \
22 14
 	config.h.in \
23 15
 	configure \

+ 199
- 31
config.h.in Прегледај датотеку

@@ -1,14 +1,65 @@
1
-/* config.h.in.  Generated from configure.ac by autoheader.  */
1
+/* config.h.in.  Generated from configure.in by autoheader.  */
2
+
3
+/* Define if building universal (internal helper macro) */
4
+#undef AC_APPLE_UNIVERSAL_BUILD
5
+
6
+/* Defines if your system has the Cairo library */
7
+#undef HAVE_CAIRO
8
+
9
+/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
10
+#undef HAVE_CARBON_CARBON_H
11
+
12
+/* Define if you have the CoreAudio API */
13
+#undef HAVE_COREAUDIO
14
+
15
+/* Define to 1 if you have the <crt_externs.h> header file. */
16
+#undef HAVE_CRT_EXTERNS_H
17
+
18
+/* Defines if your system has the crypt function */
19
+#undef HAVE_CRYPT
2 20
 
3 21
 /* Define to 1 if you have the <dlfcn.h> header file. */
4 22
 #undef HAVE_DLFCN_H
5 23
 
24
+/* Defines if your system has the GTK3 library */
25
+#undef HAVE_GTK3
26
+
6 27
 /* Define to 1 if you have the <inttypes.h> header file. */
7 28
 #undef HAVE_INTTYPES_H
8 29
 
30
+/* Define if you have libjpeg */
31
+#undef HAVE_LIBJPEG
32
+
33
+/* Define if you have libpng */
34
+#undef HAVE_LIBPNG
35
+
36
+/* Define if you have a working libpthread (will enable threaded code) */
37
+#undef HAVE_LIBPTHREAD
38
+
39
+/* Define if you have libz */
40
+#undef HAVE_LIBZ
41
+
9 42
 /* Define to 1 if you have the <memory.h> header file. */
10 43
 #undef HAVE_MEMORY_H
11 44
 
45
+/* Define if your system needs _NSGetEnviron to set up the environment */
46
+#undef HAVE_NSGETENVIRON
47
+
48
+/* Defines if your system has the Pango library */
49
+#undef HAVE_PANGO
50
+
51
+/* Define if you have res_init */
52
+#undef HAVE_RES_INIT
53
+
54
+/* Define if you have the res_init prototype */
55
+#undef HAVE_RES_INIT_PROTO
56
+
57
+/* Define if you have a STL implementation by SGI */
58
+#undef HAVE_SGI_STL
59
+
60
+/* Define to 1 if you have the `snprintf' function. */
61
+#undef HAVE_SNPRINTF
62
+
12 63
 /* Define to 1 if you have the <stdint.h> header file. */
13 64
 #undef HAVE_STDINT_H
14 65
 
@@ -21,6 +72,21 @@
21 72
 /* Define to 1 if you have the <string.h> header file. */
22 73
 #undef HAVE_STRING_H
23 74
 
75
+/* Define if you have strlcat */
76
+#undef HAVE_STRLCAT
77
+
78
+/* Define if you have the strlcat prototype */
79
+#undef HAVE_STRLCAT_PROTO
80
+
81
+/* Define if you have strlcpy */
82
+#undef HAVE_STRLCPY
83
+
84
+/* Define if you have the strlcpy prototype */
85
+#undef HAVE_STRLCPY_PROTO
86
+
87
+/* Define to 1 if you have the <sys/bitypes.h> header file. */
88
+#undef HAVE_SYS_BITYPES_H
89
+
24 90
 /* Define to 1 if you have the <sys/stat.h> header file. */
25 91
 #undef HAVE_SYS_STAT_H
26 92
 
@@ -30,6 +96,15 @@
30 96
 /* Define to 1 if you have the <unistd.h> header file. */
31 97
 #undef HAVE_UNISTD_H
32 98
 
99
+/* Define to 1 if you have the `vsnprintf' function. */
100
+#undef HAVE_VSNPRINTF
101
+
102
+/* Suffix for lib directories */
103
+#undef KDELIBSUFF
104
+
105
+/* Define a safe value for MAXPATHLEN */
106
+#undef KDEMAXPATHLEN
107
+
33 108
 /* Define to the sub-directory in which libtool stores uninstalled libraries.
34 109
    */
35 110
 #undef LT_OBJDIR
@@ -58,49 +133,142 @@
58 133
 /* Define to the version of this package. */
59 134
 #undef PACKAGE_VERSION
60 135
 
136
+/* The size of `char *', as computed by sizeof. */
137
+#undef SIZEOF_CHAR_P
138
+
139
+/* The size of `int', as computed by sizeof. */
140
+#undef SIZEOF_INT
141
+
142
+/* The size of `long', as computed by sizeof. */
143
+#undef SIZEOF_LONG
144
+
145
+/* The size of `short', as computed by sizeof. */
146
+#undef SIZEOF_SHORT
147
+
148
+/* The size of `size_t', as computed by sizeof. */
149
+#undef SIZEOF_SIZE_T
150
+
151
+/* The size of `unsigned long', as computed by sizeof. */
152
+#undef SIZEOF_UNSIGNED_LONG
153
+
61 154
 /* Define to 1 if you have the ANSI C header files. */
62 155
 #undef STDC_HEADERS
63 156
 
64
-/* Enable extensions on AIX 3, Interix.  */
65
-#ifndef _ALL_SOURCE
66
-# undef _ALL_SOURCE
157
+/* Version number of package */
158
+#undef VERSION
159
+
160
+/* Defined if compiling without arts */
161
+#undef WITHOUT_ARTS
162
+
163
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
164
+   significant byte first (like Motorola and SPARC, unlike Intel). */
165
+#if defined AC_APPLE_UNIVERSAL_BUILD
166
+# if defined __BIG_ENDIAN__
167
+#  define WORDS_BIGENDIAN 1
168
+# endif
169
+#else
170
+# ifndef WORDS_BIGENDIAN
171
+#  undef WORDS_BIGENDIAN
172
+# endif
67 173
 #endif
68
-/* Enable GNU extensions on systems that have them.  */
69
-#ifndef _GNU_SOURCE
70
-# undef _GNU_SOURCE
174
+
175
+/*
176
+ * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
177
+ * headers and I'm too lazy to write a configure test as long as only
178
+ * unixware is related
179
+ */
180
+#ifdef _UNIXWARE
181
+#define HAVE_BOOLEAN
71 182
 #endif
72
-/* Enable threading extensions on Solaris.  */
73
-#ifndef _POSIX_PTHREAD_SEMANTICS
74
-# undef _POSIX_PTHREAD_SEMANTICS
183
+
184
+
185
+
186
+/*
187
+ * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
188
+ * that defines bzero.
189
+ */
190
+
191
+#if defined(_AIX)
192
+#include <strings.h>
75 193
 #endif
76
-/* Enable extensions on HP NonStop.  */
77
-#ifndef _TANDEM_SOURCE
78
-# undef _TANDEM_SOURCE
194
+
195
+
196
+
197
+#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
198
+# include <sys/time.h>
199
+# include <crt_externs.h>
200
+# define environ (*_NSGetEnviron())
201
+#endif
202
+
203
+
204
+
205
+#if !defined(HAVE_RES_INIT_PROTO)
206
+#ifdef __cplusplus
207
+extern "C" {
208
+#endif
209
+int res_init(void);
210
+#ifdef __cplusplus
211
+}
79 212
 #endif
80
-/* Enable general extensions on Solaris.  */
81
-#ifndef __EXTENSIONS__
82
-# undef __EXTENSIONS__
83 213
 #endif
84 214
 
85 215
 
86
-/* Version number of package */
87
-#undef VERSION
88 216
 
89
-/* Define to 1 if on MINIX. */
90
-#undef _MINIX
217
+#if !defined(HAVE_STRLCAT_PROTO)
218
+#ifdef __cplusplus
219
+extern "C" {
220
+#endif
221
+unsigned long strlcat(char*, const char*, unsigned long);
222
+#ifdef __cplusplus
223
+}
224
+#endif
225
+#endif
226
+
91 227
 
92
-/* Define to 2 if the system does not provide POSIX.1 features except with
93
-   this defined. */
94
-#undef _POSIX_1_SOURCE
95 228
 
96
-/* Define to 1 if you need to in order for `stat' and other things to work. */
97
-#undef _POSIX_SOURCE
229
+#if !defined(HAVE_STRLCPY_PROTO)
230
+#ifdef __cplusplus
231
+extern "C" {
232
+#endif
233
+unsigned long strlcpy(char*, const char*, unsigned long);
234
+#ifdef __cplusplus
235
+}
236
+#endif
237
+#endif
98 238
 
99
-/* Define to empty if `const' does not conform to ANSI C. */
100
-#undef const
101 239
 
102
-/* Define to `__inline__' or `__inline' if that's what the C compiler
103
-   calls it, or to nothing if 'inline' is not supported under any name.  */
104
-#ifndef __cplusplus
105
-#undef inline
240
+
241
+/*
242
+ * On HP-UX, the declaration of vsnprintf() is needed every time !
243
+ */
244
+
245
+#if !defined(HAVE_VSNPRINTF) || defined(hpux)
246
+#if __STDC__
247
+#include <stdarg.h>
248
+#include <stdlib.h>
249
+#else
250
+#include <varargs.h>
251
+#endif
252
+#ifdef __cplusplus
253
+extern "C"
254
+#endif
255
+int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
256
+#ifdef __cplusplus
257
+extern "C"
106 258
 #endif
259
+int snprintf(char *str, size_t n, char const *fmt, ...);
260
+#endif
261
+
262
+
263
+
264
+#if defined(__SVR4) && !defined(__svr4__)
265
+#define __svr4__ 1
266
+#endif
267
+
268
+
269
+/* type to use in place of socklen_t if not defined */
270
+#undef kde_socklen_t
271
+
272
+/* type to use in place of socklen_t if not defined (deprecated, use
273
+   kde_socklen_t) */
274
+#undef ksize_t

+ 0
- 132
configure.ac Прегледај датотеку

@@ -1,132 +0,0 @@
1
-AC_PREREQ(2.63)
2
-
3
-# Package
4
-
5
-AC_INIT([tdegtk],[1.0.1],[https://bugs.trinitydesktop.org],[tdegtk])
6
-AC_CONFIG_SRCDIR([tdegtk/tdegtk.h])
7
-AC_CONFIG_MACRO_DIR([build])
8
-AC_CONFIG_AUX_DIR([build])
9
-AC_CONFIG_HEADERS([config.h])
10
-AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2])
11
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
12
-
13
-NANO=`echo AC_PACKAGE_VERSION | cut -d'.' -f4`
14
-if test x"$NANO" = x || test "x$NANO" = "x0" ; then
15
-    TDEGTK_TRUNK="no"
16
-    PACKAGE_VERSION_NANO="0"
17
-else
18
-    TDEGTK_TRUNK="yes"
19
-    PACKAGE_VERSION_NANO="$NANO"
20
-fi
21
-AC_SUBST(TDEGTK_TRUNK)
22
-AC_SUBST(PACKAGE_VERSION_NANO)
23
-
24
-AC_USE_SYSTEM_EXTENSIONS
25
-AC_PROG_CC
26
-AM_PROG_CC_C_O
27
-AC_PROG_CXX
28
-LT_INIT
29
-AC_C_CONST
30
-AC_C_INLINE
31
-
32
-# Build dependencies
33
-
34
-AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
35
-AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
36
-PKG_PROG_PKG_CONFIG
37
-
38
-AC_SUBST(glib_req, 2.26.0)
39
-AC_SUBST(gtk_req, 3.1.10)
40
-AC_SUBST(cairo_req, 1.10)
41
-
42
-PKG_CHECK_MODULES(DEPS, glib-2.0 >= $glib_req gtk+-3.0 >= $gtk_req cairo >= $cairo_req)
43
-AC_SUBST(DEPS_CFLAGS)
44
-AC_SUBST(DEPS_LIBS)
45
-
46
-# Debug flags
47
-
48
-if test x$TDEGTK_TRUNK = xyes; then
49
-    DEFAULT_DEBUG="yes"
50
-else
51
-    DEFAULT_DEBUG="no"
52
-fi
53
-AC_SUBST(DEFAULT_DEBUG)
54
-AC_ARG_ENABLE([debug],
55
-              [AS_HELP_STRING([--enable-debug=@<:@no/yes/full@:>@],[Control debug level @<:@default=debug_default@:>@])],
56
-              [], [enable_debug=$DEFAULT_DEBUG])
57
-AS_CASE([$enable_debug],
58
-        [yes],
59
-        [
60
-          test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
61
-          DEBUG_CFLAGS="-D_DEBUG"
62
-        ],
63
-        [no],
64
-        [DEBUG_CFLAGS="-DNDEBUG"],
65
-        [AC_MSG_ERROR([Unknown argument for --enable-debug])]
66
-)
67
-AC_SUBST(DEBUG_CFLAGS)
68
-
69
-# Maintainer flags
70
-
71
-if test x$TDEGTK_TRUNK = xyes; then
72
-    DEFAULT_MAINTAINER_FLAGS="yes"
73
-else
74
-    DEFAULT_MAINTAINER_FLAGS="no"
75
-fi
76
-AC_SUBST(DEFAULT_MAINTAINER_FLAGS)
77
-AC_ARG_ENABLE([maintainer-flags],
78
-              [AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>@],[Use strict compiler flags @<:@default=maintainer_flags_default@:>@])],
79
-              [],
80
-              [enable_maintainer_flags=$DEFAULT_MAINTAINER_FLAGS])
81
-AS_IF([test "x$enable_maintainer_flags" = "xyes" && test "x$GCC" = "xyes"],
82
-      [
83
-        AS_COMPILER_FLAGS([MAINTAINER_CFLAGS],
84
-                          ["-fno-common -Wall -Wextra -Werror -Wempty-body
85
-                            -Wno-missing-field-initializers -Wstrict-aliasing=2
86
-                            -Wno-unused-parameter -Wdeclaration-after-statement
87
-                            -Wpointer-arith -Wcast-align -Wwrite-strings
88
-                            -Wformat-security -Wformat-nonliteral -Winit-self
89
-                            -Wmissing-declarations -Wnested-externs -Wundef
90
-                            -Wold-style-definition -Wswitch-default
91
-                            -Wredundant-decls"])
92
-      ]
93
-)
94
-AC_SUBST(MAINTAINER_CFLAGS)
95
-
96
-# Variables
97
-
98
-TDEGTK_LIBADD="\$(DEPS_LIBS)"
99
-AC_SUBST(TDEGTK_LIBADD)
100
-
101
-TDEGTK_CFLAGS="-I\$(top_srcdir) -DTDEGTK_COMPILATION \$(DEPS_CFLAGS) \$(DEBUG_CFLAGS) \$(MAINTAINER_CFLAGS)"
102
-AC_SUBST(TDEGTK_CFLAGS)
103
-
104
-TDEGTK_LDFLAGS="-module -avoid-version -no-undefined"
105
-AC_SUBST(TDEGTK_LDFLAGS)
106
-
107
-GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
108
-AC_SUBST(GTK_VERSION)
109
-
110
-# Files
111
-
112
-AC_CONFIG_FILES([
113
-Makefile
114
-build/Makefile
115
-po/Makefile
116
-tdegtk/Makefile
117
-tests/Makefile
118
-rc/Makefile
119
-])
120
-AC_OUTPUT
121
-
122
-# Summary
123
-
124
-echo ""
125
-echo "  tdegtk $PACKAGE_VERSION"
126
-echo "  ========================="
127
-echo ""
128
-echo "  Debug:  ${enable_debug}"
129
-echo "  Prefix: ${prefix}"
130
-echo ""
131
-echo "  Compiler flags: ${CPPFLAGS} ${DEBUG_CFLAGS} ${MAINTAINER_CFLAGS}"
132
-echo ""

+ 153
- 0
configure.in.in Прегледај датотеку

@@ -0,0 +1,153 @@
1
+#MIN_CONFIG(3.2.0)
2
+
3
+AM_INIT_AUTOMAKE(tdegtk3, 0.1)
4
+AC_C_BIGENDIAN
5
+AC_CHECK_KDEMAXPATHLEN
6
+
7
+# C support
8
+AM_PROG_CC_C_O
9
+
10
+# --- Cairo check ---
11
+
12
+KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
13
+  AC_MSG_WARN([Could not find pkg-config])
14
+])
15
+
16
+AC_MSG_CHECKING([for Cairo])
17
+
18
+if test -n "$PKGCONFIG"; then
19
+  vers=`$PKGCONFIG cairo --modversion 2>/dev/null`
20
+  if test -n "$vers"
21
+  then
22
+     CAIRO_LIBS="`$PKGCONFIG cairo --libs`"
23
+     CAIRO_RPATH=
24
+     for args in $CAIRO_LIBS; do
25
+          case $args in
26
+            -L*)
27
+               CAIRO_RPATH="$CAIRO_RPATH $args"
28
+               ;;
29
+          esac
30
+     done
31
+     CAIRO_RPATH=`echo $CAIRO_RPATH | $SED -e "s/-L/-R/g"`
32
+     CAIRO_CFLAGS="`$PKGCONFIG cairo --cflags`"
33
+
34
+     AC_DEFINE_UNQUOTED(HAVE_CAIRO, 1, [Defines if your system has the Cairo library])
35
+  fi
36
+fi
37
+
38
+if test ! "$USE_RPATH" = "yes"; then
39
+    CAIRO_RPATH=
40
+fi
41
+
42
+if test -n "$CAIRO_LIBS"
43
+then
44
+  AC_MSG_RESULT([yes])
45
+else
46
+  AC_MSG_RESULT([not found])
47
+fi
48
+
49
+AC_SUBST(CAIRO_LIBS)
50
+AC_SUBST(CAIRO_CFLAGS)
51
+AC_SUBST(CAIRO_RPATH)
52
+
53
+AM_CONDITIONAL(have_openexr, test -n "$CAIRO_LIBS")
54
+
55
+# --- End of Cairo check ---
56
+
57
+# --- GTK3 check ---
58
+
59
+KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
60
+  AC_MSG_WARN([Could not find pkg-config])
61
+])
62
+
63
+AC_MSG_CHECKING([for GTK3])
64
+
65
+if test -n "$PKGCONFIG"; then
66
+  vers=`$PKGCONFIG gtk+-3.0 --modversion 2>/dev/null`
67
+  if test -n "$vers"
68
+  then
69
+     GTK3_LIBS="`$PKGCONFIG gtk+-3.0 --libs`"
70
+     GTK3_RPATH=
71
+     for args in $GTK3_LIBS; do
72
+          case $args in
73
+            -L*)
74
+               GTK3_RPATH="$GTK3_RPATH $args"
75
+               ;;
76
+          esac
77
+     done
78
+     GTK3_RPATH=`echo $GTK3_RPATH | $SED -e "s/-L/-R/g"`
79
+     GTK3_CFLAGS="`$PKGCONFIG gtk+-3.0 --cflags`"
80
+     GTK3_PREFIX=`$PKG_CONFIG --variable=prefix gtk+-3.0`
81
+     GTK3_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
82
+
83
+     AC_DEFINE_UNQUOTED(HAVE_GTK3, 1, [Defines if your system has the GTK3 library])
84
+  fi
85
+fi
86
+
87
+if test ! "$USE_RPATH" = "yes"; then
88
+    GTK3_RPATH=
89
+fi
90
+
91
+if test -n "$GTK3_LIBS"
92
+then
93
+  AC_MSG_RESULT([yes])
94
+else
95
+  AC_MSG_RESULT([not found])
96
+fi
97
+
98
+AC_SUBST(GTK3_LIBS)
99
+AC_SUBST(GTK3_CFLAGS)
100
+AC_SUBST(GTK3_RPATH)
101
+AC_SUBST(GTK3_PREFIX)
102
+AC_SUBST(GTK3_VERSION)
103
+
104
+AM_CONDITIONAL(have_openexr, test -n "$GTK3_LIBS")
105
+
106
+# --- End of GTK3 check ---
107
+
108
+# --- Pango check ---
109
+
110
+KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
111
+  AC_MSG_WARN([Could not find pkg-config])
112
+])
113
+
114
+AC_MSG_CHECKING([for Pango])
115
+
116
+if test -n "$PKGCONFIG"; then
117
+  vers=`$PKGCONFIG pango --modversion 2>/dev/null`
118
+  if test -n "$vers"
119
+  then
120
+     PANGO_LIBS="`$PKGCONFIG pango --libs`"
121
+     PANGO_RPATH=
122
+     for args in $PANGO_LIBS; do
123
+          case $args in
124
+            -L*)
125
+               PANGO_RPATH="$PANGO_RPATH $args"
126
+               ;;
127
+          esac
128
+     done
129
+     PANGO_RPATH=`echo $PANGO_RPATH | $SED -e "s/-L/-R/g"`
130
+     PANGO_CFLAGS="`$PKGCONFIG pango --cflags`"
131
+
132
+     AC_DEFINE_UNQUOTED(HAVE_PANGO, 1, [Defines if your system has the Pango library])
133
+  fi
134
+fi
135
+
136
+if test ! "$USE_RPATH" = "yes"; then
137
+    PANGO_RPATH=
138
+fi
139
+
140
+if test -n "$PANGO_LIBS"
141
+then
142
+  AC_MSG_RESULT([yes])
143
+else
144
+  AC_MSG_RESULT([not found])
145
+fi
146
+
147
+AC_SUBST(PANGO_LIBS)
148
+AC_SUBST(PANGO_CFLAGS)
149
+AC_SUBST(PANGO_RPATH)
150
+
151
+AM_CONDITIONAL(have_openexr, test -n "$PANGO_LIBS")
152
+
153
+# --- End of Pango check ---

+ 10
- 10
tdegtk/Makefile.am Прегледај датотеку

@@ -1,8 +1,9 @@
1
+INCLUDES= $(all_includes) $(KDE_INCLUDES)/tde
2
+
1 3
 source_h = \
2 4
 	$(srcdir)/tdegtk.h \
3 5
 	$(srcdir)/exponential-blur.h \
4 6
 	$(srcdir)/gtkroundedboxprivate.h \
5
-	$(srcdir)/raico-blur.h \
6 7
 	$(srcdir)/tdegtk-cairo-support.h \
7 8
 	$(srcdir)/tdegtk-draw.h \
8 9
 	$(srcdir)/tdegtk-engine.h \
@@ -22,7 +23,6 @@ source_h = \
22 23
 source_c = \
23 24
 	$(srcdir)/exponential-blur.c \
24 25
 	$(srcdir)/gtkroundedbox.c \
25
-	$(srcdir)/raico-blur.c \
26 26
 	$(srcdir)/tdegtk-cairo-support.c \
27 27
 	$(srcdir)/tdegtk-draw.cpp \
28 28
 	$(srcdir)/tdegtk-engine.c \
@@ -36,25 +36,25 @@ source_c = \
36 36
 	$(srcdir)/tdegtk-baseengine.cpp \
37 37
 	$(srcdir)/tdegtk-theme.cpp
38 38
 
39
-enginedir = $(libdir)/gtk-3.0/$(GTK_VERSION)/theming-engines
39
+enginedir = $(GTK3_PREFIX)/lib/gtk-3.0/$(GTK3_VERSION)/theming-engines
40 40
 engine_LTLIBRARIES = libtdegtk.la
41 41
 
42 42
 libtdegtk_la_SOURCES = $(source_h) $(source_c)
43 43
 
44
-libtdegtk_la_CFLAGS = $(TDEGTK_CFLAGS)
45
-libtdegtk_la_CXXFLAGS = $(TDEGTK_CXXFLAGS) -I/usr/include/tqt -I/usr/include/tqt3 -I/opt/trinity/include $(TDEGTK_CFLAGS)
44
+libtdegtk_la_CFLAGS = $(TDEGTK_CFLAGS) $(CAIRO_CFLAGS) $(GTK3_CFLAGS)
45
+libtdegtk_la_CXXFLAGS = $(TDEGTK_CXXFLAGS) $(TDEGTK_CFLAGS) $(CAIRO_CFLAGS) $(GTK3_CFLAGS)
46 46
 
47
-libtdegtk_la_LIBADD = $(TDEGTK_LIBADD) libtqtcairo.la -ltqt -ltqt-mt -L/opt/trinity/lib -ltdecore
47
+libtdegtk_la_LIBADD = $(TDEGTK_LIBADD) libtqtcairo.la $(all_libraries) $(CAIRO_LIBS) $(GTK3_LIBS) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE)
48 48
 
49
-libtdegtk_la_LDFLAGS = $(TDEGTK_LDFLAGS)
49
+libtdegtk_la_LDFLAGS = $(TDEGTK_LDFLAGS) $(CAIRO_LIBS) $(GTK3_LIBS)
50 50
 
51 51
 lib_LTLIBRARIES = libtqtcairo.la
52 52
 
53 53
 libtqtcairo_la_SOURCES = tqtcairopainter.h tqtcairopainter.cpp
54 54
 
55
-libtqtcairo_la_CFLAGS = $(TDEGTK_CFLAGS)
56
-libtqtcairo_la_CXXFLAGS = $(TDEGTK_CXXFLAGS) -I/usr/include/tqt -I/usr/include/tqt3 $(TDEGTK_CFLAGS)
55
+libtqtcairo_la_CFLAGS = $(TDEGTK_CFLAGS) $(CAIRO_CFLAGS) $(GTK3_CFLAGS)
56
+libtqtcairo_la_CXXFLAGS = $(TDEGTK_CXXFLAGS) $(TDEGTK_CFLAGS) $(CAIRO_CFLAGS) $(GTK3_CFLAGS)
57 57
 
58 58
 libtqtcairo_la_LIBADD = $(TDEGTK_LIBADD)
59 59
 
60
-libtqtcairo_la_LDFLAGS = $(TDEGTK_LDFLAGS)
60
+libtqtcairo_la_LDFLAGS = $(TDEGTK_LDFLAGS) $(CAIRO_LIBS) $(GTK3_LIBS)

+ 0
- 173
tdegtk/raico-blur.c Прегледај датотеку

@@ -1,173 +0,0 @@
1
-/* The TdeGtk Theming Engine for Gtk+.
2
- * Copyright (C) 2009 Canonical Ltd
3
- *
4
- * This  library is free  software; you can  redistribute it and/or
5
- * modify it  under  the terms  of the  GNU Lesser  General  Public
6
- * License  as published  by the Free  Software  Foundation; either
7
- * version 2 of the License, or (at your option) any later version.
8
- *
9
- * This library is distributed  in the hope that it will be useful,
10
- * but  WITHOUT ANY WARRANTY; without even  the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- * Lesser General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU Lesser General Public
15
- * License  along  with  this library;  if not,  write to  the Free
16
- * Software Foundation, Inc., 51  Franklin St, Fifth Floor, Boston,
17
- * MA 02110-1301, USA.
18
- *
19
- * Authored by Mirco "MacSlow" Mueller <mirco.mueller@canonical.com>
20
- *
21
- */
22
-
23
-#include "exponential-blur.h"
24
-#include "raico-blur.h"
25
-
26
-struct _raico_blur_private_t
27
-{
28
-  raico_blur_quality_t quality; /* low, medium, high */
29
-  guint                radius;  /* blur-radius */
30
-};
31
-
32
-raico_blur_t*
33
-raico_blur_create (void)
34
-{
35
-  raico_blur_t*         blur = NULL;
36
-  raico_blur_private_t* priv = NULL;
37
-
38
-  blur = g_new0 (raico_blur_t, 1);
39
-  if (!blur)
40
-    {
41
-      g_debug ("raico_blur_create(): could not allocate blur struct");
42
-      return NULL;
43
-    }
44
-
45
-  priv = g_new0 (raico_blur_private_t, 1);
46
-  if (!priv)
47
-    {
48
-      g_debug ("raico_blur_create(): could not allocate priv struct");
49
-      g_free ((gpointer) blur);
50
-      return NULL;
51
-    }
52
-
53
-  priv->quality = RAICO_BLUR_QUALITY_LOW;
54
-
55
-  priv->radius  = 0;
56
-
57
-  blur->priv = priv;
58
-
59
-  return blur;
60
-}
61
-
62
-raico_blur_quality_t
63
-raico_blur_get_quality (raico_blur_t* blur)
64
-{
65
-  g_assert (blur != NULL);
66
-
67
-  return blur->priv->quality;
68
-}
69
-
70
-void
71
-raico_blur_set_quality (raico_blur_t*        blur,
72
-                        raico_blur_quality_t quality)
73
-{
74
-  if (!blur)
75
-    {
76
-      g_debug ("raico_blur_set_quality(): NULL blur-pointer passed");
77
-      return;
78
-    }
79
-
80
-  blur->priv->quality = quality;
81
-}
82
-
83
-guint
84
-raico_blur_get_radius (raico_blur_t* blur)
85
-{
86
-  g_assert (blur != NULL);
87
-
88
-  return blur->priv->radius;
89
-}
90
-
91
-void
92
-raico_blur_set_radius (raico_blur_t* blur,
93
-                       guint         radius)
94
-{
95
-  if (!blur)
96
-    {
97
-      g_debug ("raico_blur_set_radius(): NULL blur-pointer passed");
98
-      return;
99
-    }
100
-
101
-  blur->priv->radius = radius;
102
-}
103
-
104
-void
105
-raico_blur_apply (raico_blur_t*    blur,
106
-                  cairo_surface_t* surface)
107
-{
108
-  cairo_format_t format;
109
-
110
-  /* sanity checks */
111
-  if (!blur)
112
-    {
113
-      g_debug ("raico_blur_apply(): NULL blur-pointer passed");
114
-      return;
115
-    }
116
-
117
-  if (!surface)
118
-    {
119
-      g_debug ("raico_blur_apply(): NULL surface-pointer passed");
120
-      return;
121
-    }
122
-
123
-  if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS)
124
-    {
125
-      g_debug ("raico_blur_apply(): invalid surface status");
126
-      return;
127
-    }
128
-
129
-  if (cairo_surface_get_type (surface) != CAIRO_SURFACE_TYPE_IMAGE)
130
-    {
131
-      g_debug ("raico_blur_apply(): non-image surface passed");
132
-      return;
133
-    }
134
-
135
-  format = cairo_image_surface_get_format (surface);
136
-  if (format != CAIRO_FORMAT_A8 &&
137
-      format != CAIRO_FORMAT_RGB24 &&
138
-      format != CAIRO_FORMAT_ARGB32)
139
-    {
140
-      g_debug ("raico_blur_apply(): unsupported image-format");
141
-      return;
142
-    }
143
-
144
-  /* stupid, but you never know */
145
-  if (blur->priv->radius == 0)
146
-    return;
147
-
148
-  /* now do the real work */
149
-  switch (blur->priv->quality)
150
-  {
151
-    default:
152
-    case RAICO_BLUR_QUALITY_HIGH:
153
-    case RAICO_BLUR_QUALITY_MEDIUM:
154
-      /* Not implemented yet */
155
-      //surface_gaussian_blur (surface, blur->priv->radius);
156
-    case RAICO_BLUR_QUALITY_LOW:
157
-      surface_exponential_blur (surface, blur->priv->radius);
158
-      break;
159
-  }
160
-}
161
-
162
-void
163
-raico_blur_destroy (raico_blur_t* blur)
164
-{
165
-  if (!blur)
166
-    {
167
-      g_debug ("raico_blur_destroy(): invalid blur-pointer passed");
168
-      return;
169
-    }
170
-
171
-  g_free ((gpointer) blur->priv);
172
-  g_free ((gpointer) blur);
173
-}

+ 0
- 67
tdegtk/raico-blur.h Прегледај датотеку

@@ -1,67 +0,0 @@
1
-/* The TdeGtk Theming Engine for Gtk+.
2
- * Copyright (C) 2009 Canonical Ltd
3
- *
4
- * This  library is free  software; you can  redistribute it and/or
5
- * modify it  under  the terms  of the  GNU Lesser  General  Public
6
- * License  as published  by the Free  Software  Foundation; either
7
- * version 2 of the License, or (at your option) any later version.
8
- *
9
- * This library is distributed  in the hope that it will be useful,
10
- * but  WITHOUT ANY WARRANTY; without even  the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
- * Lesser General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU Lesser General Public
15
- * License  along  with  this library;  if not,  write to  the Free
16
- * Software Foundation, Inc., 51  Franklin St, Fifth Floor, Boston,
17
- * MA 02110-1301, USA.
18
- *
19
- * Authored by Mirco "MacSlow" Mueller <mirco.mueller@canonical.com>
20
- *
21
- */
22
-
23
-#ifndef _RAICO_BLUR_H
24
-#define _RAICO_BLUR_H
25
-
26
-#include <cairo.h>
27
-#include <glib.h>
28
-
29
-typedef enum _raico_blur_quality_t
30
-{
31
-  RAICO_BLUR_QUALITY_LOW = 0, /* low quality, but fast, maybe interactive */
32
-  RAICO_BLUR_QUALITY_MEDIUM,  /* compromise between speed and quality */
33
-  RAICO_BLUR_QUALITY_HIGH     /* quality before speed */
34
-} raico_blur_quality_t;
35
-
36
-typedef struct _raico_blur_private_t raico_blur_private_t;
37
-
38
-typedef struct _raico_blur_t
39
-{
40
-  raico_blur_private_t* priv;
41
-} raico_blur_t;
42
-
43
-raico_blur_t*
44
-raico_blur_create (void);
45
-
46
-raico_blur_quality_t
47
-raico_blur_get_quality (raico_blur_t* blur);
48
-
49
-void
50
-raico_blur_set_quality (raico_blur_t*        blur,
51
-                        raico_blur_quality_t quality);
52
-
53
-guint
54
-raico_blur_get_radius (raico_blur_t* blur);
55
-
56
-void
57
-raico_blur_set_radius (raico_blur_t* blur,
58
-                       guint         radius);
59
-
60
-void
61
-raico_blur_apply (raico_blur_t*    blur,
62
-                  cairo_surface_t* surface);
63
-
64
-void
65
-raico_blur_destroy (raico_blur_t* blur);
66
-
67
-#endif /* _RAICO_BLUR_H */

+ 0
- 72
tdegtk/tdegtk-cairo-support.c Прегледај датотеку

@@ -24,7 +24,6 @@
24 24
 #include <gtk/gtk.h>
25 25
 
26 26
 #include "gtkroundedboxprivate.h"
27
-#include "raico-blur.h"
28 27
 #include "tdegtk-cairo-support.h"
29 28
 #include "tdegtk-support.h"
30 29
 #include "tdegtk-types.h"
@@ -332,76 +331,6 @@ draw_glow (GtkThemingEngine *engine,
332 331
            guint             hidden_side,
333 332
            GtkJunctionSides  junction)
334 333
 {
335
-  GdkRGBA *glow_color;
336
-  GtkBorder border;
337
-  GtkRoundedBox border_box, padding_box;
338
-  GtkStateFlags state;
339
-  cairo_t *cr_surface;
340
-  cairo_surface_t *surface;
341
-  gint bradius = 0;
342
-  raico_blur_t* blur = NULL;
343
-
344
-  state = gtk_theming_engine_get_state (engine);
345
-
346
-  gtk_theming_engine_get (engine, state,
347
-                          "-tdegtk-glow-radius", &bradius,
348
-                          "-tdegtk-glow-color", &glow_color,
349
-                          NULL);
350
-
351
-  if (bradius <= 0)
352
-    goto end_draw_glow;
353
-
354
-  gtk_theming_engine_get_border (engine, state, &border);
355
-
356
-  hide_border_sides (&border, hidden_side);
357
-
358
-  cairo_save (cr);
359
-
360
-  cairo_translate (cr, x, y);
361
-
362
-  /* create the path to clip */
363
-  _gtk_rounded_box_init_rect (&border_box, 0, 0, width, height);
364
-  _gtk_rounded_box_apply_border_radius (&border_box, engine, state, junction);
365
-  _gtk_rounded_box_shrink (&border_box, border.top, border.right, border.bottom, border.left);
366
-  _gtk_rounded_box_path (&border_box, cr);
367
-
368
-  cairo_clip (cr);
369
-
370
-  /* create the surface to blur */
371
-  surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
372
-                                        width + bradius * 2,
373
-                                        height + bradius * 2);
374
-  cr_surface = cairo_create (surface); 
375
-
376
-  /* create the path on the surface to blur */
377
-  _gtk_rounded_box_move (&border_box, bradius, bradius);
378
-  padding_box = border_box;
379
-  _gtk_rounded_box_shrink (&padding_box, border.top * 2, border.right * 2, border.bottom * 2, border.left * 2);
380
-
381
-  cairo_set_fill_rule (cr_surface, CAIRO_FILL_RULE_EVEN_ODD);
382
-
383
-  gdk_cairo_set_source_rgba (cr_surface, glow_color);
384
-
385
-  _gtk_rounded_box_path (&border_box, cr_surface);
386
-  _gtk_rounded_box_path (&padding_box, cr_surface);
387
-  cairo_fill (cr_surface);
388
-
389
-  /* create and apply raico blur */
390
-  blur = raico_blur_create ();
391
-  raico_blur_set_radius (blur, bradius);
392
-  raico_blur_apply (blur, surface);
393
-
394
-  /* paint the blurred surface to cr */
395
-  cairo_set_source_surface (cr, surface, - bradius, - bradius); 
396
-  cairo_paint (cr);
397
-
398
-  cairo_restore (cr);
399
-
400
-  cairo_surface_destroy (surface); 
401
-  cairo_destroy (cr_surface);
402
-
403
-end_draw_glow:
404
-  gdk_rgba_free (glow_color);
405 334
 }
406 335
 
407 336
 /* draw a repeated texture */
@@ -1364,7 +1293,6 @@ tdegtk_cairo_set_source_border (GtkThemingEngine *engine,
1364 1293
 
1365 1294
   gtk_theming_engine_get (engine, state,
1366 1295
                           "border-style", &border_style,
1367
-                          "-tdegtk-border-gradient", &border_pat,
1368 1296
                           NULL);
1369 1297
   gtk_theming_engine_get_border_color (engine, state, &border_color);
1370 1298
 

+ 3
- 0
tdegtk/tdegtk-draw.cpp Прегледај датотеку

@@ -2196,6 +2196,9 @@ tdegtk_draw_line (GtkThemingEngine *engine,
2196 2196
                  gdouble           x1,
2197 2197
                  gdouble           y1)
2198 2198
 {
2199
+	// FIXME
2200
+	// This should be using TQt to draw the line with an appropriate line color from the current widget type palette
2201
+
2199 2202
 	// line endings
2200 2203
 	if (y0 == y1) {
2201 2204
 		y0 += 0.5;

+ 0
- 157
tdegtk/tdegtk-engine.c Прегледај датотеку

@@ -348,163 +348,6 @@ tdegtk_engine_class_init (TdeGtkEngineClass *klass)
348 348
 	engine_class->render_line        = tdegtk_engine_render_line;
349 349
 	engine_class->render_option      = tdegtk_engine_render_option;
350 350
 	engine_class->render_slider      = tdegtk_engine_render_slider;
351
-
352
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
353
-					g_param_spec_boxed ("background-texture",
354
-								"Background texture",
355
-								"Background texture",
356
-								CAIRO_GOBJECT_TYPE_PATTERN, 0));
357
-	
358
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
359
-					g_param_spec_boxed ("border-gradient",
360
-								"Border gradient",
361
-								"Border gradient",
362
-								CAIRO_GOBJECT_TYPE_PATTERN, 0));
363
-	
364
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
365
-					g_param_spec_boxed ("bullet-color",
366
-								"Bullet color",
367
-								"Bullet color",
368
-								GDK_TYPE_RGBA, 0));
369
-	
370
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
371
-					g_param_spec_boxed ("bullet-outline-color",
372
-								"Bullet outline color",
373
-								"Bullet outline color",
374
-								GDK_TYPE_RGBA, 0));
375
-	
376
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
377
-					g_param_spec_boxed ("centroid-texture",
378
-								"Centroid texture",
379
-								"Centroid texture",
380
-								CAIRO_GOBJECT_TYPE_PATTERN, 0));
381
-	
382
-	
383
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
384
-					g_param_spec_boxed ("focus-border-color",
385
-								"Focus border color",
386
-								"Focus border color",
387
-								GDK_TYPE_RGBA, 0));
388
-	
389
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
390
-					g_param_spec_int ("focus-border-radius",
391
-								"Focus border radius",
392
-								"Focus border radius",
393
-								0, G_MAXINT, 0, 0));
394
-	
395
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
396
-					g_param_spec_boxed ("focus-fill-color",
397
-								"Focus fill color",
398
-								"Focus fill color",
399
-								GDK_TYPE_RGBA, 0));
400
-	
401
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
402
-					g_param_spec_boxed ("focus-outer-stroke-color",
403
-								"Focus outer stroke color",
404
-								"Focus outer stroke color",
405
-								GDK_TYPE_RGBA, 0));
406
-	
407
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
408
-					g_param_spec_int ("glow-radius",
409
-								"Glow radius",
410
-								"Glow radius",
411
-								0, G_MAXINT, 0, 0));
412
-	
413
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
414
-					g_param_spec_boxed ("glow-color",
415
-								"Glow color",
416
-								"Glow color",
417
-								GDK_TYPE_RGBA, 0));
418
-	
419
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
420
-					g_param_spec_boxed ("inner-stroke-color",
421
-								"Inner stroke color",
422
-								"Inner stroke color",
423
-								GDK_TYPE_RGBA, 0));
424
-	
425
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
426
-					g_param_spec_boxed ("inner-stroke-top-color",
427
-								"Inner stroke top color",
428
-								"Inner stroke top color",
429
-								GDK_TYPE_RGBA, 0));
430
-	
431
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
432
-					g_param_spec_boxed ("inner-stroke-right-color",
433
-								"Inner stroke right color",
434
-								"Inner stroke right color",
435
-								GDK_TYPE_RGBA, 0));
436
-	
437
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
438
-					g_param_spec_boxed ("inner-stroke-bottom-color",
439
-								"Inner stroke bottom color",
440
-								"Inner stroke bottom color",
441
-								GDK_TYPE_RGBA, 0));
442
-	
443
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
444
-					g_param_spec_boxed ("inner-stroke-left-color",
445
-								"Inner stroke left color",
446
-								"Inner stroke left color",
447
-								GDK_TYPE_RGBA, 0));
448
-	
449
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
450
-					g_param_spec_boxed ("inner-stroke-gradient",
451
-								"Inner stroke gradient",
452
-								"Inner stroke gradient",
453
-								CAIRO_GOBJECT_TYPE_PATTERN, 0));
454
-	
455
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
456
-					g_param_spec_boxed ("inner-stroke-width",
457
-								"Inner stroke width",
458
-								"Inner stroke width",
459
-								GTK_TYPE_BORDER, 0));
460
-	
461
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
462
-					g_param_spec_boxed ("outer-stroke-color",
463
-								"Outer stroke color",
464
-								"Outer stroke color",
465
-								GDK_TYPE_RGBA, 0));
466
-	
467
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
468
-					g_param_spec_boxed ("outer-stroke-top-color",
469
-								"Outer stroke top color",
470
-								"Outer stroke top color",
471
-								GDK_TYPE_RGBA, 0));
472
-	
473
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
474
-					g_param_spec_boxed ("outer-stroke-right-color",
475
-								"Outer stroke right color",
476
-								"Outer stroke right color",
477
-								GDK_TYPE_RGBA, 0));
478
-	
479
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
480
-					g_param_spec_boxed ("outer-stroke-bottom-color",
481
-								"Outer stroke bottom color",
482
-								"Outer stroke bottom color",
483
-								GDK_TYPE_RGBA, 0));
484
-	
485
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
486
-					g_param_spec_boxed ("outer-stroke-left-color",
487
-								"Outer stroke left color",
488
-								"Outer stroke left color",
489
-								GDK_TYPE_RGBA, 0));
490
-	
491
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
492
-					g_param_spec_boxed ("outer-stroke-gradient",
493
-								"Outer stroke gradient",
494
-								"Outer stroke gradient",
495
-								CAIRO_GOBJECT_TYPE_PATTERN, 0));
496
-	
497
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
498
-					g_param_spec_boxed ("outer-stroke-width",
499
-								"Outer stroke width",
500
-								"Outer stroke width",
501
-								GTK_TYPE_BORDER, 0));
502
-	
503
-	gtk_theming_engine_register_property (TDEGTK_NAMESPACE, NULL,
504
-					g_param_spec_boxed ("text-shadow-color",
505
-								"Text shadow color",
506
-								"Text shadow color",
507
-								GDK_TYPE_RGBA, 0));
508 351
 }
509 352
 
510 353
 static void

+ 1
- 1
tdegtk/tdegtk-support.c Прегледај датотеку

@@ -76,5 +76,5 @@ tdegtk_trim_scale_allocation (GtkThemingEngine *engine,
76 76
                              gdouble          *width,
77 77
                              gdouble          *height)
78 78
 {
79
-	// Do nothing!
79
+	/* Do nothing! */
80 80
 }

+ 15
- 12
tdegtk/tdegtk-theme.cpp Прегледај датотеку

@@ -142,15 +142,12 @@ G_MODULE_EXPORT GtkThemingEngine* create_engine(void) {
142 142
         icon_sizes.push_back(std::make_pair("gtk-dialog", IconSize(KIcon::Small)));
143 143
         icon_sizes.push_back(std::make_pair("", IconSize(KIcon::Small)));
144 144
 
145
-	// FIXME
146
-	// GTK3 crashes if false is passed to writeGtkThemeControlFile
147
-	// Figure out why!
148
-// 	if (gtk3TQtDebug) {
145
+	if (gtk3TQtDebug) {
149 146
 		writeGtkThemeControlFile(true);
150
-// 	}
151
-// 	else {
152
-// 		writeGtkThemeControlFile(false);
153
-// 	}
147
+	}
148
+	else {
149
+		writeGtkThemeControlFile(false);
150
+	}
154 151
 
155 152
 	// Initialize hooks
156 153
 	m_widgetLookup.initializeHooks();
@@ -272,17 +269,23 @@ void gtk3_tqt_load_resource_string(const char* css_string) {
272 269
 
273 270
 void gtk3_tqt_reload_theme_definition_file(const char* filename) {
274 271
 	GtkCssProvider *provider;
275
-	GError *error;
272
+	GError *error = NULL;
276 273
 
277 274
 	provider = gtk_css_provider_new();
278 275
 	GdkDisplay *display = gdk_display_get_default();
279 276
 	GdkScreen *screen = gdk_display_get_default_screen(display);
280 277
 	gtk_style_context_add_provider_for_screen(screen, GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
281
-	g_object_unref(provider);
282 278
 	if (!gtk_css_provider_load_from_path(provider, filename, &error)) {
283
-		g_printerr("%s: error parsing %s: %s\n", G_STRFUNC, filename, error->message);
284
-		g_clear_error(&error);
279
+		if (error) {
280
+			g_printerr("[ERROR] %s: error parsing %s: %s\n", G_STRFUNC, filename, error->message);
281
+			g_clear_error(&error);
282
+		}
283
+		else {
284
+			g_printerr("[ERROR] %s: unknown failure parsing %s\n\r", G_STRFUNC, filename); fflush(stdout);
285
+		}
285 286
 	}
287
+
288
+	g_object_unref(provider);
286 289
 }
287 290
 
288 291
 TQString tdeFontToGTKFontString(TQFont font) {

+ 15
- 8
tests/Makefile.am Прегледај датотеку

@@ -1,3 +1,5 @@
1
+INCLUDES= $(all_includes) $(KDE_INCLUDES)/tde
2
+
1 3
 EXTRA_DIST = \
2 4
 	test-widgets.glade
3 5
 
@@ -7,26 +9,31 @@ noinst_PROGRAMS = \
7 9
 
8 10
 test_widgets_CFLAGS = \
9 11
 	-I$(top_srcdir) \
10
-	$(TDEGTK_CFLAGS)
12
+	$(TDEGTK_CFLAGS) \
13
+	$(CAIRO_CFLAGS) \
14
+	$(GTK3_CFLAGS)
11 15
 
12 16
 test_widgets_LDADD = \
13 17
 	$(TDEGTK_LIBADD)
14 18
 
15 19
 test_widgets_LDFLAGS = \
16
-	$(TDEGTK_LDFLAGS)
20
+	$(TDEGTK_LDFLAGS) \
21
+	$(CAIRO_LIBS) \
22
+	$(GTK3_LIBS)
17 23
 
18 24
 test_painter_SOURCES = test-painter.cpp
19 25
 
20 26
 test_painter_CXXFLAGS = \
21 27
 	-I$(top_srcdir) \
22 28
 	-I$(top_srcdir)/tdegtk \
23
-	-I/usr/include/tqt -I/usr/include/tqt3 \
24
-	$(TDEGTK_CFLAGS)
29
+	$(TDEGTK_CFLAGS) \
30
+	$(CAIRO_CFLAGS) \
31
+	$(GTK3_CFLAGS)
25 32
 
26 33
 test_painter_LDADD = \
27
-	$(TDEGTK_LIBADD) ../tdegtk/libtqtcairo.la -ltqt -ltqt-mt
34
+	$(TDEGTK_LIBADD) ../tdegtk/libtqtcairo.la $(all_libraries) $(CAIRO_LIBS) $(GTK3_LIBS) $(LIB_QT)
28 35
 
29 36
 test_painter_LDFLAGS = \
30
-	$(TDEGTK_LDFLAGS)
31
-
32
-# FIXME(Cimi): Figure out what tests must be compiled and add them here.
37
+	$(TDEGTK_LDFLAGS) \
38
+	$(CAIRO_LIBS) \
39
+	$(GTK3_LIBS)

Loading…
Откажи
Сачувај