--- build/src/mn-dialog.c.orig 2011-02-02 23:08:09.816659245 +0100
+++ build/src/mn-dialog.c 2011-02-02 23:09:16.988113774 +0100
@@ -106,8 +106,7 @@
#line 27 "src/mn-dialog.gob"
gtk_container_set_border_width(GTK_CONTAINER(self), 5);
- gtk_dialog_set_has_separator(GTK_DIALOG(self), FALSE);
- gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(self)->vbox), 2);
+ gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(self))), 2);
#line 113 "mn-dialog.c"
}
--- jbsrc/jb.c.orig 2011-02-02 23:40:33.567924712 +0100
+++ jbsrc/jb.c 2011-02-02 23:39:39.680803618 +0100
@@ -163,7 +163,7 @@
{
jb_check_glibc();
- 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");
+ 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");
jb_require_packages("D-Bus", "dbus", "dbus-glib-1");
jb_check_packages_for_options("GMime", "gmime", "gmime-2.6",
--- build/src/mn-file-chooser-button.c.orig 2011-02-02 23:38:01.503049512 +0100
+++ build/src/mn-file-chooser-button.c 2011-02-02 23:38:16.988222034 +0100
@@ -358,7 +358,7 @@
g_signal_connect(selfp->dialog, "response", G_CALLBACK(self_response_h), self);
}
- if (! GTK_WIDGET_VISIBLE(selfp->dialog))
+ if (! gtk_widget_get_visible(selfp->dialog))
{
GtkWindow *parent;
--- build/src/mn-sound-player.c.orig 2011-02-02 23:55:02.436500397 +0100
+++ build/src/mn-sound-player.c 2011-02-02 23:55:09.125141055 +0100
@@ -27,7 +27,7 @@
#include <sys/types.h>
#include <signal.h>
#include <glib/gi18n.h>
-#include <gnome.h>
+#include <libgnome/libgnome.h>
#include "mn-conf.h"
#include "mn-locked-callback.h"
#include "mn-util.h"
--- build/src/mn-file-chooser-button.c.orig 2011-02-02 23:55:21.857457045 +0100
+++ build/src/mn-file-chooser-button.c 2011-02-02 23:55:30.422996901 +0100
@@ -25,7 +25,7 @@
#line 39 "src/mn-file-chooser-button.gob"
#include <glib/gi18n.h>
-#include <gnome.h>
+#include <libgnome/libgnome.h>
#include "mn-util.h"
#line 32 "mn-file-chooser-button.c"
--- build/src/mn-message.c.orig 2011-02-02 23:55:41.160420099 +0100
+++ build/src/mn-message.c 2011-02-02 23:55:47.755065850 +0100
@@ -26,7 +26,7 @@
#include <errno.h>
#include <glib/gi18n.h>
-#include <gnome.h>
+#include <libgnome/libgnome.h>
#include <libgnomevfs/gnome-vfs.h>
#include "mn-conf.h"
#include "mn-util.h"
--- build/src/mn-file-chooser-button.c.orig 2011-02-03 00:15:16.178407712 +0100
+++ build/src/mn-file-chooser-button.c 2011-02-03 00:18:17.865681563 +0100
@@ -463,6 +463,7 @@
GDK_THREADS_ENTER();
+#if 0
if (results)
{
GnomeVFSGetFileInfoResult *result = results->data;
@@ -494,6 +495,7 @@
}
}
}
+#endif
selfp->async_handle = NULL;
g_object_unref(self);
--- build/src/mn-evolution-folder-tree-server.c.orig 2011-02-07 20:17:09.574274620 +0100
+++ build/src/mn-evolution-folder-tree-server.c 2011-02-07 20:23:25.196053994 +0100
@@ -25,6 +25,7 @@
#line 24 "src/mn-evolution-folder-tree-server.gob"
#include <dbus/dbus.h>
+#include <gtk/gtkx.h>
#include <libedataserver/eds-version.h>
#if !EDS_CHECK_VERSION(2,29,0)
#include <mail/mail-component.h>
@@ -77,7 +78,7 @@
static void mn_evolution_folder_tree_server_finalize (MNEvolutionFolderTreeServer * self);
#line 70 "mn-evolution-folder-tree-server.c"
#line 84 "src/mn-evolution-folder-tree-server.gob"
-static void mn_evolution_folder_tree_server_plug_destroy_h (GtkObject * object, gpointer user_data);
+static void mn_evolution_folder_tree_server_plug_destroy_h (GtkWidget * object, gpointer user_data);
#if EDS_CHECK_VERSION(3,1,0)
static void mn_evolution_folder_tree_server_selected_h (EMFolderTree * tree, CamelStore * store, const char * folder_name, guint32 flags, gpointer user_data);
static void mn_evolution_folder_tree_server_activated_h (EMFolderTree * tree, CamelStore * store, const char * folder_name, gpointer user_data);
@@ -456,7 +457,7 @@
selfp->tree = em_folder_tree_new_with_model(model);
#endif
- selfp->plug = gtk_plug_new((GdkNativeWindow) selfp->id);
+ selfp->plug = gtk_plug_new((Window) selfp->id);
gtk_container_add(GTK_CONTAINER(selfp->plug), selfp->tree);
gtk_widget_show_all(selfp->plug);
@@ -490,7 +491,7 @@
#line 84 "src/mn-evolution-folder-tree-server.gob"
static void
-mn_evolution_folder_tree_server_plug_destroy_h (GtkObject * object, gpointer user_data)
+mn_evolution_folder_tree_server_plug_destroy_h (GtkWidget * object, gpointer user_data)
{
#line 482 "mn-evolution-folder-tree-server.c"
#define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::plug_destroy_h"
--- src/eggtrayicon.h.orig 2011-02-07 20:25:26.352057350 +0100
+++ src/eggtrayicon.h 2011-02-07 20:27:54.495032920 +0100
@@ -23,10 +23,9 @@
#ifndef __EGG_TRAY_ICON_H__
#define __EGG_TRAY_ICON_H__
-#include <gtk/gtkplug.h>
-#ifdef GDK_WINDOWING_X11
+#include <gtk/gtk.h>
+#include <gtk/gtkx.h>
#include <gdk/gdkx.h>
-#endif
G_BEGIN_DECLS
--- build/src/mn-mail-icon.c.orig 2011-02-07 20:24:58.971663075 +0100
+++ build/src/mn-mail-icon.c 2011-02-07 20:30:33.714401306 +0100
@@ -833,11 +833,13 @@
#line 239 "src/mn-mail-icon.gob"
GtkWidget *widget = user_data;
+ GtkAllocation allocation;
- gdk_window_get_origin(widget->window, x, y);
+ gdk_window_get_origin(gtk_widget_get_window(widget), x, y);
+ gtk_widget_get_allocation(widget, &allocation);
- *x += widget->allocation.x;
- *y += widget->allocation.y;
+ *x += allocation.x;
+ *y += allocation.y;
if (*y > gdk_screen_get_height(gtk_widget_get_screen(widget)) / 2)
{
@@ -847,7 +849,7 @@
*y -= req.height;
}
else
- *y += widget->allocation.height;
+ *y += allocation.height;
*push_in = TRUE;
}}
--- build/src/mn-mail-icon-widget.c.orig 2011-02-07 20:31:19.475816763 +0100
+++ build/src/mn-mail-icon-widget.c 2011-02-07 21:53:48.858814715 +0100
@@ -64,9 +64,13 @@
#line 65 "mn-mail-icon-widget.c"
#line 110 "src/mn-mail-icon-widget.gob"
static void ___7_mn_mail_icon_widget_size_request (GtkWidget * widget, GtkRequisition * requisition);
+static void
+mn_mail_icon_widget_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width);
+static void
+mn_mail_icon_widget_get_preferred_height(GtkWidget *widget, gint *minimal_height, gint *natural_height);
#line 68 "mn-mail-icon-widget.c"
#line 132 "src/mn-mail-icon-widget.gob"
-static gboolean ___8_mn_mail_icon_widget_expose_event (GtkWidget * widget, GdkEventExpose * event);
+static gboolean ___8_mn_mail_icon_widget_draw (GtkWidget * widget, cairo_t *cr);
#line 71 "mn-mail-icon-widget.c"
#line 244 "src/mn-mail-icon-widget.gob"
static GdkPixbuf * mn_mail_icon_widget_render_icon (MNMailIconWidget * self);
@@ -187,9 +191,10 @@
parent_class = g_type_class_ref (GTK_TYPE_WIDGET);
#line 110 "src/mn-mail-icon-widget.gob"
- gtk_widget_class->size_request = ___7_mn_mail_icon_widget_size_request;
+ gtk_widget_class->get_preferred_width = mn_mail_icon_widget_get_preferred_width;
+ gtk_widget_class->get_preferred_height = mn_mail_icon_widget_get_preferred_height;
#line 132 "src/mn-mail-icon-widget.gob"
- gtk_widget_class->expose_event = ___8_mn_mail_icon_widget_expose_event;
+ gtk_widget_class->draw = ___8_mn_mail_icon_widget_draw;
#line 194 "mn-mail-icon-widget.c"
g_object_class->dispose = ___dispose;
g_object_class->finalize = ___finalize;
@@ -234,7 +239,7 @@
{
#line 93 "src/mn-mail-icon-widget.gob"
- GTK_WIDGET_SET_FLAGS(self, GTK_NO_WINDOW);
+ gtk_widget_set_has_window(GTK_WIDGET(self), FALSE);
gtk_widget_set_name(GTK_WIDGET(self), "mn-mail-icon");
@@ -457,9 +462,28 @@
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
+static void
+mn_mail_icon_widget_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width)
+{
+ GtkRequisition requisition;
+
+ ___7_mn_mail_icon_widget_size_request (widget, &requisition);
+ *minimal_width = *natural_width = requisition.width;
+}
+
+static void
+mn_mail_icon_widget_get_preferred_height(GtkWidget *widget, gint *minimal_height, gint *natural_height)
+{
+ GtkRequisition requisition;
+
+ ___7_mn_mail_icon_widget_size_request (widget, &requisition);
+
+ *minimal_height = *natural_height = requisition.height;
+}
+
#line 132 "src/mn-mail-icon-widget.gob"
static gboolean
-___8_mn_mail_icon_widget_expose_event (GtkWidget * widget G_GNUC_UNUSED, GdkEventExpose * event)
+___8_mn_mail_icon_widget_draw (GtkWidget * widget G_GNUC_UNUSED, cairo_t *cr)
#line 464 "mn-mail-icon-widget.c"
#define PARENT_HANDLER(___widget,___event) \
((GTK_WIDGET_CLASS(parent_class)->expose_event)? \
@@ -472,7 +496,7 @@
Self *self = SELF(widget);
- if (! GTK_WIDGET_DRAWABLE(widget) || ! selfp->stock_id)
+ if (! gtk_widget_is_drawable(widget) || ! selfp->stock_id)
return FALSE;
if (selfp->is_on)
@@ -480,23 +504,34 @@
int x;
int y;
GdkRectangle image_area;
+ GtkAllocation allocation;
+ GtkRequisition requisition;
/* note: widget->requisition is the pixbuf size, see size_request() */
- x = floor(widget->allocation.x + ((widget->allocation.width - widget->requisition.width) * ICON_XALIGN));
- y = floor(widget->allocation.y + ((widget->allocation.height - widget->requisition.height) * ICON_YALIGN));
+ gtk_widget_get_allocation(widget, &allocation);
+ gtk_widget_get_requisition(widget, &requisition);
+
+ x = floor(allocation.x + ((allocation.width - requisition.width) * ICON_XALIGN));
+ y = floor(allocation.y + ((allocation.height - requisition.height) * ICON_YALIGN));
image_area.x = x;
image_area.y = y;
- image_area.width = widget->requisition.width;
- image_area.height = widget->requisition.height;
+ image_area.width = requisition.width;
+ image_area.height = requisition.height;
+#if 0
if (gdk_rectangle_intersect(&event->area, &image_area, &image_area))
+#endif
{
GdkPixbuf *pixbuf;
pixbuf = self_render_icon(self);
+ gdk_cairo_set_source_pixbuf(cr, pixbuf, image_area.x, image_area.y);
+ cairo_move_to(cr, image_area.x - x, image_area.y - y);
+ cairo_paint(cr);
+#if 0
gdk_draw_pixbuf(widget->window,
NULL,
pixbuf,
@@ -509,6 +544,7 @@
GDK_RGB_DITHER_NORMAL,
0,
0);
+#endif
g_object_unref(pixbuf);
}
@@ -523,13 +559,16 @@
int box_y;
int box_width;
int box_height;
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation(widget, &allocation);
if (! selfp->count_layout)
{
const char *size;
char *markup;
- if (widget->allocation.height < 32)
+ if (allocation.height < 32)
size = "small";
else
size = "medium";
@@ -546,17 +585,16 @@
box_width = count_rect.width + COUNT_BOX_XPAD * 2;
box_height = count_rect.height + COUNT_BOX_YPAD * 2;
- box_x = widget->allocation.x + widget->allocation.width - box_width - COUNT_BOX_XMARGIN;
- box_y = widget->allocation.y + widget->allocation.height - box_height - COUNT_BOX_YMARGIN;
+ box_x = allocation.x + allocation.width - box_width - COUNT_BOX_XMARGIN;
+ box_y = allocation.y + allocation.height - box_height - COUNT_BOX_YMARGIN;
count_x = box_x - count_rect.x + COUNT_BOX_XPAD;
count_y = box_y - count_rect.y + COUNT_BOX_YPAD;
- gtk_paint_box(widget->style,
- widget->window,
- GTK_WIDGET_STATE(widget),
+ gtk_paint_box(gtk_widget_get_style(widget),
+ cr,
+ gtk_widget_get_state_flags(widget),
GTK_SHADOW_OUT,
- &event->area,
widget,
NULL,
box_x,
@@ -564,11 +602,10 @@
box_width,
box_height);
- gtk_paint_layout(widget->style,
- widget->window,
- GTK_WIDGET_STATE(widget),
+ gtk_paint_layout(gtk_widget_get_style(widget),
+ cr,
+ gtk_widget_get_state_flags(widget),
FALSE,
- &event->area,
widget,
NULL,
count_x,
--- build/src/mn-mailbox-properties-dialog.c.orig 2011-02-07 21:57:31.257251776 +0100
+++ build/src/mn-mailbox-properties-dialog.c 2011-02-07 21:56:56.989854854 +0100
@@ -456,7 +456,7 @@
MNMailboxProperties *properties;
mn_container_create_interface(GTK_CONTAINER(self),
- PKGDATADIR G_DIR_SEPARATOR_S "mailbox-properties-dialog.glade",
+ PKGDATADIR G_DIR_SEPARATOR_S "mailbox-properties-dialog.ui",
"notebook",
"mn_mailbox_properties_dialog_",
"notebook", &self->notebook,
@@ -1290,7 +1290,7 @@
{
#line 686 "src/mn-mailbox-properties-dialog.gob"
- if (GTK_WIDGET_IS_SENSITIVE(GTK_WINDOW(self)->default_widget))
+ if (gtk_widget_is_sensitive(gtk_window_get_default_widget(GTK_WINDOW(self))))
gtk_window_activate_default(GTK_WINDOW(self));
else
{
@@ -1313,9 +1313,9 @@
if (elem->data == entry)
break;
- if (GTK_WIDGET_MAPPED(elem->data)
- && GTK_WIDGET_VISIBLE(elem->data)
- && GTK_WIDGET_SENSITIVE(elem->data))
+ if (gtk_widget_get_mapped(elem->data)
+ && gtk_widget_get_visible(elem->data)
+ && gtk_widget_get_sensitive(elem->data))
next = elem->data;
}
while (! next);
--- build/src/mn-mailbox-view.c.orig 2011-02-07 22:18:49.962462920 +0100
+++ build/src/mn-mailbox-view.c 2011-02-07 23:01:39.990363248 +0100
@@ -412,23 +412,23 @@
binding_set = gtk_binding_set_by_class(class);
/* Delete removes a row */
- gtk_binding_entry_add_signal(binding_set, GDK_Delete, 0, "activate-remove", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_KP_Delete, 0, "activate-remove", 0);
+ gtk_binding_entry_add_signal(binding_set, GDK_KEY_Delete, 0, "activate-remove", 0);
+ gtk_binding_entry_add_signal(binding_set, GDK_KEY_KP_Delete, 0, "activate-remove", 0);
/* HIG 2.0 cut/copy/paste shortcuts */
- gtk_binding_entry_add_signal(binding_set, GDK_x, GDK_CONTROL_MASK, "activate-cut", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_c, GDK_CONTROL_MASK, "activate-copy", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_v, GDK_CONTROL_MASK, "activate-paste", 0);
+ gtk_binding_entry_add_signal(binding_set, GDK_KEY_x, GDK_CONTROL_MASK, "activate-cut", 0);
+ gtk_binding_entry_add_signal(binding_set, GDK_KEY_c, GDK_CONTROL_MASK, "activate-copy", 0);
+ gtk_binding_entry_add_signal(binding_set, GDK_KEY_v, GDK_CONTROL_MASK, "activate-paste", 0);
/* cut/copy/paste shortcuts taken from gtkentry.c */
- gtk_binding_entry_add_signal(binding_set, GDK_Delete, GDK_SHIFT_MASK, "activate-cut", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_Insert, GDK_CONTROL_MASK, "activate-copy", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_Insert, GDK_SHIFT_MASK, "activate-paste", 0);
+ gtk_binding_entry_add_signal(binding_set, GDK_KEY_Delete, GDK_SHIFT_MASK, "activate-cut", 0);
+ gtk_binding_entry_add_signal(binding_set, GDK_KEY_Insert, GDK_CONTROL_MASK, "activate-copy", 0);
+ gtk_binding_entry_add_signal(binding_set, GDK_KEY_Insert, GDK_SHIFT_MASK, "activate-paste", 0);
/* HIG 2.0 properties */
- gtk_binding_entry_add_signal(binding_set, GDK_Return, GDK_MOD1_MASK, "activate-properties", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_ISO_Enter, GDK_MOD1_MASK, "activate-properties", 0);
- gtk_binding_entry_add_signal(binding_set, GDK_KP_Enter, GDK_MOD1_MASK, "activate-properties", 0);
+ gtk_binding_entry_add_signal(binding_set, GDK_KEY_Return, GDK_MOD1_MASK, "activate-properties", 0);
+ gtk_binding_entry_add_signal(binding_set, GDK_KEY_ISO_Enter, GDK_MOD1_MASK, "activate-properties", 0);
+ gtk_binding_entry_add_signal(binding_set, GDK_KEY_KP_Enter, GDK_MOD1_MASK, "activate-properties", 0);
#line 434 "mn-mailbox-view.c"
}
@@ -934,14 +934,13 @@
#line 183 "src/mn-mailbox-view.gob"
GtkSelectionData *data;
-
data = gtk_clipboard_wait_for_contents(global_clipboard, clipboard_info[TARGET_MAILBOXES].atom);
if (data)
{
GSList *configurations;
GSList *l;
- memcpy(&configurations, data->data, data->length);
+ memcpy(&configurations, gtk_selection_data_get_data(data), gtk_selection_data_get_length(data));
MN_LIST_FOREACH(l, configurations)
{
@@ -962,14 +961,14 @@
data = gtk_clipboard_wait_for_contents(global_clipboard, clipboard_info[TARGET_GNOME_COPIED_FILES].atom);
if (data)
{
- if (data->format == 8 && data->length > 0)
+ if (gtk_selection_data_get_format(data) == 8 && gtk_selection_data_get_length(data) > 0)
{
char *gnome_copied_files;
gboolean status;
MNGnomeCopiedFilesType type;
GSList *uri_list;
- gnome_copied_files = g_strndup(data->data, data->length);
+ gnome_copied_files = g_strndup(gtk_selection_data_get_data(data), gtk_selection_data_get_length(data));
status = mn_parse_gnome_copied_files(gnome_copied_files, &type, &uri_list);
g_free(gnome_copied_files);
--- build/src/mn-shell.c.orig 2011-02-07 23:02:17.852293679 +0100
+++ build/src/mn-shell.c 2011-02-07 23:04:39.223548403 +0100
@@ -158,7 +158,7 @@
static void mn_shell_icon_activate_about_h (MNMailIcon * icon, gpointer user_data);
#line 160 "mn-shell.c"
#line 499 "src/mn-shell.gob"
-static void mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data);
+static void mn_shell_icon_destroy_h (GtkWidget * object, gpointer user_data);
#line 163 "mn-shell.c"
#line 508 "src/mn-shell.gob"
static void mn_shell_update_sensitivity (MNShell * self);
@@ -1006,7 +1006,7 @@
#line 499 "src/mn-shell.gob"
static void
-mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data)
+mn_shell_icon_destroy_h (GtkWidget * object, gpointer user_data)
{
#line 1004 "mn-shell.c"
#define __GOB_FUNCTION__ "MN:Shell::icon_destroy_h"
--- build/src/mn-text-table.c.orig 2011-02-07 23:05:08.799927792 +0100
+++ build/src/mn-text-table.c 2011-02-07 23:18:06.480056895 +0100
@@ -69,9 +69,11 @@
#line 70 "mn-text-table.c"
#line 104 "src/mn-text-table.gob"
static void ___4_mn_text_table_size_request (GtkWidget * widget, GtkRequisition * requisition);
+static void mn_text_table_get_preferred_width (GtkWidget * widget, gint * minimal_width, gint * natural_width);
+static void mn_text_table_get_preferred_height (GtkWidget * widget, gint * minimal_height, gint * natural_height);
#line 73 "mn-text-table.c"
#line 115 "src/mn-text-table.gob"
-static gboolean ___5_mn_text_table_expose_event (GtkWidget * widget, GdkEventExpose * event);
+static gboolean ___5_mn_text_table_draw (GtkWidget * widget, cairo_t *cr);
#line 76 "mn-text-table.c"
#line 165 "src/mn-text-table.gob"
static void mn_text_table_set_dirty (MNTextTable * self);
@@ -188,9 +190,10 @@
parent_class = g_type_class_ref (GTK_TYPE_WIDGET);
#line 104 "src/mn-text-table.gob"
- gtk_widget_class->size_request = ___4_mn_text_table_size_request;
+ gtk_widget_class->get_preferred_width = mn_text_table_get_preferred_width;
+ gtk_widget_class->get_preferred_height = mn_text_table_get_preferred_height;
#line 115 "src/mn-text-table.gob"
- gtk_widget_class->expose_event = ___5_mn_text_table_expose_event;
+ gtk_widget_class->draw = ___5_mn_text_table_draw;
#line 257 "src/mn-text-table.gob"
c->clear = ___real_mn_text_table_clear;
#line 197 "mn-text-table.c"
@@ -216,7 +219,7 @@
{
#line 80 "src/mn-text-table.gob"
- GTK_WIDGET_SET_FLAGS(self, GTK_NO_WINDOW);
+ gtk_widget_set_has_window(GTK_WIDGET(self), FALSE);
g_object_connect(self,
"swapped-signal::style-set", self_context_changed, self,
@@ -290,9 +293,29 @@
#undef __GOB_FUNCTION__
#undef PARENT_HANDLER
+static void
+mn_text_table_get_preferred_width (GtkWidget * widget, gint * minimal_width, gint * natural_width)
+{
+ GtkRequisition requisition;
+
+ ___4_mn_text_table_size_request (widget, &requisition);
+
+ *minimal_width = *natural_width = requisition.width;
+}
+
+static void
+mn_text_table_get_preferred_height (GtkWidget * widget, gint * minimal_height, gint * natural_height)
+{
+ GtkRequisition requisition;
+
+ ___4_mn_text_table_size_request (widget, &requisition);
+
+ *minimal_height = *natural_height = requisition.height;
+}
+
#line 115 "src/mn-text-table.gob"
static gboolean
-___5_mn_text_table_expose_event (GtkWidget * widget G_GNUC_UNUSED, GdkEventExpose * event)
+___5_mn_text_table_draw (GtkWidget * widget G_GNUC_UNUSED, cairo_t *cr)
#line 297 "mn-text-table.c"
#define PARENT_HANDLER(___widget,___event) \
((GTK_WIDGET_CLASS(parent_class)->expose_event)? \
@@ -304,10 +327,14 @@
#line 117 "src/mn-text-table.gob"
Self *self = SELF(widget);
+ GtkAllocation allocation;
int i;
- int y = widget->allocation.y;
+ int y;
+
+ gtk_widget_get_allocation(widget, &allocation);
+ y = 0;
- if (! GTK_WIDGET_DRAWABLE(widget))
+ if (! gtk_widget_is_drawable(widget))
return FALSE;
self_relayout(self);
@@ -316,7 +343,7 @@
{
Row *row = g_ptr_array_index(selfp->rows, i);
int j;
- int x = widget->allocation.x;
+ int x = 0;
int column = 0;
MN_ARRAY_FOREACH(j, row->cells)
@@ -324,11 +351,10 @@
MNTextTableCell *cell = g_ptr_array_index(row->cells, j);
if (cell->layout)
- gtk_paint_layout(widget->style,
- widget->window,
- GTK_WIDGET_STATE(widget),
+ gtk_paint_layout(gtk_widget_get_style(widget),
+ cr,
+ gtk_widget_get_state_flags(widget),
FALSE,
- &event->area,
widget,
NULL,
x,
--- build/src/mn-tooltips.c.orig 2011-02-07 23:19:05.903761972 +0100
+++ build/src/mn-tooltips.c 2011-02-07 23:41:19.368621912 +0100
@@ -104,7 +104,7 @@
static void mn_tooltips_set_tip_widget_real (MNTooltips * self, GtkWidget * widget, GtkWidget * tip_widget, int border_width);
#line 106 "mn-tooltips.c"
#line 287 "src/mn-tooltips.gob"
-static gboolean mn_tooltips_paint_window (MNTooltips * self);
+static gboolean mn_tooltips_paint_window (MNTooltips * self, cairo_t *cr);
#line 109 "mn-tooltips.c"
#line 308 "src/mn-tooltips.gob"
static void mn_tooltips_draw_tips (MNTooltips * self);
@@ -422,7 +422,13 @@
if (! selfp->window)
{
+ GtkStyleContext *ctx;
+
selfp->window = gtk_window_new(GTK_WINDOW_POPUP);
+
+ ctx = gtk_widget_get_style_context(GTK_WIDGET(selfp->window));
+ gtk_style_context_add_class(ctx, "tooltip");
+
self_update_screen(self, TRUE);
gtk_widget_set_app_paintable(selfp->window, TRUE);
gtk_window_set_resizable(GTK_WINDOW(selfp->window), FALSE);
@@ -430,7 +430,7 @@
gtk_container_set_border_width(GTK_CONTAINER(selfp->window), selfp->border_width);
g_signal_connect_swapped(selfp->window,
- "expose-event",
+ "draw",
G_CALLBACK(self_paint_window),
self);
@@ -490,7 +490,7 @@
if (selfp->active_data
&& selfp->active_data->widget == widget
- && GTK_WIDGET_DRAWABLE(selfp->active_data->widget))
+ && gtk_widget_is_drawable(selfp->active_data->widget))
{
if (data->tip_widget)
g_object_unref(data->tip_widget);
@@ -594,7 +594,7 @@
#line 287 "src/mn-tooltips.gob"
static gboolean
-mn_tooltips_paint_window (MNTooltips * self)
+mn_tooltips_paint_window (MNTooltips * self, cairo_t *cr)
{
#line 600 "mn-tooltips.c"
#define __GOB_FUNCTION__ "MN:Tooltips::paint_window"
@@ -608,18 +608,13 @@
GtkRequisition req;
- gtk_widget_size_request(selfp->window, &req);
- gtk_paint_flat_box(selfp->window->style,
- selfp->window->window,
- GTK_STATE_NORMAL,
- GTK_SHADOW_OUT,
- NULL,
- selfp->window,
- "tooltip",
- 0,
- 0,
- req.width,
- req.height);
+ gtk_widget_size_request(GTK_WIDGET(selfp->window), &req);
+ gtk_render_background(gtk_widget_get_style_context(GTK_WIDGET(selfp->window)),
+ cr,
+ 0,
+ 0,
+ req.width,
+ req.height);
return FALSE;
}}
@@ -651,10 +650,11 @@
gint monitor_num, px, py;
GdkRectangle monitor;
int screen_width;
+ GtkAllocation allocation;
if (! selfp->window)
self_force_window(self);
- else if (GTK_WIDGET_VISIBLE(selfp->window))
+ else if (gtk_widget_get_visible(selfp->window))
g_get_current_time(&selfp->last_popdown);
gtk_widget_ensure_style(selfp->window);
@@ -670,7 +670,7 @@
data = selfp->active_data;
- child = GTK_BIN(selfp->window)->child;
+ child = gtk_bin_get_child(GTK_BIN(selfp->window));
if (child)
gtk_container_remove(GTK_CONTAINER(selfp->window), child);
@@ -684,14 +684,16 @@
w = requisition.width;
h = requisition.height;
- gdk_window_get_origin(widget->window, &x, &y);
- if (GTK_WIDGET_NO_WINDOW(widget))
+ gtk_widget_get_allocation(selfp->window, &allocation);
+
+ gdk_window_get_origin(gtk_widget_get_window(widget), &x, &y);
+ if (! gtk_widget_get_has_window(widget))
{
- x += widget->allocation.x;
- y += widget->allocation.y;
+ x += allocation.x;
+ y += allocation.y;
}
- x += widget->allocation.width / 2;
+ x += allocation.width / 2;
if (! keyboard_mode)
gdk_window_get_pointer(gdk_screen_get_root_window(screen), &x, NULL, NULL);
@@ -712,11 +714,11 @@
else if (x < monitor.x)
x = monitor.x;
- if ((y + h + widget->allocation.height + 4) > monitor.y + monitor.height
+ if ((y + h + allocation.height + 4) > monitor.y + monitor.height
&& (y - 4) > monitor.y)
y = y - h - 4;
else
- y = y + widget->allocation.height + 4;
+ y = y + allocation.height + 4;
/*
* The following block is not part of GTK+ and has been added to
@@ -760,7 +762,7 @@
Self *self = SELF(data);
- if (selfp->active_data && GTK_WIDGET_DRAWABLE(selfp->active_data->widget))
+ if (selfp->active_data && gtk_widget_is_drawable(selfp->active_data->widget))
self_draw_tips(self);
selfp->timeout_id = 0;
@@ -785,7 +787,7 @@
if (selfp->window)
{
- if (GTK_WIDGET_VISIBLE(selfp->window))
+ if (gtk_widget_get_visible(selfp->window))
g_get_current_time(&selfp->last_popdown);
gtk_widget_hide(selfp->window);
}
@@ -802,7 +804,7 @@
{
TooltipsData *data = l->data;
- if (data->widget == widget && GTK_WIDGET_DRAWABLE(widget))
+ if (data->widget == widget && gtk_widget_is_drawable(widget))
{
selfp->active_data = data;
break;
@@ -937,7 +939,7 @@
if (GTK_IS_WINDOW(toplevel))
{
- GtkWidget *focus = GTK_WINDOW(toplevel)->focus_widget;
+ GtkWidget *focus = gtk_window_get_focus(GTK_WINDOW(toplevel));
g_object_set_data(G_OBJECT(toplevel), TOOLTIPS_KEYBOARD_MODE, GINT_TO_POINTER(TRUE));
@@ -966,7 +968,7 @@
if (GTK_IS_WINDOW(toplevel))
{
- GtkWidget *focus = GTK_WINDOW(toplevel)->focus_widget;
+ GtkWidget *focus = gtk_window_get_focus(GTK_WINDOW(toplevel));
if (focus)
self_hide_tip(focus);
@@ -1057,24 +1059,24 @@
break;
case GDK_ENTER_NOTIFY:
- if (! (GTK_IS_MENU_ITEM(widget) && GTK_MENU_ITEM(widget)->submenu))
+ if (! (GTK_IS_MENU_ITEM(widget) && gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget))))
self_start_delay(self, widget);
break;
case GDK_LEAVE_NOTIFY:
self_set_active_widget(self, NULL);
- selfp->use_sticky_delay = selfp->window && GTK_WIDGET_VISIBLE(selfp->window);
+ selfp->use_sticky_delay = selfp->window && gtk_widget_get_visible(selfp->window);
break;
case GDK_MOTION_NOTIFY:
/* Handle menu items specially ... pend popup for each motion
* on other widgets, we ignore motion.
*/
- if (GTK_IS_MENU_ITEM(widget) && ! GTK_MENU_ITEM(widget)->submenu)
+ if (GTK_IS_MENU_ITEM(widget) && ! gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)))
{
/* Completely evil hack to make sure we get the LEAVE_NOTIFY
*/
- GTK_PRIVATE_SET_FLAG(widget, GTK_LEAVE_PENDING);
+ //GTK_PRIVATE_SET_FLAG(widget, GTK_LEAVE_PENDING);
self_set_active_widget(self, NULL);
self_start_delay(self, widget);
break;
--- src/nautilus-cell-renderer-pixbuf-emblem.c.orig 2011-02-08 00:16:43.847831409 +0100
+++ src/nautilus-cell-renderer-pixbuf-emblem.c 2011-02-08 00:32:59.128682767 +0100
@@ -39,17 +39,16 @@
GtkWidget *widget);
static void nautilus_cell_renderer_pixbuf_emblem_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
- GdkRectangle *rectangle,
+ const GdkRectangle *rectangle,
gint *x_offset,
gint *y_offset,
gint *width,
gint *height);
static void nautilus_cell_renderer_pixbuf_emblem_render (GtkCellRenderer *cell,
- GdkWindow *window,
+ cairo_t *cr,
GtkWidget *widget,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GdkRectangle *expose_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags);
enum {
@@ -356,7 +355,7 @@
static void
nautilus_cell_renderer_pixbuf_emblem_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
- GdkRectangle *cell_area,
+ const GdkRectangle *cell_area,
gint *x_offset,
gint *y_offset,
gint *width,
@@ -368,6 +367,10 @@
gint pixbuf_height = 0;
gint calc_width;
gint calc_height;
+ int xpad;
+ int ypad;
+ gfloat xalign;
+ gfloat yalign;
if (!cellpixbuf->pixbuf && cellinfo->stock_id)
nautilus_cell_renderer_pixbuf_emblem_create_stock_pixbuf (cellpixbuf, widget);
@@ -385,8 +388,11 @@
pixbuf_height = MAX (pixbuf_height, gdk_pixbuf_get_height (cellpixbuf->pixbuf_expander_closed));
}
- calc_width = (gint) cell->xpad * 2 + pixbuf_width;
- calc_height = (gint) cell->ypad * 2 + pixbuf_height;
+ gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
+ gtk_cell_renderer_get_alignment(cell, &xalign, &yalign);
+
+ calc_width = (gint) xpad * 2 + pixbuf_width;
+ calc_height = (gint) ypad * 2 + pixbuf_height;
if (x_offset) *x_offset = 0;
if (y_offset) *y_offset = 0;
@@ -394,14 +400,14 @@
if (cell_area && pixbuf_width > 0 && pixbuf_height > 0) {
if (x_offset) {
*x_offset = (((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ?
- 1.0 - cell->xalign : cell->xalign) *
- (cell_area->width - calc_width - 2 * cell->xpad));
- *x_offset = MAX (*x_offset, 0) + cell->xpad;
+ 1.0 - xalign : xalign) *
+ (cell_area->width - calc_width - 2 * xpad));
+ *x_offset = MAX (*x_offset, 0) + xpad;
}
if (y_offset) {
- *y_offset = (cell->yalign *
- (cell_area->height - calc_height - 2 * cell->ypad));
- *y_offset = MAX (*y_offset, 0) + cell->ypad;
+ *y_offset = (yalign *
+ (cell_area->height - calc_height - 2 * ypad));
+ *y_offset = MAX (*y_offset, 0) + ypad;
}
}
@@ -414,11 +420,10 @@
static void
nautilus_cell_renderer_pixbuf_emblem_render (GtkCellRenderer *cell,
- GdkWindow *window,
+ cairo_t *cr,
GtkWidget *widget,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GdkRectangle *expose_area,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
GtkCellRendererState flags)
{
@@ -429,13 +434,19 @@
GdkRectangle pix_emblem_rect;
GdkRectangle draw_rect;
gboolean stock_pixbuf = FALSE;
+ gboolean is_expander = FALSE;
+ gboolean is_expanded = FALSE;
+ int xpad;
+ int ypad;
+
+ g_object_get(cell, "is-expander", &is_expander, "is-expanded", &is_expanded, NULL);
pixbuf = cellpixbuf->pixbuf;
- if (cell->is_expander) {
- if (cell->is_expanded &&
+ if (is_expander) {
+ if (is_expanded &&
cellpixbuf->pixbuf_expander_open != NULL) {
pixbuf = cellpixbuf->pixbuf_expander_open;
- } else if (!cell->is_expanded &&
+ } else if (!is_expanded &&
cellpixbuf->pixbuf_expander_closed != NULL) {
pixbuf = cellpixbuf->pixbuf_expander_closed;
}
@@ -456,15 +467,20 @@
if (stock_pixbuf)
pixbuf = cellpixbuf->pixbuf;
+ gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
+
pix_rect.x += cell_area->x;
pix_rect.y += cell_area->y;
- pix_rect.width -= cell->xpad * 2;
- pix_rect.height -= cell->ypad * 2;
+ pix_rect.width -= xpad * 2;
+ pix_rect.height -= ypad * 2;
+ if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect)) {
+#if 0
if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect) &&
gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect)) {
+
gdk_draw_pixbuf (window,
- widget->style->black_gc,
+ gtk_widget_get_style(widget)->black_gc,
pixbuf,
/* pixbuf 0, 0 is at pix_rect.x, pix_rect.y */
draw_rect.x - pix_rect.x,
@@ -475,6 +491,11 @@
draw_rect.height,
GDK_RGB_DITHER_NORMAL,
0, 0);
+#endif
+
+ cairo_move_to (cr, draw_rect.x - pix_rect.x, draw_rect.y - pix_rect.y);
+ gdk_cairo_set_source_pixbuf (cr, pixbuf, draw_rect.x, draw_rect.y);
+ cairo_paint (cr);
}
if (cellpixbuf->pixbuf_emblem) {
@@ -482,8 +503,11 @@
pix_emblem_rect.height = gdk_pixbuf_get_height (cellpixbuf->pixbuf_emblem);
pix_emblem_rect.x = pix_rect.x;
pix_emblem_rect.y = pix_rect.y + pix_rect.height - pix_emblem_rect.height;
+ if (gdk_rectangle_intersect (cell_area, &pix_emblem_rect, &draw_rect)) {
+#if 0
if (gdk_rectangle_intersect (cell_area, &pix_emblem_rect, &draw_rect) &&
gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect)) {
+
gdk_draw_pixbuf (window,
widget->style->black_gc,
cellpixbuf->pixbuf_emblem,
@@ -496,6 +520,11 @@
draw_rect.height,
GDK_RGB_DITHER_NORMAL,
0, 0);
+#endif
+
+ cairo_move_to (cr, draw_rect.x - pix_emblem_rect.x, draw_rect.y - pix_emblem_rect.y);
+ gdk_cairo_set_source_pixbuf (cr, cellpixbuf->pixbuf_emblem, draw_rect.x, draw_rect.y);
+ cairo_paint (cr);
}
}
}
--- src/nautilus-cell-renderer-pixbuf-emblem.h.orig 2011-02-07 22:18:12.336471764 +0100
+++ src/nautilus-cell-renderer-pixbuf-emblem.h 2011-02-08 00:20:30.461758697 +0100
@@ -25,18 +25,18 @@
#ifndef NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_H
#define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_H
-#include <gtk/gtkcellrenderer.h>
+#include <gtk/gtk.h>
#define NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM \
(nautilus_cell_renderer_pixbuf_emblem_get_type ())
#define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM(obj) \
- (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblem))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblem))
#define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_CLASS(klass) \
- (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblemClass))
+ (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblemClass))
#define NAUTILUS_IS_CELL_RENDERER_PIXBUF_EMBLEM(obj) \
- (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
#define NAUTILUS_IS_CELL_RENDERER_PIXBUF_EMBLEM_CLASS(klass) \
- (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
typedef struct _NautilusCellRendererPixbufEmblem NautilusCellRendererPixbufEmblem;
typedef struct _NautilusCellRendererPixbufEmblemClass NautilusCellRendererPixbufEmblemClass;
--- build/src/mn-authenticated-mailbox.c.orig 2011-02-08 00:34:16.332610802 +0100
+++ build/src/mn-authenticated-mailbox.c 2011-02-08 00:36:23.706936717 +0100
@@ -25,7 +25,7 @@
#line 29 "src/mn-authenticated-mailbox.gob"
#include <glib/gi18n.h>
-#include <gnome.h>
+#include <libgnome/libgnome.h>
#include "mn-mailbox-private.h"
#include "mn-shell.h"
#include "mn-util.h"
@@ -859,6 +859,7 @@
/* keep the title in sync with gnome-authentication-manager */
+#if 0
/* translators: header capitalization */
selfp->auth_dialog = gnome_password_dialog_new(_("Authentication Required"),
message,
@@ -891,6 +892,9 @@
gtk_widget_destroy(selfp->auth_dialog);
return ok;
+#else
+ return FALSE;
+#endif
}}
#line 896 "mn-authenticated-mailbox.c"
#undef __GOB_FUNCTION__
--- build/src/mn-about-dialog.c.orig 2011-02-08 22:20:54.469841262 +0100
+++ build/src/mn-about-dialog.c 2011-02-08 22:21:13.309839037 +0100
@@ -111,9 +111,11 @@
{
#line 32 "src/mn-about-dialog.gob"
+#if 0
gtk_about_dialog_set_email_hook(self_activate_link_cb, "mailto:", NULL);
gtk_about_dialog_set_url_hook(self_activate_link_cb, NULL, NULL);
-
+#endif
+
#line 118 "mn-about-dialog.c"
}
}
--- build/src/mn-autodetect-mailbox-properties.c.orig 2011-02-08 22:21:58.639427345 +0100
+++ build/src/mn-autodetect-mailbox-properties.c 2011-02-08 22:22:43.564035901 +0100
@@ -355,10 +355,9 @@
toplevel = gtk_widget_get_toplevel(GTK_WIDGET(button));
/* translators: header capitalization */
- selfp->chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"),
+ selfp->chooser = gtk_file_chooser_dialog_new(_("Select a File or Folder"),
GTK_WINDOW(toplevel),
GTK_FILE_CHOOSER_ACTION_OPEN,
- "gnome-vfs",
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, 1,
NULL);
--- build/src/mn-pi-mailbox-properties.c.orig 2011-02-08 22:30:08.051375715 +0100
+++ build/src/mn-pi-mailbox-properties.c 2011-02-08 22:30:21.398665261 +0100
@@ -415,7 +415,7 @@
int i;
for (i = 0; i < MN_PI_MAILBOX_N_CONNECTION_TYPES; i++)
- 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])));
+ 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])));
g_object_notify(G_OBJECT(self), "complete");
}}
--- src/eggtrayicon.c.orig 2011-02-07 23:42:30.405791829 +0100
+++ src/eggtrayicon.c 2011-02-08 23:06:16.092968325 +0100
@@ -25,7 +25,7 @@
#include "eggtrayicon.h"
-#include <gdkconfig.h>
+#include <gdk/gdk.h>
#if defined (GDK_WINDOWING_X11)
#include <gdk/gdkx.h>
#include <X11/Xatom.h>
@@ -258,7 +258,7 @@
{
GdkWindow *gdkwin;
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
+ gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (widget),
icon->manager_window);
gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
@@ -290,7 +290,7 @@
ev.window = window;
ev.message_type = icon->system_tray_opcode_atom;
ev.format = 32;
- ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
+ ev.data.l[0] = gdk_x11_get_server_time (gtk_widget_get_window(GTK_WIDGET (icon)));
ev.data.l[1] = message;
ev.data.l[2] = data1;
ev.data.l[3] = data2;
@@ -342,12 +342,12 @@
{
GdkWindow *gdkwin;
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
+ gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
icon->manager_window);
gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
- if (dock_if_realized && GTK_WIDGET_REALIZED (icon))
+ if (dock_if_realized && gtk_widget_get_realized (GTK_WIDGET(icon)))
egg_tray_icon_send_dock_request (icon);
egg_tray_icon_get_orientation_property (icon);
@@ -355,10 +355,16 @@
}
static gboolean
-transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
+transparent_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
{
- gdk_window_clear_area (widget->window, event->area.x, event->area.y,
+#if 0
+ gdk_window_clear_area (gtk_widget_get_window(widget), event->area.x, event->area.y,
event->area.width, event->area.height);
+#endif
+ cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
+ //gdk_cairo_region (cr, event->region);
+ cairo_fill (cr);
+
return FALSE;
}
@@ -366,20 +372,20 @@
make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
gpointer user_data)
{
- gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+ //gdk_window_set_back_pixmap (gtk_widget_get_window(widget), NULL, TRUE);
}
static void
make_transparent (GtkWidget *widget, gpointer user_data)
{
- if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
+ if (! gtk_widget_get_has_window (widget) || gtk_widget_get_app_paintable (widget))
return;
gtk_widget_set_app_paintable (widget, TRUE);
gtk_widget_set_double_buffered (widget, FALSE);
- gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
- g_signal_connect (widget, "expose_event",
- G_CALLBACK (transparent_expose_event), NULL);
+ //gdk_window_set_back_pixmap (gtk_widget_get_window(widget), NULL, TRUE);
+ g_signal_connect (widget, "draw",
+ G_CALLBACK (transparent_draw), NULL);
g_signal_connect_after (widget, "style_set",
G_CALLBACK (make_transparent_again), NULL);
}
@@ -391,7 +397,7 @@
g_return_if_fail (icon->manager_window != None);
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
+ gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
icon->manager_window);
gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
--- build/src/mn-properties-dialog.c.orig 2011-02-08 23:37:12.605200174 +0100
+++ build/src/mn-properties-dialog.c 2011-02-08 23:37:18.601881191 +0100
@@ -183,7 +183,7 @@
GtkTreeSelection *selection;
mn_container_create_interface(GTK_CONTAINER(self),
- PKGDATADIR G_DIR_SEPARATOR_S "properties-dialog.glade",
+ PKGDATADIR G_DIR_SEPARATOR_S "properties-dialog.ui",
"main_vbox",
"mn_properties_dialog_",
"notebook", &selfp->notebook,
--- src/mn-util.c.orig 2011-02-08 00:01:25.167207512 +0100
+++ src/mn-util.c 2011-02-09 00:01:35.718285446 +0100
@@ -26,8 +26,7 @@
#include <gmodule.h>
#include <glib/gi18n.h>
#include <gobject/gvaluecollector.h>
-#include <gnome.h>
-#include <glade/glade.h>
+#include <libgnome/libgnome.h>
#include "mn-util.h"
#include "mn-mailboxes.h"
#include "mn-shell.h"
@@ -303,49 +302,55 @@
return pixbuf;
}
-static GladeXML *
+static GtkBuilder *
mn_glade_xml_new (const char *filename, const char *root, const char *domain)
{
- GladeXML *xml;
+ GtkBuilder *builder;
+ GError *err = NULL;
g_return_val_if_fail(filename != NULL, NULL);
- xml = glade_xml_new(filename, root, domain);
- if (! xml)
- mn_show_fatal_error_dialog(NULL, "Unable to load interface \"%s\".", filename);
+ builder = gtk_builder_new();
+ gtk_builder_set_translation_domain(builder, domain);
+ if (! gtk_builder_add_from_file(builder, filename, &err)) {
+ mn_show_fatal_error_dialog(NULL, "Unable to load interface \"%s\": %s.", filename, err->message);
+ g_error_free(err);
+ g_object_unref(builder);
+ return NULL;
+ }
- return xml;
+ return builder;
}
static GtkWidget *
-mn_glade_xml_get_widget (GladeXML *xml, const char *widget_name)
+mn_glade_xml_get_widget (GtkBuilder *builder, const char *widget_name)
{
GtkWidget *widget;
- g_return_val_if_fail(GLADE_IS_XML(xml), NULL);
+ g_return_val_if_fail(GTK_IS_BUILDER(builder), NULL);
g_return_val_if_fail(widget_name != NULL, NULL);
- widget = glade_xml_get_widget(xml, widget_name);
+ widget = GTK_WIDGET(gtk_builder_get_object(builder, widget_name));
if (! widget)
- mn_show_fatal_error_dialog(NULL, "Widget \"%s\" not found in interface \"%s\".", widget_name, xml->filename);
+ mn_show_fatal_error_dialog(NULL, "Widget \"%s\" not found in interface.", widget_name);
return widget;
}
static void
-create_interface_connect_cb (const char *handler_name,
+create_interface_connect_cb (GtkBuilder *builder,
GObject *object,
const char *signal_name,
- const char *signal_data,
+ const char *handler_name,
GObject *connect_object,
- gboolean after,
+ GConnectFlags flags,
gpointer user_data)
{
static GModule *module = NULL;
ContainerCreateInterfaceConnectInfo *info = user_data;
char *cb_name;
GCallback cb;
- GConnectFlags flags;
+ GConnectFlags cflags;
if (! module)
{
@@ -359,11 +364,9 @@
mn_show_fatal_error_dialog(NULL, "Signal handler \"%s\" not found.", cb_name);
g_free(cb_name);
- flags = G_CONNECT_SWAPPED;
- if (after)
- flags |= G_CONNECT_AFTER;
+ cflags = G_CONNECT_SWAPPED;
- g_signal_connect_data(object, signal_name, cb, info->container, NULL, flags);
+ g_signal_connect_data(object, signal_name, cb, info->container, NULL, cflags);
}
void
@@ -373,7 +376,7 @@
const char *callback_prefix,
...)
{
- GladeXML *xml;
+ GtkBuilder *xml;
GtkWidget *child;
ContainerCreateInterfaceConnectInfo info;
va_list args;
@@ -387,14 +390,16 @@
xml = mn_glade_xml_new(filename, child_name, NULL);
child = mn_glade_xml_get_widget(xml, child_name);
- if (GTK_IS_DIALOG(container))
- gtk_box_pack_start(GTK_BOX(GTK_DIALOG(container)->vbox), child, TRUE, TRUE, 0);
- else
+ if (GTK_IS_DIALOG(container)) {
+ gtk_widget_unparent(child);
+ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(container))), child, TRUE, TRUE, 0);
+ } else {
gtk_container_add(container, child);
+ }
info.container = container;
info.callback_prefix = callback_prefix;
- glade_xml_signal_autoconnect_full(xml, create_interface_connect_cb, &info);
+ gtk_builder_connect_signals_full(xml, create_interface_connect_cb, &info);
va_start(args, callback_prefix);
@@ -422,7 +427,7 @@
toplevel = gtk_widget_get_toplevel(widget);
- return GTK_WIDGET_TOPLEVEL(toplevel) ? GTK_WINDOW(toplevel) : NULL;
+ return gtk_widget_get_toplevel(toplevel) ? GTK_WINDOW(toplevel) : NULL;
}
static void
@@ -493,9 +498,11 @@
gpointer user_data)
{
GtkAdjustment *adjustment;
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(widget, &allocation);
adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(widget));
- gtk_adjustment_set_value(adjustment, (double) y / (widget->allocation.height - 2) * (adjustment->upper - adjustment->page_size));
+ gtk_adjustment_set_value(adjustment, (double) y / (allocation.height - 2) * (gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment)));
return TRUE; /* we're forcibly in a drop zone */
}
@@ -562,7 +569,7 @@
MNMailbox *mailbox;
/* text/x-moz-url is encoded in UCS-2 but in format 8: broken */
- if (selection_data->format != 8 || selection_data->length <= 0 || (selection_data->length % 2) != 0)
+ 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)
{
mn_show_error_dialog(mn_widget_get_parent_window(widget),
_("A drag and drop error has occurred"),
@@ -570,8 +577,8 @@
return;
}
- char_data = (const guint16 *) selection_data->data;
- char_len = selection_data->length / 2;
+ char_data = (const guint16 *) gtk_selection_data_get_data(selection_data);
+ char_len = gtk_selection_data_get_length(selection_data) / 2;
url = g_string_new(NULL);
for (i = 0; i < char_len && char_data[i] != '\n'; i++)
@@ -1322,7 +1329,7 @@
}
static void
-dialog_run_nonmodal_destroy_h (GtkObject *object, gpointer user_data)
+dialog_run_nonmodal_destroy_h (GtkWidget *object, gpointer user_data)
{
RunNonmodalInfo *info = user_data;
@@ -1375,7 +1382,7 @@
g_object_ref(dialog);
- if (! GTK_WIDGET_VISIBLE(dialog))
+ if (! gtk_widget_get_visible(dialog))
gtk_widget_show(GTK_WIDGET(dialog));
g_object_connect(dialog,
--- src/mn-main.c.gtk3 2008-05-22 17:45:35.000000000 +0200
+++ src/mn-main.c 2011-02-08 23:32:33.800030659 +0100
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <signal.h>
#include <glib/gi18n.h>
-#include <gnome.h>
+#include <libgnome/libgnome.h>
#include <libgnomevfs/gnome-vfs.h>
#include <libnotify/notify.h>
#include <dbus/dbus-glib-lowlevel.h>
@@ -452,7 +452,7 @@
gnome_program_init(PACKAGE,
VERSION,
- LIBGNOMEUI_MODULE,
+ LIBGNOME_MODULE,
argc,
argv,
GNOME_PARAM_HUMAN_READABLE_NAME, _("Mail Notification"),
@@ -460,6 +460,8 @@
GNOME_PARAM_GOPTION_CONTEXT, option_context,
NULL);
+ gtk_init(&argc, &argv);
+
if (arg_version)
{
print_version();
@@ -497,7 +499,9 @@
if (! gnome_vfs_init())
mn_show_fatal_error_dialog(NULL, _("Unable to initialize the GnomeVFS library."));
+#if 0
gnome_authentication_manager_init();
+#endif
/* must be called before init_gmime() */
mn_conf_init();
--- src/mn-conf.c.gtk3 2008-05-22 17:45:35.000000000 +0200
+++ src/mn-conf.c 2011-02-07 20:07:01.630580132 +0100
@@ -23,7 +23,7 @@
#include <errno.h>
#include <stdarg.h>
#include <glib/gi18n.h>
-#include <gnome.h>
+#include <libgnome/libgnome.h>
#include "mn-util.h"
#include "mn-conf.h"
#include "mn-shell.h"
--- data/mail-notification.desktop.in.orig 2011-07-08 13:46:52.327548264 +0200
+++ data/mail-notification.desktop.in 2011-07-08 13:47:00.732704467 +0200
@@ -5,7 +5,7 @@
_Comment=Get notified when new mail arrives
Type=Application
Categories=GNOME;GTK;Network;Email;
-Exec=mail-notification --sm-disable
+Exec=mail-notification
Terminal=false
StartupNotify=true
X-GNOME-DocPath=mail-notification/mail-notification.xml