You are not logged in.
Pages: 1
Hi,
I'm just playing with arch & openbox, and I must admit that's a killer couple!
I'm using pypanel and would like to apply this patch. But I'm relatively new to linux and don't know how to proceed. Must I recompile the package? Or edit the /usr/bin/pypanel? Once done, what are the new variables to put in .pypanelrc?
Thanks in advance, and sorry for my approximate english. (:D)
Offline
hmm, I see two ways to do this.
1. Copy /usr/bin/pypanel to a directory. Make another backup. Download the patch to the same directory. run "patch -N < downloaded_patch" (might have to use patch -Np1). Copy the patched pypanel back to /usr/bin, chmod 755.
2. Edit the pkgbuild, add the patch to sources, regenerate md5sums, after "cd $startdir/src/$pkgname-$pkgver" add "patch -Np1 < ../name_of_patch". Run makepkg then pacman -U to install.
Offline
Wow, fast response.
I've tried the first method, and it worked like a charm, thank you!
This way of patching files is impressive. I'm learning day after day with arch, that's really exciting.
Last edited by vomix (2007-06-25 19:09:41)
Offline
Hi i followed the instruction of the first method, but when I start pypanel, this is what i get:
rhandulle@Don-DiZzLe> pypanel ~/SAMSUNG/panel
/usr/bin/pypanel:901: RuntimeWarning: Python C API version mismatch for module p
pmodule: This Python has API version 1013, module ppmodule has version 1012.
from ppmodule import ppinit, ppshade, ppicon, ppfont, ppfontsize, ppclear
Traceback (most recent call last):
File "/usr/bin/pypanel", line 966, in <module>
PyPanel(display.Display())
File "/usr/bin/pypanel", line 56, in __init__
if P_L_BUFF != 0 and P_R_BUFF != 0:
NameError: global name 'P_L_BUFF' is not defined
Offline
Did you put something like
P_L_BUFF = 6
P_R_BUFF = 6
P_T_BUFF = 0
P_B_BUFF = 6
in your .pypanelrc file?
Offline
nope, I didnt know that, its not mentioned nowhere in this thread.
nevermind!
Last edited by Don-DiZzLe (2007-07-22 18:40:57)
Offline
so, I'd like to use this patch as well.
I put the patch into a file called bufferpatch
--- ./pypanel 2005-06-26 16:24:43.000000000 -0700
+++ ./pypanel 2006-10-22 13:47:00.000000000 -0700
@@ -44,19 +44,28 @@
self.focus = 0 # Currently focused window
self.rpm = None # Root pixmap ID
- global P_HEIGHT, P_WIDTH, P_LOCATION
-
+ global P_HEIGHT, P_WIDTH, P_LOCATION, P_B_BUFF, P_T_BUFF, P_L_BUFF, P_R_BUFF, P_START
+
# Misc. initializations
if SHOWLINES or SHOWBORDER:
self.lgc = self.root.create_gc(foreground=self.getColor(LINE_COLOR))
if not P_WIDTH:
P_WIDTH = self.screen.width_in_pixels - P_START
+ elif P_WIDTH:
+ P_WIDTH -= P_START
+ if P_L_BUFF != 0 and P_R_BUFF != 0:
+ P_WIDTH -= P_R_BUFF + P_START + P_L_BUFF
+ P_START += P_L_BUFF
if SHOWBORDER:
P_HEIGHT += 2
if P_LOCATION:
P_LOCATION = self.screen.height_in_pixels - P_HEIGHT
- else:
+ if P_B_BUFF != 0:
+ P_LOCATION -= P_B_BUFF
+ else:
P_LOCATION = 0
+ if P_T_BUFF != 0:
+ P_LOCATION = P_T_BUFF
# Setup the panel's window
self.window = self.screen.root.create_window(P_START, P_LOCATION,
Not sure if the first two lines are correct. the dir where bufferpatch and pypanel are is ~/test if that matters.
When I do
patch -Np1 < bufferpatch
I receive the error of
patching file pypanel
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 44 with fuzz 1.
what does this mean?
Last edited by bionnaki (2008-01-05 06:40:42)
Offline
Does anyone have a valid link for this patch? I have used it before with success, but do not have a copy any more. I tried using the text in the code block above but it doesn't work properly for me.
Edit: That link might be valid, but on any PC / browser combination I have been able to try and access it, the page just renders blank. Any pastebin.ca url is just a white page. Maybe it hates Australians or something.
Decided to give the page a look in Links... gives me a few links that send me to a pages with bizarre terms of use / spam message combinations, that then link to an email transcript about replica watches. Really quite interesting.
Last edited by BluntBox (2008-04-28 14:39:50)
Offline
With the help of someone from IRC (tigrmesh) I was able to get the patch. Can be accessed here http://pastebin.com/f240a16bf if anyone has problems viewing pastebin.ca like I did.
Note, pastebin.com drops @@ from the beginning of the third line of the file, so add those back in before trying to use it.
Last edited by BluntBox (2008-04-29 04:14:57)
Offline
I heard pastebin.com runs on Windows servers and reformats your pastes with Windows instead of *nix newlines... I have had problems using patches because of that.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Pages: 1