[vinagre] Removed unused functions, since now we use GtkApplication
- From: Jonh Wendell <jwendell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre] Removed unused functions, since now we use GtkApplication
- Date: Thu, 15 Jul 2010 19:52:17 +0000 (UTC)
commit 349c7dfa10c919a78698a924066edd6e2550daf4
Author: Jonh Wendell <jwendell gnome org>
Date: Thu Jul 15 16:51:42 2010 -0300
Removed unused functions, since now we use GtkApplication
configure.ac | 2 -
vinagre/vinagre-utils.c | 167 -----------------------------------------------
vinagre/vinagre-utils.h | 6 --
3 files changed, 0 insertions(+), 175 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 93f79dd..e3c1c08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,6 @@ AC_PROG_MAKE_SET
AC_PROG_RANLIB
# Checks for header files.
-AC_PATH_X
AC_CHECK_HEADERS([sys/uio.h sys/param.h sys/un.h arpa/inet.h stropts.h fcntl.h limits.h locale.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h termios.h unistd.h utmp.h])
# Checks for typedefs, structures, and compiler characteristics.
@@ -109,7 +108,6 @@ PKG_CHECK_MODULES(VINAGRE, \
gnome-keyring-1 \
libxml-2.0 >= $XML_REQUIRED \
dbus-glib-1 \
- x11
)
AC_SUBST(VINAGRE_CFLAGS)
AC_SUBST(VINAGRE_LIBS)
diff --git a/vinagre/vinagre-utils.c b/vinagre/vinagre-utils.c
index daaaf2a..95201f9 100644
--- a/vinagre/vinagre-utils.c
+++ b/vinagre/vinagre-utils.c
@@ -29,14 +29,6 @@
#include <config.h>
#endif
-/* For the workspace/viewport stuff */
-#ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#endif
-
GtkWidget *
vinagre_utils_create_small_close_button ()
{
@@ -255,165 +247,6 @@ vinagre_utils_handle_debug (void)
initialized = TRUE;
}
-/* the following two functions are courtesy of galeon */
-
-/**
- * gedit_utils_get_current_workspace: Get the current workspace
- *
- * Get the currently visible workspace for the #GdkScreen.
- *
- * If the X11 window property isn't found, 0 (the first workspace)
- * is returned.
- */
-guint
-vinagre_utils_get_current_workspace (GdkScreen *screen)
-{
-#ifdef GDK_WINDOWING_X11
- GdkWindow *root_win;
- GdkDisplay *display;
- Atom type;
- gint format;
- gulong nitems;
- gulong bytes_after;
- guint *current_desktop;
- gint err, result;
- guint ret = 0;
-
- g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
-
- root_win = gdk_screen_get_root_window (screen);
- display = gdk_screen_get_display (screen);
-
- gdk_error_trap_push ();
- result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (root_win),
- gdk_x11_get_xatom_by_name_for_display (display, "_NET_CURRENT_DESKTOP"),
- 0, G_MAXLONG, False, XA_CARDINAL, &type, &format, &nitems,
- &bytes_after, (gpointer) ¤t_desktop);
- err = gdk_error_trap_pop ();
-
- if (err != Success || result != Success)
- return ret;
-
- if (type == XA_CARDINAL && format == 32 && nitems > 0)
- ret = current_desktop[0];
-
- XFree (current_desktop);
- return ret;
-#else
- /* FIXME: on mac etc proably there are native APIs
- * to get the current workspace etc */
- return 0;
-#endif
-}
-
-/**
- * gedit_utils_get_window_workspace: Get the workspace the window is on
- *
- * This function gets the workspace that the #GtkWindow is visible on,
- * it returns GEDIT_ALL_WORKSPACES if the window is sticky, or if
- * the window manager doesn support this function
- */
-guint
-vinagre_utils_get_window_workspace (GtkWindow *gtkwindow)
-{
-#ifdef GDK_WINDOWING_X11
- GdkWindow *window;
- GdkDisplay *display;
- Atom type;
- gint format;
- gulong nitems;
- gulong bytes_after;
- guint *workspace;
- gint err, result;
- guint ret = VINAGRE_ALL_WORKSPACES;
-
- g_return_val_if_fail (GTK_IS_WINDOW (gtkwindow), 0);
- g_return_val_if_fail (gtk_widget_get_realized (GTK_WIDGET (gtkwindow)), 0);
-
- window = gtk_widget_get_window (GTK_WIDGET (gtkwindow));
- display = gdk_drawable_get_display (window);
-
- gdk_error_trap_push ();
- result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window),
- gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP"),
- 0, G_MAXLONG, False, XA_CARDINAL, &type, &format, &nitems,
- &bytes_after, (gpointer) &workspace);
- err = gdk_error_trap_pop ();
-
- if (err != Success || result != Success)
- return ret;
-
- if (type == XA_CARDINAL && format == 32 && nitems > 0)
- ret = workspace[0];
-
- XFree (workspace);
- return ret;
-#else
- /* FIXME: on mac etc proably there are native APIs
- * to get the current workspace etc */
- return 0;
-#endif
-}
-
-/**
- * gedit_utils_get_current_viewport: Get the current viewport origin
- *
- * Get the currently visible viewport origin for the #GdkScreen.
- *
- * If the X11 window property isn't found, (0, 0) is returned.
- */
-void
-vinagre_utils_get_current_viewport (GdkScreen *screen,
- gint *x,
- gint *y)
-{
-#ifdef GDK_WINDOWING_X11
- GdkWindow *root_win;
- GdkDisplay *display;
- Atom type;
- gint format;
- gulong nitems;
- gulong bytes_after;
- gulong *coordinates;
- gint err, result;
-
- g_return_if_fail (GDK_IS_SCREEN (screen));
- g_return_if_fail (x != NULL && y != NULL);
-
- /* Default values for the viewport origin */
- *x = 0;
- *y = 0;
-
- root_win = gdk_screen_get_root_window (screen);
- display = gdk_screen_get_display (screen);
-
- gdk_error_trap_push ();
- result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (root_win),
- gdk_x11_get_xatom_by_name_for_display (display, "_NET_DESKTOP_VIEWPORT"),
- 0, G_MAXLONG, False, XA_CARDINAL, &type, &format, &nitems,
- &bytes_after, (void*) &coordinates);
- err = gdk_error_trap_pop ();
-
- if (err != Success || result != Success)
- return;
-
- if (type != XA_CARDINAL || format != 32 || nitems < 2)
- {
- XFree (coordinates);
- return;
- }
-
- *x = coordinates[0];
- *y = coordinates[1];
- XFree (coordinates);
-#else
- /* FIXME: on mac etc proably there are native APIs
- * to get the current workspace etc */
- *x = 0;
- *y = 0;
-#endif
-}
-
/* Make url in about dialog clickable */
static void
vinagre_about_dialog_handle_url (GtkAboutDialog *about,
diff --git a/vinagre/vinagre-utils.h b/vinagre/vinagre-utils.h
index 8f75df3..6b66ad1 100644
--- a/vinagre/vinagre-utils.h
+++ b/vinagre/vinagre-utils.h
@@ -53,12 +53,6 @@ gchar *vinagre_utils_escape_underscores (const gchar *text,
void vinagre_utils_handle_debug (void);
-guint vinagre_utils_get_current_workspace (GdkScreen *screen);
-guint vinagre_utils_get_window_workspace (GtkWindow *gtkwindow);
-void vinagre_utils_get_current_viewport (GdkScreen *screen,
- gint *x,
- gint *y);
-
void vinagre_utils_help_contents (GtkWindow *window, const gchar *section);
void vinagre_utils_help_about (GtkWindow *window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]