]> sjero.net Git - linphone/commitdiff
Disabled buttons in conf frame, callview improved, removing the search bar
authorMargaux Clerc <margaux.clerc@belledonne-communications>
Wed, 9 Jan 2013 09:43:17 +0000 (10:43 +0100)
committerMargaux Clerc <margaux.clerc@belledonne-communications>
Wed, 9 Jan 2013 09:47:31 +0000 (10:47 +0100)
gtk/conference.c
gtk/friendlist.c
gtk/incall_view.c
gtk/main.c
gtk/main.ui
pixmaps/startcall-small.png [new file with mode: 0644]
pixmaps/stopcall-red.png
pixmaps/stopcall-small.png [new file with mode: 0644]

index 546b3e1c2856a75dafd1a1b5e13442897ae60030..dddb3cec98c7e5e0dc5f191254c84e68f25e4eb9 100644 (file)
@@ -95,7 +95,7 @@ void linphone_gtk_set_in_conference(LinphoneCall *call){
        if(conf_frame==NULL){
                conf_frame=linphone_gtk_create_widget("main","conf_frame");
                GtkWidget *button_conf=linphone_gtk_get_widget(conf_frame,"terminate_conf");
-               GtkWidget *image=create_pixmap("stopcall-red.png");
+               GtkWidget *image=create_pixmap("stopcall-small.png");
                gtk_button_set_image(GTK_BUTTON(button_conf),image);
                g_signal_connect_swapped(G_OBJECT(button_conf),"clicked",(GCallback)linphone_gtk_terminate_call,NULL);
                g_object_set_data(G_OBJECT(mw),"conf_frame",(gpointer)conf_frame);
index 3ab59c6130f0533ff287748878550d8d884c1772..3124fdbb144b92b1cbcae2529d7c1edaaed227cb 100644 (file)
@@ -621,10 +621,10 @@ void linphone_gtk_show_friends(void){
        GtkListStore *store=NULL;
        GtkTreeIter iter;
        const MSList *itf;
-       GtkWidget *filter=linphone_gtk_get_widget(mw,"search_bar");
+       //GtkWidget *filter=linphone_gtk_get_widget(mw,"search_bar");
        LinphoneCore *core=linphone_gtk_get_core();
-       const gchar *search=NULL;
-       gboolean lookup=FALSE;
+       //const gchar *search=NULL;
+       //gboolean lookup=FALSE;
        MSList *sorted;
 
        linphone_gtk_show_directory_search();
@@ -636,10 +636,10 @@ void linphone_gtk_show_friends(void){
        store=GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist)));
        gtk_list_store_clear(store);
 
-       search=gtk_entry_get_text(GTK_ENTRY(filter));
-       if (search==NULL || search[0]=='\0')
-               lookup=FALSE;
-       else lookup=TRUE;
+       //search=gtk_entry_get_text(GTK_ENTRY(filter));
+       //if (search==NULL || search[0]=='\0')
+       //      lookup=FALSE;
+       //else lookup=TRUE;
 
        sorted=sort_friend_list(linphone_core_get_friend_list(core));
 
@@ -650,12 +650,12 @@ void linphone_gtk_show_friends(void){
                const char *name=linphone_address_get_display_name(f_uri);
                const char *display=name;
                char *escaped=NULL;
-               if (lookup){
+               /*if (lookup){
                        if (strstr(uri,search)==NULL){
                                ms_free(uri);
                                continue;
                        }
-               }
+               }*/
                //BuddyInfo *bi;
                gboolean send_subscribe=linphone_friend_get_send_subscribe(lf);
                if (name==NULL || name[0]=='\0') {
index 6230df1ae8de0f8ccad7b8b2aff9e322bf36a3ae..192e92fab3f910258357ae31fac3cb27ebc20452 100644 (file)
@@ -64,7 +64,7 @@ LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf){
 
 static GtkWidget *make_tab_header(int number){
        GtkWidget *w=gtk_hbox_new (FALSE,0);
-       GtkWidget *i=create_pixmap ("status-green.png");
+       GtkWidget *i=create_pixmap ("startcall-small.png");
        GtkWidget *l;
        gchar *text=g_strdup_printf(_("Call #%i"),number);
        l=gtk_label_new (text);
@@ -84,7 +84,7 @@ void update_tab_header(LinphoneCall *call,gboolean pause){
     if(pause){
 i=gtk_image_new_from_stock(GTK_STOCK_MEDIA_PAUSE,GTK_ICON_SIZE_SMALL_TOOLBAR);
     } else {
-        i=create_pixmap ("status-green.png");
+        i=create_pixmap ("startcall-small.png");
     }
        GtkWidget *l;
        gchar *text=g_strdup_printf(_("Call #%i"),call_index);
@@ -107,7 +107,7 @@ static void linphone_gtk_in_call_set_animation_image(GtkWidget *callview, const
                }
                image=create_pixmap(image_name);
        }else
-               image=gtk_image_new_from_stock(image_name,GTK_ICON_SIZE_DIALOG);
+               image=gtk_image_new_from_stock(image_name,GTK_ICON_SIZE_DND);
        if (elem)
                gtk_widget_destroy((GtkWidget*)elem->data);
        gtk_widget_show(image);
@@ -337,7 +337,7 @@ void linphone_gtk_create_in_call_view(LinphoneCall *call){
        gtk_widget_hide(conf);
 
        GtkWidget *button=linphone_gtk_get_widget(call_view,"terminate_call");
-       GtkWidget *image=create_pixmap("stopcall-red.png");
+       GtkWidget *image=create_pixmap("stopcall-small.png");
        gtk_button_set_label(GTK_BUTTON(button),_("Hang up"));
        gtk_button_set_image(GTK_BUTTON(button),image);
        gtk_widget_show(image);
@@ -363,7 +363,7 @@ void linphone_gtk_update_video_button(LinphoneCall *call){
        button=linphone_gtk_get_widget(call_view,"video_button");
 
        gtk_button_set_image(GTK_BUTTON(button),
-          gtk_image_new_from_stock(has_video ? GTK_STOCK_REMOVE : GTK_STOCK_ADD,GTK_ICON_SIZE_BUTTON));
+       gtk_image_new_from_stock(has_video ? GTK_STOCK_REMOVE : GTK_STOCK_ADD,GTK_ICON_SIZE_BUTTON));
        g_object_set_data(G_OBJECT(button),"adding_video",GINT_TO_POINTER(!has_video));
        if (!linphone_core_video_supported(linphone_call_get_core(call))){
                gtk_widget_set_sensitive(button,FALSE);
@@ -373,7 +373,11 @@ void linphone_gtk_update_video_button(LinphoneCall *call){
                g_signal_connect(G_OBJECT(button),"clicked",(GCallback)video_button_clicked,call);
                g_object_set_data(G_OBJECT(button),"signal_connected",GINT_TO_POINTER(1));
        }
+       GtkWidget *conf_frame=(GtkWidget *)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"conf_frame");
        gtk_widget_set_sensitive(button,linphone_call_get_state(call)==LinphoneCallStreamsRunning);
+       if(conf_frame!=NULL){
+               gtk_widget_set_sensitive(button,FALSE);
+       }
 }
 
 void linphone_gtk_remove_in_call_view(LinphoneCall *call){
@@ -447,12 +451,12 @@ void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call){
        display_peer_name_in_label(callee,linphone_call_get_remote_address (call));
 
        answer_button=linphone_gtk_get_widget(callview,"accept_call");
-       image=create_pixmap (linphone_gtk_get_ui_config("start_call_icon","startcall-green.png"));
+       image=create_pixmap (linphone_gtk_get_ui_config("start_call_icon","startcall-small.png"));
        gtk_button_set_label(GTK_BUTTON(answer_button),_("Answer"));
        gtk_button_set_image(GTK_BUTTON(answer_button),image);
        gtk_widget_show(image);
 
-       image=create_pixmap (linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png"));
+       image=create_pixmap (linphone_gtk_get_ui_config("stop_call_icon","stopcall-small.png"));
        gtk_button_set_image(GTK_BUTTON(linphone_gtk_get_widget(callview,"decline_call")),image);
        gtk_widget_show(image);
 
@@ -636,7 +640,6 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
 
        gtk_widget_set_visible(linphone_gtk_get_widget(callview,"buttons_panel"),!in_conf);
        
-
        gtk_widget_hide(linphone_gtk_get_widget(callview,"answer_decline_panel"));
        gtk_label_set_markup(GTK_LABEL(status),in_conf ? _("In conference") : _("<b>In call</b>"));
 
@@ -648,7 +651,7 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
                update_tab_header(call,FALSE);
        linphone_gtk_enable_mute_button(
                                        GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),TRUE);
-       gtk_widget_show_all(linphone_gtk_get_widget(callview,"buttons_panel"));
+       
        if (taskid==0){
                taskid=g_timeout_add(250,(GSourceFunc)linphone_gtk_in_call_view_refresh,call);
                g_object_set_data(G_OBJECT(callview),"taskid",GINT_TO_POINTER(taskid));
@@ -659,6 +662,7 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
                linphone_gtk_set_in_conference(call);
                gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"incall_mute"),FALSE);
        }
+       gtk_widget_show_all(linphone_gtk_get_widget(callview,"buttons_panel"));
        if (call_stats) show_used_codecs(call_stats,call);
 }
 
index 734079c16036a0593b8e10946bf1b521f0b06d93..5d9158713a0c4d60a71b7aad2dfde44a4dd4f310 100644 (file)
@@ -724,9 +724,14 @@ static void linphone_gtk_update_call_buttons(LinphoneCall *call){
        gtk_widget_set_visible(button,add_call);
 
        //gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),stop_active);
-
-       linphone_gtk_enable_transfer_button(lc,call_list_size>1);
-       linphone_gtk_enable_conference_button(lc,call_list_size>1);
+       GtkWidget *conf_frame=(GtkWidget *)g_object_get_data(G_OBJECT(mw),"conf_frame");
+       if(conf_frame==NULL){
+               linphone_gtk_enable_transfer_button(lc,call_list_size>1);
+               linphone_gtk_enable_conference_button(lc,call_list_size>1);
+       } else {
+               linphone_gtk_enable_transfer_button(lc,FALSE);
+               linphone_gtk_enable_conference_button(lc,FALSE);
+       }
        update_video_title();
        if (call) linphone_gtk_update_video_button(call);
 }
@@ -1497,7 +1502,7 @@ static void linphone_gtk_configure_main_window(){
                home=linphone_gtk_get_ui_config("home","http://www.linphone.org");
                start_call_icon=linphone_gtk_get_ui_config("start_call_icon","startcall-green.png");
                add_call_icon=linphone_gtk_get_ui_config("add_call_icon","addcall-green.png");
-               //stop_call_icon=linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png");
+               //stop_call_icon=linphone_gtk_get_ui_config("stop_call_icon","stopcall-small.png");
                search_icon=linphone_gtk_get_ui_config("directory_search_icon",NULL);
                update_check_menu=linphone_gtk_get_ui_config_int("update_check_menu",0);
                buttons_have_borders=linphone_gtk_get_ui_config_int("buttons_border",1);
index 1229289cca73b4ee29e5dde9fd4bd85dca9f176f..a68ea4cb8105cf89f76667bd6b5db8ab65a97328 100644 (file)
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkProgressBar" id="spk_audiolevel">
-                        <property name="width_request">90</property>
+                      <object class="GtkImage" id="incall_spk_icon">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="stock">gtk-missing-image</property>
+                        <property name="icon-size">0</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
-                        <property name="pack_type">end</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkImage" id="incall_spk_icon">
+                      <object class="GtkProgressBar" id="spk_audiolevel">
+                        <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="stock">gtk-missing-image</property>
-                        <property name="icon-size">1</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
+                        <property name="padding">1</property>
                         <property name="pack_type">end</property>
                         <property name="position">3</property>
                       </packing>
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="fill">True</property>
+                    <property name="fill">False</property>
                     <property name="position">3</property>
                   </packing>
                 </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>
                         <property name="use_action_appearance">False</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
                         <property name="use_action_appearance">False</property>
-                        <property name="relief">half</property>
                         <signal name="clicked" handler="linphone_gtk_mute_clicked" swapped="no"/>
                       </object>
                       <packing>
             <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">True</property>
-                <property name="fill">True</property>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
                 <property name="position">2</property>
               </packing>
             </child>
                         <property name="position">2</property>
                       </packing>
                     </child>
-                    <child>
-                      <placeholder/>
-                    </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
                       <object class="GtkVBox" id="vbox12">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="border_width">4</property>
                         <child>
-                          <object class="GtkEntry" id="search_bar">
+                          <object class="GtkLabel" id="contact">
                             <property name="visible">True</property>
-                            <property name="can_focus">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="invisible_char">●</property>
-                            <property name="shadow_type">none</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>
-                            <signal name="changed" handler="linphone_gtk_show_friends" swapped="no"/>
+                            <property name="can_focus">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_STRUCTURE_MASK</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Contacts</property>
+                            <property name="use_markup">True</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="padding">4</property>
+                            <property name="fill">False</property>
+                            <property name="padding">3</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
-                        <child>
-                          <placeholder/>
-                        </child>
                         <child>
                           <object class="GtkScrolledWindow" id="scrolledwindow1">
                             <property name="visible">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="reorderable">True</property>
                                 <property name="enable_search">False</property>
-                                <property name="search_column">0</property>
+                                <property name="search_column">1</property>
                                 <signal name="button-press-event" handler="linphone_gtk_contact_list_button_pressed" swapped="no"/>
                                 <signal name="cursor-changed" handler="linphone_gtk_contact_clicked" swapped="no"/>
                                 <signal name="row-activated" handler="linphone_gtk_contact_activated" swapped="no"/>
                           <packing>
                             <property name="expand">True</property>
                             <property name="fill">True</property>
-                            <property name="position">2</property>
+                            <property name="position">1</property>
                           </packing>
                         </child>
                         <child>
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="position">3</property>
+                            <property name="position">2</property>
                           </packing>
                         </child>
                       </object>
diff --git a/pixmaps/startcall-small.png b/pixmaps/startcall-small.png
new file mode 100644 (file)
index 0000000..30b3278
Binary files /dev/null and b/pixmaps/startcall-small.png differ
index de77592c742fd52596af41ff6f62350a81d15c0a..8bd95793517e685e9bc1cfe5b503b69122a5f4b0 100644 (file)
Binary files a/pixmaps/stopcall-red.png and b/pixmaps/stopcall-red.png differ
diff --git a/pixmaps/stopcall-small.png b/pixmaps/stopcall-small.png
new file mode 100644 (file)
index 0000000..de77592
Binary files /dev/null and b/pixmaps/stopcall-small.png differ