summaryrefslogtreecommitdiff
path: root/drivemount/drive-list.c
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 /drivemount/drive-list.c
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 'drivemount/drive-list.c')
-rw-r--r--drivemount/drive-list.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/drivemount/drive-list.c b/drivemount/drive-list.c
index a1018398..78dd2e66 100644
--- a/drivemount/drive-list.c
+++ b/drivemount/drive-list.c
@@ -30,11 +30,7 @@
#include "drive-button.h"
#include <glib/gi18n.h>
-#if GTK_CHECK_VERSION(3, 0, 0)
G_DEFINE_TYPE (DriveList, drive_list, GTK_TYPE_GRID);
-#else
-G_DEFINE_TYPE (DriveList, drive_list, GTK_TYPE_TABLE);
-#endif
static GVolumeMonitor *volume_monitor = NULL;
@@ -84,12 +80,8 @@ drive_list_init (DriveList *self)
{
GList *volumes, *mounts, *tmp;
-#if GTK_CHECK_VERSION(3, 0, 0)
gtk_grid_set_column_homogeneous (GTK_GRID (self), TRUE);
gtk_grid_set_row_homogeneous (GTK_GRID (self), TRUE);
-#else
- gtk_table_set_homogeneous (GTK_TABLE (self), TRUE);
-#endif
self->volumes = g_hash_table_new (NULL, NULL);
self->mounts = g_hash_table_new (NULL, NULL);
@@ -248,36 +240,16 @@ relayout_buttons (gpointer data)
if (self->orientation == GTK_ORIENTATION_HORIZONTAL) {
gtk_container_child_set (GTK_CONTAINER (self), button,
-#if GTK_CHECK_VERSION(3, 0, 0)
"left-attach", i + 1, "top-attach", 0,
"width", 1, "height", 1,
NULL);
-#else
- "left_attach", i, "right_attach", i+1,
- "top_attach", 0, "bottom_attach", 1,
- "x_options", GTK_FILL,
- "y_options", GTK_FILL,
- NULL);
-#endif
} else {
gtk_container_child_set (GTK_CONTAINER (self), button,
-#if GTK_CHECK_VERSION(3, 0, 0)
"left-attach", 0, "top-attach", i + 1,
"width", 1, "height", 1,
NULL);
-#else
- "left_attach", 0, "right_attach", 1,
- "top_attach", i, "bottom_attach", i+1,
- "x_options", GTK_FILL,
- "y_options", GTK_FILL,
- NULL);
-#endif
}
}
-#if !GTK_CHECK_VERSION(3, 0, 0)
- /* shrink wrap the table */
- gtk_table_resize (GTK_TABLE (self), 1, 1);
-#endif
return FALSE;
}