From 6e4d6da191523f8415959e53615ff92339200e42 Mon Sep 17 00:00:00 2001 From: Thomas James Alexander Thurman Date: Wed, 26 Jul 2006 02:06:17 +0000 Subject: [PATCH] Kill usage of libegg. #348633. --- ChangeLog | 4 +++ configure.in | 2 +- src/Makefile.am | 14 +-------- src/ui.c | 80 ++++++++++++++++++++++++------------------------- 4 files changed, 46 insertions(+), 54 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b758312c..395c619c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-07-25 Vincent Untz + + * src/Makefile.am, ui.c: Kill usage of libegg. #348633. + 2006-07-24 Thomas Thurman * configure.in: post-release version bump to 2.15.21 diff --git a/configure.in b/configure.in index aec79c0a1..ac8104c68 100644 --- a/configure.in +++ b/configure.in @@ -101,7 +101,7 @@ if test "x$GCC" = "xyes"; then fi changequote([,])dnl -METACITY_PC_MODULES='gtk+-2.0 >= 2.2.0 pango >= 1.2.0' +METACITY_PC_MODULES='gtk+-2.0 >= 2.10.0 pango >= 1.2.0' AC_ARG_ENABLE(gconf, AC_HELP_STRING([--disable-gconf], diff --git a/src/Makefile.am b/src/Makefile.am index 718156d79..4815aa4cf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,10 +4,6 @@ SUBDIRS=wm-tester tools themes INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1 -EGGFILES= \ - eggaccelerators.c \ - eggaccelerators.h - metacity_SOURCES= \ async-getprop.c \ async-getprop.h \ @@ -97,8 +93,7 @@ metacity_SOURCES= \ workspace.c \ workspace.h \ xprops.c \ - xprops.h \ - $(EGGFILES) + xprops.h # by setting libmetacity_private_la_CFLAGS, the files shared with # metacity proper will be compiled with different names. @@ -193,13 +188,6 @@ pkgconfig_DATA = libmetacity-private.pc EXTRA_DIST=$(desktopfiles_files) \ $(IMAGES) $(schema_DATA) \ - update-from-egg.sh \ $(desktopfiles_in_files) \ $(schema_in_files) \ libmetacity-private.pc.in - - -EGGDIR=$(srcdir)/../../libegg/libegg - -regenerate-built-sources: - EGGFILES="$(EGGFILES)" EGGDIR="$(EGGDIR)" $(srcdir)/update-from-egg.sh diff --git a/src/ui.c b/src/ui.c index cc067e3ff..d204cc10f 100644 --- a/src/ui.c +++ b/src/ui.c @@ -29,8 +29,6 @@ #include "core.h" #include "theme.h" -#include "eggaccelerators.h" - #include "inlinepixbufs.h" #include @@ -744,7 +742,7 @@ meta_ui_parse_accelerator (const char *accel, unsigned int *keysym, MetaVirtualModifier *mask) { - EggVirtualModifierType gdk_mask = 0; + GdkModifierType gdk_mask = 0; guint gdk_sym = 0; *keysym = 0; @@ -753,36 +751,37 @@ meta_ui_parse_accelerator (const char *accel, if (strcmp (accel, "disabled") == 0) return TRUE; - if (!egg_accelerator_parse_virtual (accel, &gdk_sym, &gdk_mask)) + gtk_accelerator_parse (accel, &gdk_sym, &gdk_mask); + if (gdk_mask == 0 && gdk_sym == 0) return FALSE; if (gdk_sym == None) return FALSE; - if (gdk_mask & EGG_VIRTUAL_RELEASE_MASK) /* we don't allow this */ + if (gdk_mask & GDK_RELEASE_MASK) /* we don't allow this */ return FALSE; *keysym = gdk_sym; - if (gdk_mask & EGG_VIRTUAL_SHIFT_MASK) + if (gdk_mask & GDK_SHIFT_MASK) *mask |= META_VIRTUAL_SHIFT_MASK; - if (gdk_mask & EGG_VIRTUAL_CONTROL_MASK) + if (gdk_mask & GDK_CONTROL_MASK) *mask |= META_VIRTUAL_CONTROL_MASK; - if (gdk_mask & EGG_VIRTUAL_ALT_MASK) + if (gdk_mask & GDK_MOD1_MASK) *mask |= META_VIRTUAL_ALT_MASK; - if (gdk_mask & EGG_VIRTUAL_MOD2_MASK) + if (gdk_mask & GDK_MOD2_MASK) *mask |= META_VIRTUAL_MOD2_MASK; - if (gdk_mask & EGG_VIRTUAL_MOD3_MASK) + if (gdk_mask & GDK_MOD3_MASK) *mask |= META_VIRTUAL_MOD3_MASK; - if (gdk_mask & EGG_VIRTUAL_MOD4_MASK) + if (gdk_mask & GDK_MOD4_MASK) *mask |= META_VIRTUAL_MOD4_MASK; - if (gdk_mask & EGG_VIRTUAL_MOD5_MASK) + if (gdk_mask & GDK_MOD5_MASK) *mask |= META_VIRTUAL_MOD5_MASK; - if (gdk_mask & EGG_VIRTUAL_SUPER_MASK) + if (gdk_mask & GDK_SUPER_MASK) *mask |= META_VIRTUAL_SUPER_MASK; - if (gdk_mask & EGG_VIRTUAL_HYPER_MASK) + if (gdk_mask & GDK_HYPER_MASK) *mask |= META_VIRTUAL_HYPER_MASK; - if (gdk_mask & EGG_VIRTUAL_META_MASK) + if (gdk_mask & GDK_META_MASK) *mask |= META_VIRTUAL_META_MASK; return TRUE; @@ -793,7 +792,7 @@ gchar* meta_ui_accelerator_name (unsigned int keysym, MetaVirtualModifier mask) { - EggVirtualModifierType mods = 0; + GdkModifierType mods = 0; if (keysym == 0 && mask == 0) { @@ -801,27 +800,27 @@ meta_ui_accelerator_name (unsigned int keysym, } if (mask & META_VIRTUAL_SHIFT_MASK) - mods |= EGG_VIRTUAL_SHIFT_MASK; + mods |= GDK_SHIFT_MASK; if (mask & META_VIRTUAL_CONTROL_MASK) - mods |= EGG_VIRTUAL_CONTROL_MASK; + mods |= GDK_CONTROL_MASK; if (mask & META_VIRTUAL_ALT_MASK) - mods |= EGG_VIRTUAL_ALT_MASK; + mods |= GDK_MOD1_MASK; if (mask & META_VIRTUAL_MOD2_MASK) - mods |= EGG_VIRTUAL_MOD2_MASK; + mods |= GDK_MOD2_MASK; if (mask & META_VIRTUAL_MOD3_MASK) - mods |= EGG_VIRTUAL_MOD3_MASK; + mods |= GDK_MOD3_MASK; if (mask & META_VIRTUAL_MOD4_MASK) - mods |= EGG_VIRTUAL_MOD4_MASK; + mods |= GDK_MOD4_MASK; if (mask & META_VIRTUAL_MOD5_MASK) - mods |= EGG_VIRTUAL_MOD5_MASK; + mods |= GDK_MOD5_MASK; if (mask & META_VIRTUAL_SUPER_MASK) - mods |= EGG_VIRTUAL_SUPER_MASK; + mods |= GDK_SUPER_MASK; if (mask & META_VIRTUAL_HYPER_MASK) - mods |= EGG_VIRTUAL_HYPER_MASK; + mods |= GDK_HYPER_MASK; if (mask & META_VIRTUAL_META_MASK) - mods |= EGG_VIRTUAL_META_MASK; + mods |= GDK_META_MASK; - return egg_virtual_accelerator_name (keysym, mods); + return gtk_accelerator_name (keysym, mods); } @@ -829,7 +828,7 @@ gboolean meta_ui_parse_modifier (const char *accel, MetaVirtualModifier *mask) { - EggVirtualModifierType gdk_mask = 0; + GdkModifierType gdk_mask = 0; guint gdk_sym = 0; *mask = 0; @@ -837,34 +836,35 @@ meta_ui_parse_modifier (const char *accel, if (strcmp (accel, "disabled") == 0) return TRUE; - if (!egg_accelerator_parse_virtual (accel, &gdk_sym, &gdk_mask)) + gtk_accelerator_parse (accel, &gdk_sym, &gdk_mask); + if (gdk_mask == 0 && gdk_sym == 0) return FALSE; if (gdk_sym != None) return FALSE; - if (gdk_mask & EGG_VIRTUAL_RELEASE_MASK) /* we don't allow this */ + if (gdk_mask & GDK_RELEASE_MASK) /* we don't allow this */ return FALSE; - if (gdk_mask & EGG_VIRTUAL_SHIFT_MASK) + if (gdk_mask & GDK_SHIFT_MASK) *mask |= META_VIRTUAL_SHIFT_MASK; - if (gdk_mask & EGG_VIRTUAL_CONTROL_MASK) + if (gdk_mask & GDK_CONTROL_MASK) *mask |= META_VIRTUAL_CONTROL_MASK; - if (gdk_mask & EGG_VIRTUAL_ALT_MASK) + if (gdk_mask & GDK_MOD1_MASK) *mask |= META_VIRTUAL_ALT_MASK; - if (gdk_mask & EGG_VIRTUAL_MOD2_MASK) + if (gdk_mask & GDK_MOD2_MASK) *mask |= META_VIRTUAL_MOD2_MASK; - if (gdk_mask & EGG_VIRTUAL_MOD3_MASK) + if (gdk_mask & GDK_MOD3_MASK) *mask |= META_VIRTUAL_MOD3_MASK; - if (gdk_mask & EGG_VIRTUAL_MOD4_MASK) + if (gdk_mask & GDK_MOD4_MASK) *mask |= META_VIRTUAL_MOD4_MASK; - if (gdk_mask & EGG_VIRTUAL_MOD5_MASK) + if (gdk_mask & GDK_MOD5_MASK) *mask |= META_VIRTUAL_MOD5_MASK; - if (gdk_mask & EGG_VIRTUAL_SUPER_MASK) + if (gdk_mask & GDK_SUPER_MASK) *mask |= META_VIRTUAL_SUPER_MASK; - if (gdk_mask & EGG_VIRTUAL_HYPER_MASK) + if (gdk_mask & GDK_HYPER_MASK) *mask |= META_VIRTUAL_HYPER_MASK; - if (gdk_mask & EGG_VIRTUAL_META_MASK) + if (gdk_mask & GDK_META_MASK) *mask |= META_VIRTUAL_META_MASK; return TRUE;