Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-25-2005, 09:26 AM   #1
Registered: Mar 2005
Location: Connecticut/USA
Distribution: Ubuntu 9.04
Posts: 68

Rep: Reputation: 15
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.

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??
Old 11-25-2005, 09:32 AM   #2
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
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
Old 11-25-2005, 08:14 PM   #3
Registered: Mar 2005
Location: Connecticut/USA
Distribution: Ubuntu 9.04
Posts: 68

Original Poster
Rep: Reputation: 15
Thanks for your reply. Very simple command indeed...

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

$ 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

Anyway, thanks for your help!



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to apply patch? greythorne Fedora 1 03-09-2005 05:38 AM
Ho Do I Apply The CK Patch? AFI_Flame Linux - Software 1 11-14-2004 11:49 PM
How to apply PATCH? aurelio26 *BSD 3 10-07-2004 02:23 PM
How to Apply patch for Mass Storage device to work? (uss725-2.4.20-rc2.patch) cevjr Linux - Hardware 3 04-21-2004 12:14 AM
steps to apply a patch arpi Linux - General 5 03-21-2004 06:28 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration