[shotwell/wip/gtk4: 44/45] More unity removal




commit 6abb2b5337eede00f5b167526b1e423009ca560c
Author: Jens Georg <mail jensge org>
Date:   Tue Apr 12 21:54:51 2022 +0200

    More unity removal

 src/UnityProgressBar.vala        | 83 ----------------------------------------
 src/camera/ImportPage.vala       | 22 +----------
 src/dialogs/ProgressDialog.vala  | 20 ----------
 src/library/ImportQueuePage.vala | 16 --------
 4 files changed, 2 insertions(+), 139 deletions(-)
---
diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala
index 5d0c61f9..b1a1f7b9 100644
--- a/src/camera/ImportPage.vala
+++ b/src/camera/ImportPage.vala
@@ -696,10 +696,6 @@ public class ImportPage : CheckerboardPage {
     private HideImportedViewFilter hide_imported_filter = new HideImportedViewFilter();
     private CameraViewTracker tracker;
 
-#if UNITY_SUPPORT
-    UnityProgressBar uniprobar = UnityProgressBar.get_instance();
-#endif
-    
     public enum RefreshResult {
         OK,
         BUSY,
@@ -1238,19 +1234,9 @@ public class ImportPage : CheckerboardPage {
 
         // Associate files (for RAW+JPEG)
         auto_match_raw_jpeg(import_list);
-        
-#if UNITY_SUPPORT
-        //UnityProgressBar: try to draw progress bar
-        uniprobar.set_visible(true);
-#endif
-        
+                
         load_previews_and_metadata(import_list);
-        
-#if UNITY_SUPPORT
-        //UnityProgressBar: reset
-        uniprobar.reset();
-#endif
-        
+                
         progress_bar.visible = false;
         progress_bar.set_ellipsize(Pango.EllipsizeMode.NONE);
         progress_bar.set_text("");
@@ -1602,10 +1588,6 @@ public class ImportPage : CheckerboardPage {
             import_sources.add(import_source);
             
             progress_bar.set_fraction((double) (++loaded_photos) / (double) import_list.size);
-#if UNITY_SUPPORT
-            //UnityProgressBar: set progress
-            uniprobar.set_progress((double) (loaded_photos) / (double) import_list.size);
-#endif
             
             // spin the event loop so the UI doesn't freeze
             spin_event_loop();
diff --git a/src/dialogs/ProgressDialog.vala b/src/dialogs/ProgressDialog.vala
index bbba266a..f4e2693c 100644
--- a/src/dialogs/ProgressDialog.vala
+++ b/src/dialogs/ProgressDialog.vala
@@ -13,9 +13,6 @@ public class ProgressDialog : Gtk.Window {
     private int update_every = 1;
     private int minimum_on_screen_time_msec = 500;
     private ulong time_started;
-#if UNITY_SUPPORT
-    UnityProgressBar uniprobar = UnityProgressBar.get_instance();
-#endif
 
     public ProgressDialog(Gtk.Window? owner, string text, Cancellable? cancellable = null) {
         this.cancellable = cancellable;
@@ -94,20 +91,11 @@ public class ProgressDialog : Gtk.Window {
 
         progress_bar.set_fraction(pct);
         progress_bar.set_text(_("%d%%").printf((int) (pct * 100.0)));
-
-#if UNITY_SUPPORT
-        //UnityProgressBar: set progress
-        uniprobar.set_progress(pct);
-#endif
     }
 
     public void set_status(string text) {
         progress_bar.set_text(text);
 
-#if UNITY_SUPPORT
-        //UnityProgressBar: try to draw progress bar
-        uniprobar.set_visible(true);
-#endif
         show();
     }
 
@@ -133,10 +121,6 @@ public class ProgressDialog : Gtk.Window {
     }
 
     public new void close() {
-#if UNITY_SUPPORT
-        //UnityProgressBar: reset
-        uniprobar.reset();
-#endif
         hide();
         destroy();
     }
@@ -165,10 +149,6 @@ public class ProgressDialog : Gtk.Window {
             // If there is still more work to do for at least MINIMUM_ON_SCREEN_TIME_MSEC,
             // finally display the dialog.
             if (ttc > minimum_on_screen_time_msec) {
-#if UNITY_SUPPORT
-                //UnityProgressBar: try to draw progress bar
-                uniprobar.set_visible(true);
-#endif
                 show();
                 spin_event_loop();
             }
diff --git a/src/library/ImportQueuePage.vala b/src/library/ImportQueuePage.vala
index a86591dd..4b6ca72c 100644
--- a/src/library/ImportQueuePage.vala
+++ b/src/library/ImportQueuePage.vala
@@ -13,10 +13,6 @@ public class ImportQueuePage : SinglePhotoPage {
     private Gtk.ProgressBar progress_bar = new Gtk.ProgressBar();
     private bool stopped = false;
 
-#if UNITY_SUPPORT
-    UnityProgressBar uniprobar = UnityProgressBar.get_instance();
-#endif
-    
     public signal void batch_added(BatchImport batch_import);
     
     public signal void batch_removed(BatchImport batch_import);
@@ -37,10 +33,6 @@ public class ImportQueuePage : SinglePhotoPage {
         progress_bar.set_show_text(true);
         
         toolbar.append(progress_bar);
-#if UNITY_SUPPORT
-        //UnityProgressBar: try to draw progress bar
-        uniprobar.set_visible(true);
-#endif
     }
     
     protected override void init_collect_ui_filenames(Gee.List<string> ui_filenames) {
@@ -124,10 +116,6 @@ public class ImportQueuePage : SinglePhotoPage {
         double pct = (completed_bytes <= total_bytes) ? (double) completed_bytes / (double) total_bytes
             : 0.0;
         progress_bar.set_fraction(pct);
-#if UNITY_SUPPORT
-        //UnityProgressBar: set progress
-        uniprobar.set_progress(pct);
-#endif
     }
     
     private void on_imported(ThumbnailSource source, Gdk.Pixbuf pixbuf, int to_follow) {
@@ -176,10 +164,6 @@ public class ImportQueuePage : SinglePhotoPage {
             progress_bar.set_ellipsize(Pango.EllipsizeMode.NONE);
             progress_bar.set_text("");
             progress_bar.set_fraction(0.0);
-#if UNITY_SUPPORT
-            //UnityProgressBar: reset
-            uniprobar.reset();
-#endif
 
             // blank the display
             blank_display();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]