Commit d14273e3 authored by Rafaël Carré's avatar Rafaël Carré

Require gtk >= 2.20 and glib >= 2.24

Those are the versions in last Ubuntu LTS
parent 9ae4cfbf
......@@ -9,19 +9,7 @@ AC_CONFIG_MACRO_DIR([m4])
dnl Silent build by default. Use make V=1 to increase verbosity
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_ARG_WITH(debug,
AS_HELP_STRING(
[--with-debug],
[Set 'full' to enable debugging information @<:@default=no@:>@]
),
[with_debug=${withval}],
[with_debug=no]
)
if test "x$with_debug" = "xfull" -o "x$with_debug" = "xyes"; then
CFLAGS="-g -O0 -Wall -Wextra"
else
CFLAGS="$CFLAGS -Wall -Wextra"
fi
CFLAGS="$CFLAGS -g -Wall -Wextra"
AC_PROG_CC_C99
AM_PROG_CC_C_O dnl for per target flags, i.e. test_program_CFLAGS
......@@ -36,22 +24,10 @@ dnl uninstalled gsr ui dir
AC_DEFINE_UNQUOTED(SFLPHONE_UIDIR_UNINSTALLED, "`pwd`/src/",
[path to uninstalled SFLphone UI dir])
dnl Check for GTK+ version
dnl If gtk+-2.0 >= 2.16, we don't need libsexy package anymore
PKG_CHECK_MODULES(GTK216, gtk+-2.0 >= 2.16, need_libsexy=false, need_libsexy=true)
if $need_libsexy; then
PKG_CHECK_MODULES(LIBSEXY, libsexy >= 0.1, have_libsexy=true, have_libsexy=false)
if ! $have_libsexy; then
AC_MSG_ERROR(libsexy package has not been found. Please install it.)
fi
fi
AC_SUBST(LIBSEXY_CFLAGS)
AC_SUBST(LIBSEXY_LIBS)
PKG_CHECK_MODULES(DBUSGLIB, dbus-glib-1 >= 0.75, HAVE_DBUS_G_PROXY_SET_DEFAULT_TIMEOUT=true, HAVE_DBUS_G_PROXY_SET_DEFAULT_TIMEOUT=false);
PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= 0.7.2], [AC_DEFINE([LIBNOTIFY_VERSION_0_7_2],[],[Using libnotify-0.7.2 or higher])],[PKG_CHECK_MODULES([LIBNOTIFY], [libnotify >= 0.4])])
PKG_CHECK_MODULES(SFLGTK, gtk+-2.0 > 2.2)
PKG_CHECK_MODULES(SFLGLIB, glib-2.0 >= 2.2)
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.20)
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.24)
PKG_CHECK_MODULES(WEBKIT, webkit-1.0)
PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
PKG_CHECK_MODULES(GNOMEDOCUTILS, gnome-doc-utils)
......
......@@ -9,7 +9,6 @@ sflplugindir=$(sfllibdir)/plugins
# Preprocessor flags
AM_CPPFLAGS = $(DEPS_CFLAGS) \
$(LIBSEXY_CFLAGS) \
-I$(src)/src \
-I$(src)/src/config \
-I$(src)/src/dbus \
......
......@@ -34,10 +34,10 @@ noinst_HEADERS = actions.h sflnotify.h mainwindow.h dialpad.h codeclist.h \
accountlist.h sliders.h statusicon.h callable_obj.h conference_obj.h \
shortcuts.h eel-gconf-extensions.h logger.h imwindow.h
sflphone_client_gnome_LDADD = $(DBUSGLIB_LIBS) $(LIBNOTIFY_LIBS) $(NOTIFY_LIBS) $(SFLPHONEGTK_LIBS) $(LIBSEXY_LIBS) $(X11_LIBS) \
sflphone_client_gnome_LDADD = $(DBUSGLIB_LIBS) $(LIBNOTIFY_LIBS) $(NOTIFY_LIBS) $(SFLPHONEGTK_LIBS) $(X11_LIBS) \
$(GTK_LIBS) $(GLIB_LIBS) $(WEBKIT_LIBS) $(LIBGNOMEUI_LIBS) $(GNOMEDOCUTILS_LIBS) $(LD_LIBS)
sflphone_client_gnome_CFLAGS = $(DBUSGLIB_CFLAGS) $(LIBNOTIFY_CFLAGS) $(NOTIFY_CFLAGS) $(SFLPHONEGTK_CFLAGS) $(LIBSEXY_CFLAGS) $(X11_CFLAGS) \
sflphone_client_gnome_CFLAGS = $(DBUSGLIB_CFLAGS) $(LIBNOTIFY_CFLAGS) $(NOTIFY_CFLAGS) $(SFLPHONEGTK_CFLAGS) $(X11_CFLAGS) \
$(GTK_CFLAGS) $(GLIB_CFLAGS) $(WEBKIT_CFLAGS) $(LIBGNOMEUI_CFLAGS) $(GNOMEDOCUTILS_CFLAGS)
# add symbolic link
......
......@@ -231,9 +231,7 @@ sflphone_hung_up (callable_obj_t * c)
else
im_widget_update_state (IM_WIDGET (c->_im_widget), FALSE);
#if GTK_CHECK_VERSION(2,10,0)
status_tray_icon_blink (FALSE);
#endif
statusbar_update_clock("");
}
......
......@@ -27,13 +27,13 @@ libconfig_la_SOURCES = \
zrtpadvanceddialog.h
libconfig_la_LDFLAGS = $(DBUSGLIB_LDFLAGS) $(LIBNOTIFY_LDFLAGS) \
$(SFLGTK_LDFLAGS) $(SFLGLIB_LDFLAGS) $(WEBKIT_LDFLAGS) $(LIBGNOMEUI_LDFLAGS) \
$(GTK_LDFLAGS) $(GLIB_LDFLAGS) $(WEBKIT_LDFLAGS) $(LIBGNOMEUI_LDFLAGS) \
$(GNOMEDOCUTILS_LDFLAGS)
libconfig_la_LIBADD = $(DBUSGLIB_LIBS) $(LIBNOTIFY_LIBSI) \
$(SFLGTK_LIBS) $(SFLGLIB_LIBS) $(WEBKIT_LIBS) $(LIBGNOMEUI_LIBS) \
$(GTK_LIBS) $(GLIB_LIBS) $(WEBKIT_LIBS) $(LIBGNOMEUI_LIBS) \
$(GNOMEDOCUTILS_LIBS)
libconfig_la_CFLAGS = $(DBUSGLIB_CFLAGS) $(LIBNOTIFY_CFLAGS) \
$(SFLGTK_CFLAGS) $(SFLGLIB_CFLAGS) $(WEBKIT_CFLAGS) $(LIBGNOMEUI_CFLAGS) \
$(GTK_CFLAGS) $(GLIB_CFLAGS) $(WEBKIT_CFLAGS) $(LIBGNOMEUI_CFLAGS) \
$(GNOMEDOCUTILS_CFLAGS)
......@@ -40,12 +40,6 @@
#include "tlsadvanceddialog.h"
#include "audioconf.h"
// From version 2.16, gtk provides the functionalities libsexy used to provide
#if GTK_CHECK_VERSION(2,16,0)
#else
#include <libsexy/sexy-icon-entry.h>
#endif
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
......@@ -209,10 +203,6 @@ static GtkWidget* create_basic_tab(account_t *currentAccount)
GtkWidget * frame;
GtkWidget * table;
GtkWidget * clearTextCheckbox;
#if GTK_CHECK_VERSION(2,16,0)
#else
GtkWidget *image;
#endif
int row = 0;
......@@ -307,14 +297,8 @@ static GtkWidget* create_basic_tab(account_t *currentAccount)
label = gtk_label_new_with_mnemonic(_("_User name"));
gtk_table_attach(GTK_TABLE(table), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
#if GTK_CHECK_VERSION(2,16,0)
entryUsername = gtk_entry_new();
gtk_entry_set_icon_from_pixbuf(GTK_ENTRY(entryUsername), GTK_ENTRY_ICON_PRIMARY, gdk_pixbuf_new_from_file(ICONS_DIR "/stock_person.svg", NULL));
#else
entryUsername = sexy_icon_entry_new();
image = gtk_image_new_from_file(ICONS_DIR "/stock_person.svg");
sexy_icon_entry_set_icon(SEXY_ICON_ENTRY(entryUsername), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image));
#endif
gtk_label_set_mnemonic_widget(GTK_LABEL(label), entryUsername);
gtk_entry_set_text(GTK_ENTRY(entryUsername), curUsername);
gtk_table_attach(GTK_TABLE(table), entryUsername, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
......@@ -328,14 +312,8 @@ static GtkWidget* create_basic_tab(account_t *currentAccount)
label = gtk_label_new_with_mnemonic(_("_Password"));
gtk_table_attach(GTK_TABLE(table), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
#if GTK_CHECK_VERSION(2,16,0)
entryPassword = gtk_entry_new();
gtk_entry_set_icon_from_stock(GTK_ENTRY(entryPassword), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_DIALOG_AUTHENTICATION);
#else
entryPassword = sexy_icon_entry_new();
image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR);
sexy_icon_entry_set_icon(SEXY_ICON_ENTRY(entryPassword), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image));
#endif
gtk_entry_set_visibility(GTK_ENTRY(entryPassword), FALSE);
gtk_label_set_mnemonic_widget(GTK_LABEL(label), entryPassword);
gtk_entry_set_text(GTK_ENTRY(entryPassword), curPassword);
......
......@@ -33,18 +33,7 @@
#include "assistant.h"
#include "reqaccount.h"
// From version 2.16, gtk provides the functionalities libsexy used to provide
#if GTK_CHECK_VERSION(2,16,0)
#else
#include <libsexy/sexy-icon-entry.h>
#endif
#if GTK_CHECK_VERSION(2,10,0)
#define SFLPHONE_ORG_SERVER "sip.sflphone.org"
#define SFLPHONE_ORG_ALIAS "sflphone.org"
struct _wizard *wiz;
static int account_type;
......@@ -360,14 +349,8 @@ GtkWidget* build_sip_account_configuration (void)
label = gtk_label_new_with_mnemonic (_ ("_User name"));
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
#if GTK_CHECK_VERSION(2,16,0)
wiz->sip_username = gtk_entry_new();
gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (wiz->sip_username), GTK_ENTRY_ICON_PRIMARY, gdk_pixbuf_new_from_file (ICONS_DIR "/stock_person.svg", NULL));
#else
wiz->sip_username = sexy_icon_entry_new();
image = gtk_image_new_from_file (ICONS_DIR "/stock_person.svg");
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (wiz->sip_username), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
#endif
gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_username);
gtk_table_attach (GTK_TABLE (table), wiz->sip_username, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
......@@ -376,16 +359,8 @@ GtkWidget* build_sip_account_configuration (void)
label = gtk_label_new_with_mnemonic (_ ("_Password"));
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
#if GTK_CHECK_VERSION(2,16,0)
wiz->sip_password = gtk_entry_new();
gtk_entry_set_icon_from_stock (GTK_ENTRY (wiz->sip_password), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_DIALOG_AUTHENTICATION);
#else
wiz->sip_password = sexy_icon_entry_new();
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR);
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (wiz->sip_password), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
#endif
gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_password);
gtk_entry_set_visibility (GTK_ENTRY (wiz->sip_password), FALSE);
gtk_table_attach (GTK_TABLE (table), wiz->sip_password, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
......@@ -474,14 +449,8 @@ GtkWidget* build_iax_account_configuration (void)
label = gtk_label_new_with_mnemonic (_ ("_User name"));
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
#if GTK_CHECK_VERSION(2,16,0)
wiz->iax_username = gtk_entry_new();
gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (wiz->iax_username), GTK_ENTRY_ICON_PRIMARY, gdk_pixbuf_new_from_file (ICONS_DIR "/stock_person.svg", NULL));
#else
wiz->iax_username = sexy_icon_entry_new();
image = gtk_image_new_from_file (ICONS_DIR "/stock_person.svg");
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (wiz->iax_username), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
#endif
gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_username);
gtk_table_attach (GTK_TABLE (table), wiz->iax_username, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
......@@ -489,14 +458,8 @@ GtkWidget* build_iax_account_configuration (void)
label = gtk_label_new_with_mnemonic (_ ("_Password"));
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
#if GTK_CHECK_VERSION(2,16,0)
wiz->iax_password = gtk_entry_new();
gtk_entry_set_icon_from_stock (GTK_ENTRY (wiz->iax_password), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_DIALOG_AUTHENTICATION);
#else
wiz->iax_password = sexy_icon_entry_new();
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR);
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (wiz->iax_password), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
#endif
gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_password);
gtk_entry_set_visibility (GTK_ENTRY (wiz->iax_password), FALSE);
gtk_table_attach (GTK_TABLE (table), wiz->iax_password, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
......@@ -704,5 +667,3 @@ static GtkWidget* create_vbox (GtkAssistantPageType type, const gchar *title, co
return vbox;
}
#endif // GTK_CHECK_VERSION
......@@ -37,8 +37,6 @@
#include <sflphone_const.h>
#if GTK_CHECK_VERSION(2,10,0)
#define _SIP 0
#define _IAX 1
......@@ -85,23 +83,11 @@ struct _wizard {
};
/**
* @file druid.h
* @brief Implement the configuration wizard
*/
/**
* Callbacks functions
*/
void set_account_type (GtkWidget* widget , gpointer data);
//static void cancel_callback( void );
//static void close_callback( void );
//static void sip_apply_callback( void );
//static void iax_apply_callback( void );
void enable_stun (GtkWidget *widget);
/**
......@@ -117,17 +103,4 @@ GtkWidget* build_summary (void);
GtkWidget* build_registration_error (void);
GtkWidget* build_email_configuration (void);
GtkWidget* build_sfl_or_account (void);
/**
* Forward function
*/
//static gint forward_page_func( gint current_page , gpointer data );
/**
* Page template
*/
//static GtkWidget* create_vbox(GtkAssistantPageType type, const gchar *title, const gchar *section);
#endif // GTK_CHECK_VERSION
#endif
......@@ -36,11 +36,6 @@
#include <gtk/gtk.h>
#include <math.h>
#if GTK_CHECK_VERSION(2,16,0)
#else
#include <libsexy/sexy-icon-entry.h>
#endif
void show_advanced_tls_options (GHashTable * properties)
{
GtkDialog *tlsDialog = GTK_DIALOG (gtk_dialog_new_with_buttons (_ ("Advanced options for TLS"),
......@@ -161,11 +156,10 @@ void show_advanced_tls_options (GHashTable * properties)
label = gtk_label_new ( ("Private key file"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
GtkWidget * privateKeyFileChooser;
privateKeyFileChooser = gtk_file_chooser_button_new (_ ("Choose a private key file (optional)"), GTK_FILE_CHOOSER_ACTION_OPEN);
GtkWidget *privateKeyFileChooser = gtk_file_chooser_button_new (_ ("Choose a private key file (optional)"), GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_table_attach (GTK_TABLE (table), privateKeyFileChooser, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
if (!tls_private_key_file == NULL) {
if (!tls_private_key_file) {
gtk_file_chooser_unselect_all (GTK_FILE_CHOOSER (caListFileChooser));
} else {
if (!*tls_private_key_file) {
......@@ -181,14 +175,8 @@ void show_advanced_tls_options (GHashTable * properties)
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
GtkWidget * privateKeyPasswordEntry;
#if GTK_CHECK_VERSION(2,16,0)
privateKeyPasswordEntry = gtk_entry_new();
gtk_entry_set_icon_from_stock (GTK_ENTRY (privateKeyPasswordEntry), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_DIALOG_AUTHENTICATION);
#else
privateKeyPasswordEntry = sexy_icon_entry_new();
GtkWidget * image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR);
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (privateKeyPasswordEntry), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
#endif
gtk_entry_set_visibility (GTK_ENTRY (privateKeyPasswordEntry), FALSE);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), privateKeyPasswordEntry);
gtk_entry_set_text (GTK_ENTRY (privateKeyPasswordEntry), tls_password);
......
......@@ -20,9 +20,9 @@ libcontacts_la_SOURCES = \
searchbar.h
libcontacts_la_LDFLAGS = $(DBUSGLIB_LDFLAGS) $(LIBNOTIFY_LDFLAGS) \
$(SFLGTK_LDFLAGS) $(SFLGLIB_LDFLAGS) $(WEBKIT_LDFLAGS) $(LIBGNOMEUI_LDFLAGS) \
$(GNOMEDOCUTILS_LDFLAGS)
$(GTK_LDFLAGS) $(GLIB_LDFLAGS) $(WEBKIT_LDFLAGS) $(LIBGNOMEUI_LDFLAGS) \
$(GNOMEDOCUTILS_LDFLAGS)
libcontacts_la_CFLAGS = $(DBUSGLIB_CFLAGS) $(LIBNOTIFY_CFLAGS) \
$(SFLGTK_CFLAGS) $(SFLGLIB_CFLAGS) $(WEBKIT_CFLAGS) $(LIBGNOMEUI_CFLAGS) \
$(GTK_CFLAGS) $(GLIB_CFLAGS) $(WEBKIT_CFLAGS) $(LIBGNOMEUI_CFLAGS) \
$(GNOMEDOCUTILS_CFLAGS)
......@@ -288,8 +288,6 @@ GtkWidget* history_searchbar_new (void)
ret = gtk_hbox_new (FALSE, 0);
#if GTK_CHECK_VERSION(2,16,0)
searchbox = gtk_entry_new();
gtk_entry_set_icon_from_stock (GTK_ENTRY (searchbox), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CLEAR);
......@@ -337,13 +335,6 @@ GtkWidget* history_searchbar_new (void)
gtk_widget_show_all (menu);
#else
searchbox = sexy_icon_entry_new();
image = gtk_image_new_from_stock (GTK_STOCK_FIND , GTK_ICON_SIZE_SMALL_TOOLBAR);
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (searchbox), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
sexy_icon_entry_add_clear_button (SEXY_ICON_ENTRY (searchbox));
#endif
g_signal_connect_after (GTK_ENTRY (searchbox), "changed", G_CALLBACK (searchbar_entry_changed), NULL);
g_signal_connect_after (G_OBJECT (searchbox), "focus-in-event",
G_CALLBACK (focus_on_searchbar_in), NULL);
......@@ -434,8 +425,6 @@ GtkWidget* contacts_searchbar_new ()
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (cbox), cell, "text", 0, NULL);
#if GTK_CHECK_VERSION(2,16,0)
// GdkPixbuf *pixbuf;
gchar *tooltip_text = g_strdup ("Search is");
......@@ -454,16 +443,6 @@ GtkWidget* contacts_searchbar_new ()
g_signal_connect (addressbookentry, "notify::text", G_CALLBACK (text_changed_cb), NULL);
g_signal_connect (addressbookentry, "icon-press", G_CALLBACK (icon_press_cb), NULL);
#else
GtkWidget *image;
addressbookentry = sexy_icon_entry_new();
image = gtk_image_new_from_stock (GTK_STOCK_FIND , GTK_ICON_SIZE_SMALL_TOOLBAR);
sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (addressbookentry), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
sexy_icon_entry_add_clear_button (SEXY_ICON_ENTRY (addressbookentry));
#endif
gtk_entry_set_activates_default (GTK_ENTRY (addressbookentry), TRUE);
g_signal_connect_after (GTK_ENTRY (addressbookentry), "activate", G_CALLBACK (searchbar_addressbook_activated), NULL);
......
......@@ -43,12 +43,6 @@
#include <gtk/gtk.h>
#include <mainwindow.h>
// From version 2.16, gtk provides the functionalities libsexy used to provide
#if GTK_CHECK_VERSION(2,16,0)
#else
#include <libsexy/sexy-icon-entry.h>
#endif
#include <addressbook.h>
#include <history.h>
......
......@@ -26,11 +26,11 @@ libdbus_la_SOURCES= \
$(BUILT_SOURCES)
libdbus_la_LDFLAGS= $(DBUSGLIB_LDFLAGS) $(LIBNOTIFY_LDFLAGS) \
$(SFLGTK_LDFLAGS) $(SFLGLIB_LDFLAGS) $(WEBKIT_LDFLAGS) $(LIBGNOMEUI_LDFLAGS) \
$(GTK_LDFLAGS) $(GLIB_LDFLAGS) $(WEBKIT_LDFLAGS) $(LIBGNOMEUI_LDFLAGS) \
$(GNOMEDOCUTILS_LDFLAGS)
libdbus_la_CFLAGS= $(DBUSGLIB_CFLAGS) $(LIBNOTIFY_CFLAGS) \
$(SFLGTK_CFLAGS) $(SFLGLIB_CFLAGS) $(WEBKIT_CFLAGS) $(LIBGNOMEUI_CFLAGS) \
$(GTK_CFLAGS) $(GLIB_CFLAGS) $(WEBKIT_CFLAGS) $(LIBGNOMEUI_CFLAGS) \
$(GNOMEDOCUTILS_CFLAGS)
EXTRA_DIST= \
......
......@@ -86,10 +86,8 @@ incoming_call_cb (DBusGProxy *proxy UNUSED, const gchar* accountID,
g_free(peer_number);
g_free(peer_name);
#if GTK_CHECK_VERSION(2,10,0)
status_tray_icon_blink (TRUE);
popup_main_window();
#endif
notify_incoming_call (c);
sflphone_incoming_call (c);
......@@ -853,9 +851,7 @@ dbus_attended_transfer (const callable_obj_t *transfer, const callable_obj_t *ta
void
dbus_accept (const callable_obj_t * c)
{
#if GTK_CHECK_VERSION(2,10,0)
status_tray_icon_blink (FALSE);
#endif
GError *error = NULL;
org_sflphone_SFLphone_CallManager_accept (callManagerProxy, c->_callID, &error);
......@@ -869,9 +865,7 @@ dbus_accept (const callable_obj_t * c)
void
dbus_refuse (const callable_obj_t * c)
{
#if GTK_CHECK_VERSION(2,10,0)
status_tray_icon_blink (FALSE);
#endif
GError *error = NULL;
org_sflphone_SFLphone_CallManager_refuse (callManagerProxy, c->_callID, &error);
......
......@@ -7,9 +7,9 @@ libicons_la_SOURCES = icon_factory.c \
pixmap_data.h
libicons_la_LDFLAGS = $(DBUSGLIB_LDFLAGS) $(LIBNOTIFY_LDFLAGS) \
$(SFLGTK_LDFLAGS) $(SFLGLIB_LDFLAGS) $(WEBKIT_LDFLAGS) $(LIBGNOMEUI_LDFLAGS) \
$(GTK_LDFLAGS) $(GLIB_LDFLAGS) $(WEBKIT_LDFLAGS) $(LIBGNOMEUI_LDFLAGS) \
$(GNOMEDOCUTILS_LDFLAGS)
libicons_la_CFLAGS = $(DBUSGLIB_CFLAGS) $(LIBNOTIFY_CFLAGS) \
$(SFLGTK_CFLAGS) $(SFLGLIB_CFLAGS) $(WEBKIT_CFLAGS) $(LIBGNOMEUI_CFLAGS) \
$(GTK_CFLAGS) $(GLIB_CFLAGS) $(WEBKIT_CFLAGS) $(LIBGNOMEUI_CFLAGS) \
$(GNOMEDOCUTILS_CFLAGS)
......@@ -290,24 +290,8 @@ create_main_window()
g_timeout_add_seconds(1, calltree_update_clock, NULL);
// Configuration wizard
if (account_list_get_size() == 1) {
#if GTK_CHECK_VERSION(2,10,0)
if (account_list_get_size() == 1)
build_wizard();
#else
GtkWidget * dialog = gtk_message_dialog_new_with_markup(GTK_WINDOW(window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_YES_NO,
"<b><big>Welcome to SFLphone!</big></b>\n\nThere are no VoIP accounts configured, would you like to edit the preferences now?");
gint response = gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
if (response == GTK_RESPONSE_YES)
show_preferences_dialog();
#endif
}
// Restore position according to the configuration stored in gconf
gtk_window_move(GTK_WINDOW(window), position_x, position_y);
......
......@@ -56,9 +56,7 @@ create_new_gnome_notification (gchar *title, gchar *body, NotifyUrgency urgency,
notif.icon = gdk_pixbuf_new_from_file (LOGO_SMALL, NULL);
#ifdef LIBNOTIFY_VERSION_0_7_2
#else
#if GTK_CHECK_VERSION(2,10,0)
notify_notification_attach_to_status_icon (notif.notification , get_status_icon());
#endif
#endif
notify_notification_set_urgency (notif.notification, urgency);
......
......@@ -168,14 +168,8 @@ create_slider (const gchar * device)
ret = gtk_hbox_new (FALSE /*homogeneous*/, 5 /*spacing*/);
gtk_container_set_border_width (GTK_CONTAINER (ret), 5);
#if GTK_CHECK_VERSION(2,12,0)
if (g_strcmp0 (device , "speaker") == 0)
gtk_widget_set_tooltip_text (GTK_WIDGET (ret), _ ("Speakers volume"));
else
gtk_widget_set_tooltip_text (GTK_WIDGET (ret), _ ("Mic volume"));
#endif
gtk_widget_set_tooltip_text (GTK_WIDGET (ret),
!g_strcmp0 (device, "speaker") ? _("Speakers volume") : _("Mic volume"));
button[dev] = gtk_toggle_button_new();
gtk_box_pack_start (GTK_BOX (ret), button[dev], FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
......@@ -193,4 +187,3 @@ create_slider (const gchar * device)
return ret;
}
......@@ -36,7 +36,6 @@
#include <statusicon.h>
#include <eel-gconf-extensions.h>
#if GTK_CHECK_VERSION(2,10,0)
static GtkStatusIcon *status;
static GtkWidget *show_menu_item, *hangup_menu_item;
static gboolean __minimized = MINIMIZED;
......@@ -235,5 +234,3 @@ set_minimized (gboolean state)
__minimized = state;
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (show_menu_item), !state);
}
#endif
......@@ -32,8 +32,6 @@
#ifndef __STATUSICON_H__
#define __STATUSICON_H__
#if GTK_CHECK_VERSION(2,10,0)
#include <gtk/gtk.h>
#include <sflphone_const.h>
/**
......@@ -109,6 +107,4 @@ void statusicon_set_tooltip (void);
void status_tray_icon_online (gboolean online);
#endif // GTK_CHECK_VERSION
#endif
......@@ -754,9 +754,7 @@ stop_playback_record_cb(void)
static void
call_configuration_assistant(void * foo UNUSED)
{
#if GTK_CHECK_VERSION(2,10,0)
build_wizard();
#endif
}
static void
......@@ -1483,10 +1481,8 @@ show_edit_number(callable_obj_t *call)
// Set the number to be edited
editable_num_ = gtk_entry_new();
#if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text(editable_num_,
_("Edit the phone number before making a call"));
#endif
if (call)
gtk_entry_set_text(GTK_ENTRY(editable_num_), call->_peer_number);
......
......@@ -11,14 +11,14 @@ libwidget_la_SOURCES = \
imwidget.h
libwidget_la_LDFLAGS = $(DBUSGLIB_LDFLAGS) $(LIBNOTIFY_LDFLAGS) \
$(SFLGTK_LDFLAGS) $(SFLGLIB_LDFLAGS) $(WEBKIT_LDFLAGS) $(LIBGNOMEUI_LDFLAGS) \
$(GTK_LDFLAGS) $(GLIB_LDFLAGS) $(WEBKIT_LDFLAGS) $(LIBGNOMEUI_LDFLAGS) \
$(GNOMEDOCUTILS_LDFLAGS)
libwidget_la_LIBADD = $(DBUSGLIB_LIBS) $(LIBNOTIFY_LIBS)
$(SFLGTK_LIBS) $(SFLGLIB_LIBS) $(WEBKIT_LIBS) $(LIBGNOMEUI_LIBS) \
$(GTK_LIBS) $(GLIB_LIBS) $(WEBKIT_LIBS) $(LIBGNOMEUI_LIBS) \
$(GNOMEDOCUTILS_LIBS)
libwidget_la_CFLAGS = $(DBUSGLIB_CFLAGS) $(LIBNOTIFY_CFLAGS) \
$(SFLGTK_CFLAGS) $(SFLGLIB_CFLAGS) $(WEBKIT_CFLAGS) $(LIBEBOOK_CFLAGS) \
$(GTK_CFLAGS) $(GLIB_CFLAGS) $(WEBKIT_CFLAGS) $(LIBEBOOK_CFLAGS) \
$(LIBEDATASERVER_CFLAGS) $(LIBEDATASERVERUI_CFLAGS) $(LIBGNOMEUI_CFLAGS) \
$(GNOMEDOCUTILS_CFLAGS)
......@@ -65,8 +65,7 @@ pidgin_scroll_book_get_type (void)
static gboolean
scroll_left_cb (PidginScrollBook *scroll_book)
{
int index;
index = gtk_notebook_get_current_page (GTK_NOTEBOOK (scroll_book->notebook));
int index = gtk_notebook_get_current_page (GTK_NOTEBOOK (scroll_book->notebook));
if (index > 0)
gtk_notebook_set_current_page (GTK_NOTEBOOK (scroll_book->notebook), index - 1);
......@@ -77,13 +76,8 @@ scroll_left_cb (PidginScrollBook *scroll_book)
static gboolean
scroll_right_cb (PidginScrollBook *scroll_book)
{
int index, count;
index = gtk_notebook_get_current_page (GTK_NOTEBOOK (scroll_book->notebook));
#if GTK_CHECK_VERSION(2,2,0)
count = gtk_notebook_get_n_pages (GTK_NOTEBOOK (scroll_book->notebook));
#else
count = g_list_length (GTK_NOTEBOOK (scroll_book->notebook)->children);
#endif
int index = gtk_notebook_get_current_page (GTK_NOTEBOOK (scroll_book->notebook));
int count = gtk_notebook_get_n_pages (GTK_NOTEBOOK (scroll_book->notebook));
if (index + 1 < count)
gtk_notebook_set_current_page (GTK_NOTEBOOK (scroll_book->notebook), index + 1);
......@@ -94,8 +88,6 @@ scroll_right_cb (PidginScrollBook *scroll_book)
static void
refresh_scroll_box (PidginScrollBook *scroll_book, int index, int count)
{
char *label;
gtk_widget_show_all (GTK_WIDGET (scroll_book));
if (count < 1)
......@@ -110,33 +102,20 @@ refresh_scroll_box (PidginScrollBook *scroll_book, int index, int count)
}
}
label = g_strdup_printf ("<span size='smaller' weight='bold'>(%d/%d)</span>", index+1, count);
char *label = g_strdup_printf ("<span size='smaller' weight='bold'>(%d/%d)</span>", index+1, count);
gtk_label_set_markup (GTK_LABEL (scroll_book->label), label);
g_free (label);
if (index == 0)
gtk_widget_set_sensitive (scroll_book->left_arrow, FALSE);
else
gtk_widget_set_sensitive (scroll_book->left_arrow, TRUE);
if (index + 1 == count)
gtk_widget_set_sensitive (scroll_book->right_arrow, FALSE);
else
gtk_widget_set_sensitive (scroll_book->right_arrow, TRUE);
gtk_widget_set_sensitive (scroll_book->left_arrow, index != 0);
gtk_widget_set_sensitive (scroll_book->right_arrow, index + 1 != count);
}
static void
page_count_change_cb (PidginScrollBook *scroll_book)
{
int count;
int index = gtk_notebook_get_current_page (GTK_NOTEBOOK (scroll_book->notebook));
#if GTK_CHECK_VERSION(2,2,0)
count = gtk_notebook_get_n_pages (GTK_NOTEBOOK (scroll_book->notebook));
#else
count = g_list_length (GTK_NOTEBOOK (scroll_book->notebook)->children);
#endif
int count = gtk_notebook_get_n_pages (GTK_NOTEBOOK (scroll_book->notebook));
refresh_scroll_box (scroll_book, index, count);
}
......@@ -150,12 +129,7 @@ scroll_close_cb (PidginScrollBook *scroll_book)
static void
switch_page_cb (GtkNotebook *notebook UNUSED, GtkNotebookPage *page UNUSED, guint page_num, PidginScrollBook *scroll_book)
{
int count;
#if GTK_CHECK_VERSION(2,2,0)
count = gtk_notebook_get_n_pages (GTK_NOTEBOOK (scroll_book->notebook));
#else
count = g_list_length (GTK_NOTEBOOK (scroll_book->notebook)->children);
#endif
int count = gtk_notebook_get_n_pages (GTK_NOTEBOOK (scroll_book->notebook));
refresh_scroll_box (scroll_book, page_num, count);
}
......@@ -177,19 +151,14 @@ pidgin_scroll_book_add (GtkContainer *container, GtkWidget *widget)
static void
pidgin_scroll_book_remove (GtkContainer *container, GtkWidget *widget)
{
int page;
PidginScrollBook *scroll_book;
g_return_if_fail (GTK_IS_WIDGET (widget));
scroll_book = PIDGIN_SCROLL_BOOK (container);
PidginScrollBook *scroll_book = PIDGIN_SCROLL_BOOK (container);
scroll_book->children = g_list_remove (scroll_book->children, widget);
/* gtk_widget_unparent(widget); */
page = gtk_notebook_page_num (GTK_NOTEBOOK (PIDGIN_SCROLL_BOOK (container)->notebook), widget);
if (page >= 0) {
int page = gtk_notebook_page_num (GTK_NOTEBOOK (PIDGIN_SCROLL_BOOK (container)->notebook), widget);
if (page >= 0)
gtk_notebook_remove_page (GTK_NOTEBOOK (PIDGIN_SCROLL_BOOK (container)->notebook), page);
}
}
static void
......@@ -198,31 +167,14 @@ pidgin_scroll_book_forall (GtkContainer *container,
GtkCallback callback,
gpointer callback_data)
{
#if 0
GList *children;
#endif
PidginScrollBook *scroll_book;
g_return_if_fail (GTK_IS_CONTAINER (container));
scroll_book = PIDGIN_SCROLL_BOOK (container);
PidginScrollBook *scroll_book = PIDGIN_SCROLL_BOOK (container);
if (include_internals) {
(*callback) (scroll_book->hbox, callback_data);
(*callback) (scroll_book->notebook, callback_data);
}
#if 0
children = scroll_book->children;
while (children) {
GtkWidget *child;
child = children->data;
children = children->next;
(*callback) (child, callback_data);
}
#endif
}
static void