summaryrefslogtreecommitdiff
path: root/plugins/gtkui
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-02-19 21:18:38 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-02-19 21:18:38 +0100
commitf124507c6b64bcc8a2d1b36f8f0b4047044a2292 (patch)
tree4108b44ede1700d52b0e73b2367ba8b8058f6443 /plugins/gtkui
parent1b07bb6a03d422e20fa2b34589cbf65e224deddc (diff)
gtkui: fixed crash when deleting items from hvbox
Diffstat (limited to 'plugins/gtkui')
-rw-r--r--plugins/gtkui/widgets.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/gtkui/widgets.c b/plugins/gtkui/widgets.c
index 75e1d33b..4ba5b2e3 100644
--- a/plugins/gtkui/widgets.c
+++ b/plugins/gtkui/widgets.c
@@ -890,7 +890,7 @@ w_placeholder_create (void) {
w->base.widget = gtk_event_box_new ();
w->drawarea = gtk_drawing_area_new ();
- gtk_widget_set_size_request (w->drawarea, 20, 20);
+ gtk_widget_set_size_request (w->base.widget, 20, 20);
gtk_widget_show (w->drawarea);
gtk_container_add (GTK_CONTAINER (w->base.widget), w->drawarea);
@@ -1917,12 +1917,11 @@ w_tabbed_playlist_create (void) {
w->tabstrip = DDB_TABSTRIP (tabstrip);
gtk_widget_show (tabstrip);
GtkWidget *list = ddb_listview_new ();
- gtk_widget_set_size_request (list, 100, 100);
+ gtk_widget_set_size_request (vbox, 100, 100);
w->plt.list = (DdbListview *)list;
gtk_widget_show (list);
gtk_box_pack_start (GTK_BOX (vbox), tabstrip, FALSE, TRUE, 0);
- gtk_widget_set_size_request (tabstrip, 100, 24);
gtk_widget_set_can_focus (tabstrip, FALSE);
gtk_widget_set_can_default (tabstrip, FALSE);
@@ -1945,7 +1944,7 @@ w_playlist_create (void) {
w->base.widget = gtk_event_box_new ();
w->list = DDB_LISTVIEW (ddb_listview_new ());
- gtk_widget_set_size_request (GTK_WIDGET (w->list), 100, 100);
+ gtk_widget_set_size_request (GTK_WIDGET (w->base.widget), 100, 100);
w->base.save = w_playlist_save;
w->base.load = w_playlist_load;
w->base.init = w_playlist_init;
@@ -2954,8 +2953,6 @@ w_hvbox_replace (struct ddb_gtkui_widget_s *container, struct ddb_gtkui_widget_s
return;
}
- w_remove (container, c);
- w_destroy (c);
if (prev) {
prev->next = newchild;
}
@@ -2964,6 +2961,8 @@ w_hvbox_replace (struct ddb_gtkui_widget_s *container, struct ddb_gtkui_widget_s
}
newchild->next = c->next;
newchild->parent = container;
+ w_remove (container, c);
+ w_destroy (c);
gtk_box_pack_start (GTK_BOX (b->box), newchild->widget, TRUE, TRUE, 0);
gtk_widget_show (newchild->widget);
@@ -3552,7 +3551,7 @@ w_seekbar_create (void) {
w->base.message = w_seekbar_message;
w->base.destroy = w_seekbar_destroy;
w->seekbar = ddb_seekbar_new ();
- gtk_widget_set_size_request (w->seekbar, 20, 16);
+ gtk_widget_set_size_request (w->base.widget, 20, 16);
w->last_songpos = -1;
ddb_seekbar_init_signals (DDB_SEEKBAR (w->seekbar), w->base.widget);
gtk_widget_show (w->seekbar);
@@ -3685,7 +3684,7 @@ w_volumebar_create (void) {
w->volumebar = ddb_volumebar_new ();
ddb_volumebar_init_signals (DDB_VOLUMEBAR (w->volumebar), w->base.widget);
gtk_widget_show (w->volumebar);
- gtk_widget_set_size_request (w->volumebar, 70, -1);
+ gtk_widget_set_size_request (w->base.widget, 70, -1);
gtk_container_add (GTK_CONTAINER (w->base.widget), w->volumebar);
w_override_signals (w->base.widget, w);
return (ddb_gtkui_widget_t*)w;