Merge branch 'master' of git.linphone.org:linphone

Conflicts:
	coreapi/lpconfig.c
This commit is contained in:
Simon Morlat 2015-08-10 23:08:51 +02:00
commit 232413d646
21 changed files with 1653 additions and 1623 deletions

View file

@ -728,91 +728,133 @@ const char* lp_config_get_default_string(const LpConfig *lpconfig, const char *s
return lp_config_get_string(lpconfig, default_section, key, default_value);
}
static char *_lp_config_dirname(char *path) {
/*
* WARNING: this function is very dangerous.
* Read carefuly the folowing notices:
* 1. The 'path' parameter may be modify by
* the function. Be care to keep a copy of
* the original string.
* 2. The return pointer may points on a part of
* 'path'. So, be care to not free the string
* pointed by 'path' before the last used of
* the returned pointer.
* 3. Do not feed it after midnight
*/
static const char *_lp_config_dirname(char *path) {
#ifdef _MSC_VER
char drive[_MAX_DRIVE];
char dir[_MAX_DIR];
char fname[_MAX_FNAME];
char ext[_MAX_EXT];
static char dirname[_MAX_DRIVE + _MAX_DIR];
_splitpath(path, drive, dir, fname, ext);
return ms_strdup_printf("%s%s", drive, dir);
snprintf(dirname, sizeof(dirname), "%s%s", drive, dir);
return dirname;
#else
char *tmp = ms_strdup(path);
char *dir = ms_strdup(dirname(tmp));
ms_free(tmp);
return dir;
return dirname(path);
#endif
}
bool_t lp_config_relative_file_exists(const LpConfig *lpconfig, const char *filename) {
bool_t ret = FALSE;
if (lpconfig->filename) {
char *dir = _lp_config_dirname(lpconfig->filename);
if (lpconfig->filename == NULL) {
return FALSE;
} else {
char *filename = ms_strdup(lpconfig->filename);
const char *dir = _lp_config_dirname(filename);
char *filepath = ms_strdup_printf("%s/%s", dir, filename);
char *realfilepath = lp_realpath(filepath, NULL);
if (realfilepath){
FILE *file = fopen(realfilepath, "r");
ms_free(realfilepath);
if (file){
ret = TRUE;
fclose(file);
}
}
ms_free(dir);
FILE *file;
ms_free(filename);
ms_free(filepath);
if(realfilepath == NULL) return FALSE;
file = fopen(realfilepath, "r");
ms_free(realfilepath);
if (file) {
fclose(file);
}
return file != NULL;
}
return ret;
}
void lp_config_write_relative_file(const LpConfig *lpconfig, const char *filename, const char *data) {
char *dup_config_file = NULL;
const char *dir = NULL;
char *filepath = NULL;
char *realfilepath = NULL;
FILE *file;
if (lpconfig->filename == NULL) return;
if(strlen(data) > 0) {
char *dir = _lp_config_dirname(lpconfig->filename);
char *filepath = ms_strdup_printf("%s/%s", dir, filename);
char *realfilepath = lp_realpath(filepath, NULL);
FILE *file = fopen(realfilepath, "w");
if(file != NULL) {
fprintf(file, "%s", data);
fclose(file);
} else {
ms_error("Could not open %s for write", realfilepath);
}
ms_free(dir);
ms_free(filepath);
ms_free(realfilepath);
} else {
if(strlen(data) == 0) {
ms_warning("%s has not been created because there is no data to write", filename);
return;
}
dup_config_file = ms_strdup(lpconfig->filename);
dir = _lp_config_dirname(dup_config_file);
filepath = ms_strdup_printf("%s/%s", dir, filename);
realfilepath = lp_realpath(filepath, NULL);
if(realfilepath == NULL) {
ms_error("Could not resolv %s: %s", filepath, strerror(errno));
goto end;
}
file = fopen(realfilepath, "w");
if(file == NULL) {
ms_error("Could not open %s for write", realfilepath);
goto end;
}
fprintf(file, "%s", data);
fclose(file);
end:
ms_free(dup_config_file);
ms_free(filepath);
if(realfilepath) ms_free(realfilepath);
}
int lp_config_read_relative_file(const LpConfig *lpconfig, const char *filename, char *data, size_t max_length) {
char *dir;
char *filepath;
FILE *file;
char* realfilepath;
char *dup_config_file = NULL;
const char *dir = NULL;
char *filepath = NULL;
FILE *file = NULL;
char* realfilepath = NULL;
if (lpconfig->filename == NULL) return -1;
dir = _lp_config_dirname(lpconfig->filename);
dup_config_file = ms_strdup(lpconfig->filename);
dir = _lp_config_dirname(dup_config_file);
filepath = ms_strdup_printf("%s/%s", dir, filename);
realfilepath = lp_realpath(filepath, NULL);
if(realfilepath == NULL) {
ms_error("Could not resolv %s: %s", filepath, strerror(errno));
goto err;
}
file = fopen(realfilepath, "r");
if(file != NULL) {
if(fread(data, 1, max_length, file)<=0) {
ms_error("%s could not be loaded. %s", realfilepath, strerror(errno));
goto err;
}
fclose(file);
} else {
if(file == NULL) {
ms_error("Could not open %s for read. %s", realfilepath, strerror(errno));
goto err;
}
ms_free(dir);
if(fread(data, 1, max_length, file)<=0) {
ms_error("%s could not be loaded. %s", realfilepath, strerror(errno));
goto err;
}
fclose(file);
ms_free(dup_config_file);
ms_free(filepath);
ms_free(realfilepath);
return 0;
err:
ms_free(dir);
ms_free(filepath);
ms_free(realfilepath);
ms_free(filepath);
if(realfilepath) ms_free(realfilepath);
return -1;
}

4
gtk/.directory Normal file
View file

@ -0,0 +1,4 @@
[Dolphin]
Timestamp=2015,8,9,21,25,40
Version=3
ViewMode=2

View file

@ -39,10 +39,11 @@ set(UI_FILES
sip_account.ui
tunnel_config.ui
waiting.ui
chat_view.ui
in_call_view.ui
conf_view.ui
conf_callee_view.ui
chatroom_frame.ui
in_call_frame.ui
conf_frame.ui
callee_frame.ui
login_frame.ui
)
set(PIXMAPS stock_people.png)

View file

@ -16,10 +16,11 @@ UI_FILES= about.ui \
config-uri.ui \
provisioning-fetch.ui \
audio_assistant.ui \
chat_view.ui \
in_call_view.ui \
conf_view.ui \
conf_callee_view.ui
chatroom_frame.ui \
in_call_frame.ui \
conf_frame.ui \
callee_frame.ui \
login_frame.ui
PIXMAPS= \
stock_people.png

84
gtk/callee_frame.ui Normal file
View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkFrame" id="callee_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment_conf">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkAlignment" id="conf_alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkHBox" id="conf_hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="conf_hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="conference_control">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="callee_name_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Callee name&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="justify">right</property>
<property name="ellipsize">end</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="sound_indicator">
<property name="width_request">90</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
</interface>

View file

@ -481,7 +481,7 @@ static gboolean copy_uri_into_clipboard_handler(GtkMenuItem *menuitem, gpointer
}
GtkWidget* linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *with){
GtkWidget *chat_view=linphone_gtk_create_widget("chat_view","chatroom_frame");
GtkWidget *chat_view=linphone_gtk_create_widget("chatroom_frame");
GtkWidget *main_window=linphone_gtk_get_main_window();
GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
GtkWidget *text=linphone_gtk_get_widget(chat_view,"textview");

View file

@ -1,118 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.18"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="dummy_chat_window">
<property name="can_focus">False</property>
<child>
<object class="GtkFrame" id="chatroom_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<child>
<object class="GtkTextView" id="textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">4</property>
<property name="editable">False</property>
<property name="wrap_mode">word-char</property>
<property name="cursor_visible">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkEntry" id="text_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="send">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
<object class="GtkHBox" id="hbox11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="send_picture">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-ok</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Send</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">7</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

113
gtk/chatroom_frame.ui Normal file
View file

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.18"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkFrame" id="chatroom_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<child>
<object class="GtkTextView" id="textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">4</property>
<property name="editable">False</property>
<property name="wrap_mode">word-char</property>
<property name="cursor_visible">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkEntry" id="text_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="send">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
<object class="GtkHBox" id="hbox11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="send_picture">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-ok</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Send</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">7</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
</interface>

View file

@ -1,89 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="dummy_callee_frame">
<property name="can_focus">False</property>
<child>
<object class="GtkFrame" id="callee_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment_conf">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkAlignment" id="conf_alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkHBox" id="conf_hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="conf_hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="conference_control">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="callee_name_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Callee name&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="justify">right</property>
<property name="ellipsize">end</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="sound_indicator">
<property name="width_request">90</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

86
gtk/conf_frame.ui Normal file
View file

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkFrame" id="conf_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkVBox" id="conf_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHButtonBox" id="button_conf">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="terminate_conf">
<property name="label" translatable="yes">End conference</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="conf_record_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToggleButton" id="conf_record_button">
<property name="label">gtk-media-record</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<signal name="toggled" handler="linphone_gtk_record_call_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="conf_record_status">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="wrap">True</property>
<property name="wrap_mode">char</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

View file

@ -1,91 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="dummy_conf_window">
<property name="can_focus">False</property>
<child>
<object class="GtkFrame" id="conf_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkVBox" id="conf_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHButtonBox" id="button_conf">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="terminate_conf">
<property name="label" translatable="yes">End conference</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="conf_record_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToggleButton" id="conf_record_button">
<property name="label">gtk-media-record</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<signal name="toggled" handler="linphone_gtk_record_call_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="conf_record_status">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="wrap">True</property>
<property name="wrap_mode">char</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View file

@ -81,7 +81,7 @@ static GtkWidget *find_conferencee_from_call(LinphoneCall *call){
static GtkWidget * create_conference_panel(void){
GtkWidget *mw=linphone_gtk_get_main_window();
GtkWidget *conf_frame=linphone_gtk_create_widget("conf_view","conf_frame");
GtkWidget *conf_frame=linphone_gtk_create_widget("conf_frame");
GtkWidget *conf_box=linphone_gtk_get_widget(conf_frame,"conf_box");
GtkWidget *button_conf=linphone_gtk_get_widget(conf_frame,"terminate_conf");
GtkWidget *image=create_pixmap("stopcall-small.png");
@ -94,7 +94,7 @@ static GtkWidget * create_conference_panel(void){
g_object_set_data(G_OBJECT(mw),"conf_frame",(gpointer)conf_frame);
box=gtk_vbox_new(FALSE,0);
participant=linphone_gtk_create_widget("conf_callee_view","callee_frame");
participant=linphone_gtk_create_widget("callee_frame");
gtk_widget_show(participant);
gtk_box_set_homogeneous(GTK_BOX(box),TRUE);
init_local_participant(participant);
@ -126,7 +126,7 @@ void linphone_gtk_set_in_conference(LinphoneCall *call){
const LinphoneAddress *addr=linphone_call_get_remote_address(call);
gchar *markup;
participant=linphone_gtk_create_widget("conf_callee_view","callee_frame");
participant=linphone_gtk_create_widget("callee_frame");
gtk_widget_show(participant);
if (linphone_address_get_display_name(addr)!=NULL){
markup=g_strdup_printf("<b>%s</b>",linphone_address_get_display_name(addr));

426
gtk/in_call_frame.ui Normal file
View file

@ -0,0 +1,426 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkFrame" id="in_call_frame">
<property name="can_focus">False</property>
<property name="extension_events">cursor</property>
<property name="label_xalign">0.5</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
<object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="in_call_uri">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="justify">center</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="in_call_animation">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="encryption_box">
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="dialog_authenticator_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-authentication</property>
<property name="icon-size">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="encryption_status_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-apply</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="encryption_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="encryption_verify_button">
<property name="label" translatable="yes">Set verified</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_auth_token_verified_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="incall_audioview">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="incall_mic_vol_control">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkVolumeButton" id="incall_mic_vol_ctrl_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<property name="orientation">vertical</property>
<property name="icons">linphone-micro-enabled</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="mic_audiolevel">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="padding">10</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="incall_spk_vol_control">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkVolumeButton" id="incall_spk_vol_ctrl_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Click here to set the speakers volume</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<property name="orientation">vertical</property>
<property name="icons">linphone-speaker-enabled</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="spk_audiolevel">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="padding">10</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkHButtonBox" id="answer_decline_panel">
<property name="can_focus">False</property>
<property name="layout_style">spread</property>
<child>
<object class="GtkButton" id="accept_call">
<property name="label" translatable="yes">Answer</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_answer_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="decline_call">
<property name="label" translatable="yes">Decline</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_decline_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="record_hbox">
<property name="can_focus">False</property>
<child>
<object class="GtkToggleButton" id="record_button">
<property name="label">gtk-media-record</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Record this call to an audio file</property>
<property name="use_stock">True</property>
<signal name="toggled" handler="linphone_gtk_record_call_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="record_status">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="wrap">True</property>
<property name="wrap_mode">char</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkTable" id="buttons_panel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="video_button">
<property name="label" translatable="yes">Video</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
</child>
<child>
<object class="GtkButton" id="hold_call">
<property name="label" translatable="yes">Pause</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_hold_clicked" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="incall_mute">
<property name="label" translatable="yes">Mute</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_mute_clicked" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="transfer_button">
<property name="label" translatable="yes">Transfer</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="terminate_call">
<property name="label" translatable="yes">Hang up</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_terminate_call" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="conference_button">
<property name="label" translatable="yes">Conference</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">7</property>
<property name="position">6</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkHBox" id="heading_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkLabel" id="in_call_status">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">In call</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="in_call_duration">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Duration</property>
<property name="justify">center</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="quality_indicator">
<property name="width_request">90</property>
<property name="height_request">10</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes">Call quality rating</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View file

@ -1,431 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="dummy_in_call_window">
<property name="can_focus">False</property>
<child>
<object class="GtkFrame" id="in_call_frame">
<property name="can_focus">False</property>
<property name="extension_events">cursor</property>
<property name="label_xalign">0.5</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
<object class="GtkVBox" id="vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="in_call_uri">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="justify">center</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="in_call_animation">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="encryption_box">
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="dialog_authenticator_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-authentication</property>
<property name="icon-size">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkImage" id="encryption_status_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-apply</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="encryption_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="encryption_verify_button">
<property name="label" translatable="yes">Set verified</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_auth_token_verified_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="incall_audioview">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="incall_mic_vol_control">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkVolumeButton" id="incall_mic_vol_ctrl_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<property name="orientation">vertical</property>
<property name="icons">linphone-micro-enabled</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="mic_audiolevel">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="padding">10</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="incall_spk_vol_control">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkVolumeButton" id="incall_spk_vol_ctrl_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="tooltip_text" translatable="yes">Click here to set the speakers volume</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<property name="orientation">vertical</property>
<property name="icons">linphone-speaker-enabled</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="spk_audiolevel">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="padding">10</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkHButtonBox" id="answer_decline_panel">
<property name="can_focus">False</property>
<property name="layout_style">spread</property>
<child>
<object class="GtkButton" id="accept_call">
<property name="label" translatable="yes">Answer</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_answer_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="decline_call">
<property name="label" translatable="yes">Decline</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_decline_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="record_hbox">
<property name="can_focus">False</property>
<child>
<object class="GtkToggleButton" id="record_button">
<property name="label">gtk-media-record</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Record this call to an audio file</property>
<property name="use_stock">True</property>
<signal name="toggled" handler="linphone_gtk_record_call_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="record_status">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="wrap">True</property>
<property name="wrap_mode">char</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkTable" id="buttons_panel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
<property name="n_columns">3</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="video_button">
<property name="label" translatable="yes">Video</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
</child>
<child>
<object class="GtkButton" id="hold_call">
<property name="label" translatable="yes">Pause</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_hold_clicked" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="incall_mute">
<property name="label" translatable="yes">Mute</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_mute_clicked" swapped="no"/>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="transfer_button">
<property name="label" translatable="yes">Transfer</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="terminate_call">
<property name="label" translatable="yes">Hang up</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_terminate_call" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="conference_button">
<property name="label" translatable="yes">Conference</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">7</property>
<property name="position">6</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkHBox" id="heading_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkLabel" id="in_call_status">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">In call</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="in_call_duration">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Duration</property>
<property name="justify">center</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="quality_indicator">
<property name="width_request">90</property>
<property name="height_request">10</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="tooltip_text" translatable="yes">Call quality rating</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View file

@ -361,7 +361,7 @@ void linphone_gtk_enable_video_button(LinphoneCall *call, gboolean sensitive, gb
}
void linphone_gtk_create_in_call_view(LinphoneCall *call){
GtkWidget *call_view=linphone_gtk_create_widget("in_call_view","in_call_frame");
GtkWidget *call_view=linphone_gtk_create_widget("in_call_frame");
GtkWidget *main_window=linphone_gtk_get_main_window ();
GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
static int call_index=1;

View file

@ -98,7 +98,7 @@ GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint
LINPHONE_PUBLIC void linphone_gtk_destroy_window(GtkWidget *window);
LINPHONE_PUBLIC GtkWidget *linphone_gtk_create_window(const char *window_name, GtkWidget *parent);
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);
LINPHONE_PUBLIC GtkWidget *linphone_gtk_create_widget(const char* widget_name);
const char *linphone_gtk_message_storage_get_db_file(const char *filename);
LINPHONE_PUBLIC void linphone_gtk_show_assistant(GtkWidget* parent);
@ -212,7 +212,7 @@ 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 void linphone_gtk_login_frame_connect_clicked(GtkWidget *button, GtkWidget *login_frame);
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);

250
gtk/login_frame.ui Normal file
View file

@ -0,0 +1,250 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkFrame" id="login_frame">
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">etched-out</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="login_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-missing-image</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">5</property>
<property name="n_columns">2</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Username</property>
</object>
</child>
<child>
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Password</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label13">
<property name="can_focus">False</property>
<property name="label" translatable="yes">Internet connection:</property>
</object>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="login_username">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="login_password">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="login_internet_kind">
<property name="can_focus">False</property>
<property name="active">0</property>
<child>
<object class="GtkCellRendererText" id="renderer4"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="automatic_login">
<property name="label" translatable="yes">Automatically log me in</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="userid">
<property name="can_focus">False</property>
<property name="label" translatable="yes">UserID</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="login_userid">
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="login_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Login information</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">10</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHButtonBox" id="hbuttonbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="login_connect">
<property name="label">gtk-connect</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="linphone_gtk_login_frame_connect_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Welcome!&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<object class="GtkListStore" id="model4">
<columns>
<!-- column-name gchararray -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">ADSL</col>
</row>
<row>
<col id="0" translatable="yes">Fiber Channel</col>
</row>
</data>
</object>
</interface>

View file

@ -48,47 +48,35 @@ static gboolean do_login_noprompt(LinphoneProxyConfig *cfg){
return FALSE;
}
void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg, gboolean disable_auto_login){
GtkWidget *mw=linphone_gtk_get_main_window();
GtkWidget *label=linphone_gtk_get_widget(mw,"login_label");
const LinphoneAuthInfo *ai;
static void linphone_gtk_init_login_frame(GtkWidget *login_frame, LinphoneProxyConfig *cfg) {
gboolean auto_login=linphone_gtk_get_ui_config_int("automatic_login",0);
const char *login_image=linphone_gtk_get_ui_config("login_image","linphone-banner.png");
GtkWidget *label=linphone_gtk_get_widget(login_frame,"login_label");
LinphoneCore *lc=linphone_gtk_get_core();
gchar *str;
LinphoneAddress *from;
LinphoneCore *lc=linphone_gtk_get_core();
const LinphoneAuthInfo *ai;
const char *passwd=NULL;
const char *userid=NULL;
gboolean auto_login=linphone_gtk_get_ui_config_int("automatic_login",0);
if (auto_login && !disable_auto_login){
g_timeout_add(250,(GSourceFunc)do_login_noprompt,cfg);
return;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(login_frame, "automatic_login")),auto_login);
if (login_image){
GdkPixbuf *pbuf=create_pixbuf (login_image);
gtk_image_set_from_pixbuf (GTK_IMAGE(linphone_gtk_get_widget(login_frame, "login_image")), pbuf);
g_object_unref(G_OBJECT(pbuf));
}
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(mw,"automatic_login")),auto_login);
{
const char *login_image=linphone_gtk_get_ui_config("login_image","linphone-banner.png");
if (login_image){
GdkPixbuf *pbuf=create_pixbuf (login_image);
gtk_image_set_from_pixbuf (GTK_IMAGE(linphone_gtk_get_widget(mw,"login_image")),
pbuf);
g_object_unref(G_OBJECT(pbuf));
}
}
gtk_widget_hide(linphone_gtk_get_widget(mw,"disconnect_item"));
gtk_widget_hide(linphone_gtk_get_widget(mw,"main_frame"));
gtk_widget_show(linphone_gtk_get_widget(mw,"login_frame"));
if (linphone_gtk_get_ui_config_int("login_needs_userid",FALSE)){
gtk_widget_show(linphone_gtk_get_widget(mw,"userid"));
gtk_widget_show(linphone_gtk_get_widget(mw,"login_userid"));
gtk_widget_show(linphone_gtk_get_widget(login_frame,"userid"));
gtk_widget_show(linphone_gtk_get_widget(login_frame,"login_userid"));
}
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"options_menu"),FALSE);
str=g_strdup_printf(_("Please enter login information for %s"),linphone_proxy_config_get_domain(cfg));
gtk_label_set_text(GTK_LABEL(label),str);
g_object_set_data(G_OBJECT(mw),"login_proxy_config",cfg);
g_object_set_data(G_OBJECT(login_frame),"login_proxy_config",cfg);
g_free(str);
from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
if (linphone_address_get_username(from)[0]=='?'){
const char *username=linphone_gtk_get_ui_config ("login_username",NULL);
@ -99,24 +87,55 @@ void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg, gboolean disable_au
ai=linphone_core_find_auth_info(lc,linphone_proxy_config_get_domain(cfg),linphone_address_get_username(from),NULL);
/*display the last entered username, if not '?????'*/
if (linphone_address_get_username(from)[0]!='?')
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_username")),
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(login_frame,"login_username")),
linphone_address_get_username(from));
if (ai) {
passwd=linphone_auth_info_get_passwd(ai);
userid=linphone_auth_info_get_userid(ai);
}
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_password")),
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(login_frame,"login_password")),
passwd!=NULL ? passwd : "");
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_userid")),
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(login_frame,"login_userid")),
userid ? userid : "");
linphone_address_destroy(from);
}
void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg, gboolean disable_auto_login){
GtkWidget *mw=linphone_gtk_get_main_window();
gboolean auto_login=linphone_gtk_get_ui_config_int("automatic_login",0);
GtkWidget *main_frame = linphone_gtk_get_widget(mw, "main_frame");
GtkWidget *main_layout = linphone_gtk_get_widget(mw, "main_layout");
GtkWidget *login_frame;
if (auto_login && !disable_auto_login){
g_timeout_add(250,(GSourceFunc)do_login_noprompt,cfg);
return;
}
login_frame = linphone_gtk_create_widget("login_frame");
linphone_gtk_init_login_frame(login_frame, cfg);
g_object_set_data_full(G_OBJECT(mw), "main_frame", g_object_ref(main_frame), g_object_unref);
g_object_set_data(G_OBJECT(mw), "login_frame", login_frame);
gtk_container_remove(GTK_CONTAINER(main_layout), main_frame);
gtk_box_pack_start(GTK_BOX(main_layout), login_frame, TRUE, TRUE, 0);
gtk_widget_show(login_frame);
gtk_widget_hide(linphone_gtk_get_widget(mw,"disconnect_item"));
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"options_menu"),FALSE);
}
void linphone_gtk_exit_login_frame(void){
GtkWidget *mw=linphone_gtk_get_main_window();
gtk_widget_show(linphone_gtk_get_widget(mw,"main_frame"));
gtk_widget_hide(linphone_gtk_get_widget(mw,"login_frame"));
GtkWidget *main_layout = linphone_gtk_get_widget(mw, "main_layout");
GtkWidget *main_frame = GTK_WIDGET(g_object_get_data(G_OBJECT(mw), "main_frame"));
GtkWidget *login_frame = GTK_WIDGET(g_object_get_data(G_OBJECT(mw), "login_frame"));
gtk_container_remove(GTK_CONTAINER(main_layout), login_frame);
gtk_box_pack_start(GTK_BOX(main_layout), main_frame, TRUE, TRUE, 0);
g_object_set_data(G_OBJECT(mw), "login_frame", NULL);
g_object_set_data(G_OBJECT(mw), "main_frame", NULL);
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"options_menu"),TRUE);
gtk_widget_show(linphone_gtk_get_widget(mw,"disconnect_item"));
}
@ -136,25 +155,24 @@ void linphone_gtk_logout_clicked(void){
void linphone_gtk_login_frame_connect_clicked(GtkWidget *button){
GtkWidget *mw=gtk_widget_get_toplevel(button);
void linphone_gtk_login_frame_connect_clicked(GtkWidget *button, GtkWidget *login_frame){
const char *username;
const char *password;
const char *userid;
char *identity;
gboolean autologin;
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(mw),"login_proxy_config");
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(login_frame),"login_proxy_config");
LinphoneAddress *from;
SipSetupContext *ssctx=linphone_proxy_config_get_sip_setup_context(cfg);
username=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_username")));
password=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_password")));
userid=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_userid")));
username=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(login_frame,"login_username")));
password=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(login_frame,"login_password")));
userid=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(login_frame,"login_userid")));
if (username==NULL || username[0]=='\0')
return;
autologin=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(mw,"automatic_login")));
autologin=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(login_frame,"automatic_login")));
linphone_gtk_set_ui_config_int("automatic_login",autologin);
linphone_gtk_set_ui_config("login_username",username);

View file

@ -377,69 +377,47 @@ void linphone_gtk_destroy_window(GtkWidget *widget) {
g_object_unref (G_OBJECT (builder));
}
GtkWidget *linphone_gtk_create_window(const char *window_name, GtkWidget *parent){
GError* error = NULL;
GtkBuilder* builder = gtk_builder_new ();
char path[512];
GtkWidget *w;
if (get_ui_file(window_name,path,sizeof(path))==-1) return NULL;
gtk_builder_set_translation_domain(builder,GETTEXT_PACKAGE);
if (!gtk_builder_add_from_file (builder, path, &error)){
g_error("Couldn't load builder file: %s", error->message);
g_error_free (error);
return NULL;
}
w=GTK_WIDGET(gtk_builder_get_object (builder,window_name));
if (w==NULL){
g_error("Could not retrieve '%s' window from xml file",window_name);
return NULL;
}
g_object_set_data(G_OBJECT(w), "builder",builder);
gtk_builder_connect_signals(builder,w);
linphone_gtk_configure_window(w,window_name);
if(parent) {
// gtk_window_set_modal(GTK_WINDOW(w), TRUE);
gtk_window_set_transient_for(GTK_WINDOW(w), GTK_WINDOW(parent));
gtk_window_set_position(GTK_WINDOW(w), GTK_WIN_POS_CENTER_ON_PARENT);
} else {
// gtk_window_set_modal(GTK_WINDOW(w), FALSE);
}
return w;
}
GtkWidget *linphone_gtk_create_widget(const char *filename, const char *widget_name) {
GtkWidget *linphone_gtk_create_widget(const char *widget_name) {
char path[2048];
GtkWidget *w = NULL;
GtkBuilder *builder = gtk_builder_new();
GError *error = NULL;
GObject *obj;
if(get_ui_file(filename, path, sizeof(path)) == -1) goto end;
if(get_ui_file(widget_name, path, sizeof(path)) == -1) goto fail;
gtk_builder_set_translation_domain(builder, GETTEXT_PACKAGE);
if(gtk_builder_add_from_file(builder, path, &error) == 0) {
g_error("Couldn't load builder file: %s", error->message);
g_error_free(error);
goto end;
goto fail;
}
obj = gtk_builder_get_object(builder, widget_name);
if(obj == NULL) {
g_error("'%s' widget not found", widget_name);
goto end;
goto fail;
}
w = GTK_WIDGET(obj);
g_object_set_data_full(obj, "builder", builder, g_object_unref);
gtk_widget_unparent(w);
gtk_builder_connect_signals(builder, w);
gtk_builder_connect_signals(builder, obj);
return GTK_WIDGET(obj);
end:
fail:
g_object_unref(builder);
return NULL;
}
GtkWidget *linphone_gtk_create_window(const char *window_name, GtkWidget *parent){
GtkWidget *w = linphone_gtk_create_widget(window_name);
if(w) {
linphone_gtk_configure_window(w,window_name);
if(parent) {
gtk_window_set_transient_for(GTK_WINDOW(w), GTK_WINDOW(parent));
gtk_window_set_position(GTK_WINDOW(w), GTK_WIN_POS_CENTER_ON_PARENT);
}
}
return w;
}
@ -593,8 +571,7 @@ static gboolean linphone_gtk_iterate(LinphoneCore *lc){
if (addr_to_call!=NULL){
/*make sure we are not showing the login screen*/
GtkWidget *mw=linphone_gtk_get_main_window();
GtkWidget *login_frame=linphone_gtk_get_widget(mw,"login_frame");
if (!GTK_WIDGET_VISIBLE(login_frame)){
if (g_object_get_data(G_OBJECT(mw), "login_frame") == NULL){
GtkWidget *uri_bar=linphone_gtk_get_widget(mw,"uribar");
gtk_entry_set_text(GTK_ENTRY(uri_bar),addr_to_call);
addr_to_call=NULL;
@ -1149,7 +1126,7 @@ static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm
gchar *msg;
GtkWidget *mw=linphone_gtk_get_main_window();
if (mw && GTK_WIDGET_VISIBLE(linphone_gtk_get_widget(mw,"login_frame"))){
if (mw && g_object_get_data(G_OBJECT(mw), "login_frame") != NULL){
/*don't prompt for authentication when login frame is visible*/
linphone_core_abort_authentication(lc,NULL);
return;

File diff suppressed because it is too large Load diff

View file

@ -14,9 +14,6 @@ gtk/incall_view.c
gtk/loginframe.c
gtk/config-fetching.c
gtk/audio_assistant.c
gtk/conf_callee_view.ui
gtk/conf_view.ui
gtk/in_call_view.ui
[type: gettext/glade]gtk/main.ui
[type: gettext/glade]gtk/about.ui
[type: gettext/glade]gtk/contact.ui
@ -35,7 +32,11 @@ gtk/in_call_view.ui
[type: gettext/glade]gtk/ldap.ui
[type: gettext/glade]gtk/config-uri.ui
[type: gettext/glade]gtk/provisioning-fetch.ui
[type: gettext/glade]gtk/chat_view.ui
[type: gettext/glade]gtk/chatroom_frame.ui
[type: gettext/glade]gtk/callee_frame.ui
[type: gettext/glade]gtk/conf_frame.ui
[type: gettext/glade]gtk/in_call_frame.ui
[type: gettext/glade]gtk/login_frame.ui
coreapi/linphonecore.c
coreapi/misc.c
coreapi/presence.c