[gnome-applets] drivemount: Fix build with gtk3



commit 71f00ef594e09ece5f735a4599143b7b74262f85
Author: Christian Persch <chpe gnome org>
Date:   Thu Oct 28 14:23:19 2010 +0200

    drivemount: Fix build with gtk3

 drivemount/Makefile.am    |    2 +-
 drivemount/drive-button.c |    8 ++++----
 drivemount/drivemount.c   |   19 ++++---------------
 3 files changed, 9 insertions(+), 20 deletions(-)
---
diff --git a/drivemount/Makefile.am b/drivemount/Makefile.am
index 3699281..5d92e03 100644
--- a/drivemount/Makefile.am
+++ b/drivemount/Makefile.am
@@ -40,7 +40,7 @@ org.gnome.panel.applet.DriveMountAppletFactory.service: $(service_in_files)
             -e "s|\ LIBEXECDIR\@|$(libexecdir)|" \
             $< > $@
 
-uidir = $(datadir)/gnome-2.0/ui
+uidir = $(pkgdatadir)/ui
 ui_DATA = drivemount-applet-menu.xml
 
 schemasdir   = $(GCONF_SCHEMA_FILE_DIR)
diff --git a/drivemount/drive-button.c b/drivemount/drive-button.c
index 0a01741..10bbeb0 100644
--- a/drivemount/drive-button.c
+++ b/drivemount/drive-button.c
@@ -244,10 +244,10 @@ drive_button_key_press (GtkWidget      *widget,
     DriveButton *self = DRIVE_BUTTON (widget);
 
     switch (event->keyval) {
-    case GDK_KP_Space:
-    case GDK_space:
-    case GDK_KP_Enter:
-    case GDK_Return:
+    case GDK_KEY_KP_Space:
+    case GDK_KEY_space:
+    case GDK_KEY_KP_Enter:
+    case GDK_KEY_Return:
 	drive_button_ensure_popup (self);
 	if (self->popup_menu) {
 	    gtk_menu_popup (GTK_MENU (self->popup_menu), NULL, NULL,
diff --git a/drivemount/drivemount.c b/drivemount/drivemount.c
index 2d09325..9cce90a 100644
--- a/drivemount/drivemount.c
+++ b/drivemount/drivemount.c
@@ -76,22 +76,11 @@ size_allocate (PanelApplet  *applet,
 }
 
 static void
-change_background (PanelApplet               *applet,
-		   PanelAppletBackgroundType  type,
-		   GdkColor                  *colour,
-		   GdkPixmap                 *pixmap,
-		   DriveList                 *drivelist)
+change_background (PanelApplet     *applet,
+                   cairo_pattern_t *pattern,
+		   DriveList       *drivelist)
 {
-    switch (type) {
-    case PANEL_NO_BACKGROUND:
-	drive_list_set_transparent (drivelist, FALSE);
-	break;
-
-    case PANEL_COLOR_BACKGROUND:
-    case PANEL_PIXMAP_BACKGROUND:
-	drive_list_set_transparent (drivelist, TRUE);
-	break;
-    }
+    drive_list_set_transparent (drivelist, pattern != NULL);
 }
 
 static void



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