summaryrefslogtreecommitdiff
path: root/recipes/pimlico/files/dates-owl-window-menu.patch
blob: 6bde252ac3a3f0166893177288dc6bdd3c8f924c (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
 src/Makefile.am      |    2 +-
 src/dates_gtk.c      |    5 -----
 src/dates_main.c     |    5 +++++
 src/dates_platform.h |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

--- dates-0.4.5.orig/src/Makefile.am
+++ dates-0.4.5/src/Makefile.am
@@ -33,11 +33,11 @@ dates_SOURCES = $(platform) 	\
 	dates_callbacks.h 	\
 	dates_callbacks.c 	\
 	gconf-bridge.h		\
 	gconf-bridge.c
 
-dates_LDADD = $(DATES_LIBS) libgtkdatesview.la
+dates_LDADD = $(DATES_LIBS) libgtkdatesview.la -lowl
 
 if USE_OWL
 dates_LDADD += $(top_builddir)/libowl/libowl.la
 endif 
 
--- dates-0.4.5.orig/src/dates_gtk.c
+++ dates-0.4.5/src/dates_gtk.c
@@ -30,14 +30,10 @@
 #ifdef WITH_HILDON
 #include <hildon/hildon-color-button.h>
 #endif
 
 #ifndef DATES_PLATFORM_create_main_window
-/* the default implementation assumes that menu is GtkMenuBar */
-#ifdef DATES_MENU_WITHOUT_BAR
-#error Cannot use default create_main_window () if DATES_MENU_WITHOUT_BAR is defined !!!
-#endif
 static GtkWidget *
 create_main_window (DatesData * d, GtkWidget * toolbar,
 					GtkWidget * menu, GtkAccelGroup * accel_group)
 {
 	GtkWidget *main_vbox;
@@ -55,11 +51,10 @@ create_main_window (DatesData * d, GtkWi
 	main_vbox = gtk_vbox_new (FALSE, 0);
 	gtk_widget_show (main_vbox);
 	gtk_container_add (GTK_CONTAINER (d->main_window), main_vbox);
 
 	gtk_widget_show (menu);
-	gtk_box_pack_start (GTK_BOX (main_vbox), menu, FALSE, FALSE, 0);
 
 	gtk_box_pack_end (GTK_BOX (main_vbox), toolbar, FALSE, FALSE, 0);
 	gtk_container_set_border_width (GTK_CONTAINER (toolbar), 3);
 
 
--- dates-0.4.5.orig/src/dates_main.c
+++ dates-0.4.5/src/dates_main.c
@@ -23,10 +23,12 @@
 #include <math.h>
 #include <libecal/e-cal-time-util.h>
 #include <libical/icaltime.h>
 #include <gconf/gconf-client.h>
 
+#include <gtk/gtkmenuitem.h>
+#include "owlwindowmenu.h"
 #include "dates_types.h"
 #include "dates_platform.h"
 #include "dates_callbacks.h"
 
 #include "gconf-bridge.h"
@@ -564,10 +566,13 @@ main (int argc, char **argv)
 		gtk_widget_show (plug_widget);
 	} else {
 		gtk_widget_show (data.main_window);
 	}
 
+	owl_set_window_menu (GTK_WINDOW (data.main_window),
+			     GTK_MENU (data.main_menu));
+
 	gtk_main ();
 
 	/* clean up */
 	g_option_context_free (context);
 	
--- dates-0.4.5.orig/src/dates_platform.h
+++ dates-0.4.5/src/dates_platform.h
@@ -18,11 +18,11 @@
 #ifndef DATES_UI_GTK_H
 #define DATES_UI_GTK_H
 
 #include "dates_types.h"
 
-#ifdef WITH_HILDON
+#if 1
 #define DATES_MENU_WITHOUT_BAR 1
 #endif
 
 struct DatesData;