Hello community,
here is the log from the commit of package mate-terminal for openSUSE:Factory checked in at 2014-10-05 20:31:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mate-terminal (Old)
and /work/SRC/openSUSE:Factory/.mate-terminal.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mate-terminal"
Changes:
--------
--- /work/SRC/openSUSE:Factory/mate-terminal/mate-terminal.changes 2014-03-22 18:01:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.mate-terminal.new/mate-terminal.changes 2014-10-05 20:33:15.000000000 +0200
@@ -1,0 +2,7 @@
+Fri Oct 3 14:17:04 UTC 2014 - p.drouand@gmail.com
+
+- Update to version 1.8.1
+ + Fixed opening new terminal in a tab
+ + Added colon to PATHCHARS_CLASS for URL detection
+
+-------------------------------------------------------------------
Old:
----
mate-terminal-1.8.0.tar.xz
New:
----
mate-terminal-1.8.1.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mate-terminal.spec ++++++
--- /var/tmp/diff_new_pack.bQ8IZt/_old 2014-10-05 20:33:16.000000000 +0200
+++ /var/tmp/diff_new_pack.bQ8IZt/_new 2014-10-05 20:33:16.000000000 +0200
@@ -15,7 +15,7 @@
Name: mate-terminal
-Version: 1.8.0
+Version: 1.8.1
Release: 0
License: GPL-3.0+
Summary: MATE Desktop system tools
++++++ mate-terminal-1.8.0.tar.xz -> mate-terminal-1.8.1.tar.xz ++++++
++++ 1957 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/ChangeLog new/mate-terminal-1.8.1/ChangeLog
--- old/mate-terminal-1.8.0/ChangeLog 2014-03-01 14:50:42.000000000 +0100
+++ new/mate-terminal-1.8.1/ChangeLog 2014-09-28 21:52:09.000000000 +0200
@@ -1,5 +1,48 @@
# Generated by Makefile. Do not edit.
+commit da375f9474b5cae0e6b8724a3f5976050118e237
+Author: infirit
+Date: Sun Sep 28 21:50:54 2014 +0200
+
+ Bump version to 1.8.1
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit cad2fcd7b988b25b0103d9023f3d8779336d35e1
+Author: infirit
+Date: Sun Sep 28 21:50:41 2014 +0200
+
+ Update NEWS for 1.8.1
+
+ NEWS | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+commit dd5636bc091e9abc3b916d86be95b8e8ef452876
+Author: Martin Wimpress
+Date: Mon Feb 24 14:44:24 2014 +0000
+
+ Opening new terminal in a tab now works. The new intended behaviour is desbribed
+ in https://bugzilla.gnome.org/show_bug.cgi?id=83203#c57 Fixes #45.
+
+ src/terminal-app.c | 95 ++++++++++++++++++++++++++++++++++++++++----------
+ src/terminal-app.h | 4 ++-
+ src/terminal-options.c | 12 +++++--
+ src/terminal-options.h | 2 ++
+ src/terminal-window.c | 45 ++++++++++++++++++++++++
+ src/terminal-window.h | 3 ++
+ src/terminal.c | 46 ++++++++++++++++++++----
+ 7 files changed, 178 insertions(+), 29 deletions(-)
+
+commit 31fb0be28e7764fad7b7cb99d84fe8e015a8408c
+Author: infirit
+Date: Mon Aug 18 18:30:48 2014 +0200
+
+ Add colon to PATHCHARS_CLASS for url detection.
+
+ src/terminal-screen.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
commit f6d1706007760cf7c7ad509dc6f5321a0a9c0583
Author: Stefano Karapetsas
Date: Sat Mar 1 14:49:57 2014 +0100
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/NEWS new/mate-terminal-1.8.1/NEWS
--- old/mate-terminal-1.8.0/NEWS 2014-03-01 14:49:51.000000000 +0100
+++ new/mate-terminal-1.8.1/NEWS 2014-09-28 21:50:34.000000000 +0200
@@ -1,3 +1,8 @@
+1.8.1
+
+ * Opening new terminal in a tab now works.
+ * Add colon to PATHCHARS_CLASS for url detection.
+
1.8.0
* Add GTK3 support
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/configure.ac new/mate-terminal-1.8.1/configure.ac
--- old/mate-terminal-1.8.0/configure.ac 2014-03-01 14:49:48.000000000 +0100
+++ new/mate-terminal-1.8.1/configure.ac 2014-09-28 21:50:50.000000000 +0200
@@ -1,6 +1,6 @@
m4_define([gt_version_major],[1])
m4_define([gt_version_minor],[8])
-m4_define([gt_version_micro],[0])
+m4_define([gt_version_micro],[1])
m4_define([gt_version_extra],[])
m4_define([gt_version],[gt_version_major().gt_version_minor().gt_version_micro()gt_version_extra])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/m4/intltool.m4 new/mate-terminal-1.8.1/m4/intltool.m4
--- old/mate-terminal-1.8.0/m4/intltool.m4 2014-03-01 14:50:00.000000000 +0100
+++ new/mate-terminal-1.8.1/m4/intltool.m4 2014-09-28 21:50:58.000000000 +0200
@@ -155,31 +155,6 @@
# Substitute ALL_LINGUAS so we can use it in po/Makefile
AC_SUBST(ALL_LINGUAS)
-# Set DATADIRNAME correctly if it is not set yet
-# (copied from glib-gettext.m4)
-if test -z "$DATADIRNAME"; then
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[]],
- [[extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr]])],
- [DATADIRNAME=share],
- [case $host in
- *-*-solaris*)
- dnl On Solaris, if bind_textdomain_codeset is in libc,
- dnl GNU format message catalog is always supported,
- dnl since both are added to the libc all together.
- dnl Hence, we'd like to go with DATADIRNAME=share
- dnl in this case.
- AC_CHECK_FUNC(bind_textdomain_codeset,
- [DATADIRNAME=share], [DATADIRNAME=lib])
- ;;
- *)
- [DATADIRNAME=lib]
- ;;
- esac])
-fi
-AC_SUBST(DATADIRNAME)
-
IT_PO_SUBDIR([po])
])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/m4/libtool.m4 new/mate-terminal-1.8.1/m4/libtool.m4
--- old/mate-terminal-1.8.0/m4/libtool.m4 2014-03-01 14:50:04.000000000 +0100
+++ new/mate-terminal-1.8.1/m4/libtool.m4 2014-09-28 21:51:02.000000000 +0200
@@ -1312,7 +1312,7 @@
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -1324,19 +1324,9 @@
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- case `/usr/bin/file conftest.o` in
- *x86-64*)
- LD="${LD-ld} -m elf32_x86_64"
- ;;
- *)
- LD="${LD-ld} -m elf_i386"
- ;;
- esac
- ;;
- powerpc64le-*)
- LD="${LD-ld} -m elf32lppclinux"
+ LD="${LD-ld} -m elf_i386"
;;
- powerpc64-*)
+ ppc64-*linux*|powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -1355,10 +1345,7 @@
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- powerpcle-*)
- LD="${LD-ld} -m elf64lppc"
- ;;
- powerpc-*)
+ ppc*-*linux*|powerpc*-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -1701,8 +1688,7 @@
;;
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len" && \
- test undefined != "$lt_cv_sys_max_cmd_len"; then
+ if test -n "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
@@ -2493,7 +2479,14 @@
*) objformat=elf ;;
esac
fi
- version_type=freebsd-$objformat
+ # Handle Gentoo/FreeBSD as it was Linux
+ case $host_vendor in
+ gentoo)
+ version_type=linux ;;
+ *)
+ version_type=freebsd-$objformat ;;
+ esac
+
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
@@ -2504,6 +2497,12 @@
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
+ linux)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ need_lib_prefix=no
+ need_version=no
+ ;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
@@ -2526,6 +2525,17 @@
esac
;;
+gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
haiku*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
@@ -2642,7 +2652,7 @@
;;
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
@@ -2687,18 +2697,6 @@
dynamic_linker='GNU/Linux ld.so'
;;
-netbsdelf*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
- ;;
-
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -3258,6 +3256,10 @@
fi
;;
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
haiku*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3296,11 +3298,11 @@
;;
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
-netbsd* | netbsdelf*-gnu)
+netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
else
@@ -4048,7 +4050,7 @@
;;
esac
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -4112,7 +4114,7 @@
;;
esac
;;
- netbsd* | netbsdelf*-gnu)
+ netbsd*)
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -4347,7 +4349,7 @@
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
# old Intel for x86_64 which still supported -KPIC.
ecc*)
@@ -4589,9 +4591,6 @@
;;
esac
;;
- linux* | k*bsd*-gnu | gnu*)
- _LT_TAGVAR(link_all_deplibs, $1)=no
- ;;
*)
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
@@ -4654,9 +4653,6 @@
openbsd*)
with_gnu_ld=no
;;
- linux* | k*bsd*-gnu | gnu*)
- _LT_TAGVAR(link_all_deplibs, $1)=no
- ;;
esac
_LT_TAGVAR(ld_shlibs, $1)=yes
@@ -4878,7 +4874,7 @@
fi
;;
- netbsd* | netbsdelf*-gnu)
+ netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
@@ -5055,7 +5051,6 @@
if test "$aix_use_runtimelinking" = yes; then
shared_flag="$shared_flag "'${wl}-G'
fi
- _LT_TAGVAR(link_all_deplibs, $1)=no
else
# not using gcc
if test "$host_cpu" = ia64; then
@@ -5360,7 +5355,7 @@
_LT_TAGVAR(link_all_deplibs, $1)=yes
;;
- netbsd* | netbsdelf*-gnu)
+ netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
@@ -6240,6 +6235,9 @@
_LT_TAGVAR(ld_shlibs, $1)=yes
;;
+ gnu*)
+ ;;
+
haiku*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
_LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -6401,7 +6399,7 @@
_LT_TAGVAR(inherit_rpath, $1)=yes
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/po/Makefile.in.in new/mate-terminal-1.8.1/po/Makefile.in.in
--- old/mate-terminal-1.8.0/po/Makefile.in.in 2014-03-01 14:50:00.000000000 +0100
+++ new/mate-terminal-1.8.1/po/Makefile.in.in 2014-09-28 21:50:58.000000000 +0200
@@ -33,8 +33,7 @@
datadir = @datadir@
datarootdir = @datarootdir@
libdir = @libdir@
-DATADIRNAME = @DATADIRNAME@
-itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+localedir = @localedir@
subdir = po
install_sh = @install_sh@
# Automake >= 1.8 provides @mkdir_p@.
@@ -108,7 +107,7 @@
install-data-yes: all
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+ dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $$dir; \
if test -r $$lang.gmo; then \
$(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
@@ -142,8 +141,8 @@
uninstall:
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
done
check: all $(GETTEXT_PACKAGE).pot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/src/terminal-app.c new/mate-terminal-1.8.1/src/terminal-app.c
--- old/mate-terminal-1.8.0/src/terminal-app.c 2014-02-23 19:17:25.000000000 +0100
+++ new/mate-terminal-1.8.1/src/terminal-app.c 2014-09-28 21:49:38.000000000 +0200
@@ -219,6 +219,29 @@
return screen;
}
+static int
+terminal_app_get_workspace_for_window (TerminalWindow *window)
+{
+ int ret = -1;
+ guchar *data = NULL;
+ GdkAtom atom;
+ GdkAtom cardinal_atom;
+
+ atom = gdk_atom_intern_static_string ("_NET_WM_DESKTOP");
+ cardinal_atom = gdk_atom_intern_static_string ("CARDINAL");
+
+ gdk_property_get (gtk_widget_get_window(GTK_WIDGET(window)),
+ atom, cardinal_atom, 0, 8, FALSE,
+ NULL, NULL, NULL, &data);
+
+ if (data)
+ ret = *(int *)data;
+
+ g_free (data);
+ return ret;
+}
+
+
/* Menubar mnemonics settings handling */
static int
@@ -1688,32 +1711,38 @@
for (lw = options->initial_windows; lw != NULL; lw = lw->next)
{
InitialWindow *iw = lw->data;
- TerminalWindow *window;
+ TerminalWindow *window = NULL;
GList *lt;
g_assert (iw->tabs);
- /* Create & setup new window */
- window = terminal_app_new_window (app, gdk_screen);
+ if ( lw == options->initial_windows && ((InitialTab *)iw->tabs->data)->attach_window )
+ window = terminal_app_get_current_window(app, gdk_screen, options->initial_workspace);
- /* Restored windows shouldn't demand attention; see bug #586308. */
- if (iw->source_tag == SOURCE_SESSION)
- terminal_window_set_is_restored (window);
-
- if (options->startup_id != NULL)
- gtk_window_set_startup_id (GTK_WINDOW (window), options->startup_id);
-
- /* Overwrite the default, unique window role set in terminal_window_init */
- if (iw->role)
- gtk_window_set_role (GTK_WINDOW (window), iw->role);
-
- if (iw->force_menubar_state)
- terminal_window_set_menubar_visible (window, iw->menubar_state);
-
- if (iw->start_fullscreen)
- gtk_window_fullscreen (GTK_WINDOW (window));
- if (iw->start_maximized)
- gtk_window_maximize (GTK_WINDOW (window));
+ if (!window)
+ {
+ /* Create & setup new window */
+ window = terminal_app_new_window (app, gdk_screen);
+
+ /* Restored windows shouldn't demand attention; see bug #586308. */
+ if (iw->source_tag == SOURCE_SESSION)
+ terminal_window_set_is_restored (window);
+
+ if (options->startup_id != NULL)
+ gtk_window_set_startup_id (GTK_WINDOW (window), options->startup_id);
+
+ /* Overwrite the default, unique window role set in terminal_window_init */
+ if (iw->role)
+ gtk_window_set_role (GTK_WINDOW (window), iw->role);
+
+ if (iw->force_menubar_state)
+ terminal_window_set_menubar_visible (window, iw->menubar_state);
+
+ if (iw->start_fullscreen)
+ gtk_window_fullscreen (GTK_WINDOW (window));
+ if (iw->start_maximized)
+ gtk_window_maximize (GTK_WINDOW (window));
+ }
/* Now add the tabs */
for (lt = iw->tabs; lt != NULL; lt = lt->next)
@@ -1842,13 +1871,41 @@
terminal_encoding_dialog_show (transient_parent);
}
+/*
+* Get the window in the given screen and workspace. If nothing is found,
+* a NULL is returned.
+*/
TerminalWindow *
-terminal_app_get_current_window (TerminalApp *app)
+terminal_app_get_current_window (TerminalApp *app,
+ GdkScreen *from_screen,
+ int workspace)
{
+ GList *res = NULL;
+ TerminalWindow *ret = NULL;
+
if (app->windows == NULL)
return NULL;
- return g_list_last (app->windows)->data;
+ res = g_list_last (app->windows);
+
+ g_assert (from_screen != NULL);
+
+ while (res)
+ {
+ int win_workspace;
+ if (gtk_window_get_screen(GTK_WINDOW(res->data)) != from_screen)
+ continue;
+
+ win_workspace = terminal_app_get_workspace_for_window(res->data);
+
+ /* Same workspace or if the window is set to show up on all workspaces */
+ if (win_workspace == workspace || win_workspace == -1)
+ ret = terminal_window_get_latest_focused (ret, TERMINAL_WINDOW(res->data));
+
+ res = g_list_previous (res);
+ }
+
+ return ret;
}
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/src/terminal-app.h new/mate-terminal-1.8.1/src/terminal-app.h
--- old/mate-terminal-1.8.0/src/terminal-app.h 2014-01-25 23:33:17.000000000 +0100
+++ new/mate-terminal-1.8.1/src/terminal-app.h 2014-09-28 21:49:38.000000000 +0200
@@ -115,7 +115,9 @@
char **child_env,
double zoom);
-TerminalWindow *terminal_app_get_current_window (TerminalApp *app);
+TerminalWindow *terminal_app_get_current_window (TerminalApp *app,
+ GdkScreen *screen,
+ int curr_workspace);
void terminal_app_manage_profiles (TerminalApp *app,
GtkWindow *transient_parent);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/src/terminal-options.c new/mate-terminal-1.8.1/src/terminal-options.c
--- old/mate-terminal-1.8.0/src/terminal-options.c 2014-02-23 19:17:25.000000000 +0100
+++ new/mate-terminal-1.8.1/src/terminal-options.c 2014-09-28 21:49:38.000000000 +0200
@@ -51,6 +51,7 @@
it->zoom = 1.0;
it->zoom_set = FALSE;
it->active = FALSE;
+ it->attach_window = FALSE;
return it;
}
@@ -305,18 +306,22 @@
{
TerminalOptions *options = data;
gboolean is_profile_id;
+ InitialWindow *iw;
+ InitialTab *it;
is_profile_id = g_str_has_suffix (option_name, "-with-profile-internal-id");
if (options->initial_windows)
{
- InitialWindow *iw;
-
iw = g_list_last (options->initial_windows)->data;
iw->tabs = g_list_append (iw->tabs, initial_tab_new (value, is_profile_id));
}
else
- add_new_window (options, value, is_profile_id);
+ {
+ iw = add_new_window (options, value, is_profile_id);
+ it = g_list_last(iw->tabs)->data;
+ it->attach_window = TRUE;
+ }
return TRUE;
}
@@ -707,6 +712,7 @@
options->default_maximize = FALSE;
options->execute = FALSE;
options->use_factory = TRUE;
+ options->initial_workspace = -1;
options->env = g_strdupv (env);
options->startup_id = g_strdup (startup_id && startup_id[0] ? startup_id : NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/src/terminal-options.h new/mate-terminal-1.8.1/src/terminal-options.h
--- old/mate-terminal-1.8.0/src/terminal-options.h 2014-01-25 23:33:17.000000000 +0100
+++ new/mate-terminal-1.8.1/src/terminal-options.h 2014-09-28 21:49:38.000000000 +0200
@@ -53,6 +53,7 @@
char *config_file;
gboolean load_config;
gboolean save_config;
+ int initial_workspace;
} TerminalOptions;
typedef struct
@@ -65,6 +66,7 @@
double zoom;
guint zoom_set : 1;
guint active : 1;
+ guint attach_window : 1;
} InitialTab;
typedef struct
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/src/terminal-screen.c new/mate-terminal-1.8.1/src/terminal-screen.c
--- old/mate-terminal-1.8.0/src/terminal-screen.c 2014-02-23 19:17:25.000000000 +0100
+++ new/mate-terminal-1.8.1/src/terminal-screen.c 2014-09-25 14:48:26.000000000 +0200
@@ -157,7 +157,7 @@
#define HOSTCHARS_CLASS "[-[:alnum:]]"
#define HOST HOSTCHARS_CLASS "+(\\." HOSTCHARS_CLASS "+)*"
#define PORT "(?:\\:[[:digit:]]{1,5})?"
-#define PATHCHARS_CLASS "[-[:alnum:]\\Q_$.+!*,;@&=?/~#%\\E]"
+#define PATHCHARS_CLASS "[-[:alnum:]\\Q_$.+!*,:;@&=?/~#%\\E]"
#define PATHTERM_CLASS "[^\\Q]'.}>) \t\r\n,\"\\E]"
#define SCHEME "(?:news:|telnet:|nntp:|file:\\/|https?:|ftps?:|sftp:|webcal:)"
#define USERPASS USERCHARS_CLASS "+(?:" PASSCHARS_CLASS "+)?"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/src/terminal-version.h new/mate-terminal-1.8.1/src/terminal-version.h
--- old/mate-terminal-1.8.0/src/terminal-version.h 2014-03-01 14:50:12.000000000 +0100
+++ new/mate-terminal-1.8.1/src/terminal-version.h 2014-09-28 21:51:12.000000000 +0200
@@ -25,7 +25,7 @@
#define TERMINAL_MAJOR_VERSION (1)
#define TERMINAL_MINOR_VERSION (8)
-#define TERMINAL_MICRO_VERSION (0)
+#define TERMINAL_MICRO_VERSION (1)
#define TERMINAL_CHECK_VERSION(major,minor,micro) \
(TERMINAL_MAJOR_VERSION > (major) || \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/src/terminal-window.c new/mate-terminal-1.8.1/src/terminal-window.c
--- old/mate-terminal-1.8.0/src/terminal-window.c 2014-02-23 19:17:25.000000000 +0100
+++ new/mate-terminal-1.8.1/src/terminal-window.c 2014-09-28 21:49:38.000000000 +0200
@@ -97,6 +97,7 @@
/* Workaround until gtk+ bug #535557 is fixed */
guint icon_title_set : 1;
+ time_t focus_time;
};
#define PROFILE_DATA_KEY "GT::Profile"
@@ -139,6 +140,9 @@
static gboolean terminal_window_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer data);
+static gboolean terminal_window_focus_in_event (GtkWidget *widget,
+ GdkEventFocus *event,
+ gpointer data);
static gboolean notebook_button_press_cb (GtkWidget *notebook,
GdkEventButton *event,
@@ -2136,6 +2140,10 @@
g_signal_connect (G_OBJECT (window), "delete_event",
G_CALLBACK(terminal_window_delete_event),
NULL);
+ g_signal_connect (G_OBJECT (window), "focus_in_event",
+ G_CALLBACK(terminal_window_focus_in_event),
+ NULL);
+
#ifdef MATE_ENABLE_DEBUG
_TERMINAL_DEBUG_IF (TERMINAL_DEBUG_GEOMETRY)
{
@@ -2383,6 +2391,20 @@
return confirm_close_window_or_tab (TERMINAL_WINDOW (widget), NULL);
}
+static gboolean
+terminal_window_focus_in_event (GtkWidget *widget,
+ GdkEventFocus *event,
+ gpointer data)
+{
+ TerminalWindow *window = TERMINAL_WINDOW (widget);
+ TerminalWindowPrivate *priv = window->priv;
+
+ if (event->in)
+ priv->focus_time = time(NULL);
+
+ return FALSE;
+}
+
static void
terminal_window_show (GtkWidget *widget)
{
@@ -4264,3 +4286,26 @@
g_key_file_set_string_list (key_file, group, TERMINAL_CONFIG_WINDOW_PROP_TABS, (const char * const *) tab_names, len);
g_strfreev (tab_names);
}
+
+
+TerminalWindow *
+terminal_window_get_latest_focused (TerminalWindow *window1,
+ TerminalWindow *window2)
+{
+ TerminalWindowPrivate *priv1 = NULL;
+ TerminalWindowPrivate *priv2 = NULL;
+
+ if (!window1)
+ return window2;
+
+ if (!window2)
+ return window1;
+
+ priv1 = window1->priv;
+ priv2 = window2->priv;
+
+ if (priv2->focus_time > priv1->focus_time)
+ return window2;
+
+ return window1;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/src/terminal-window.h new/mate-terminal-1.8.1/src/terminal-window.h
--- old/mate-terminal-1.8.0/src/terminal-window.h 2014-01-25 23:33:17.000000000 +0100
+++ new/mate-terminal-1.8.1/src/terminal-window.h 2014-09-28 21:49:38.000000000 +0200
@@ -101,6 +101,9 @@
GKeyFile *key_file,
const char *group);
+TerminalWindow *terminal_window_get_latest_focused (TerminalWindow *window1,
+ TerminalWindow *window2);
+
G_END_DECLS
#endif /* TERMINAL_WINDOW_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/mate-terminal-1.8.0/src/terminal.c new/mate-terminal-1.8.1/src/terminal.c
--- old/mate-terminal-1.8.0/src/terminal.c 2014-02-23 19:17:25.000000000 +0100
+++ new/mate-terminal-1.8.1/src/terminal.c 2014-09-28 21:49:38.000000000 +0200
@@ -155,12 +155,13 @@
TerminalOptions *options = NULL;
GVariant *v_wd, *v_display, *v_sid, *v_envv, *v_argv;
char *working_directory = NULL, *display_name = NULL, *startup_id = NULL;
+ int initial_workspace = -1;
char **envv = NULL, **argv = NULL;
int argc;
GError *error = NULL;
- g_variant_get (parameters, "(@ay@ay@ay@ay@ay)",
- &v_wd, &v_display, &v_sid, &v_envv, &v_argv);
+ g_variant_get (parameters, "(@ay@ay@ay@ayi@ay)",
+ &v_wd, &v_display, &v_sid, &v_envv, &initial_workspace, &v_argv);
working_directory = ay_to_string (v_wd, &error);
if (error)
@@ -175,10 +176,12 @@
argv = ay_to_strv (v_argv, &argc);
_terminal_debug_print (TERMINAL_DEBUG_FACTORY,
- "Factory invoked with working-dir='%s' display='%s' startup-id='%s'\n",
+ "Factory invoked with working-dir='%s' display='%s' startup-id='%s'"
+ "workspace='%d'\n",
working_directory ? working_directory : "(null)",
display_name ? display_name : "(null)",
- startup_id ? startup_id : "(null)");
+ startup_id ? startup_id : "(null)",
+ initial_workspace);
options = terminal_options_parse (working_directory,
display_name,
@@ -190,6 +193,8 @@
&error,
NULL);
+ options->initial_workspace = initial_workspace;
+
if (options != NULL)
{
terminal_app_handle_options (terminal_app_get (), options, FALSE /* no resume */, &error);
@@ -233,6 +238,7 @@
"<arg type='ay' name='display_name' direction='in' />"
"<arg type='ay' name='startup_id' direction='in' />"
"<arg type='ay' name='environment' direction='in' />"
+ "<arg type='i' name='workspace' direction='in' />"
"<arg type='ay' name='arguments' direction='in' />"
"</method>"
"</interface>"
@@ -340,8 +346,8 @@
_terminal_debug_print (TERMINAL_DEBUG_FACTORY,
"Forwarding arguments to existing instance\n");
- g_variant_builder_init (&builder, G_VARIANT_TYPE ("(ayayayayay)"));
-
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("(ayayayayiay)"));
+
g_variant_builder_add (&builder, "@ay", string_to_ay (data->options->default_working_dir));
g_variant_builder_add (&builder, "@ay", string_to_ay (data->options->display_name));
g_variant_builder_add (&builder, "@ay", string_to_ay (data->options->startup_id));
@@ -368,6 +374,8 @@
g_variant_builder_add (&builder, "@ay",
g_variant_new_from_data (G_VARIANT_TYPE ("ay"), s, len, TRUE, g_free, s));
+ g_variant_builder_add (&builder, "@i", g_variant_new_int32 (data->options->initial_workspace));
+
string = g_string_new (NULL);
for (i = 0; i < data->argc; ++i)
@@ -510,6 +518,29 @@
return g_string_free (name, FALSE);
}
+static int
+get_initial_workspace (void)
+{
+ int ret = -1;
+ GdkWindow *window;
+ guchar *data = NULL;
+ GdkAtom atom;
+ GdkAtom cardinal_atom;
+
+ g_type_init ();
+
+ window = gdk_get_default_root_window();
+
+ atom = gdk_atom_intern_static_string ("_NET_CURRENT_DESKTOP");
+ cardinal_atom = gdk_atom_intern_static_string ("CARDINAL");
+
+ gdk_property_get (window, atom, cardinal_atom, 0, 8, FALSE, NULL, NULL, NULL, &data);
+
+ ret = *(int *)data;
+ g_free (data);
+ return ret;
+}
+
int
main (int argc, char **argv)
{
@@ -610,6 +641,9 @@
data->argv = argv_copy;
data->argc = argc_copy;
+ gtk_init(&argc, &argv);
+ options->initial_workspace = get_initial_workspace ();
+
owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
data->factory_name,
G_BUS_NAME_OWNER_FLAGS_NONE,
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org