diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2008-11-27 10:27:22 -0200 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2008-11-27 12:36:38 -0200 |
commit | ba930010d4cfa4447147630bdaed8e813f3569a7 (patch) | |
tree | 07bdc07cea73e21bd488e552e5d6ddc0d43e45e6 /packages/xfce | |
parent | 7b10f59acad4f10aee9092c16a1fa88329a3d63e (diff) |
xfce-terminal: add --into support
Diffstat (limited to 'packages/xfce')
-rw-r--r-- | packages/xfce/xfce-terminal/into-support.patch | 94 | ||||
-rw-r--r-- | packages/xfce/xfce-terminal_0.2.8.bb | 5 |
2 files changed, 97 insertions, 2 deletions
diff --git a/packages/xfce/xfce-terminal/into-support.patch b/packages/xfce/xfce-terminal/into-support.patch new file mode 100644 index 0000000000..30540d0558 --- /dev/null +++ b/packages/xfce/xfce-terminal/into-support.patch @@ -0,0 +1,94 @@ +diff --git a/terminal/terminal-app.c b/terminal/terminal-app.c +index 4b7ae6f..a581a85 100644 +--- a/terminal/terminal-app.c ++++ b/terminal/terminal-app.c +@@ -37,6 +37,8 @@ + #include <string.h> + #endif + ++#include <gdk/gdkx.h> ++ + #include <terminal/terminal-accel-map.h> + #include <terminal/terminal-app.h> + #include <terminal/terminal-config.h> +@@ -565,7 +567,8 @@ terminal_app_open_window (TerminalApp *app, + g_free (geometry); + + /* show the window */ +- gtk_widget_show (window); ++ if (!attr->embed_window) ++ gtk_widget_show (window); + } + + terminal_screen_launch_child (TERMINAL_SCREEN (terminal)); +@@ -584,6 +587,14 @@ terminal_app_open_window (TerminalApp *app, + g_signal_connect (G_OBJECT (app->session_client), "save-yourself", + G_CALLBACK (terminal_app_save_yourself), app); + } ++ ++ if (attr->embed_window) ++ { ++ GdkDrawable* win = GDK_DRAWABLE(window->window); ++ XReparentWindow(GDK_DRAWABLE_XDISPLAY(win), GDK_DRAWABLE_XID(win), attr->embed_window, 0, 0); ++ XMapWindow(GDK_DRAWABLE_XDISPLAY(win), GDK_DRAWABLE_XID(win)); ++ gtk_widget_show(window); ++ } + } + + +diff --git a/terminal/terminal-options.c b/terminal/terminal-options.c +index ec6a934..ad9dace 100644 +--- a/terminal/terminal-options.c ++++ b/terminal/terminal-options.c +@@ -30,6 +30,8 @@ + #include <string.h> + #endif + ++#include <stdlib.h> ++ + #include <libxfce4util/libxfce4util.h> + + #include <terminal/terminal-options.h> +@@ -454,6 +456,31 @@ terminal_options_parse (gint argc, + g_free (default_directory); + default_directory = g_strdup (s); + } ++ else if (strncmp ("--into", argv[n], 6) == 0) ++ { ++ s = argv[n] + 6; ++ ++ if (*s == '=') ++ { ++ ++s; ++ } ++ else if (n + 1 >= argc) ++ { ++ g_set_error (error, G_SHELL_ERROR, G_SHELL_ERROR_FAILED, ++ _("Option \"--into\" requires specifying " ++ "the window id as its parameter")); ++ goto failed; ++ } ++ else ++ { ++ s = argv[++n]; ++ } ++ ++ if (win_attr != NULL) ++ { ++ win_attr->embed_window = strtoul(s, NULL, 0); ++ } ++ } + else + { + g_set_error (error, G_SHELL_ERROR, G_SHELL_ERROR_FAILED, +diff --git a/terminal/terminal-options.h b/terminal/terminal-options.h +index b047269..4783596 100644 +--- a/terminal/terminal-options.h ++++ b/terminal/terminal-options.h +@@ -65,5 +65,6 @@ struct _TerminalWindowAttr + TerminalVisibility borders; + TerminalVisibility toolbars; ++ guint32 embed_window; + }; + + gboolean terminal_options_parse (gint argc, diff --git a/packages/xfce/xfce-terminal_0.2.8.bb b/packages/xfce/xfce-terminal_0.2.8.bb index 31042911b7..c8c4903513 100644 --- a/packages/xfce/xfce-terminal_0.2.8.bb +++ b/packages/xfce/xfce-terminal_0.2.8.bb @@ -1,10 +1,11 @@ DESCRIPTION = "Terminal emulator for the Xfce desktop environment" DEPENDS = "exo vte dbus-glib gtk+" RDEPENDS += "gnome-pty-helper" -PR = "r1" +PR = "r2" inherit xfce -SRC_URI = "http://www.us.xfce.org/archive/xfce-4.4.2/src/Terminal-${PV}.tar.bz2" +SRC_URI = "http://www.us.xfce.org/archive/xfce-4.4.2/src/Terminal-${PV}.tar.bz2 \ + file://into-support.patch;patch=1" S = "${WORKDIR}/Terminal-${PV}" |