Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package mate-menu for openSUSE:Factory 
checked in at 2021-04-01 14:17:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mate-menu (Old)
 and      /work/SRC/openSUSE:Factory/.mate-menu.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mate-menu"

Thu Apr  1 14:17:49 2021 rev:23 rq:882356 version:20.04.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/mate-menu/mate-menu.changes      2020-08-29 
20:40:02.173407019 +0200
+++ /work/SRC/openSUSE:Factory/.mate-menu.new.2401/mate-menu.changes    
2021-04-01 14:19:13.132148470 +0200
@@ -1,0 +2,7 @@
+Wed Mar 31 12:22:30 UTC 2021 - Hillwood Yang <[email protected]>
+
+- Update version to version 20.04.3
+  * Use GAppInfo to launch applications
+  * Fix opening Desktop entries with Path 
+
+-------------------------------------------------------------------

Old:
----
  mate-menu-20.04.1.tar.gz

New:
----
  mate-menu-20.04.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mate-menu.spec ++++++
--- /var/tmp/diff_new_pack.ENEJAQ/_old  2021-04-01 14:19:13.588149078 +0200
+++ /var/tmp/diff_new_pack.ENEJAQ/_new  2021-04-01 14:19:13.592149083 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package mate-menu
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,14 @@
 
 
 %define _name   mate_menu
+
 Name:           mate-menu
-Version:        20.04.1
+Version:        20.04.3
 Release:        0
 Summary:        Advanced MATE menu
 License:        GPL-2.0-or-later
 URL:            https://github.com/ubuntu-mate/mate-menu
-Source:         
https://github.com/ubuntu-mate/mate-menu/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Source:         
https://github.com/ubuntu-mate/mate-menu/archive/%{version}/%{name}-%{version}.tar.gz
 # PATCH-FEATURE-OPENSUSE mate-menu-yast2-software.patch [email protected] -- 
Use YaST2 and GNOME PackageKit package managers.
 Patch0:         mate-menu-yast2-software.patch
 BuildRequires:  gobject-introspection-devel

++++++ mate-menu-20.04.1.tar.gz -> mate-menu-20.04.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mate-menu-20.04.1/mate_menu/execute.py 
new/mate-menu-20.04.3/mate_menu/execute.py
--- old/mate-menu-20.04.1/mate_menu/execute.py  2020-02-17 16:00:03.000000000 
+0100
+++ new/mate-menu-20.04.3/mate_menu/execute.py  2020-04-05 01:10:31.000000000 
+0200
@@ -19,8 +19,8 @@
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
 import os
-import shlex
-import subprocess
+
+from gi.repository import Gdk, Gtk, Gio
 
 def RemoveArgs(Execline):
        NewExecline = []
@@ -33,21 +33,34 @@
                        NewExecline.append(elem)
        return NewExecline
 
-# Actually execute the command
-def ExecuteCommand(cmd , commandCwd=None):
-       if not commandCwd:
-               cwd = os.path.expanduser( "~" );
-       else:
+# Actually launch the application
+def Launch(cmd, cwd=None):
+       if cwd:
+               os.chdir(cwd)
+
+       app_info = Gio.AppInfo.create_from_commandline(cmd,
+                                                      None,
+                                                      
Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION)
+
+       display = Gdk.Display.get_default()
+       context = display.get_app_launch_context()
+       context.set_desktop(-1) # use default screen & desktop
+       context.set_timestamp(Gtk.get_current_event_time())
+
+       app_info.launch(None, context)
+
+def Execute(cmd , commandCwd=None):
+       if commandCwd:
                tmpCwd = os.path.expanduser( commandCwd );
                if (os.path.exists(tmpCwd)):
                        cwd = tmpCwd
+       else:
+               cwd = None
 
        if isinstance( cmd, str ):
                if (cmd.find("/home/") >= 0) or (cmd.find("xdg-su") >= 0) or 
(cmd.find("\"") >= 0):
-                       print("running manually...")
                        try:
-                               os.chdir(cwd)
-                               subprocess.Popen(shlex.split(cmd))
+                               Launch(cmd, cwd)
                                return True
                        except Exception as detail:
                                print(detail)
@@ -56,19 +69,9 @@
        cmd = RemoveArgs(cmd)
 
        try:
-               os.chdir( cwd )
                string = ' '.join(cmd)
-               subprocess.Popen(shlex.split(string))
+               Launch(string, cwd)
                return True
        except Exception as detail:
                print(detail)
                return False
-
-# Execute cmd using the double fork method
-def Execute(cmd, commandCwd=None):
-       child_pid = os.fork()
-       if child_pid == 0:
-               ExecuteCommand(cmd, commandCwd)
-               os._exit(0)
-       else:
-               os.wait()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mate-menu-20.04.1/mate_menu/plugins/applications.py 
new/mate-menu-20.04.3/mate_menu/plugins/applications.py
--- old/mate-menu-20.04.1/mate_menu/plugins/applications.py     2020-02-17 
16:00:03.000000000 +0100
+++ new/mate-menu-20.04.3/mate_menu/plugins/applications.py     2020-04-05 
01:10:31.000000000 +0200
@@ -32,7 +32,6 @@
 import subprocess
 import filecmp
 from mate_menu.easybuttons import *
-from mate_menu.execute import Execute
 from mate_menu.easygsettings import EasyGSettings
 from mate_menu.easyfiles import *
 

Reply via email to