Skip to content
Snippets Groups Projects
Commit 54d8f076 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Remove GTK-Critical warnings

Due to toolbar_remove
parent 34fd4562
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,12 @@ popup_menu (GtkWidget *widget,
return TRUE;
}
static gboolean
is_inserted( GtkWidget* button )
{
return ( GTK_WIDGET(button)->parent == GTK_WIDGET( toolbar ) );
}
static gboolean
button_pressed(GtkWidget* widget, GdkEventButton *event, gpointer user_data)
{
......@@ -220,13 +226,13 @@ toolbar_update_buttons ()
gtk_widget_set_sensitive( GTK_WIDGET(unholdButton), FALSE);
g_object_ref(holdButton);
g_object_ref(unholdButton);
gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(holdButton));
gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(unholdButton));
if( is_inserted( GTK_WIDGET(holdButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(holdButton));
if( is_inserted( GTK_WIDGET(unholdButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(unholdButton));
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), holdButton, 3);
g_object_ref(callButton);
g_object_ref(pickupButton);
gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton));
gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(pickupButton));
if( is_inserted( GTK_WIDGET(callButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton));
if( is_inserted( GTK_WIDGET(pickupButton) ) ) gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(pickupButton));
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), callButton, 0);
......
......@@ -112,7 +112,7 @@ call_state_cb (DBusGProxy *proxy,
(void) time(&c->_stop);
update_call_tree( history, c );
}
g_print("from dbus: "); stop_notification();
stop_notification();
sflphone_hung_up (c);
update_call_tree( history, c );
}
......
......@@ -537,7 +537,6 @@ view_dialpad (GtkImageMenuItem *imagemenuitem,
{
gboolean state;
main_window_dialpad( &state );
g_print("State of the damn thing %i\n" , state);
if( state )
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( dialpadMenu ),
gtk_image_new_from_file( ICONS_DIR "/icon_dialpad_off.svg"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment