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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 129673 - (hide annotations) (download)
Tue Jul 26 08:55:22 2011 UTC (12 years, 9 months ago) by dmorgan
File size: 50971 byte(s)
Updated the GTK3 patch so that popup windows are themed properly
and the list of unread mails in popup windows are positioned properly
Initial patch by Enrico Scholz (RHBZ #702097)


1 fwang 113934 --- 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 dmorgan 129673 + y = 0;
549 fwang 113934
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 dmorgan 129673 + int x = 0;
561 fwang 113934 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 dmorgan 129673 @@ -422,7 +422,13 @@
591    
592     if (! selfp->window)
593     {
594     + GtkStyleContext *ctx;
595     +
596     selfp->window = gtk_window_new(GTK_WINDOW_POPUP);
597     +
598     + ctx = gtk_widget_get_style_context(GTK_WIDGET(selfp->window));
599     + gtk_style_context_add_class(ctx, "tooltip");
600     +
601     self_update_screen(self, TRUE);
602     gtk_widget_set_app_paintable(selfp->window, TRUE);
603     gtk_window_set_resizable(GTK_WINDOW(selfp->window), FALSE);
604 fwang 113934 @@ -430,7 +430,7 @@
605     gtk_container_set_border_width(GTK_CONTAINER(selfp->window), selfp->border_width);
606    
607     g_signal_connect_swapped(selfp->window,
608     - "expose-event",
609     + "draw",
610     G_CALLBACK(self_paint_window),
611     self);
612    
613     @@ -490,7 +490,7 @@
614    
615     if (selfp->active_data
616     && selfp->active_data->widget == widget
617     - && GTK_WIDGET_DRAWABLE(selfp->active_data->widget))
618     + && gtk_widget_is_drawable(selfp->active_data->widget))
619     {
620     if (data->tip_widget)
621     g_object_unref(data->tip_widget);
622     @@ -594,7 +594,7 @@
623    
624     #line 287 "src/mn-tooltips.gob"
625     static gboolean
626     -mn_tooltips_paint_window (MNTooltips * self)
627     +mn_tooltips_paint_window (MNTooltips * self, cairo_t *cr)
628     {
629     #line 600 "mn-tooltips.c"
630     #define __GOB_FUNCTION__ "MN:Tooltips::paint_window"
631 dmorgan 129673 @@ -608,18 +608,13 @@
632 fwang 113934
633     GtkRequisition req;
634    
635     - gtk_widget_size_request(selfp->window, &req);
636     - gtk_paint_flat_box(selfp->window->style,
637     - selfp->window->window,
638 dmorgan 129673 - GTK_STATE_NORMAL,
639     - GTK_SHADOW_OUT,
640     - NULL,
641 fwang 113934 - selfp->window,
642 dmorgan 129673 - "tooltip",
643     - 0,
644     - 0,
645     - req.width,
646     - req.height);
647     + gtk_widget_size_request(GTK_WIDGET(selfp->window), &req);
648     + gtk_render_background(gtk_widget_get_style_context(GTK_WIDGET(selfp->window)),
649     + cr,
650     + 0,
651     + 0,
652     + req.width,
653     + req.height);
654    
655     return FALSE;
656     }}
657 fwang 113934 @@ -651,10 +650,11 @@
658     gint monitor_num, px, py;
659     GdkRectangle monitor;
660     int screen_width;
661     + GtkAllocation allocation;
662    
663     if (! selfp->window)
664     self_force_window(self);
665     - else if (GTK_WIDGET_VISIBLE(selfp->window))
666     + else if (gtk_widget_get_visible(selfp->window))
667     g_get_current_time(&selfp->last_popdown);
668    
669     gtk_widget_ensure_style(selfp->window);
670     @@ -670,7 +670,7 @@
671    
672     data = selfp->active_data;
673    
674     - child = GTK_BIN(selfp->window)->child;
675     + child = gtk_bin_get_child(GTK_BIN(selfp->window));
676     if (child)
677     gtk_container_remove(GTK_CONTAINER(selfp->window), child);
678    
679     @@ -684,14 +684,16 @@
680     w = requisition.width;
681     h = requisition.height;
682    
683     - gdk_window_get_origin(widget->window, &x, &y);
684     - if (GTK_WIDGET_NO_WINDOW(widget))
685     + gtk_widget_get_allocation(selfp->window, &allocation);
686     +
687     + gdk_window_get_origin(gtk_widget_get_window(widget), &x, &y);
688     + if (! gtk_widget_get_has_window(widget))
689     {
690     - x += widget->allocation.x;
691     - y += widget->allocation.y;
692     + x += allocation.x;
693     + y += allocation.y;
694     }
695    
696     - x += widget->allocation.width / 2;
697     + x += allocation.width / 2;
698    
699     if (! keyboard_mode)
700     gdk_window_get_pointer(gdk_screen_get_root_window(screen), &x, NULL, NULL);
701     @@ -712,11 +714,11 @@
702     else if (x < monitor.x)
703     x = monitor.x;
704    
705     - if ((y + h + widget->allocation.height + 4) > monitor.y + monitor.height
706     + if ((y + h + allocation.height + 4) > monitor.y + monitor.height
707     && (y - 4) > monitor.y)
708     y = y - h - 4;
709     else
710     - y = y + widget->allocation.height + 4;
711     + y = y + allocation.height + 4;
712    
713     /*
714     * The following block is not part of GTK+ and has been added to
715     @@ -760,7 +762,7 @@
716    
717     Self *self = SELF(data);
718    
719     - if (selfp->active_data && GTK_WIDGET_DRAWABLE(selfp->active_data->widget))
720     + if (selfp->active_data && gtk_widget_is_drawable(selfp->active_data->widget))
721     self_draw_tips(self);
722    
723     selfp->timeout_id = 0;
724     @@ -785,7 +787,7 @@
725    
726     if (selfp->window)
727     {
728     - if (GTK_WIDGET_VISIBLE(selfp->window))
729     + if (gtk_widget_get_visible(selfp->window))
730     g_get_current_time(&selfp->last_popdown);
731     gtk_widget_hide(selfp->window);
732     }
733     @@ -802,7 +804,7 @@
734     {
735     TooltipsData *data = l->data;
736    
737     - if (data->widget == widget && GTK_WIDGET_DRAWABLE(widget))
738     + if (data->widget == widget && gtk_widget_is_drawable(widget))
739     {
740     selfp->active_data = data;
741     break;
742     @@ -937,7 +939,7 @@
743    
744     if (GTK_IS_WINDOW(toplevel))
745     {
746     - GtkWidget *focus = GTK_WINDOW(toplevel)->focus_widget;
747     + GtkWidget *focus = gtk_window_get_focus(GTK_WINDOW(toplevel));
748    
749     g_object_set_data(G_OBJECT(toplevel), TOOLTIPS_KEYBOARD_MODE, GINT_TO_POINTER(TRUE));
750    
751     @@ -966,7 +968,7 @@
752    
753     if (GTK_IS_WINDOW(toplevel))
754     {
755     - GtkWidget *focus = GTK_WINDOW(toplevel)->focus_widget;
756     + GtkWidget *focus = gtk_window_get_focus(GTK_WINDOW(toplevel));
757    
758     if (focus)
759     self_hide_tip(focus);
760     @@ -1057,24 +1059,24 @@
761     break;
762    
763     case GDK_ENTER_NOTIFY:
764     - if (! (GTK_IS_MENU_ITEM(widget) && GTK_MENU_ITEM(widget)->submenu))
765     + if (! (GTK_IS_MENU_ITEM(widget) && gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget))))
766     self_start_delay(self, widget);
767     break;
768    
769     case GDK_LEAVE_NOTIFY:
770     self_set_active_widget(self, NULL);
771     - selfp->use_sticky_delay = selfp->window && GTK_WIDGET_VISIBLE(selfp->window);
772     + selfp->use_sticky_delay = selfp->window && gtk_widget_get_visible(selfp->window);
773     break;
774    
775     case GDK_MOTION_NOTIFY:
776     /* Handle menu items specially ... pend popup for each motion
777     * on other widgets, we ignore motion.
778     */
779     - if (GTK_IS_MENU_ITEM(widget) && ! GTK_MENU_ITEM(widget)->submenu)
780     + if (GTK_IS_MENU_ITEM(widget) && ! gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)))
781     {
782     /* Completely evil hack to make sure we get the LEAVE_NOTIFY
783     */
784     - GTK_PRIVATE_SET_FLAG(widget, GTK_LEAVE_PENDING);
785     + //GTK_PRIVATE_SET_FLAG(widget, GTK_LEAVE_PENDING);
786     self_set_active_widget(self, NULL);
787     self_start_delay(self, widget);
788     break;
789     --- src/nautilus-cell-renderer-pixbuf-emblem.c.orig 2011-02-08 00:16:43.847831409 +0100
790     +++ src/nautilus-cell-renderer-pixbuf-emblem.c 2011-02-08 00:32:59.128682767 +0100
791     @@ -39,17 +39,16 @@
792     GtkWidget *widget);
793     static void nautilus_cell_renderer_pixbuf_emblem_get_size (GtkCellRenderer *cell,
794     GtkWidget *widget,
795     - GdkRectangle *rectangle,
796     + const GdkRectangle *rectangle,
797     gint *x_offset,
798     gint *y_offset,
799     gint *width,
800     gint *height);
801     static void nautilus_cell_renderer_pixbuf_emblem_render (GtkCellRenderer *cell,
802     - GdkWindow *window,
803     + cairo_t *cr,
804     GtkWidget *widget,
805     - GdkRectangle *background_area,
806     - GdkRectangle *cell_area,
807     - GdkRectangle *expose_area,
808     + const GdkRectangle *background_area,
809     + const GdkRectangle *cell_area,
810     GtkCellRendererState flags);
811    
812     enum {
813     @@ -356,7 +355,7 @@
814     static void
815     nautilus_cell_renderer_pixbuf_emblem_get_size (GtkCellRenderer *cell,
816     GtkWidget *widget,
817     - GdkRectangle *cell_area,
818     + const GdkRectangle *cell_area,
819     gint *x_offset,
820     gint *y_offset,
821     gint *width,
822     @@ -368,6 +367,10 @@
823     gint pixbuf_height = 0;
824     gint calc_width;
825     gint calc_height;
826     + int xpad;
827     + int ypad;
828     + gfloat xalign;
829     + gfloat yalign;
830    
831     if (!cellpixbuf->pixbuf && cellinfo->stock_id)
832     nautilus_cell_renderer_pixbuf_emblem_create_stock_pixbuf (cellpixbuf, widget);
833     @@ -385,8 +388,11 @@
834     pixbuf_height = MAX (pixbuf_height, gdk_pixbuf_get_height (cellpixbuf->pixbuf_expander_closed));
835     }
836    
837     - calc_width = (gint) cell->xpad * 2 + pixbuf_width;
838     - calc_height = (gint) cell->ypad * 2 + pixbuf_height;
839     + gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
840     + gtk_cell_renderer_get_alignment(cell, &xalign, &yalign);
841     +
842     + calc_width = (gint) xpad * 2 + pixbuf_width;
843     + calc_height = (gint) ypad * 2 + pixbuf_height;
844    
845     if (x_offset) *x_offset = 0;
846     if (y_offset) *y_offset = 0;
847     @@ -394,14 +400,14 @@
848     if (cell_area && pixbuf_width > 0 && pixbuf_height > 0) {
849     if (x_offset) {
850     *x_offset = (((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ?
851     - 1.0 - cell->xalign : cell->xalign) *
852     - (cell_area->width - calc_width - 2 * cell->xpad));
853     - *x_offset = MAX (*x_offset, 0) + cell->xpad;
854     + 1.0 - xalign : xalign) *
855     + (cell_area->width - calc_width - 2 * xpad));
856     + *x_offset = MAX (*x_offset, 0) + xpad;
857     }
858     if (y_offset) {
859     - *y_offset = (cell->yalign *
860     - (cell_area->height - calc_height - 2 * cell->ypad));
861     - *y_offset = MAX (*y_offset, 0) + cell->ypad;
862     + *y_offset = (yalign *
863     + (cell_area->height - calc_height - 2 * ypad));
864     + *y_offset = MAX (*y_offset, 0) + ypad;
865     }
866     }
867    
868     @@ -414,11 +420,10 @@
869    
870     static void
871     nautilus_cell_renderer_pixbuf_emblem_render (GtkCellRenderer *cell,
872     - GdkWindow *window,
873     + cairo_t *cr,
874     GtkWidget *widget,
875     - GdkRectangle *background_area,
876     - GdkRectangle *cell_area,
877     - GdkRectangle *expose_area,
878     + const GdkRectangle *background_area,
879     + const GdkRectangle *cell_area,
880     GtkCellRendererState flags)
881    
882     {
883     @@ -429,13 +434,19 @@
884     GdkRectangle pix_emblem_rect;
885     GdkRectangle draw_rect;
886     gboolean stock_pixbuf = FALSE;
887     + gboolean is_expander = FALSE;
888     + gboolean is_expanded = FALSE;
889     + int xpad;
890     + int ypad;
891     +
892     + g_object_get(cell, "is-expander", &is_expander, "is-expanded", &is_expanded, NULL);
893    
894     pixbuf = cellpixbuf->pixbuf;
895     - if (cell->is_expander) {
896     - if (cell->is_expanded &&
897     + if (is_expander) {
898     + if (is_expanded &&
899     cellpixbuf->pixbuf_expander_open != NULL) {
900     pixbuf = cellpixbuf->pixbuf_expander_open;
901     - } else if (!cell->is_expanded &&
902     + } else if (!is_expanded &&
903     cellpixbuf->pixbuf_expander_closed != NULL) {
904     pixbuf = cellpixbuf->pixbuf_expander_closed;
905     }
906     @@ -456,15 +467,20 @@
907     if (stock_pixbuf)
908     pixbuf = cellpixbuf->pixbuf;
909    
910     + gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
911     +
912     pix_rect.x += cell_area->x;
913     pix_rect.y += cell_area->y;
914     - pix_rect.width -= cell->xpad * 2;
915     - pix_rect.height -= cell->ypad * 2;
916     + pix_rect.width -= xpad * 2;
917     + pix_rect.height -= ypad * 2;
918    
919     + if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect)) {
920     +#if 0
921     if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect) &&
922     gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect)) {
923     +
924     gdk_draw_pixbuf (window,
925     - widget->style->black_gc,
926     + gtk_widget_get_style(widget)->black_gc,
927     pixbuf,
928     /* pixbuf 0, 0 is at pix_rect.x, pix_rect.y */
929     draw_rect.x - pix_rect.x,
930     @@ -475,6 +491,11 @@
931     draw_rect.height,
932     GDK_RGB_DITHER_NORMAL,
933     0, 0);
934     +#endif
935     +
936     + cairo_move_to (cr, draw_rect.x - pix_rect.x, draw_rect.y - pix_rect.y);
937     + gdk_cairo_set_source_pixbuf (cr, pixbuf, draw_rect.x, draw_rect.y);
938     + cairo_paint (cr);
939     }
940    
941     if (cellpixbuf->pixbuf_emblem) {
942     @@ -482,8 +503,11 @@
943     pix_emblem_rect.height = gdk_pixbuf_get_height (cellpixbuf->pixbuf_emblem);
944     pix_emblem_rect.x = pix_rect.x;
945     pix_emblem_rect.y = pix_rect.y + pix_rect.height - pix_emblem_rect.height;
946     + if (gdk_rectangle_intersect (cell_area, &pix_emblem_rect, &draw_rect)) {
947     +#if 0
948     if (gdk_rectangle_intersect (cell_area, &pix_emblem_rect, &draw_rect) &&
949     gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect)) {
950     +
951     gdk_draw_pixbuf (window,
952     widget->style->black_gc,
953     cellpixbuf->pixbuf_emblem,
954     @@ -496,6 +520,11 @@
955     draw_rect.height,
956     GDK_RGB_DITHER_NORMAL,
957     0, 0);
958     +#endif
959     +
960     + cairo_move_to (cr, draw_rect.x - pix_emblem_rect.x, draw_rect.y - pix_emblem_rect.y);
961     + gdk_cairo_set_source_pixbuf (cr, cellpixbuf->pixbuf_emblem, draw_rect.x, draw_rect.y);
962     + cairo_paint (cr);
963     }
964     }
965     }
966     --- src/nautilus-cell-renderer-pixbuf-emblem.h.orig 2011-02-07 22:18:12.336471764 +0100
967     +++ src/nautilus-cell-renderer-pixbuf-emblem.h 2011-02-08 00:20:30.461758697 +0100
968     @@ -25,18 +25,18 @@
969     #ifndef NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_H
970     #define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_H
971    
972     -#include <gtk/gtkcellrenderer.h>
973     +#include <gtk/gtk.h>
974    
975     #define NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM \
976     (nautilus_cell_renderer_pixbuf_emblem_get_type ())
977     #define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM(obj) \
978     - (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblem))
979     + (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblem))
980     #define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_CLASS(klass) \
981     - (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblemClass))
982     + (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblemClass))
983     #define NAUTILUS_IS_CELL_RENDERER_PIXBUF_EMBLEM(obj) \
984     - (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
985     + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
986     #define NAUTILUS_IS_CELL_RENDERER_PIXBUF_EMBLEM_CLASS(klass) \
987     - (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
988     + (G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
989    
990     typedef struct _NautilusCellRendererPixbufEmblem NautilusCellRendererPixbufEmblem;
991     typedef struct _NautilusCellRendererPixbufEmblemClass NautilusCellRendererPixbufEmblemClass;
992     --- build/src/mn-authenticated-mailbox.c.orig 2011-02-08 00:34:16.332610802 +0100
993     +++ build/src/mn-authenticated-mailbox.c 2011-02-08 00:36:23.706936717 +0100
994     @@ -25,7 +25,7 @@
995     #line 29 "src/mn-authenticated-mailbox.gob"
996    
997     #include <glib/gi18n.h>
998     -#include <gnome.h>
999     +#include <libgnome/libgnome.h>
1000     #include "mn-mailbox-private.h"
1001     #include "mn-shell.h"
1002     #include "mn-util.h"
1003     @@ -859,6 +859,7 @@
1004    
1005     /* keep the title in sync with gnome-authentication-manager */
1006    
1007     +#if 0
1008     /* translators: header capitalization */
1009     selfp->auth_dialog = gnome_password_dialog_new(_("Authentication Required"),
1010     message,
1011     @@ -891,6 +892,9 @@
1012     gtk_widget_destroy(selfp->auth_dialog);
1013    
1014     return ok;
1015     +#else
1016     + return FALSE;
1017     +#endif
1018     }}
1019     #line 896 "mn-authenticated-mailbox.c"
1020     #undef __GOB_FUNCTION__
1021     --- build/src/mn-about-dialog.c.orig 2011-02-08 22:20:54.469841262 +0100
1022     +++ build/src/mn-about-dialog.c 2011-02-08 22:21:13.309839037 +0100
1023     @@ -111,9 +111,11 @@
1024     {
1025     #line 32 "src/mn-about-dialog.gob"
1026    
1027     +#if 0
1028     gtk_about_dialog_set_email_hook(self_activate_link_cb, "mailto:", NULL);
1029     gtk_about_dialog_set_url_hook(self_activate_link_cb, NULL, NULL);
1030     -
1031     +#endif
1032     +
1033     #line 118 "mn-about-dialog.c"
1034     }
1035     }
1036     --- build/src/mn-autodetect-mailbox-properties.c.orig 2011-02-08 22:21:58.639427345 +0100
1037     +++ build/src/mn-autodetect-mailbox-properties.c 2011-02-08 22:22:43.564035901 +0100
1038     @@ -355,10 +355,9 @@
1039    
1040     toplevel = gtk_widget_get_toplevel(GTK_WIDGET(button));
1041     /* translators: header capitalization */
1042     - selfp->chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"),
1043     + selfp->chooser = gtk_file_chooser_dialog_new(_("Select a File or Folder"),
1044     GTK_WINDOW(toplevel),
1045     GTK_FILE_CHOOSER_ACTION_OPEN,
1046     - "gnome-vfs",
1047     GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1048     GTK_STOCK_OPEN, 1,
1049     NULL);
1050     --- build/src/mn-pi-mailbox-properties.c.orig 2011-02-08 22:30:08.051375715 +0100
1051     +++ build/src/mn-pi-mailbox-properties.c 2011-02-08 22:30:21.398665261 +0100
1052     @@ -415,7 +415,7 @@
1053     int i;
1054    
1055     for (i = 0; i < MN_PI_MAILBOX_N_CONNECTION_TYPES; i++)
1056     - 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])));
1057     + 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])));
1058    
1059     g_object_notify(G_OBJECT(self), "complete");
1060     }}
1061     --- src/eggtrayicon.c.orig 2011-02-07 23:42:30.405791829 +0100
1062     +++ src/eggtrayicon.c 2011-02-08 23:06:16.092968325 +0100
1063     @@ -25,7 +25,7 @@
1064    
1065     #include "eggtrayicon.h"
1066    
1067     -#include <gdkconfig.h>
1068     +#include <gdk/gdk.h>
1069     #if defined (GDK_WINDOWING_X11)
1070     #include <gdk/gdkx.h>
1071     #include <X11/Xatom.h>
1072     @@ -258,7 +258,7 @@
1073     {
1074     GdkWindow *gdkwin;
1075    
1076     - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
1077     + gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (widget),
1078     icon->manager_window);
1079    
1080     gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
1081     @@ -290,7 +290,7 @@
1082     ev.window = window;
1083     ev.message_type = icon->system_tray_opcode_atom;
1084     ev.format = 32;
1085     - ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
1086     + ev.data.l[0] = gdk_x11_get_server_time (gtk_widget_get_window(GTK_WIDGET (icon)));
1087     ev.data.l[1] = message;
1088     ev.data.l[2] = data1;
1089     ev.data.l[3] = data2;
1090     @@ -342,12 +342,12 @@
1091     {
1092     GdkWindow *gdkwin;
1093    
1094     - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
1095     + gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
1096     icon->manager_window);
1097    
1098     gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
1099    
1100     - if (dock_if_realized && GTK_WIDGET_REALIZED (icon))
1101     + if (dock_if_realized && gtk_widget_get_realized (GTK_WIDGET(icon)))
1102     egg_tray_icon_send_dock_request (icon);
1103    
1104     egg_tray_icon_get_orientation_property (icon);
1105     @@ -355,10 +355,16 @@
1106     }
1107    
1108     static gboolean
1109     -transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
1110     +transparent_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
1111     {
1112     - gdk_window_clear_area (widget->window, event->area.x, event->area.y,
1113     +#if 0
1114     + gdk_window_clear_area (gtk_widget_get_window(widget), event->area.x, event->area.y,
1115     event->area.width, event->area.height);
1116     +#endif
1117     + cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
1118     + //gdk_cairo_region (cr, event->region);
1119     + cairo_fill (cr);
1120     +
1121     return FALSE;
1122     }
1123    
1124     @@ -366,20 +372,20 @@
1125     make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
1126     gpointer user_data)
1127     {
1128     - gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
1129     + //gdk_window_set_back_pixmap (gtk_widget_get_window(widget), NULL, TRUE);
1130     }
1131    
1132     static void
1133     make_transparent (GtkWidget *widget, gpointer user_data)
1134     {
1135     - if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
1136     + if (! gtk_widget_get_has_window (widget) || gtk_widget_get_app_paintable (widget))
1137     return;
1138    
1139     gtk_widget_set_app_paintable (widget, TRUE);
1140     gtk_widget_set_double_buffered (widget, FALSE);
1141     - gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
1142     - g_signal_connect (widget, "expose_event",
1143     - G_CALLBACK (transparent_expose_event), NULL);
1144     + //gdk_window_set_back_pixmap (gtk_widget_get_window(widget), NULL, TRUE);
1145     + g_signal_connect (widget, "draw",
1146     + G_CALLBACK (transparent_draw), NULL);
1147     g_signal_connect_after (widget, "style_set",
1148     G_CALLBACK (make_transparent_again), NULL);
1149     }
1150     @@ -391,7 +397,7 @@
1151    
1152     g_return_if_fail (icon->manager_window != None);
1153    
1154     - gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
1155     + gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
1156     icon->manager_window);
1157    
1158     gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
1159     --- build/src/mn-properties-dialog.c.orig 2011-02-08 23:37:12.605200174 +0100
1160     +++ build/src/mn-properties-dialog.c 2011-02-08 23:37:18.601881191 +0100
1161     @@ -183,7 +183,7 @@
1162     GtkTreeSelection *selection;
1163    
1164     mn_container_create_interface(GTK_CONTAINER(self),
1165     - PKGDATADIR G_DIR_SEPARATOR_S "properties-dialog.glade",
1166     + PKGDATADIR G_DIR_SEPARATOR_S "properties-dialog.ui",
1167     "main_vbox",
1168     "mn_properties_dialog_",
1169     "notebook", &selfp->notebook,
1170     --- src/mn-util.c.orig 2011-02-08 00:01:25.167207512 +0100
1171     +++ src/mn-util.c 2011-02-09 00:01:35.718285446 +0100
1172     @@ -26,8 +26,7 @@
1173     #include <gmodule.h>
1174     #include <glib/gi18n.h>
1175     #include <gobject/gvaluecollector.h>
1176     -#include <gnome.h>
1177     -#include <glade/glade.h>
1178     +#include <libgnome/libgnome.h>
1179     #include "mn-util.h"
1180     #include "mn-mailboxes.h"
1181     #include "mn-shell.h"
1182     @@ -303,49 +302,55 @@
1183     return pixbuf;
1184     }
1185    
1186     -static GladeXML *
1187     +static GtkBuilder *
1188     mn_glade_xml_new (const char *filename, const char *root, const char *domain)
1189     {
1190     - GladeXML *xml;
1191     + GtkBuilder *builder;
1192     + GError *err = NULL;
1193    
1194     g_return_val_if_fail(filename != NULL, NULL);
1195    
1196     - xml = glade_xml_new(filename, root, domain);
1197     - if (! xml)
1198     - mn_show_fatal_error_dialog(NULL, "Unable to load interface \"%s\".", filename);
1199     + builder = gtk_builder_new();
1200     + gtk_builder_set_translation_domain(builder, domain);
1201     + if (! gtk_builder_add_from_file(builder, filename, &err)) {
1202     + mn_show_fatal_error_dialog(NULL, "Unable to load interface \"%s\": %s.", filename, err->message);
1203     + g_error_free(err);
1204     + g_object_unref(builder);
1205     + return NULL;
1206     + }
1207    
1208     - return xml;
1209     + return builder;
1210     }
1211    
1212     static GtkWidget *
1213     -mn_glade_xml_get_widget (GladeXML *xml, const char *widget_name)
1214     +mn_glade_xml_get_widget (GtkBuilder *builder, const char *widget_name)
1215     {
1216     GtkWidget *widget;
1217    
1218     - g_return_val_if_fail(GLADE_IS_XML(xml), NULL);
1219     + g_return_val_if_fail(GTK_IS_BUILDER(builder), NULL);
1220     g_return_val_if_fail(widget_name != NULL, NULL);
1221    
1222     - widget = glade_xml_get_widget(xml, widget_name);
1223     + widget = GTK_WIDGET(gtk_builder_get_object(builder, widget_name));
1224     if (! widget)
1225     - mn_show_fatal_error_dialog(NULL, "Widget \"%s\" not found in interface \"%s\".", widget_name, xml->filename);
1226     + mn_show_fatal_error_dialog(NULL, "Widget \"%s\" not found in interface.", widget_name);
1227    
1228     return widget;
1229     }
1230    
1231     static void
1232     -create_interface_connect_cb (const char *handler_name,
1233     +create_interface_connect_cb (GtkBuilder *builder,
1234     GObject *object,
1235     const char *signal_name,
1236     - const char *signal_data,
1237     + const char *handler_name,
1238     GObject *connect_object,
1239     - gboolean after,
1240     + GConnectFlags flags,
1241     gpointer user_data)
1242     {
1243     static GModule *module = NULL;
1244     ContainerCreateInterfaceConnectInfo *info = user_data;
1245     char *cb_name;
1246     GCallback cb;
1247     - GConnectFlags flags;
1248     + GConnectFlags cflags;
1249    
1250     if (! module)
1251     {
1252     @@ -359,11 +364,9 @@
1253     mn_show_fatal_error_dialog(NULL, "Signal handler \"%s\" not found.", cb_name);
1254     g_free(cb_name);
1255    
1256     - flags = G_CONNECT_SWAPPED;
1257     - if (after)
1258     - flags |= G_CONNECT_AFTER;
1259     + cflags = G_CONNECT_SWAPPED;
1260    
1261     - g_signal_connect_data(object, signal_name, cb, info->container, NULL, flags);
1262     + g_signal_connect_data(object, signal_name, cb, info->container, NULL, cflags);
1263     }
1264    
1265     void
1266     @@ -373,7 +376,7 @@
1267     const char *callback_prefix,
1268     ...)
1269     {
1270     - GladeXML *xml;
1271     + GtkBuilder *xml;
1272     GtkWidget *child;
1273     ContainerCreateInterfaceConnectInfo info;
1274     va_list args;
1275     @@ -387,14 +390,16 @@
1276     xml = mn_glade_xml_new(filename, child_name, NULL);
1277     child = mn_glade_xml_get_widget(xml, child_name);
1278    
1279     - if (GTK_IS_DIALOG(container))
1280     - gtk_box_pack_start(GTK_BOX(GTK_DIALOG(container)->vbox), child, TRUE, TRUE, 0);
1281     - else
1282     + if (GTK_IS_DIALOG(container)) {
1283     + gtk_widget_unparent(child);
1284     + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(container))), child, TRUE, TRUE, 0);
1285     + } else {
1286     gtk_container_add(container, child);
1287     + }
1288    
1289     info.container = container;
1290     info.callback_prefix = callback_prefix;
1291     - glade_xml_signal_autoconnect_full(xml, create_interface_connect_cb, &info);
1292     + gtk_builder_connect_signals_full(xml, create_interface_connect_cb, &info);
1293    
1294     va_start(args, callback_prefix);
1295    
1296     @@ -422,7 +427,7 @@
1297    
1298     toplevel = gtk_widget_get_toplevel(widget);
1299    
1300     - return GTK_WIDGET_TOPLEVEL(toplevel) ? GTK_WINDOW(toplevel) : NULL;
1301     + return gtk_widget_get_toplevel(toplevel) ? GTK_WINDOW(toplevel) : NULL;
1302     }
1303    
1304     static void
1305     @@ -493,9 +498,11 @@
1306     gpointer user_data)
1307     {
1308     GtkAdjustment *adjustment;
1309     + GtkAllocation allocation;
1310    
1311     + gtk_widget_get_allocation(widget, &allocation);
1312     adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(widget));
1313     - gtk_adjustment_set_value(adjustment, (double) y / (widget->allocation.height - 2) * (adjustment->upper - adjustment->page_size));
1314     + gtk_adjustment_set_value(adjustment, (double) y / (allocation.height - 2) * (gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment)));
1315    
1316     return TRUE; /* we're forcibly in a drop zone */
1317     }
1318     @@ -562,7 +569,7 @@
1319     MNMailbox *mailbox;
1320    
1321     /* text/x-moz-url is encoded in UCS-2 but in format 8: broken */
1322     - if (selection_data->format != 8 || selection_data->length <= 0 || (selection_data->length % 2) != 0)
1323     + 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)
1324     {
1325     mn_show_error_dialog(mn_widget_get_parent_window(widget),
1326     _("A drag and drop error has occurred"),
1327     @@ -570,8 +577,8 @@
1328     return;
1329     }
1330    
1331     - char_data = (const guint16 *) selection_data->data;
1332     - char_len = selection_data->length / 2;
1333     + char_data = (const guint16 *) gtk_selection_data_get_data(selection_data);
1334     + char_len = gtk_selection_data_get_length(selection_data) / 2;
1335    
1336     url = g_string_new(NULL);
1337     for (i = 0; i < char_len && char_data[i] != '\n'; i++)
1338     @@ -1322,7 +1329,7 @@
1339     }
1340    
1341     static void
1342     -dialog_run_nonmodal_destroy_h (GtkObject *object, gpointer user_data)
1343     +dialog_run_nonmodal_destroy_h (GtkWidget *object, gpointer user_data)
1344     {
1345     RunNonmodalInfo *info = user_data;
1346    
1347     @@ -1375,7 +1382,7 @@
1348    
1349     g_object_ref(dialog);
1350    
1351     - if (! GTK_WIDGET_VISIBLE(dialog))
1352     + if (! gtk_widget_get_visible(dialog))
1353     gtk_widget_show(GTK_WIDGET(dialog));
1354    
1355     g_object_connect(dialog,
1356     --- src/mn-main.c.gtk3 2008-05-22 17:45:35.000000000 +0200
1357     +++ src/mn-main.c 2011-02-08 23:32:33.800030659 +0100
1358     @@ -21,7 +21,7 @@
1359     #include <stdlib.h>
1360     #include <signal.h>
1361     #include <glib/gi18n.h>
1362     -#include <gnome.h>
1363     +#include <libgnome/libgnome.h>
1364     #include <libgnomevfs/gnome-vfs.h>
1365     #include <libnotify/notify.h>
1366     #include <dbus/dbus-glib-lowlevel.h>
1367     @@ -452,7 +452,7 @@
1368    
1369     gnome_program_init(PACKAGE,
1370     VERSION,
1371     - LIBGNOMEUI_MODULE,
1372     + LIBGNOME_MODULE,
1373     argc,
1374     argv,
1375     GNOME_PARAM_HUMAN_READABLE_NAME, _("Mail Notification"),
1376     @@ -460,6 +460,8 @@
1377     GNOME_PARAM_GOPTION_CONTEXT, option_context,
1378     NULL);
1379    
1380     + gtk_init(&argc, &argv);
1381     +
1382     if (arg_version)
1383     {
1384     print_version();
1385     @@ -497,7 +499,9 @@
1386     if (! gnome_vfs_init())
1387     mn_show_fatal_error_dialog(NULL, _("Unable to initialize the GnomeVFS library."));
1388    
1389     +#if 0
1390     gnome_authentication_manager_init();
1391     +#endif
1392    
1393     /* must be called before init_gmime() */
1394     mn_conf_init();
1395     --- src/mn-conf.c.gtk3 2008-05-22 17:45:35.000000000 +0200
1396     +++ src/mn-conf.c 2011-02-07 20:07:01.630580132 +0100
1397     @@ -23,7 +23,7 @@
1398     #include <errno.h>
1399     #include <stdarg.h>
1400     #include <glib/gi18n.h>
1401     -#include <gnome.h>
1402     +#include <libgnome/libgnome.h>
1403     #include "mn-util.h"
1404     #include "mn-conf.h"
1405     #include "mn-shell.h"

  ViewVC Help
Powered by ViewVC 1.1.30