summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-23 16:49:28 +0300
committermonsta <[email protected]>2016-11-23 16:49:28 +0300
commit44fed6ba67c2a0488d0a1e0b1a5194005706347b (patch)
treee270d5ae7a06e0bc4ac8bd37251799c6232d3ae3
parent95984871537b4703b98419998ae2b8beb932b386 (diff)
downloadmate-user-share-44fed6ba67c2a0488d0a1e0b1a5194005706347b.tar.bz2
mate-user-share-44fed6ba67c2a0488d0a1e0b1a5194005706347b.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require caja >= 1.17.1
-rw-r--r--Makefile.am3
-rw-r--r--NEWS2
-rw-r--r--configure.ac44
-rw-r--r--src/caja-share-bar.c4
-rw-r--r--src/file-share-properties.c59
5 files changed, 9 insertions, 103 deletions
diff --git a/Makefile.am b/Makefile.am
index cea5ae5..5ed23e2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,8 +13,7 @@ DISTCLEANFILES = \
intltool-update
DISTCHECK_CONFIGURE_FLAGS = --disable-schemas-install \
- --with-cajadir='$${libdir}/caja/extensions-2.0-distcheck' \
- --with-gtk=$(GTK_API_VERSION)
+ --with-cajadir='$${libdir}/caja/extensions-2.0-distcheck'
# Build ChangeLog from GIT history
ChangeLog:
diff --git a/NEWS b/NEWS
index 6b6b20b..950a6bc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+1.17.0
+
1.16.0
* Build: use 'm4' dir for m4 macros, like in other projects
* GTK+3: port from libunique to GtkApplication
diff --git a/configure.ac b/configure.ac
index c98a465..1174f01 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT(mate-user-share, 1.16.0)
+AC_INIT(mate-user-share, 1.17.0)
AC_CONFIG_MACRO_DIR([m4])
@@ -62,44 +62,16 @@ else
fi
AM_CONDITIONAL(USE_BLUETOOTH, [test "$enable_bluetooth" = "yes"])
-dnl ==========================================================================
-
-AC_MSG_CHECKING([which gtk+ version to compile against])
-AC_ARG_WITH([gtk],
- [AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])],
- [case "$with_gtk" in
- 2.0|3.0) ;;
- *) AC_MSG_ERROR([invalid gtk version specified]) ;;
- esac],
- [with_gtk=2.0])
-AC_MSG_RESULT([$with_gtk])
-
-case "$with_gtk" in
- 2.0) GTK_API_VERSION=2.0
- GTK_REQUIRED_VERSION=2.24.0
- CANBERRA_API_VERSION=
- UNIQUE_API_VERSION=1.0
- ;;
- 3.0) GTK_API_VERSION=3.0
- GTK_REQUIRED_VERSION=3.0.0
- CANBERRA_API_VERSION=3
- ;;
-esac
-
-AC_SUBST(GTK_API_VERSION)
+GLIB_REQUIRED_VERSION=2.36.0
+GTK_REQUIRED_VERSION=3.14.0
dnl ==========================================================================
-PKG_CHECK_MODULES(USER_SHARE, glib-2.0 >= 2.15.2 gio-2.0 >= 2.26 gdk-x11-$GTK_API_VERSION gtk+-$GTK_API_VERSION dbus-glib-1 libnotify >= 0.7.0 libcanberra-gtk$CANBERRA_API_VERSION $BLUETOOTH_PKG)
+PKG_CHECK_MODULES(USER_SHARE, glib-2.0 >= $GLIB_REQUIRED_VERSION gio-2.0 gdk-x11-3.0 gtk+-3.0 >= $GTK_REQUIRED_VERSION dbus-glib-1 libnotify >= 0.7.0 libcanberra-gtk3 $BLUETOOTH_PKG)
AC_SUBST(USER_SHARE_CFLAGS)
AC_SUBST(USER_SHARE_LIBS)
-if test "$GTK_REQUIRED_VERSION" = "3.0.0"; then
- PKG_CHECK_MODULES(USER_SHARE_CONFIG, glib-2.0 >= 2.15.2 gio-2.0 >= 2.25.0 gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION)
-else
- PKG_CHECK_MODULES(USER_SHARE_CONFIG, glib-2.0 >= 2.15.2 gio-2.0 >= 2.25.0 gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION unique-$UNIQUE_API_VERSION)
-fi
-
+PKG_CHECK_MODULES(USER_SHARE_CONFIG, glib-2.0 >= $GLIB_REQUIRED_VERSION gio-2.0 gtk+-3.0 >= $GTK_REQUIRED_VERSION)
AC_SUBST(USER_SHARE_CONFIG_CFLAGS)
AC_SUBST(USER_SHARE_CONFIG_LIBS)
@@ -144,7 +116,6 @@ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],"$GETTEXT_PACKAGE", [The gettext package])
AM_GLIB_GNU_GETTEXT
-
dnl ==========================================================================
dnl Check for SELinux
@@ -155,8 +126,6 @@ AC_SUBST(SELINUX_LIBS)
dnl ==========================================================================
dnl Check for the HTTPD modules path
-
-
AC_ARG_WITH([modules-path],
[AS_HELP_STRING([--with-modules-path],[Path where the httpd modules are located (default: /etc/httpd/modules/)])],
[with_modules_path=$withval])
@@ -173,7 +142,7 @@ AC_ARG_WITH(cajadir,
[ac_with_cajadir=""])
PKG_CHECK_MODULES(EXTENSION,
- libcaja-extension $BLUETOOTH_PKG)
+ libcaja-extension >= 1.17.1 $BLUETOOTH_PKG)
if test "${ac_with_cajadir}" = ""; then
ac_with_cajadir=`pkg-config --variable=extensiondir libcaja-extension`
fi
@@ -255,7 +224,6 @@ AC_MSG_NOTICE([mate-user-share was configured with the following options:])
AC_MSG_NOTICE([** httpd location: $HTTP])
AC_MSG_NOTICE([** httpd modules path: $MODULES_PATH])
AC_MSG_NOTICE([** caja extension path: $ac_with_cajadir])
-AC_MSG_NOTICE([** GTK version: $GTK_API_VERSION])
echo "
Do note Apache >= 2.2 and mod_dnssd 0.6 are required to use mate-user-share.
diff --git a/src/caja-share-bar.c b/src/caja-share-bar.c
index 4283b4e..8a0de08 100644
--- a/src/caja-share-bar.c
+++ b/src/caja-share-bar.c
@@ -95,11 +95,7 @@ caja_share_bar_init (CajaShareBar *bar)
action_area = gtk_info_bar_get_action_area (GTK_INFO_BAR (bar));
gtk_button_box_set_layout (GTK_BUTTON_BOX (action_area), GTK_BUTTONBOX_CENTER);
-#if GTK_CHECK_VERSION (3, 0, 0)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
-#else
- vbox = gtk_vbox_new (FALSE, 3);
-#endif
gtk_container_add (GTK_CONTAINER (content_area), vbox);
attrs = pango_attr_list_new ();
diff --git a/src/file-share-properties.c b/src/file-share-properties.c
index b42a1bc..4631981 100644
--- a/src/file-share-properties.c
+++ b/src/file-share-properties.c
@@ -29,9 +29,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
-#if !GTK_CHECK_VERSION (3, 0, 0)
-#include <unique/uniqueapp.h>
-#endif
#include "user_share-private.h"
@@ -453,25 +450,8 @@ help_button_clicked (GtkButton *button, GtkWidget *window)
}
}
-#if GTK_CHECK_VERSION (3, 0, 0)
static GtkWidget *
create_window (void)
-#else
-static UniqueResponse
-message_received_cb (UniqueApp *app,
- int command,
- UniqueMessageData *message_data,
- guint time_,
- gpointer user_data)
-{
- gtk_window_present (GTK_WINDOW (user_data));
-
- return UNIQUE_RESPONSE_OK;
-}
-
-int
-main (int argc, char *argv[])
-#endif
{
GError *error = NULL;
GSettings *settings;
@@ -490,22 +470,6 @@ main (int argc, char *argv[])
GtkListStore *store;
GtkCellRenderer *cell;
GtkTreeIter iter;
-#if !GTK_CHECK_VERSION (3, 0, 0)
- UniqueApp *app;
-
- bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gtk_init (&argc, &argv);
-
- app = unique_app_new ("org.mate.user-share.properties", NULL);
- if (unique_app_is_running (app)) {
- gdk_notify_startup_complete ();
- unique_app_send_message (app, UNIQUE_ACTIVATE, NULL);
- return 0;
- }
-#endif
builder = gtk_builder_new ();
gtk_builder_add_from_file (builder, DATADIR"file-share-properties.ui", &error);
@@ -518,20 +482,10 @@ main (int argc, char *argv[])
gtk_widget_destroy (dialog);
g_error_free (error);
-#if GTK_CHECK_VERSION (3, 0, 0)
return NULL;
-#else
- return 1;
-#endif
}
window = GTK_WIDGET (gtk_builder_get_object (builder, "user_share_dialog"));
-#if !GTK_CHECK_VERSION (3, 0, 0)
- g_signal_connect (G_OBJECT (window), "delete_event",
- G_CALLBACK (gtk_main_quit), NULL);
- g_signal_connect (app, "message-received",
- G_CALLBACK (message_received_cb), window);
-#endif
settings = g_settings_new (GSETTINGS_SCHEMA);
@@ -621,13 +575,8 @@ main (int argc, char *argv[])
"toggled", G_CALLBACK (notify_received_obexpush_check_toggled), NULL);
#endif /* HAVE_BLUETOOTH */
-#if GTK_CHECK_VERSION (3, 0, 0)
g_signal_connect_swapped (GTK_WIDGET (gtk_builder_get_object (builder, "close_button")),
"clicked", G_CALLBACK (gtk_widget_destroy), window);
-#else
- g_signal_connect (GTK_WIDGET (gtk_builder_get_object (builder, "close_button")),
- "clicked", G_CALLBACK (gtk_main_quit), NULL);
-#endif
g_signal_connect (GTK_WIDGET (gtk_builder_get_object (builder, "help_button")),
"clicked", G_CALLBACK (help_button_clicked),
gtk_builder_get_object (builder, "user_share_dialog"));
@@ -661,7 +610,6 @@ main (int argc, char *argv[])
update_ui ();
-#if GTK_CHECK_VERSION (3, 0, 0)
return window;
}
@@ -701,11 +649,4 @@ main (int argc, char *argv[])
g_object_unref (app);
return status;
-#else
- gtk_widget_show (GTK_WIDGET (gtk_builder_get_object (builder, "user_share_dialog")));
-
- gtk_main ();
-
- return 0;
-#endif
}