LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to apply a patch? (https://www.linuxquestions.org/questions/programming-9/how-to-apply-a-patch-386396/)

amwink 11-25-2005 08:26 AM

How to apply a patch?
 
I use gtk-qt for rendering gtk widgets in qt style. However, the menus of gtk applications (as gimp or gaim) are being rendered in black.

I found a patch, but I don't know how to apply it to the source before recompiling it.

Code:

diff -urN gtk-qt-engine-0.6.orig/src/qt_theme_draw.c gtk-qt-engine-0.6/src/qt_theme_draw.c
--- gtk-qt-engine-0.6.orig/src/qt_theme_draw.c 2004-12-21 21:28:34 +0600
+++ gtk-qt-engine-0.6/src/qt_theme_draw.c 2005-09-30 08:20:50 +0700
@@ -1777,6 +1777,7 @@
{
pixmap = pix_test;
parent_relative = FALSE;
+ gdk_drawable_set_colormap(pixmap, style->colormap);
}

gdk_window_set_back_pixmap (window, pixmap, parent_relative);

What should I do??

jtshaw 11-25-2005 08:32 AM

In the source directory, run patch -p1 < <patchfile>

So if the patch file is called gtk-qt.patch and it is sitting in your home directoryu it would look somethign like this:

patch -p1 < ~/gtk-qt.patch

amwink 11-25-2005 07:14 PM

Thanks for your reply. Very simple command indeed...

But I couldn't patch it. Have a look at the output:

Code:

$ patch -p1 < gtk-qt.patch
patching file src/qt_theme_draw.c
patch: **** malformed patch at line 5: {

I guess this is a problem with the patch itself, or I miscopied it from the net.
I found it in http://www.kde-look.org/content/show.php?content=9714

Anyway, thanks for your help!

amwink


All times are GMT -5. The time now is 06:13 AM.