mirror of
https://github.com/munki/munki.git
synced 2026-04-21 20:18:20 -05:00
Show that an item will be removed in updates list view
This commit is contained in:
@@ -22,12 +22,14 @@ from random import shuffle
|
||||
from string import Template
|
||||
import urlparse
|
||||
|
||||
from operator import itemgetter
|
||||
from urllib import quote_plus, unquote_plus
|
||||
|
||||
import munki
|
||||
import msulib
|
||||
import msulog
|
||||
import FoundationPlist
|
||||
import MSUBadgedTemplateImage
|
||||
|
||||
import MunkiItems
|
||||
|
||||
from objc import YES, NO, IBAction, IBOutlet, nil
|
||||
@@ -36,14 +38,8 @@ from Foundation import *
|
||||
from AppKit import *
|
||||
from WebKit import *
|
||||
|
||||
from operator import itemgetter
|
||||
from urllib import quote_plus, unquote_plus
|
||||
|
||||
class MSUMainWindowController(NSWindowController):
|
||||
|
||||
_updateList = None
|
||||
_optionalItemList = None
|
||||
_self_service_info = None
|
||||
_changed_choices = []
|
||||
_alertedUserToOutstandingUpdates = False
|
||||
|
||||
@@ -181,6 +177,7 @@ class MSUMainWindowController(NSWindowController):
|
||||
return
|
||||
|
||||
if tasktype == 'checktheninstall':
|
||||
# possibly check again if choices have changed
|
||||
self.updateNow()
|
||||
return
|
||||
|
||||
|
||||
@@ -209,9 +209,6 @@ class GenericItem(dict):
|
||||
else:
|
||||
self['description'] = ''
|
||||
self['icon'] = self.getIcon()
|
||||
self['version_label'] = NSLocalizedString(
|
||||
u'Version',
|
||||
u'VersionLabel').encode('utf-8')
|
||||
self['due_date_sort'] = NSDate.distantFuture()
|
||||
# sort items that need restart highest, then logout, then other
|
||||
if self.get('RestartAction') in [None, 'None']:
|
||||
@@ -415,7 +412,7 @@ class GenericItem(dict):
|
||||
return map.get(self['status'], self['status'])
|
||||
|
||||
def version_label(self):
|
||||
'''Text for the version info in the detail sidebar'''
|
||||
'''Text for the version label'''
|
||||
if self['status'] == 'will-be-removed':
|
||||
removal_text = NSLocalizedString(
|
||||
u'Will be removed', u'WillBeRemovedDisplayText').encode('utf-8')
|
||||
@@ -423,6 +420,13 @@ class GenericItem(dict):
|
||||
else:
|
||||
return NSLocalizedString(u'Version', u'VersionLabel').encode('utf-8')
|
||||
|
||||
def display_version(self):
|
||||
'''Version number for display'''
|
||||
if self['status'] == 'will-be-removed':
|
||||
return ''
|
||||
else:
|
||||
return self.get('version_to_install', '')
|
||||
|
||||
def developer_sort(self):
|
||||
'''returns sort priority based on developer and install/removal status'''
|
||||
if self['status'] != 'will-be-removed' and self['developer'] == 'Apple':
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
<ul class="list info">
|
||||
<li><h2><a title="${display_name}" href="${detail_link}">${display_name}</a></h2></li>
|
||||
<li>${developer}</li>
|
||||
<li>${version_label} ${version_to_install}</li>
|
||||
<li>${version_label} ${display_version}</li>
|
||||
<li class="warning">${restart_action_text}</li>
|
||||
</ul>
|
||||
</td>
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@
|
||||
<div class="content">
|
||||
<ul class="list">
|
||||
<li><span class="label">${typeLabel} </span>${category}</li>
|
||||
<li><span class="label">${versionLabel} </span>${version_to_install}</li>
|
||||
<li><span class="label">${versionLabel} </span>${display_version}</li>
|
||||
<li><span class="label">${sizeLabel} </span>${size}</li>
|
||||
<li><span class="label">${developerLabel} </span>${developer}</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user