diff --git a/gtk/chat.c b/gtk/chat.c index 1f2234d72..c4fbffe36 100644 --- a/gtk/chat.c +++ b/gtk/chat.c @@ -23,6 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif +#ifdef WIN32 +#define F_OK 00 +#endif + #define NB_MSG_HIST 250 #define CONFIG_FILE ".linphone-history.db" diff --git a/gtk/friendlist.c b/gtk/friendlist.c index 70be2484f..3aafb3187 100644 --- a/gtk/friendlist.c +++ b/gtk/friendlist.c @@ -148,7 +148,7 @@ static void linphone_gtk_set_selection_to_uri_bar(GtkTreeView *treeview){ } } -void linphone_gtk_add_contact(){ +void linphone_gtk_add_contact(void){ GtkWidget *w=linphone_gtk_create_window("contact"); int presence_enabled=linphone_gtk_get_ui_config_int("use_subscribe_notify",1); diff --git a/gtk/incall_view.c b/gtk/incall_view.c index a44097ae0..f291afcb5 100644 --- a/gtk/incall_view.c +++ b/gtk/incall_view.c @@ -499,7 +499,7 @@ static void display_peer_name_in_label(GtkWidget *label, const LinphoneAddress * uri_label=g_markup_printf_escaped("%s\n",id); gtk_label_set_markup(GTK_LABEL(label),uri_label); g_free(uri_label); - g_free(id); + ms_free(id); } void linphone_gtk_in_call_view_set_calling(LinphoneCall *call){ diff --git a/gtk/linphone.h b/gtk/linphone.h index cfb52f5e7..e8a4b570a 100644 --- a/gtk/linphone.h +++ b/gtk/linphone.h @@ -83,121 +83,159 @@ GtkWidget*create_pixmap(const gchar *filename); GtkWidget *_gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio); GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio); -void linphone_gtk_destroy_window(GtkWidget *window); -GtkWidget *linphone_gtk_create_window(const char *window_name); -GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name); -GtkWidget *linphone_gtk_create_widget(const char *filename, const char *widget_name); +LINPHONE_PUBLIC void linphone_gtk_destroy_window(GtkWidget *window); +LINPHONE_PUBLIC GtkWidget *linphone_gtk_create_window(const char *window_name); +LINPHONE_PUBLIC GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name); +LINPHONE_PUBLIC GtkWidget *linphone_gtk_create_widget(const char *filename, const char *widget_name); const char *linphone_gtk_message_storage_get_db_file(const char *filename); -void linphone_gtk_show_assistant(void); -void linphone_gtk_close_assistant(void); +LINPHONE_PUBLIC void linphone_gtk_show_assistant(void); +LINPHONE_PUBLIC void linphone_gtk_close_assistant(void); -LinphoneCore *linphone_gtk_get_core(void); -GtkWidget *linphone_gtk_get_main_window(); -void linphone_gtk_display_something(GtkMessageType type,const gchar *message); -void linphone_gtk_start_call(GtkWidget *button); -void linphone_gtk_call_terminated(); -void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss); -void linphone_gtk_show_parameters(void); -void linphone_gtk_fill_soundcards(GtkWidget *pb); -void linphone_gtk_fill_webcams(GtkWidget *pb); -void linphone_gtk_load_identities(void); -void linphone_gtk_call_log_update(GtkWidget *w); -void linphone_gtk_create_log_window(void); -void linphone_gtk_log_show(void); -void linphone_gtk_show_main_window(void); -void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args); -void linphone_gtk_destroy_log_window(void); -void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to); -gboolean linphone_gtk_check_logs(); -const gchar *linphone_gtk_get_ui_config(const char *key, const char *def); -int linphone_gtk_get_ui_config_int(const char *key, int def); -void linphone_gtk_set_ui_config_int(const char *key , int val); -void linphone_gtk_visibility_set(const char *hiddens, const char *window_name, GtkWidget *w, gboolean show); +LINPHONE_PUBLIC LinphoneCore *linphone_gtk_get_core(void); +LINPHONE_PUBLIC GtkWidget *linphone_gtk_get_main_window(); +LINPHONE_PUBLIC void linphone_gtk_display_something(GtkMessageType type, const gchar *message); +LINPHONE_PUBLIC void linphone_gtk_start_call(GtkWidget *button); +LINPHONE_PUBLIC void linphone_gtk_call_terminated(); +LINPHONE_PUBLIC void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss); +LINPHONE_PUBLIC void linphone_gtk_show_parameters(void); +LINPHONE_PUBLIC void linphone_gtk_fill_soundcards(GtkWidget *pb); +LINPHONE_PUBLIC void linphone_gtk_fill_webcams(GtkWidget *pb); +LINPHONE_PUBLIC void linphone_gtk_load_identities(void); +LINPHONE_PUBLIC void linphone_gtk_call_log_update(GtkWidget *w); +LINPHONE_PUBLIC void linphone_gtk_create_log_window(void); +LINPHONE_PUBLIC void linphone_gtk_log_show(void); +LINPHONE_PUBLIC void linphone_gtk_show_main_window(void); +LINPHONE_PUBLIC void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args); +LINPHONE_PUBLIC void linphone_gtk_destroy_log_window(void); +LINPHONE_PUBLIC void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to); +LINPHONE_PUBLIC gboolean linphone_gtk_check_logs(); +LINPHONE_PUBLIC const gchar *linphone_gtk_get_ui_config(const char *key, const char *def); +LINPHONE_PUBLIC int linphone_gtk_get_ui_config_int(const char *key, int def); +LINPHONE_PUBLIC void linphone_gtk_set_ui_config_int(const char *key, int val); +LINPHONE_PUBLIC void linphone_gtk_visibility_set(const char *hiddens, const char *window_name, GtkWidget *w, gboolean show); -LinphoneLDAPContactProvider* linphone_gtk_get_ldap(void); -void linphone_gtk_set_ldap(LinphoneLDAPContactProvider* ldap); -int linphone_gtk_is_ldap_supported(void); +LINPHONE_PUBLIC LinphoneLDAPContactProvider* linphone_gtk_get_ldap(void); +LINPHONE_PUBLIC void linphone_gtk_set_ldap(LinphoneLDAPContactProvider* ldap); +LINPHONE_PUBLIC int linphone_gtk_is_ldap_supported(void); -void linphone_gtk_open_browser(const char *url); -void linphone_gtk_check_for_new_version(void); -const char *linphone_gtk_get_lang(const char *config_file); -void linphone_gtk_set_lang(const char *code); -SipSetupContext* linphone_gtk_get_default_sip_setup_context(void); -GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx); -void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw); -void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress); -void linphone_gtk_terminate_call(GtkWidget *button); -void linphone_gtk_call_update_tab_header(LinphoneCall *call,gboolean pause); -void linphone_gtk_show_directory_search(void); -void linphone_gtk_status_icon_set_blinking(gboolean val); -void linphone_gtk_notify(LinphoneCall *call, const char *msg); +LINPHONE_PUBLIC void linphone_gtk_open_browser(const char *url); +LINPHONE_PUBLIC void linphone_gtk_check_for_new_version(void); +LINPHONE_PUBLIC const char *linphone_gtk_get_lang(const char *config_file); +LINPHONE_PUBLIC void linphone_gtk_set_lang(const char *code); +LINPHONE_PUBLIC SipSetupContext* linphone_gtk_get_default_sip_setup_context(void); +LINPHONE_PUBLIC GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx); +LINPHONE_PUBLIC void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw); +LINPHONE_PUBLIC void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress); +LINPHONE_PUBLIC void linphone_gtk_terminate_call(GtkWidget *button); +LINPHONE_PUBLIC void linphone_gtk_call_update_tab_header(LinphoneCall *call, gboolean pause); +LINPHONE_PUBLIC void linphone_gtk_show_directory_search(void); +LINPHONE_PUBLIC void linphone_gtk_status_icon_set_blinking(gboolean val); +LINPHONE_PUBLIC void linphone_gtk_notify(LinphoneCall *call, const char *msg); -void linphone_gtk_load_chatroom(LinphoneChatRoom *cr,const LinphoneAddress *uri,GtkWidget *chat_view); -void linphone_gtk_send_text(); -GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *with); -LinphoneChatRoom * linphone_gtk_create_chatroom(const LinphoneAddress *with); -void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *msg); -void linphone_gtk_is_composing_received(LinphoneCore *lc, LinphoneChatRoom *room); +LINPHONE_PUBLIC void linphone_gtk_load_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *uri, GtkWidget *chat_view); +LINPHONE_PUBLIC void linphone_gtk_send_text(); +LINPHONE_PUBLIC GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *with); +LINPHONE_PUBLIC LinphoneChatRoom * linphone_gtk_create_chatroom(const LinphoneAddress *with); +LINPHONE_PUBLIC void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *msg); +LINPHONE_PUBLIC void linphone_gtk_is_composing_received(LinphoneCore *lc, LinphoneChatRoom *room); -void linphone_gtk_friend_list_update_chat_picture(); -void linphone_gtk_friend_list_set_chat_conversation(const LinphoneAddress *la); -gboolean linphone_gtk_friend_list_is_contact(const LinphoneAddress *addr); -void linphone_gtk_friend_list_set_active_address(const LinphoneAddress *addr); -const LinphoneAddress *linphone_gtk_friend_list_get_active_address(void); -void linphone_gtk_notebook_tab_select(GtkNotebook *notebook,GtkWidget *page,guint page_num, gpointer data); -void linphone_gtk_show_friends(void); -void linphone_gtk_show_contact(LinphoneFriend *lf); -void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf); +LINPHONE_PUBLIC void linphone_gtk_friend_list_update_chat_picture(); +LINPHONE_PUBLIC void linphone_gtk_friend_list_set_chat_conversation(const LinphoneAddress *la); +LINPHONE_PUBLIC gboolean linphone_gtk_friend_list_is_contact(const LinphoneAddress *addr); +LINPHONE_PUBLIC void linphone_gtk_friend_list_set_active_address(const LinphoneAddress *addr); +LINPHONE_PUBLIC const LinphoneAddress *linphone_gtk_friend_list_get_active_address(void); +LINPHONE_PUBLIC void linphone_gtk_notebook_tab_select(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer data); +LINPHONE_PUBLIC void linphone_gtk_show_friends(void); +LINPHONE_PUBLIC void linphone_gtk_show_contact(LinphoneFriend *lf); +LINPHONE_PUBLIC void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf); /*functions controlling the different views*/ -gboolean linphone_gtk_use_in_call_view(); -LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf); -void linphone_gtk_create_in_call_view(LinphoneCall *call); -void linphone_gtk_in_call_view_set_calling(LinphoneCall *call); -void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call); -void linphone_gtk_in_call_view_update_duration(LinphoneCall *call); -void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_msg); -void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call); -void linphone_gtk_in_call_view_set_paused(LinphoneCall *call); -void linphone_gtk_in_call_view_set_transfer_status(LinphoneCall *call,LinphoneCallState cstate); -void linphone_gtk_mute_clicked(GtkButton *button); -void transfer_button_clicked(GtkWidget *button, gpointer call_ref); -void linphone_gtk_enable_mute_button(GtkButton *button, gboolean sensitive); -void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gboolean holdon); -void linphone_gtk_enable_transfer_button(LinphoneCore *lc, gboolean value); -void linphone_gtk_enable_conference_button(LinphoneCore *lc, gboolean value); -void linphone_gtk_set_in_conference(LinphoneCall *call); -void linphone_gtk_unset_from_conference(LinphoneCall *call); -void linphone_gtk_terminate_conference_participant(LinphoneCall *call); -void linphone_gtk_in_call_view_show_encryption(LinphoneCall *call); -void linphone_gtk_update_video_button(LinphoneCall *call); -void linphone_gtk_init_audio_meter(GtkWidget *w, get_volume_t get_volume, void *data); -void linphone_gtk_uninit_audio_meter(GtkWidget *w); +LINPHONE_PUBLIC gboolean linphone_gtk_use_in_call_view(); +LINPHONE_PUBLIC LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf); +LINPHONE_PUBLIC void linphone_gtk_create_in_call_view(LinphoneCall *call); +LINPHONE_PUBLIC void linphone_gtk_in_call_view_set_calling(LinphoneCall *call); +LINPHONE_PUBLIC void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call); +LINPHONE_PUBLIC void linphone_gtk_in_call_view_update_duration(LinphoneCall *call); +LINPHONE_PUBLIC void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_msg); +LINPHONE_PUBLIC void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call); +LINPHONE_PUBLIC void linphone_gtk_in_call_view_set_paused(LinphoneCall *call); +LINPHONE_PUBLIC void linphone_gtk_in_call_view_set_transfer_status(LinphoneCall *call, LinphoneCallState cstate); +LINPHONE_PUBLIC void linphone_gtk_mute_clicked(GtkButton *button); +LINPHONE_PUBLIC void transfer_button_clicked(GtkWidget *button, gpointer call_ref); +LINPHONE_PUBLIC void linphone_gtk_enable_mute_button(GtkButton *button, gboolean sensitive); +LINPHONE_PUBLIC void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gboolean holdon); +LINPHONE_PUBLIC void linphone_gtk_enable_transfer_button(LinphoneCore *lc, gboolean value); +LINPHONE_PUBLIC void linphone_gtk_enable_conference_button(LinphoneCore *lc, gboolean value); +LINPHONE_PUBLIC void linphone_gtk_set_in_conference(LinphoneCall *call); +LINPHONE_PUBLIC void linphone_gtk_unset_from_conference(LinphoneCall *call); +LINPHONE_PUBLIC void linphone_gtk_terminate_conference_participant(LinphoneCall *call); +LINPHONE_PUBLIC void linphone_gtk_in_call_view_show_encryption(LinphoneCall *call); +LINPHONE_PUBLIC void linphone_gtk_update_video_button(LinphoneCall *call); +LINPHONE_PUBLIC void linphone_gtk_init_audio_meter(GtkWidget *w, get_volume_t get_volume, void *data); +LINPHONE_PUBLIC void linphone_gtk_uninit_audio_meter(GtkWidget *w); -void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg, gboolean disable_auto_login); -void linphone_gtk_exit_login_frame(void); -void linphone_gtk_set_ui_config(const char *key, const char *value); +LINPHONE_PUBLIC void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg, gboolean disable_auto_login); +LINPHONE_PUBLIC void linphone_gtk_exit_login_frame(void); +LINPHONE_PUBLIC void linphone_gtk_set_ui_config(const char *key, const char *value); -void linphone_gtk_log_uninit(); +LINPHONE_PUBLIC void linphone_gtk_log_uninit(); -bool_t linphone_gtk_init_instance(const char *app_name, int option, const char *addr_to_call); -void linphone_gtk_uninit_instance(void); -void linphone_gtk_monitor_usb(void); -void linphone_gtk_unmonitor_usb(void); +LINPHONE_PUBLIC bool_t linphone_gtk_init_instance(const char *app_name, int option, const char *addr_to_call); +LINPHONE_PUBLIC void linphone_gtk_uninit_instance(void); +LINPHONE_PUBLIC void linphone_gtk_monitor_usb(void); +LINPHONE_PUBLIC void linphone_gtk_unmonitor_usb(void); -void linphone_gtk_fill_combo_box(GtkWidget *combo, const char **devices, const char *selected, DeviceCap cap); -gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_conference); -void linphone_gtk_schedule_restart(void); +LINPHONE_PUBLIC void linphone_gtk_fill_combo_box(GtkWidget *combo, const char **devices, const char *selected, DeviceCap cap); +LINPHONE_PUBLIC gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_conference); +LINPHONE_PUBLIC void linphone_gtk_schedule_restart(void); -void linphone_gtk_show_audio_assistant(void); +LINPHONE_PUBLIC void linphone_gtk_show_audio_assistant(void); gboolean linphone_gtk_get_audio_assistant_option(void); -void linphone_gtk_set_configuration_uri(void); -GtkWidget * linphone_gtk_show_config_fetching(void); -void linphone_gtk_close_config_fetching(GtkWidget *w, LinphoneConfiguringState state); -const char *linphone_gtk_get_sound_path(const char *file); -void linphone_gtk_in_call_show_video(LinphoneCall *call); -char *linphone_gtk_address(const LinphoneAddress *addr);/*return human readable identifier for a LinphoneAddress */ -GtkWidget *linphone_gtk_get_camera_preview_window(void); +LINPHONE_PUBLIC void linphone_gtk_set_configuration_uri(void); +LINPHONE_PUBLIC GtkWidget * linphone_gtk_show_config_fetching(void); +LINPHONE_PUBLIC void linphone_gtk_close_config_fetching(GtkWidget *w, LinphoneConfiguringState state); +LINPHONE_PUBLIC const char *linphone_gtk_get_sound_path(const char *file); +LINPHONE_PUBLIC void linphone_gtk_in_call_show_video(LinphoneCall *call); +LINPHONE_PUBLIC char *linphone_gtk_address(const LinphoneAddress *addr);/*return human readable identifier for a LinphoneAddress */ +LINPHONE_PUBLIC GtkWidget *linphone_gtk_get_camera_preview_window(void); +LINPHONE_PUBLIC void linphone_gtk_login_frame_connect_clicked(GtkWidget *button); + +LINPHONE_PUBLIC gboolean linphone_gtk_call_log_reset_missed_call(GtkWidget *w, GdkEvent *event, gpointer user_data); +LINPHONE_PUBLIC void linphone_gtk_history_row_activated(GtkWidget *treeview); +LINPHONE_PUBLIC void linphone_gtk_history_row_selected(GtkWidget *treeview); +LINPHONE_PUBLIC void linphone_gtk_clear_call_logs(GtkWidget *button); +LINPHONE_PUBLIC void linphone_gtk_add_contact(void); +LINPHONE_PUBLIC void linphone_gtk_contact_activated(GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data); +LINPHONE_PUBLIC void linphone_gtk_contact_clicked(GtkTreeView *treeview); +LINPHONE_PUBLIC void linphone_gtk_add_button_clicked(void); +LINPHONE_PUBLIC void linphone_gtk_edit_button_clicked(GtkWidget *button); +LINPHONE_PUBLIC void linphone_gtk_remove_button_clicked(GtkWidget *button); +LINPHONE_PUBLIC void linphone_gtk_my_presence_clicked(GtkWidget *button); +LINPHONE_PUBLIC void linphone_gtk_directory_search_button_clicked(GtkWidget *button); +LINPHONE_PUBLIC gboolean linphone_gtk_popup_contact_menu(GtkWidget *list, GdkEventButton *event); +LINPHONE_PUBLIC gboolean linphone_gtk_contact_list_button_pressed(GtkWidget *widget, GdkEventButton *event); +LINPHONE_PUBLIC void linphone_gtk_auth_token_verified_clicked(GtkButton *button); +LINPHONE_PUBLIC void linphone_gtk_hold_clicked(GtkButton *button); +LINPHONE_PUBLIC void linphone_gtk_record_call_toggled(GtkWidget *button); +LINPHONE_PUBLIC void linphone_gtk_log_hide(void); +LINPHONE_PUBLIC void linphone_gtk_log_scroll_to_end(GtkToggleButton *button); +LINPHONE_PUBLIC void linphone_gtk_log_clear(void); +LINPHONE_PUBLIC void linphone_gtk_logout_clicked(void); + +LINPHONE_PUBLIC void linphone_gtk_about_response(GtkDialog *dialog, gint id); +LINPHONE_PUBLIC void linphone_gtk_show_about(void); +LINPHONE_PUBLIC void linphone_gtk_start_call(GtkWidget *w); +LINPHONE_PUBLIC void linphone_gtk_uri_bar_activate(GtkWidget *w); +LINPHONE_PUBLIC void linphone_gtk_terminate_call(GtkWidget *button); +LINPHONE_PUBLIC void linphone_gtk_decline_clicked(GtkWidget *button); +LINPHONE_PUBLIC void linphone_gtk_answer_clicked(GtkWidget *button); +LINPHONE_PUBLIC void linphone_gtk_enable_video(GtkWidget *w); +LINPHONE_PUBLIC void linphone_gtk_enable_self_view(GtkWidget *w); +LINPHONE_PUBLIC void linphone_gtk_used_identity_changed(GtkWidget *w); +LINPHONE_PUBLIC void on_proxy_refresh_button_clicked(GtkWidget *w); +LINPHONE_PUBLIC void linphone_gtk_link_to_website(GtkWidget *item); +LINPHONE_PUBLIC void linphone_gtk_options_activate(GtkWidget *item); +LINPHONE_PUBLIC void linphone_gtk_create_keypad(GtkWidget *button); diff --git a/gtk/logging.c b/gtk/logging.c index c5eb883c0..c91f51138 100644 --- a/gtk/logging.c +++ b/gtk/logging.c @@ -202,7 +202,7 @@ static void linphone_gtk_log_file(OrtpLogLevel lev, const char *msg) } } -void linphone_gtk_log_hide(){ +void linphone_gtk_log_hide(void){ if (log_window) gtk_widget_hide(log_window); } diff --git a/gtk/loginframe.c b/gtk/loginframe.c index 7b6bd0c2b..727a746d1 100644 --- a/gtk/loginframe.c +++ b/gtk/loginframe.c @@ -19,7 +19,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "linphone.h" -void linphone_gtk_login_frame_connect_clicked(GtkWidget *button); void test_button_clicked_cb(GtkWidget *button); void linphone_gtk_exit_login_frame(void); @@ -122,7 +121,7 @@ void linphone_gtk_exit_login_frame(void){ gtk_widget_show(linphone_gtk_get_widget(mw,"disconnect_item")); } -void linphone_gtk_logout_clicked(){ +void linphone_gtk_logout_clicked(void){ LinphoneCore *lc=linphone_gtk_get_core(); LinphoneProxyConfig *cfg=NULL; linphone_core_get_default_proxy(lc,&cfg); diff --git a/gtk/main.c b/gtk/main.c index f840435cc..7f649ddd2 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -27,7 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include +#ifndef WIN32 #include +#endif #ifdef HAVE_GTK_OSX #include @@ -35,6 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifdef WIN32 #define chdir _chdir +#define F_OK 00 #include "direct.h" #endif @@ -538,7 +541,7 @@ static void about_url_clicked(GtkAboutDialog *dialog, const char *url, gpointer linphone_gtk_open_browser(url); } -void linphone_gtk_show_about(){ +void linphone_gtk_show_about(void){ struct stat filestat; const char *license_file=PACKAGE_DATA_DIR "/linphone/COPYING"; GtkWidget *about; @@ -2166,7 +2169,7 @@ int main(int argc, char *argv[]){ g_critical("%s", error->message); return -1; } - if (config_file) free(config_file); + if (config_file) g_free(config_file); if (custom_config_file && !g_path_is_absolute(custom_config_file)) { gchar *res = g_get_current_dir(); res = g_strjoin(G_DIR_SEPARATOR_S, res, custom_config_file, NULL); @@ -2257,7 +2260,7 @@ core_start: restart=FALSE; goto core_start; } - if (config_file) free(config_file); + if (config_file) g_free(config_file); #ifndef HAVE_GTK_OSX /*workaround a bug on win32 that makes status icon still present in the systray even after program exit.*/ if (icon) gtk_status_icon_set_visible(icon,FALSE);