-fix warnings (contributed patches)

-pressing enter in uri bar calls.


git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@177 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
smorlat 2008-11-20 20:21:59 +00:00
parent dc06c1e0f6
commit 77dbf60150
13 changed files with 156 additions and 149 deletions

View file

@ -364,7 +364,7 @@ char *linphonec_readline(char *prompt){
start_prompt_reader();
prompt_reader_started=TRUE;
}
fprintf(stdout,prompt);
fprintf(stdout,"%s",prompt);
fflush(stdout);
while(1){
ms_mutex_lock(&prompt_mutex);
@ -836,7 +836,7 @@ linphonec_parse_cmdline(int argc, char **argv)
argv[arg_num]);
exit(EXIT_FAILURE);
}
snprintf(configfile_name, PATH_MAX, argv[arg_num]);
snprintf(configfile_name, PATH_MAX, "%s", argv[arg_num]);
}
else if (strncmp ("-s", argv[arg_num], 2) == 0)
{
@ -988,7 +988,7 @@ copy_file(const char *from, const char *to)
{
snprintf(message, 255, "Can't open %s for reading: %s\n",
from, strerror(errno));
fprintf(stderr, message);
fprintf(stderr, "%s", message);
return 0;
}
@ -998,7 +998,7 @@ copy_file(const char *from, const char *to)
{
snprintf(message, 255, "Can't open %s for writing: %s\n",
to, strerror(errno));
fprintf(stderr, message);
fprintf(stderr, "%s", message);
return 0;
}

View file

@ -187,6 +187,7 @@ void linphone_gtk_display_something(GtkMessageType type,const gchar *message){
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
"%s",
(const gchar*)message);
/* connect to some callback : REVISIT */
/*
@ -203,6 +204,7 @@ void linphone_gtk_display_something(GtkMessageType type,const gchar *message){
GTK_DIALOG_DESTROY_WITH_PARENT,
type,
GTK_BUTTONS_CLOSE,
"%s",
(const gchar*)message);
/* Destroy the dialog when the user responds to it (e.g. clicks a button) */
g_signal_connect_swapped (G_OBJECT (dialog), "response",
@ -326,12 +328,12 @@ static void linphone_gtk_call_started(GtkWidget *mw){
gtk_widget_show(linphone_gtk_get_widget(mw,"terminate_call"));
}
void linphone_gtk_start_call(GtkWidget *button){
void linphone_gtk_start_call(GtkWidget *w){
LinphoneCore *lc=linphone_gtk_get_core();
if (linphone_core_inc_invite_pending(lc)){
/*already in call */
}else{
GtkWidget *uri_bar=linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"uribar");
GtkWidget *uri_bar=linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"uribar");
const char *entered=gtk_entry_get_text(GTK_ENTRY(uri_bar));
if (linphone_core_invite(lc,entered)==0) {
linphone_gtk_call_started(linphone_gtk_get_main_window());
@ -340,6 +342,11 @@ void linphone_gtk_start_call(GtkWidget *button){
}
}
void linphone_gtk_uri_bar_activate(GtkWidget *w){
linphone_gtk_start_call(w);
}
static void linphone_gtk_call_terminated(GtkWidget *mw){
gtk_widget_hide(linphone_gtk_get_widget(mw,"terminate_call"));
gtk_widget_show(linphone_gtk_get_widget(mw,"start_call"));
@ -441,6 +448,7 @@ static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
"%s",
message);
g_free(message);
g_signal_connect(G_OBJECT (dialog), "response",

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.4.5 on Tue Nov 18 16:57:26 2008 -->
<!--Generated with glade3 3.4.5 on Thu Nov 20 09:20:39 2008 -->
<glade-interface>
<widget class="GtkWindow" id="main">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@ -162,6 +162,7 @@
<widget class="GtkEntry" id="uribar">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="activate" handler="linphone_gtk_uri_bar_activate"/>
</widget>
</child>
<child>
@ -397,175 +398,77 @@ Online users</property>
<property name="n_columns">4</property>
<property name="homogeneous">True</property>
<child>
<widget class="GtkButton" id="dtmf_D">
<widget class="GtkButton" id="dtmf_1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">D</property>
<property name="label" translatable="yes">1</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_hash">
<widget class="GtkButton" id="dtmf_2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">#</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_0">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">0</property>
<property name="label" translatable="yes">2</property>
<property name="response_id">0</property>
</widget>
<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>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_star">
<widget class="GtkButton" id="dtmf_3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">*</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_C">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">C</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_9">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">9</property>
<property name="label" translatable="yes">3</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_8">
<widget class="GtkButton" id="dtmf_A">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">8</property>
<property name="response_id">0</property>
</widget>
<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>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_7">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">7</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_B">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">B</property>
<property name="label" translatable="yes">A</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_6">
<widget class="GtkButton" id="dtmf_4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">6</property>
<property name="label" translatable="yes">4</property>
<property name="response_id">0</property>
</widget>
<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>
<property name="x_options"></property>
@ -591,15 +494,17 @@ Online users</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_4">
<widget class="GtkButton" id="dtmf_6">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">4</property>
<property name="label" translatable="yes">6</property>
<property name="response_id">0</property>
</widget>
<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>
<property name="x_options"></property>
@ -607,63 +512,159 @@ Online users</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_A">
<widget class="GtkButton" id="dtmf_B">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">A</property>
<property name="label" translatable="yes">B</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_3">
<widget class="GtkButton" id="dtmf_7">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">3</property>
<property name="label" translatable="yes">7</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_2">
<widget class="GtkButton" id="dtmf_8">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">2</property>
<property name="label" translatable="yes">8</property>
<property name="response_id">0</property>
</widget>
<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>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_1">
<widget class="GtkButton" id="dtmf_9">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">1</property>
<property name="label" translatable="yes">9</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_C">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">C</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_star">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">*</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_0">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">0</property>
<property name="response_id">0</property>
</widget>
<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>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_hash">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">#</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkButton" id="dtmf_D">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">D</property>
<property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>

View file

@ -302,8 +302,6 @@ static void oss_detect(MSSndCardManager *m){
if (access(DSP_NAME,F_OK)==0){
MSSndCard *card=oss_card_new(DSP_NAME,MIXER_NAME);
ms_snd_card_manager_add_card(m,card);
card=oss_card_new(DSP_NAME,MIXER_NAME);
ms_snd_card_manager_add_card(m,card);
}
for(i=0;i<10;i++){
snprintf(pcmdev,sizeof(pcmdev),"%s%i",DSP_NAME,i);

View file

@ -82,13 +82,13 @@ int main(int argc, char *argv[])
char *filename;
if (argc<4){
printf(help);
printf("%s",help);
return -1;
}
channels=atoi(argv[3]);
if (channels==0){
printf(help);
printf("%s",help);
return -1;
}

View file

@ -59,13 +59,13 @@ int main(int argc, char *argv[])
SessionSet *set;
if (argc<5){
printf(help);
printf("%s",help);
return -1;
}
channels=atoi(argv[4]);
if (channels==0){
printf(help);
printf("%s",help);
return -1;
}
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
packet_size=atoi(argv[i+1]);
}
else {
printf(help);
printf("%s",help);
return -1;
}
if (packet_size==0) {
@ -94,7 +94,7 @@ int main(int argc, char *argv[])
ts_inc=atoi(argv[i+1]);
}
else {
printf(help);
printf("%s",help);
return -1;
}
if (ts_inc==0) {

View file

@ -85,13 +85,13 @@ int main(int argc, char *argv[])
argv[3]="100";
if (argc<4){
printf(help);
printf("%s",help);
return -1;
}
channels=atoi(argv[3]);
if (channels==0){
printf(help);
printf("%s",help);
return -1;
}

View file

@ -90,12 +90,12 @@ int main(int argc, char*argv[])
/* init the lib */
if (argc<3){
printf(help);
printf("%s",help);
return -1;
}
local_port=atoi(argv[2]);
if (local_port<=0) {
printf(help);
printf("%s",help);
return -1;
}
for (i=3;i<argc;i++)

View file

@ -47,14 +47,14 @@ int main(int argc, char *argv[])
int clockslide=0;
int jitter=0;
if (argc<4){
printf(help);
printf("%s", help);
return -1;
}
for(i=4;i<argc;i++){
if (strcmp(argv[i],"--with-clockslide")==0){
i++;
if (i>=argc) {
printf(help);
printf("%s", help);
return -1;
}
clockslide=atoi(argv[i]);
@ -63,7 +63,7 @@ int main(int argc, char *argv[])
ortp_message("Jitter will be added to outgoing stream.");
i++;
if (i>=argc) {
printf(help);
printf("%s", help);
return -1;
}
jitter=atoi(argv[i]);

View file

@ -50,14 +50,14 @@ int main(int argc, char *argv[])
int clockslide=0;
int jitter=0;
if (argc<4){
printf(help);
printf("%s",help);
return -1;
}
for(i=4;i<argc;i++){
if (strcmp(argv[i],"--with-clockslide")==0){
i++;
if (i>=argc) {
printf(help);
printf("%s",help);
return -1;
}
clockslide=atoi(argv[i]);
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
ortp_message("Ptime related jitter will be added to outgoing stream.");
i++;
if (i>=argc) {
printf(help);
printf("%s",help);
return -1;
}
jitter=atoi(argv[i]);

View file

@ -97,13 +97,13 @@ int main(int argc, char *argv[])
char *filename;
if (argc<4){
printf(help);
printf("%s",help);
return -1;
}
channels=atoi(argv[3]);
if (channels==0){
printf(help);
printf("%s",help);
return -1;
}

View file

@ -60,7 +60,7 @@ int main(int argc, char *argv[])
int have_more;
if (argc<3){
printf(help);
printf("%s",help);
return -1;
}

View file

@ -49,7 +49,7 @@ int main(int argc, char *argv[])
int tel=0;
if (argc<4){
printf(help);
printf("%s",help);
return -1;
}