/[packages]/cauldron/mail-notification/current/SOURCES/mail-notification-5.4-gtk3-support.patch
ViewVC logotype

Contents of /cauldron/mail-notification/current/SOURCES/mail-notification-5.4-gtk3-support.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 113934 - (show annotations) (download)
Sun Jun 26 06:08:07 2011 UTC (12 years, 10 months ago) by fwang
File size: 50193 byte(s)
sync with fedora's gtk3 port

1 --- build/src/mn-dialog.c.orig 2011-02-02 23:08:09.816659245 +0100
2 +++ build/src/mn-dialog.c 2011-02-02 23:09:16.988113774 +0100
3 @@ -106,8 +106,7 @@
4 #line 27 "src/mn-dialog.gob"
5
6 gtk_container_set_border_width(GTK_CONTAINER(self), 5);
7 - gtk_dialog_set_has_separator(GTK_DIALOG(self), FALSE);
8 - gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(self)->vbox), 2);
9 + gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(self))), 2);
10
11 #line 113 "mn-dialog.c"
12 }
13 --- jbsrc/jb.c.orig 2011-02-02 23:40:33.567924712 +0100
14 +++ jbsrc/jb.c 2011-02-02 23:39:39.680803618 +0100
15 @@ -163,7 +163,7 @@
16 {
17 jb_check_glibc();
18
19 - jb_require_packages("GNOME", "gnome", "glib-2.0 >= 2.14 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.12 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 libxml-2.0 libnotify >= 0.4.1");
20 + jb_require_packages("GNOME", "gnome", "glib-2.0 >= 2.14 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-3.0 libgnome-2.0 >= 2.14.0 gnome-vfs-2.0 libxml-2.0 libnotify >= 0.4.1");
21 jb_require_packages("D-Bus", "dbus", "dbus-glib-1");
22
23 jb_check_packages_for_options("GMime", "gmime", "gmime-2.6",
24 --- build/src/mn-file-chooser-button.c.orig 2011-02-02 23:38:01.503049512 +0100
25 +++ build/src/mn-file-chooser-button.c 2011-02-02 23:38:16.988222034 +0100
26 @@ -358,7 +358,7 @@
27 g_signal_connect(selfp->dialog, "response", G_CALLBACK(self_response_h), self);
28 }
29
30 - if (! GTK_WIDGET_VISIBLE(selfp->dialog))
31 + if (! gtk_widget_get_visible(selfp->dialog))
32 {
33 GtkWindow *parent;
34
35 --- build/src/mn-sound-player.c.orig 2011-02-02 23:55:02.436500397 +0100
36 +++ build/src/mn-sound-player.c 2011-02-02 23:55:09.125141055 +0100
37 @@ -27,7 +27,7 @@
38 #include <sys/types.h>
39 #include <signal.h>
40 #include <glib/gi18n.h>
41 -#include <gnome.h>
42 +#include <libgnome/libgnome.h>
43 #include "mn-conf.h"
44 #include "mn-locked-callback.h"
45 #include "mn-util.h"
46 --- build/src/mn-file-chooser-button.c.orig 2011-02-02 23:55:21.857457045 +0100
47 +++ build/src/mn-file-chooser-button.c 2011-02-02 23:55:30.422996901 +0100
48 @@ -25,7 +25,7 @@
49 #line 39 "src/mn-file-chooser-button.gob"
50
51 #include <glib/gi18n.h>
52 -#include <gnome.h>
53 +#include <libgnome/libgnome.h>
54 #include "mn-util.h"
55
56 #line 32 "mn-file-chooser-button.c"
57 --- build/src/mn-message.c.orig 2011-02-02 23:55:41.160420099 +0100
58 +++ build/src/mn-message.c 2011-02-02 23:55:47.755065850 +0100
59 @@ -26,7 +26,7 @@
60
61 #include <errno.h>
62 #include <glib/gi18n.h>
63 -#include <gnome.h>
64 +#include <libgnome/libgnome.h>
65 #include <libgnomevfs/gnome-vfs.h>
66 #include "mn-conf.h"
67 #include "mn-util.h"
68 --- build/src/mn-file-chooser-button.c.orig 2011-02-03 00:15:16.178407712 +0100
69 +++ build/src/mn-file-chooser-button.c 2011-02-03 00:18:17.865681563 +0100
70 @@ -463,6 +463,7 @@
71
72 GDK_THREADS_ENTER();
73
74 +#if 0
75 if (results)
76 {
77 GnomeVFSGetFileInfoResult *result = results->data;
78 @@ -494,6 +495,7 @@
79 }
80 }
81 }
82 +#endif
83
84 selfp->async_handle = NULL;
85 g_object_unref(self);
86 --- build/src/mn-evolution-folder-tree-server.c.orig 2011-02-07 20:17:09.574274620 +0100
87 +++ build/src/mn-evolution-folder-tree-server.c 2011-02-07 20:23:25.196053994 +0100
88 @@ -25,6 +25,7 @@
89 #line 24 "src/mn-evolution-folder-tree-server.gob"
90
91 #include <dbus/dbus.h>
92 +#include <gtk/gtkx.h>
93 #include <libedataserver/eds-version.h>
94 #if !EDS_CHECK_VERSION(2,29,0)
95 #include <mail/mail-component.h>
96 @@ -71,7 +72,7 @@
97 static void mn_evolution_folder_tree_server_finalize (MNEvolutionFolderTreeServer * self);
98 #line 70 "mn-evolution-folder-tree-server.c"
99 #line 84 "src/mn-evolution-folder-tree-server.gob"
100 -static void mn_evolution_folder_tree_server_plug_destroy_h (GtkObject * object, gpointer user_data);
101 +static void mn_evolution_folder_tree_server_plug_destroy_h (GtkWidget * object, gpointer user_data);
102 #line 73 "mn-evolution-folder-tree-server.c"
103 #line 104 "src/mn-evolution-folder-tree-server.gob"
104 static void mn_evolution_folder_tree_server_selected_h (EMFolderTree * tree, const char * full_name, const char * uri, guint32 flags, gpointer user_data);
105 @@ -456,7 +457,7 @@
106 selfp->tree = em_folder_tree_new_with_model(model);
107 #endif
108
109 - selfp->plug = gtk_plug_new((GdkNativeWindow) selfp->id);
110 + selfp->plug = gtk_plug_new((Window) selfp->id);
111 gtk_container_add(GTK_CONTAINER(selfp->plug), selfp->tree);
112 gtk_widget_show_all(selfp->plug);
113
114 @@ -490,7 +491,7 @@
115
116 #line 84 "src/mn-evolution-folder-tree-server.gob"
117 static void
118 -mn_evolution_folder_tree_server_plug_destroy_h (GtkObject * object, gpointer user_data)
119 +mn_evolution_folder_tree_server_plug_destroy_h (GtkWidget * object, gpointer user_data)
120 {
121 #line 482 "mn-evolution-folder-tree-server.c"
122 #define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::plug_destroy_h"
123 --- src/eggtrayicon.h.orig 2011-02-07 20:25:26.352057350 +0100
124 +++ src/eggtrayicon.h 2011-02-07 20:27:54.495032920 +0100
125 @@ -23,10 +23,9 @@
126 #ifndef __EGG_TRAY_ICON_H__
127 #define __EGG_TRAY_ICON_H__
128
129 -#include <gtk/gtkplug.h>
130 -#ifdef GDK_WINDOWING_X11
131 +#include <gtk/gtk.h>
132 +#include <gtk/gtkx.h>
133 #include <gdk/gdkx.h>
134 -#endif
135
136 G_BEGIN_DECLS
137
138 --- build/src/mn-mail-icon.c.orig 2011-02-07 20:24:58.971663075 +0100
139 +++ build/src/mn-mail-icon.c 2011-02-07 20:30:33.714401306 +0100
140 @@ -833,11 +833,13 @@
141 #line 239 "src/mn-mail-icon.gob"
142
143 GtkWidget *widget = user_data;
144 + GtkAllocation allocation;
145
146 - gdk_window_get_origin(widget->window, x, y);
147 + gdk_window_get_origin(gtk_widget_get_window(widget), x, y);
148 + gtk_widget_get_allocation(widget, &allocation);
149
150 - *x += widget->allocation.x;
151 - *y += widget->allocation.y;
152 + *x += allocation.x;
153 + *y += allocation.y;
154
155 if (*y > gdk_screen_get_height(gtk_widget_get_screen(widget)) / 2)
156 {
157 @@ -847,7 +849,7 @@
158 *y -= req.height;
159 }
160 else
161 - *y += widget->allocation.height;
162 + *y += allocation.height;
163
164 *push_in = TRUE;
165 }}
166 --- build/src/mn-mail-icon-widget.c.orig 2011-02-07 20:31:19.475816763 +0100
167 +++ build/src/mn-mail-icon-widget.c 2011-02-07 21:53:48.858814715 +0100
168 @@ -64,9 +64,13 @@
169 #line 65 "mn-mail-icon-widget.c"
170 #line 110 "src/mn-mail-icon-widget.gob"
171 static void ___7_mn_mail_icon_widget_size_request (GtkWidget * widget, GtkRequisition * requisition);
172 +static void
173 +mn_mail_icon_widget_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width);
174 +static void
175 +mn_mail_icon_widget_get_preferred_height(GtkWidget *widget, gint *minimal_height, gint *natural_height);
176 #line 68 "mn-mail-icon-widget.c"
177 #line 132 "src/mn-mail-icon-widget.gob"
178 -static gboolean ___8_mn_mail_icon_widget_expose_event (GtkWidget * widget, GdkEventExpose * event);
179 +static gboolean ___8_mn_mail_icon_widget_draw (GtkWidget * widget, cairo_t *cr);
180 #line 71 "mn-mail-icon-widget.c"
181 #line 244 "src/mn-mail-icon-widget.gob"
182 static GdkPixbuf * mn_mail_icon_widget_render_icon (MNMailIconWidget * self);
183 @@ -187,9 +191,10 @@
184 parent_class = g_type_class_ref (GTK_TYPE_WIDGET);
185
186 #line 110 "src/mn-mail-icon-widget.gob"
187 - gtk_widget_class->size_request = ___7_mn_mail_icon_widget_size_request;
188 + gtk_widget_class->get_preferred_width = mn_mail_icon_widget_get_preferred_width;
189 + gtk_widget_class->get_preferred_height = mn_mail_icon_widget_get_preferred_height;
190 #line 132 "src/mn-mail-icon-widget.gob"
191 - gtk_widget_class->expose_event = ___8_mn_mail_icon_widget_expose_event;
192 + gtk_widget_class->draw = ___8_mn_mail_icon_widget_draw;
193 #line 194 "mn-mail-icon-widget.c"
194 g_object_class->dispose = ___dispose;
195 g_object_class->finalize = ___finalize;
196 @@ -234,7 +239,7 @@
197 {
198 #line 93 "src/mn-mail-icon-widget.gob"
199
200 - GTK_WIDGET_SET_FLAGS(self, GTK_NO_WINDOW);
201 + gtk_widget_set_has_window(GTK_WIDGET(self), FALSE);
202
203 gtk_widget_set_name(GTK_WIDGET(self), "mn-mail-icon");
204
205 @@ -457,9 +462,28 @@
206 #undef __GOB_FUNCTION__
207 #undef PARENT_HANDLER
208
209 +static void
210 +mn_mail_icon_widget_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width)
211 +{
212 + GtkRequisition requisition;
213 +
214 + ___7_mn_mail_icon_widget_size_request (widget, &requisition);
215 + *minimal_width = *natural_width = requisition.width;
216 +}
217 +
218 +static void
219 +mn_mail_icon_widget_get_preferred_height(GtkWidget *widget, gint *minimal_height, gint *natural_height)
220 +{
221 + GtkRequisition requisition;
222 +
223 + ___7_mn_mail_icon_widget_size_request (widget, &requisition);
224 +
225 + *minimal_height = *natural_height = requisition.height;
226 +}
227 +
228 #line 132 "src/mn-mail-icon-widget.gob"
229 static gboolean
230 -___8_mn_mail_icon_widget_expose_event (GtkWidget * widget G_GNUC_UNUSED, GdkEventExpose * event)
231 +___8_mn_mail_icon_widget_draw (GtkWidget * widget G_GNUC_UNUSED, cairo_t *cr)
232 #line 464 "mn-mail-icon-widget.c"
233 #define PARENT_HANDLER(___widget,___event) \
234 ((GTK_WIDGET_CLASS(parent_class)->expose_event)? \
235 @@ -472,7 +496,7 @@
236
237 Self *self = SELF(widget);
238
239 - if (! GTK_WIDGET_DRAWABLE(widget) || ! selfp->stock_id)
240 + if (! gtk_widget_is_drawable(widget) || ! selfp->stock_id)
241 return FALSE;
242
243 if (selfp->is_on)
244 @@ -480,23 +504,34 @@
245 int x;
246 int y;
247 GdkRectangle image_area;
248 + GtkAllocation allocation;
249 + GtkRequisition requisition;
250
251 /* note: widget->requisition is the pixbuf size, see size_request() */
252
253 - x = floor(widget->allocation.x + ((widget->allocation.width - widget->requisition.width) * ICON_XALIGN));
254 - y = floor(widget->allocation.y + ((widget->allocation.height - widget->requisition.height) * ICON_YALIGN));
255 + gtk_widget_get_allocation(widget, &allocation);
256 + gtk_widget_get_requisition(widget, &requisition);
257 +
258 + x = floor(allocation.x + ((allocation.width - requisition.width) * ICON_XALIGN));
259 + y = floor(allocation.y + ((allocation.height - requisition.height) * ICON_YALIGN));
260
261 image_area.x = x;
262 image_area.y = y;
263 - image_area.width = widget->requisition.width;
264 - image_area.height = widget->requisition.height;
265 + image_area.width = requisition.width;
266 + image_area.height = requisition.height;
267
268 +#if 0
269 if (gdk_rectangle_intersect(&event->area, &image_area, &image_area))
270 +#endif
271 {
272 GdkPixbuf *pixbuf;
273
274 pixbuf = self_render_icon(self);
275 + gdk_cairo_set_source_pixbuf(cr, pixbuf, image_area.x, image_area.y);
276 + cairo_move_to(cr, image_area.x - x, image_area.y - y);
277 + cairo_paint(cr);
278
279 +#if 0
280 gdk_draw_pixbuf(widget->window,
281 NULL,
282 pixbuf,
283 @@ -509,6 +544,7 @@
284 GDK_RGB_DITHER_NORMAL,
285 0,
286 0);
287 +#endif
288
289 g_object_unref(pixbuf);
290 }
291 @@ -523,13 +559,16 @@
292 int box_y;
293 int box_width;
294 int box_height;
295 + GtkAllocation allocation;
296 +
297 + gtk_widget_get_allocation(widget, &allocation);
298
299 if (! selfp->count_layout)
300 {
301 const char *size;
302 char *markup;
303
304 - if (widget->allocation.height < 32)
305 + if (allocation.height < 32)
306 size = "small";
307 else
308 size = "medium";
309 @@ -546,17 +585,16 @@
310 box_width = count_rect.width + COUNT_BOX_XPAD * 2;
311 box_height = count_rect.height + COUNT_BOX_YPAD * 2;
312
313 - box_x = widget->allocation.x + widget->allocation.width - box_width - COUNT_BOX_XMARGIN;
314 - box_y = widget->allocation.y + widget->allocation.height - box_height - COUNT_BOX_YMARGIN;
315 + box_x = allocation.x + allocation.width - box_width - COUNT_BOX_XMARGIN;
316 + box_y = allocation.y + allocation.height - box_height - COUNT_BOX_YMARGIN;
317
318 count_x = box_x - count_rect.x + COUNT_BOX_XPAD;
319 count_y = box_y - count_rect.y + COUNT_BOX_YPAD;
320
321 - gtk_paint_box(widget->style,
322 - widget->window,
323 - GTK_WIDGET_STATE(widget),
324 + gtk_paint_box(gtk_widget_get_style(widget),
325 + cr,
326 + gtk_widget_get_state_flags(widget),
327 GTK_SHADOW_OUT,
328 - &event->area,
329 widget,
330 NULL,
331 box_x,
332 @@ -564,11 +602,10 @@
333 box_width,
334 box_height);
335
336 - gtk_paint_layout(widget->style,
337 - widget->window,
338 - GTK_WIDGET_STATE(widget),
339 + gtk_paint_layout(gtk_widget_get_style(widget),
340 + cr,
341 + gtk_widget_get_state_flags(widget),
342 FALSE,
343 - &event->area,
344 widget,
345 NULL,
346 count_x,
347 --- build/src/mn-mailbox-properties-dialog.c.orig 2011-02-07 21:57:31.257251776 +0100
348 +++ build/src/mn-mailbox-properties-dialog.c 2011-02-07 21:56:56.989854854 +0100
349 @@ -456,7 +456,7 @@
350 MNMailboxProperties *properties;
351
352 mn_container_create_interface(GTK_CONTAINER(self),
353 - PKGDATADIR G_DIR_SEPARATOR_S "mailbox-properties-dialog.glade",
354 + PKGDATADIR G_DIR_SEPARATOR_S "mailbox-properties-dialog.ui",
355 "notebook",
356 "mn_mailbox_properties_dialog_",
357 "notebook", &self->notebook,
358 @@ -1290,7 +1290,7 @@
359 {
360 #line 686 "src/mn-mailbox-properties-dialog.gob"
361
362 - if (GTK_WIDGET_IS_SENSITIVE(GTK_WINDOW(self)->default_widget))
363 + if (gtk_widget_is_sensitive(gtk_window_get_default_widget(GTK_WINDOW(self))))
364 gtk_window_activate_default(GTK_WINDOW(self));
365 else
366 {
367 @@ -1313,9 +1313,9 @@
368 if (elem->data == entry)
369 break;
370
371 - if (GTK_WIDGET_MAPPED(elem->data)
372 - && GTK_WIDGET_VISIBLE(elem->data)
373 - && GTK_WIDGET_SENSITIVE(elem->data))
374 + if (gtk_widget_get_mapped(elem->data)
375 + && gtk_widget_get_visible(elem->data)
376 + && gtk_widget_get_sensitive(elem->data))
377 next = elem->data;
378 }
379 while (! next);
380 --- build/src/mn-mailbox-view.c.orig 2011-02-07 22:18:49.962462920 +0100
381 +++ build/src/mn-mailbox-view.c 2011-02-07 23:01:39.990363248 +0100
382 @@ -412,23 +412,23 @@
383 binding_set = gtk_binding_set_by_class(class);
384
385 /* Delete removes a row */
386 - gtk_binding_entry_add_signal(binding_set, GDK_Delete, 0, "activate-remove", 0);
387 - gtk_binding_entry_add_signal(binding_set, GDK_KP_Delete, 0, "activate-remove", 0);
388 + gtk_binding_entry_add_signal(binding_set, GDK_KEY_Delete, 0, "activate-remove", 0);
389 + gtk_binding_entry_add_signal(binding_set, GDK_KEY_KP_Delete, 0, "activate-remove", 0);
390
391 /* HIG 2.0 cut/copy/paste shortcuts */
392 - gtk_binding_entry_add_signal(binding_set, GDK_x, GDK_CONTROL_MASK, "activate-cut", 0);
393 - gtk_binding_entry_add_signal(binding_set, GDK_c, GDK_CONTROL_MASK, "activate-copy", 0);
394 - gtk_binding_entry_add_signal(binding_set, GDK_v, GDK_CONTROL_MASK, "activate-paste", 0);
395 + gtk_binding_entry_add_signal(binding_set, GDK_KEY_x, GDK_CONTROL_MASK, "activate-cut", 0);
396 + gtk_binding_entry_add_signal(binding_set, GDK_KEY_c, GDK_CONTROL_MASK, "activate-copy", 0);
397 + gtk_binding_entry_add_signal(binding_set, GDK_KEY_v, GDK_CONTROL_MASK, "activate-paste", 0);
398
399 /* cut/copy/paste shortcuts taken from gtkentry.c */
400 - gtk_binding_entry_add_signal(binding_set, GDK_Delete, GDK_SHIFT_MASK, "activate-cut", 0);
401 - gtk_binding_entry_add_signal(binding_set, GDK_Insert, GDK_CONTROL_MASK, "activate-copy", 0);
402 - gtk_binding_entry_add_signal(binding_set, GDK_Insert, GDK_SHIFT_MASK, "activate-paste", 0);
403 + gtk_binding_entry_add_signal(binding_set, GDK_KEY_Delete, GDK_SHIFT_MASK, "activate-cut", 0);
404 + gtk_binding_entry_add_signal(binding_set, GDK_KEY_Insert, GDK_CONTROL_MASK, "activate-copy", 0);
405 + gtk_binding_entry_add_signal(binding_set, GDK_KEY_Insert, GDK_SHIFT_MASK, "activate-paste", 0);
406
407 /* HIG 2.0 properties */
408 - gtk_binding_entry_add_signal(binding_set, GDK_Return, GDK_MOD1_MASK, "activate-properties", 0);
409 - gtk_binding_entry_add_signal(binding_set, GDK_ISO_Enter, GDK_MOD1_MASK, "activate-properties", 0);
410 - gtk_binding_entry_add_signal(binding_set, GDK_KP_Enter, GDK_MOD1_MASK, "activate-properties", 0);
411 + gtk_binding_entry_add_signal(binding_set, GDK_KEY_Return, GDK_MOD1_MASK, "activate-properties", 0);
412 + gtk_binding_entry_add_signal(binding_set, GDK_KEY_ISO_Enter, GDK_MOD1_MASK, "activate-properties", 0);
413 + gtk_binding_entry_add_signal(binding_set, GDK_KEY_KP_Enter, GDK_MOD1_MASK, "activate-properties", 0);
414
415 #line 434 "mn-mailbox-view.c"
416 }
417 @@ -934,14 +934,13 @@
418 #line 183 "src/mn-mailbox-view.gob"
419
420 GtkSelectionData *data;
421 -
422 data = gtk_clipboard_wait_for_contents(global_clipboard, clipboard_info[TARGET_MAILBOXES].atom);
423 if (data)
424 {
425 GSList *configurations;
426 GSList *l;
427
428 - memcpy(&configurations, data->data, data->length);
429 + memcpy(&configurations, gtk_selection_data_get_data(data), gtk_selection_data_get_length(data));
430
431 MN_LIST_FOREACH(l, configurations)
432 {
433 @@ -962,14 +961,14 @@
434 data = gtk_clipboard_wait_for_contents(global_clipboard, clipboard_info[TARGET_GNOME_COPIED_FILES].atom);
435 if (data)
436 {
437 - if (data->format == 8 && data->length > 0)
438 + if (gtk_selection_data_get_format(data) == 8 && gtk_selection_data_get_length(data) > 0)
439 {
440 char *gnome_copied_files;
441 gboolean status;
442 MNGnomeCopiedFilesType type;
443 GSList *uri_list;
444
445 - gnome_copied_files = g_strndup(data->data, data->length);
446 + gnome_copied_files = g_strndup(gtk_selection_data_get_data(data), gtk_selection_data_get_length(data));
447 status = mn_parse_gnome_copied_files(gnome_copied_files, &type, &uri_list);
448 g_free(gnome_copied_files);
449
450 --- build/src/mn-shell.c.orig 2011-02-07 23:02:17.852293679 +0100
451 +++ build/src/mn-shell.c 2011-02-07 23:04:39.223548403 +0100
452 @@ -158,7 +158,7 @@
453 static void mn_shell_icon_activate_about_h (MNMailIcon * icon, gpointer user_data);
454 #line 160 "mn-shell.c"
455 #line 499 "src/mn-shell.gob"
456 -static void mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data);
457 +static void mn_shell_icon_destroy_h (GtkWidget * object, gpointer user_data);
458 #line 163 "mn-shell.c"
459 #line 508 "src/mn-shell.gob"
460 static void mn_shell_update_sensitivity (MNShell * self);
461 @@ -1006,7 +1006,7 @@
462
463 #line 499 "src/mn-shell.gob"
464 static void
465 -mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data)
466 +mn_shell_icon_destroy_h (GtkWidget * object, gpointer user_data)
467 {
468 #line 1004 "mn-shell.c"
469 #define __GOB_FUNCTION__ "MN:Shell::icon_destroy_h"
470 --- build/src/mn-text-table.c.orig 2011-02-07 23:05:08.799927792 +0100
471 +++ build/src/mn-text-table.c 2011-02-07 23:18:06.480056895 +0100
472 @@ -69,9 +69,11 @@
473 #line 70 "mn-text-table.c"
474 #line 104 "src/mn-text-table.gob"
475 static void ___4_mn_text_table_size_request (GtkWidget * widget, GtkRequisition * requisition);
476 +static void mn_text_table_get_preferred_width (GtkWidget * widget, gint * minimal_width, gint * natural_width);
477 +static void mn_text_table_get_preferred_height (GtkWidget * widget, gint * minimal_height, gint * natural_height);
478 #line 73 "mn-text-table.c"
479 #line 115 "src/mn-text-table.gob"
480 -static gboolean ___5_mn_text_table_expose_event (GtkWidget * widget, GdkEventExpose * event);
481 +static gboolean ___5_mn_text_table_draw (GtkWidget * widget, cairo_t *cr);
482 #line 76 "mn-text-table.c"
483 #line 165 "src/mn-text-table.gob"
484 static void mn_text_table_set_dirty (MNTextTable * self);
485 @@ -188,9 +190,10 @@
486 parent_class = g_type_class_ref (GTK_TYPE_WIDGET);
487
488 #line 104 "src/mn-text-table.gob"
489 - gtk_widget_class->size_request = ___4_mn_text_table_size_request;
490 + gtk_widget_class->get_preferred_width = mn_text_table_get_preferred_width;
491 + gtk_widget_class->get_preferred_height = mn_text_table_get_preferred_height;
492 #line 115 "src/mn-text-table.gob"
493 - gtk_widget_class->expose_event = ___5_mn_text_table_expose_event;
494 + gtk_widget_class->draw = ___5_mn_text_table_draw;
495 #line 257 "src/mn-text-table.gob"
496 c->clear = ___real_mn_text_table_clear;
497 #line 197 "mn-text-table.c"
498 @@ -216,7 +219,7 @@
499 {
500 #line 80 "src/mn-text-table.gob"
501
502 - GTK_WIDGET_SET_FLAGS(self, GTK_NO_WINDOW);
503 + gtk_widget_set_has_window(GTK_WIDGET(self), FALSE);
504
505 g_object_connect(self,
506 "swapped-signal::style-set", self_context_changed, self,
507 @@ -290,9 +293,29 @@
508 #undef __GOB_FUNCTION__
509 #undef PARENT_HANDLER
510
511 +static void
512 +mn_text_table_get_preferred_width (GtkWidget * widget, gint * minimal_width, gint * natural_width)
513 +{
514 + GtkRequisition requisition;
515 +
516 + ___4_mn_text_table_size_request (widget, &requisition);
517 +
518 + *minimal_width = *natural_width = requisition.width;
519 +}
520 +
521 +static void
522 +mn_text_table_get_preferred_height (GtkWidget * widget, gint * minimal_height, gint * natural_height)
523 +{
524 + GtkRequisition requisition;
525 +
526 + ___4_mn_text_table_size_request (widget, &requisition);
527 +
528 + *minimal_height = *natural_height = requisition.height;
529 +}
530 +
531 #line 115 "src/mn-text-table.gob"
532 static gboolean
533 -___5_mn_text_table_expose_event (GtkWidget * widget G_GNUC_UNUSED, GdkEventExpose * event)
534 +___5_mn_text_table_draw (GtkWidget * widget G_GNUC_UNUSED, cairo_t *cr)
535 #line 297 "mn-text-table.c"
536 #define PARENT_HANDLER(___widget,___event) \
537 ((GTK_WIDGET_CLASS(parent_class)->expose_event)? \
538 @@ -304,10 +327,14 @@
539 #line 117 "src/mn-text-table.gob"
540
541 Self *self = SELF(widget);
542 + GtkAllocation allocation;
543 int i;
544 - int y = widget->allocation.y;
545 + int y;
546 +
547 + gtk_widget_get_allocation(widget, &allocation);
548 + y = allocation.y;
549
550 - if (! GTK_WIDGET_DRAWABLE(widget))
551 + if (! gtk_widget_is_drawable(widget))
552 return FALSE;
553
554 self_relayout(self);
555 @@ -316,7 +343,7 @@
556 {
557 Row *row = g_ptr_array_index(selfp->rows, i);
558 int j;
559 - int x = widget->allocation.x;
560 + int x = allocation.x;
561 int column = 0;
562
563 MN_ARRAY_FOREACH(j, row->cells)
564 @@ -324,11 +351,10 @@
565 MNTextTableCell *cell = g_ptr_array_index(row->cells, j);
566
567 if (cell->layout)
568 - gtk_paint_layout(widget->style,
569 - widget->window,
570 - GTK_WIDGET_STATE(widget),
571 + gtk_paint_layout(gtk_widget_get_style(widget),
572 + cr,
573 + gtk_widget_get_state_flags(widget),
574 FALSE,
575 - &event->area,
576 widget,
577 NULL,
578 x,
579 --- build/src/mn-tooltips.c.orig 2011-02-07 23:19:05.903761972 +0100
580 +++ build/src/mn-tooltips.c 2011-02-07 23:41:19.368621912 +0100
581 @@ -104,7 +104,7 @@
582 static void mn_tooltips_set_tip_widget_real (MNTooltips * self, GtkWidget * widget, GtkWidget * tip_widget, int border_width);
583 #line 106 "mn-tooltips.c"
584 #line 287 "src/mn-tooltips.gob"
585 -static gboolean mn_tooltips_paint_window (MNTooltips * self);
586 +static gboolean mn_tooltips_paint_window (MNTooltips * self, cairo_t *cr);
587 #line 109 "mn-tooltips.c"
588 #line 308 "src/mn-tooltips.gob"
589 static void mn_tooltips_draw_tips (MNTooltips * self);
590 @@ -430,7 +430,7 @@
591 gtk_container_set_border_width(GTK_CONTAINER(selfp->window), selfp->border_width);
592
593 g_signal_connect_swapped(selfp->window,
594 - "expose-event",
595 + "draw",
596 G_CALLBACK(self_paint_window),
597 self);
598
599 @@ -490,7 +490,7 @@
600
601 if (selfp->active_data
602 && selfp->active_data->widget == widget
603 - && GTK_WIDGET_DRAWABLE(selfp->active_data->widget))
604 + && gtk_widget_is_drawable(selfp->active_data->widget))
605 {
606 if (data->tip_widget)
607 g_object_unref(data->tip_widget);
608 @@ -594,7 +594,7 @@
609
610 #line 287 "src/mn-tooltips.gob"
611 static gboolean
612 -mn_tooltips_paint_window (MNTooltips * self)
613 +mn_tooltips_paint_window (MNTooltips * self, cairo_t *cr)
614 {
615 #line 600 "mn-tooltips.c"
616 #define __GOB_FUNCTION__ "MN:Tooltips::paint_window"
617 @@ -608,13 +608,12 @@
618
619 GtkRequisition req;
620
621 - gtk_widget_size_request(selfp->window, &req);
622 - gtk_paint_flat_box(selfp->window->style,
623 - selfp->window->window,
624 + gtk_widget_size_request(GTK_WIDGET(selfp), &req);
625 + gtk_paint_flat_box(gtk_widget_get_style(GTK_WIDGET(selfp)),
626 + cr,
627 GTK_STATE_NORMAL,
628 GTK_SHADOW_OUT,
629 NULL,
630 - selfp->window,
631 "tooltip",
632 0,
633 0,
634 @@ -651,10 +650,11 @@
635 gint monitor_num, px, py;
636 GdkRectangle monitor;
637 int screen_width;
638 + GtkAllocation allocation;
639
640 if (! selfp->window)
641 self_force_window(self);
642 - else if (GTK_WIDGET_VISIBLE(selfp->window))
643 + else if (gtk_widget_get_visible(selfp->window))
644 g_get_current_time(&selfp->last_popdown);
645
646 gtk_widget_ensure_style(selfp->window);
647 @@ -670,7 +670,7 @@
648
649 data = selfp->active_data;
650
651 - child = GTK_BIN(selfp->window)->child;
652 + child = gtk_bin_get_child(GTK_BIN(selfp->window));
653 if (child)
654 gtk_container_remove(GTK_CONTAINER(selfp->window), child);
655
656 @@ -684,14 +684,16 @@
657 w = requisition.width;
658 h = requisition.height;
659
660 - gdk_window_get_origin(widget->window, &x, &y);
661 - if (GTK_WIDGET_NO_WINDOW(widget))
662 + gtk_widget_get_allocation(selfp->window, &allocation);
663 +
664 + gdk_window_get_origin(gtk_widget_get_window(widget), &x, &y);
665 + if (! gtk_widget_get_has_window(widget))
666 {
667 - x += widget->allocation.x;
668 - y += widget->allocation.y;
669 + x += allocation.x;
670 + y += allocation.y;
671 }
672
673 - x += widget->allocation.width / 2;
674 + x += allocation.width / 2;
675
676 if (! keyboard_mode)
677 gdk_window_get_pointer(gdk_screen_get_root_window(screen), &x, NULL, NULL);
678 @@ -712,11 +714,11 @@
679 else if (x < monitor.x)
680 x = monitor.x;
681
682 - if ((y + h + widget->allocation.height + 4) > monitor.y + monitor.height
683 + if ((y + h + allocation.height + 4) > monitor.y + monitor.height
684 && (y - 4) > monitor.y)
685 y = y - h - 4;
686 else
687 - y = y + widget->allocation.height + 4;
688 + y = y + allocation.height + 4;
689
690 /*
691 * The following block is not part of GTK+ and has been added to
692 @@ -760,7 +762,7 @@
693
694 Self *self = SELF(data);
695
696 - if (selfp->active_data && GTK_WIDGET_DRAWABLE(selfp->active_data->widget))
697 + if (selfp->active_data && gtk_widget_is_drawable(selfp->active_data->widget))
698 self_draw_tips(self);
699
700 selfp->timeout_id = 0;
701 @@ -785,7 +787,7 @@
702
703 if (selfp->window)
704 {
705 - if (GTK_WIDGET_VISIBLE(selfp->window))
706 + if (gtk_widget_get_visible(selfp->window))
707 g_get_current_time(&selfp->last_popdown);
708 gtk_widget_hide(selfp->window);
709 }
710 @@ -802,7 +804,7 @@
711 {
712 TooltipsData *data = l->data;
713
714 - if (data->widget == widget && GTK_WIDGET_DRAWABLE(widget))
715 + if (data->widget == widget && gtk_widget_is_drawable(widget))
716 {
717 selfp->active_data = data;
718 break;
719 @@ -937,7 +939,7 @@
720
721 if (GTK_IS_WINDOW(toplevel))
722 {
723 - GtkWidget *focus = GTK_WINDOW(toplevel)->focus_widget;
724 + GtkWidget *focus = gtk_window_get_focus(GTK_WINDOW(toplevel));
725
726 g_object_set_data(G_OBJECT(toplevel), TOOLTIPS_KEYBOARD_MODE, GINT_TO_POINTER(TRUE));
727
728 @@ -966,7 +968,7 @@
729
730 if (GTK_IS_WINDOW(toplevel))
731 {
732 - GtkWidget *focus = GTK_WINDOW(toplevel)->focus_widget;
733 + GtkWidget *focus = gtk_window_get_focus(GTK_WINDOW(toplevel));
734
735 if (focus)
736 self_hide_tip(focus);
737 @@ -1057,24 +1059,24 @@
738 break;
739
740 case GDK_ENTER_NOTIFY:
741 - if (! (GTK_IS_MENU_ITEM(widget) && GTK_MENU_ITEM(widget)->submenu))
742 + if (! (GTK_IS_MENU_ITEM(widget) && gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget))))
743 self_start_delay(self, widget);
744 break;
745
746 case GDK_LEAVE_NOTIFY:
747 self_set_active_widget(self, NULL);
748 - selfp->use_sticky_delay = selfp->window && GTK_WIDGET_VISIBLE(selfp->window);
749 + selfp->use_sticky_delay = selfp->window && gtk_widget_get_visible(selfp->window);
750 break;
751
752 case GDK_MOTION_NOTIFY:
753 /* Handle menu items specially ... pend popup for each motion
754 * on other widgets, we ignore motion.
755 */
756 - if (GTK_IS_MENU_ITEM(widget) && ! GTK_MENU_ITEM(widget)->submenu)
757 + if (GTK_IS_MENU_ITEM(widget) && ! gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)))
758 {
759 /* Completely evil hack to make sure we get the LEAVE_NOTIFY
760 */
761 - GTK_PRIVATE_SET_FLAG(widget, GTK_LEAVE_PENDING);
762 + //GTK_PRIVATE_SET_FLAG(widget, GTK_LEAVE_PENDING);
763 self_set_active_widget(self, NULL);
764 self_start_delay(self, widget);
765 break;
766 --- src/nautilus-cell-renderer-pixbuf-emblem.c.orig 2011-02-08 00:16:43.847831409 +0100
767 +++ src/nautilus-cell-renderer-pixbuf-emblem.c 2011-02-08 00:32:59.128682767 +0100
768 @@ -39,17 +39,16 @@
769 GtkWidget *widget);
770 static void nautilus_cell_renderer_pixbuf_emblem_get_size (GtkCellRenderer *cell,
771 GtkWidget *widget,
772 - GdkRectangle *rectangle,
773 + const GdkRectangle *rectangle,
774 gint *x_offset,
775 gint *y_offset,
776 gint *width,
777 gint *height);
778 static void nautilus_cell_renderer_pixbuf_emblem_render (GtkCellRenderer *cell,
779 - GdkWindow *window,
780 + cairo_t *cr,
781 GtkWidget *widget,
782 - GdkRectangle *background_area,
783 - GdkRectangle *cell_area,
784 - GdkRectangle *expose_area,
785 + const GdkRectangle *background_area,
786 + const GdkRectangle *cell_area,
787 GtkCellRendererState flags);
788
789 enum {
790 @@ -356,7 +355,7 @@
791 static void
792 nautilus_cell_renderer_pixbuf_emblem_get_size (GtkCellRenderer *cell,
793 GtkWidget *widget,
794 - GdkRectangle *cell_area,
795 + const GdkRectangle *cell_area,
796 gint *x_offset,
797 gint *y_offset,
798 gint *width,
799 @@ -368,6 +367,10 @@
800 gint pixbuf_height = 0;
801 gint calc_width;
802 gint calc_height;
803 + int xpad;
804 + int ypad;
805 + gfloat xalign;
806 + gfloat yalign;
807
808 if (!cellpixbuf->pixbuf && cellinfo->stock_id)
809 nautilus_cell_renderer_pixbuf_emblem_create_stock_pixbuf (cellpixbuf, widget);
810 @@ -385,8 +388,11 @@
811 pixbuf_height = MAX (pixbuf_height, gdk_pixbuf_get_height (cellpixbuf->pixbuf_expander_closed));
812 }
813
814 - calc_width = (gint) cell->xpad * 2 + pixbuf_width;
815 - calc_height = (gint) cell->ypad * 2 + pixbuf_height;
816 + gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
817 + gtk_cell_renderer_get_alignment(cell, &xalign, &yalign);
818 +
819 + calc_width = (gint) xpad * 2 + pixbuf_width;
820 + calc_height = (gint) ypad * 2 + pixbuf_height;
821
822 if (x_offset) *x_offset = 0;
823 if (y_offset) *y_offset = 0;
824 @@ -394,14 +400,14 @@
825 if (cell_area && pixbuf_width > 0 && pixbuf_height > 0) {
826 if (x_offset) {
827 *x_offset = (((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ?
828 - 1.0 - cell->xalign : cell->xalign) *
829 - (cell_area->width - calc_width - 2 * cell->xpad));
830 - *x_offset = MAX (*x_offset, 0) + cell->xpad;
831 + 1.0 - xalign : xalign) *
832 + (cell_area->width - calc_width - 2 * xpad));
833 + *x_offset = MAX (*x_offset, 0) + xpad;
834 }
835 if (y_offset) {
836 - *y_offset = (cell->yalign *
837 - (cell_area->height - calc_height - 2 * cell->ypad));
838 - *y_offset = MAX (*y_offset, 0) + cell->ypad;
839 + *y_offset = (yalign *
840 + (cell_area->height - calc_height - 2 * ypad));
841 + *y_offset = MAX (*y_offset, 0) + ypad;
842 }
843 }
844
845 @@ -414,11 +420,10 @@
846
847 static void
848 nautilus_cell_renderer_pixbuf_emblem_render (GtkCellRenderer *cell,
849 - GdkWindow *window,
850 + cairo_t *cr,
851 GtkWidget *widget,
852 - GdkRectangle *background_area,
853 - GdkRectangle *cell_area,
854 - GdkRectangle *expose_area,
855 + const GdkRectangle *background_area,
856 + const GdkRectangle *cell_area,
857 GtkCellRendererState flags)
858
859 {
860 @@ -429,13 +434,19 @@
861 GdkRectangle pix_emblem_rect;
862 GdkRectangle draw_rect;
863 gboolean stock_pixbuf = FALSE;
864 + gboolean is_expander = FALSE;
865 + gboolean is_expanded = FALSE;
866 + int xpad;
867 + int ypad;
868 +
869 + g_object_get(cell, "is-expander", &is_expander, "is-expanded", &is_expanded, NULL);
870
871 pixbuf = cellpixbuf->pixbuf;
872 - if (cell->is_expander) {
873 - if (cell->is_expanded &&
874 + if (is_expander) {
875 + if (is_expanded &&
876 cellpixbuf->pixbuf_expander_open != NULL) {
877 pixbuf = cellpixbuf->pixbuf_expander_open;
878 - } else if (!cell->is_expanded &&
879 + } else if (!is_expanded &&
880 cellpixbuf->pixbuf_expander_closed != NULL) {
881 pixbuf = cellpixbuf->pixbuf_expander_closed;
882 }
883 @@ -456,15 +467,20 @@
884 if (stock_pixbuf)
885 pixbuf = cellpixbuf->pixbuf;
886
887 + gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
888 +
889 pix_rect.x += cell_area->x;
890 pix_rect.y += cell_area->y;
891 - pix_rect.width -= cell->xpad * 2;
892 - pix_rect.height -= cell->ypad * 2;
893 + pix_rect.width -= xpad * 2;
894 + pix_rect.height -= ypad * 2;
895
896 + if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect)) {
897 +#if 0
898 if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect) &&
899 gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect)) {
900 +
901 gdk_draw_pixbuf (window,
902 - widget->style->black_gc,
903 + gtk_widget_get_style(widget)->black_gc,
904 pixbuf,
905 /* pixbuf 0, 0 is at pix_rect.x, pix_rect.y */
906 draw_rect.x - pix_rect.x,
907 @@ -475,6 +491,11 @@
908 draw_rect.height,
909 GDK_RGB_DITHER_NORMAL,
910 0, 0);
911 +#endif
912 +
913 + cairo_move_to (cr, draw_rect.x - pix_rect.x, draw_rect.y - pix_rect.y);
914 + gdk_cairo_set_source_pixbuf (cr, pixbuf, draw_rect.x, draw_rect.y);
915 + cairo_paint (cr);
916 }
917
918 if (cellpixbuf->pixbuf_emblem) {
919 @@ -482,8 +503,11 @@
920 pix_emblem_rect.height = gdk_pixbuf_get_height (cellpixbuf->pixbuf_emblem);
921 pix_emblem_rect.x = pix_rect.x;
922 pix_emblem_rect.y = pix_rect.y + pix_rect.height - pix_emblem_rect.height;
923 + if (gdk_rectangle_intersect (cell_area, &pix_emblem_rect, &draw_rect)) {
924 +#if 0
925 if (gdk_rectangle_intersect (cell_area, &pix_emblem_rect, &draw_rect) &&
926 gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect)) {
927 +
928 gdk_draw_pixbuf (window,
929 widget->style->black_gc,
930 cellpixbuf->pixbuf_emblem,
931 @@ -496,6 +520,11 @@
932 draw_rect.height,
933 GDK_RGB_DITHER_NORMAL,
934 0, 0);
935 +#endif
936 +
937 + cairo_move_to (cr, draw_rect.x - pix_emblem_rect.x, draw_rect.y - pix_emblem_rect.y);
938 + gdk_cairo_set_source_pixbuf (cr, cellpixbuf->pixbuf_emblem, draw_rect.x, draw_rect.y);
939 + cairo_paint (cr);
940 }
941 }
942 }
943 --- src/nautilus-cell-renderer-pixbuf-emblem.h.orig 2011-02-07 22:18:12.336471764 +0100
944 +++ src/nautilus-cell-renderer-pixbuf-emblem.h 2011-02-08 00:20:30.461758697 +0100
945 @@ -25,18 +25,18 @@
946 #ifndef NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_H
947 #define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_H
948
949 -#include <gtk/gtkcellrenderer.h>
950 +#include <gtk/gtk.h>
951
952 #define NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM \
953 (nautilus_cell_renderer_pixbuf_emblem_get_type ())
954 #define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM(obj) \
955 - (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblem))
956 + (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblem))
957 #define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_CLASS(klass) \
958 - (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblemClass))
959 + (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblemClass))
960 #define NAUTILUS_IS_CELL_RENDERER_PIXBUF_EMBLEM(obj) \
961 - (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
962 + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
963 #define NAUTILUS_IS_CELL_RENDERER_PIXBUF_EMBLEM_CLASS(klass) \
964 - (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
965 + (G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
966
967 typedef struct _NautilusCellRendererPixbufEmblem NautilusCellRendererPixbufEmblem;
968 typedef struct _NautilusCellRendererPixbufEmblemClass NautilusCellRendererPixbufEmblemClass;
969 --- build/src/mn-authenticated-mailbox.c.orig 2011-02-08 00:34:16.332610802 +0100
970 +++ build/src/mn-authenticated-mailbox.c 2011-02-08 00:36:23.706936717 +0100
971 @@ -25,7 +25,7 @@
972 #line 29 "src/mn-authenticated-mailbox.gob"
973
974 #include <glib/gi18n.h>
975 -#include <gnome.h>
976 +#include <libgnome/libgnome.h>
977 #include "mn-mailbox-private.h"
978 #include "mn-shell.h"
979 #include "mn-util.h"
980 @@ -859,6 +859,7 @@
981
982 /* keep the title in sync with gnome-authentication-manager */
983
984 +#if 0
985 /* translators: header capitalization */
986 selfp->auth_dialog = gnome_password_dialog_new(_("Authentication Required"),
987 message,
988 @@ -891,6 +892,9 @@
989 gtk_widget_destroy(selfp->auth_dialog);
990
991 return ok;
992 +#else
993 + return FALSE;
994 +#endif
995 }}
996 #line 896 "mn-authenticated-mailbox.c"
997 #undef __GOB_FUNCTION__
998 --- build/src/mn-about-dialog.c.orig 2011-02-08 22:20:54.469841262 +0100
999 +++ build/src/mn-about-dialog.c 2011-02-08 22:21:13.309839037 +0100
1000 @@ -111,9 +111,11 @@
1001 {
1002 #line 32 "src/mn-about-dialog.gob"
1003
1004 +#if 0
1005 gtk_about_dialog_set_email_hook(self_activate_link_cb, "mailto:", NULL);
1006 gtk_about_dialog_set_url_hook(self_activate_link_cb, NULL, NULL);
1007 -
1008 +#endif
1009 +
1010 #line 118 "mn-about-dialog.c"
1011 }
1012 }
1013 --- build/src/mn-autodetect-mailbox-properties.c.orig 2011-02-08 22:21:58.639427345 +0100
1014 +++ build/src/mn-autodetect-mailbox-properties.c 2011-02-08 22:22:43.564035901 +0100
1015 @@ -355,10 +355,9 @@
1016
1017 toplevel = gtk_widget_get_toplevel(GTK_WIDGET(button));
1018 /* translators: header capitalization */
1019 - selfp->chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"),
1020 + selfp->chooser = gtk_file_chooser_dialog_new(_("Select a File or Folder"),
1021 GTK_WINDOW(toplevel),
1022 GTK_FILE_CHOOSER_ACTION_OPEN,
1023 - "gnome-vfs",
1024 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1025 GTK_STOCK_OPEN, 1,
1026 NULL);
1027 --- build/src/mn-pi-mailbox-properties.c.orig 2011-02-08 22:30:08.051375715 +0100
1028 +++ build/src/mn-pi-mailbox-properties.c 2011-02-08 22:30:21.398665261 +0100
1029 @@ -415,7 +415,7 @@
1030 int i;
1031
1032 for (i = 0; i < MN_PI_MAILBOX_N_CONNECTION_TYPES; i++)
1033 - gtk_widget_set_sensitive(self->port_spin[i], GTK_WIDGET_SENSITIVE(self->conn_radio[i]) && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self->conn_radio[i])));
1034 + gtk_widget_set_sensitive(self->port_spin[i], gtk_widget_get_sensitive(self->conn_radio[i]) && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self->conn_radio[i])));
1035
1036 g_object_notify(G_OBJECT(self), "complete");
1037 }}
1038 --- src/eggtrayicon.c.orig 2011-02-07 23:42:30.405791829 +0100
1039 +++ src/eggtrayicon.c 2011-02-08 23:06:16.092968325 +0100
1040 @@ -25,7 +25,7 @@
1041
1042 #include "eggtrayicon.h"
1043
1044 -#include <gdkconfig.h>
1045 +#include <gdk/gdk.h>
1046 #if defined (GDK_WINDOWING_X11)
1047 #include <gdk/gdkx.h>
1048 #include <X11/Xatom.h>
1049 @@ -258,7 +258,7 @@
1050 {
1051 GdkWindow *gdkwin;
1052
1053 - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
1054 + gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (widget),
1055 icon->manager_window);
1056
1057 gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
1058 @@ -290,7 +290,7 @@
1059 ev.window = window;
1060 ev.message_type = icon->system_tray_opcode_atom;
1061 ev.format = 32;
1062 - ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
1063 + ev.data.l[0] = gdk_x11_get_server_time (gtk_widget_get_window(GTK_WIDGET (icon)));
1064 ev.data.l[1] = message;
1065 ev.data.l[2] = data1;
1066 ev.data.l[3] = data2;
1067 @@ -342,12 +342,12 @@
1068 {
1069 GdkWindow *gdkwin;
1070
1071 - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
1072 + gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
1073 icon->manager_window);
1074
1075 gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
1076
1077 - if (dock_if_realized && GTK_WIDGET_REALIZED (icon))
1078 + if (dock_if_realized && gtk_widget_get_realized (GTK_WIDGET(icon)))
1079 egg_tray_icon_send_dock_request (icon);
1080
1081 egg_tray_icon_get_orientation_property (icon);
1082 @@ -355,10 +355,16 @@
1083 }
1084
1085 static gboolean
1086 -transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
1087 +transparent_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
1088 {
1089 - gdk_window_clear_area (widget->window, event->area.x, event->area.y,
1090 +#if 0
1091 + gdk_window_clear_area (gtk_widget_get_window(widget), event->area.x, event->area.y,
1092 event->area.width, event->area.height);
1093 +#endif
1094 + cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
1095 + //gdk_cairo_region (cr, event->region);
1096 + cairo_fill (cr);
1097 +
1098 return FALSE;
1099 }
1100
1101 @@ -366,20 +372,20 @@
1102 make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
1103 gpointer user_data)
1104 {
1105 - gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
1106 + //gdk_window_set_back_pixmap (gtk_widget_get_window(widget), NULL, TRUE);
1107 }
1108
1109 static void
1110 make_transparent (GtkWidget *widget, gpointer user_data)
1111 {
1112 - if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
1113 + if (! gtk_widget_get_has_window (widget) || gtk_widget_get_app_paintable (widget))
1114 return;
1115
1116 gtk_widget_set_app_paintable (widget, TRUE);
1117 gtk_widget_set_double_buffered (widget, FALSE);
1118 - gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
1119 - g_signal_connect (widget, "expose_event",
1120 - G_CALLBACK (transparent_expose_event), NULL);
1121 + //gdk_window_set_back_pixmap (gtk_widget_get_window(widget), NULL, TRUE);
1122 + g_signal_connect (widget, "draw",
1123 + G_CALLBACK (transparent_draw), NULL);
1124 g_signal_connect_after (widget, "style_set",
1125 G_CALLBACK (make_transparent_again), NULL);
1126 }
1127 @@ -391,7 +397,7 @@
1128
1129 g_return_if_fail (icon->manager_window != None);
1130
1131 - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
1132 + gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
1133 icon->manager_window);
1134
1135 gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
1136 --- build/src/mn-properties-dialog.c.orig 2011-02-08 23:37:12.605200174 +0100
1137 +++ build/src/mn-properties-dialog.c 2011-02-08 23:37:18.601881191 +0100
1138 @@ -183,7 +183,7 @@
1139 GtkTreeSelection *selection;
1140
1141 mn_container_create_interface(GTK_CONTAINER(self),
1142 - PKGDATADIR G_DIR_SEPARATOR_S "properties-dialog.glade",
1143 + PKGDATADIR G_DIR_SEPARATOR_S "properties-dialog.ui",
1144 "main_vbox",
1145 "mn_properties_dialog_",
1146 "notebook", &selfp->notebook,
1147 --- src/mn-util.c.orig 2011-02-08 00:01:25.167207512 +0100
1148 +++ src/mn-util.c 2011-02-09 00:01:35.718285446 +0100
1149 @@ -26,8 +26,7 @@
1150 #include <gmodule.h>
1151 #include <glib/gi18n.h>
1152 #include <gobject/gvaluecollector.h>
1153 -#include <gnome.h>
1154 -#include <glade/glade.h>
1155 +#include <libgnome/libgnome.h>
1156 #include "mn-util.h"
1157 #include "mn-mailboxes.h"
1158 #include "mn-shell.h"
1159 @@ -303,49 +302,55 @@
1160 return pixbuf;
1161 }
1162
1163 -static GladeXML *
1164 +static GtkBuilder *
1165 mn_glade_xml_new (const char *filename, const char *root, const char *domain)
1166 {
1167 - GladeXML *xml;
1168 + GtkBuilder *builder;
1169 + GError *err = NULL;
1170
1171 g_return_val_if_fail(filename != NULL, NULL);
1172
1173 - xml = glade_xml_new(filename, root, domain);
1174 - if (! xml)
1175 - mn_show_fatal_error_dialog(NULL, "Unable to load interface \"%s\".", filename);
1176 + builder = gtk_builder_new();
1177 + gtk_builder_set_translation_domain(builder, domain);
1178 + if (! gtk_builder_add_from_file(builder, filename, &err)) {
1179 + mn_show_fatal_error_dialog(NULL, "Unable to load interface \"%s\": %s.", filename, err->message);
1180 + g_error_free(err);
1181 + g_object_unref(builder);
1182 + return NULL;
1183 + }
1184
1185 - return xml;
1186 + return builder;
1187 }
1188
1189 static GtkWidget *
1190 -mn_glade_xml_get_widget (GladeXML *xml, const char *widget_name)
1191 +mn_glade_xml_get_widget (GtkBuilder *builder, const char *widget_name)
1192 {
1193 GtkWidget *widget;
1194
1195 - g_return_val_if_fail(GLADE_IS_XML(xml), NULL);
1196 + g_return_val_if_fail(GTK_IS_BUILDER(builder), NULL);
1197 g_return_val_if_fail(widget_name != NULL, NULL);
1198
1199 - widget = glade_xml_get_widget(xml, widget_name);
1200 + widget = GTK_WIDGET(gtk_builder_get_object(builder, widget_name));
1201 if (! widget)
1202 - mn_show_fatal_error_dialog(NULL, "Widget \"%s\" not found in interface \"%s\".", widget_name, xml->filename);
1203 + mn_show_fatal_error_dialog(NULL, "Widget \"%s\" not found in interface.", widget_name);
1204
1205 return widget;
1206 }
1207
1208 static void
1209 -create_interface_connect_cb (const char *handler_name,
1210 +create_interface_connect_cb (GtkBuilder *builder,
1211 GObject *object,
1212 const char *signal_name,
1213 - const char *signal_data,
1214 + const char *handler_name,
1215 GObject *connect_object,
1216 - gboolean after,
1217 + GConnectFlags flags,
1218 gpointer user_data)
1219 {
1220 static GModule *module = NULL;
1221 ContainerCreateInterfaceConnectInfo *info = user_data;
1222 char *cb_name;
1223 GCallback cb;
1224 - GConnectFlags flags;
1225 + GConnectFlags cflags;
1226
1227 if (! module)
1228 {
1229 @@ -359,11 +364,9 @@
1230 mn_show_fatal_error_dialog(NULL, "Signal handler \"%s\" not found.", cb_name);
1231 g_free(cb_name);
1232
1233 - flags = G_CONNECT_SWAPPED;
1234 - if (after)
1235 - flags |= G_CONNECT_AFTER;
1236 + cflags = G_CONNECT_SWAPPED;
1237
1238 - g_signal_connect_data(object, signal_name, cb, info->container, NULL, flags);
1239 + g_signal_connect_data(object, signal_name, cb, info->container, NULL, cflags);
1240 }
1241
1242 void
1243 @@ -373,7 +376,7 @@
1244 const char *callback_prefix,
1245 ...)
1246 {
1247 - GladeXML *xml;
1248 + GtkBuilder *xml;
1249 GtkWidget *child;
1250 ContainerCreateInterfaceConnectInfo info;
1251 va_list args;
1252 @@ -387,14 +390,16 @@
1253 xml = mn_glade_xml_new(filename, child_name, NULL);
1254 child = mn_glade_xml_get_widget(xml, child_name);
1255
1256 - if (GTK_IS_DIALOG(container))
1257 - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(container)->vbox), child, TRUE, TRUE, 0);
1258 - else
1259 + if (GTK_IS_DIALOG(container)) {
1260 + gtk_widget_unparent(child);
1261 + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(container))), child, TRUE, TRUE, 0);
1262 + } else {
1263 gtk_container_add(container, child);
1264 + }
1265
1266 info.container = container;
1267 info.callback_prefix = callback_prefix;
1268 - glade_xml_signal_autoconnect_full(xml, create_interface_connect_cb, &info);
1269 + gtk_builder_connect_signals_full(xml, create_interface_connect_cb, &info);
1270
1271 va_start(args, callback_prefix);
1272
1273 @@ -422,7 +427,7 @@
1274
1275 toplevel = gtk_widget_get_toplevel(widget);
1276
1277 - return GTK_WIDGET_TOPLEVEL(toplevel) ? GTK_WINDOW(toplevel) : NULL;
1278 + return gtk_widget_get_toplevel(toplevel) ? GTK_WINDOW(toplevel) : NULL;
1279 }
1280
1281 static void
1282 @@ -493,9 +498,11 @@
1283 gpointer user_data)
1284 {
1285 GtkAdjustment *adjustment;
1286 + GtkAllocation allocation;
1287
1288 + gtk_widget_get_allocation(widget, &allocation);
1289 adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(widget));
1290 - gtk_adjustment_set_value(adjustment, (double) y / (widget->allocation.height - 2) * (adjustment->upper - adjustment->page_size));
1291 + gtk_adjustment_set_value(adjustment, (double) y / (allocation.height - 2) * (gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment)));
1292
1293 return TRUE; /* we're forcibly in a drop zone */
1294 }
1295 @@ -562,7 +569,7 @@
1296 MNMailbox *mailbox;
1297
1298 /* text/x-moz-url is encoded in UCS-2 but in format 8: broken */
1299 - if (selection_data->format != 8 || selection_data->length <= 0 || (selection_data->length % 2) != 0)
1300 + if (gtk_selection_data_get_format(selection_data) != 8 || gtk_selection_data_get_length(selection_data) <= 0 || (gtk_selection_data_get_length(selection_data) % 2) != 0)
1301 {
1302 mn_show_error_dialog(mn_widget_get_parent_window(widget),
1303 _("A drag and drop error has occurred"),
1304 @@ -570,8 +577,8 @@
1305 return;
1306 }
1307
1308 - char_data = (const guint16 *) selection_data->data;
1309 - char_len = selection_data->length / 2;
1310 + char_data = (const guint16 *) gtk_selection_data_get_data(selection_data);
1311 + char_len = gtk_selection_data_get_length(selection_data) / 2;
1312
1313 url = g_string_new(NULL);
1314 for (i = 0; i < char_len && char_data[i] != '\n'; i++)
1315 @@ -1322,7 +1329,7 @@
1316 }
1317
1318 static void
1319 -dialog_run_nonmodal_destroy_h (GtkObject *object, gpointer user_data)
1320 +dialog_run_nonmodal_destroy_h (GtkWidget *object, gpointer user_data)
1321 {
1322 RunNonmodalInfo *info = user_data;
1323
1324 @@ -1375,7 +1382,7 @@
1325
1326 g_object_ref(dialog);
1327
1328 - if (! GTK_WIDGET_VISIBLE(dialog))
1329 + if (! gtk_widget_get_visible(dialog))
1330 gtk_widget_show(GTK_WIDGET(dialog));
1331
1332 g_object_connect(dialog,
1333 --- src/mn-main.c.gtk3 2008-05-22 17:45:35.000000000 +0200
1334 +++ src/mn-main.c 2011-02-08 23:32:33.800030659 +0100
1335 @@ -21,7 +21,7 @@
1336 #include <stdlib.h>
1337 #include <signal.h>
1338 #include <glib/gi18n.h>
1339 -#include <gnome.h>
1340 +#include <libgnome/libgnome.h>
1341 #include <libgnomevfs/gnome-vfs.h>
1342 #include <libnotify/notify.h>
1343 #include <dbus/dbus-glib-lowlevel.h>
1344 @@ -452,7 +452,7 @@
1345
1346 gnome_program_init(PACKAGE,
1347 VERSION,
1348 - LIBGNOMEUI_MODULE,
1349 + LIBGNOME_MODULE,
1350 argc,
1351 argv,
1352 GNOME_PARAM_HUMAN_READABLE_NAME, _("Mail Notification"),
1353 @@ -460,6 +460,8 @@
1354 GNOME_PARAM_GOPTION_CONTEXT, option_context,
1355 NULL);
1356
1357 + gtk_init(&argc, &argv);
1358 +
1359 if (arg_version)
1360 {
1361 print_version();
1362 @@ -497,7 +499,9 @@
1363 if (! gnome_vfs_init())
1364 mn_show_fatal_error_dialog(NULL, _("Unable to initialize the GnomeVFS library."));
1365
1366 +#if 0
1367 gnome_authentication_manager_init();
1368 +#endif
1369
1370 /* must be called before init_gmime() */
1371 mn_conf_init();
1372 --- src/mn-conf.c.gtk3 2008-05-22 17:45:35.000000000 +0200
1373 +++ src/mn-conf.c 2011-02-07 20:07:01.630580132 +0100
1374 @@ -23,7 +23,7 @@
1375 #include <errno.h>
1376 #include <stdarg.h>
1377 #include <glib/gi18n.h>
1378 -#include <gnome.h>
1379 +#include <libgnome/libgnome.h>
1380 #include "mn-util.h"
1381 #include "mn-conf.h"
1382 #include "mn-shell.h"

  ViewVC Help
Powered by ViewVC 1.1.30