Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 115499 Details for
Bug 173454
Ebuild for GTKPsProc
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
files/gtkpsproc-3.1-simpler_applet.patch
gtkpsproc-3.1-simpler_applet.patch (text/plain), 2.22 KB, created by
Phillip Berndt
on 2007-04-05 11:42:55 UTC
(
hide
)
Description:
files/gtkpsproc-3.1-simpler_applet.patch
Filename:
MIME Type:
Creator:
Phillip Berndt
Created:
2007-04-05 11:42:55 UTC
Size:
2.22 KB
patch
obsolete
>--- psproc_applet.py.orig 2007-04-05 11:50:08.588064761 +0200 >+++ psproc_applet.py 2007-04-05 12:19:21.255943611 +0200 >@@ -24,25 +24,17 @@ > import select > import subprocess > import pwd >+import threading >+import time > > needed="" > > try: >- import _fam >-except : >- needed+="python-fam\n" >- >-try: > import gtk > except: > needed+="python-gtk2\n" > > try: >- import gnomeapplet >-except: >- needed+="python-gnome2-desktop\n" >- >-try: > import gobject > except: > needed+="python-gobject\n" >@@ -101,17 +93,6 @@ > p=subprocess.Popen(comando,shell=True,bufsize=32768) > p.wait() > >-def read_event(a,b): >- >- global fc >- >- while fc.pending(): >- fe = fc.nextEvent() >- if (fe.code==5): # new file created >- launch_gtkpsproc(fe.filename) >- >- return True >- > def init_scan(): > > global fc >@@ -142,20 +123,20 @@ > p=subprocess.Popen("chmod 733 "+directory+"/list",shell=True,bufsize=32768) > p.wait() > >- fc=_fam.open() >- >- if (fc==None): >- send_error("Failed to create a FAM session. Check that the FAM daemon is running\n") >- >- request=fc.monitorDirectory(directory+"/list","") >- >- if (request==None): >- send_error("Failed to create a FAM request. Check that the FAM daemon is running\n") >- >- evento=gobject.io_add_watch(fc.fileno(),gobject.IO_IN,read_event) >- >- if (evento==None): >- send_error("Failed to create a FAM event. Check that the FAM daemon is running\n") >+ # Check for new files in spooler directory >+ def testDir(): >+ listDir = directory + "/list" >+ oldTime = os.stat(listDir).st_mtime >+ files = os.listdir(listDir) >+ while threading.activeCount() > 1: >+ while os.stat(listDir).st_mtime == oldTime and threading.activeCount() > 1: >+ time.sleep(2) >+ oldTime = os.stat(listDir).st_mtime >+ newFiles = os.listdir(listDir) >+ for file in filter(lambda x: x not in files, newFiles): >+ launch_gtkpsproc(file) >+ files = newFiles >+ threading.Thread(target=testDir).start() > > def wdelete_event(widget, event, data=None): > >@@ -210,8 +191,6 @@ > directory="" > window=None > >-if (len(sys.argv) == 2) and (sys.argv[1] == "standalone"): >- check_needed() >- gtk.main() >-else: >- gnomeapplet.bonobo_factory("OAFIID:GNOME_GtkPSproc_applet_Factory",gnomeapplet.Applet.__gtype__,"GtkPSproc","3",factory) >+check_needed() >+gtk.gdk.threads_init() >+gtk.main()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 173454
:
115498
| 115499 |
115500
|
115504
|
115505