[gnome-applets] geyes: Fix build with gtk3



commit 34943436d2c04d5c9f08fe95b737d263f89a9d18
Author: Christian Persch <chpe gnome org>
Date:   Thu Oct 28 14:31:19 2010 +0200

    geyes: Fix build with gtk3

 geyes/Makefile.am |    2 +-
 geyes/geyes.c     |   50 +++-----------------------------------------------
 geyes/themes.c    |    3 ---
 3 files changed, 4 insertions(+), 51 deletions(-)
---
diff --git a/geyes/Makefile.am b/geyes/Makefile.am
index 7668b4c..9b76d77 100644
--- a/geyes/Makefile.am
+++ b/geyes/Makefile.am
@@ -41,7 +41,7 @@ org.gnome.panel.applet.GeyesAppletFactory.service: $(service_in_files)
 
 CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA) $(schemas_DATA)
 
-uidir = $(datadir)/gnome-2.0/ui
+uidir = $(pkgdatadir)/ui
 ui_DATA = geyes-applet-menu.xml
 
 schemasdir   = @GCONF_SCHEMA_FILE_DIR@
diff --git a/geyes/geyes.c b/geyes/geyes.c
index ec8c92b..fcafede 100644
--- a/geyes/geyes.c
+++ b/geyes/geyes.c
@@ -26,49 +26,6 @@
 
 #define UPDATE_TIMEOUT 100
 
-static void
-applet_back_change (PanelApplet			*a,
-		    PanelAppletBackgroundType	type,
-		    GdkColor			*color,
-		    GdkPixmap			*pixmap,
-		    EyesApplet			*eyes_applet) 
-{
-        /* taken from the TrashApplet */
-        GtkRcStyle *rc_style;
-        GtkStyle *style;
-
-        /* reset style */
-        gtk_widget_set_style (GTK_WIDGET (eyes_applet->applet), NULL);
-        rc_style = gtk_rc_style_new ();
-        gtk_widget_modify_style (GTK_WIDGET (eyes_applet->applet), rc_style);
-        g_object_unref (rc_style);
-
-        switch (type) {
-                case PANEL_COLOR_BACKGROUND:
-                        gtk_widget_modify_bg (GTK_WIDGET (eyes_applet->applet),
-                                        GTK_STATE_NORMAL, color);
-                        break;
-
-                case PANEL_PIXMAP_BACKGROUND:
-                        style = gtk_style_copy (gtk_widget_get_style (GTK_WIDGET (
-						eyes_applet->applet)));
-                        if (style->bg_pixmap[GTK_STATE_NORMAL])
-                                g_object_unref
-                                        (style->bg_pixmap[GTK_STATE_NORMAL]);
-                        style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref
-                                (pixmap);
-                        gtk_widget_set_style (GTK_WIDGET (eyes_applet->applet),
-                                        style);
-                        g_object_unref (style);
-                        break;
-
-                case PANEL_NO_BACKGROUND:
-                default:
-                        break;
-        }
-
-}
-
 /* TODO - Optimize this a bit */
 static void 
 calculate_pupil_xy (EyesApplet *eyes_applet,
@@ -424,10 +381,9 @@ geyes_applet_fill (PanelApplet *applet)
 	set_atk_name_description (GTK_WIDGET (eyes_applet->applet), _("Eyes"), 
 			_("The eyes look in the direction of the mouse pointer"));
 
-	g_signal_connect (eyes_applet->applet,
-			  "change_background",
-			  G_CALLBACK (applet_back_change),
-			  eyes_applet);
+        /* FIXMEchpe this is a bit weird; make this cleaner in libpanel-applet? */
+        panel_applet_set_background_widget (eyes_applet->applet, eyes_applet->applet);
+
 	g_signal_connect (eyes_applet->vbox,
 			  "destroy",
 			  G_CALLBACK (destroy_cb),
diff --git a/geyes/themes.c b/geyes/themes.c
index a265aa3..78d3efd 100644
--- a/geyes/themes.c
+++ b/geyes/themes.c
@@ -127,8 +127,6 @@ load_theme (EyesApplet *eyes_applet, const gchar *theme_dir)
 				_("Can not launch the eyes applet."),
 				_("There was a fatal error while trying to load the theme."));
 
-		gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
-
 		gtk_dialog_run (GTK_DIALOG (dialog));
 		gtk_widget_destroy (dialog);
 
@@ -311,7 +309,6 @@ properties_cb (GtkAction  *action,
         
 	gtk_widget_set_size_request (GTK_WIDGET (pbox), 300, 200);
         gtk_dialog_set_default_response(GTK_DIALOG (pbox), GTK_RESPONSE_CLOSE);
-        gtk_dialog_set_has_separator (GTK_DIALOG (pbox), FALSE);
         gtk_container_set_border_width (GTK_CONTAINER (pbox), 5);
 	gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (pbox))), 2);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]