summaryrefslogtreecommitdiff
path: root/trashapplet/src
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-22 17:47:06 +0300
committermonsta <[email protected]>2016-11-22 17:47:06 +0300
commitf7acf55db3ab4b97d60faae24555a07b6b08d43c (patch)
tree6feb99e63f801161642669b01c9ce0c217e60d0b /trashapplet/src
parent45354a60352e05eba7e66e24a171e713876d71e9 (diff)
downloadmate-applets-f7acf55db3ab4b97d60faae24555a07b6b08d43c.tar.bz2
mate-applets-f7acf55db3ab4b97d60faae24555a07b6b08d43c.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require mate-panel >= 1.17 WARNING: use GTK+3 build of libmateweather for this build. that lib is not migrated to GTK+3 only as we will possibly use libgweather instead of it.
Diffstat (limited to 'trashapplet/src')
-rw-r--r--trashapplet/src/trashapplet.c13
-rw-r--r--trashapplet/src/xstuff.c29
-rw-r--r--trashapplet/src/xstuff.h3
3 files changed, 2 insertions, 43 deletions
diff --git a/trashapplet/src/trashapplet.c b/trashapplet/src/trashapplet.c
index e406dfb2..3d56d013 100644
--- a/trashapplet/src/trashapplet.c
+++ b/trashapplet/src/trashapplet.c
@@ -36,11 +36,6 @@
#include "trash-empty.h"
#include "xstuff.h"
-#if GTK_CHECK_VERSION (3, 0, 0)
-#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
-#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
-#endif
-
typedef MatePanelAppletClass TrashAppletClass;
typedef struct
@@ -469,7 +464,7 @@ confirm_delete_immediately (GtkWidget *parent_view,
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
- hbox = gtk_hbox_new (FALSE, 12);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), hbox,
@@ -477,16 +472,12 @@ confirm_delete_immediately (GtkWidget *parent_view,
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION,
GTK_ICON_SIZE_DIALOG);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
gtk_widget_set_valign (image, GTK_ALIGN_START);
-#else
- gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
-#endif
gtk_widget_show (image);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- vbox = gtk_vbox_new (FALSE, 12);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
diff --git a/trashapplet/src/xstuff.c b/trashapplet/src/xstuff.c
index c8b181c5..ccd26cc4 100644
--- a/trashapplet/src/xstuff.c
+++ b/trashapplet/src/xstuff.c
@@ -177,14 +177,6 @@ xstuff_is_compliant_wm (void)
return TRUE;
}
-#if !GTK_CHECK_VERSION (3, 0, 0)
-gboolean
-xstuff_net_wm_supports (const char *hint)
-{
- return gdk_net_wm_supports (gdk_atom_intern (hint, FALSE));
-}
-#endif
-
void
xstuff_set_no_group (GdkWindow *win)
{
@@ -250,12 +242,7 @@ xstuff_set_pos_size (GdkWindow *window, int x, int y, int w, int h)
gdk_window_move_resize (window, x, y, w, h);
-#if GTK_CHECK_VERSION (3, 0, 0)
gdk_error_trap_pop_ignored ();
-#else
- gdk_flush ();
- gdk_error_trap_pop ();
-#endif
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));
@@ -343,17 +330,9 @@ draw_zoom_animation (GdkScreen *gscreen,
dpy = gdk_x11_display_get_xdisplay (gdk_screen_get_display (gscreen));
root_win = GDK_WINDOW_XID (gdk_screen_get_root_window (gscreen));
screen = gdk_screen_get_number (gscreen);
-#if GTK_CHECK_VERSION (3, 0, 0)
depth = DefaultDepth(dpy,screen);
-#else
- depth = gdk_drawable_get_depth (gdk_screen_get_root_window (gscreen));
-#endif
/* frame GC */
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gdk_colormap_alloc_color (
- gdk_screen_get_system_colormap (gscreen), &color, FALSE, TRUE);
-#endif
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
@@ -444,10 +423,6 @@ draw_zoom_animation (GdkScreen *gscreen,
XUngrabServer(dpy);
XFreeGC (dpy, frame_gc);
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gdk_colormap_free_colors (gdk_screen_get_system_colormap (gscreen),
- &color, 1);
-#endif
}
#undef FRAMES
@@ -529,11 +504,7 @@ xstuff_grab_key_on_all_screens (int keycode,
int i;
display = gdk_display_get_default ();
-#if GTK_CHECK_VERSION(3, 0, 0)
n_screens = 1; /* gdk-3.10, The number of screens is always 1 */
-#else
- n_screens = gdk_display_get_n_screens (display);
-#endif
for (i = 0; i < n_screens; i++) {
GdkWindow *root;
diff --git a/trashapplet/src/xstuff.h b/trashapplet/src/xstuff.h
index 6bc1e835..5791cafa 100644
--- a/trashapplet/src/xstuff.h
+++ b/trashapplet/src/xstuff.h
@@ -7,9 +7,6 @@
void xstuff_delete_property (GdkWindow *window,
const char *name);
gboolean xstuff_is_compliant_wm (void);
-#if !GTK_CHECK_VERSION (3, 0, 0)
-gboolean xstuff_net_wm_supports (const char *hint);
-#endif
void xstuff_set_no_group (GdkWindow *win);