summaryrefslogtreecommitdiff
path: root/recipes/otpcalc/otpcalc-0.97/otpcalc-0.97-gtk2-gentoo.patch
blob: 4157374cd31b1a9b75803e7c3237c8f8cb112403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
upstream: all patches sent upstream to Anthony D. Urso <anthonyu@killa.net> by Yuri Bushmelev.  
status: pending
origin: http://packages.gentoo.org/package/sys-auth/otpcalc?full_cat 

--- otpCalc-0.97-orig/Makefile.in	2004-11-24 07:44:12.000000000 +0100
+++ otpCalc-0.97/Makefile.in	2007-12-26 00:38:52.000000000 +0100
@@ -3,8 +3,8 @@
 
 CC = @CC@
 DEFS = -DVERSION=\"$(VER)\" @DEFS@
-CFLAGS = -s -O3 -Wall -pipe `gtk-config --cflags`
-LIBS = `gtk-config --libs` @LIBS@
+CFLAGS += -Wall -pipe `pkg-config --cflags gtk+-2.0`
+LIBS = `pkg-config --libs gtk+-2.0` @LIBS@
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
--- otpCalc-0.97-orig/callbacks.c	2004-11-24 06:57:45.000000000 +0100
+++ otpCalc-0.97/callbacks.c	2007-12-26 00:38:52.000000000 +0100
@@ -236,7 +236,7 @@
 }
 
 
-void focus(GtkWidget *widget, gpointer data)
+gboolean focus(GtkWidget *widget, GdkEvent *event, gpointer data)
 {
 
 	static GdkAtom targets;
@@ -244,12 +244,12 @@
 
 
 	if (!autopaste)
-		return;
+		return FALSE;
 
 	targets = gdk_atom_intern("STRING", FALSE);
 
 	gtk_selection_convert(widget, GDK_SELECTION_PRIMARY, targets,
 			      GDK_CURRENT_TIME);
 
-
+	return FALSE;
 }
--- otpCalc-0.97-orig/gui.c	2004-11-24 07:46:53.000000000 +0100
+++ otpCalc-0.97/gui.c	2007-12-26 00:38:52.000000000 +0100
@@ -29,7 +29,7 @@
 GtkWidget *te_response;
 
 unsigned short hash;
-unsigned short newline = 1;
+unsigned short newline = 0;
 unsigned short autopaste = 1;
 
 int main(int argc, char *argv[])
@@ -147,7 +147,7 @@
 
 	/* Setup the menu bar... */
 	mb_top = gtk_menu_bar_new();
-	gtk_menu_bar_set_shadow_type(GTK_MENU_BAR(mb_top), GTK_SHADOW_NONE); 
+	/*gtk_menu_bar_set_shadow_type(GTK_MENU_BAR(mb_top), GTK_SHADOW_NONE);*/
 	gtk_table_attach(GTK_TABLE(ta_top), mb_top, 0, 3, 0, 1,
 			 (GtkAttachOptions)(GTK_FILL),
 			 (GtkAttachOptions)(0), 0, 0);
--- otpCalc-0.97-orig/utility.c	2004-11-24 06:59:09.000000000 +0100
+++ otpCalc-0.97/utility.c	2007-12-26 00:38:52.000000000 +0100
@@ -422,7 +422,7 @@
 			words[extract(message, 33, 11)],
 			words[extract(message, 44, 11)],
 			words[extract(message, 55, 11)],
-			(newline == 1) ? "\n" : NULL);
+			(newline == 1) ? "\n" : "");
 
 	return response;