diff options
| author | Dave Hibberd <d@vehibberd.com> | 2023-10-28 13:57:08 +0100 |
|---|---|---|
| committer | Dave Hibberd <d@vehibberd.com> | 2023-10-28 14:46:44 +0100 |
| commit | 185139a27eeb9f08ea7f507a5ccfcae6addac692 (patch) | |
| tree | 3b72a4942453dd51aaf2500323647054df7d8e40 /debian | |
| parent | b2d3cacfab150272614a46fdecb93fe57b996426 (diff) | |
work through the runtime errors again
Diffstat (limited to 'debian')
| -rw-r--r-- | debian/patches/wxui-chirp-share.patch | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/debian/patches/wxui-chirp-share.patch b/debian/patches/wxui-chirp-share.patch index 0dd2cd6..0403b0b 100644 --- a/debian/patches/wxui-chirp-share.patch +++ b/debian/patches/wxui-chirp-share.patch @@ -1,38 +1,45 @@ --- a/chirp/wxui/main.py +++ b/chirp/wxui/main.py -@@ -373,9 +373,7 @@ +@@ -373,11 +373,7 @@ vbox = wx.BoxSizer(wx.VERTICAL) self.SetSizer(vbox) - with importlib_resources.as_file( - importlib_resources.files('chirp.share') - .joinpath('welcome_screen.png') -+ with ( os.path.join("/usr/lib/python3/dist-packages/chirp/share/", "welcome_screen.png") - ) as welcome: - bmp = wx.Bitmap(str(welcome)) +- ) as welcome: +- bmp = wx.Bitmap(str(welcome)) ++ bmp = wx.Bitmap(str('/usr/lib/python3/dist-packages/chirp/share/welcome_screen.png')) width, height = self.GetSize() -@@ -452,9 +450,7 @@ + img = wx.StaticBitmap(self, wx.ID_ANY, bmp) + vbox.Add(img, 1, flag=wx.EXPAND) +@@ -452,11 +448,7 @@ self.add_tab_panel = wx.Panel(self, pos=(0, 0), size=(600, 600)) self.add_tab_panel.Hide() - with importlib_resources.as_file( - importlib_resources.files('chirp.share') - .joinpath('plus-icon.png') -+ with ( os.path.join("/usr/lib/python3/dist-packages/chirp/share/", "plus-icon.png") - ) as icon: - self.add_tab_bm = wx.Bitmap(str(icon), wx.BITMAP_TYPE_ANY) +- ) as icon: +- self.add_tab_bm = wx.Bitmap(str(icon), wx.BITMAP_TYPE_ANY) ++ self.add_tab_bm = wx.Bitmap(str('/usr/lib/python3/dist-packages/chirp/share/plus-icon.png'), wx.BITMAP_TYPE_ANY) -@@ -524,11 +520,9 @@ - icon = 'chirp.ico' - else: - icon = 'chirp.png' + self.add_tab_panel.Bind(wx.EVT_PAINT, self._paint_add_tab_panel) + +@@ -520,15 +512,7 @@ + self.PopupMenu(menu) + + def set_icon(self): +- if sys.platform == 'win32': +- icon = 'chirp.ico' +- else: +- icon = 'chirp.png' - with importlib_resources.as_file( - importlib_resources.files('chirp.share') - .joinpath(icon) -+ with ( os.path.join("/usr/lib/python3/dist-packages/chirp/share/", "chirp.png") - ) as path: +- ) as path: - self.SetIcon(wx.Icon(str(path))) -+ self.SetIcon(wx.Icon(path)) ++ self.SetIcon(wx.Icon(str('/usr/lib/python3/dist-packages/chirp/share/chirp.png'))) @property def current_editorset(self): @@ -129,3 +136,19 @@ def chirpmain(): +@@ -205,10 +205,10 @@ + report.check_for_updates( + lambda ver: wx.CallAfter(main.display_update_notice, ver)) + +- if sys.platform == 'linux' and args.install_desktop_app: +- try: +- maybe_install_desktop() +- except Exception as e: +- LOG.exception('Failed to run linux desktop installer: %s', e) ++ # if sys.platform == 'linux' and args.install_desktop_app: ++ # try: ++ # maybe_install_desktop() ++ # except Exception as e: ++ # LOG.exception('Failed to run linux desktop installer: %s', e) + + app.MainLoop() |
