mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
add a quit menu for whose who don't have a systray
This commit is contained in:
parent
7c514d326b
commit
08f3887acc
4 changed files with 34 additions and 6 deletions
|
|
@ -1241,7 +1241,7 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
|
|||
LinphoneCore *lc=call->core;
|
||||
LinphoneAddress *me=linphone_core_get_primary_contact_parsed(lc);
|
||||
char *cname;
|
||||
bool_t use_arc;
|
||||
bool_t use_arc=linphone_core_adaptive_rate_control_enabled(lc);
|
||||
#ifdef VIDEO_ENABLED
|
||||
const SalStreamDescription *vstream=sal_media_description_find_stream(call->resultdesc,
|
||||
SalProtoRtpAvp,SalVideo);
|
||||
|
|
@ -1527,7 +1527,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
|
|||
// mediastreamer queue.
|
||||
audio_stream_iterate(call->audiostream);
|
||||
|
||||
if (call->audiostream->evq){
|
||||
if (call->audiostream_app_evq){
|
||||
OrtpEvent *ev;
|
||||
while (NULL != (ev=ortp_ev_queue_get(call->audiostream_app_evq))){
|
||||
OrtpEventType evt=ortp_event_get_type(ev);
|
||||
|
|
|
|||
|
|
@ -747,7 +747,9 @@ static void codecs_config_read(LinphoneCore *lc)
|
|||
}
|
||||
|
||||
static void video_config_read(LinphoneCore *lc){
|
||||
#ifdef VIDEO_ENABLED
|
||||
int capture, display, self_view;
|
||||
#endif
|
||||
const char *str;
|
||||
int ndev;
|
||||
const char **devices;
|
||||
|
|
@ -771,13 +773,14 @@ static void video_config_read(LinphoneCore *lc){
|
|||
linphone_core_set_preferred_video_size_by_name(lc,
|
||||
lp_config_get_string(lc->config,"video","size","cif"));
|
||||
|
||||
#ifdef VIDEO_ENABLED
|
||||
capture=lp_config_get_int(lc->config,"video","capture",1);
|
||||
display=lp_config_get_int(lc->config,"video","display",1);
|
||||
self_view=lp_config_get_int(lc->config,"video","self_view",1);
|
||||
lc->video_conf.displaytype=lp_config_get_string(lc->config,"video","displaytype",NULL);
|
||||
if(lc->video_conf.displaytype)
|
||||
ms_message("we are using a specific display:%s\n",lc->video_conf.displaytype);
|
||||
#ifdef VIDEO_ENABLED
|
||||
|
||||
linphone_core_enable_video(lc,capture,display);
|
||||
linphone_core_enable_self_view(lc,self_view);
|
||||
#endif
|
||||
|
|
|
|||
13
gtk/main.c
13
gtk/main.c
|
|
@ -499,7 +499,7 @@ static gboolean linphone_gtk_iterate(LinphoneCore *lc){
|
|||
static unsigned long previd=0;
|
||||
static unsigned long preview_previd=0;
|
||||
static gboolean in_iterate=FALSE;
|
||||
|
||||
|
||||
/*avoid reentrancy*/
|
||||
if (in_iterate) return TRUE;
|
||||
in_iterate=TRUE;
|
||||
|
|
@ -1147,6 +1147,8 @@ void linphone_gtk_link_to_website(GtkWidget *item){
|
|||
|
||||
#ifndef HAVE_GTK_OSX
|
||||
|
||||
static GtkStatusIcon *icon=NULL;
|
||||
|
||||
static void icon_popup_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data){
|
||||
GtkWidget *menu=(GtkWidget*)g_object_get_data(G_OBJECT(status_icon),"menu");
|
||||
gtk_menu_popup(GTK_MENU(menu),NULL,NULL,gtk_status_icon_position_menu,status_icon,button,activate_time);
|
||||
|
|
@ -1185,8 +1187,6 @@ static GtkWidget *create_icon_menu(){
|
|||
return menu;
|
||||
}
|
||||
|
||||
static GtkStatusIcon *icon=NULL;
|
||||
|
||||
static void handle_icon_click() {
|
||||
GtkWidget *mw=linphone_gtk_get_main_window();
|
||||
if (!gtk_window_is_active((GtkWindow*)mw)) {
|
||||
|
|
@ -1255,6 +1255,13 @@ static void linphone_gtk_status_icon_set_blinking(gboolean val){
|
|||
#endif
|
||||
}
|
||||
|
||||
void linphone_gtk_options_activate(GtkWidget *item){
|
||||
#ifndef HAVE_GTK_OSX
|
||||
gtk_widget_set_visible(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"quit_item"),
|
||||
icon && !gtk_status_icon_is_embedded(icon));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void init_identity_combo(GtkComboBox *box){
|
||||
GtkListStore *store;
|
||||
GtkCellRenderer *r1,*r2;
|
||||
|
|
|
|||
18
gtk/main.ui
18
gtk/main.ui
|
|
@ -442,6 +442,7 @@
|
|||
<property name="use_action_appearance">False</property>
|
||||
<property name="label" translatable="yes">_Options</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="linphone_gtk_options_activate" swapped="no"/>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="menu2">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -494,6 +495,23 @@
|
|||
<signal name="toggled" handler="linphone_gtk_enable_self_view" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="separatormenuitem2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="quit_item">
|
||||
<property name="label">gtk-quit</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="activate" handler="gtk_main_quit" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue