Permalink
Browse files

Ported to GTK3

- Ported the package to use GTK3 (as that's used by evolution on F15)
- Replaced the libglade pieces by GtkBuilder
- Dropped the dependency on libgnomeui (but keep the libgnome dep for now)

Patch by Erik van Pienbroek
http://pkgs.fedoraproject.org/cgit/mail-notification.git/commit/?id=ea205ed45de5bc5645d9d1726d5359317b30d1d2
  • Loading branch information...
1 parent 1009557 commit fa576dafc67a3b2b4155bd6cb696f03c979ec6d6 @epienbroek committed Aug 20, 2012
View
@@ -164,7 +164,7 @@ jb_package_configure (void)
{
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",
View
@@ -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,8 +258,8 @@ egg_tray_icon_unrealize (GtkWidget *widget)
{
GdkWindow *gdkwin;
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
- icon->manager_window);
+ 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 @@ egg_tray_icon_send_manager_message (EggTrayIcon *icon,
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,44 +342,50 @@ egg_tray_icon_update_manager_window (EggTrayIcon *icon,
{
GdkWindow *gdkwin;
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
- icon->manager_window);
+ 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);
}
}
static gboolean
-transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
+transparent_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
{
+#if 0
gdk_window_clear_area (widget->window, 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;
}
static void
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 (widget->window, 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 (widget->window, 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,8 +397,8 @@ egg_tray_icon_manager_window_destroyed (EggTrayIcon *icon)
g_return_if_fail (icon->manager_window != None);
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
- icon->manager_window);
+ 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);
View
@@ -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
View
@@ -30,8 +30,10 @@ class MN:About:Dialog from Gtk:About:Dialog
{
class_init (class)
{
+#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
}
init (self)
@@ -28,7 +28,7 @@
%{
#include <glib/gi18n.h>
-#include <gnome.h>
+#include <libgnome/libgnome.h>
#include "mn-mailbox-private.h"
#include "mn-shell.h"
#include "mn-util.h"
@@ -377,6 +377,7 @@ class MN:Authenticated:Mailbox from MN:Mailbox (abstract)
/* keep the title in sync with gnome-authentication-manager */
+#if 0
/* translators: header capitalization */
selfp->auth_dialog = gnome_password_dialog_new(_("Authentication Required"),
message,
@@ -409,6 +410,9 @@ class MN:Authenticated:Mailbox from MN:Mailbox (abstract)
gtk_widget_destroy(selfp->auth_dialog);
return ok;
+#else
+ return FALSE;
+#endif
}
private void
@@ -166,10 +166,9 @@ class MN:Autodetect:Mailbox:Properties from MN:Mailbox:Properties
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);
View
@@ -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"
View
@@ -26,7 +26,6 @@ class MN:Dialog from Gtk:Dialog (abstract)
init (self)
{
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);
}
}
@@ -30,6 +30,7 @@ typedef EMailSession void;
%{
#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>
@@ -82,7 +83,7 @@ class MN:Evolution:Folder:Tree:Server from G:Object
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);
@@ -104,7 +105,7 @@ class MN:Evolution:Folder:Tree:Server from G:Object
}
private void
- plug_destroy_h (GtkObject *object, gpointer user_data)
+ plug_destroy_h (GtkWidget *object, gpointer user_data)
{
Self *self = user_data;
char *service;
@@ -38,7 +38,7 @@ typedef GtkFileChooserDialog *(*MNFileChooserButtonCreateDialogFunction) (gpoint
%{
#include <glib/gi18n.h>
-#include <gnome.h>
+#include <libgnome/libgnome.h>
#include "mn-util.h"
%}
@@ -127,7 +127,7 @@ class MN:File:Chooser:Button from Gtk:HBox
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;
@@ -211,6 +211,7 @@ class MN:File:Chooser:Button from Gtk:HBox
GDK_THREADS_ENTER();
+#if 0
if (results)
{
GnomeVFSGetFileInfoResult *result = results->data;
@@ -242,6 +243,7 @@ class MN:File:Chooser:Button from Gtk:HBox
}
}
}
+#endif
selfp->async_handle = NULL;
g_object_unref(self);
Oops, something went wrong.

0 comments on commit fa576da

Please sign in to comment.