diff --git a/gnome/configure.ac b/gnome/configure.ac index d1121accb46bad9d0ec3444d7b585c96a9f7fd1b..f46b919e3aeadedf0e5944d9cf1ffe5ea0f170fa 100644 --- a/gnome/configure.ac +++ b/gnome/configure.ac @@ -38,10 +38,9 @@ AS_IF([test "x$enable_video" = "xyes"], [ AM_CONDITIONAL(SFL_VIDEO, test "x$enable_video" = "xyes") -# Check for gtk+-3.0, otherwise check for gtk+-2.0 (and gthread) +# Check for gtk+-3.0 PKG_CHECK_MODULES(GTK, gtk+-3.0, [AC_MSG_NOTICE(Using gtk+-3.0)], - [PKG_CHECK_MODULES(GTK, gtk+-2.0, [PKG_CHECK_MODULES(GTHREAD, gthread-2.0)], - [AC_MSG_ERROR(gtk-2 not found)])]) + [AC_MSG_ERROR(gtk+-3.0 not found)]) AC_SUBST([GETTEXT_PACKAGE], [$PACKAGE_TARNAME]) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [GETTEXT package name]) diff --git a/gnome/src/Makefile.am b/gnome/src/Makefile.am index 872610bf124cc7137d0e8b05f005e170b75a5183..4853f2541c44c3bc37fdf52fb8c1cd17280f6e20 100644 --- a/gnome/src/Makefile.am +++ b/gnome/src/Makefile.am @@ -32,7 +32,6 @@ libsflphone_client_la_SOURCES = \ shortcuts.c \ str_utils.c \ seekslider.c \ - gtk2_wrappers.c \ actions.h \ sflnotify.h \ mainwindow.h \ @@ -49,7 +48,6 @@ libsflphone_client_la_SOURCES = \ logger.h \ unused.h \ str_utils.h \ - gtk2_wrappers.h \ seekslider.h \ account_schema.h \ history_loader.c \ @@ -60,19 +58,18 @@ libsflphone_client_la_LIBADD = @CLUTTER_LIBS@ @CLUTTERGTK_LIBS@ $(SFLPHONE_LIBS) libsflphone_client_la_LDFLAGS = @CLUTTER_LDFLAGS@ @DBUSGLIB_LIBS@ @LIBNOTIFY_LIBS@ \ @X11_LIBS@ @GTK_LIBS@ @GLIB_LIBS@ \ $(DL_LIBS) @JAVASCRIPT_CORE_GTK_LIBS@ \ - @GTHREAD_LIBS@ @CLUTTERGTK_LDFLAGS@ + @CLUTTERGTK_LDFLAGS@ libsflphone_client_la_CFLAGS = @CLUTTER_CFLAGS@ @DBUSGLIB_CFLAGS@ @LIBNOTIFY_CFLAGS@ \ @GTK_CFLAGS@ \ @JAVASCRIPT_CORE_GTK_CFLAGS@ \ - @GTHREAD_CFLAGS@ @CLUTTERGTK_CFLAGS@ + @CLUTTERGTK_CFLAGS@ sflphone_client_gnome_SOURCES = main.c sflphone_client_gnome_CFLAGS = @DBUSGLIB_CFLAGS@ @LIBNOTIFY_CFLAGS@ \ @GTK_CFLAGS@ \ - @JAVASCRIPT_CORE_GTK_CFLAGS@ \ - @GTHREAD_CFLAGS@ + @JAVASCRIPT_CORE_GTK_CFLAGS@ sflphone_client_gnome_LDADD = libsflphone_client.la # add symbolic link diff --git a/gnome/src/actions.c b/gnome/src/actions.c index c353c0d5e77fe3b3726e31c09d2b5f9b15b320f9..fed963b964a74ee1c32d1c5a2bf1cb5d7e124cb8 100644 --- a/gnome/src/actions.c +++ b/gnome/src/actions.c @@ -35,12 +35,8 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> -/* Backward compatibility for gtk < 2.22.0 */ -#if GTK_CHECK_VERSION(2,22,0) +// FIXME: use newer keysyms names #include <gdk/gdkkeysyms-compat.h> -#else -#include <gdk/gdkkeysyms.h> -#endif #include "str_utils.h" #include "uimanager.h" diff --git a/gnome/src/config/accountconfigdialog.c b/gnome/src/config/accountconfigdialog.c index 76467c6bbdc6e785220642a2fd8b74084293ce2a..e7a333a70e4ade930c0f58a5020741b6db99610c 100644 --- a/gnome/src/config/accountconfigdialog.c +++ b/gnome/src/config/accountconfigdialog.c @@ -44,7 +44,6 @@ #include <gtk/gtk.h> #include "config.h" -#include "gtk2_wrappers.h" #include "str_utils.h" #include "logger.h" #include "actions.h" diff --git a/gnome/src/config/accountlistconfigdialog.c b/gnome/src/config/accountlistconfigdialog.c index 884f3183a2c9a919b6c1e8f35491341762e25e8b..1fa9b7f632a64435119733bce9fcd9c54b69a34f 100644 --- a/gnome/src/config/accountlistconfigdialog.c +++ b/gnome/src/config/accountlistconfigdialog.c @@ -40,7 +40,6 @@ #include "utils.h" #include "unused.h" #include "logger.h" -#include "gtk2_wrappers.h" #include <glib/gi18n.h> #include <string.h> diff --git a/gnome/src/config/addressbook-config.c b/gnome/src/config/addressbook-config.c index a75860719e0e914585bae46dd27f27f2ecd3ef7d..4536d02ec48aa706c3906462d6e485bfc7520c9b 100644 --- a/gnome/src/config/addressbook-config.c +++ b/gnome/src/config/addressbook-config.c @@ -29,7 +29,6 @@ */ #include "addressbook-config.h" -#include "gtk2_wrappers.h" #include "str_utils.h" #include "dbus.h" #include "unused.h" diff --git a/gnome/src/config/assistant.c b/gnome/src/config/assistant.c index b11b70ac72850194970660bb966c3b6893ef961e..26277b4f2f2b4919087f2a8f713b5523b430bc2a 100644 --- a/gnome/src/config/assistant.c +++ b/gnome/src/config/assistant.c @@ -30,7 +30,6 @@ #include <string.h> #include <glib/gi18n.h> -#include "gtk2_wrappers.h" #include "unused.h" #include "assistant.h" #include "logger.h" diff --git a/gnome/src/config/audioconf.c b/gnome/src/config/audioconf.c index ec3772eb798900465842b5cf3d09db4926e7e6c8..0c57fe53dc2435b3e81792b374a13b6b56e9bbd9 100644 --- a/gnome/src/config/audioconf.c +++ b/gnome/src/config/audioconf.c @@ -30,7 +30,6 @@ #include <glib/gstdio.h> #include <glib/gi18n.h> -#include "gtk2_wrappers.h" #include "str_utils.h" #include "codeclist.h" #include "sflphone_const.h" diff --git a/gnome/src/config/hooks-config.c b/gnome/src/config/hooks-config.c index 4e316fae71b0102a72051cb73468fb2ee3bcd408..e404c432920282cd4fd773eca088cdc48e6aef3d 100644 --- a/gnome/src/config/hooks-config.c +++ b/gnome/src/config/hooks-config.c @@ -29,7 +29,6 @@ */ #include <glib/gi18n.h> -#include "gtk2_wrappers.h" #include "str_utils.h" #include "hooks-config.h" #include "dbus.h" diff --git a/gnome/src/config/preferencesdialog.c b/gnome/src/config/preferencesdialog.c index 6395af04b707faa1266ee2fd7a0f9b571560dd56..4dea0993dc786519b7068d63eb6bee011cf5f40c 100644 --- a/gnome/src/config/preferencesdialog.c +++ b/gnome/src/config/preferencesdialog.c @@ -43,7 +43,6 @@ #include <string.h> #include <assert.h> -#include "gtk2_wrappers.h" #include "dbus.h" #include "logger.h" #include "statusicon.h" diff --git a/gnome/src/config/shortcuts-config.c b/gnome/src/config/shortcuts-config.c index 5ad3790118c81a8f20488f224616f92aa8834639..a5f8aecd742dabc230d0cfc7284c567361db2e08 100644 --- a/gnome/src/config/shortcuts-config.c +++ b/gnome/src/config/shortcuts-config.c @@ -28,7 +28,6 @@ * as that of the covered work. */ -#include "gtk2_wrappers.h" #include <glib/gi18n.h> #include <gdk/gdk.h> #include <X11/XKBlib.h> diff --git a/gnome/src/config/tlsadvanceddialog.c b/gnome/src/config/tlsadvanceddialog.c index 6262012de17ababe4bc714b0a90bd4432fffbfa1..2e926f784f7bba17ec3e79c99fa851c68aa29f4a 100644 --- a/gnome/src/config/tlsadvanceddialog.c +++ b/gnome/src/config/tlsadvanceddialog.c @@ -29,7 +29,6 @@ */ #include "tlsadvanceddialog.h" -#include "gtk2_wrappers.h" #include "str_utils.h" #include "account_schema.h" #include "mainwindow.h" diff --git a/gnome/src/contacts/calltree.c b/gnome/src/contacts/calltree.c index 1a3aa179e14c9d1818dc9248dd84458c79bdbd71..1d7c7ccfc1baf0f584bf020e965394782eaa193d 100644 --- a/gnome/src/contacts/calltree.c +++ b/gnome/src/contacts/calltree.c @@ -42,7 +42,6 @@ #include <stdlib.h> #include <gtk/gtk.h> -#include "gtk2_wrappers.h" #include "unused.h" #include "dbus.h" #include "calltab.h" diff --git a/gnome/src/contacts/searchbar.c b/gnome/src/contacts/searchbar.c index 38e82bfee794d7ce0b93f54f653cc0ae6fa9eb14..aef20cf9820e9860f9be62ae727dc759540909d7 100644 --- a/gnome/src/contacts/searchbar.c +++ b/gnome/src/contacts/searchbar.c @@ -32,7 +32,6 @@ */ #include <glib/gi18n.h> -#include "gtk2_wrappers.h" #include "searchbar.h" #include "calltree.h" #include "calltab.h" @@ -48,7 +47,6 @@ static GtkWidget * searchbox; static GtkWidget * addressbookentry; static SearchType HistorySearchType; - static GtkWidget * cbox; static GtkListStore * liststore; diff --git a/gnome/src/gtk2_wrappers.c b/gnome/src/gtk2_wrappers.c deleted file mode 100644 index ba813aa4c262a1d399c0fd4c13bc9abae33028ee..0000000000000000000000000000000000000000 --- a/gnome/src/gtk2_wrappers.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2004-2012 Savoir-Faire Linux Inc. - * Author: Tristan Matthews <tristan.matthews@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Additional permission under GNU GPL version 3 section 7: - * - * If you modify this program, or any covered work, by linking or - * combining it with the OpenSSL project's OpenSSL library (or a - * modified version of that library), containing parts covered by the - * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. - * grants you additional permission to convey the resulting work. - * Corresponding Source for a non-source form of such a combination - * shall include the source code for the parts of OpenSSL used as well - * as that of the covered work. - */ - -#include "gtk2_wrappers.h" -#include "unused.h" - -#if !GTK_CHECK_VERSION(3, 0, 0) - -GtkWidget *gtk_box_new(GtkOrientation orientation, gint spacing) -{ - if (orientation == GTK_ORIENTATION_HORIZONTAL) - return gtk_hbox_new(FALSE, spacing); - else - return gtk_vbox_new(FALSE, spacing); -} - -GtkWidget *gtk_scale_new(GtkOrientation orientation, GtkAdjustment *adjustment) -{ - if (orientation == GTK_ORIENTATION_HORIZONTAL) - return gtk_hscale_new(adjustment); - else - return gtk_vscale_new(adjustment); -} - -GtkWidget* gtk_button_box_new(GtkOrientation orientation) -{ - if (orientation == GTK_ORIENTATION_HORIZONTAL) - return gtk_hbutton_box_new(); - else - return gtk_vbutton_box_new(); -} - -void -gtk_widget_get_preferred_size(GtkWidget* widget, GtkRequisition *min_size UNUSED, GtkRequisition *natural_size) -{ - gtk_widget_size_request(widget, natural_size); -} - -GdkPixbuf * -gtk_widget_render_icon_pixbuf(GtkWidget *widget, const gchar *stock_id, GtkIconSize size) -{ - return gtk_widget_render_icon(widget, stock_id, size, NULL); -} - -GtkWidget * -gtk_scale_new_with_range(GtkOrientation orientation, gdouble min, gdouble max, - gdouble step) -{ - if (orientation == GTK_ORIENTATION_HORIZONTAL) - return gtk_hscale_new_with_range(min, max, step); - else - return gtk_vscale_new_with_range(min, max, step); -} - -GtkWidget * -gtk_separator_new(GtkOrientation orientation) -{ - if (orientation == GTK_ORIENTATION_HORIZONTAL) - return gtk_hseparator_new(); - else - return gtk_vseparator_new(); - -} - -#endif diff --git a/gnome/src/gtk2_wrappers.h b/gnome/src/gtk2_wrappers.h deleted file mode 100644 index e76ab8dcce87567ae17118c3c3b05a13e91bb62e..0000000000000000000000000000000000000000 --- a/gnome/src/gtk2_wrappers.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2004-2012 Savoir-Faire Linux Inc. - * Author: Tristan Matthews <tristan.matthews@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Additional permission under GNU GPL version 3 section 7: - * - * If you modify this program, or any covered work, by linking or - * combining it with the OpenSSL project's OpenSSL library (or a - * modified version of that library), containing parts covered by the - * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. - * grants you additional permission to convey the resulting work. - * Corresponding Source for a non-source form of such a combination - * shall include the source code for the parts of OpenSSL used as well - * as that of the covered work. - */ - -#ifndef BOX_H_ -#define BOX_H_ - -#include <gtk/gtk.h> - -/* Wrappers needed if using gtk2 */ -#if !GTK_CHECK_VERSION(3, 0, 0) -GtkWidget* -gtk_box_new(GtkOrientation orientation, gint spacing); - -GtkWidget* -gtk_button_box_new(GtkOrientation orientation); - -void -gtk_widget_get_preferred_size(GtkWidget* widget, GtkRequisition *min_size, GtkRequisition *natural_size); - -GdkPixbuf * -gtk_widget_render_icon_pixbuf(GtkWidget *widget, const gchar *stock_id, GtkIconSize size); - -GtkWidget * -gtk_scale_new_with_range(GtkOrientation orientation, gdouble min, gdouble max, - gdouble step); - -GtkWidget * -gtk_scale_new(GtkOrientation orientation, GtkAdjustment *adjustment); - -GtkWidget * -gtk_separator_new(GtkOrientation orientation); - -#endif - -#endif // BOX_H_ diff --git a/gnome/src/main.c b/gnome/src/main.c index 2798d92fca769fa6d19e3762da5b2fe7fb42c561..72a54fa56eac11d25b2e14845a5c574f1e762b2b 100644 --- a/gnome/src/main.c +++ b/gnome/src/main.c @@ -79,12 +79,6 @@ main(int argc, char *argv[]) * versions of GLib. */ update_schema_dir(argv[0]); -#if !GTK_CHECK_VERSION(2,32,0) - g_thread_init(NULL); - gdk_threads_init(); - gdk_threads_enter(); -#endif - // Start GTK application gtk_init(&argc, &argv); @@ -133,7 +127,7 @@ main(int argc, char *argv[]) gtk_widget_destroy(dialog); g_error_free(error); - goto OUT; + return 1; } const gboolean show_status = g_settings_get_boolean(settings, "show-status-icon"); @@ -160,12 +154,7 @@ main(int argc, char *argv[]) g_object_unref(settings); -OUT: -#if !GTK_CHECK_VERSION(2,32,0) - gdk_threads_leave(); -#endif - - return error != NULL; + return 0; } /** @mainpage SFLphone GTK+ Client Documentation diff --git a/gnome/src/mainwindow.c b/gnome/src/mainwindow.c index 2831bc8d2f8c1edcdf71ef455136b009bd6b6aa9..4fb9d9a20c781de3dec7704599949f50bf9b453d 100644 --- a/gnome/src/mainwindow.c +++ b/gnome/src/mainwindow.c @@ -34,7 +34,6 @@ #include "config.h" #endif -#include "gtk2_wrappers.h" #include "account_schema.h" #include "actions.h" #include "dbus.h" diff --git a/gnome/src/messaging/message_tab.c b/gnome/src/messaging/message_tab.c index 0fb4a6f975399c11c55efa668c2ecf0e801bf20b..39002ebf1819e469cad43d0742512a9cd0409a39 100644 --- a/gnome/src/messaging/message_tab.c +++ b/gnome/src/messaging/message_tab.c @@ -31,7 +31,6 @@ #include "../dbus/dbus.h" #include <glib.h> -#include "gtk2_wrappers.h" #include "logger.h" #include "../mainwindow.h" #include <string.h> diff --git a/gnome/src/seekslider.c b/gnome/src/seekslider.c index d4b4c85562885067c5277727db37f7c23239ba48..97ec2aea2b3d14ac66c7c9cededffdf538173fa6 100644 --- a/gnome/src/seekslider.c +++ b/gnome/src/seekslider.c @@ -34,7 +34,6 @@ #include <stdlib.h> #include <gtk/gtk.h> #include <string.h> -#include "gtk2_wrappers.h" #include "seekslider.h" #include "dbus.h" #include "logger.h" diff --git a/gnome/src/sliders.c b/gnome/src/sliders.c index b6c32fbfed13c931589c4afbd7c2b3a9e48644f8..9fb82a05ea7d10bb3eac10fff576a2bf8ca6379a 100644 --- a/gnome/src/sliders.c +++ b/gnome/src/sliders.c @@ -29,7 +29,6 @@ */ #include <glib/gi18n.h> -#include "gtk2_wrappers.h" #include "sliders.h" #include "dbus/dbus.h" #include "actions.h" diff --git a/gnome/src/uimanager.c b/gnome/src/uimanager.c index 1f2d7746d7ac2a2f47035fd2e87e4c3eeeccea50..3b88660d2b745d39dc3dbb54e9835e18cadcc1b5 100644 --- a/gnome/src/uimanager.c +++ b/gnome/src/uimanager.c @@ -32,7 +32,6 @@ #include "config.h" #endif -#include "gtk2_wrappers.h" #include "str_utils.h" #include "preferencesdialog.h" #include "logger.h" diff --git a/gnome/src/widget/minidialog.c b/gnome/src/widget/minidialog.c index c844bc28e1b524f59f325b098a30ad71641658a7..46de0379601c3fa128dbf11716d039d7260b6f31 100644 --- a/gnome/src/widget/minidialog.c +++ b/gnome/src/widget/minidialog.c @@ -26,7 +26,6 @@ #include <gtk/gtk.h> #include "unused.h" #include "sflphone_const.h" -#include "gtk2_wrappers.h" #include "minidialog.h" #define HIG_BOX_SPACE 6