[gnome-applets/gtk3: 18/23] trashapplet: Fix the build with gtk3
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/gtk3: 18/23] trashapplet: Fix the build with gtk3
- Date: Thu, 28 Oct 2010 13:09:58 +0000 (UTC)
commit 229c351e30fcce82368ebe2cc69a741f38364ab0
Author: Christian Persch <chpe gnome org>
Date: Thu Oct 28 14:48:00 2010 +0200
trashapplet: Fix the build with gtk3
trashapplet/Makefile.am | 2 +-
trashapplet/src/Makefile.am | 2 +-
trashapplet/src/trashapplet.c | 15 +++++++--------
trashapplet/src/xstuff.c | 11 +++--------
4 files changed, 12 insertions(+), 18 deletions(-)
---
diff --git a/trashapplet/Makefile.am b/trashapplet/Makefile.am
index b47ff9c..73d780b 100644
--- a/trashapplet/Makefile.am
+++ b/trashapplet/Makefile.am
@@ -21,7 +21,7 @@ org.gnome.panel.applet.TrashAppletFactory.service: $(service_in_files)
-e "s|\ LIBEXECDIR\@|$(libexecdir)|" \
$< > $@
-uidir = $(datadir)/gnome-2.0/ui
+uidir = $(pkgdatadir)/ui
ui_DATA = trashapplet-menu.xml
builder_DATA = trashapplet-empty-progress.ui
diff --git a/trashapplet/src/Makefile.am b/trashapplet/src/Makefile.am
index 52da653..34523d1 100644
--- a/trashapplet/src/Makefile.am
+++ b/trashapplet/src/Makefile.am
@@ -1,7 +1,7 @@
INCLUDES = -I$(top_srcdir) \
$(GNOME_APPLETS3_CFLAGS) \
$(GIO_CFLAGS) \
- -DTRASH_MENU_UI_DIR=\""$(datadir)/gnome-2.0/ui"\"
+ -DTRASH_MENU_UI_DIR=\""$(pkgdatadir)/ui"\"
libexec_PROGRAMS = trashapplet
diff --git a/trashapplet/src/trashapplet.c b/trashapplet/src/trashapplet.c
index 3013912..b9e1814 100644
--- a/trashapplet/src/trashapplet.c
+++ b/trashapplet/src/trashapplet.c
@@ -278,12 +278,12 @@ trash_applet_key_press (GtkWidget *widget,
switch (event->keyval)
{
- case GDK_KP_Enter:
- case GDK_ISO_Enter:
- case GDK_3270_Enter:
- case GDK_Return:
- case GDK_space:
- case GDK_KP_Space:
+ case GDK_KEY_KP_Enter:
+ case GDK_KEY_ISO_Enter:
+ case GDK_KEY_3270_Enter:
+ case GDK_KEY_Return:
+ case GDK_KEY_space:
+ case GDK_KEY_KP_Space:
trash_applet_open_folder (NULL, applet);
return TRUE;
@@ -308,7 +308,7 @@ trash_applet_drag_motion (GtkWidget *widget,
GList *target;
/* refuse drops of panel applets */
- for (target = context->targets; target; target = target->next)
+ for (target = gdk_drag_context_list_targets (context); target; target = target->next)
{
const char *name = gdk_atom_name (target->data);
@@ -449,7 +449,6 @@ confirm_delete_immediately (GtkWidget *parent_view,
gtk_window_set_screen (GTK_WINDOW (dialog), screen);
atk_object_set_role (gtk_widget_get_accessible (dialog), ATK_ROLE_ALERT);
gtk_window_set_title (GTK_WINDOW (dialog), _("Delete Immediately?"));
- gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
diff --git a/trashapplet/src/xstuff.c b/trashapplet/src/xstuff.c
index 3bc3aac..b11582d 100644
--- a/trashapplet/src/xstuff.c
+++ b/trashapplet/src/xstuff.c
@@ -248,8 +248,7 @@ xstuff_set_pos_size (GdkWindow *window, int x, int y, int w, int h)
gdk_window_move_resize (window, x, y, w, h);
- gdk_flush ();
- gdk_error_trap_pop ();
+ gdk_error_trap_pop_ignored ();
g_object_set_data (G_OBJECT (window), "xstuff-cached-x", GINT_TO_POINTER (x));
g_object_set_data (G_OBJECT (window), "xstuff-cached-y", GINT_TO_POINTER (y));
@@ -337,11 +336,9 @@ draw_zoom_animation (GdkScreen *gscreen,
dpy = gdk_x11_display_get_xdisplay (gdk_screen_get_display (gscreen));
root_win = gdk_x11_drawable_get_xid (gdk_screen_get_root_window (gscreen));
screen = gdk_screen_get_number (gscreen);
- depth = gdk_drawable_get_depth (gdk_screen_get_root_window (gscreen));
+ depth = DefaultDepth(dpy,screen);
/* frame GC */
- gdk_colormap_alloc_color (
- gdk_screen_get_system_colormap (gscreen), &color, FALSE, TRUE);
gcv.function = GXxor;
/* this will raise the probability of the XORed color being different
* of the original color in PseudoColor when not all color cells are
@@ -432,8 +429,6 @@ draw_zoom_animation (GdkScreen *gscreen,
XUngrabServer(dpy);
XFreeGC (dpy, frame_gc);
- gdk_colormap_free_colors (gdk_screen_get_system_colormap (gscreen),
- &color, 1);
}
#undef FRAMES
@@ -484,7 +479,7 @@ xstuff_get_current_workspace (GdkScreen *screen)
gdk_screen_get_root_window (screen));
gdk_error_trap_push ();
- result = XGetWindowProperty (gdk_display,
+ result = XGetWindowProperty (GDK_SCREEN_XDISPLAY (screen),
root_window,
panel_atom_get ("_NET_CURRENT_DESKTOP"),
0, G_MAXLONG,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]