aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-03-31 21:02:35 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-04-01 00:10:53 +0800
commitff76ff2a2aecc2628e609700e28bcc47f329a2e8 (patch)
tree487439d117edbe32d0a04ff8a05777f33e0b8f6c /shell
parent174ddee9b98f997ac298105036838699e0ce3a62 (diff)
downloadgsoc2013-evolution-ff76ff2a2aecc2628e609700e28bcc47f329a2e8.tar
gsoc2013-evolution-ff76ff2a2aecc2628e609700e28bcc47f329a2e8.tar.gz
gsoc2013-evolution-ff76ff2a2aecc2628e609700e28bcc47f329a2e8.tar.bz2
gsoc2013-evolution-ff76ff2a2aecc2628e609700e28bcc47f329a2e8.tar.lz
gsoc2013-evolution-ff76ff2a2aecc2628e609700e28bcc47f329a2e8.tar.xz
gsoc2013-evolution-ff76ff2a2aecc2628e609700e28bcc47f329a2e8.tar.zst
gsoc2013-evolution-ff76ff2a2aecc2628e609700e28bcc47f329a2e8.zip
Remove e_shell_detect_meego().
No longer used.
Diffstat (limited to 'shell')
-rw-r--r--shell/Makefile.am2
-rw-r--r--shell/e-shell-meego.c173
-rw-r--r--shell/e-shell-meego.h26
-rw-r--r--shell/main.c1
4 files changed, 0 insertions, 202 deletions
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 8961444800..355ec69fad 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -65,8 +65,6 @@ libeshell_la_SOURCES = \
e-shell-backend.c \
e-shell-content.c \
e-shell-enumtypes.c \
- e-shell-meego.c \
- e-shell-meego.h \
e-shell-searchbar.c \
e-shell-sidebar.c \
e-shell-switcher.c \
diff --git a/shell/e-shell-meego.c b/shell/e-shell-meego.c
deleted file mode 100644
index 4833ab5154..0000000000
--- a/shell/e-shell-meego.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * e-shell-meego.c
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Inspired by mx's mx-application.c by
- * Thomas Wood <thomas.wood@intel.com>,
- * Chris Lord <chris@linux.intel.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <e-shell-meego.h>
-
-#ifndef G_OS_WIN32
-#include <gdk/gdkx.h>
-#include <X11/Xatom.h>
-#endif
-
-#ifdef G_OS_WIN32
-void
-e_shell_detect_meego (gboolean *is_meego,
- gboolean *small_screen)
-{
- *is_meego = *small_screen = FALSE;
-}
-#else
-void
-e_shell_detect_meego (gboolean *is_meego,
- gboolean *small_screen)
-{
- Window *wm_window_v = NULL;
- guchar *moblin_string = NULL;
- GModule *module = NULL;
- /*
- * Wow - this is unpleasant, but it is hard to link directly
- * to the X libraries, and we have to use XGetWindowProperty
- * to get to the (mind-mashed) 'supporting' window.
- */
- struct {
- gint (*XFree) (gpointer);
- gint (*XGetWindowProperty) (Display *, XID, Atom, long, long, Bool,
- Atom, Atom *, gint *, gulong *,
- gulong *, guchar **);
- } fns = { 0, 0 };
-
- *is_meego = *small_screen = FALSE;
-
- moblin_string = (guchar *) g_getenv ("EVO_MEEGO");
- if (!moblin_string) {
- GdkScreen *screen;
- GdkDisplay *display;
- GdkAtom wm_win, mob_atom;
- Atom dummy_t;
- gulong dummy_l;
- gint dummy_i;
-
- if (!gdk_display_get_default ())
- return;
-
- wm_win = gdk_atom_intern ("_NET_SUPPORTING_WM_CHECK", TRUE);
- mob_atom = gdk_atom_intern ("_DAWATI", TRUE);
- if (!wm_win || !mob_atom)
- return;
-
- module = g_module_open (NULL, 0);
- if (!module)
- return;
- g_module_symbol (module, "XFree", (gpointer) &fns.XFree);
- g_module_symbol (
- module, "XGetWindowProperty",
- (gpointer) &fns.XGetWindowProperty);
- if (!fns.XFree || !fns.XGetWindowProperty) {
- fprintf (stderr, "defective X server\n");
- goto exit;
- }
-
- display = gdk_display_get_default ();
- screen = gdk_display_get_default_screen (display);
-
- gdk_error_trap_push ();
-
- /* get the window manager's supporting window */
- fns.XGetWindowProperty (
- gdk_x11_display_get_xdisplay (display),
- GDK_WINDOW_XID (gdk_screen_get_root_window (screen)),
- gdk_x11_atom_to_xatom_for_display (display, wm_win),
- 0, 1, False, XA_WINDOW,
- &dummy_t, &dummy_i,
- &dummy_l, &dummy_l,
- (guchar **) (&wm_window_v));
-
- /* get the '_Moblin' setting */
- if (wm_window_v && (*wm_window_v != None))
- fns.XGetWindowProperty (
- gdk_x11_display_get_xdisplay (display),
- *wm_window_v,
- gdk_x11_atom_to_xatom_for_display (display, mob_atom),
- 0, 8192, False, XA_STRING,
- &dummy_t, &dummy_i,
- &dummy_l, &dummy_l,
- &moblin_string);
-
- gdk_error_trap_pop_ignored ();
- }
-
- if (moblin_string) {
- gint i;
- gchar **props;
-
- g_warning ("prop '%s'", moblin_string);
-
- /* use meego theming tweaks */
- *is_meego = TRUE;
-
- props = g_strsplit ((gchar *) moblin_string, ":", -1);
- for (i = 0; props && props[i]; i++) {
- gchar **pair = g_strsplit (props[i], "=", 2);
-
- g_warning (
- "pair '%s'='%s'", pair ? pair[0] : "<null>",
- pair && pair[0] ? pair[1] : "<null>");
-
- /* Hunt for session-type=small-screen */
- if (pair && pair[0] && !g_ascii_strcasecmp (pair[0], "session-type"))
- *small_screen = !g_ascii_strcasecmp (pair[1], "small-screen");
- g_strfreev (pair);
- }
- g_strfreev (props);
- if (fns.XFree)
- fns.XFree (moblin_string);
- }
-
- exit:
- if (wm_window_v)
- fns.XFree (wm_window_v);
- if (module)
- g_module_close (module);
-}
-#endif
-
-#ifdef TEST_APP
-/* gcc -g -O0 -Wall -I. -DTEST_APP `pkg-config --cflags --libs gtk+-2.0`
- * e-shell-meego.c && ./a.out */
-#include <gtk/gtk.h>
-
-gint main (gint argc, gchar **argv)
-{
- gboolean is_meego, small_screen;
-
- gtk_init (&argc, &argv);
-
- e_shell_detect_meego (&is_meego, &small_screen);
- fprintf (stderr, "Meego ? %d small ? %d\n", is_meego, small_screen);
-
- return 0;
-}
-#endif
diff --git a/shell/e-shell-meego.h b/shell/e-shell-meego.h
deleted file mode 100644
index ba0b23d50c..0000000000
--- a/shell/e-shell-meego.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * e-shell-meego.h
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- */
-#ifndef E_SHELL_MEEGO_H
-#define E_SHELL_MEEGO_H
-
-#include <glib.h>
-
-extern void e_shell_detect_meego (gboolean *is_meego, gboolean *small_screen);
-
-#endif /* E_SHELL_MEEGO_H */
diff --git a/shell/main.c b/shell/main.c
index 3e462be484..a8342e1b4a 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -59,7 +59,6 @@
#include "e-shell.h"
#include "e-shell-migrate.h"
-#include "e-shell-meego.h"
#include "es-event.h"
#ifdef G_OS_WIN32