Compare commits
32 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1a2a374380 | ||
![]() |
2b84afc1e3 | ||
![]() |
bb3d23f7f6 | ||
![]() |
7511ea27e2 | ||
![]() |
adbe3a2312 | ||
![]() |
eda50a91df | ||
![]() |
7853bb8042 | ||
![]() |
37de1b2d25 | ||
![]() |
0c4ac0b48a | ||
![]() |
c24cf44c6a | ||
![]() |
11a8ab47fa | ||
![]() |
7feeb72721 | ||
![]() |
01447d94d1 | ||
![]() |
e267a63330 | ||
![]() |
c65a24486d | ||
![]() |
42e786b15b | ||
![]() |
7a04673dd7 | ||
![]() |
c47d2da0cb | ||
![]() |
fd12eddb5d | ||
![]() |
0b56599d28 | ||
![]() |
27de94b915 | ||
![]() |
9e31f2b1de | ||
![]() |
13ad103823 | ||
![]() |
ff5a73de49 | ||
![]() |
275a6ec63f | ||
![]() |
604da0f6ea | ||
![]() |
72a19dd448 | ||
![]() |
3a73f6b8ec | ||
![]() |
343474a570 | ||
![]() |
91d82bf8c7 | ||
![]() |
ed19060074 | ||
![]() |
f230a67b94 |
149
configure.in
149
configure.in
@@ -2,7 +2,7 @@ AC_PREREQ(2.50)
|
|||||||
|
|
||||||
m4_define([mutter_major_version], [2])
|
m4_define([mutter_major_version], [2])
|
||||||
m4_define([mutter_minor_version], [31])
|
m4_define([mutter_minor_version], [31])
|
||||||
m4_define([mutter_micro_version], [2])
|
m4_define([mutter_micro_version], [5])
|
||||||
|
|
||||||
m4_define([mutter_version],
|
m4_define([mutter_version],
|
||||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||||
@@ -63,68 +63,95 @@ AC_C_BIGENDIAN
|
|||||||
|
|
||||||
#### Warnings
|
#### Warnings
|
||||||
|
|
||||||
|
# Stay command-line compatible with the gnome-common configure option. Here
|
||||||
|
# minimum/yes/maximum are the same, however.
|
||||||
|
AC_ARG_ENABLE(compile_warnings,
|
||||||
|
AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],[Turn on compiler warnings]),,
|
||||||
|
enable_compile_warnings=error)
|
||||||
|
|
||||||
changequote(,)dnl
|
changequote(,)dnl
|
||||||
if test "x$GCC" = "xyes"; then
|
if test "$enable_compile_warnings" != no ; then
|
||||||
case " $CFLAGS " in
|
if test "x$GCC" = "xyes"; then
|
||||||
*[\ \ ]-Wall[\ \ ]*) ;;
|
|
||||||
*) CFLAGS="$CFLAGS -Wall" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# case " $CFLAGS " in
|
|
||||||
# *[\ \ ]-Wshadow[\ \ ]*) ;;
|
|
||||||
# *) CFLAGS="$CFLAGS -Wshadow" ;;
|
|
||||||
# esac
|
|
||||||
|
|
||||||
case " $CFLAGS " in
|
|
||||||
*[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
|
|
||||||
*) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case " $CFLAGS " in
|
|
||||||
*[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
|
|
||||||
*) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case " $CFLAGS " in
|
|
||||||
*[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
|
|
||||||
*) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case " $CFLAGS " in
|
|
||||||
*[\ \ ]-Wnested-externs[\ \ ]*) ;;
|
|
||||||
*) CFLAGS="$CFLAGS -Wnested-externs" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case " $CFLAGS " in
|
|
||||||
*[\ \ ]-Wpointer-arith[\ \ ]*) ;;
|
|
||||||
*) CFLAGS="$CFLAGS -Wpointer-arith" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case " $CFLAGS " in
|
|
||||||
*[\ \ ]-Wcast-align[\ \ ]*) ;;
|
|
||||||
*) CFLAGS="$CFLAGS -Wcast-align" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case " $CFLAGS " in
|
|
||||||
*[\ \ ]-Wsign-compare[\ \ ]*) ;;
|
|
||||||
*) CFLAGS="$CFLAGS -Wsign-compare" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test "x$enable_ansi" = "xyes"; then
|
|
||||||
case " $CFLAGS " in
|
case " $CFLAGS " in
|
||||||
*[\ \ ]-ansi[\ \ ]*) ;;
|
*[\ \ ]-Wall[\ \ ]*) ;;
|
||||||
*) CFLAGS="$CFLAGS -ansi" ;;
|
*) CFLAGS="$CFLAGS -Wall" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# case " $CFLAGS " in
|
||||||
|
# *[\ \ ]-Wshadow[\ \ ]*) ;;
|
||||||
|
# *) CFLAGS="$CFLAGS -Wshadow" ;;
|
||||||
|
# esac
|
||||||
|
|
||||||
|
case " $CFLAGS " in
|
||||||
|
*[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
|
||||||
|
*) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case " $CFLAGS " in
|
case " $CFLAGS " in
|
||||||
*[\ \ ]-pedantic[\ \ ]*) ;;
|
*[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
|
||||||
*) CFLAGS="$CFLAGS -pedantic" ;;
|
*) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case " $CFLAGS " in
|
||||||
|
*[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
|
||||||
|
*) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case " $CFLAGS " in
|
||||||
|
*[\ \ ]-Wnested-externs[\ \ ]*) ;;
|
||||||
|
*) CFLAGS="$CFLAGS -Wnested-externs" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case " $CFLAGS " in
|
||||||
|
*[\ \ ]-Wpointer-arith[\ \ ]*) ;;
|
||||||
|
*) CFLAGS="$CFLAGS -Wpointer-arith" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case " $CFLAGS " in
|
||||||
|
*[\ \ ]-Wcast-align[\ \ ]*) ;;
|
||||||
|
*) CFLAGS="$CFLAGS -Wcast-align" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case " $CFLAGS " in
|
||||||
|
*[\ \ ]-Wsign-compare[\ \ ]*) ;;
|
||||||
|
*) CFLAGS="$CFLAGS -Wsign-compare" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test "$enable_compile_warnings" = error; then
|
||||||
|
case " $CFLAGS " in
|
||||||
|
*[\ \ ]-Werror[\ \ ]*) ;;
|
||||||
|
*) CFLAGS="$CFLAGS -Werror" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
changequote([,])dnl
|
changequote([,])dnl
|
||||||
|
|
||||||
MUTTER_PC_MODULES='gtk+-2.0 >= 2.18 pango >= 1.2.0'
|
AC_MSG_CHECKING([which gtk+ version to compile against])
|
||||||
|
AC_ARG_WITH([gtk],
|
||||||
|
AC_HELP_STRING([--with-gtk=2.0|3.0],
|
||||||
|
[which gtk+ version to compile against (default: 2)]),
|
||||||
|
[case "$with_gtk" in
|
||||||
|
2.0|3.0) ;;
|
||||||
|
*) AC_MSG_ERROR([invalid gtk+ version specified]);;
|
||||||
|
esac],
|
||||||
|
[with_gtk=2.0])
|
||||||
|
AC_MSG_RESULT([$with_gtk])
|
||||||
|
|
||||||
|
case "$with_gtk" in
|
||||||
|
2.0) GTK_API_VERSION=2.0
|
||||||
|
GTK_MIN_VERSION=2.18
|
||||||
|
CANBERRA_GTK=libcanberra-gtk
|
||||||
|
;;
|
||||||
|
3.0) GTK_API_VERSION=3.0
|
||||||
|
GTK_MIN_VERSION=2.90
|
||||||
|
CANBERRA_GTK=libcanberra-gtk3
|
||||||
|
AC_DEFINE(USE_CAIRO_REGION, 1, [Use cairo_region_t instead of GdkRegion])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
MUTTER_PC_MODULES="gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION pango >= 1.2.0"
|
||||||
|
AC_SUBST(GTK_API_VERSION)
|
||||||
|
|
||||||
AC_ARG_ENABLE(gconf,
|
AC_ARG_ENABLE(gconf,
|
||||||
AC_HELP_STRING([--disable-gconf],
|
AC_HELP_STRING([--disable-gconf],
|
||||||
@@ -184,8 +211,8 @@ AM_GLIB_GNU_GETTEXT
|
|||||||
# GRegex requires Glib-2.14.0
|
# GRegex requires Glib-2.14.0
|
||||||
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0)
|
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0)
|
||||||
# gtk_window_set_icon_name requires gtk2+-2.6.0
|
# gtk_window_set_icon_name requires gtk2+-2.6.0
|
||||||
PKG_CHECK_MODULES(MUTTER_MESSAGE, gtk+-2.0 >= 2.18)
|
PKG_CHECK_MODULES(MUTTER_MESSAGE, gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION)
|
||||||
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-2.0 >= 2.18)
|
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION)
|
||||||
|
|
||||||
# Unconditionally use this dir to avoid a circular dep with gnomecc
|
# Unconditionally use this dir to avoid a circular dep with gnomecc
|
||||||
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
|
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
|
||||||
@@ -222,10 +249,10 @@ AC_MSG_CHECKING([libcanberra-gtk])
|
|||||||
if test x$with_libcanberra = xno ; then
|
if test x$with_libcanberra = xno ; then
|
||||||
AC_MSG_RESULT([disabled])
|
AC_MSG_RESULT([disabled])
|
||||||
else
|
else
|
||||||
if $PKG_CONFIG --exists libcanberra-gtk; then
|
if $PKG_CONFIG --exists $CANBERRA_GTK; then
|
||||||
have_libcanberra=yes
|
have_libcanberra=yes
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES libcanberra-gtk"
|
MUTTER_PC_MODULES="$MUTTER_PC_MODULES $CANBERRA_GTK"
|
||||||
AC_DEFINE([HAVE_LIBCANBERRA], 1, [Building with libcanberra for playing sounds])
|
AC_DEFINE([HAVE_LIBCANBERRA], 1, [Building with libcanberra for playing sounds])
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
@@ -505,10 +532,8 @@ if test "x$enable_debug" = "xyes"; then
|
|||||||
CFLAGS="$CFLAGS -g -O"
|
CFLAGS="$CFLAGS -g -O"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Warnings are there for a reason
|
# For fix-meta-rectangle.py
|
||||||
if test "x$GCC" = "xyes"; then
|
AM_PATH_PYTHON([2.5])
|
||||||
CFLAGS="$CFLAGS -Wall -Werror -ansi"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use gnome-doc-utils:
|
# Use gnome-doc-utils:
|
||||||
GNOME_DOC_INIT([0.8.0])
|
GNOME_DOC_INIT([0.8.0])
|
||||||
@@ -545,7 +570,7 @@ fi
|
|||||||
|
|
||||||
dnl ==========================================================================
|
dnl ==========================================================================
|
||||||
echo "
|
echo "
|
||||||
mutter-$VERSION:
|
mutter-$VERSION (using gtk+-${GTK_API_VERSION}):
|
||||||
|
|
||||||
prefix: ${prefix}
|
prefix: ${prefix}
|
||||||
source code location: ${srcdir}
|
source code location: ${srcdir}
|
||||||
|
387
po/sl.po
387
po/sl.po
@@ -10,8 +10,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: mutter\n"
|
"Project-Id-Version: mutter\n"
|
||||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter&component=general\n"
|
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter&component=general\n"
|
||||||
"POT-Creation-Date: 2010-04-15 02:19+0000\n"
|
"POT-Creation-Date: 2010-07-03 10:36+0000\n"
|
||||||
"PO-Revision-Date: 2010-04-17 19:38+0100\n"
|
"PO-Revision-Date: 2010-07-06 08:06+0100\n"
|
||||||
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
|
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
|
||||||
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
|
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@@ -32,34 +32,29 @@ msgid "Unknown window information request: %d"
|
|||||||
msgstr "Zahteva izpisa podrobnosti neznanega okna: %d"
|
msgstr "Zahteva izpisa podrobnosti neznanega okna: %d"
|
||||||
|
|
||||||
#. Translators: %s is a window title
|
#. Translators: %s is a window title
|
||||||
#: ../src/core/delete.c:95
|
#: ../src/core/delete.c:94
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "<tt>%s</tt> is not responding."
|
msgid "<tt>%s</tt> is not responding."
|
||||||
msgstr "<tt>%s</tt> se ne odziva."
|
msgstr "<tt>%s</tt> se ne odziva."
|
||||||
|
|
||||||
#: ../src/core/delete.c:100
|
#: ../src/core/delete.c:99
|
||||||
msgid "You may choose to wait a short while for it to continue or force the application to quit entirely."
|
msgid "You may choose to wait a short while for it to continue or force the application to quit entirely."
|
||||||
msgstr "Lahko še malo počakate, če se program morda zbudi, ali pa vsilite končanje delovanja."
|
msgstr "Lahko še malo počakate, če se program morda zbudi, ali pa vsilite končanje delovanja."
|
||||||
|
|
||||||
#: ../src/core/delete.c:109
|
#: ../src/core/delete.c:108
|
||||||
msgid "_Wait"
|
msgid "_Wait"
|
||||||
msgstr "_Počakaj"
|
msgstr "_Počakaj"
|
||||||
|
|
||||||
#: ../src/core/delete.c:109
|
#: ../src/core/delete.c:108
|
||||||
msgid "_Force Quit"
|
msgid "_Force Quit"
|
||||||
msgstr "_Vsili konec"
|
msgstr "_Vsili konec"
|
||||||
|
|
||||||
#: ../src/core/delete.c:207
|
#: ../src/core/display.c:365
|
||||||
#, c-format
|
|
||||||
msgid "Failed to get hostname: %s\n"
|
|
||||||
msgstr "Ni mogoče dobiti gostitelja z imenom: %s\n"
|
|
||||||
|
|
||||||
#: ../src/core/display.c:362
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing %s extension required for compositing"
|
msgid "Missing %s extension required for compositing"
|
||||||
msgstr "Manjka razširitev %s, ki je ključna za sestavljanje"
|
msgstr "Manjka razširitev %s, ki je ključna za sestavljanje"
|
||||||
|
|
||||||
#: ../src/core/display.c:447
|
#: ../src/core/display.c:451
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Failed to open X Window System display '%s'\n"
|
msgid "Failed to open X Window System display '%s'\n"
|
||||||
msgstr "Ni mogoče odpreti zaslona '%s' okenskega sistema X\n"
|
msgstr "Ni mogoče odpreti zaslona '%s' okenskega sistema X\n"
|
||||||
@@ -374,54 +369,54 @@ msgstr "Neznan element %s"
|
|||||||
msgid "These windows do not support "save current setup" and will have to be restarted manually next time you log in."
|
msgid "These windows do not support "save current setup" and will have to be restarted manually next time you log in."
|
||||||
msgstr "Ta okna ne podpirajo možnosti "shranjevanja trenutnih nastavitev", zato jih bo treba ob naslednji prijavi zagnati ročno."
|
msgstr "Ta okna ne podpirajo možnosti "shranjevanja trenutnih nastavitev", zato jih bo treba ob naslednji prijavi zagnati ročno."
|
||||||
|
|
||||||
#: ../src/core/util.c:104
|
#: ../src/core/util.c:110
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Failed to open debug log: %s\n"
|
msgid "Failed to open debug log: %s\n"
|
||||||
msgstr "Odpiranje razhroščevalnega dnevnika ni uspelo: %s\n"
|
msgstr "Odpiranje razhroščevalnega dnevnika ni uspelo: %s\n"
|
||||||
|
|
||||||
#: ../src/core/util.c:114
|
#: ../src/core/util.c:120
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Failed to fdopen() log file %s: %s\n"
|
msgid "Failed to fdopen() log file %s: %s\n"
|
||||||
msgstr "Odpiranje dnevniške datoteke %s s fdopen() ni uspelo: %s\n"
|
msgstr "Odpiranje dnevniške datoteke %s s fdopen() ni uspelo: %s\n"
|
||||||
|
|
||||||
#: ../src/core/util.c:120
|
#: ../src/core/util.c:126
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Opened log file %s\n"
|
msgid "Opened log file %s\n"
|
||||||
msgstr "Odpri dnevniško datoteko %s\n"
|
msgstr "Odpri dnevniško datoteko %s\n"
|
||||||
|
|
||||||
#: ../src/core/util.c:139
|
#: ../src/core/util.c:145
|
||||||
#: ../src/tools/mutter-message.c:176
|
#: ../src/tools/mutter-message.c:176
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Mutter was compiled without support for verbose mode\n"
|
msgid "Mutter was compiled without support for verbose mode\n"
|
||||||
msgstr "Program Mutter je kodno preveden brez podpore za podrobni način izpisovanja\n"
|
msgstr "Program Mutter je kodno preveden brez podpore za podrobni način izpisovanja\n"
|
||||||
|
|
||||||
#: ../src/core/util.c:239
|
#: ../src/core/util.c:285
|
||||||
msgid "Window manager: "
|
msgid "Window manager: "
|
||||||
msgstr "Upravljavec oken: "
|
msgstr "Upravljavec oken: "
|
||||||
|
|
||||||
# G:4 K:0 O:0
|
# G:4 K:0 O:0
|
||||||
#: ../src/core/util.c:391
|
#: ../src/core/util.c:433
|
||||||
msgid "Bug in window manager: "
|
msgid "Bug in window manager: "
|
||||||
msgstr "Hrošč v upravljavcu oken: "
|
msgstr "Hrošč v upravljavcu oken: "
|
||||||
|
|
||||||
#: ../src/core/util.c:424
|
#: ../src/core/util.c:466
|
||||||
msgid "Window manager warning: "
|
msgid "Window manager warning: "
|
||||||
msgstr "Opozorilo upravljalnika oken: "
|
msgstr "Opozorilo upravljalnika oken: "
|
||||||
|
|
||||||
#: ../src/core/util.c:452
|
#: ../src/core/util.c:494
|
||||||
msgid "Window manager error: "
|
msgid "Window manager error: "
|
||||||
msgstr "Napaka upravljalnika oken: "
|
msgstr "Napaka upravljalnika oken: "
|
||||||
|
|
||||||
#. Translators: This is the title used on dialog boxes
|
#. Translators: This is the title used on dialog boxes
|
||||||
#. eof all-keybindings.h
|
#. eof all-keybindings.h
|
||||||
#: ../src/core/util.c:573
|
#: ../src/core/util.c:615
|
||||||
#: ../src/mutter.desktop.in.h:1
|
#: ../src/mutter.desktop.in.h:1
|
||||||
#: ../src/mutter-wm.desktop.in.h:1
|
#: ../src/mutter-wm.desktop.in.h:1
|
||||||
msgid "Mutter"
|
msgid "Mutter"
|
||||||
msgstr "Mutter"
|
msgstr "Mutter"
|
||||||
|
|
||||||
#. first time through
|
#. first time through
|
||||||
#: ../src/core/window.c:6217
|
#: ../src/core/window.c:6228
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.\n"
|
msgid "Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.\n"
|
||||||
msgstr "Okno %s nastavi svoj SM_CLIENT_ID, namesto, da bi nastavilo WM_CLIENT_LEADER kot je zavedeno v ICCCM.\n"
|
msgstr "Okno %s nastavi svoj SM_CLIENT_ID, namesto, da bi nastavilo WM_CLIENT_LEADER kot je zavedeno v ICCCM.\n"
|
||||||
@@ -433,7 +428,7 @@ msgstr "Okno %s nastavi svoj SM_CLIENT_ID, namesto, da bi nastavilo WM_CLIENT_LE
|
|||||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||||
#. * about these apps but make them work.
|
#. * about these apps but make them work.
|
||||||
#.
|
#.
|
||||||
#: ../src/core/window.c:6880
|
#: ../src/core/window.c:6891
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Window %s sets an MWM hint indicating it isn't resizable, but sets min size %d x %d and max size %d x %d; this doesn't make much sense.\n"
|
msgid "Window %s sets an MWM hint indicating it isn't resizable, but sets min size %d x %d and max size %d x %d; this doesn't make much sense.\n"
|
||||||
msgstr "Okno %s določi namig MWM, ki pove, da ni mogoče spremeniti velikosti, hkrati pa določi najmanjšo velikost na %d x %d in največjo na %d x %d; vrednost ni smiselna.\n"
|
msgstr "Okno %s določi namig MWM, ki pove, da ni mogoče spremeniti velikosti, hkrati pa določi najmanjšo velikost na %d x %d in največjo na %d x %d; vrednost ni smiselna.\n"
|
||||||
@@ -448,7 +443,7 @@ msgstr "Program je nastavil pokvarjen _NET_WM_PID %lu\n"
|
|||||||
msgid "%s (on %s)"
|
msgid "%s (on %s)"
|
||||||
msgstr "%s (na %s)"
|
msgstr "%s (na %s)"
|
||||||
|
|
||||||
#: ../src/core/window-props.c:1435
|
#: ../src/core/window-props.c:1478
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||||
msgstr "Neveljaven WM_TRANSIENT_FOR za okno 0x%lx naveden za %s.\n"
|
msgstr "Neveljaven WM_TRANSIENT_FOR za okno 0x%lx naveden za %s.\n"
|
||||||
@@ -820,51 +815,51 @@ msgstr "Ta vrednost začne \"prevleko\", ki združuje predogled okna in zaganjal
|
|||||||
msgid "Usage: %s\n"
|
msgid "Usage: %s\n"
|
||||||
msgstr "Uporaba: %s\n"
|
msgstr "Uporaba: %s\n"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1119
|
#: ../src/ui/frames.c:1112
|
||||||
msgid "Close Window"
|
msgid "Close Window"
|
||||||
msgstr "Zapri okno"
|
msgstr "Zapri okno"
|
||||||
|
|
||||||
# G:1 K:1 O:0
|
# G:1 K:1 O:0
|
||||||
#: ../src/ui/frames.c:1122
|
#: ../src/ui/frames.c:1115
|
||||||
msgid "Window Menu"
|
msgid "Window Menu"
|
||||||
msgstr "Meni okna"
|
msgstr "Meni okna"
|
||||||
|
|
||||||
# G:0 K:1 O:0
|
# G:0 K:1 O:0
|
||||||
#: ../src/ui/frames.c:1125
|
#: ../src/ui/frames.c:1118
|
||||||
msgid "Minimize Window"
|
msgid "Minimize Window"
|
||||||
msgstr "Skrči okno"
|
msgstr "Skrči okno"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1128
|
#: ../src/ui/frames.c:1121
|
||||||
msgid "Maximize Window"
|
msgid "Maximize Window"
|
||||||
msgstr "Razpri okno"
|
msgstr "Razpri okno"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1131
|
#: ../src/ui/frames.c:1124
|
||||||
msgid "Restore Window"
|
msgid "Restore Window"
|
||||||
msgstr "Obnovi okno"
|
msgstr "Obnovi okno"
|
||||||
|
|
||||||
# G:2 K:0 O:0
|
# G:2 K:0 O:0
|
||||||
#: ../src/ui/frames.c:1134
|
#: ../src/ui/frames.c:1127
|
||||||
msgid "Roll Up Window"
|
msgid "Roll Up Window"
|
||||||
msgstr "Zavij okno"
|
msgstr "Zavij okno"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1137
|
#: ../src/ui/frames.c:1130
|
||||||
msgid "Unroll Window"
|
msgid "Unroll Window"
|
||||||
msgstr "Odvij okno"
|
msgstr "Odvij okno"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1140
|
#: ../src/ui/frames.c:1133
|
||||||
msgid "Keep Window On Top"
|
msgid "Keep Window On Top"
|
||||||
msgstr "Ohrani okno na vrhu"
|
msgstr "Ohrani okno na vrhu"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1143
|
#: ../src/ui/frames.c:1136
|
||||||
msgid "Remove Window From Top"
|
msgid "Remove Window From Top"
|
||||||
msgstr "Odstrani okno z vrha"
|
msgstr "Odstrani okno z vrha"
|
||||||
|
|
||||||
# G:1 K:0 O:0
|
# G:1 K:0 O:0
|
||||||
#: ../src/ui/frames.c:1146
|
#: ../src/ui/frames.c:1139
|
||||||
msgid "Always On Visible Workspace"
|
msgid "Always On Visible Workspace"
|
||||||
msgstr "Vedno na vidni delovni površini"
|
msgstr "Vedno na vidni delovni površini"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1149
|
#: ../src/ui/frames.c:1142
|
||||||
msgid "Put Window On Only One Workspace"
|
msgid "Put Window On Only One Workspace"
|
||||||
msgstr "Postavi okno na samo eno delovno površino"
|
msgstr "Postavi okno na samo eno delovno površino"
|
||||||
|
|
||||||
@@ -978,7 +973,7 @@ msgstr "Delovna površina 1_0"
|
|||||||
msgid "Workspace %s%d"
|
msgid "Workspace %s%d"
|
||||||
msgstr "Delovna površina %s%d"
|
msgstr "Delovna površina %s%d"
|
||||||
|
|
||||||
#: ../src/ui/menu.c:395
|
#: ../src/ui/menu.c:396
|
||||||
msgid "Move to Another _Workspace"
|
msgid "Move to Another _Workspace"
|
||||||
msgstr "Premakni na dru_go delovno površino"
|
msgstr "Premakni na dru_go delovno površino"
|
||||||
|
|
||||||
@@ -987,7 +982,7 @@ msgstr "Premakni na dru_go delovno površino"
|
|||||||
#. * translated on keyboards used for your language, don't translate
|
#. * translated on keyboards used for your language, don't translate
|
||||||
#. * this.
|
#. * this.
|
||||||
#.
|
#.
|
||||||
#: ../src/ui/metaaccellabel.c:104
|
#: ../src/ui/metaaccellabel.c:75
|
||||||
msgid "Shift"
|
msgid "Shift"
|
||||||
msgstr "Shift"
|
msgstr "Shift"
|
||||||
|
|
||||||
@@ -997,7 +992,7 @@ msgstr "Shift"
|
|||||||
#. * translated on keyboards used for your language, don't translate
|
#. * translated on keyboards used for your language, don't translate
|
||||||
#. * this.
|
#. * this.
|
||||||
#.
|
#.
|
||||||
#: ../src/ui/metaaccellabel.c:110
|
#: ../src/ui/metaaccellabel.c:81
|
||||||
msgid "Ctrl"
|
msgid "Ctrl"
|
||||||
msgstr "Ctrl"
|
msgstr "Ctrl"
|
||||||
|
|
||||||
@@ -1007,7 +1002,7 @@ msgstr "Ctrl"
|
|||||||
#. * translated on keyboards used for your language, don't translate
|
#. * translated on keyboards used for your language, don't translate
|
||||||
#. * this.
|
#. * this.
|
||||||
#.
|
#.
|
||||||
#: ../src/ui/metaaccellabel.c:116
|
#: ../src/ui/metaaccellabel.c:87
|
||||||
msgid "Alt"
|
msgid "Alt"
|
||||||
msgstr "Alt"
|
msgstr "Alt"
|
||||||
|
|
||||||
@@ -1017,7 +1012,7 @@ msgstr "Alt"
|
|||||||
#. * translated on keyboards used for your language, don't translate
|
#. * translated on keyboards used for your language, don't translate
|
||||||
#. * this.
|
#. * this.
|
||||||
#.
|
#.
|
||||||
#: ../src/ui/metaaccellabel.c:122
|
#: ../src/ui/metaaccellabel.c:93
|
||||||
msgid "Meta"
|
msgid "Meta"
|
||||||
msgstr "Meta"
|
msgstr "Meta"
|
||||||
|
|
||||||
@@ -1027,7 +1022,7 @@ msgstr "Meta"
|
|||||||
#. * translated on keyboards used for your language, don't translate
|
#. * translated on keyboards used for your language, don't translate
|
||||||
#. * this.
|
#. * this.
|
||||||
#.
|
#.
|
||||||
#: ../src/ui/metaaccellabel.c:128
|
#: ../src/ui/metaaccellabel.c:99
|
||||||
msgid "Super"
|
msgid "Super"
|
||||||
msgstr "Super"
|
msgstr "Super"
|
||||||
|
|
||||||
@@ -1036,7 +1031,7 @@ msgstr "Super"
|
|||||||
#. * translated on keyboards used for your language, don't translate
|
#. * translated on keyboards used for your language, don't translate
|
||||||
#. * this.
|
#. * this.
|
||||||
#.
|
#.
|
||||||
#: ../src/ui/metaaccellabel.c:134
|
#: ../src/ui/metaaccellabel.c:105
|
||||||
msgid "Hyper"
|
msgid "Hyper"
|
||||||
msgstr "Hiper"
|
msgstr "Hiper"
|
||||||
|
|
||||||
@@ -1046,7 +1041,7 @@ msgstr "Hiper"
|
|||||||
#. * translated on keyboards used for your language, don't translate
|
#. * translated on keyboards used for your language, don't translate
|
||||||
#. * this.
|
#. * this.
|
||||||
#.
|
#.
|
||||||
#: ../src/ui/metaaccellabel.c:140
|
#: ../src/ui/metaaccellabel.c:111
|
||||||
msgid "Mod2"
|
msgid "Mod2"
|
||||||
msgstr "Mod2"
|
msgstr "Mod2"
|
||||||
|
|
||||||
@@ -1055,7 +1050,7 @@ msgstr "Mod2"
|
|||||||
#. * translated on keyboards used for your language, don't translate
|
#. * translated on keyboards used for your language, don't translate
|
||||||
#. * this.
|
#. * this.
|
||||||
#.
|
#.
|
||||||
#: ../src/ui/metaaccellabel.c:146
|
#: ../src/ui/metaaccellabel.c:117
|
||||||
msgid "Mod3"
|
msgid "Mod3"
|
||||||
msgstr "Mod3"
|
msgstr "Mod3"
|
||||||
|
|
||||||
@@ -1065,7 +1060,7 @@ msgstr "Mod3"
|
|||||||
#. * translated on keyboards used for your language, don't translate
|
#. * translated on keyboards used for your language, don't translate
|
||||||
#. * this.
|
#. * this.
|
||||||
#.
|
#.
|
||||||
#: ../src/ui/metaaccellabel.c:152
|
#: ../src/ui/metaaccellabel.c:123
|
||||||
msgid "Mod4"
|
msgid "Mod4"
|
||||||
msgstr "Mod4"
|
msgstr "Mod4"
|
||||||
|
|
||||||
@@ -1074,248 +1069,248 @@ msgstr "Mod4"
|
|||||||
#. * translated on keyboards used for your language, don't translate
|
#. * translated on keyboards used for your language, don't translate
|
||||||
#. * this.
|
#. * this.
|
||||||
#.
|
#.
|
||||||
#: ../src/ui/metaaccellabel.c:158
|
#: ../src/ui/metaaccellabel.c:129
|
||||||
msgid "Mod5"
|
msgid "Mod5"
|
||||||
msgstr "Mod5"
|
msgstr "Mod5"
|
||||||
|
|
||||||
#. Translators: This represents the size of a window. The first number is
|
#. Translators: This represents the size of a window. The first number is
|
||||||
#. * the width of the window and the second is the height.
|
#. * the width of the window and the second is the height.
|
||||||
#.
|
#.
|
||||||
#: ../src/ui/resizepopup.c:113
|
#: ../src/ui/resizepopup.c:114
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%d x %d"
|
msgid "%d x %d"
|
||||||
msgstr "%d x %d"
|
msgstr "%d x %d"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:254
|
#: ../src/ui/theme.c:256
|
||||||
msgid "top"
|
msgid "top"
|
||||||
msgstr "zgoraj"
|
msgstr "zgoraj"
|
||||||
|
|
||||||
# G:12 K:5 O:0
|
# G:12 K:5 O:0
|
||||||
#: ../src/ui/theme.c:256
|
#: ../src/ui/theme.c:258
|
||||||
msgid "bottom"
|
msgid "bottom"
|
||||||
msgstr "spodaj"
|
msgstr "spodaj"
|
||||||
|
|
||||||
# G:10 K:4 O:0
|
# G:10 K:4 O:0
|
||||||
#: ../src/ui/theme.c:258
|
#: ../src/ui/theme.c:260
|
||||||
msgid "left"
|
msgid "left"
|
||||||
msgstr "levo"
|
msgstr "levo"
|
||||||
|
|
||||||
# G:1 K:0 O:0
|
# G:1 K:0 O:0
|
||||||
#: ../src/ui/theme.c:260
|
#: ../src/ui/theme.c:262
|
||||||
msgid "right"
|
msgid "right"
|
||||||
msgstr "desno"
|
msgstr "desno"
|
||||||
|
|
||||||
# G:1 K:0 O:0
|
# G:1 K:0 O:0
|
||||||
#: ../src/ui/theme.c:287
|
#: ../src/ui/theme.c:289
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "frame geometry does not specify \"%s\" dimension"
|
msgid "frame geometry does not specify \"%s\" dimension"
|
||||||
msgstr "geometrija okvirja ne navaja dimenzije \"%s\""
|
msgstr "geometrija okvirja ne navaja dimenzije \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:306
|
#: ../src/ui/theme.c:308
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
||||||
msgstr "geometrija okvirja ne navaja dimenzije \"%s\" za rob \"%s\""
|
msgstr "geometrija okvirja ne navaja dimenzije \"%s\" za rob \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:343
|
#: ../src/ui/theme.c:345
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Button aspect ratio %g is not reasonable"
|
msgid "Button aspect ratio %g is not reasonable"
|
||||||
msgstr "Razmerje gumba %g ni smiselno"
|
msgstr "Razmerje gumba %g ni smiselno"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:355
|
#: ../src/ui/theme.c:357
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Frame geometry does not specify size of buttons"
|
msgid "Frame geometry does not specify size of buttons"
|
||||||
msgstr "Geometrija okvirja ne navaja velikosti gumbov"
|
msgstr "Geometrija okvirja ne navaja velikosti gumbov"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1020
|
#: ../src/ui/theme.c:1022
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Gradients should have at least two colors"
|
msgid "Gradients should have at least two colors"
|
||||||
msgstr "Prelivi bi morali imeti vsaj dve barvi"
|
msgstr "Prelivi bi morali imeti vsaj dve barvi"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1146
|
#: ../src/ui/theme.c:1148
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
|
msgid "GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
|
||||||
msgstr "Navedba barve GTK mora vsebovati stanje v oglatih oklepajih, npr. gtk:fg[NORMAL], kjer je NORMAL stanje; ni mogoče razčleniti \"%s\""
|
msgstr "Navedba barve GTK mora vsebovati stanje v oglatih oklepajih, npr. gtk:fg[NORMAL], kjer je NORMAL stanje; ni mogoče razčleniti \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1160
|
#: ../src/ui/theme.c:1162
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "GTK color specification must have a close bracket after the state, e.g. gtk:fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
|
msgid "GTK color specification must have a close bracket after the state, e.g. gtk:fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
|
||||||
msgstr "Navedbi barve GTK manjka oglati zaklepaj za stanjem, npr. gtk:fg[NORMAL], kjer je NORMAL stanje; ni mogoče razčleniti \"%s\""
|
msgstr "Navedbi barve GTK manjka oglati zaklepaj za stanjem, npr. gtk:fg[NORMAL], kjer je NORMAL stanje; ni mogoče razčleniti \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1171
|
#: ../src/ui/theme.c:1173
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Did not understand state \"%s\" in color specification"
|
msgid "Did not understand state \"%s\" in color specification"
|
||||||
msgstr "Ni mogoče razumeti stanja \"%s\" v navedbi barve "
|
msgstr "Ni mogoče razumeti stanja \"%s\" v navedbi barve "
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1184
|
#: ../src/ui/theme.c:1186
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Did not understand color component \"%s\" in color specification"
|
msgid "Did not understand color component \"%s\" in color specification"
|
||||||
msgstr "Ni mogoče razumeti barvne komponente \"%s\" v navedbi barve"
|
msgstr "Ni mogoče razumeti barvne komponente \"%s\" v navedbi barve"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1214
|
#: ../src/ui/theme.c:1216
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the format"
|
msgid "Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the format"
|
||||||
msgstr "Oblika zapisa preliva je \"blend/bg_color/fg_color/alpha\", \"%s\" ne ustreza pravilni obliki"
|
msgstr "Oblika zapisa preliva je \"blend/bg_color/fg_color/alpha\", \"%s\" ne ustreza pravilni obliki"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1225
|
#: ../src/ui/theme.c:1227
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not parse alpha value \"%s\" in blended color"
|
msgid "Could not parse alpha value \"%s\" in blended color"
|
||||||
msgstr "V prelivni barvi ni mogoče razčleniti vrednosti alfa \"%s\""
|
msgstr "V prelivni barvi ni mogoče razčleniti vrednosti alfa \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1235
|
#: ../src/ui/theme.c:1237
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
||||||
msgstr "V prelivni barvi alfa vrednost \"%s\" ni med 0.0 in 1.0"
|
msgstr "V prelivni barvi alfa vrednost \"%s\" ni med 0.0 in 1.0"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1282
|
#: ../src/ui/theme.c:1284
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
msgid "Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
||||||
msgstr "Oblika zapisa barve senčenja je \"shade/base_color/factor\", \"%s\" ne ustreza pravilni obliki."
|
msgstr "Oblika zapisa barve senčenja je \"shade/base_color/factor\", \"%s\" ne ustreza pravilni obliki."
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1293
|
#: ../src/ui/theme.c:1295
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not parse shade factor \"%s\" in shaded color"
|
msgid "Could not parse shade factor \"%s\" in shaded color"
|
||||||
msgstr "Ni mogoče razčleniti faktorja senčenja \"%s\" v senčeni barvi"
|
msgstr "Ni mogoče razčleniti faktorja senčenja \"%s\" v senčeni barvi"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1303
|
#: ../src/ui/theme.c:1305
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Shade factor \"%s\" in shaded color is negative"
|
msgid "Shade factor \"%s\" in shaded color is negative"
|
||||||
msgstr "V senčeni barvi je faktor senčenja \"%s\" negativen"
|
msgstr "V senčeni barvi je faktor senčenja \"%s\" negativen"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1332
|
#: ../src/ui/theme.c:1334
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not parse color \"%s\""
|
msgid "Could not parse color \"%s\""
|
||||||
msgstr "Ni mogoče razčleniti barve \"%s\""
|
msgstr "Ni mogoče razčleniti barve \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1582
|
#: ../src/ui/theme.c:1588
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression contains character '%s' which is not allowed"
|
msgid "Coordinate expression contains character '%s' which is not allowed"
|
||||||
msgstr "Izraz koordinat vsebuje znak '%s', ki ni dovoljen"
|
msgstr "Izraz koordinat vsebuje znak '%s', ki ni dovoljen"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1609
|
#: ../src/ui/theme.c:1615
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression contains floating point number '%s' which could not be parsed"
|
msgid "Coordinate expression contains floating point number '%s' which could not be parsed"
|
||||||
msgstr "Izraz koordinat vsebuje številko s plavajočo vejico '%s', ki ne more biti razčlenjena"
|
msgstr "Izraz koordinat vsebuje številko s plavajočo vejico '%s', ki ne more biti razčlenjena"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1623
|
#: ../src/ui/theme.c:1629
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
||||||
msgstr "Izraz koordinat vsebuje celo število '%s', ki ga ni mogoče razčleniti"
|
msgstr "Izraz koordinat vsebuje celo število '%s', ki ga ni mogoče razčleniti"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1745
|
#: ../src/ui/theme.c:1751
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression contained unknown operator at the start of this text: \"%s\""
|
msgid "Coordinate expression contained unknown operator at the start of this text: \"%s\""
|
||||||
msgstr "Izraz koordinat vsebuje neznan operator na pričetku besedila: \"%s\""
|
msgstr "Izraz koordinat vsebuje neznan operator na pričetku besedila: \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1802
|
#: ../src/ui/theme.c:1808
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression was empty or not understood"
|
msgid "Coordinate expression was empty or not understood"
|
||||||
msgstr "Izraz koordinat je prazen ali ni razumljen"
|
msgstr "Izraz koordinat je prazen ali ni razumljen"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1913
|
#: ../src/ui/theme.c:1919
|
||||||
#: ../src/ui/theme.c:1923
|
#: ../src/ui/theme.c:1929
|
||||||
#: ../src/ui/theme.c:1957
|
#: ../src/ui/theme.c:1963
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression results in division by zero"
|
msgid "Coordinate expression results in division by zero"
|
||||||
msgstr "Izraz koordinat se povzroči deljenje z ničlo"
|
msgstr "Izraz koordinat se povzroči deljenje z ničlo"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1965
|
#: ../src/ui/theme.c:1971
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression tries to use mod operator on a floating-point number"
|
msgid "Coordinate expression tries to use mod operator on a floating-point number"
|
||||||
msgstr "Izraz koordinat poskuša uporabiti operator mod ali številko s plavajočo vejico"
|
msgstr "Izraz koordinat poskuša uporabiti operator mod ali številko s plavajočo vejico"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2021
|
#: ../src/ui/theme.c:2027
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression has an operator \"%s\" where an operand was expected"
|
msgid "Coordinate expression has an operator \"%s\" where an operand was expected"
|
||||||
msgstr "Izraz koordinat vsebuje operator \"%s\", kjer je pričakovan operand"
|
msgstr "Izraz koordinat vsebuje operator \"%s\", kjer je pričakovan operand"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2030
|
#: ../src/ui/theme.c:2036
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression had an operand where an operator was expected"
|
msgid "Coordinate expression had an operand where an operator was expected"
|
||||||
msgstr "Izraz koordinat vsebuje operand kjer je pričakovan operator"
|
msgstr "Izraz koordinat vsebuje operand kjer je pričakovan operator"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2038
|
#: ../src/ui/theme.c:2044
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression ended with an operator instead of an operand"
|
msgid "Coordinate expression ended with an operator instead of an operand"
|
||||||
msgstr "Izraz koordinat se konča z operatorjem namesto z operandom"
|
msgstr "Izraz koordinat se konča z operatorjem namesto z operandom"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2048
|
#: ../src/ui/theme.c:2054
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression has operator \"%c\" following operator \"%c\" with no operand in between"
|
msgid "Coordinate expression has operator \"%c\" following operator \"%c\" with no operand in between"
|
||||||
msgstr "Izraz koordinat vsebuje operator \"%c\", ki sledi operatorju \"%c\", brez vmesnega operanda"
|
msgstr "Izraz koordinat vsebuje operator \"%c\", ki sledi operatorju \"%c\", brez vmesnega operanda"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2199
|
#: ../src/ui/theme.c:2205
|
||||||
#: ../src/ui/theme.c:2244
|
#: ../src/ui/theme.c:2250
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
||||||
msgstr "Izraz koordinat vsebuje neznano spremenljivko ali konstanto \"%s\""
|
msgstr "Izraz koordinat vsebuje neznano spremenljivko ali konstanto \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2298
|
#: ../src/ui/theme.c:2304
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression parser overflowed its buffer."
|
msgid "Coordinate expression parser overflowed its buffer."
|
||||||
msgstr "Razčlenjevalnik izrazov koordinat je preplavil medpomnilnik."
|
msgstr "Razčlenjevalnik izrazov koordinat je preplavil medpomnilnik."
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2327
|
#: ../src/ui/theme.c:2333
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||||
msgstr "Izraz koordinat vsebuje zaklepaj, a ne oklepaja"
|
msgstr "Izraz koordinat vsebuje zaklepaj, a ne oklepaja"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2391
|
#: ../src/ui/theme.c:2397
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
||||||
msgstr "Izraz koordinat vsebuje uklepaj, vendar je brez zaklepaja"
|
msgstr "Izraz koordinat vsebuje uklepaj, vendar je brez zaklepaja"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2402
|
#: ../src/ui/theme.c:2408
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
||||||
msgstr "Videti je, da izraz koordinat ne vsebuje operatorjev ali operandov"
|
msgstr "Videti je, da izraz koordinat ne vsebuje operatorjev ali operandov"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2604
|
#: ../src/ui/theme.c:2610
|
||||||
#: ../src/ui/theme.c:2624
|
#: ../src/ui/theme.c:2630
|
||||||
#: ../src/ui/theme.c:2644
|
#: ../src/ui/theme.c:2650
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Theme contained an expression that resulted in an error: %s\n"
|
msgid "Theme contained an expression that resulted in an error: %s\n"
|
||||||
msgstr "Tema vsebuje izraz, ki je povzročil napako: %s\n"
|
msgstr "Tema vsebuje izraz, ki je povzročil napako: %s\n"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:4255
|
#: ../src/ui/theme.c:4261
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be specified for this frame style"
|
msgid "<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be specified for this frame style"
|
||||||
msgstr "za ta slog okvirja mora biti naveden <button function=\"%s\" state=\"%s\" draw_ops=\"karkoli\"/>"
|
msgstr "za ta slog okvirja mora biti naveden <button function=\"%s\" state=\"%s\" draw_ops=\"karkoli\"/>"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:4763
|
#: ../src/ui/theme.c:4769
|
||||||
#: ../src/ui/theme.c:4788
|
#: ../src/ui/theme.c:4794
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
msgid "Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||||
msgstr "Manjka <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"karkoli\"/>"
|
msgstr "Manjka <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"karkoli\"/>"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:4832
|
#: ../src/ui/theme.c:4838
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Failed to load theme \"%s\": %s\n"
|
msgid "Failed to load theme \"%s\": %s\n"
|
||||||
msgstr "Nalaganje teme \"%s\" ni uspelo: %s\n"
|
msgstr "Nalaganje teme \"%s\" ni uspelo: %s\n"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:4964
|
#: ../src/ui/theme.c:4970
|
||||||
#: ../src/ui/theme.c:4971
|
#: ../src/ui/theme.c:4977
|
||||||
#: ../src/ui/theme.c:4978
|
#: ../src/ui/theme.c:4984
|
||||||
#: ../src/ui/theme.c:4985
|
#: ../src/ui/theme.c:4991
|
||||||
#: ../src/ui/theme.c:4992
|
#: ../src/ui/theme.c:4998
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No <%s> set for theme \"%s\""
|
msgid "No <%s> set for theme \"%s\""
|
||||||
msgstr "Ni nastavljen <%s> za temo \"%s\""
|
msgstr "Ni nastavljen <%s> za temo \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:5000
|
#: ../src/ui/theme.c:5006
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No frame style set for window type \"%s\" in theme \"%s\", add a <window type=\"%s\" style_set=\"whatever\"/> element"
|
msgid "No frame style set for window type \"%s\" in theme \"%s\", add a <window type=\"%s\" style_set=\"whatever\"/> element"
|
||||||
msgstr "Slog okvirja za okno vrste \"%s\" v temi \"%s\" ni nastavljen, dodajte element <window type=\"%s\" style_set=\"whatever\"/>"
|
msgstr "Slog okvirja za okno vrste \"%s\" v temi \"%s\" ni nastavljen, dodajte element <window type=\"%s\" style_set=\"whatever\"/>"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:5443
|
#: ../src/ui/theme.c:5449
|
||||||
#: ../src/ui/theme.c:5505
|
#: ../src/ui/theme.c:5511
|
||||||
#: ../src/ui/theme.c:5568
|
#: ../src/ui/theme.c:5574
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "User-defined constants must begin with a capital letter; \"%s\" does not"
|
msgid "User-defined constants must begin with a capital letter; \"%s\" does not"
|
||||||
msgstr "Uporabniško določene konstante se morajo začeti z veliko črko; \"%s\" se ne"
|
msgstr "Uporabniško določene konstante se morajo začeti z veliko črko; \"%s\" se ne"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:5451
|
#: ../src/ui/theme.c:5457
|
||||||
#: ../src/ui/theme.c:5513
|
#: ../src/ui/theme.c:5519
|
||||||
#: ../src/ui/theme.c:5576
|
#: ../src/ui/theme.c:5582
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Constant \"%s\" has already been defined"
|
msgid "Constant \"%s\" has already been defined"
|
||||||
msgstr "Konstanta \"%s\" je bila že določena"
|
msgstr "Konstanta \"%s\" je bila že določena"
|
||||||
@@ -1688,223 +1683,242 @@ msgstr "<%s> je za to temo naveden dvakrat"
|
|||||||
msgid "Failed to find a valid file for theme %s\n"
|
msgid "Failed to find a valid file for theme %s\n"
|
||||||
msgstr "Ni mogoče najti veljavne datoteke za temo %s\n"
|
msgstr "Ni mogoče najti veljavne datoteke za temo %s\n"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:75
|
#: ../src/ui/theme-viewer.c:99
|
||||||
msgid "/_Windows"
|
msgid "_Windows"
|
||||||
msgstr "/_Okna"
|
msgstr "_Okna"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:76
|
#: ../src/ui/theme-viewer.c:100
|
||||||
msgid "/Windows/tearoff"
|
msgid "_Dialog"
|
||||||
msgstr "/Okna/odtrgaj"
|
msgstr "_Pogovorno okno"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:77
|
#: ../src/ui/theme-viewer.c:101
|
||||||
msgid "/Windows/_Dialog"
|
msgid "_Modal dialog"
|
||||||
msgstr "/Okna/_Pogovorno okno"
|
msgstr "_Modalno okno"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:78
|
#: ../src/ui/theme-viewer.c:102
|
||||||
msgid "/Windows/_Modal dialog"
|
msgid "_Utility"
|
||||||
msgstr "/Okna/_Modalno okno"
|
msgstr "_Pripomoček"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:79
|
#: ../src/ui/theme-viewer.c:103
|
||||||
msgid "/Windows/_Utility"
|
msgid "_Splashscreen"
|
||||||
msgstr "/Okna/P_ripomoček"
|
msgstr "Pre_dstavitveno okno"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:80
|
#: ../src/ui/theme-viewer.c:104
|
||||||
msgid "/Windows/_Splashscreen"
|
msgid "_Top dock"
|
||||||
msgstr "/Okna/Pre_dstavitveno okno"
|
msgstr "_Zgornje sidro"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:81
|
#: ../src/ui/theme-viewer.c:105
|
||||||
msgid "/Windows/_Top dock"
|
msgid "_Bottom dock"
|
||||||
msgstr "/Okna/_Zgornje sidro"
|
msgstr "_Spodnje sidro"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:82
|
#: ../src/ui/theme-viewer.c:106
|
||||||
msgid "/Windows/_Bottom dock"
|
msgid "_Left dock"
|
||||||
msgstr "/Okna/_Spodnje sidro"
|
msgstr "_Levo sidro"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:83
|
#: ../src/ui/theme-viewer.c:107
|
||||||
msgid "/Windows/_Left dock"
|
msgid "_Right dock"
|
||||||
msgstr "/Okna/_Levo sidro"
|
msgstr "_Desno sidro"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:84
|
#: ../src/ui/theme-viewer.c:108
|
||||||
msgid "/Windows/_Right dock"
|
msgid "_All docks"
|
||||||
msgstr "/Okna/_Desno sidro"
|
msgstr "_Vsa sidra"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:85
|
#: ../src/ui/theme-viewer.c:109
|
||||||
msgid "/Windows/_All docks"
|
msgid "Des_ktop"
|
||||||
msgstr "/Okna/_Vsa sidra"
|
msgstr "_Namizje"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:86
|
#: ../src/ui/theme-viewer.c:115
|
||||||
msgid "/Windows/Des_ktop"
|
|
||||||
msgstr "/Okna/_Namizje"
|
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:151
|
|
||||||
msgid "Open another one of these windows"
|
msgid "Open another one of these windows"
|
||||||
msgstr "Odpri drugo izmed teh oken"
|
msgstr "Odpri drugo izmed teh oken"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:153
|
#: ../src/ui/theme-viewer.c:117
|
||||||
msgid "This is a demo button with an 'open' icon"
|
msgid "This is a demo button with an 'open' icon"
|
||||||
msgstr "To je preizkusni gumb z ikono 'odpri'"
|
msgstr "To je preizkusni gumb z ikono 'odpri'"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:155
|
#: ../src/ui/theme-viewer.c:119
|
||||||
msgid "This is a demo button with a 'quit' icon"
|
msgid "This is a demo button with a 'quit' icon"
|
||||||
msgstr "To je preizkusni gumb z ikono 'izhod'"
|
msgstr "To je preizkusni gumb z ikono 'izhod'"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:245
|
#: ../src/ui/theme-viewer.c:253
|
||||||
msgid "This is a sample message in a sample dialog"
|
msgid "This is a sample message in a sample dialog"
|
||||||
msgstr "To je preizkusno sporočilo v pogovornem oknu"
|
msgstr "To je preizkusno sporočilo v pogovornem oknu"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:328
|
#: ../src/ui/theme-viewer.c:336
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Fake menu item %d\n"
|
msgid "Fake menu item %d\n"
|
||||||
msgstr "Ponarejen predmet menija %d\n"
|
msgstr "Ponarejen predmet menija %d\n"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:362
|
#: ../src/ui/theme-viewer.c:370
|
||||||
msgid "Border-only window"
|
msgid "Border-only window"
|
||||||
msgstr "Okno samo z okvirjem"
|
msgstr "Okno samo z okvirjem"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:364
|
#: ../src/ui/theme-viewer.c:372
|
||||||
msgid "Bar"
|
msgid "Bar"
|
||||||
msgstr "Vrstica"
|
msgstr "Vrstica"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:381
|
#: ../src/ui/theme-viewer.c:389
|
||||||
msgid "Normal Application Window"
|
msgid "Normal Application Window"
|
||||||
msgstr "Običajno okno programa"
|
msgstr "Običajno okno programa"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:385
|
#: ../src/ui/theme-viewer.c:393
|
||||||
msgid "Dialog Box"
|
msgid "Dialog Box"
|
||||||
msgstr "Pogovorno okno"
|
msgstr "Pogovorno okno"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:389
|
#: ../src/ui/theme-viewer.c:397
|
||||||
msgid "Modal Dialog Box"
|
msgid "Modal Dialog Box"
|
||||||
msgstr "Modalno pogovorno okno"
|
msgstr "Modalno pogovorno okno"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:393
|
#: ../src/ui/theme-viewer.c:401
|
||||||
msgid "Utility Palette"
|
msgid "Utility Palette"
|
||||||
msgstr "Paleta pripomočkov"
|
msgstr "Paleta pripomočkov"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:397
|
#: ../src/ui/theme-viewer.c:405
|
||||||
msgid "Torn-off Menu"
|
msgid "Torn-off Menu"
|
||||||
msgstr "Odtrgan meni"
|
msgstr "Odtrgan meni"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:401
|
#: ../src/ui/theme-viewer.c:409
|
||||||
msgid "Border"
|
msgid "Border"
|
||||||
msgstr "Okvir"
|
msgstr "Okvir"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:729
|
#: ../src/ui/theme-viewer.c:737
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Button layout test %d"
|
msgid "Button layout test %d"
|
||||||
msgstr "Preizkus razporeditve gumbov %d"
|
msgstr "Preizkus razporeditve gumbov %d"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:758
|
#: ../src/ui/theme-viewer.c:766
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%g milliseconds to draw one window frame"
|
msgid "%g milliseconds to draw one window frame"
|
||||||
msgstr "%g milisekund za risanje ene sličice okna"
|
msgstr "%g milisekund za risanje ene sličice okna"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:801
|
#: ../src/ui/theme-viewer.c:810
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
|
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
|
||||||
msgstr "Uporaba: metacity-theme-viewer [IMETEME]\n"
|
msgstr "Uporaba: metacity-theme-viewer [IMETEME]\n"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:808
|
#: ../src/ui/theme-viewer.c:817
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error loading theme: %s\n"
|
msgid "Error loading theme: %s\n"
|
||||||
msgstr "Napaka pri nalaganju teme: %s\n"
|
msgstr "Napaka pri nalaganju teme: %s\n"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:814
|
#: ../src/ui/theme-viewer.c:823
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Loaded theme \"%s\" in %g seconds\n"
|
msgid "Loaded theme \"%s\" in %g seconds\n"
|
||||||
msgstr "Tema \"%s\" naložena v %g sekundah\n"
|
msgstr "Tema \"%s\" naložena v %g sekundah\n"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:855
|
#: ../src/ui/theme-viewer.c:866
|
||||||
msgid "Normal Title Font"
|
msgid "Normal Title Font"
|
||||||
msgstr "Običajna pisava naslova"
|
msgstr "Običajna pisava naslova"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:861
|
#: ../src/ui/theme-viewer.c:872
|
||||||
msgid "Small Title Font"
|
msgid "Small Title Font"
|
||||||
msgstr "Majhna pisava naslova"
|
msgstr "Majhna pisava naslova"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:867
|
#: ../src/ui/theme-viewer.c:878
|
||||||
msgid "Large Title Font"
|
msgid "Large Title Font"
|
||||||
msgstr "Velika pisava naslova"
|
msgstr "Velika pisava naslova"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:872
|
#: ../src/ui/theme-viewer.c:883
|
||||||
msgid "Button Layouts"
|
msgid "Button Layouts"
|
||||||
msgstr "Razpored gumbov"
|
msgstr "Razpored gumbov"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:877
|
#: ../src/ui/theme-viewer.c:888
|
||||||
msgid "Benchmark"
|
msgid "Benchmark"
|
||||||
msgstr "Meritev"
|
msgstr "Meritev"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:924
|
#: ../src/ui/theme-viewer.c:935
|
||||||
msgid "Window Title Goes Here"
|
msgid "Window Title Goes Here"
|
||||||
msgstr "Tukaj je naslov okna"
|
msgstr "Tukaj je naslov okna"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1028
|
#: ../src/ui/theme-viewer.c:1039
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g seconds wall clock time including X server resources (%g milliseconds per frame)\n"
|
msgid "Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g seconds wall clock time including X server resources (%g milliseconds per frame)\n"
|
||||||
msgstr "Izrisanih %d sličic v %g sekundah odjemalca (%g milisekund na sličico) in %g sekund v času stenske ure, upoštevajoč sredstva strežnika X (%g milisekund na sličico)\n"
|
msgstr "Izrisanih %d sličic v %g sekundah odjemalca (%g milisekund na sličico) in %g sekund v času stenske ure, upoštevajoč sredstva strežnika X (%g milisekund na sličico)\n"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1247
|
#: ../src/ui/theme-viewer.c:1258
|
||||||
msgid "position expression test returned TRUE but set error"
|
msgid "position expression test returned TRUE but set error"
|
||||||
msgstr "preizkus izjave položaja je vrnil logični PRAV, vendar je nastavil napako"
|
msgstr "preizkus izjave položaja je vrnil logični PRAV, vendar je nastavil napako"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1249
|
#: ../src/ui/theme-viewer.c:1260
|
||||||
msgid "position expression test returned FALSE but didn't set error"
|
msgid "position expression test returned FALSE but didn't set error"
|
||||||
msgstr "preizkus izjave položaja je vrnil logični NAPAK, vendar ni nastavil napake"
|
msgstr "preizkus izjave položaja je vrnil logični NAPAK, vendar ni nastavil napake"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1253
|
#: ../src/ui/theme-viewer.c:1264
|
||||||
msgid "Error was expected but none given"
|
msgid "Error was expected but none given"
|
||||||
msgstr "Pričakovana je napaka, vendar odziva ni bilo"
|
msgstr "Pričakovana je napaka, vendar odziva ni bilo"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1255
|
#: ../src/ui/theme-viewer.c:1266
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error %d was expected but %d given"
|
msgid "Error %d was expected but %d given"
|
||||||
msgstr "Pričakovana je napaka %d, vrnjena pa je bila %d"
|
msgstr "Pričakovana je napaka %d, vrnjena pa je bila %d"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1261
|
#: ../src/ui/theme-viewer.c:1272
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error not expected but one was returned: %s"
|
msgid "Error not expected but one was returned: %s"
|
||||||
msgstr "Napaka ni pričakovana, vendar je vrnjen odziv: %s"
|
msgstr "Napaka ni pričakovana, vendar je vrnjen odziv: %s"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1265
|
#: ../src/ui/theme-viewer.c:1276
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "x value was %d, %d was expected"
|
msgid "x value was %d, %d was expected"
|
||||||
msgstr "vrednost x je %d, pričakovana pa je %d"
|
msgstr "vrednost x je %d, pričakovana pa je %d"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1268
|
#: ../src/ui/theme-viewer.c:1279
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "y value was %d, %d was expected"
|
msgid "y value was %d, %d was expected"
|
||||||
msgstr "vrednost y je %d, pričakovana pa je %d"
|
msgstr "vrednost y je %d, pričakovana pa je %d"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:1333
|
#: ../src/ui/theme-viewer.c:1344
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
|
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
|
||||||
msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\n"
|
msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\n"
|
||||||
|
|
||||||
|
#~ msgid "Failed to get hostname: %s\n"
|
||||||
|
#~ msgstr "Ni mogoče dobiti gostitelja z imenom: %s\n"
|
||||||
|
|
||||||
|
#~ msgid "/Windows/tearoff"
|
||||||
|
#~ msgstr "/Okna/odtrgaj"
|
||||||
|
|
||||||
|
#~ msgid "/Windows/_Dialog"
|
||||||
|
#~ msgstr "/Okna/_Pogovorno okno"
|
||||||
|
|
||||||
|
#~ msgid "/Windows/_Modal dialog"
|
||||||
|
#~ msgstr "/Okna/_Modalno okno"
|
||||||
|
|
||||||
|
#~ msgid "/Windows/Des_ktop"
|
||||||
|
#~ msgstr "/Okna/_Namizje"
|
||||||
|
|
||||||
#~ msgid "Theme file %s did not contain a root <metacity_theme> element"
|
#~ msgid "Theme file %s did not contain a root <metacity_theme> element"
|
||||||
#~ msgstr "Datoteka teme %s ne vsebuje korenskega elementa <metacity_theme>"
|
#~ msgstr "Datoteka teme %s ne vsebuje korenskega elementa <metacity_theme>"
|
||||||
|
|
||||||
#~ msgid "Failed to read saved session file %s: %s\n"
|
#~ msgid "Failed to read saved session file %s: %s\n"
|
||||||
#~ msgstr "Ni mogoče prebrati datoteke shranjene seje %s: %s\n"
|
#~ msgstr "Ni mogoče prebrati datoteke shranjene seje %s: %s\n"
|
||||||
|
|
||||||
#~ msgid "<author> specified twice for this theme"
|
#~ msgid "<author> specified twice for this theme"
|
||||||
#~ msgstr "Za to temo je element <author> naveden dvakrat"
|
#~ msgstr "Za to temo je element <author> naveden dvakrat"
|
||||||
|
|
||||||
#~ msgid "<copyright> specified twice for this theme"
|
#~ msgid "<copyright> specified twice for this theme"
|
||||||
#~ msgstr "Za to temo je element <copyright> naveden dvakrat"
|
#~ msgstr "Za to temo je element <copyright> naveden dvakrat"
|
||||||
|
|
||||||
#~ msgid "<date> specified twice for this theme"
|
#~ msgid "<date> specified twice for this theme"
|
||||||
#~ msgstr "Za to temo je element <date> naveden dvakrat"
|
#~ msgstr "Za to temo je element <date> naveden dvakrat"
|
||||||
|
|
||||||
#~ msgid "<description> specified twice for this theme"
|
#~ msgid "<description> specified twice for this theme"
|
||||||
#~ msgstr "Za to temo je element <description> naveden dvakrat"
|
#~ msgstr "Za to temo je element <description> naveden dvakrat"
|
||||||
#~ msgid "Desktop"
|
|
||||||
#~ msgstr "Namizje"
|
|
||||||
#~ msgid "Window Management"
|
#~ msgid "Window Management"
|
||||||
#~ msgstr "Upravljanje oken"
|
#~ msgstr "Upravljanje oken"
|
||||||
|
|
||||||
#~ msgid "Failed to parse message \"%s\" from dialog process\n"
|
#~ msgid "Failed to parse message \"%s\" from dialog process\n"
|
||||||
#~ msgstr "Ni mogoče razčleniti sporočila \"%s\" iz procesa dialogov\n"
|
#~ msgstr "Ni mogoče razčleniti sporočila \"%s\" iz procesa dialogov\n"
|
||||||
|
|
||||||
#~ msgid "Error reading from dialog display process: %s\n"
|
#~ msgid "Error reading from dialog display process: %s\n"
|
||||||
#~ msgstr "Napaka ob branju iz procesa prikaza dialogov: %s\n"
|
#~ msgstr "Napaka ob branju iz procesa prikaza dialogov: %s\n"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "Error launching metacity-dialog to ask about killing an application: %s\n"
|
#~ "Error launching metacity-dialog to ask about killing an application: %s\n"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Napaka ob zaganjanju metacity-dialog, da bi vprašal o ubijanju programa: %"
|
#~ "Napaka ob zaganjanju metacity-dialog, da bi vprašal o ubijanju programa: %"
|
||||||
#~ "s\n"
|
#~ "s\n"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
|
#~ "The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
@@ -1918,6 +1932,7 @@ msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\
|
|||||||
#~ "Razčlenilnik je precej popustljiv in dopušča različno velikost črk ter "
|
#~ "Razčlenilnik je precej popustljiv in dopušča različno velikost črk ter "
|
||||||
#~ "okrajšave kot npr. \"<Ctl>\" in \"<Ctrl>\". V primeru, da možnost "
|
#~ "okrajšave kot npr. \"<Ctl>\" in \"<Ctrl>\". V primeru, da možnost "
|
||||||
#~ "\"onemogočite\", potem za to dejanje ne bo bližnjice tipk."
|
#~ "\"onemogočite\", potem za to dejanje ne bo bližnjice tipk."
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
|
#~ "The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
|
||||||
#~ "\n"
|
#~ "\n"
|
||||||
@@ -1937,17 +1952,21 @@ msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\
|
|||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ "Tipkovno bližnjico je lahko povrnete s pritiskom tipke \"shift\" zato "
|
#~ "Tipkovno bližnjico je lahko povrnete s pritiskom tipke \"shift\" zato "
|
||||||
#~ "tipka \"shift\" ne more biti del tipkovne bližnjice."
|
#~ "tipka \"shift\" ne more biti del tipkovne bližnjice."
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "Error launching metacity-dialog to warn about apps that don't support "
|
#~ "Error launching metacity-dialog to warn about apps that don't support "
|
||||||
#~ "session management: %s\n"
|
#~ "session management: %s\n"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Napaka ob zaganjanju metacity-dialog za opozorilo o programih, ki ne "
|
#~ "Napaka ob zaganjanju metacity-dialog za opozorilo o programih, ki ne "
|
||||||
#~ "podpirajo upravljanja seje: %s\n"
|
#~ "podpirajo upravljanja seje: %s\n"
|
||||||
|
|
||||||
#~ msgid "Metacity"
|
#~ msgid "Metacity"
|
||||||
#~ msgstr "Metacity"
|
#~ msgstr "Metacity"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "(Not implemented) Navigation works in terms of applications not windows"
|
#~ "(Not implemented) Navigation works in terms of applications not windows"
|
||||||
#~ msgstr "(Ni vstavljeno) Navigacija deluje v smislu programov, ne oken"
|
#~ msgstr "(Ni vstavljeno) Navigacija deluje v smislu programov, ne oken"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "A font description string describing a font for window titlebars. The "
|
#~ "A font description string describing a font for window titlebars. The "
|
||||||
#~ "size from the description will only be used if the titlebar_font_size "
|
#~ "size from the description will only be used if the titlebar_font_size "
|
||||||
@@ -1958,14 +1977,19 @@ msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\
|
|||||||
#~ "uporabljena le, če je možnost titlebar_font_size nastavljena na 0. Poleg "
|
#~ "uporabljena le, če je možnost titlebar_font_size nastavljena na 0. Poleg "
|
||||||
#~ "tega je ta možnost onemogočena, če je titlebar_uses_desktop_font "
|
#~ "tega je ta možnost onemogočena, če je titlebar_uses_desktop_font "
|
||||||
#~ "nastavljena na true (resnično)."
|
#~ "nastavljena na true (resnično)."
|
||||||
|
|
||||||
#~ msgid "Action on title bar double-click"
|
#~ msgid "Action on title bar double-click"
|
||||||
#~ msgstr "Dejanje ob dvojnem kliku na naziv okna"
|
#~ msgstr "Dejanje ob dvojnem kliku na naziv okna"
|
||||||
|
|
||||||
#~ msgid "Action on title bar middle-click"
|
#~ msgid "Action on title bar middle-click"
|
||||||
#~ msgstr "Dejanje ob dvojnem kliku na naslov okna"
|
#~ msgstr "Dejanje ob dvojnem kliku na naslov okna"
|
||||||
|
|
||||||
#~ msgid "Action on title bar right-click"
|
#~ msgid "Action on title bar right-click"
|
||||||
#~ msgstr "Dejanje ob desnem kliku na naslov okna"
|
#~ msgstr "Dejanje ob desnem kliku na naslov okna"
|
||||||
|
|
||||||
#~ msgid "Arrangement of buttons on the titlebar"
|
#~ msgid "Arrangement of buttons on the titlebar"
|
||||||
#~ msgstr "Postavitev gumbov v nazivu okna"
|
#~ msgstr "Postavitev gumbov v nazivu okna"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "Arrangement of buttons on the titlebar. The value should be a string, "
|
#~ "Arrangement of buttons on the titlebar. The value should be a string, "
|
||||||
#~ "such as \"menu:minimize,maximize,spacer,close\"; the colon separates the "
|
#~ "such as \"menu:minimize,maximize,spacer,close\"; the colon separates the "
|
||||||
@@ -1982,8 +2006,10 @@ msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\
|
|||||||
#~ "novih različicah Metacity doda nove gumbe brez, da bi se porušila "
|
#~ "novih različicah Metacity doda nove gumbe brez, da bi se porušila "
|
||||||
#~ "kompatibilnost s starimi različicami. Posebna oznaka ločilnika se lahko "
|
#~ "kompatibilnost s starimi različicami. Posebna oznaka ločilnika se lahko "
|
||||||
#~ "uporabi pri večanju razdalje med gumbi."
|
#~ "uporabi pri večanju razdalje med gumbi."
|
||||||
|
|
||||||
#~ msgid "Automatically raises the focused window"
|
#~ msgid "Automatically raises the focused window"
|
||||||
#~ msgstr "Samodejno dvigne dejavno okno"
|
#~ msgstr "Samodejno dvigne dejavno okno"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "Clicking a window while holding down this modifier key will move the "
|
#~ "Clicking a window while holding down this modifier key will move the "
|
||||||
#~ "window (left click), resize the window (middle click), or show the window "
|
#~ "window (left click), resize the window (middle click), or show the window "
|
||||||
@@ -1996,12 +2022,15 @@ msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\
|
|||||||
#~ "klik). Leve in desne naloge je mogoče zamenjati s tipko prilagajanja "
|
#~ "klik). Leve in desne naloge je mogoče zamenjati s tipko prilagajanja "
|
||||||
#~ "velikosti okna z miško. Spremenilnik je npr. izražen kot \"<Alt>\" "
|
#~ "velikosti okna z miško. Spremenilnik je npr. izražen kot \"<Alt>\" "
|
||||||
#~ "ali \"<Super>\"."
|
#~ "ali \"<Super>\"."
|
||||||
|
|
||||||
#~ msgid "Commands to run in response to keybindings"
|
#~ msgid "Commands to run in response to keybindings"
|
||||||
#~ msgstr "Ukazi zagnani preko tipkovnih bližnjic"
|
#~ msgstr "Ukazi zagnani preko tipkovnih bližnjic"
|
||||||
|
|
||||||
#~ msgid "Compositing Manager"
|
#~ msgid "Compositing Manager"
|
||||||
#~ msgstr "Upravitelj sestavljanja"
|
#~ msgstr "Upravitelj sestavljanja"
|
||||||
|
|
||||||
#~ msgid "Control how new windows get focus"
|
#~ msgid "Control how new windows get focus"
|
||||||
#~ msgstr "Nadzor dejavnosti okna"
|
#~ msgstr "Nadzor dejavnosti okna"
|
||||||
|
|
||||||
#~ msgid "Current theme"
|
#~ msgid "Current theme"
|
||||||
#~ msgstr "Trenutna tema"
|
#~ msgstr "Trenutna tema"
|
||||||
|
|
||||||
|
@@ -39,10 +39,12 @@ mutter_SOURCES= \
|
|||||||
compositor/mutter-shaped-texture.h \
|
compositor/mutter-shaped-texture.h \
|
||||||
compositor/tidy/tidy-texture-frame.c \
|
compositor/tidy/tidy-texture-frame.c \
|
||||||
compositor/tidy/tidy-texture-frame.h \
|
compositor/tidy/tidy-texture-frame.h \
|
||||||
|
gdk-compat.h \
|
||||||
gtk-compat.h \
|
gtk-compat.h \
|
||||||
include/compositor.h \
|
include/compositor.h \
|
||||||
include/mutter-plugin.h \
|
include/mutter-plugin.h \
|
||||||
include/mutter-window.h \
|
include/mutter-window.h \
|
||||||
|
include/region.h \
|
||||||
include/compositor-mutter.h \
|
include/compositor-mutter.h \
|
||||||
core/constraints.c \
|
core/constraints.c \
|
||||||
core/constraints.h \
|
core/constraints.h \
|
||||||
@@ -210,18 +212,21 @@ Meta-$(api_version).gir: $(G_IR_SCANNER) mutter $(libmutterinclude_HEADERS) $(mu
|
|||||||
--namespace=Meta \
|
--namespace=Meta \
|
||||||
--nsversion=$(api_version) \
|
--nsversion=$(api_version) \
|
||||||
--include=GObject-2.0 \
|
--include=GObject-2.0 \
|
||||||
--include=Gdk-2.0 \
|
--include=Gdk-@GTK_API_VERSION@ \
|
||||||
--include=Gtk-2.0 \
|
--include=Gtk-@GTK_API_VERSION@ \
|
||||||
--include=Clutter-1.0 \
|
--include=Clutter-1.0 \
|
||||||
--pkg=clutter-1.0 \
|
--pkg=clutter-1.0 \
|
||||||
--pkg=gtk+-2.0 \
|
--pkg=gtk+-@GTK_API_VERSION@ \
|
||||||
--include=xlib-2.0 \
|
--include=xlib-2.0 \
|
||||||
--include=xfixes-4.0 \
|
--include=xfixes-4.0 \
|
||||||
--program=$$pwd/mutter \
|
--program=$$pwd/mutter \
|
||||||
$(filter %.c,$(mutter_SOURCES)) \
|
$(filter %.c,$(mutter_SOURCES)) \
|
||||||
$(libmutterinclude_base_headers) \
|
$(libmutterinclude_base_headers) \
|
||||||
$(INCLUDES) \
|
$(INCLUDES) \
|
||||||
-o $$pwd/$@
|
-o $$pwd/$@.tmp && \
|
||||||
|
$(PYTHON) $(srcdir)/fix-meta-rectangle.py $$pwd/$@.tmp $$pwd/$@.tmp2 && \
|
||||||
|
rm $$pwd/$@.tmp && \
|
||||||
|
mv $$pwd/$@.tmp2 $$pwd/$@
|
||||||
|
|
||||||
Meta-$(api_version).typelib: $(G_IR_COMPILER) Meta-$(api_version).gir
|
Meta-$(api_version).typelib: $(G_IR_COMPILER) Meta-$(api_version).gir
|
||||||
$(AM_V_GEN) LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(G_IR_COMPILER) Meta-$(api_version).gir -o $@
|
$(AM_V_GEN) LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(G_IR_COMPILER) Meta-$(api_version).gir -o $@
|
||||||
@@ -298,6 +303,7 @@ EXTRA_DIST=$(desktopfiles_files) \
|
|||||||
$(desktopfiles_in_files) \
|
$(desktopfiles_in_files) \
|
||||||
$(wmproperties_in_files) \
|
$(wmproperties_in_files) \
|
||||||
$(schema_in_files) \
|
$(schema_in_files) \
|
||||||
|
fix-meta-rectangle.py \
|
||||||
libmutter-private.pc.in \
|
libmutter-private.pc.in \
|
||||||
mutter-plugins.pc.in \
|
mutter-plugins.pc.in \
|
||||||
mutter-enum-types.h.in \
|
mutter-enum-types.h.in \
|
||||||
|
@@ -790,7 +790,6 @@ meta_compositor_switch_workspace (MetaCompositor *compositor,
|
|||||||
|
|
||||||
if (!info->plugin_mgr ||
|
if (!info->plugin_mgr ||
|
||||||
!mutter_plugin_manager_switch_workspace (info->plugin_mgr,
|
!mutter_plugin_manager_switch_workspace (info->plugin_mgr,
|
||||||
(const GList **)&info->windows,
|
|
||||||
from_indx,
|
from_indx,
|
||||||
to_indx,
|
to_indx,
|
||||||
direction))
|
direction))
|
||||||
|
@@ -402,9 +402,8 @@ mutter_plugin_manager_get (MetaScreen *screen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mutter_plugin_manager_kill_effect (MutterPluginManager *plugin_mgr,
|
mutter_plugin_manager_kill_window_effects (MutterPluginManager *plugin_mgr,
|
||||||
MutterWindow *actor,
|
MutterWindow *actor)
|
||||||
unsigned long events)
|
|
||||||
{
|
{
|
||||||
GList *l = plugin_mgr->plugins;
|
GList *l = plugin_mgr->plugins;
|
||||||
|
|
||||||
@@ -414,17 +413,32 @@ mutter_plugin_manager_kill_effect (MutterPluginManager *plugin_mgr,
|
|||||||
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||||
|
|
||||||
if (!mutter_plugin_disabled (plugin)
|
if (!mutter_plugin_disabled (plugin)
|
||||||
&& (mutter_plugin_features (plugin) & events)
|
&& klass->kill_window_effects)
|
||||||
&& klass->kill_effect)
|
klass->kill_window_effects (plugin, actor);
|
||||||
klass->kill_effect (plugin, actor, events);
|
|
||||||
|
l = l->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_plugin_manager_kill_switch_workspace (MutterPluginManager *plugin_mgr)
|
||||||
|
{
|
||||||
|
GList *l = plugin_mgr->plugins;
|
||||||
|
|
||||||
|
while (l)
|
||||||
|
{
|
||||||
|
MutterPlugin *plugin = l->data;
|
||||||
|
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||||
|
|
||||||
|
if (!mutter_plugin_disabled (plugin)
|
||||||
|
&& (mutter_plugin_features (plugin) & MUTTER_PLUGIN_SWITCH_WORKSPACE)
|
||||||
|
&& klass->kill_switch_workspace)
|
||||||
|
klass->kill_switch_workspace (plugin);
|
||||||
|
|
||||||
l = l->next;
|
l = l->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ALL_BUT_SWITCH \
|
|
||||||
MUTTER_PLUGIN_ALL_EFFECTS & \
|
|
||||||
~MUTTER_PLUGIN_SWITCH_WORKSPACE
|
|
||||||
/*
|
/*
|
||||||
* Public method that the compositor hooks into for events that require
|
* Public method that the compositor hooks into for events that require
|
||||||
* no additional parameters.
|
* no additional parameters.
|
||||||
@@ -461,10 +475,9 @@ mutter_plugin_manager_event_simple (MutterPluginManager *plugin_mgr,
|
|||||||
case MUTTER_PLUGIN_MINIMIZE:
|
case MUTTER_PLUGIN_MINIMIZE:
|
||||||
if (klass->minimize)
|
if (klass->minimize)
|
||||||
{
|
{
|
||||||
mutter_plugin_manager_kill_effect (
|
mutter_plugin_manager_kill_window_effects (
|
||||||
plugin_mgr,
|
plugin_mgr,
|
||||||
actor,
|
actor);
|
||||||
ALL_BUT_SWITCH);
|
|
||||||
|
|
||||||
_mutter_plugin_effect_started (plugin);
|
_mutter_plugin_effect_started (plugin);
|
||||||
klass->minimize (plugin, actor);
|
klass->minimize (plugin, actor);
|
||||||
@@ -473,10 +486,9 @@ mutter_plugin_manager_event_simple (MutterPluginManager *plugin_mgr,
|
|||||||
case MUTTER_PLUGIN_MAP:
|
case MUTTER_PLUGIN_MAP:
|
||||||
if (klass->map)
|
if (klass->map)
|
||||||
{
|
{
|
||||||
mutter_plugin_manager_kill_effect (
|
mutter_plugin_manager_kill_window_effects (
|
||||||
plugin_mgr,
|
plugin_mgr,
|
||||||
actor,
|
actor);
|
||||||
ALL_BUT_SWITCH);
|
|
||||||
|
|
||||||
_mutter_plugin_effect_started (plugin);
|
_mutter_plugin_effect_started (plugin);
|
||||||
klass->map (plugin, actor);
|
klass->map (plugin, actor);
|
||||||
@@ -540,10 +552,9 @@ mutter_plugin_manager_event_maximize (MutterPluginManager *plugin_mgr,
|
|||||||
case MUTTER_PLUGIN_MAXIMIZE:
|
case MUTTER_PLUGIN_MAXIMIZE:
|
||||||
if (klass->maximize)
|
if (klass->maximize)
|
||||||
{
|
{
|
||||||
mutter_plugin_manager_kill_effect (
|
mutter_plugin_manager_kill_window_effects (
|
||||||
plugin_mgr,
|
plugin_mgr,
|
||||||
actor,
|
actor);
|
||||||
ALL_BUT_SWITCH);
|
|
||||||
|
|
||||||
_mutter_plugin_effect_started (plugin);
|
_mutter_plugin_effect_started (plugin);
|
||||||
klass->maximize (plugin, actor,
|
klass->maximize (plugin, actor,
|
||||||
@@ -554,10 +565,9 @@ mutter_plugin_manager_event_maximize (MutterPluginManager *plugin_mgr,
|
|||||||
case MUTTER_PLUGIN_UNMAXIMIZE:
|
case MUTTER_PLUGIN_UNMAXIMIZE:
|
||||||
if (klass->unmaximize)
|
if (klass->unmaximize)
|
||||||
{
|
{
|
||||||
mutter_plugin_manager_kill_effect (
|
mutter_plugin_manager_kill_window_effects (
|
||||||
plugin_mgr,
|
plugin_mgr,
|
||||||
actor,
|
actor);
|
||||||
ALL_BUT_SWITCH);
|
|
||||||
|
|
||||||
_mutter_plugin_effect_started (plugin);
|
_mutter_plugin_effect_started (plugin);
|
||||||
klass->unmaximize (plugin, actor,
|
klass->unmaximize (plugin, actor,
|
||||||
@@ -586,7 +596,6 @@ mutter_plugin_manager_event_maximize (MutterPluginManager *plugin_mgr,
|
|||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
mutter_plugin_manager_switch_workspace (MutterPluginManager *plugin_mgr,
|
mutter_plugin_manager_switch_workspace (MutterPluginManager *plugin_mgr,
|
||||||
const GList **actors,
|
|
||||||
gint from,
|
gint from,
|
||||||
gint to,
|
gint to,
|
||||||
MetaMotionDirection direction)
|
MetaMotionDirection direction)
|
||||||
@@ -604,19 +613,15 @@ mutter_plugin_manager_switch_workspace (MutterPluginManager *plugin_mgr,
|
|||||||
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||||
|
|
||||||
if (!mutter_plugin_disabled (plugin) &&
|
if (!mutter_plugin_disabled (plugin) &&
|
||||||
(mutter_plugin_features (plugin) & MUTTER_PLUGIN_SWITCH_WORKSPACE) &&
|
(mutter_plugin_features (plugin) & MUTTER_PLUGIN_SWITCH_WORKSPACE))
|
||||||
(actors && *actors))
|
|
||||||
{
|
{
|
||||||
if (klass->switch_workspace)
|
if (klass->switch_workspace)
|
||||||
{
|
{
|
||||||
retval = TRUE;
|
retval = TRUE;
|
||||||
mutter_plugin_manager_kill_effect (
|
mutter_plugin_manager_kill_switch_workspace (plugin_mgr);
|
||||||
plugin_mgr,
|
|
||||||
MUTTER_WINDOW ((*actors)->data),
|
|
||||||
MUTTER_PLUGIN_SWITCH_WORKSPACE);
|
|
||||||
|
|
||||||
_mutter_plugin_effect_started (plugin);
|
_mutter_plugin_effect_started (plugin);
|
||||||
klass->switch_workspace (plugin, actors, from, to, direction);
|
klass->switch_workspace (plugin, from, to, direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -31,6 +31,15 @@
|
|||||||
#include "mutter-plugin.h"
|
#include "mutter-plugin.h"
|
||||||
#undef MUTTER_PLUGIN_FROM_MANAGER_
|
#undef MUTTER_PLUGIN_FROM_MANAGER_
|
||||||
|
|
||||||
|
#define MUTTER_PLUGIN_MINIMIZE (1<<0)
|
||||||
|
#define MUTTER_PLUGIN_MAXIMIZE (1<<1)
|
||||||
|
#define MUTTER_PLUGIN_UNMAXIMIZE (1<<2)
|
||||||
|
#define MUTTER_PLUGIN_MAP (1<<3)
|
||||||
|
#define MUTTER_PLUGIN_DESTROY (1<<4)
|
||||||
|
#define MUTTER_PLUGIN_SWITCH_WORKSPACE (1<<5)
|
||||||
|
|
||||||
|
#define MUTTER_PLUGIN_ALL_EFFECTS (~0)
|
||||||
|
|
||||||
typedef struct MutterPluginManager MutterPluginManager;
|
typedef struct MutterPluginManager MutterPluginManager;
|
||||||
|
|
||||||
MutterPluginManager * mutter_plugin_manager_get (MetaScreen *screen);
|
MutterPluginManager * mutter_plugin_manager_get (MetaScreen *screen);
|
||||||
@@ -54,7 +63,6 @@ void mutter_plugin_manager_update_workspaces (MutterPluginManager *mgr);
|
|||||||
void mutter_plugin_manager_update_workspace (MutterPluginManager *mgr, MetaWorkspace *w);
|
void mutter_plugin_manager_update_workspace (MutterPluginManager *mgr, MetaWorkspace *w);
|
||||||
|
|
||||||
gboolean mutter_plugin_manager_switch_workspace (MutterPluginManager *mgr,
|
gboolean mutter_plugin_manager_switch_workspace (MutterPluginManager *mgr,
|
||||||
const GList **actors,
|
|
||||||
gint from,
|
gint from,
|
||||||
gint to,
|
gint to,
|
||||||
MetaMotionDirection direction);
|
MetaMotionDirection direction);
|
||||||
|
@@ -367,9 +367,25 @@ _mutter_plugin_effect_started (MutterPlugin *plugin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
mutter_plugin_effect_completed (MutterPlugin *plugin,
|
mutter_plugin_switch_workspace_completed (MutterPlugin *plugin)
|
||||||
MutterWindow *actor,
|
{
|
||||||
unsigned long event)
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
MetaScreen *screen = mutter_plugin_get_screen (plugin);
|
||||||
|
|
||||||
|
if (priv->running-- < 0)
|
||||||
|
{
|
||||||
|
g_warning ("Error in running effect accounting, adjusting.");
|
||||||
|
priv->running = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
mutter_switch_workspace_completed (screen);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
mutter_plugin_window_effect_completed (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor,
|
||||||
|
unsigned long event)
|
||||||
{
|
{
|
||||||
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
@@ -391,17 +407,42 @@ mutter_plugin_effect_completed (MutterPlugin *plugin,
|
|||||||
name ? name : "unknown");
|
name ? name : "unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event == MUTTER_PLUGIN_SWITCH_WORKSPACE)
|
mutter_window_effect_completed (actor, event);
|
||||||
{
|
}
|
||||||
/* The window is just used to identify the screen */
|
|
||||||
MetaWindow *window = mutter_window_get_meta_window (actor);
|
void
|
||||||
MetaScreen *screen = meta_window_get_screen (window);
|
mutter_plugin_minimize_completed (MutterPlugin *plugin,
|
||||||
mutter_switch_workspace_completed (screen);
|
MutterWindow *actor)
|
||||||
}
|
{
|
||||||
else
|
mutter_plugin_window_effect_completed (plugin, actor, MUTTER_PLUGIN_MINIMIZE);
|
||||||
{
|
}
|
||||||
mutter_window_effect_completed (actor, event);
|
|
||||||
}
|
void
|
||||||
|
mutter_plugin_maximize_completed (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor)
|
||||||
|
{
|
||||||
|
mutter_plugin_window_effect_completed (plugin, actor, MUTTER_PLUGIN_MAXIMIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_unmaximize_completed (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor)
|
||||||
|
{
|
||||||
|
mutter_plugin_window_effect_completed (plugin, actor, MUTTER_PLUGIN_UNMAXIMIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_map_completed (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor)
|
||||||
|
{
|
||||||
|
mutter_plugin_window_effect_completed (plugin, actor, MUTTER_PLUGIN_MAP);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_destroy_completed (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor)
|
||||||
|
{
|
||||||
|
mutter_plugin_window_effect_completed (plugin, actor, MUTTER_PLUGIN_DESTROY);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -71,7 +71,7 @@ struct _MutterShapedTexturePrivate
|
|||||||
CoglHandle material_workaround;
|
CoglHandle material_workaround;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GdkRegion *clip_region;
|
MetaRegion *clip_region;
|
||||||
|
|
||||||
guint mask_width, mask_height;
|
guint mask_width, mask_height;
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ mutter_shaped_texture_paint (ClutterActor *actor)
|
|||||||
ClutterActorBox alloc;
|
ClutterActorBox alloc;
|
||||||
CoglHandle material;
|
CoglHandle material;
|
||||||
|
|
||||||
if (priv->clip_region && gdk_region_empty (priv->clip_region))
|
if (priv->clip_region && meta_region_is_empty (priv->clip_region))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stex)))
|
if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stex)))
|
||||||
@@ -387,7 +387,7 @@ mutter_shaped_texture_paint (ClutterActor *actor)
|
|||||||
# define MAX_RECTS 16
|
# define MAX_RECTS 16
|
||||||
|
|
||||||
/* Would be nice to be able to check the number of rects first */
|
/* Would be nice to be able to check the number of rects first */
|
||||||
gdk_region_get_rectangles (priv->clip_region, &rects, &n_rects);
|
meta_region_get_rectangles (priv->clip_region, &rects, &n_rects);
|
||||||
if (n_rects > MAX_RECTS)
|
if (n_rects > MAX_RECTS)
|
||||||
{
|
{
|
||||||
g_free (rects);
|
g_free (rects);
|
||||||
@@ -557,7 +557,7 @@ mutter_shaped_texture_add_rectangles (MutterShapedTexture *stex,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
mutter_shaped_texture_set_clip_region (MutterShapedTexture *stex,
|
mutter_shaped_texture_set_clip_region (MutterShapedTexture *stex,
|
||||||
GdkRegion *clip_region)
|
MetaRegion *clip_region)
|
||||||
{
|
{
|
||||||
MutterShapedTexturePrivate *priv;
|
MutterShapedTexturePrivate *priv;
|
||||||
|
|
||||||
@@ -567,7 +567,7 @@ mutter_shaped_texture_set_clip_region (MutterShapedTexture *stex,
|
|||||||
|
|
||||||
if (priv->clip_region)
|
if (priv->clip_region)
|
||||||
{
|
{
|
||||||
gdk_region_destroy (priv->clip_region);
|
meta_region_destroy (priv->clip_region);
|
||||||
priv->clip_region = NULL;
|
priv->clip_region = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,12 +26,14 @@
|
|||||||
#ifndef __MUTTER_SHAPED_TEXTURE_H__
|
#ifndef __MUTTER_SHAPED_TEXTURE_H__
|
||||||
#define __MUTTER_SHAPED_TEXTURE_H__
|
#define __MUTTER_SHAPED_TEXTURE_H__
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
#ifdef HAVE_GLX_TEXTURE_PIXMAP
|
#ifdef HAVE_GLX_TEXTURE_PIXMAP
|
||||||
#include <clutter/glx/clutter-glx.h>
|
#include <clutter/glx/clutter-glx.h>
|
||||||
#endif /* HAVE_GLX_TEXTURE_PIXMAP */
|
#endif /* HAVE_GLX_TEXTURE_PIXMAP */
|
||||||
|
|
||||||
#include <gdk/gdkregion.h>
|
#include "region.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@@ -94,7 +96,7 @@ void mutter_shaped_texture_add_rectangles (MutterShapedTexture *stex,
|
|||||||
|
|
||||||
/* Assumes ownership of clip_region */
|
/* Assumes ownership of clip_region */
|
||||||
void mutter_shaped_texture_set_clip_region (MutterShapedTexture *stex,
|
void mutter_shaped_texture_set_clip_region (MutterShapedTexture *stex,
|
||||||
GdkRegion *clip_region);
|
MetaRegion *clip_region);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@@ -1,10 +1,13 @@
|
|||||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#define _ISOC99_SOURCE /* for roundf */
|
#define _ISOC99_SOURCE /* for roundf */
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "mutter-window-private.h"
|
#include "mutter-window-private.h"
|
||||||
#include "mutter-window-group.h"
|
#include "mutter-window-group.h"
|
||||||
|
#include "region.h"
|
||||||
|
|
||||||
struct _MutterWindowGroupClass
|
struct _MutterWindowGroupClass
|
||||||
{
|
{
|
||||||
@@ -99,7 +102,7 @@ static void
|
|||||||
mutter_window_group_paint (ClutterActor *actor)
|
mutter_window_group_paint (ClutterActor *actor)
|
||||||
{
|
{
|
||||||
MutterWindowGroup *window_group = MUTTER_WINDOW_GROUP (actor);
|
MutterWindowGroup *window_group = MUTTER_WINDOW_GROUP (actor);
|
||||||
GdkRegion *visible_region;
|
MetaRegion *visible_region;
|
||||||
GdkRectangle screen_rect = { 0 };
|
GdkRectangle screen_rect = { 0 };
|
||||||
GList *children, *l;
|
GList *children, *l;
|
||||||
|
|
||||||
@@ -116,7 +119,7 @@ mutter_window_group_paint (ClutterActor *actor)
|
|||||||
* optimization, however.)
|
* optimization, however.)
|
||||||
*/
|
*/
|
||||||
meta_screen_get_size (window_group->screen, &screen_rect.width, &screen_rect.height);
|
meta_screen_get_size (window_group->screen, &screen_rect.width, &screen_rect.height);
|
||||||
visible_region = gdk_region_rectangle (&screen_rect);
|
visible_region = meta_region_new_from_rectangle (&screen_rect);
|
||||||
|
|
||||||
for (l = children; l; l = l->next)
|
for (l = children; l; l = l->next)
|
||||||
{
|
{
|
||||||
@@ -132,22 +135,22 @@ mutter_window_group_paint (ClutterActor *actor)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Temporarily move to the coordinate system of the actor */
|
/* Temporarily move to the coordinate system of the actor */
|
||||||
gdk_region_offset (visible_region, - x, - y);
|
meta_region_translate (visible_region, - x, - y);
|
||||||
|
|
||||||
mutter_window_set_visible_region (cw, visible_region);
|
mutter_window_set_visible_region (cw, visible_region);
|
||||||
|
|
||||||
if (clutter_actor_get_paint_opacity (CLUTTER_ACTOR (cw)) == 0xff)
|
if (clutter_actor_get_paint_opacity (CLUTTER_ACTOR (cw)) == 0xff)
|
||||||
{
|
{
|
||||||
GdkRegion *obscured_region = mutter_window_get_obscured_region (cw);
|
MetaRegion *obscured_region = mutter_window_get_obscured_region (cw);
|
||||||
if (obscured_region)
|
if (obscured_region)
|
||||||
gdk_region_subtract (visible_region, obscured_region);
|
meta_region_subtract (visible_region, obscured_region);
|
||||||
}
|
}
|
||||||
|
|
||||||
mutter_window_set_visible_region_beneath (cw, visible_region);
|
mutter_window_set_visible_region_beneath (cw, visible_region);
|
||||||
gdk_region_offset (visible_region, x, y);
|
meta_region_translate (visible_region, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
gdk_region_destroy (visible_region);
|
meta_region_destroy (visible_region);
|
||||||
|
|
||||||
CLUTTER_ACTOR_CLASS (mutter_window_group_parent_class)->paint (actor);
|
CLUTTER_ACTOR_CLASS (mutter_window_group_parent_class)->paint (actor);
|
||||||
|
|
||||||
|
@@ -3,9 +3,11 @@
|
|||||||
#ifndef MUTTER_WINDOW_PRIVATE_H
|
#ifndef MUTTER_WINDOW_PRIVATE_H
|
||||||
#define MUTTER_WINDOW_PRIVATE_H
|
#define MUTTER_WINDOW_PRIVATE_H
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <X11/extensions/Xdamage.h>
|
#include <X11/extensions/Xdamage.h>
|
||||||
#include <gdk/gdk.h>
|
|
||||||
#include "compositor-mutter.h"
|
#include "compositor-mutter.h"
|
||||||
|
#include "region.h"
|
||||||
|
|
||||||
MutterWindow *mutter_window_new (MetaWindow *window);
|
MutterWindow *mutter_window_new (MetaWindow *window);
|
||||||
|
|
||||||
@@ -37,12 +39,12 @@ void mutter_window_update_opacity (MutterWindow *cw);
|
|||||||
void mutter_window_mapped (MutterWindow *cw);
|
void mutter_window_mapped (MutterWindow *cw);
|
||||||
void mutter_window_unmapped (MutterWindow *cw);
|
void mutter_window_unmapped (MutterWindow *cw);
|
||||||
|
|
||||||
GdkRegion *mutter_window_get_obscured_region (MutterWindow *cw);
|
MetaRegion *mutter_window_get_obscured_region (MutterWindow *cw);
|
||||||
|
|
||||||
void mutter_window_set_visible_region (MutterWindow *cw,
|
void mutter_window_set_visible_region (MutterWindow *cw,
|
||||||
GdkRegion *visible_region);
|
MetaRegion *visible_region);
|
||||||
void mutter_window_set_visible_region_beneath (MutterWindow *cw,
|
void mutter_window_set_visible_region_beneath (MutterWindow *cw,
|
||||||
GdkRegion *beneath_region);
|
MetaRegion *beneath_region);
|
||||||
void mutter_window_reset_visible_regions (MutterWindow *cw);
|
void mutter_window_reset_visible_regions (MutterWindow *cw);
|
||||||
|
|
||||||
void mutter_window_effect_completed (MutterWindow *actor,
|
void mutter_window_effect_completed (MutterWindow *actor,
|
||||||
|
@@ -42,10 +42,10 @@ struct _MutterWindowPrivate
|
|||||||
gchar * desc;
|
gchar * desc;
|
||||||
|
|
||||||
/* If the window is shaped, a region that matches the shape */
|
/* If the window is shaped, a region that matches the shape */
|
||||||
GdkRegion *shape_region;
|
MetaRegion *shape_region;
|
||||||
/* A rectangular region with the unshaped extends of the window
|
/* A rectangular region with the unshaped extends of the window
|
||||||
* texture */
|
* texture */
|
||||||
GdkRegion *bounding_region;
|
MetaRegion *bounding_region;
|
||||||
|
|
||||||
gint freeze_count;
|
gint freeze_count;
|
||||||
|
|
||||||
@@ -68,6 +68,7 @@ struct _MutterWindowPrivate
|
|||||||
guint redecorating : 1;
|
guint redecorating : 1;
|
||||||
|
|
||||||
guint needs_damage_all : 1;
|
guint needs_damage_all : 1;
|
||||||
|
guint received_damage : 1;
|
||||||
|
|
||||||
guint needs_pixmap : 1;
|
guint needs_pixmap : 1;
|
||||||
guint needs_reshape : 1;
|
guint needs_reshape : 1;
|
||||||
@@ -337,7 +338,7 @@ mutter_window_constructed (GObject *object)
|
|||||||
priv->damage = None;
|
priv->damage = None;
|
||||||
else
|
else
|
||||||
priv->damage = XDamageCreate (xdisplay, xwindow,
|
priv->damage = XDamageCreate (xdisplay, xwindow,
|
||||||
XDamageReportRawRectangles);
|
XDamageReportBoundingBox);
|
||||||
|
|
||||||
format = XRenderFindVisualFormat (xdisplay, priv->attrs.visual);
|
format = XRenderFindVisualFormat (xdisplay, priv->attrs.visual);
|
||||||
|
|
||||||
@@ -1349,7 +1350,7 @@ mutter_window_clear_shape_region (MutterWindow *self)
|
|||||||
|
|
||||||
if (priv->shape_region)
|
if (priv->shape_region)
|
||||||
{
|
{
|
||||||
gdk_region_destroy (priv->shape_region);
|
meta_region_destroy (priv->shape_region);
|
||||||
priv->shape_region = NULL;
|
priv->shape_region = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1361,7 +1362,7 @@ mutter_window_clear_bounding_region (MutterWindow *self)
|
|||||||
|
|
||||||
if (priv->bounding_region)
|
if (priv->bounding_region)
|
||||||
{
|
{
|
||||||
gdk_region_destroy (priv->bounding_region);
|
meta_region_destroy (priv->bounding_region);
|
||||||
priv->bounding_region = NULL;
|
priv->bounding_region = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1376,7 +1377,7 @@ mutter_window_update_bounding_region (MutterWindow *self,
|
|||||||
|
|
||||||
mutter_window_clear_bounding_region (self);
|
mutter_window_clear_bounding_region (self);
|
||||||
|
|
||||||
priv->bounding_region = gdk_region_rectangle (&bounding_rectangle);
|
priv->bounding_region = meta_region_new_from_rectangle (&bounding_rectangle);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1389,11 +1390,11 @@ mutter_window_update_shape_region (MutterWindow *self,
|
|||||||
|
|
||||||
mutter_window_clear_shape_region (self);
|
mutter_window_clear_shape_region (self);
|
||||||
|
|
||||||
priv->shape_region = gdk_region_new ();
|
priv->shape_region = meta_region_new ();
|
||||||
for (i = 0; i < n_rects; i++)
|
for (i = 0; i < n_rects; i++)
|
||||||
{
|
{
|
||||||
GdkRectangle rect = { rects[i].x, rects[i].y, rects[i].width, rects[i].height };
|
GdkRectangle rect = { rects[i].x, rects[i].y, rects[i].width, rects[i].height };
|
||||||
gdk_region_union_with_rect (priv->shape_region, &rect);
|
meta_region_union_rectangle (priv->shape_region, &rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1407,7 +1408,7 @@ mutter_window_update_shape_region (MutterWindow *self,
|
|||||||
* Return value: (transfer none): the area obscured by the window,
|
* Return value: (transfer none): the area obscured by the window,
|
||||||
* %NULL is the same as an empty region.
|
* %NULL is the same as an empty region.
|
||||||
*/
|
*/
|
||||||
GdkRegion *
|
MetaRegion *
|
||||||
mutter_window_get_obscured_region (MutterWindow *self)
|
mutter_window_get_obscured_region (MutterWindow *self)
|
||||||
{
|
{
|
||||||
MutterWindowPrivate *priv = self->priv;
|
MutterWindowPrivate *priv = self->priv;
|
||||||
@@ -1426,13 +1427,13 @@ mutter_window_get_obscured_region (MutterWindow *self)
|
|||||||
#if 0
|
#if 0
|
||||||
/* Print out a region; useful for debugging */
|
/* Print out a region; useful for debugging */
|
||||||
static void
|
static void
|
||||||
dump_region (GdkRegion *region)
|
dump_region (MetaRegion *region)
|
||||||
{
|
{
|
||||||
GdkRectangle *rects;
|
GdkRectangle *rects;
|
||||||
int n_rects;
|
int n_rects;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
gdk_region_get_rectangles (region, &rects, &n_rects);
|
meta_region_get_rectangles (region, &rects, &n_rects);
|
||||||
g_print ("[");
|
g_print ("[");
|
||||||
for (i = 0; i < n_rects; i++)
|
for (i = 0; i < n_rects; i++)
|
||||||
{
|
{
|
||||||
@@ -1456,10 +1457,10 @@ dump_region (GdkRegion *region)
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
mutter_window_set_visible_region (MutterWindow *self,
|
mutter_window_set_visible_region (MutterWindow *self,
|
||||||
GdkRegion *visible_region)
|
MetaRegion *visible_region)
|
||||||
{
|
{
|
||||||
MutterWindowPrivate *priv = self->priv;
|
MutterWindowPrivate *priv = self->priv;
|
||||||
GdkRegion *texture_clip_region = NULL;
|
MetaRegion *texture_clip_region = NULL;
|
||||||
|
|
||||||
/* Get the area of the window texture that would be drawn if
|
/* Get the area of the window texture that would be drawn if
|
||||||
* we weren't obscured at all
|
* we weren't obscured at all
|
||||||
@@ -1467,21 +1468,21 @@ mutter_window_set_visible_region (MutterWindow *self,
|
|||||||
if (priv->shaped)
|
if (priv->shaped)
|
||||||
{
|
{
|
||||||
if (priv->shape_region)
|
if (priv->shape_region)
|
||||||
texture_clip_region = gdk_region_copy (priv->shape_region);
|
texture_clip_region = meta_region_copy (priv->shape_region);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (priv->bounding_region)
|
if (priv->bounding_region)
|
||||||
texture_clip_region = gdk_region_copy (priv->bounding_region);
|
texture_clip_region = meta_region_copy (priv->bounding_region);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!texture_clip_region)
|
if (!texture_clip_region)
|
||||||
texture_clip_region = gdk_region_new ();
|
texture_clip_region = meta_region_new ();
|
||||||
|
|
||||||
/* Then intersect that with the visible region to get the region
|
/* Then intersect that with the visible region to get the region
|
||||||
* that we actually need to redraw.
|
* that we actually need to redraw.
|
||||||
*/
|
*/
|
||||||
gdk_region_intersect (texture_clip_region, visible_region);
|
meta_region_intersect (texture_clip_region, visible_region);
|
||||||
|
|
||||||
/* Assumes ownership */
|
/* Assumes ownership */
|
||||||
mutter_shaped_texture_set_clip_region (MUTTER_SHAPED_TEXTURE (priv->actor),
|
mutter_shaped_texture_set_clip_region (MUTTER_SHAPED_TEXTURE (priv->actor),
|
||||||
@@ -1502,7 +1503,7 @@ mutter_window_set_visible_region (MutterWindow *self,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
mutter_window_set_visible_region_beneath (MutterWindow *self,
|
mutter_window_set_visible_region_beneath (MutterWindow *self,
|
||||||
GdkRegion *beneath_region)
|
MetaRegion *beneath_region)
|
||||||
{
|
{
|
||||||
MutterWindowPrivate *priv = self->priv;
|
MutterWindowPrivate *priv = self->priv;
|
||||||
|
|
||||||
@@ -1510,7 +1511,7 @@ mutter_window_set_visible_region_beneath (MutterWindow *self,
|
|||||||
{
|
{
|
||||||
GdkRectangle shadow_rect;
|
GdkRectangle shadow_rect;
|
||||||
ClutterActorBox box;
|
ClutterActorBox box;
|
||||||
GdkOverlapType overlap;
|
MetaOverlapType overlap;
|
||||||
|
|
||||||
/* We could compute an full clip region as we do for the window
|
/* We could compute an full clip region as we do for the window
|
||||||
* texture, but the shadow is relatively cheap to draw, and
|
* texture, but the shadow is relatively cheap to draw, and
|
||||||
@@ -1525,10 +1526,10 @@ mutter_window_set_visible_region_beneath (MutterWindow *self,
|
|||||||
shadow_rect.width = roundf (box.x2 - box.x1);
|
shadow_rect.width = roundf (box.x2 - box.x1);
|
||||||
shadow_rect.height = roundf (box.y2 - box.y1);
|
shadow_rect.height = roundf (box.y2 - box.y1);
|
||||||
|
|
||||||
overlap = gdk_region_rect_in (beneath_region, &shadow_rect);
|
overlap = meta_region_contains_rectangle (beneath_region, &shadow_rect);
|
||||||
|
|
||||||
tidy_texture_frame_set_needs_paint (TIDY_TEXTURE_FRAME (priv->shadow),
|
tidy_texture_frame_set_needs_paint (TIDY_TEXTURE_FRAME (priv->shadow),
|
||||||
overlap != GDK_OVERLAP_RECTANGLE_OUT);
|
overlap != META_REGION_OVERLAP_OUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1652,6 +1653,8 @@ mutter_window_process_damage (MutterWindow *self,
|
|||||||
MutterWindowPrivate *priv = self->priv;
|
MutterWindowPrivate *priv = self->priv;
|
||||||
ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor);
|
ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor);
|
||||||
|
|
||||||
|
priv->received_damage = TRUE;
|
||||||
|
|
||||||
if (is_frozen (self))
|
if (is_frozen (self))
|
||||||
{
|
{
|
||||||
/* The window is frozen due to an effect in progress: we ignore damage
|
/* The window is frozen due to an effect in progress: we ignore damage
|
||||||
@@ -1748,6 +1751,11 @@ mutter_window_update_shape (MutterWindow *self,
|
|||||||
void
|
void
|
||||||
mutter_window_pre_paint (MutterWindow *self)
|
mutter_window_pre_paint (MutterWindow *self)
|
||||||
{
|
{
|
||||||
|
MutterWindowPrivate *priv = self->priv;
|
||||||
|
MetaScreen *screen = priv->screen;
|
||||||
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
|
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||||
|
|
||||||
if (is_frozen (self))
|
if (is_frozen (self))
|
||||||
{
|
{
|
||||||
/* The window is frozen due to a pending animation: we'll wait until
|
/* The window is frozen due to a pending animation: we'll wait until
|
||||||
@@ -1755,6 +1763,12 @@ mutter_window_pre_paint (MutterWindow *self)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (priv->received_damage)
|
||||||
|
{
|
||||||
|
XDamageSubtract (xdisplay, priv->damage, None, None);
|
||||||
|
priv->received_damage = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
check_needs_reshape (self);
|
check_needs_reshape (self);
|
||||||
check_needs_pixmap (self);
|
check_needs_pixmap (self);
|
||||||
}
|
}
|
||||||
|
@@ -81,11 +81,12 @@ static void unmaximize (MutterPlugin *plugin,
|
|||||||
gint x, gint y, gint width, gint height);
|
gint x, gint y, gint width, gint height);
|
||||||
|
|
||||||
static void switch_workspace (MutterPlugin *plugin,
|
static void switch_workspace (MutterPlugin *plugin,
|
||||||
const GList **actors, gint from, gint to,
|
gint from, gint to,
|
||||||
MetaMotionDirection direction);
|
MetaMotionDirection direction);
|
||||||
|
|
||||||
static void kill_effect (MutterPlugin *plugin,
|
static void kill_window_effects (MutterPlugin *plugin,
|
||||||
MutterWindow *actor, gulong event);
|
MutterWindow *actor);
|
||||||
|
static void kill_switch_workspace (MutterPlugin *plugin);
|
||||||
|
|
||||||
static const MutterPluginInfo * plugin_info (MutterPlugin *plugin);
|
static const MutterPluginInfo * plugin_info (MutterPlugin *plugin);
|
||||||
|
|
||||||
@@ -99,7 +100,6 @@ struct _MutterDefaultPluginPrivate
|
|||||||
/* Valid only when switch_workspace effect is in progress */
|
/* Valid only when switch_workspace effect is in progress */
|
||||||
ClutterTimeline *tml_switch_workspace1;
|
ClutterTimeline *tml_switch_workspace1;
|
||||||
ClutterTimeline *tml_switch_workspace2;
|
ClutterTimeline *tml_switch_workspace2;
|
||||||
GList **actors;
|
|
||||||
ClutterActor *desktop1;
|
ClutterActor *desktop1;
|
||||||
ClutterActor *desktop2;
|
ClutterActor *desktop2;
|
||||||
|
|
||||||
@@ -220,8 +220,9 @@ mutter_default_plugin_class_init (MutterDefaultPluginClass *klass)
|
|||||||
plugin_class->unmaximize = unmaximize;
|
plugin_class->unmaximize = unmaximize;
|
||||||
plugin_class->destroy = destroy;
|
plugin_class->destroy = destroy;
|
||||||
plugin_class->switch_workspace = switch_workspace;
|
plugin_class->switch_workspace = switch_workspace;
|
||||||
plugin_class->kill_effect = kill_effect;
|
|
||||||
plugin_class->plugin_info = plugin_info;
|
plugin_class->plugin_info = plugin_info;
|
||||||
|
plugin_class->kill_window_effects = kill_window_effects;
|
||||||
|
plugin_class->kill_switch_workspace = kill_switch_workspace;
|
||||||
|
|
||||||
g_type_class_add_private (gobject_class, sizeof (MutterDefaultPluginPrivate));
|
g_type_class_add_private (gobject_class, sizeof (MutterDefaultPluginPrivate));
|
||||||
}
|
}
|
||||||
@@ -270,20 +271,12 @@ get_actor_private (MutterWindow *actor)
|
|||||||
return priv;
|
return priv;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct SwitchWorkspaceData
|
|
||||||
{
|
|
||||||
MutterPlugin *plugin;
|
|
||||||
const GList **actors;
|
|
||||||
} SwitchWorkspaceData;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
|
on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
|
||||||
{
|
{
|
||||||
SwitchWorkspaceData *sw_data = data;
|
MutterPlugin *plugin = MUTTER_PLUGIN (data);
|
||||||
MutterPlugin *plugin = sw_data->plugin;
|
|
||||||
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
GList *l = *((GList**)sw_data->actors);
|
GList *l = mutter_plugin_get_windows (plugin);
|
||||||
MutterWindow *actor_for_cb = l->data;
|
|
||||||
|
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
@@ -303,21 +296,17 @@ on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
|
|||||||
clutter_actor_destroy (priv->desktop1);
|
clutter_actor_destroy (priv->desktop1);
|
||||||
clutter_actor_destroy (priv->desktop2);
|
clutter_actor_destroy (priv->desktop2);
|
||||||
|
|
||||||
priv->actors = NULL;
|
|
||||||
priv->tml_switch_workspace1 = NULL;
|
priv->tml_switch_workspace1 = NULL;
|
||||||
priv->tml_switch_workspace2 = NULL;
|
priv->tml_switch_workspace2 = NULL;
|
||||||
priv->desktop1 = NULL;
|
priv->desktop1 = NULL;
|
||||||
priv->desktop2 = NULL;
|
priv->desktop2 = NULL;
|
||||||
|
|
||||||
g_free (data);
|
mutter_plugin_switch_workspace_completed (plugin);
|
||||||
|
|
||||||
mutter_plugin_effect_completed (plugin, actor_for_cb,
|
|
||||||
MUTTER_PLUGIN_SWITCH_WORKSPACE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
switch_workspace (MutterPlugin *plugin,
|
switch_workspace (MutterPlugin *plugin,
|
||||||
const GList **actors, gint from, gint to,
|
gint from, gint to,
|
||||||
MetaMotionDirection direction)
|
MetaMotionDirection direction)
|
||||||
{
|
{
|
||||||
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
@@ -328,12 +317,8 @@ switch_workspace (MutterPlugin *plugin,
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
int screen_width, screen_height;
|
int screen_width, screen_height;
|
||||||
MetaScreen *screen = mutter_plugin_get_screen (plugin);
|
MetaScreen *screen = mutter_plugin_get_screen (plugin);
|
||||||
SwitchWorkspaceData *sw_data = g_new (SwitchWorkspaceData, 1);
|
|
||||||
ClutterAnimation *animation;
|
ClutterAnimation *animation;
|
||||||
|
|
||||||
sw_data->plugin = plugin;
|
|
||||||
sw_data->actors = actors;
|
|
||||||
|
|
||||||
stage = mutter_plugin_get_stage (plugin);
|
stage = mutter_plugin_get_stage (plugin);
|
||||||
|
|
||||||
mutter_plugin_query_screen_size (plugin,
|
mutter_plugin_query_screen_size (plugin,
|
||||||
@@ -353,14 +338,13 @@ switch_workspace (MutterPlugin *plugin,
|
|||||||
|
|
||||||
if (from == to)
|
if (from == to)
|
||||||
{
|
{
|
||||||
mutter_plugin_effect_completed (plugin, NULL,
|
mutter_plugin_switch_workspace_completed (plugin);
|
||||||
MUTTER_PLUGIN_SWITCH_WORKSPACE);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
n_workspaces = meta_screen_get_n_workspaces (screen);
|
n_workspaces = meta_screen_get_n_workspaces (screen);
|
||||||
|
|
||||||
l = g_list_last (*((GList**) actors));
|
l = g_list_last (mutter_plugin_get_windows (plugin));
|
||||||
|
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
@@ -395,7 +379,6 @@ switch_workspace (MutterPlugin *plugin,
|
|||||||
l = l->prev;
|
l = l->prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->actors = (GList **)actors;
|
|
||||||
priv->desktop1 = workspace0;
|
priv->desktop1 = workspace0;
|
||||||
priv->desktop2 = workspace1;
|
priv->desktop2 = workspace1;
|
||||||
|
|
||||||
@@ -408,7 +391,7 @@ switch_workspace (MutterPlugin *plugin,
|
|||||||
g_signal_connect (priv->tml_switch_workspace1,
|
g_signal_connect (priv->tml_switch_workspace1,
|
||||||
"completed",
|
"completed",
|
||||||
G_CALLBACK (on_switch_workspace_effect_complete),
|
G_CALLBACK (on_switch_workspace_effect_complete),
|
||||||
sw_data);
|
plugin);
|
||||||
|
|
||||||
animation = clutter_actor_animate (workspace1, CLUTTER_EASE_IN_SINE,
|
animation = clutter_actor_animate (workspace1, CLUTTER_EASE_IN_SINE,
|
||||||
SWITCH_TIMEOUT,
|
SWITCH_TIMEOUT,
|
||||||
@@ -446,8 +429,7 @@ on_minimize_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data
|
|||||||
CLUTTER_GRAVITY_NORTH_WEST);
|
CLUTTER_GRAVITY_NORTH_WEST);
|
||||||
|
|
||||||
/* Now notify the manager that we are done with this effect */
|
/* Now notify the manager that we are done with this effect */
|
||||||
mutter_plugin_effect_completed (plugin, mc_window,
|
mutter_plugin_minimize_completed (plugin, mc_window);
|
||||||
MUTTER_PLUGIN_MINIMIZE);
|
|
||||||
|
|
||||||
g_free (data);
|
g_free (data);
|
||||||
}
|
}
|
||||||
@@ -490,8 +472,7 @@ minimize (MutterPlugin *plugin, MutterWindow *mc_window)
|
|||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mutter_plugin_effect_completed (plugin, mc_window,
|
mutter_plugin_minimize_completed (plugin, mc_window);
|
||||||
MUTTER_PLUGIN_MINIMIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -516,8 +497,7 @@ on_maximize_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data
|
|||||||
CLUTTER_GRAVITY_NORTH_WEST);
|
CLUTTER_GRAVITY_NORTH_WEST);
|
||||||
|
|
||||||
/* Now notify the manager that we are done with this effect */
|
/* Now notify the manager that we are done with this effect */
|
||||||
mutter_plugin_effect_completed (plugin, mc_window,
|
mutter_plugin_maximize_completed (plugin, mc_window);
|
||||||
MUTTER_PLUGIN_MAXIMIZE);
|
|
||||||
|
|
||||||
g_free (data);
|
g_free (data);
|
||||||
}
|
}
|
||||||
@@ -587,8 +567,7 @@ maximize (MutterPlugin *plugin,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutter_plugin_effect_completed (plugin, mc_window,
|
mutter_plugin_maximize_completed (plugin, mc_window);
|
||||||
MUTTER_PLUGIN_MAXIMIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -611,8 +590,7 @@ unmaximize (MutterPlugin *plugin,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Do this conditionally, if the effect requires completion callback. */
|
/* Do this conditionally, if the effect requires completion callback. */
|
||||||
mutter_plugin_effect_completed (plugin, mc_window,
|
mutter_plugin_unmaximize_completed (plugin, mc_window);
|
||||||
MUTTER_PLUGIN_UNMAXIMIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -631,7 +609,7 @@ on_map_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data)
|
|||||||
CLUTTER_GRAVITY_NORTH_WEST);
|
CLUTTER_GRAVITY_NORTH_WEST);
|
||||||
|
|
||||||
/* Now notify the manager that we are done with this effect */
|
/* Now notify the manager that we are done with this effect */
|
||||||
mutter_plugin_effect_completed (plugin, mc_window, MUTTER_PLUGIN_MAP);
|
mutter_plugin_map_completed (plugin, mc_window);
|
||||||
|
|
||||||
g_free (data);
|
g_free (data);
|
||||||
}
|
}
|
||||||
@@ -677,8 +655,7 @@ map (MutterPlugin *plugin, MutterWindow *mc_window)
|
|||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mutter_plugin_effect_completed (plugin, mc_window,
|
mutter_plugin_map_completed (plugin, mc_window);
|
||||||
MUTTER_PLUGIN_MAP);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -694,8 +671,7 @@ on_destroy_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data)
|
|||||||
|
|
||||||
apriv->tml_destroy = NULL;
|
apriv->tml_destroy = NULL;
|
||||||
|
|
||||||
mutter_plugin_effect_completed (plugin, mc_window,
|
mutter_plugin_destroy_completed (plugin, mc_window);
|
||||||
MUTTER_PLUGIN_DESTROY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -732,54 +708,48 @@ destroy (MutterPlugin *plugin, MutterWindow *mc_window)
|
|||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mutter_plugin_effect_completed (plugin, mc_window,
|
mutter_plugin_destroy_completed (plugin, mc_window);
|
||||||
MUTTER_PLUGIN_DESTROY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
kill_effect (MutterPlugin *plugin, MutterWindow *mc_window, gulong event)
|
kill_switch_workspace (MutterPlugin *plugin)
|
||||||
|
{
|
||||||
|
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
|
if (priv->tml_switch_workspace1)
|
||||||
|
{
|
||||||
|
clutter_timeline_stop (priv->tml_switch_workspace1);
|
||||||
|
clutter_timeline_stop (priv->tml_switch_workspace2);
|
||||||
|
g_signal_emit_by_name (priv->tml_switch_workspace1, "completed", NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
kill_window_effects (MutterPlugin *plugin, MutterWindow *mc_window)
|
||||||
{
|
{
|
||||||
ActorPrivate *apriv;
|
ActorPrivate *apriv;
|
||||||
|
|
||||||
if (event & MUTTER_PLUGIN_SWITCH_WORKSPACE)
|
|
||||||
{
|
|
||||||
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
|
|
||||||
|
|
||||||
if (priv->tml_switch_workspace1)
|
|
||||||
{
|
|
||||||
clutter_timeline_stop (priv->tml_switch_workspace1);
|
|
||||||
clutter_timeline_stop (priv->tml_switch_workspace2);
|
|
||||||
g_signal_emit_by_name (priv->tml_switch_workspace1, "completed", NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(event & ~MUTTER_PLUGIN_SWITCH_WORKSPACE))
|
|
||||||
{
|
|
||||||
/* Workspace switch only, nothing more to do */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apriv = get_actor_private (mc_window);
|
apriv = get_actor_private (mc_window);
|
||||||
|
|
||||||
if ((event & MUTTER_PLUGIN_MINIMIZE) && apriv->tml_minimize)
|
if (apriv->tml_minimize)
|
||||||
{
|
{
|
||||||
clutter_timeline_stop (apriv->tml_minimize);
|
clutter_timeline_stop (apriv->tml_minimize);
|
||||||
g_signal_emit_by_name (apriv->tml_minimize, "completed", NULL);
|
g_signal_emit_by_name (apriv->tml_minimize, "completed", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((event & MUTTER_PLUGIN_MAXIMIZE) && apriv->tml_maximize)
|
if (apriv->tml_maximize)
|
||||||
{
|
{
|
||||||
clutter_timeline_stop (apriv->tml_maximize);
|
clutter_timeline_stop (apriv->tml_maximize);
|
||||||
g_signal_emit_by_name (apriv->tml_maximize, "completed", NULL);
|
g_signal_emit_by_name (apriv->tml_maximize, "completed", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((event & MUTTER_PLUGIN_MAP) && apriv->tml_map)
|
if (apriv->tml_map)
|
||||||
{
|
{
|
||||||
clutter_timeline_stop (apriv->tml_map);
|
clutter_timeline_stop (apriv->tml_map);
|
||||||
g_signal_emit_by_name (apriv->tml_map, "completed", NULL);
|
g_signal_emit_by_name (apriv->tml_map, "completed", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((event & MUTTER_PLUGIN_DESTROY) && apriv->tml_destroy)
|
if (apriv->tml_destroy)
|
||||||
{
|
{
|
||||||
clutter_timeline_stop (apriv->tml_destroy);
|
clutter_timeline_stop (apriv->tml_destroy);
|
||||||
g_signal_emit_by_name (apriv->tml_destroy, "completed", NULL);
|
g_signal_emit_by_name (apriv->tml_destroy, "completed", NULL);
|
||||||
|
@@ -30,6 +30,35 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include <X11/Xutil.h> /* Just for the definition of the various gravities */
|
#include <X11/Xutil.h> /* Just for the definition of the various gravities */
|
||||||
|
|
||||||
|
/* It would make sense to use GSlice here, but until we clean up the
|
||||||
|
* rest of this file and the internal API to use these functions, we
|
||||||
|
* leave it using g_malloc()/g_free() for consistency.
|
||||||
|
*/
|
||||||
|
|
||||||
|
MetaRectangle *
|
||||||
|
meta_rectangle_copy (const MetaRectangle *rect)
|
||||||
|
{
|
||||||
|
return g_memdup (rect, sizeof (MetaRectangle));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_rectangle_free (MetaRectangle *rect)
|
||||||
|
{
|
||||||
|
g_free (rect);
|
||||||
|
}
|
||||||
|
|
||||||
|
GType
|
||||||
|
meta_rectangle_get_type (void)
|
||||||
|
{
|
||||||
|
static GType type_id = 0;
|
||||||
|
|
||||||
|
if (!type_id)
|
||||||
|
type_id = g_boxed_type_register_static (g_intern_static_string ("MetaRectangle"),
|
||||||
|
(GBoxedCopyFunc) meta_rectangle_copy,
|
||||||
|
(GBoxedFreeFunc) meta_rectangle_free);
|
||||||
|
return type_id;
|
||||||
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
meta_rectangle_to_string (const MetaRectangle *rect,
|
meta_rectangle_to_string (const MetaRectangle *rect,
|
||||||
char *output)
|
char *output)
|
||||||
|
@@ -22,8 +22,7 @@
|
|||||||
* 02111-1307, USA.
|
* 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#define _XOPEN_SOURCE /* for kill() */
|
||||||
#define _SVID_SOURCE /* for gethostname() */
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
@@ -179,36 +178,23 @@ meta_window_delete (MetaWindow *window,
|
|||||||
void
|
void
|
||||||
meta_window_kill (MetaWindow *window)
|
meta_window_kill (MetaWindow *window)
|
||||||
{
|
{
|
||||||
char buf[257];
|
|
||||||
|
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
"Killing %s brutally\n",
|
"Killing %s brutally\n",
|
||||||
window->desc);
|
window->desc);
|
||||||
|
|
||||||
if (window->wm_client_machine != NULL &&
|
if (!meta_window_is_remote (window) &&
|
||||||
window->net_wm_pid > 0)
|
window->net_wm_pid > 0)
|
||||||
{
|
{
|
||||||
if (gethostname (buf, sizeof(buf)-1) == 0)
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
{
|
"Killing %s with kill()\n",
|
||||||
if (strcmp (buf, window->wm_client_machine) == 0)
|
window->desc);
|
||||||
{
|
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
|
||||||
"Killing %s with kill()\n",
|
|
||||||
window->desc);
|
|
||||||
|
|
||||||
if (kill (window->net_wm_pid, 9) < 0)
|
if (kill (window->net_wm_pid, 9) < 0)
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
"Failed to signal %s: %s\n",
|
"Failed to signal %s: %s\n",
|
||||||
window->desc, strerror (errno));
|
window->desc, strerror (errno));
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
meta_warning (_("Failed to get hostname: %s\n"),
|
|
||||||
strerror (errno));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
"Disconnecting %s with XKillClient()\n",
|
"Disconnecting %s with XKillClient()\n",
|
||||||
window->desc);
|
window->desc);
|
||||||
|
@@ -83,10 +83,11 @@ struct _MetaDisplay
|
|||||||
|
|
||||||
char *name;
|
char *name;
|
||||||
Display *xdisplay;
|
Display *xdisplay;
|
||||||
|
char *hostname;
|
||||||
|
|
||||||
Window leader_window;
|
Window leader_window;
|
||||||
Window timestamp_pinging_window;
|
Window timestamp_pinging_window;
|
||||||
|
|
||||||
/* Pull in all the names of atoms as fields; we will intern them when the
|
/* Pull in all the names of atoms as fields; we will intern them when the
|
||||||
* class is constructed.
|
* class is constructed.
|
||||||
*/
|
*/
|
||||||
|
@@ -30,6 +30,8 @@
|
|||||||
* The display is represented as a MetaDisplay struct.
|
* The display is represented as a MetaDisplay struct.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define _XOPEN_SOURCE 600 /* for gethostname() */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include "display-private.h"
|
#include "display-private.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
@@ -72,6 +74,7 @@
|
|||||||
#include <X11/extensions/Xdamage.h>
|
#include <X11/extensions/Xdamage.h>
|
||||||
#include <X11/extensions/Xfixes.h>
|
#include <X11/extensions/Xfixes.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#define GRAB_OP_IS_WINDOW_SWITCH(g) \
|
#define GRAB_OP_IS_WINDOW_SWITCH(g) \
|
||||||
(g == META_GRAB_OP_KEYBOARD_TABBING_NORMAL || \
|
(g == META_GRAB_OP_KEYBOARD_TABBING_NORMAL || \
|
||||||
@@ -429,6 +432,7 @@ meta_display_open (void)
|
|||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
int i;
|
int i;
|
||||||
guint32 timestamp;
|
guint32 timestamp;
|
||||||
|
char buf[257];
|
||||||
|
|
||||||
/* A list of all atom names, so that we can intern them in one go. */
|
/* A list of all atom names, so that we can intern them in one go. */
|
||||||
char *atom_names[] = {
|
char *atom_names[] = {
|
||||||
@@ -463,6 +467,11 @@ meta_display_open (void)
|
|||||||
*/
|
*/
|
||||||
the_display->name = g_strdup (XDisplayName (NULL));
|
the_display->name = g_strdup (XDisplayName (NULL));
|
||||||
the_display->xdisplay = xdisplay;
|
the_display->xdisplay = xdisplay;
|
||||||
|
if (gethostname (buf, sizeof(buf)-1) == 0)
|
||||||
|
{
|
||||||
|
buf[sizeof(buf)-1] = '\0';
|
||||||
|
the_display->hostname = g_strdup (buf);
|
||||||
|
}
|
||||||
the_display->error_trap_synced_at_last_pop = TRUE;
|
the_display->error_trap_synced_at_last_pop = TRUE;
|
||||||
the_display->error_traps = 0;
|
the_display->error_traps = 0;
|
||||||
the_display->error_trap_handler = NULL;
|
the_display->error_trap_handler = NULL;
|
||||||
|
129
src/core/util.c
129
src/core/util.c
@@ -40,6 +40,13 @@
|
|||||||
#include <X11/Xlib.h> /* must explicitly be included for Solaris; #326746 */
|
#include <X11/Xlib.h> /* must explicitly be included for Solaris; #326746 */
|
||||||
#include <X11/Xutil.h> /* Just for the definition of the various gravities */
|
#include <X11/Xutil.h> /* Just for the definition of the various gravities */
|
||||||
|
|
||||||
|
#ifdef WITH_VERBOSE_MODE
|
||||||
|
static void
|
||||||
|
meta_topic_real_valist (MetaDebugTopic topic,
|
||||||
|
const char *format,
|
||||||
|
va_list args);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_BACKTRACE
|
#ifdef HAVE_BACKTRACE
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
void
|
void
|
||||||
@@ -71,7 +78,7 @@ meta_print_backtrace (void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static gboolean is_verbose = FALSE;
|
static gint verbose_topics = 0;
|
||||||
static gboolean is_debugging = FALSE;
|
static gboolean is_debugging = FALSE;
|
||||||
static gboolean replace_current = FALSE;
|
static gboolean replace_current = FALSE;
|
||||||
static int no_prefix = 0;
|
static int no_prefix = 0;
|
||||||
@@ -128,7 +135,7 @@ ensure_logfile (void)
|
|||||||
gboolean
|
gboolean
|
||||||
meta_is_verbose (void)
|
meta_is_verbose (void)
|
||||||
{
|
{
|
||||||
return is_verbose;
|
return verbose_topics != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -141,8 +148,48 @@ meta_set_verbose (gboolean setting)
|
|||||||
if (setting)
|
if (setting)
|
||||||
ensure_logfile ();
|
ensure_logfile ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
is_verbose = setting;
|
if (setting)
|
||||||
|
meta_add_verbose_topic (META_DEBUG_VERBOSE);
|
||||||
|
else
|
||||||
|
meta_remove_verbose_topic (META_DEBUG_VERBOSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* meta_add_verbose_topic:
|
||||||
|
* @topic: Topic for which logging will be started
|
||||||
|
*
|
||||||
|
* Ensure log messages for the given topic @topic
|
||||||
|
* will be printed.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
meta_add_verbose_topic (MetaDebugTopic topic)
|
||||||
|
{
|
||||||
|
if (verbose_topics == META_DEBUG_VERBOSE)
|
||||||
|
return;
|
||||||
|
if (topic == META_DEBUG_VERBOSE)
|
||||||
|
verbose_topics = META_DEBUG_VERBOSE;
|
||||||
|
else
|
||||||
|
verbose_topics |= topic;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* meta_remove_verbose_topic:
|
||||||
|
* @topic: Topic for which logging will be stopped
|
||||||
|
*
|
||||||
|
* Stop printing log messages for the given topic @topic. Note
|
||||||
|
* that this method does not stack with meta_add_verbose_topic();
|
||||||
|
* i.e. if two calls to meta_add_verbose_topic() for the same
|
||||||
|
* topic are made, one call to meta_remove_verbose_topic() will
|
||||||
|
* remove it.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
meta_remove_verbose_topic (MetaDebugTopic topic)
|
||||||
|
{
|
||||||
|
if (topic == META_DEBUG_VERBOSE)
|
||||||
|
verbose_topics = 0;
|
||||||
|
else
|
||||||
|
verbose_topics &= ~topic;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@@ -250,27 +297,10 @@ void
|
|||||||
meta_verbose_real (const char *format, ...)
|
meta_verbose_real (const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
gchar *str;
|
|
||||||
FILE *out;
|
|
||||||
|
|
||||||
g_return_if_fail (format != NULL);
|
|
||||||
|
|
||||||
if (!is_verbose)
|
|
||||||
return;
|
|
||||||
|
|
||||||
va_start (args, format);
|
va_start (args, format);
|
||||||
str = g_strdup_vprintf (format, args);
|
meta_topic_real_valist (META_DEBUG_VERBOSE, format, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
out = logfile ? logfile : stderr;
|
|
||||||
|
|
||||||
if (no_prefix == 0)
|
|
||||||
utf8_fputs ("Window manager: ", out);
|
|
||||||
utf8_fputs (str, out);
|
|
||||||
|
|
||||||
fflush (out);
|
|
||||||
|
|
||||||
g_free (str);
|
|
||||||
}
|
}
|
||||||
#endif /* WITH_VERBOSE_MODE */
|
#endif /* WITH_VERBOSE_MODE */
|
||||||
|
|
||||||
@@ -324,6 +354,8 @@ topic_name (MetaDebugTopic topic)
|
|||||||
return "COMPOSITOR";
|
return "COMPOSITOR";
|
||||||
case META_DEBUG_EDGE_RESISTANCE:
|
case META_DEBUG_EDGE_RESISTANCE:
|
||||||
return "EDGE_RESISTANCE";
|
return "EDGE_RESISTANCE";
|
||||||
|
case META_DEBUG_VERBOSE:
|
||||||
|
return "VERBOSE";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "WM";
|
return "WM";
|
||||||
@@ -331,23 +363,22 @@ topic_name (MetaDebugTopic topic)
|
|||||||
|
|
||||||
static int sync_count = 0;
|
static int sync_count = 0;
|
||||||
|
|
||||||
void
|
static void
|
||||||
meta_topic_real (MetaDebugTopic topic,
|
meta_topic_real_valist (MetaDebugTopic topic,
|
||||||
const char *format,
|
const char *format,
|
||||||
...)
|
va_list args)
|
||||||
{
|
{
|
||||||
va_list args;
|
|
||||||
gchar *str;
|
gchar *str;
|
||||||
FILE *out;
|
FILE *out;
|
||||||
|
|
||||||
g_return_if_fail (format != NULL);
|
g_return_if_fail (format != NULL);
|
||||||
|
|
||||||
if (!is_verbose)
|
if (verbose_topics == 0
|
||||||
|
|| (topic == META_DEBUG_VERBOSE && verbose_topics != META_DEBUG_VERBOSE)
|
||||||
|
|| (!(verbose_topics & topic)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
va_start (args, format);
|
|
||||||
str = g_strdup_vprintf (format, args);
|
str = g_strdup_vprintf (format, args);
|
||||||
va_end (args);
|
|
||||||
|
|
||||||
out = logfile ? logfile : stderr;
|
out = logfile ? logfile : stderr;
|
||||||
|
|
||||||
@@ -366,6 +397,18 @@ meta_topic_real (MetaDebugTopic topic,
|
|||||||
|
|
||||||
g_free (str);
|
g_free (str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_topic_real (MetaDebugTopic topic,
|
||||||
|
const char *format,
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start (args, format);
|
||||||
|
meta_topic_real_valist (topic, format, args);
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
#endif /* WITH_VERBOSE_MODE */
|
#endif /* WITH_VERBOSE_MODE */
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -837,5 +880,29 @@ meta_later_remove (guint later_id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_CAIRO_REGION
|
||||||
|
#include "region.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_region_get_rectangles (MetaRegion *region,
|
||||||
|
GdkRectangle **rectangles,
|
||||||
|
int *n_rectangles)
|
||||||
|
{
|
||||||
|
int n = cairo_region_num_rectangles (region);
|
||||||
|
|
||||||
|
if (n_rectangles != NULL)
|
||||||
|
*n_rectangles = n;
|
||||||
|
|
||||||
|
if (rectangles != NULL)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
*rectangles = g_new (cairo_rectangle_int_t, n);
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
cairo_region_get_rectangle (region, i, *rectangles + i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* eof util.c */
|
/* eof util.c */
|
||||||
|
|
||||||
|
@@ -3235,10 +3235,6 @@ meta_window_unmaximize (MetaWindow *window,
|
|||||||
window->display->grab_anchor_window_pos = target_rect;
|
window->display->grab_anchor_window_pos = target_rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure user_rect is current.
|
|
||||||
*/
|
|
||||||
force_save_user_window_placement (window);
|
|
||||||
|
|
||||||
if (window->display->compositor)
|
if (window->display->compositor)
|
||||||
{
|
{
|
||||||
MetaRectangle old_rect, new_rect;
|
MetaRectangle old_rect, new_rect;
|
||||||
@@ -3268,6 +3264,10 @@ meta_window_unmaximize (MetaWindow *window,
|
|||||||
target_rect.height);
|
target_rect.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure user_rect is current.
|
||||||
|
*/
|
||||||
|
force_save_user_window_placement (window);
|
||||||
|
|
||||||
recalc_window_features (window);
|
recalc_window_features (window);
|
||||||
set_net_wm_state (window);
|
set_net_wm_state (window);
|
||||||
}
|
}
|
||||||
@@ -9115,6 +9115,21 @@ meta_window_get_client_machine (MetaWindow *window)
|
|||||||
return window->wm_client_machine;
|
return window->wm_client_machine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* meta_window_is_remote:
|
||||||
|
* @window: a #MetaWindow
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if this window originates from a host
|
||||||
|
* different from the one running mutter.
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
meta_window_is_remote (MetaWindow *window)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (META_IS_WINDOW (window), FALSE);
|
||||||
|
|
||||||
|
return g_strcmp0 (window->wm_client_machine, window->display->hostname) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_window_is_modal:
|
* meta_window_is_modal:
|
||||||
* @window: a #MetaWindow
|
* @window: a #MetaWindow
|
||||||
|
21
src/fix-meta-rectangle.py
Executable file
21
src/fix-meta-rectangle.py
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# gobject-introspection currently has a bug where an alias like
|
||||||
|
# 'typedef GdkRectangle cairo_rect_int_t' is stored un-namespaced,
|
||||||
|
# so it is taken to apply to all *Rectangle types. Fixing this
|
||||||
|
# requires a significant rework of g-ir-scanner, so for the moment
|
||||||
|
# we fix up the output using this script.
|
||||||
|
#
|
||||||
|
# https://bugzilla.gnome.org/show_bug.cgi?id=622609
|
||||||
|
|
||||||
|
GDK_RECTANGLE = re.compile(r'Gdk\.Rectangle')
|
||||||
|
META_RECTANGLE = re.compile(r'MetaRectangle')
|
||||||
|
|
||||||
|
i = open(sys.argv[1], 'r')
|
||||||
|
o = open(sys.argv[2], 'w')
|
||||||
|
for line in i:
|
||||||
|
if GDK_RECTANGLE.search(line) and META_RECTANGLE.search(line):
|
||||||
|
line = re.sub('Gdk.Rectangle', 'Rectangle', line)
|
||||||
|
o.write(line)
|
35
src/gdk-compat.h
Normal file
35
src/gdk-compat.h
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#ifndef __GDK_COMPAT_H__
|
||||||
|
#define __GDK_COMPAT_H__
|
||||||
|
|
||||||
|
#include <gdk/gdk.h>
|
||||||
|
|
||||||
|
/* Provide a compatibility layer for accessor function introduced
|
||||||
|
* in GTK+ 2.22 which we need to build without deprecated GDK symbols.
|
||||||
|
* That way it is still possible to build with GTK+ 2.18 when not
|
||||||
|
* using GDK_DISABLE_DEPRECATED.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !GTK_CHECK_VERSION (2, 21, 1)
|
||||||
|
|
||||||
|
#define gdk_window_get_background(w,c) *c = GDK_WINDOW_OBJECT (w)->bg_color
|
||||||
|
#define gdk_visual_get_depth(v) GDK_VISUAL(v)->depth
|
||||||
|
#define gdk_window_get_back_pixmap(w,p,r) \
|
||||||
|
G_STMT_START { \
|
||||||
|
GdkWindowObject *priv = GDK_WINDOW_OBJECT (w); \
|
||||||
|
\
|
||||||
|
if (p != NULL) \
|
||||||
|
{ \
|
||||||
|
if (priv->bg_pixmap == GDK_PARENT_RELATIVE_BG || \
|
||||||
|
priv->bg_pixmap == GDK_NO_BG) \
|
||||||
|
*p = NULL; \
|
||||||
|
else \
|
||||||
|
*p = priv->bg_pixmap; \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
if (r != NULL) \
|
||||||
|
*r = (priv->bg_pixmap == GDK_PARENT_RELATIVE_BG); \
|
||||||
|
} G_STMT_END
|
||||||
|
|
||||||
|
#endif /*GTK_CHECK_VERSION */
|
||||||
|
|
||||||
|
#endif /* __GDK_COMPAT_H__ */
|
@@ -24,9 +24,11 @@
|
|||||||
#ifndef META_BOXES_H
|
#ifndef META_BOXES_H
|
||||||
#define META_BOXES_H
|
#define META_BOXES_H
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib-object.h>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#define META_TYPE_RECTANGLE (meta_rectangle_get_type ())
|
||||||
|
|
||||||
typedef struct _MetaRectangle MetaRectangle;
|
typedef struct _MetaRectangle MetaRectangle;
|
||||||
struct _MetaRectangle
|
struct _MetaRectangle
|
||||||
{
|
{
|
||||||
@@ -70,6 +72,11 @@ struct _MetaEdge
|
|||||||
MetaEdgeType edge_type;
|
MetaEdgeType edge_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GType meta_rectangle_get_type (void);
|
||||||
|
|
||||||
|
MetaRectangle *meta_rectangle_copy (const MetaRectangle *rect);
|
||||||
|
void meta_rectangle_free (MetaRectangle *rect);
|
||||||
|
|
||||||
/* Output functions -- note that the output buffer had better be big enough:
|
/* Output functions -- note that the output buffer had better be big enough:
|
||||||
* rect_to_string: RECT_LENGTH
|
* rect_to_string: RECT_LENGTH
|
||||||
* region_to_string: (RECT_LENGTH+strlen(separator_string)) *
|
* region_to_string: (RECT_LENGTH+strlen(separator_string)) *
|
||||||
|
@@ -32,19 +32,6 @@
|
|||||||
#include <X11/extensions/Xfixes.h>
|
#include <X11/extensions/Xfixes.h>
|
||||||
#include <gmodule.h>
|
#include <gmodule.h>
|
||||||
|
|
||||||
/*
|
|
||||||
* FIXME -- move these to a private include
|
|
||||||
* Required by plugin manager.
|
|
||||||
*/
|
|
||||||
#define MUTTER_PLUGIN_MINIMIZE (1<<0)
|
|
||||||
#define MUTTER_PLUGIN_MAXIMIZE (1<<1)
|
|
||||||
#define MUTTER_PLUGIN_UNMAXIMIZE (1<<2)
|
|
||||||
#define MUTTER_PLUGIN_MAP (1<<3)
|
|
||||||
#define MUTTER_PLUGIN_DESTROY (1<<4)
|
|
||||||
#define MUTTER_PLUGIN_SWITCH_WORKSPACE (1<<5)
|
|
||||||
|
|
||||||
#define MUTTER_PLUGIN_ALL_EFFECTS (~0)
|
|
||||||
|
|
||||||
#define MUTTER_TYPE_PLUGIN (mutter_plugin_get_type ())
|
#define MUTTER_TYPE_PLUGIN (mutter_plugin_get_type ())
|
||||||
#define MUTTER_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MUTTER_TYPE_PLUGIN, MutterPlugin))
|
#define MUTTER_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MUTTER_TYPE_PLUGIN, MutterPlugin))
|
||||||
#define MUTTER_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MUTTER_TYPE_PLUGIN, MutterPluginClass))
|
#define MUTTER_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MUTTER_TYPE_PLUGIN, MutterPluginClass))
|
||||||
@@ -95,20 +82,18 @@ struct _MutterPluginClass
|
|||||||
MutterWindow *actor);
|
MutterWindow *actor);
|
||||||
|
|
||||||
void (*switch_workspace) (MutterPlugin *plugin,
|
void (*switch_workspace) (MutterPlugin *plugin,
|
||||||
const GList **actors,
|
|
||||||
gint from,
|
gint from,
|
||||||
gint to,
|
gint to,
|
||||||
MetaMotionDirection direction);
|
MetaMotionDirection direction);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called if an effect should be killed prematurely; the plugin must
|
* Called if an effects should be killed prematurely; the plugin must
|
||||||
* call the completed() callback as if the effect terminated naturally.
|
* call the completed() callback as if the effect terminated naturally.
|
||||||
* The events parameter is a bitmask indicating which effects are to be
|
|
||||||
* killed.
|
|
||||||
*/
|
*/
|
||||||
void (*kill_effect) (MutterPlugin *plugin,
|
void (*kill_window_effects) (MutterPlugin *plugin,
|
||||||
MutterWindow *actor,
|
MutterWindow *actor);
|
||||||
gulong events);
|
|
||||||
|
void (*kill_switch_workspace) (MutterPlugin *plugin);
|
||||||
|
|
||||||
/* General XEvent filter. This is fired *before* mutter itself handles
|
/* General XEvent filter. This is fired *before* mutter itself handles
|
||||||
* an event. Return TRUE to block any further processing.
|
* an event. Return TRUE to block any further processing.
|
||||||
@@ -227,9 +212,27 @@ struct _MutterPluginVersion
|
|||||||
} \
|
} \
|
||||||
|
|
||||||
void
|
void
|
||||||
mutter_plugin_effect_completed (MutterPlugin *plugin,
|
mutter_plugin_switch_workspace_completed (MutterPlugin *plugin);
|
||||||
MutterWindow *actor,
|
|
||||||
unsigned long event);
|
void
|
||||||
|
mutter_plugin_minimize_completed (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor);
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_maximize_completed (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor);
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_unmaximize_completed (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor);
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_map_completed (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor);
|
||||||
|
|
||||||
|
void
|
||||||
|
mutter_plugin_destroy_completed (MutterPlugin *plugin,
|
||||||
|
MutterWindow *actor);
|
||||||
|
|
||||||
ClutterActor *
|
ClutterActor *
|
||||||
mutter_plugin_get_overlay_group (MutterPlugin *plugin);
|
mutter_plugin_get_overlay_group (MutterPlugin *plugin);
|
||||||
|
60
src/include/region.h
Normal file
60
src/include/region.h
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
#ifndef META_REGION_H
|
||||||
|
#define META_REGION_H
|
||||||
|
|
||||||
|
#ifndef PACKAGE_NAME
|
||||||
|
#error "<config.h> must be included before region.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gdk/gdk.h>
|
||||||
|
|
||||||
|
#ifdef USE_CAIRO_REGION
|
||||||
|
#include <cairo.h>
|
||||||
|
|
||||||
|
#define MetaRegion cairo_region_t
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
META_REGION_OVERLAP_IN = CAIRO_REGION_OVERLAP_IN,
|
||||||
|
META_REGION_OVERLAP_OUT = CAIRO_REGION_OVERLAP_OUT,
|
||||||
|
META_REGION_OVERLAP_PART = CAIRO_REGION_OVERLAP_PART
|
||||||
|
} MetaOverlapType;
|
||||||
|
|
||||||
|
#define meta_region_new() cairo_region_create()
|
||||||
|
#define meta_region_new_from_rectangle(rect) cairo_region_create_rectangle(rect)
|
||||||
|
#define meta_region_copy(r) cairo_region_copy(r)
|
||||||
|
#define meta_region_destroy(r) cairo_region_destroy(r)
|
||||||
|
#define meta_region_is_empty(r) cairo_region_is_empty(r)
|
||||||
|
#define meta_region_union_rectangle(r, rect) cairo_region_union_rectangle(r, rect)
|
||||||
|
#define meta_region_subtract(r, other) cairo_region_subtract(r, other)
|
||||||
|
#define meta_region_translate(r, x, y) cairo_region_translate(r, x, y)
|
||||||
|
#define meta_region_intersect(r, other) cairo_region_intersect(r, other)
|
||||||
|
#define meta_region_contains_rectangle(r, rect) cairo_region_contains_rectangle(r, rect)
|
||||||
|
|
||||||
|
void meta_region_get_rectangles (MetaRegion *region,
|
||||||
|
GdkRectangle **rectangles,
|
||||||
|
int *n_rectangles);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define MetaRegion GdkRegion
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
META_REGION_OVERLAP_IN = GDK_OVERLAP_RECTANGLE_IN,
|
||||||
|
META_REGION_OVERLAP_OUT = GDK_OVERLAP_RECTANGLE_OUT,
|
||||||
|
META_REGION_OVERLAP_PART = GDK_OVERLAP_RECTANGLE_PART
|
||||||
|
} MetaOverlapType;
|
||||||
|
|
||||||
|
#define meta_region_new() gdk_region_new()
|
||||||
|
#define meta_region_new_from_rectangle(rect) gdk_region_rectangle(rect)
|
||||||
|
#define meta_region_copy(r) gdk_region_copy(r)
|
||||||
|
#define meta_region_destroy(r) gdk_region_destroy(r)
|
||||||
|
#define meta_region_is_empty(r) gdk_region_empty(r)
|
||||||
|
#define meta_region_union_rectangle(r, rect) gdk_region_union_with_rect(r, rect)
|
||||||
|
#define meta_region_subtract(r, other) gdk_region_subtract(r, other)
|
||||||
|
#define meta_region_translate(r, x, y) gdk_region_offset(r, x, y)
|
||||||
|
#define meta_region_intersect(r, other) gdk_region_intersect(r, other)
|
||||||
|
#define meta_region_contains_rectangle(r, rect) gdk_region_rect_in(r, rect)
|
||||||
|
#define meta_region_get_rectangles(r, rects, num) gdk_region_get_rectangles(r, rects, num)
|
||||||
|
|
||||||
|
#endif /* HAVE_CAIRO_REGION */
|
||||||
|
|
||||||
|
#endif /* META_REGION_H */
|
@@ -51,6 +51,7 @@ void meta_fatal (const char *format,
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
META_DEBUG_VERBOSE = -1,
|
||||||
META_DEBUG_FOCUS = 1 << 0,
|
META_DEBUG_FOCUS = 1 << 0,
|
||||||
META_DEBUG_WORKAREA = 1 << 1,
|
META_DEBUG_WORKAREA = 1 << 1,
|
||||||
META_DEBUG_STACK = 1 << 2,
|
META_DEBUG_STACK = 1 << 2,
|
||||||
@@ -78,6 +79,8 @@ typedef enum
|
|||||||
void meta_topic_real (MetaDebugTopic topic,
|
void meta_topic_real (MetaDebugTopic topic,
|
||||||
const char *format,
|
const char *format,
|
||||||
...) G_GNUC_PRINTF (2, 3);
|
...) G_GNUC_PRINTF (2, 3);
|
||||||
|
void meta_add_verbose_topic (MetaDebugTopic topic);
|
||||||
|
void meta_remove_verbose_topic (MetaDebugTopic topic);
|
||||||
|
|
||||||
void meta_push_no_msg_prefix (void);
|
void meta_push_no_msg_prefix (void);
|
||||||
void meta_pop_no_msg_prefix (void);
|
void meta_pop_no_msg_prefix (void);
|
||||||
|
@@ -140,6 +140,7 @@ guint meta_window_get_stable_sequence (MetaWindow *window);
|
|||||||
guint32 meta_window_get_user_time (MetaWindow *window);
|
guint32 meta_window_get_user_time (MetaWindow *window);
|
||||||
int meta_window_get_pid (MetaWindow *window);
|
int meta_window_get_pid (MetaWindow *window);
|
||||||
const char *meta_window_get_client_machine (MetaWindow *window);
|
const char *meta_window_get_client_machine (MetaWindow *window);
|
||||||
|
gboolean meta_window_is_remote (MetaWindow *window);
|
||||||
gboolean meta_window_is_modal (MetaWindow *window);
|
gboolean meta_window_is_modal (MetaWindow *window);
|
||||||
const char *meta_window_get_mutter_hints (MetaWindow *window);
|
const char *meta_window_get_mutter_hints (MetaWindow *window);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -6,7 +6,7 @@ libgnome_serverdir=@libexecdir@
|
|||||||
|
|
||||||
Name: libmutter-private
|
Name: libmutter-private
|
||||||
Description: Mutter internals shared
|
Description: Mutter internals shared
|
||||||
Requires: gtk+-2.0
|
Requires: gtk+-@GTK_API_VERSION@
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Libs: -L${libdir} -lmutter-private
|
Libs: -L${libdir} -lmutter-private
|
||||||
Cflags: -I${includedir}/mutter
|
Cflags: -I${includedir}/mutter
|
||||||
|
@@ -309,17 +309,15 @@ response_cb (GtkDialog *dialog,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dialog_cb (gpointer callback_data,
|
dialog_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
make_dialog (GTK_WIDGET (callback_data), 1);
|
make_dialog (GTK_WIDGET (callback_data), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
modal_dialog_cb (gpointer callback_data,
|
modal_dialog_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
|
|
||||||
@@ -337,17 +335,15 @@ modal_dialog_cb (gpointer callback_data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
no_parent_dialog_cb (gpointer callback_data,
|
no_parent_dialog_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
make_dialog (NULL, 1);
|
make_dialog (NULL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
utility_cb (gpointer callback_data,
|
utility_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
@@ -379,9 +375,8 @@ utility_cb (gpointer callback_data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
toolbar_cb (gpointer callback_data,
|
toolbar_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
@@ -404,9 +399,8 @@ toolbar_cb (gpointer callback_data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
menu_cb (gpointer callback_data,
|
menu_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
@@ -429,9 +423,8 @@ menu_cb (gpointer callback_data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
override_redirect_cb (gpointer callback_data,
|
override_redirect_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
@@ -451,9 +444,8 @@ override_redirect_cb (gpointer callback_data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
border_only_cb (gpointer callback_data,
|
border_only_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
@@ -477,9 +469,8 @@ border_only_cb (gpointer callback_data,
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void
|
static void
|
||||||
changing_icon_cb (gpointer callback_data,
|
changing_icon_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
@@ -545,9 +536,8 @@ focus_label (GtkWidget *window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
splashscreen_cb (gpointer callback_data,
|
splashscreen_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *image;
|
GtkWidget *image;
|
||||||
@@ -654,10 +644,27 @@ make_dock (int type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dock_cb (gpointer callback_data,
|
dock_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
|
guint callback_action;
|
||||||
|
const gchar *name;
|
||||||
|
|
||||||
|
name = gtk_action_get_name (action);
|
||||||
|
|
||||||
|
if (!g_strcmp0 (name, "Top dock"))
|
||||||
|
callback_action = DOCK_TOP;
|
||||||
|
else if (!g_strcmp0 (name, "Bottom dock"))
|
||||||
|
callback_action = DOCK_BOTTOM;
|
||||||
|
else if (!g_strcmp0 (name, "Left dock"))
|
||||||
|
callback_action = DOCK_LEFT;
|
||||||
|
else if (!g_strcmp0 (name, "Right dock"))
|
||||||
|
callback_action = DOCK_RIGHT;
|
||||||
|
else if (!g_strcmp0 (name, "All docks"))
|
||||||
|
callback_action = DOCK_ALL;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
if (callback_action == DOCK_ALL)
|
if (callback_action == DOCK_ALL)
|
||||||
{
|
{
|
||||||
make_dock (DOCK_TOP);
|
make_dock (DOCK_TOP);
|
||||||
@@ -672,9 +679,8 @@ dock_cb (gpointer callback_data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
desktop_cb (gpointer callback_data,
|
desktop_cb (GtkAction *action,
|
||||||
guint callback_action,
|
gpointer callback_data)
|
||||||
GtkWidget *widget)
|
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
@@ -700,40 +706,20 @@ desktop_cb (gpointer callback_data,
|
|||||||
gtk_widget_show_all (window);
|
gtk_widget_show_all (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkItemFactoryEntry menu_items[] =
|
|
||||||
{
|
|
||||||
{ "/_Windows", NULL, NULL, 0, "<Branch>" },
|
|
||||||
{ "/Windows/tearoff", NULL, NULL, 0, "<Tearoff>" },
|
|
||||||
{ "/Windows/_Dialog", "<control>d", dialog_cb, 0, NULL },
|
|
||||||
{ "/Windows/_Modal dialog", NULL, modal_dialog_cb, 0, NULL },
|
|
||||||
{ "/Windows/_Parentless dialog", NULL, no_parent_dialog_cb, 0, NULL },
|
|
||||||
{ "/Windows/_Utility", "<control>u", utility_cb, 0, NULL },
|
|
||||||
{ "/Windows/_Splashscreen", "<control>s", splashscreen_cb, 0, NULL },
|
|
||||||
{ "/Windows/_Top dock", NULL, dock_cb, DOCK_TOP, NULL },
|
|
||||||
{ "/Windows/_Bottom dock", NULL, dock_cb, DOCK_BOTTOM, NULL },
|
|
||||||
{ "/Windows/_Left dock", NULL, dock_cb, DOCK_LEFT, NULL },
|
|
||||||
{ "/Windows/_Right dock", NULL, dock_cb, DOCK_RIGHT, NULL },
|
|
||||||
{ "/Windows/_All docks", NULL, dock_cb, DOCK_ALL, NULL },
|
|
||||||
{ "/Windows/Des_ktop", NULL, desktop_cb, 0, NULL },
|
|
||||||
{ "/Windows/Me_nu", NULL, menu_cb, 0, NULL },
|
|
||||||
{ "/Windows/Tool_bar", NULL, toolbar_cb, 0, NULL },
|
|
||||||
{ "/Windows/Override Redirect", NULL, override_redirect_cb, 0, NULL },
|
|
||||||
{ "/Windows/Border Only", NULL, border_only_cb, 0, NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sleep_cb (GtkWidget *button,
|
sleep_cb (GtkAction *action,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
sleep (1000);
|
sleep (1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
toggle_aspect_ratio (GtkWidget *button,
|
toggle_aspect_ratio (GtkAction *action,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GdkGeometry geom;
|
GdkGeometry geom;
|
||||||
|
GtkWidget *widget = GTK_WIDGET (data);
|
||||||
|
|
||||||
if (aspect_on)
|
if (aspect_on)
|
||||||
{
|
{
|
||||||
@@ -748,10 +734,10 @@ toggle_aspect_ratio (GtkWidget *button,
|
|||||||
|
|
||||||
aspect_on = !aspect_on;
|
aspect_on = !aspect_on;
|
||||||
|
|
||||||
window = gtk_widget_get_ancestor (button, GTK_TYPE_WINDOW);
|
window = gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW);
|
||||||
if (window)
|
if (window)
|
||||||
gtk_window_set_geometry_hints (GTK_WINDOW (window),
|
gtk_window_set_geometry_hints (GTK_WINDOW (window),
|
||||||
GTK_WIDGET (data),
|
widget,
|
||||||
&geom,
|
&geom,
|
||||||
GDK_HINT_ASPECT);
|
GDK_HINT_ASPECT);
|
||||||
|
|
||||||
@@ -762,7 +748,7 @@ toggle_decorated_cb (GtkWidget *button,
|
|||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
window = gtk_widget_get_ancestor (button, GTK_TYPE_WINDOW);
|
window = gtk_widget_get_ancestor (data, GTK_TYPE_WINDOW);
|
||||||
if (window)
|
if (window)
|
||||||
gtk_window_set_decorated (GTK_WINDOW (window),
|
gtk_window_set_decorated (GTK_WINDOW (window),
|
||||||
!gtk_window_get_decorated (GTK_WINDOW (window)));
|
!gtk_window_get_decorated (GTK_WINDOW (window)));
|
||||||
@@ -836,39 +822,102 @@ destroy_cb (GtkWidget *w, gpointer data)
|
|||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static const gchar *menu_item_string =
|
||||||
insert_stock_button (GtkWidget *toolbar,
|
"<ui>\n"
|
||||||
const gchar *stock_id,
|
"<menubar>\n"
|
||||||
const gchar *text,
|
"<menu name='Windows' action='Windows'>\n"
|
||||||
GCallback callback,
|
"<menuitem name='Dialog' action='Dialog'/>\n"
|
||||||
gpointer user_data)
|
"<menuitem name='Modal dialog' action='Modal dialog'/>\n"
|
||||||
{
|
"<menuitem name='Parentless dialog' action='Parentless dialog'/>\n"
|
||||||
GtkToolItem *button;
|
"<menuitem name='Utility' action='Utility'/>\n"
|
||||||
|
"<menuitem name='Splashscreen' action='Splashscreen'/>\n"
|
||||||
|
"<menuitem name='Top dock' action='Top dock'/>\n"
|
||||||
|
"<menuitem name='Bottom dock' action='Bottom dock'/>\n"
|
||||||
|
"<menuitem name='Left dock' action='Left dock'/>\n"
|
||||||
|
"<menuitem name='Right dock' action='Right dock'/>\n"
|
||||||
|
"<menuitem name='All docks' action='All docks'/>\n"
|
||||||
|
"<menuitem name='Desktop' action='Desktop'/>\n"
|
||||||
|
"<menuitem name='Menu' action='Menu'/>\n"
|
||||||
|
"<menuitem name='Toolbar' action='Toolbar'/>\n"
|
||||||
|
"<menuitem name='Override Redirect' action='Override Redirect'/>\n"
|
||||||
|
"<menuitem name='Border Only' action='Border Only'/>\n"
|
||||||
|
"</menu>\n"
|
||||||
|
"</menubar>\n"
|
||||||
|
"<toolbar>\n"
|
||||||
|
"<toolitem name='New' action='New'/>\n"
|
||||||
|
"<toolitem name='Lock' action='Lock'/>\n"
|
||||||
|
"<toolitem name='Decorations' action='Decorations'/>\n"
|
||||||
|
"<toolitem name='Ratio' action='Ratio'/>\n"
|
||||||
|
"<toolitem name='Quit' action='Quit'/>\n"
|
||||||
|
"</toolbar>\n"
|
||||||
|
"</ui>\n";
|
||||||
|
|
||||||
button = gtk_tool_button_new_from_stock (stock_id);
|
static const GtkActionEntry menu_items[] =
|
||||||
gtk_tool_item_set_tooltip_text (button, text);
|
{
|
||||||
g_signal_connect (G_OBJECT (button),
|
{ "Windows", NULL, "_Windows", NULL,
|
||||||
"clicked",
|
NULL, NULL },
|
||||||
callback,
|
{ "Dialog", NULL, "_Dialog", "<control>d",
|
||||||
user_data);
|
NULL, G_CALLBACK (dialog_cb) },
|
||||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
|
{ "Modal dialog", NULL, "_Modal dialog", NULL,
|
||||||
button,
|
NULL, G_CALLBACK (modal_dialog_cb) },
|
||||||
-1); /*-1 means append to end of toolbar*/
|
{ "Parentless dialog", NULL, "_Parentless dialog", NULL,
|
||||||
}
|
NULL, G_CALLBACK (no_parent_dialog_cb) },
|
||||||
|
{ "Utility", NULL, "_Utility", "<control>u",
|
||||||
|
NULL, G_CALLBACK (utility_cb) },
|
||||||
|
{ "Splashscreen", NULL, "_Splashscreen", "<control>s",
|
||||||
|
NULL, G_CALLBACK (splashscreen_cb) },
|
||||||
|
{ "Top dock", NULL, "_Top dock", NULL,
|
||||||
|
NULL, G_CALLBACK (dock_cb) },
|
||||||
|
{ "Bottom dock", NULL, "_Bottom dock", NULL,
|
||||||
|
NULL, G_CALLBACK (dock_cb) },
|
||||||
|
{ "Left dock", NULL, "_Left dock", NULL,
|
||||||
|
NULL, G_CALLBACK (dock_cb) },
|
||||||
|
{ "Right dock", NULL, "_Right dock", NULL,
|
||||||
|
NULL, G_CALLBACK (dock_cb) },
|
||||||
|
{ "All docks", NULL, "_All docks", NULL,
|
||||||
|
NULL, G_CALLBACK (dock_cb) },
|
||||||
|
{ "Desktop", NULL, "Des_ktop", NULL,
|
||||||
|
NULL, G_CALLBACK (desktop_cb) },
|
||||||
|
{ "Menu", NULL, "Me_nu", NULL,
|
||||||
|
NULL, G_CALLBACK (menu_cb) },
|
||||||
|
{ "Toolbar", NULL, "Tool_bar", NULL,
|
||||||
|
NULL, G_CALLBACK (toolbar_cb) },
|
||||||
|
{ "Override Redirect", NULL, "Override Redirect", NULL,
|
||||||
|
NULL, G_CALLBACK (override_redirect_cb) },
|
||||||
|
{ "Border Only", NULL, "Border Only", NULL,
|
||||||
|
NULL, G_CALLBACK (border_only_cb) }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const GtkActionEntry tool_items[] =
|
||||||
|
{
|
||||||
|
{ "New", GTK_STOCK_NEW, NULL, NULL,
|
||||||
|
"Open another one of these windows", G_CALLBACK (do_appwindow) },
|
||||||
|
{ "Lock", GTK_STOCK_OPEN, NULL, NULL,
|
||||||
|
"This is a demo button that"
|
||||||
|
" locks up the demo", G_CALLBACK (sleep_cb) },
|
||||||
|
{ "Decorations", GTK_STOCK_OPEN, NULL, NULL,
|
||||||
|
"This is a demo button that "
|
||||||
|
"toggles window decorations", G_CALLBACK (toggle_decorated_cb) },
|
||||||
|
{ "Quit", GTK_STOCK_QUIT, NULL, NULL,
|
||||||
|
"This is a demo button with "
|
||||||
|
" a 'quit' icon", G_CALLBACK (clicked_toolbar_cb) },
|
||||||
|
{ "Ratio", GTK_STOCK_OPEN, NULL, NULL,
|
||||||
|
"This is a demo button that locks the aspect ratio "
|
||||||
|
"using a hint", G_CALLBACK (toggle_aspect_ratio) }
|
||||||
|
};
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
do_appwindow (void)
|
do_appwindow (void)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *table;
|
GtkWidget *table;
|
||||||
GtkWidget *toolbar;
|
|
||||||
GtkWidget *handlebox;
|
GtkWidget *handlebox;
|
||||||
GtkWidget *statusbar;
|
GtkWidget *statusbar;
|
||||||
GtkWidget *contents;
|
GtkWidget *contents;
|
||||||
GtkWidget *sw;
|
GtkWidget *sw;
|
||||||
GtkTextBuffer *buffer;
|
GtkTextBuffer *buffer;
|
||||||
GtkAccelGroup *accel_group;
|
GtkActionGroup *action_group;
|
||||||
GtkItemFactory *item_factory;
|
GtkUIManager *ui_manager;
|
||||||
|
|
||||||
/* Create the toplevel window
|
/* Create the toplevel window
|
||||||
*/
|
*/
|
||||||
@@ -890,25 +939,28 @@ do_appwindow (void)
|
|||||||
/* Create the menubar
|
/* Create the menubar
|
||||||
*/
|
*/
|
||||||
|
|
||||||
accel_group = gtk_accel_group_new ();
|
contents = gtk_text_view_new ();
|
||||||
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
|
|
||||||
g_object_unref (accel_group);
|
|
||||||
|
|
||||||
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group);
|
|
||||||
|
|
||||||
/* Set up item factory to go away with the window */
|
action_group = gtk_action_group_new ("mainmenu");
|
||||||
g_object_ref_sink (item_factory);
|
gtk_action_group_add_actions (action_group,
|
||||||
g_object_set_data_full (G_OBJECT (window),
|
menu_items,
|
||||||
"<main>",
|
G_N_ELEMENTS (menu_items),
|
||||||
item_factory,
|
window);
|
||||||
(GDestroyNotify) g_object_unref);
|
gtk_action_group_add_actions (action_group,
|
||||||
|
tool_items,
|
||||||
|
G_N_ELEMENTS (tool_items),
|
||||||
|
window);
|
||||||
|
|
||||||
|
ui_manager = gtk_ui_manager_new ();
|
||||||
|
|
||||||
|
gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
|
||||||
|
|
||||||
/* create menu items */
|
/* create menu items */
|
||||||
gtk_item_factory_create_items (item_factory, G_N_ELEMENTS (menu_items),
|
|
||||||
menu_items, window);
|
gtk_ui_manager_add_ui_from_string (ui_manager, menu_item_string, -1, NULL);
|
||||||
|
|
||||||
gtk_table_attach (GTK_TABLE (table),
|
gtk_table_attach (GTK_TABLE (table),
|
||||||
gtk_item_factory_get_widget (item_factory, "<main>"),
|
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
|
||||||
/* X direction */ /* Y direction */
|
/* X direction */ /* Y direction */
|
||||||
0, 1, 0, 1,
|
0, 1, 0, 1,
|
||||||
GTK_EXPAND | GTK_FILL, 0,
|
GTK_EXPAND | GTK_FILL, 0,
|
||||||
@@ -936,7 +988,6 @@ do_appwindow (void)
|
|||||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||||
200, 200);
|
200, 200);
|
||||||
|
|
||||||
contents = gtk_text_view_new ();
|
|
||||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (contents),
|
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (contents),
|
||||||
PANGO_WRAP_WORD);
|
PANGO_WRAP_WORD);
|
||||||
|
|
||||||
@@ -945,31 +996,11 @@ do_appwindow (void)
|
|||||||
|
|
||||||
/* Create the toolbar
|
/* Create the toolbar
|
||||||
*/
|
*/
|
||||||
toolbar = gtk_toolbar_new ();
|
|
||||||
|
|
||||||
insert_stock_button (toolbar, GTK_STOCK_NEW,
|
|
||||||
"Open another one of these windows",
|
|
||||||
G_CALLBACK (do_appwindow), window);
|
|
||||||
|
|
||||||
insert_stock_button (toolbar, GTK_STOCK_OPEN,
|
|
||||||
"This is a demo button that locks up the demo",
|
|
||||||
G_CALLBACK (sleep_cb), window);
|
|
||||||
|
|
||||||
insert_stock_button (toolbar, GTK_STOCK_OPEN,
|
|
||||||
"This is a demo button that toggles window decorations",
|
|
||||||
G_CALLBACK (toggle_decorated_cb), window);
|
|
||||||
|
|
||||||
insert_stock_button (toolbar, GTK_STOCK_OPEN,
|
|
||||||
"This is a demo button that locks the aspect ratio using a hint",
|
|
||||||
G_CALLBACK (toggle_aspect_ratio), contents);
|
|
||||||
|
|
||||||
insert_stock_button (toolbar, GTK_STOCK_QUIT,
|
|
||||||
"This is a demo button with a 'quit' icon",
|
|
||||||
G_CALLBACK (clicked_toolbar_cb), window);
|
|
||||||
|
|
||||||
handlebox = gtk_handle_box_new ();
|
handlebox = gtk_handle_box_new ();
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (handlebox), toolbar);
|
gtk_container_add (GTK_CONTAINER (handlebox),
|
||||||
|
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"));
|
||||||
|
|
||||||
gtk_table_attach (GTK_TABLE (table),
|
gtk_table_attach (GTK_TABLE (table),
|
||||||
handlebox,
|
handlebox,
|
||||||
@@ -1014,6 +1045,8 @@ do_appwindow (void)
|
|||||||
|
|
||||||
gtk_widget_show_all (window);
|
gtk_widget_show_all (window);
|
||||||
|
|
||||||
|
g_object_unref (ui_manager);
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -51,7 +51,7 @@ static int screen_right_edge = 0;
|
|||||||
static int screen_bottom_edge = 0;
|
static int screen_bottom_edge = 0;
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
expose_handler (GtkTooltips *tooltips)
|
expose_handler (GtkWidget *tooltips)
|
||||||
{
|
{
|
||||||
gtk_paint_flat_box (gtk_widget_get_style (tip),
|
gtk_paint_flat_box (gtk_widget_get_style (tip),
|
||||||
gtk_widget_get_window (tip),
|
gtk_widget_get_window (tip),
|
||||||
|
135
src/ui/frames.c
135
src/ui/frames.c
@@ -27,6 +27,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "boxes.h"
|
#include "boxes.h"
|
||||||
#include "frames.h"
|
#include "frames.h"
|
||||||
|
#include "region.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "core.h"
|
#include "core.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@@ -36,6 +37,7 @@
|
|||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
|
|
||||||
#include "gtk-compat.h"
|
#include "gtk-compat.h"
|
||||||
|
#include "gdk-compat.h"
|
||||||
|
|
||||||
#ifdef HAVE_SHAPE
|
#ifdef HAVE_SHAPE
|
||||||
#include <X11/extensions/shape.h>
|
#include <X11/extensions/shape.h>
|
||||||
@@ -43,8 +45,6 @@
|
|||||||
|
|
||||||
#define DEFAULT_INNER_BUTTON_BORDER 3
|
#define DEFAULT_INNER_BUTTON_BORDER 3
|
||||||
|
|
||||||
static void meta_frames_class_init (MetaFramesClass *klass);
|
|
||||||
static void meta_frames_init (MetaFrames *frames);
|
|
||||||
static void meta_frames_destroy (GtkObject *object);
|
static void meta_frames_destroy (GtkObject *object);
|
||||||
static void meta_frames_finalize (GObject *object);
|
static void meta_frames_finalize (GObject *object);
|
||||||
static void meta_frames_style_set (GtkWidget *widget,
|
static void meta_frames_style_set (GtkWidget *widget,
|
||||||
@@ -76,7 +76,7 @@ static void meta_frames_attach_style (MetaFrames *frames,
|
|||||||
static void meta_frames_paint_to_drawable (MetaFrames *frames,
|
static void meta_frames_paint_to_drawable (MetaFrames *frames,
|
||||||
MetaUIFrame *frame,
|
MetaUIFrame *frame,
|
||||||
GdkDrawable *drawable,
|
GdkDrawable *drawable,
|
||||||
GdkRegion *region,
|
MetaRegion *region,
|
||||||
int x_offset,
|
int x_offset,
|
||||||
int y_offset);
|
int y_offset);
|
||||||
|
|
||||||
@@ -108,32 +108,7 @@ static void invalidate_all_caches (MetaFrames *frames);
|
|||||||
static void invalidate_whole_window (MetaFrames *frames,
|
static void invalidate_whole_window (MetaFrames *frames,
|
||||||
MetaUIFrame *frame);
|
MetaUIFrame *frame);
|
||||||
|
|
||||||
static GtkWidgetClass *parent_class = NULL;
|
G_DEFINE_TYPE (MetaFrames, meta_frames, GTK_TYPE_WINDOW);
|
||||||
|
|
||||||
GType
|
|
||||||
meta_frames_get_type (void)
|
|
||||||
{
|
|
||||||
static GType frames_type = 0;
|
|
||||||
|
|
||||||
if (!frames_type)
|
|
||||||
{
|
|
||||||
static const GtkTypeInfo frames_info =
|
|
||||||
{
|
|
||||||
"MetaFrames",
|
|
||||||
sizeof (MetaFrames),
|
|
||||||
sizeof (MetaFramesClass),
|
|
||||||
(GtkClassInitFunc) meta_frames_class_init,
|
|
||||||
(GtkObjectInitFunc) meta_frames_init,
|
|
||||||
/* reserved_1 */ NULL,
|
|
||||||
/* reserved_2 */ NULL,
|
|
||||||
(GtkClassInitFunc) NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
frames_type = gtk_type_unique (GTK_TYPE_WINDOW, &frames_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
return frames_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static GObject *
|
static GObject *
|
||||||
meta_frames_constructor (GType gtype,
|
meta_frames_constructor (GType gtype,
|
||||||
@@ -143,7 +118,7 @@ meta_frames_constructor (GType gtype,
|
|||||||
GObject *object;
|
GObject *object;
|
||||||
GObjectClass *gobject_class;
|
GObjectClass *gobject_class;
|
||||||
|
|
||||||
gobject_class = G_OBJECT_CLASS (parent_class);
|
gobject_class = G_OBJECT_CLASS (meta_frames_parent_class);
|
||||||
object = gobject_class->constructor (gtype, n_properties, properties);
|
object = gobject_class->constructor (gtype, n_properties, properties);
|
||||||
|
|
||||||
g_object_set (object,
|
g_object_set (object,
|
||||||
@@ -164,8 +139,6 @@ meta_frames_class_init (MetaFramesClass *class)
|
|||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass*) class;
|
||||||
widget_class = (GtkWidgetClass*) class;
|
widget_class = (GtkWidgetClass*) class;
|
||||||
|
|
||||||
parent_class = g_type_class_peek_parent (class);
|
|
||||||
|
|
||||||
gobject_class->constructor = meta_frames_constructor;
|
gobject_class->constructor = meta_frames_constructor;
|
||||||
gobject_class->finalize = meta_frames_finalize;
|
gobject_class->finalize = meta_frames_finalize;
|
||||||
object_class->destroy = meta_frames_destroy;
|
object_class->destroy = meta_frames_destroy;
|
||||||
@@ -275,7 +248,7 @@ meta_frames_destroy (GtkObject *object)
|
|||||||
}
|
}
|
||||||
g_slist_free (winlist);
|
g_slist_free (winlist);
|
||||||
|
|
||||||
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
GTK_OBJECT_CLASS (meta_frames_parent_class)->destroy (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -297,7 +270,7 @@ meta_frames_finalize (GObject *object)
|
|||||||
g_hash_table_destroy (frames->frames);
|
g_hash_table_destroy (frames->frames);
|
||||||
g_hash_table_destroy (frames->cache);
|
g_hash_table_destroy (frames->cache);
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (meta_frames_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -467,7 +440,7 @@ meta_frames_style_set (GtkWidget *widget,
|
|||||||
g_hash_table_foreach (frames->frames,
|
g_hash_table_foreach (frames->frames,
|
||||||
reattach_style_func, frames);
|
reattach_style_func, frames);
|
||||||
|
|
||||||
GTK_WIDGET_CLASS (parent_class)->style_set (widget, prev_style);
|
GTK_WIDGET_CLASS (meta_frames_parent_class)->style_set (widget, prev_style);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -705,15 +678,15 @@ meta_frames_unmanage_window (MetaFrames *frames,
|
|||||||
static void
|
static void
|
||||||
meta_frames_realize (GtkWidget *widget)
|
meta_frames_realize (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
if (GTK_WIDGET_CLASS (parent_class)->realize)
|
if (GTK_WIDGET_CLASS (meta_frames_parent_class)->realize)
|
||||||
GTK_WIDGET_CLASS (parent_class)->realize (widget);
|
GTK_WIDGET_CLASS (meta_frames_parent_class)->realize (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_frames_unrealize (GtkWidget *widget)
|
meta_frames_unrealize (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
|
if (GTK_WIDGET_CLASS (meta_frames_parent_class)->unrealize)
|
||||||
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
|
GTK_WIDGET_CLASS (meta_frames_parent_class)->unrealize (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
static MetaUIFrame*
|
static MetaUIFrame*
|
||||||
@@ -2035,22 +2008,26 @@ meta_frames_destroy_event (GtkWidget *widget,
|
|||||||
static GdkGC *
|
static GdkGC *
|
||||||
get_bg_gc (GdkWindow *window, int x_offset, int y_offset)
|
get_bg_gc (GdkWindow *window, int x_offset, int y_offset)
|
||||||
{
|
{
|
||||||
GdkWindowObject *private = (GdkWindowObject *)window;
|
GdkWindow *parent = gdk_window_get_parent (window);
|
||||||
|
GdkPixmap *back_pixmap;
|
||||||
|
gboolean parent_relative;
|
||||||
guint gc_mask = 0;
|
guint gc_mask = 0;
|
||||||
GdkGCValues gc_values;
|
GdkGCValues gc_values;
|
||||||
|
|
||||||
if (private->bg_pixmap == GDK_PARENT_RELATIVE_BG && private->parent)
|
gdk_window_get_back_pixmap (window, &back_pixmap, &parent_relative);
|
||||||
|
if (parent_relative && parent)
|
||||||
{
|
{
|
||||||
return get_bg_gc (GDK_WINDOW (private->parent),
|
gint window_x, window_y;
|
||||||
x_offset + private->x,
|
|
||||||
y_offset + private->y);
|
gdk_window_get_position (window, &window_x, &window_y);
|
||||||
|
return get_bg_gc (parent,
|
||||||
|
x_offset + window_x,
|
||||||
|
y_offset + window_y);
|
||||||
}
|
}
|
||||||
else if (private->bg_pixmap &&
|
else if (back_pixmap)
|
||||||
private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
|
|
||||||
private->bg_pixmap != GDK_NO_BG)
|
|
||||||
{
|
{
|
||||||
gc_values.fill = GDK_TILED;
|
gc_values.fill = GDK_TILED;
|
||||||
gc_values.tile = private->bg_pixmap;
|
gc_values.tile = back_pixmap;
|
||||||
gc_values.ts_x_origin = x_offset;
|
gc_values.ts_x_origin = x_offset;
|
||||||
gc_values.ts_y_origin = y_offset;
|
gc_values.ts_y_origin = y_offset;
|
||||||
|
|
||||||
@@ -2060,9 +2037,11 @@ get_bg_gc (GdkWindow *window, int x_offset, int y_offset)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
GdkColor bg_color;
|
||||||
GdkGC *gc = gdk_gc_new (window);
|
GdkGC *gc = gdk_gc_new (window);
|
||||||
|
|
||||||
gdk_gc_set_foreground (gc, &(private->bg_color));
|
gdk_window_get_background (window, &bg_color);
|
||||||
|
gdk_gc_set_foreground (gc, &bg_color);
|
||||||
|
|
||||||
return gc;
|
return gc;
|
||||||
}
|
}
|
||||||
@@ -2090,7 +2069,7 @@ generate_pixmap (MetaFrames *frames,
|
|||||||
MetaRectangle rect)
|
MetaRectangle rect)
|
||||||
{
|
{
|
||||||
GdkRectangle rectangle;
|
GdkRectangle rectangle;
|
||||||
GdkRegion *region;
|
MetaRegion *region;
|
||||||
GdkPixmap *result;
|
GdkPixmap *result;
|
||||||
|
|
||||||
rectangle.x = rect.x;
|
rectangle.x = rect.x;
|
||||||
@@ -2103,12 +2082,12 @@ generate_pixmap (MetaFrames *frames,
|
|||||||
|
|
||||||
clear_backing (result, frame->window, rectangle.x, rectangle.y);
|
clear_backing (result, frame->window, rectangle.x, rectangle.y);
|
||||||
|
|
||||||
region = gdk_region_rectangle (&rectangle);
|
region = meta_region_new_from_rectangle (&rectangle);
|
||||||
|
|
||||||
meta_frames_paint_to_drawable (frames, frame, result, region,
|
meta_frames_paint_to_drawable (frames, frame, result, region,
|
||||||
-rectangle.x, -rectangle.y);
|
-rectangle.x, -rectangle.y);
|
||||||
|
|
||||||
gdk_region_destroy (region);
|
meta_region_destroy (region);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -2192,11 +2171,11 @@ populate_cache (MetaFrames *frames,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clip_to_screen (GdkRegion *region, MetaUIFrame *frame)
|
clip_to_screen (MetaRegion *region, MetaUIFrame *frame)
|
||||||
{
|
{
|
||||||
GdkRectangle frame_area;
|
GdkRectangle frame_area;
|
||||||
GdkRectangle screen_area = { 0, 0, 0, 0 };
|
GdkRectangle screen_area = { 0, 0, 0, 0 };
|
||||||
GdkRegion *tmp_region;
|
MetaRegion *tmp_region;
|
||||||
|
|
||||||
/* Chop off stuff outside the screen; this optimization
|
/* Chop off stuff outside the screen; this optimization
|
||||||
* is crucial to handle huge client windows,
|
* is crucial to handle huge client windows,
|
||||||
@@ -2211,35 +2190,35 @@ clip_to_screen (GdkRegion *region, MetaUIFrame *frame)
|
|||||||
META_CORE_GET_SCREEN_HEIGHT, &screen_area.height,
|
META_CORE_GET_SCREEN_HEIGHT, &screen_area.height,
|
||||||
META_CORE_GET_END);
|
META_CORE_GET_END);
|
||||||
|
|
||||||
gdk_region_offset (region, frame_area.x, frame_area.y);
|
meta_region_translate (region, frame_area.x, frame_area.y);
|
||||||
|
|
||||||
tmp_region = gdk_region_rectangle (&frame_area);
|
tmp_region = meta_region_new_from_rectangle (&frame_area);
|
||||||
gdk_region_intersect (region, tmp_region);
|
meta_region_intersect (region, tmp_region);
|
||||||
gdk_region_destroy (tmp_region);
|
meta_region_destroy (tmp_region);
|
||||||
|
|
||||||
gdk_region_offset (region, - frame_area.x, - frame_area.y);
|
meta_region_translate (region, - frame_area.x, - frame_area.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
subtract_from_region (GdkRegion *region, GdkDrawable *drawable,
|
subtract_from_region (MetaRegion *region, GdkDrawable *drawable,
|
||||||
gint x, gint y)
|
gint x, gint y)
|
||||||
{
|
{
|
||||||
GdkRectangle rect;
|
GdkRectangle rect;
|
||||||
GdkRegion *reg_rect;
|
MetaRegion *reg_rect;
|
||||||
|
|
||||||
gdk_drawable_get_size (drawable, &rect.width, &rect.height);
|
gdk_drawable_get_size (drawable, &rect.width, &rect.height);
|
||||||
rect.x = x;
|
rect.x = x;
|
||||||
rect.y = y;
|
rect.y = y;
|
||||||
|
|
||||||
reg_rect = gdk_region_rectangle (&rect);
|
reg_rect = meta_region_new_from_rectangle (&rect);
|
||||||
gdk_region_subtract (region, reg_rect);
|
meta_region_subtract (region, reg_rect);
|
||||||
gdk_region_destroy (reg_rect);
|
meta_region_destroy (reg_rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cached_pixels_draw (CachedPixels *pixels,
|
cached_pixels_draw (CachedPixels *pixels,
|
||||||
GdkWindow *window,
|
GdkWindow *window,
|
||||||
GdkRegion *region)
|
MetaRegion *region)
|
||||||
{
|
{
|
||||||
GdkGC *gc;
|
GdkGC *gc;
|
||||||
int i;
|
int i;
|
||||||
@@ -2271,8 +2250,8 @@ meta_frames_expose_event (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
MetaUIFrame *frame;
|
MetaUIFrame *frame;
|
||||||
MetaFrames *frames;
|
MetaFrames *frames;
|
||||||
GdkRegion *region;
|
|
||||||
CachedPixels *pixels;
|
CachedPixels *pixels;
|
||||||
|
MetaRegion *region;
|
||||||
|
|
||||||
frames = META_FRAMES (widget);
|
frames = META_FRAMES (widget);
|
||||||
|
|
||||||
@@ -2289,7 +2268,7 @@ meta_frames_expose_event (GtkWidget *widget,
|
|||||||
|
|
||||||
populate_cache (frames, frame);
|
populate_cache (frames, frame);
|
||||||
|
|
||||||
region = gdk_region_copy (event->region);
|
region = meta_region_copy (event->region);
|
||||||
|
|
||||||
pixels = get_cache (frames, frame);
|
pixels = get_cache (frames, frame);
|
||||||
|
|
||||||
@@ -2298,7 +2277,7 @@ meta_frames_expose_event (GtkWidget *widget,
|
|||||||
clip_to_screen (region, frame);
|
clip_to_screen (region, frame);
|
||||||
meta_frames_paint_to_drawable (frames, frame, frame->window, region, 0, 0);
|
meta_frames_paint_to_drawable (frames, frame, frame->window, region, 0, 0);
|
||||||
|
|
||||||
gdk_region_destroy (region);
|
meta_region_destroy (region);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -2312,7 +2291,7 @@ static void
|
|||||||
meta_frames_paint_to_drawable (MetaFrames *frames,
|
meta_frames_paint_to_drawable (MetaFrames *frames,
|
||||||
MetaUIFrame *frame,
|
MetaUIFrame *frame,
|
||||||
GdkDrawable *drawable,
|
GdkDrawable *drawable,
|
||||||
GdkRegion *region,
|
MetaRegion *region,
|
||||||
int x_offset,
|
int x_offset,
|
||||||
int y_offset)
|
int y_offset)
|
||||||
{
|
{
|
||||||
@@ -2445,7 +2424,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
|
|||||||
GdkRectangle area, *areas;
|
GdkRectangle area, *areas;
|
||||||
int n_areas;
|
int n_areas;
|
||||||
int screen_width, screen_height;
|
int screen_width, screen_height;
|
||||||
GdkRegion *edges, *tmp_region;
|
MetaRegion *edges, *tmp_region;
|
||||||
int top, bottom, left, right;
|
int top, bottom, left, right;
|
||||||
|
|
||||||
/* Repaint each side of the frame */
|
/* Repaint each side of the frame */
|
||||||
@@ -2459,7 +2438,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
|
|||||||
META_CORE_GET_SCREEN_HEIGHT, &screen_height,
|
META_CORE_GET_SCREEN_HEIGHT, &screen_height,
|
||||||
META_CORE_GET_END);
|
META_CORE_GET_END);
|
||||||
|
|
||||||
edges = gdk_region_copy (region);
|
edges = meta_region_copy (region);
|
||||||
|
|
||||||
/* Punch out the client area */
|
/* Punch out the client area */
|
||||||
|
|
||||||
@@ -2467,13 +2446,13 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
|
|||||||
area.y = top;
|
area.y = top;
|
||||||
area.width = w;
|
area.width = w;
|
||||||
area.height = h;
|
area.height = h;
|
||||||
tmp_region = gdk_region_rectangle (&area);
|
tmp_region = meta_region_new_from_rectangle (&area);
|
||||||
gdk_region_subtract (edges, tmp_region);
|
meta_region_subtract (edges, tmp_region);
|
||||||
gdk_region_destroy (tmp_region);
|
meta_region_destroy (tmp_region);
|
||||||
|
|
||||||
/* Now draw remaining portion of region */
|
/* Now draw remaining portion of region */
|
||||||
|
|
||||||
gdk_region_get_rectangles (edges, &areas, &n_areas);
|
meta_region_get_rectangles (edges, &areas, &n_areas);
|
||||||
|
|
||||||
for (i = 0; i < n_areas; i++)
|
for (i = 0; i < n_areas; i++)
|
||||||
{
|
{
|
||||||
@@ -2516,7 +2495,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_free (areas);
|
g_free (areas);
|
||||||
gdk_region_destroy (edges);
|
meta_region_destroy (edges);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2579,7 +2558,7 @@ meta_frames_set_window_background (MetaFrames *frames,
|
|||||||
/* Set A in ARGB to window_background_alpha, if we have ARGB */
|
/* Set A in ARGB to window_background_alpha, if we have ARGB */
|
||||||
|
|
||||||
visual = gtk_widget_get_visual (GTK_WIDGET (frames));
|
visual = gtk_widget_get_visual (GTK_WIDGET (frames));
|
||||||
if (visual->depth == 32) /* we have ARGB */
|
if (gdk_visual_get_depth (visual) == 32) /* we have ARGB */
|
||||||
{
|
{
|
||||||
color.pixel = (color.pixel & 0xffffff) &
|
color.pixel = (color.pixel & 0xffffff) &
|
||||||
style->window_background_alpha << 24;
|
style->window_background_alpha << 24;
|
||||||
|
@@ -445,12 +445,11 @@ meta_window_menu_new (MetaFrames *frames,
|
|||||||
"workspace",
|
"workspace",
|
||||||
GINT_TO_POINTER (j));
|
GINT_TO_POINTER (j));
|
||||||
|
|
||||||
gtk_signal_connect_full (GTK_OBJECT (submi),
|
g_signal_connect_data (GTK_OBJECT (submi),
|
||||||
"activate",
|
"activate",
|
||||||
G_CALLBACK (activate_cb),
|
G_CALLBACK (activate_cb),
|
||||||
NULL,
|
|
||||||
md,
|
md,
|
||||||
g_free, FALSE, FALSE);
|
(GClosureNotify) g_free, 0);
|
||||||
|
|
||||||
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), submi);
|
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), submi);
|
||||||
|
|
||||||
@@ -473,12 +472,11 @@ meta_window_menu_new (MetaFrames *frames,
|
|||||||
md->menu = menu;
|
md->menu = menu;
|
||||||
md->op = menuitem.op;
|
md->op = menuitem.op;
|
||||||
|
|
||||||
gtk_signal_connect_full (GTK_OBJECT (mi),
|
g_signal_connect_data (GTK_OBJECT (mi),
|
||||||
"activate",
|
"activate",
|
||||||
G_CALLBACK (activate_cb),
|
G_CALLBACK (activate_cb),
|
||||||
NULL,
|
md,
|
||||||
md,
|
(GClosureNotify) g_free, 0);
|
||||||
g_free, FALSE, FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mi)
|
if (mi)
|
||||||
|
@@ -39,8 +39,6 @@
|
|||||||
|
|
||||||
#include "gtk-compat.h"
|
#include "gtk-compat.h"
|
||||||
|
|
||||||
static void meta_accel_label_class_init (MetaAccelLabelClass *klass);
|
|
||||||
static void meta_accel_label_init (MetaAccelLabel *accel_label);
|
|
||||||
static void meta_accel_label_destroy (GtkObject *object);
|
static void meta_accel_label_destroy (GtkObject *object);
|
||||||
static void meta_accel_label_finalize (GObject *object);
|
static void meta_accel_label_finalize (GObject *object);
|
||||||
static void meta_accel_label_size_request (GtkWidget *widget,
|
static void meta_accel_label_size_request (GtkWidget *widget,
|
||||||
@@ -51,34 +49,7 @@ static gboolean meta_accel_label_expose_event (GtkWidget *widget,
|
|||||||
static void meta_accel_label_update (MetaAccelLabel *accel_label);
|
static void meta_accel_label_update (MetaAccelLabel *accel_label);
|
||||||
static int meta_accel_label_get_accel_width (MetaAccelLabel *accel_label);
|
static int meta_accel_label_get_accel_width (MetaAccelLabel *accel_label);
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (MetaAccelLabel, meta_accel_label, GTK_TYPE_LABEL);
|
||||||
static GtkLabelClass *parent_class = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
GType
|
|
||||||
meta_accel_label_get_type (void)
|
|
||||||
{
|
|
||||||
static GType accel_label_type = 0;
|
|
||||||
|
|
||||||
if (!accel_label_type)
|
|
||||||
{
|
|
||||||
static const GtkTypeInfo accel_label_info =
|
|
||||||
{
|
|
||||||
"MetaAccelLabel",
|
|
||||||
sizeof (MetaAccelLabel),
|
|
||||||
sizeof (MetaAccelLabelClass),
|
|
||||||
(GtkClassInitFunc) meta_accel_label_class_init,
|
|
||||||
(GtkObjectInitFunc) meta_accel_label_init,
|
|
||||||
/* reserved_1 */ NULL,
|
|
||||||
/* reserved_2 */ NULL,
|
|
||||||
(GtkClassInitFunc) NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
accel_label_type = gtk_type_unique (GTK_TYPE_LABEL, &accel_label_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
return accel_label_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_accel_label_class_init (MetaAccelLabelClass *class)
|
meta_accel_label_class_init (MetaAccelLabelClass *class)
|
||||||
@@ -87,8 +58,6 @@ meta_accel_label_class_init (MetaAccelLabelClass *class)
|
|||||||
GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
|
GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
|
||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||||
|
|
||||||
parent_class = g_type_class_peek_parent (class);
|
|
||||||
|
|
||||||
gobject_class->finalize = meta_accel_label_finalize;
|
gobject_class->finalize = meta_accel_label_finalize;
|
||||||
|
|
||||||
object_class->destroy = meta_accel_label_destroy;
|
object_class->destroy = meta_accel_label_destroy;
|
||||||
@@ -199,7 +168,7 @@ meta_accel_label_destroy (GtkObject *object)
|
|||||||
accel_label->accel_mods = 0;
|
accel_label->accel_mods = 0;
|
||||||
accel_label->accel_key = 0;
|
accel_label->accel_key = 0;
|
||||||
|
|
||||||
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
GTK_OBJECT_CLASS (meta_accel_label_parent_class)->destroy (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -209,7 +178,7 @@ meta_accel_label_finalize (GObject *object)
|
|||||||
|
|
||||||
g_free (accel_label->accel_string);
|
g_free (accel_label->accel_string);
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (meta_accel_label_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -246,8 +215,8 @@ meta_accel_label_size_request (GtkWidget *widget,
|
|||||||
PangoLayout *layout;
|
PangoLayout *layout;
|
||||||
gint width;
|
gint width;
|
||||||
|
|
||||||
if (GTK_WIDGET_CLASS (parent_class)->size_request)
|
if (GTK_WIDGET_CLASS (meta_accel_label_parent_class)->size_request)
|
||||||
GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
|
GTK_WIDGET_CLASS (meta_accel_label_parent_class)->size_request (widget, requisition);
|
||||||
|
|
||||||
layout = gtk_widget_create_pango_layout (widget, accel_label->accel_string);
|
layout = gtk_widget_create_pango_layout (widget, accel_label->accel_string);
|
||||||
pango_layout_get_pixel_size (layout, &width, NULL);
|
pango_layout_get_pixel_size (layout, &width, NULL);
|
||||||
@@ -291,8 +260,8 @@ meta_accel_label_expose_event (GtkWidget *widget,
|
|||||||
allocation.width -= ac_width;
|
allocation.width -= ac_width;
|
||||||
gtk_widget_set_allocation (widget, &allocation);
|
gtk_widget_set_allocation (widget, &allocation);
|
||||||
|
|
||||||
if (GTK_WIDGET_CLASS (parent_class)->expose_event)
|
if (GTK_WIDGET_CLASS (meta_accel_label_parent_class)->expose_event)
|
||||||
GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
|
GTK_WIDGET_CLASS (meta_accel_label_parent_class)->expose_event (widget, event);
|
||||||
|
|
||||||
if (direction == GTK_TEXT_DIR_RTL)
|
if (direction == GTK_TEXT_DIR_RTL)
|
||||||
{
|
{
|
||||||
@@ -330,8 +299,8 @@ meta_accel_label_expose_event (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (GTK_WIDGET_CLASS (parent_class)->expose_event)
|
if (GTK_WIDGET_CLASS (meta_accel_label_parent_class)->expose_event)
|
||||||
GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
|
GTK_WIDGET_CLASS (meta_accel_label_parent_class)->expose_event (widget, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,8 +28,6 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "preview-widget.h"
|
#include "preview-widget.h"
|
||||||
|
|
||||||
static void meta_preview_class_init (MetaPreviewClass *klass);
|
|
||||||
static void meta_preview_init (MetaPreview *preview);
|
|
||||||
static void meta_preview_size_request (GtkWidget *widget,
|
static void meta_preview_size_request (GtkWidget *widget,
|
||||||
GtkRequisition *req);
|
GtkRequisition *req);
|
||||||
static void meta_preview_size_allocate (GtkWidget *widget,
|
static void meta_preview_size_allocate (GtkWidget *widget,
|
||||||
@@ -38,32 +36,7 @@ static gboolean meta_preview_expose (GtkWidget *widget,
|
|||||||
GdkEventExpose *event);
|
GdkEventExpose *event);
|
||||||
static void meta_preview_finalize (GObject *object);
|
static void meta_preview_finalize (GObject *object);
|
||||||
|
|
||||||
static GtkWidgetClass *parent_class;
|
G_DEFINE_TYPE (MetaPreview, meta_preview, GTK_TYPE_BIN);
|
||||||
|
|
||||||
GType
|
|
||||||
meta_preview_get_type (void)
|
|
||||||
{
|
|
||||||
static GType preview_type = 0;
|
|
||||||
|
|
||||||
if (!preview_type)
|
|
||||||
{
|
|
||||||
static const GtkTypeInfo preview_info =
|
|
||||||
{
|
|
||||||
"MetaPreview",
|
|
||||||
sizeof (MetaPreview),
|
|
||||||
sizeof (MetaPreviewClass),
|
|
||||||
(GtkClassInitFunc) meta_preview_class_init,
|
|
||||||
(GtkObjectInitFunc) meta_preview_init,
|
|
||||||
/* reserved_1 */ NULL,
|
|
||||||
/* reserved_2 */ NULL,
|
|
||||||
(GtkClassInitFunc) NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
preview_type = gtk_type_unique (GTK_TYPE_BIN, &preview_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
return preview_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_preview_class_init (MetaPreviewClass *class)
|
meta_preview_class_init (MetaPreviewClass *class)
|
||||||
@@ -72,7 +45,6 @@ meta_preview_class_init (MetaPreviewClass *class)
|
|||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class;
|
||||||
|
|
||||||
widget_class = (GtkWidgetClass*) class;
|
widget_class = (GtkWidgetClass*) class;
|
||||||
parent_class = g_type_class_peek (GTK_TYPE_BIN);
|
|
||||||
|
|
||||||
gobject_class->finalize = meta_preview_finalize;
|
gobject_class->finalize = meta_preview_finalize;
|
||||||
|
|
||||||
@@ -125,7 +97,7 @@ meta_preview_new (void)
|
|||||||
{
|
{
|
||||||
MetaPreview *preview;
|
MetaPreview *preview;
|
||||||
|
|
||||||
preview = gtk_type_new (META_TYPE_PREVIEW);
|
preview = g_object_new (META_TYPE_PREVIEW, NULL);
|
||||||
|
|
||||||
return GTK_WIDGET (preview);
|
return GTK_WIDGET (preview);
|
||||||
}
|
}
|
||||||
@@ -140,7 +112,7 @@ meta_preview_finalize (GObject *object)
|
|||||||
g_free (preview->title);
|
g_free (preview->title);
|
||||||
preview->title = NULL;
|
preview->title = NULL;
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (meta_preview_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -266,7 +238,7 @@ meta_preview_expose (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* draw child */
|
/* draw child */
|
||||||
return GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
|
return GTK_WIDGET_CLASS (meta_preview_parent_class)->expose_event (widget, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -483,11 +455,11 @@ meta_preview_get_mini_icon (void)
|
|||||||
return default_icon;
|
return default_icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkRegion *
|
MetaRegion *
|
||||||
meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint new_window_height)
|
meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint new_window_height)
|
||||||
{
|
{
|
||||||
GdkRectangle xrect;
|
GdkRectangle xrect;
|
||||||
GdkRegion *corners_xregion, *window_xregion;
|
MetaRegion *corners_xregion, *window_xregion;
|
||||||
gint flags;
|
gint flags;
|
||||||
MetaFrameLayout *fgeom;
|
MetaFrameLayout *fgeom;
|
||||||
MetaFrameStyle *frame_style;
|
MetaFrameStyle *frame_style;
|
||||||
@@ -496,14 +468,14 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
|
|||||||
|
|
||||||
flags = (META_PREVIEW (preview)->flags);
|
flags = (META_PREVIEW (preview)->flags);
|
||||||
|
|
||||||
window_xregion = gdk_region_new ();
|
window_xregion = meta_region_new ();
|
||||||
|
|
||||||
xrect.x = 0;
|
xrect.x = 0;
|
||||||
xrect.y = 0;
|
xrect.y = 0;
|
||||||
xrect.width = new_window_width;
|
xrect.width = new_window_width;
|
||||||
xrect.height = new_window_height;
|
xrect.height = new_window_height;
|
||||||
|
|
||||||
gdk_region_union_with_rect (window_xregion, &xrect);
|
meta_region_union_rectangle (window_xregion, &xrect);
|
||||||
|
|
||||||
if (preview->theme == NULL)
|
if (preview->theme == NULL)
|
||||||
return window_xregion;
|
return window_xregion;
|
||||||
@@ -514,7 +486,7 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
|
|||||||
|
|
||||||
fgeom = frame_style->layout;
|
fgeom = frame_style->layout;
|
||||||
|
|
||||||
corners_xregion = gdk_region_new ();
|
corners_xregion = meta_region_new ();
|
||||||
|
|
||||||
if (fgeom->top_left_corner_rounded_radius != 0)
|
if (fgeom->top_left_corner_rounded_radius != 0)
|
||||||
{
|
{
|
||||||
@@ -531,7 +503,7 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
|
|||||||
xrect.width = width;
|
xrect.width = width;
|
||||||
xrect.height = 1;
|
xrect.height = 1;
|
||||||
|
|
||||||
gdk_region_union_with_rect (corners_xregion, &xrect);
|
meta_region_union_rectangle (corners_xregion, &xrect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -549,7 +521,7 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
|
|||||||
xrect.width = width;
|
xrect.width = width;
|
||||||
xrect.height = 1;
|
xrect.height = 1;
|
||||||
|
|
||||||
gdk_region_union_with_rect (corners_xregion, &xrect);
|
meta_region_union_rectangle (corners_xregion, &xrect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -567,7 +539,7 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
|
|||||||
xrect.width = width;
|
xrect.width = width;
|
||||||
xrect.height = 1;
|
xrect.height = 1;
|
||||||
|
|
||||||
gdk_region_union_with_rect (corners_xregion, &xrect);
|
meta_region_union_rectangle (corners_xregion, &xrect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -585,12 +557,12 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
|
|||||||
xrect.width = width;
|
xrect.width = width;
|
||||||
xrect.height = 1;
|
xrect.height = 1;
|
||||||
|
|
||||||
gdk_region_union_with_rect (corners_xregion, &xrect);
|
meta_region_union_rectangle (corners_xregion, &xrect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gdk_region_subtract (window_xregion, corners_xregion);
|
meta_region_subtract (window_xregion, corners_xregion);
|
||||||
gdk_region_destroy (corners_xregion);
|
meta_region_destroy (corners_xregion);
|
||||||
|
|
||||||
return window_xregion;
|
return window_xregion;
|
||||||
}
|
}
|
||||||
|
@@ -21,7 +21,10 @@
|
|||||||
* 02111-1307, USA.
|
* 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
|
#include "region.h"
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
#ifndef META_PREVIEW_WIDGET_H
|
#ifndef META_PREVIEW_WIDGET_H
|
||||||
@@ -77,7 +80,7 @@ void meta_preview_set_frame_flags (MetaPreview *preview,
|
|||||||
void meta_preview_set_button_layout (MetaPreview *preview,
|
void meta_preview_set_button_layout (MetaPreview *preview,
|
||||||
const MetaButtonLayout *button_layout);
|
const MetaButtonLayout *button_layout);
|
||||||
|
|
||||||
GdkRegion * meta_preview_get_clip_region (MetaPreview *preview,
|
MetaRegion * meta_preview_get_clip_region (MetaPreview *preview,
|
||||||
gint new_window_width,
|
gint new_window_width,
|
||||||
gint new_window_height);
|
gint new_window_height);
|
||||||
|
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "../core/workspace-private.h"
|
#include "../core/workspace-private.h"
|
||||||
#include "../core/frame-private.h"
|
#include "../core/frame-private.h"
|
||||||
|
#include "region.h"
|
||||||
#include "draw-workspace.h"
|
#include "draw-workspace.h"
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@@ -459,9 +460,9 @@ display_entry (MetaTabPopup *popup,
|
|||||||
TabEntry *te)
|
TabEntry *te)
|
||||||
{
|
{
|
||||||
GdkRectangle rect;
|
GdkRectangle rect;
|
||||||
GdkRegion *region;
|
|
||||||
GdkRegion *inner_region;
|
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
|
MetaRegion *region;
|
||||||
|
MetaRegion *inner_region;
|
||||||
|
|
||||||
|
|
||||||
if (popup->current_selected_entry)
|
if (popup->current_selected_entry)
|
||||||
@@ -498,16 +499,16 @@ display_entry (MetaTabPopup *popup,
|
|||||||
gdk_window_set_background (window,
|
gdk_window_set_background (window,
|
||||||
>k_widget_get_style (popup->outline_window)->black);
|
>k_widget_get_style (popup->outline_window)->black);
|
||||||
|
|
||||||
region = gdk_region_rectangle (&rect);
|
region = meta_region_new_from_rectangle (&rect);
|
||||||
inner_region = gdk_region_rectangle (&te->inner_rect);
|
inner_region = meta_region_new_from_rectangle (&te->inner_rect);
|
||||||
gdk_region_subtract (region, inner_region);
|
meta_region_subtract (region, inner_region);
|
||||||
gdk_region_destroy (inner_region);
|
meta_region_destroy (inner_region);
|
||||||
|
|
||||||
gdk_window_shape_combine_region (window,
|
gdk_window_shape_combine_region (window,
|
||||||
region,
|
region,
|
||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
gdk_region_destroy (region);
|
meta_region_destroy (region);
|
||||||
|
|
||||||
/* This should piss off gtk a bit, but we don't want to raise
|
/* This should piss off gtk a bit, but we don't want to raise
|
||||||
* above the tab popup. So, instead of calling gtk_widget_show,
|
* above the tab popup. So, instead of calling gtk_widget_show,
|
||||||
|
@@ -70,94 +70,100 @@ static void run_position_expression_timings (void);
|
|||||||
static void run_theme_benchmark (void);
|
static void run_theme_benchmark (void);
|
||||||
|
|
||||||
|
|
||||||
static GtkItemFactoryEntry menu_items[] =
|
static const gchar *menu_item_string =
|
||||||
|
"<ui>\n"
|
||||||
|
"<menubar>\n"
|
||||||
|
"<menu name='Windows' action='Windows'>\n"
|
||||||
|
"<menuitem name='Dialog' action='Dialog'/>\n"
|
||||||
|
"<menuitem name='Modal dialog' action='Modal dialog'/>\n"
|
||||||
|
"<menuitem name='Utility' action='Utility'/>\n"
|
||||||
|
"<menuitem name='Splashscreen' action='Splashscreen'/>\n"
|
||||||
|
"<menuitem name='Top dock' action='Top dock'/>\n"
|
||||||
|
"<menuitem name='Bottom dock' action='Bottom dock'/>\n"
|
||||||
|
"<menuitem name='Left dock' action='Left dock'/>\n"
|
||||||
|
"<menuitem name='Right dock' action='Right dock'/>\n"
|
||||||
|
"<menuitem name='Desktop' action='Desktop'/>\n"
|
||||||
|
"</menu>\n"
|
||||||
|
"</menubar>\n"
|
||||||
|
"<toolbar>\n"
|
||||||
|
"<separator/>\n"
|
||||||
|
"<toolitem name='New' action='New'/>\n"
|
||||||
|
"<toolitem name='Open' action='Open'/>\n"
|
||||||
|
"<toolitem name='Quit' action='Quit'/>\n"
|
||||||
|
"<separator/>\n"
|
||||||
|
"</toolbar>\n"
|
||||||
|
"</ui>\n";
|
||||||
|
|
||||||
|
static GtkActionEntry menu_items[] =
|
||||||
{
|
{
|
||||||
{ N_("/_Windows"), NULL, NULL, 0, "<Branch>" },
|
{ "Windows", NULL, N_("_Windows"), NULL, NULL, NULL },
|
||||||
{ N_("/Windows/tearoff"), NULL, NULL, 0, "<Tearoff>" },
|
{ "Dialog", NULL, N_("_Dialog"), "<control>d", NULL, NULL },
|
||||||
{ N_("/Windows/_Dialog"), "<control>d", NULL, 0, NULL },
|
{ "Modal dialog", NULL, N_("_Modal dialog"), NULL, NULL, NULL },
|
||||||
{ N_("/Windows/_Modal dialog"), NULL, NULL, 0, NULL },
|
{ "Utility", NULL, N_("_Utility"), "<control>u", NULL, NULL },
|
||||||
{ N_("/Windows/_Utility"), "<control>u", NULL, 0, NULL },
|
{ "Splashscreen", NULL, N_("_Splashscreen"), "<control>s", NULL, NULL },
|
||||||
{ N_("/Windows/_Splashscreen"), "<control>s", NULL, 0, NULL },
|
{ "Top dock", NULL, N_("_Top dock"), NULL, NULL, NULL },
|
||||||
{ N_("/Windows/_Top dock"), NULL, NULL, 0, NULL },
|
{ "Bottom dock", NULL, N_("_Bottom dock"), NULL, NULL, NULL },
|
||||||
{ N_("/Windows/_Bottom dock"), NULL, NULL, 0, NULL },
|
{ "Left dock", NULL, N_("_Left dock"), NULL, NULL, NULL },
|
||||||
{ N_("/Windows/_Left dock"), NULL, NULL, 0, NULL },
|
{ "Right dock", NULL, N_("_Right dock"), NULL, NULL, NULL },
|
||||||
{ N_("/Windows/_Right dock"), NULL, NULL, 0, NULL },
|
{ "All docks", NULL, N_("_All docks"), NULL, NULL, NULL },
|
||||||
{ N_("/Windows/_All docks"), NULL, NULL, 0, NULL },
|
{ "Desktop", NULL, N_("Des_ktop"), NULL, NULL, NULL }
|
||||||
{ N_("/Windows/Des_ktop"), NULL, NULL, 0, NULL }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static GtkActionEntry tool_items[] =
|
||||||
insert_stock_button (GtkWidget *toolbar,
|
|
||||||
const gchar *stock_id,
|
|
||||||
const gchar *text)
|
|
||||||
{
|
{
|
||||||
GtkToolItem *button;
|
{ "New", GTK_STOCK_NEW, NULL, NULL,
|
||||||
|
N_("Open another one of these windows"), NULL },
|
||||||
button = gtk_tool_button_new_from_stock (stock_id);
|
{ "Open", GTK_STOCK_OPEN, NULL, NULL,
|
||||||
gtk_tool_item_set_tooltip_text (button, text);
|
N_("This is a demo button with an 'open' icon"), NULL },
|
||||||
gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
|
{ "Quit", GTK_STOCK_QUIT, NULL, NULL,
|
||||||
button,
|
N_("This is a demo button with a 'quit' icon"), NULL }
|
||||||
-1); /*-1 means append to end of toolbar*/
|
};
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
normal_contents (void)
|
normal_contents (void)
|
||||||
{
|
{
|
||||||
GtkWidget *table;
|
GtkWidget *table;
|
||||||
GtkWidget *toolbar;
|
|
||||||
GtkWidget *handlebox;
|
GtkWidget *handlebox;
|
||||||
GtkWidget *statusbar;
|
GtkWidget *statusbar;
|
||||||
GtkWidget *contents;
|
GtkWidget *contents;
|
||||||
GtkWidget *sw;
|
GtkWidget *sw;
|
||||||
GtkItemFactory *item_factory;
|
GtkActionGroup *action_group;
|
||||||
|
GtkUIManager *ui_manager;
|
||||||
|
|
||||||
table = gtk_table_new (1, 4, FALSE);
|
table = gtk_table_new (1, 4, FALSE);
|
||||||
|
|
||||||
/* Create the menubar
|
/* Create the menubar
|
||||||
*/
|
*/
|
||||||
|
|
||||||
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", NULL);
|
action_group = gtk_action_group_new ("mainmenu");
|
||||||
|
gtk_action_group_add_actions (action_group,
|
||||||
|
menu_items,
|
||||||
|
G_N_ELEMENTS (menu_items),
|
||||||
|
NULL);
|
||||||
|
gtk_action_group_add_actions (action_group,
|
||||||
|
tool_items,
|
||||||
|
G_N_ELEMENTS (tool_items),
|
||||||
|
NULL);
|
||||||
|
|
||||||
gtk_item_factory_set_translate_func(item_factory,
|
ui_manager = gtk_ui_manager_new ();
|
||||||
(GtkTranslateFunc)gettext, NULL, NULL);
|
|
||||||
|
|
||||||
/* Set up item factory to go away */
|
gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
|
||||||
g_object_ref (item_factory);
|
|
||||||
g_object_ref_sink (item_factory);
|
|
||||||
g_object_unref (item_factory);
|
|
||||||
g_object_set_data_full (G_OBJECT (table),
|
|
||||||
"<main>",
|
|
||||||
item_factory,
|
|
||||||
(GDestroyNotify) g_object_unref);
|
|
||||||
|
|
||||||
/* create menu items */
|
/* create menu items */
|
||||||
gtk_item_factory_create_items (item_factory, G_N_ELEMENTS (menu_items),
|
gtk_ui_manager_add_ui_from_string (ui_manager, menu_item_string, -1, NULL);
|
||||||
menu_items, NULL);
|
|
||||||
|
|
||||||
gtk_table_attach (GTK_TABLE (table),
|
gtk_table_attach (GTK_TABLE (table),
|
||||||
gtk_item_factory_get_widget (item_factory, "<main>"),
|
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
|
||||||
/* X direction */ /* Y direction */
|
/* X direction */ /* Y direction */
|
||||||
0, 1, 0, 1,
|
0, 1, 0, 1,
|
||||||
GTK_EXPAND | GTK_FILL, 0,
|
GTK_EXPAND | GTK_FILL, 0,
|
||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
/* Create the toolbar
|
|
||||||
*/
|
|
||||||
toolbar = gtk_toolbar_new ();
|
|
||||||
|
|
||||||
insert_stock_button (toolbar, GTK_STOCK_NEW,
|
|
||||||
_("Open another one of these windows"));
|
|
||||||
insert_stock_button (toolbar, GTK_STOCK_OPEN,
|
|
||||||
_("This is a demo button with an 'open' icon"));
|
|
||||||
insert_stock_button (toolbar, GTK_STOCK_QUIT,
|
|
||||||
_("This is a demo button with a 'quit' icon"));
|
|
||||||
|
|
||||||
handlebox = gtk_handle_box_new ();
|
handlebox = gtk_handle_box_new ();
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (handlebox), toolbar);
|
gtk_container_add (GTK_CONTAINER (handlebox),
|
||||||
|
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"));
|
||||||
|
|
||||||
gtk_table_attach (GTK_TABLE (table),
|
gtk_table_attach (GTK_TABLE (table),
|
||||||
handlebox,
|
handlebox,
|
||||||
/* X direction */ /* Y direction */
|
/* X direction */ /* Y direction */
|
||||||
@@ -203,6 +209,8 @@ normal_contents (void)
|
|||||||
|
|
||||||
gtk_widget_show_all (table);
|
gtk_widget_show_all (table);
|
||||||
|
|
||||||
|
g_object_unref (ui_manager);
|
||||||
|
|
||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,8 +26,6 @@
|
|||||||
|
|
||||||
#include "gtk-compat.h"
|
#include "gtk-compat.h"
|
||||||
|
|
||||||
static void meta_area_class_init (MetaAreaClass *klass);
|
|
||||||
static void meta_area_init (MetaArea *area);
|
|
||||||
static void meta_area_size_request (GtkWidget *widget,
|
static void meta_area_size_request (GtkWidget *widget,
|
||||||
GtkRequisition *req);
|
GtkRequisition *req);
|
||||||
static gint meta_area_expose (GtkWidget *widget,
|
static gint meta_area_expose (GtkWidget *widget,
|
||||||
@@ -35,32 +33,7 @@ static gint meta_area_expose (GtkWidget *widget,
|
|||||||
static void meta_area_finalize (GObject *object);
|
static void meta_area_finalize (GObject *object);
|
||||||
|
|
||||||
|
|
||||||
static GtkMiscClass *parent_class;
|
G_DEFINE_TYPE (MetaArea, meta_area, GTK_TYPE_MISC);
|
||||||
|
|
||||||
GType
|
|
||||||
meta_area_get_type (void)
|
|
||||||
{
|
|
||||||
static GType area_type = 0;
|
|
||||||
|
|
||||||
if (!area_type)
|
|
||||||
{
|
|
||||||
static const GtkTypeInfo area_info =
|
|
||||||
{
|
|
||||||
"MetaArea",
|
|
||||||
sizeof (MetaArea),
|
|
||||||
sizeof (MetaAreaClass),
|
|
||||||
(GtkClassInitFunc) meta_area_class_init,
|
|
||||||
(GtkObjectInitFunc) meta_area_init,
|
|
||||||
/* reserved_1 */ NULL,
|
|
||||||
/* reserved_2 */ NULL,
|
|
||||||
(GtkClassInitFunc) NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
area_type = gtk_type_unique (GTK_TYPE_MISC, &area_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
return area_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_area_class_init (MetaAreaClass *class)
|
meta_area_class_init (MetaAreaClass *class)
|
||||||
@@ -71,7 +44,6 @@ meta_area_class_init (MetaAreaClass *class)
|
|||||||
|
|
||||||
object_class = (GtkObjectClass*) class;
|
object_class = (GtkObjectClass*) class;
|
||||||
widget_class = (GtkWidgetClass*) class;
|
widget_class = (GtkWidgetClass*) class;
|
||||||
parent_class = g_type_class_peek (gtk_misc_get_type ());
|
|
||||||
|
|
||||||
gobject_class->finalize = meta_area_finalize;
|
gobject_class->finalize = meta_area_finalize;
|
||||||
|
|
||||||
@@ -90,7 +62,7 @@ meta_area_new (void)
|
|||||||
{
|
{
|
||||||
MetaArea *area;
|
MetaArea *area;
|
||||||
|
|
||||||
area = gtk_type_new (META_TYPE_AREA);
|
area = g_object_new (META_TYPE_AREA, NULL);
|
||||||
|
|
||||||
return GTK_WIDGET (area);
|
return GTK_WIDGET (area);
|
||||||
}
|
}
|
||||||
@@ -105,7 +77,7 @@ meta_area_finalize (GObject *object)
|
|||||||
if (area->dnotify)
|
if (area->dnotify)
|
||||||
(* area->dnotify) (area->user_data);
|
(* area->dnotify) (area->user_data);
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (meta_area_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
|
@@ -32,6 +32,7 @@
|
|||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
|
|
||||||
#include "inlinepixbufs.h"
|
#include "inlinepixbufs.h"
|
||||||
|
#include "gdk-compat.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -475,7 +476,7 @@ get_cmap (GdkPixmap *pixmap)
|
|||||||
|
|
||||||
/* Be sure we aren't going to blow up due to visual mismatch */
|
/* Be sure we aren't going to blow up due to visual mismatch */
|
||||||
if (cmap &&
|
if (cmap &&
|
||||||
(gdk_colormap_get_visual (cmap)->depth !=
|
(gdk_visual_get_depth (gdk_colormap_get_visual (cmap)) !=
|
||||||
gdk_drawable_get_depth (pixmap)))
|
gdk_drawable_get_depth (pixmap)))
|
||||||
{
|
{
|
||||||
cmap = NULL;
|
cmap = NULL;
|
||||||
|
Reference in New Issue
Block a user