Skip to contentSkip to conversation

hob: progress bar changed to busy cursor when you open log file

PATCH_V2 Cristiana Voicu 1 participant 1 message Jan 21, 2013

lore
Share & tools
lore
#0 lore raw

-the first implementation for this bug used a progress bar, that is shown during open file process; it revelead that the progress bar stops earlier -now I have implemented using gtk.show_uri() method, that shows itself a busy cursor when it opens a file;
-deleted the code for the first implementation

[YOCTO #2997]
---
 bitbake/lib/bb/ui/crumbs/builddetailspage.py     |   16 +----
 bitbake/lib/bb/ui/crumbs/hig/openinglogdialog.py |   68 ----------------------
 bitbake/lib/bb/ui/crumbs/hobthreads.py           |   51 ----------------
 bitbake/lib/bb/ui/crumbs/imagedetailspage.py     |   16 +----
 bitbake/lib/bb/ui/crumbs/packageselectionpage.py |   16 +----
 5 files changed, 6 insertions(+), 161 deletions(-)
 delete mode 100644 bitbake/lib/bb/ui/crumbs/hig/openinglogdialog.py
 delete mode 100644 bitbake/lib/bb/ui/crumbs/hobthreads.py
bitbake/lib/bb/ui/crumbs/builddetailspage.py +2 -14
index 64e758d..171a7a6 100755
@@ -30,8 +30,6 @@ from bb.ui.crumbs.runningbuild import RunningBuildTreeView
 from bb.ui.crumbs.runningbuild import BuildFailureTreeView
 from bb.ui.crumbs.hobpages import HobPage
 from bb.ui.crumbs.hobcolor import HobColors
-from bb.ui.crumbs.hobthreads import OpeningLogThread
-from bb.ui.crumbs.hig.openinglogdialog import OpeningLogDialog
 
 class BuildConfigurationTreeView(gtk.TreeView):
     def __init__ (self):
@@ -431,18 +429,8 @@ class BuildDetailsPage (HobPage):
 
     def open_log_button_clicked_cb(self, button, log_file):
         if log_file:
-            self.stop = False
-            dialog = OpeningLogDialog(title = "Opening Log",
-                parent = None,
-                flags = gtk.DIALOG_MODAL
-                        | gtk.DIALOG_DESTROY_WITH_PARENT
-                        | gtk.DIALOG_NO_SEPARATOR)
-            #create a thread to open log file
-            background = OpeningLogThread(dialog, log_file, self)
-            background.start()
-            response = dialog.run()
-            self.stop = True
-            background.join()
+            log_file = "file:///" + log_file
+            gtk.show_uri(screen=button.get_screen(), uri=log_file, timestamp=0)
 
     def failure_activate_file_bug_link_cb(self, button):
         button.child.emit('activate-link', "http://bugzilla.yoctoproject.org")
bitbake/lib/bb/ui/crumbs/hig/openinglogdialog.py deleted +0 -68

68 lines not on this page · raw message

bitbake/lib/bb/ui/crumbs/hobthreads.py deleted +0 -51

51 lines not on this page · raw message

bitbake/lib/bb/ui/crumbs/imagedetailspage.py +2 -14
index 38fbaaa..1b60aa8 100755
@@ -27,8 +27,6 @@ from bb.ui.crumbs.hobwidget import hic, HobViewTable, HobAltButton, HobButton
 from bb.ui.crumbs.hobpages import HobPage
 import subprocess
 from bb.ui.crumbs.hig.crumbsdialog import CrumbsDialog
-from bb.ui.crumbs.hobthreads import OpeningLogThread
-from bb.ui.crumbs.hig.openinglogdialog import OpeningLogDialog
 
 #
 # ImageDetailsPage
@@ -407,18 +405,8 @@ class ImageDetailsPage (HobPage):
 
     def open_log_clicked_cb(self, button, log_file):
         if log_file:
-            self.stop = False
-            dialog = OpeningLogDialog(title = "Opening Log",
-                parent = None,
-                flags = gtk.DIALOG_MODAL
-                        | gtk.DIALOG_DESTROY_WITH_PARENT
-                        | gtk.DIALOG_NO_SEPARATOR)
-            #create a thread to open log file
-            background = OpeningLogThread(dialog, log_file, self)
-            background.start()
-            response = dialog.run()
-            self.stop = True
-            background.join()
+            log_file = "file:///" + log_file
+            gtk.show_uri(screen=button.get_screen(), uri=log_file, timestamp=0)
 
     def refresh_package_detail_box(self, image_size):
         self.package_detail.update_line_widgets("Total image size: ", image_size)
bitbake/lib/bb/ui/crumbs/packageselectionpage.py +2 -14
index 2da9277..1868ebe 100755
@@ -26,8 +26,6 @@ from bb.ui.crumbs.hobcolor import HobColors
 from bb.ui.crumbs.hobwidget import HobViewTable, HobNotebook, HobAltButton, HobButton
 from bb.ui.crumbs.hoblistmodel import PackageListModel
 from bb.ui.crumbs.hobpages import HobPage
-from bb.ui.crumbs.hobthreads import OpeningLogThread
-from bb.ui.crumbs.hig.openinglogdialog import OpeningLogDialog
 
 #
 # PackageSelectionPage
@@ -169,18 +167,8 @@ class PackageSelectionPage (HobPage):
 
     def open_log_clicked_cb(self, button, log_file):
         if log_file:
-            self.stop = False
-            dialog = OpeningLogDialog(title = "Opening Log",
-                parent = None,
-                flags = gtk.DIALOG_MODAL
-                        | gtk.DIALOG_DESTROY_WITH_PARENT
-                        | gtk.DIALOG_NO_SEPARATOR)
-            #create a thread to open log file
-            background = OpeningLogThread(dialog, log_file, self)
-            background.start()
-            response = dialog.run()
-            self.stop = True
-            background.join()
+            log_file = "file:///" + log_file
+            gtk.show_uri(screen=button.get_screen(), uri=log_file, timestamp=0)
 
     def show_page(self, log_file):
         children = self.button_box.get_children() or []
Signature · 1 line
1.7.9.5