[latexila/gnome-3] Remove workspace and screen awareness
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila/gnome-3] Remove workspace and screen awareness
- Date: Tue, 3 Apr 2012 01:20:53 +0000 (UTC)
commit 7bd67c9ff2d214bd6e75ed1f0c280a2a359d265f
Author: SÃbastien Wilmet <swilmet src gnome org>
Date: Tue Apr 3 03:06:54 2012 +0200
Remove workspace and screen awareness
It was not very important, and anyway the user can create another window
and place it where he wants.
CMakeLists.txt | 14 +++-----------
INSTALL | 2 --
src/CMakeLists.txt | 3 ---
src/latexila.vala | 5 +----
src/main_window.vala | 21 ---------------------
src/utils.vala | 45 ++-------------------------------------------
6 files changed, 6 insertions(+), 84 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4706497..80d6089 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,11 +49,9 @@ endif ()
find_package (PkgConfig)
pkg_check_modules (GTK REQUIRED "gtk+-3.0 >= 3.4")
pkg_check_modules (GTKSOURCEVIEW REQUIRED "gtksourceview-3.0")
-#pkg_check_modules (GTKSPELL REQUIRED "gtkspell-2.0")
pkg_check_modules (GEE REQUIRED "gee-1.0")
pkg_check_modules (GIO REQUIRED "gio-2.0 >= 2.32")
-pkg_check_modules (GDK-X11 REQUIRED "gdk-x11-3.0")
-pkg_check_modules (X11 REQUIRED "x11")
+#pkg_check_modules (GTKSPELL REQUIRED "gtkspell-2.0")
if (WITH_GNOME)
pkg_check_modules (DESKTOP-SCHEMAS REQUIRED "gsettings-desktop-schemas")
@@ -69,23 +67,17 @@ add_definitions (-include config.h)
add_definitions (
${GTK_CFLAGS}
${GTKSOURCEVIEW_CFLAGS}
-# ${GTKSPELL_CFLAGS}
${GEE_CFLAGS}
${GIO_CFLAGS}
-# ${UNIQUE_CFLAGS}
- ${GDK-X11_CFLAGS}
- ${X11_CFLAGS}
+# ${GTKSPELL_CFLAGS}
)
link_libraries (
${GTK_LIBRARIES}
${GTKSOURCEVIEW_LIBRARIES}
-# ${GTKSPELL_LIBRARIES}
${GEE_LIBRARIES}
${GIO_LIBRARIES}
-# ${UNIQUE_LIBRARIES}
- ${GDK-X11_LIBRARIES}
- ${X11_LIBRARIES}
+# ${GTKSPELL_LIBRARIES}
)
include ("${latexila_SOURCE_DIR}/cmake/itstool.cmake")
diff --git a/INSTALL b/INSTALL
index 24d3127..b8b5071 100644
--- a/INSTALL
+++ b/INSTALL
@@ -6,8 +6,6 @@ GtkSourceView >= 3.0
GLib >= 2.32
libgee
GtkSpell
-gdk-x11
-x11
CMake >= 2.6.4
gettext
ITS Tool
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3ee156c..dcf1a8e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -9,9 +9,6 @@ vala_precompile (
gtk+-3.0
gtksourceview-3.0
gee-1.0
-# unique-1.0
- gdk-x11-3.0
- x11
posix
CUSTOM_VAPIS
diff --git a/src/latexila.vala b/src/latexila.vala
index a8285c0..9561174 100644
--- a/src/latexila.vala
+++ b/src/latexila.vala
@@ -196,7 +196,7 @@ public class Latexila : Gtk.Application
return all_views;
}
- public MainWindow create_window (Gdk.Screen? screen = null)
+ public MainWindow create_window ()
{
if (active_window != null)
active_window.save_state ();
@@ -205,9 +205,6 @@ public class Latexila : Gtk.Application
add_window (window);
active_window = window;
- if (screen != null)
- window.set_screen (screen);
-
window.focus_in_event.connect (() =>
{
active_window = window;
diff --git a/src/main_window.vala b/src/main_window.vala
index 901d056..3bbfc77 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -889,27 +889,6 @@ public class MainWindow : Window
return null;
}
- public bool is_on_workspace_screen (Gdk.Screen? screen, uint workspace)
- {
- if (screen != null)
- {
- string cur_name = screen.get_display ().get_name ();
- int cur_n = screen.get_number ();
- Gdk.Screen s = this.get_screen ();
- string name = s.get_display ().get_name ();
- int n = s.get_number ();
-
- if (cur_name != name || cur_n != n)
- return false;
- }
-
- if (! this.get_realized ())
- this.realize ();
-
- uint ws = Utils.get_window_workspace (this);
- return ws == workspace || ws == Utils.ALL_WORKSPACES;
- }
-
private void sync_name (DocumentTab tab)
{
if (tab == active_tab)
diff --git a/src/utils.vala b/src/utils.vala
index 26549cd..c984f0f 100644
--- a/src/utils.vala
+++ b/src/utils.vala
@@ -400,49 +400,7 @@ namespace Utils
Gtk.main_iteration ();
}
- public const uint ALL_WORKSPACES = 0xffffff;
-
- /* Get the workspace the window is on
- *
- * This function gets the workspace that the #GtkWindow is visible on,
- * it returns ALL_WORKSPACES if the window is sticky, or if
- * the window manager doesn't support this function.
- */
- public uint get_window_workspace (Gtk.Window gtkwindow)
- {
- return_val_if_fail (gtkwindow.get_realized (), 0);
-
- uint ret = ALL_WORKSPACES;
-
- Gdk.Window window = gtkwindow.get_window ();
- Gdk.Display display = window.get_display ();
- unowned X.Display x_display = Gdk.X11Display.get_xdisplay (display);
-
- X.Atom type;
- int format;
- ulong nitems;
- ulong bytes_after;
- uint *workspace;
-
- Gdk.error_trap_push ();
-
- int result = x_display.get_window_property (Gdk.X11Window.get_xid (window),
- Gdk.x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP"),
- 0, long.MAX, false, X.XA_CARDINAL, out type, out format, out nitems,
- out bytes_after, out workspace);
-
- int err = Gdk.error_trap_pop ();
-
- if (err != X.Success || result != X.Success)
- return ret;
-
- if (type == X.XA_CARDINAL && format == 32 && nitems > 0)
- ret = workspace[0];
-
- X.free (workspace);
- return ret;
- }
-
+ /*
public void print_build_tool (BuildTool build_tool)
{
stdout.printf ("\n=== Build Tool ===\n");
@@ -460,4 +418,5 @@ namespace Utils
stdout.printf ("command: %s\n\n", build_job.command);
}
}
+ */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]