Modify tuna config.py use gtk3

Signed-off-by: cherry530 <xuping33@huawei.com>
This commit is contained in:
cherry530 2022-12-29 19:03:56 +08:00
parent bae80fbc5e
commit d972e20c7a
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff --git a/tuna/config.py b/tuna/config.py
index 019317f..08a536f 100644
--- a/tuna/config.py
+++ b/tuna/config.py
@@ -1,5 +1,8 @@
import io, os, re, fnmatch
-import sys, gtk
+import sys
+import gi
+gi.require_version('Gtk', '3.0')
+from gi.repository import Gtk as gtk
import codecs, configparser
from time import localtime, strftime
from subprocess import Popen, PIPE, STDOUT, call

View File

@ -1,11 +1,12 @@
Name: tuna
Version: 0.14.1
Release: 1
Release: 2
Summary: Application tuning GUI & command line utility
License: GPLv2
URL: https://rt.wiki.kernel.org/index.php/Tuna
Source: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
Patch0: oscilloscope-move-from-pygtk2-to-gtk3-gobject.patch
Patch1: tuna-move-from-pygtk-to-gtk3-gobject.patch
BuildArch: noarch
BuildRequires: python3-devel gettext
Requires: python3-ethtool python3-linux-procfs >= 0.6 python3-schedutils >= 0.6
@ -88,6 +89,9 @@ done
%doc ChangeLog
%changelog
* Fri Dec 30 2022 xu_ping <xuping33@h-partners.com> - 0.14.1-2
- Modify tuna config.py use gtk3
* Fri Sep 11 2020 maminjie <maminjie1@huawei.com> - 0.14.1-1
- Upgrade to 0.14.1