Commit e9c787b7 authored by François Grisez's avatar François Grisez

Gtk: Greyed edit/remove button of the friend list when no contact is selected

parent 25589de5
......@@ -361,8 +361,19 @@ void linphone_gtk_chat_selected(GtkWidget *item){
void linphone_gtk_contact_clicked(GtkTreeSelection *selection){
GtkTreeView *friendlist = gtk_tree_selection_get_tree_view(selection);
GtkWidget *mw = linphone_gtk_get_main_window();
GtkWidget *edit_button = linphone_gtk_get_widget(mw, "edit_button");
GtkWidget *remove_button = linphone_gtk_get_widget(mw, "remove_button");
linphone_gtk_set_selection_to_uri_bar(friendlist);
linphone_gtk_friend_list_update_button_display(friendlist);
if(gtk_tree_selection_get_selected(selection, NULL, NULL)) {
gtk_widget_set_sensitive(edit_button, TRUE);
gtk_widget_set_sensitive(remove_button, TRUE);
} else {
gtk_widget_set_sensitive(edit_button, FALSE);
gtk_widget_set_sensitive(remove_button, FALSE);
}
}
......
......@@ -566,6 +566,7 @@
<property name="width_request">32</property>
<property name="height_request">32</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">edit_image1</property>
......@@ -582,6 +583,7 @@
<property name="width_request">32</property>
<property name="height_request">32</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">remove_image1</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment