@@ -2334,64 +2334,65 @@ def show_updates(self, updates):
2334
2334
num_visible += 1
2335
2335
download_size += update .size
2336
2336
2337
- if FLATPAK_SUPPORT and self .flatpak_updater and not is_self_update :
2338
- blacklist = self .settings .get_strv ("blacklisted-packages" )
2339
-
2340
- self .flatpak_updater .fetch_updates ()
2341
- if self .flatpak_updater .error is None :
2342
- for update in self .flatpak_updater .updates :
2343
- update .type = "flatpak"
2344
- if update .ref_name in blacklist or update .source_packages [0 ] in blacklist :
2337
+ if not self .test_mode :
2338
+ if FLATPAK_SUPPORT and self .flatpak_updater and not is_self_update :
2339
+ blacklist = self .settings .get_strv ("blacklisted-packages" )
2340
+
2341
+ self .flatpak_updater .fetch_updates ()
2342
+ if self .flatpak_updater .error is None :
2343
+ for update in self .flatpak_updater .updates :
2344
+ update .type = "flatpak"
2345
+ if update .ref_name in blacklist or update .source_packages [0 ] in blacklist :
2346
+ continue
2347
+ if update .flatpak_type == "app" :
2348
+ tooltip = _ ("Flatpak application" )
2349
+ else :
2350
+ tooltip = _ ("Flatpak runtime" )
2351
+
2352
+ title = update .name
2353
+ description = update .summary
2354
+ source = update .origin
2355
+ icon = "mintupdate-type-flatpak-symbolic"
2356
+ model_items .append ((update , title , description , source , icon , f"5{ update .ref_name } " , tooltip ))
2357
+
2358
+ num_software += 1
2359
+ num_visible += 1
2360
+ download_size += update .size
2361
+
2362
+ if CINNAMON_SUPPORT and not is_self_update :
2363
+ blacklist = self .settings .get_strv ("blacklisted-packages" )
2364
+
2365
+ for update in self .cinnamon_updater .get_updates ():
2366
+ update .real_source_name = update .uuid
2367
+ update .source_packages = ["%s=%s" % (update .uuid , update .new_version )]
2368
+ update .package_names = []
2369
+ update .type = "cinnamon"
2370
+ if update .uuid in blacklist or update .source_packages [0 ] in blacklist :
2345
2371
continue
2346
- if update .flatpak_type == "app" :
2347
- tooltip = _ ("Flatpak application" )
2372
+ if update .spice_type == cinnamon .SPICE_TYPE_APPLET :
2373
+ tooltip = _ ("Cinnamon applet" )
2374
+ elif update .spice_type == cinnamon .SPICE_TYPE_DESKLET :
2375
+ tooltip = _ ("Cinnamon desklet" )
2376
+ elif update .spice_type == "action" :
2377
+ # The constant cinnamon.SPICE_TYPE_ACTION is new in Cinnamon 6.0
2378
+ # use the value "action" instead here so this code can be
2379
+ # backported.
2380
+ tooltip = _ ("Nemo action" )
2381
+ elif update .spice_type == cinnamon .SPICE_TYPE_THEME :
2382
+ tooltip = _ ("Cinnamon theme" )
2348
2383
else :
2349
- tooltip = _ ("Flatpak runtime " )
2384
+ tooltip = _ ("Cinnamon extension " )
2350
2385
2351
- title = update .name
2352
- description = update .summary
2353
- source = update . origin
2354
- icon = "mintupdate-type-flatpak -symbolic"
2355
- model_items .append ((update , title , description , source , icon , f"5 { update .ref_name } " , tooltip ))
2386
+ title = update .uuid
2387
+ description = update .name
2388
+ source = "Linux Mint / cinnamon"
2389
+ icon = "cinnamon -symbolic"
2390
+ model_items .append ((update , title , description , source , icon , f"6 { update .uuid } " , tooltip ))
2356
2391
2357
2392
num_software += 1
2358
2393
num_visible += 1
2359
2394
download_size += update .size
2360
2395
2361
- if CINNAMON_SUPPORT and not is_self_update :
2362
- blacklist = self .settings .get_strv ("blacklisted-packages" )
2363
-
2364
- for update in self .cinnamon_updater .get_updates ():
2365
- update .real_source_name = update .uuid
2366
- update .source_packages = ["%s=%s" % (update .uuid , update .new_version )]
2367
- update .package_names = []
2368
- update .type = "cinnamon"
2369
- if update .uuid in blacklist or update .source_packages [0 ] in blacklist :
2370
- continue
2371
- if update .spice_type == cinnamon .SPICE_TYPE_APPLET :
2372
- tooltip = _ ("Cinnamon applet" )
2373
- elif update .spice_type == cinnamon .SPICE_TYPE_DESKLET :
2374
- tooltip = _ ("Cinnamon desklet" )
2375
- elif update .spice_type == "action" :
2376
- # The constant cinnamon.SPICE_TYPE_ACTION is new in Cinnamon 6.0
2377
- # use the value "action" instead here so this code can be
2378
- # backported.
2379
- tooltip = _ ("Nemo action" )
2380
- elif update .spice_type == cinnamon .SPICE_TYPE_THEME :
2381
- tooltip = _ ("Cinnamon theme" )
2382
- else :
2383
- tooltip = _ ("Cinnamon extension" )
2384
-
2385
- title = update .uuid
2386
- description = update .name
2387
- source = "Linux Mint / cinnamon"
2388
- icon = "cinnamon-symbolic"
2389
- model_items .append ((update , title , description , source , icon , f"6{ update .uuid } " , tooltip ))
2390
-
2391
- num_software += 1
2392
- num_visible += 1
2393
- download_size += update .size
2394
-
2395
2396
# Updates found, update status message
2396
2397
self .show_updates_in_UI (num_visible , num_software , num_security , download_size , is_self_update , model_items )
2397
2398
0 commit comments