Ticket #145: notification-daemon-0.3.7-bubble-theme-fix.patch

  • ./src/themes/bubble/eggnotificationbubblewidget.c

    old new  
    207207    gtk_container_remove (GTK_CONTAINER (bubble_widget->table), 
    208208                          bubble_widget->bubble_widget_body_label); 
    209209 
    210   if (bubble_widget->button_hbox != NULL && 
    211         gtk_widget_get_parent (bubble_widget->button_hbox) != NULL) 
    212     gtk_container_remove (GTK_CONTAINER (bubble_widget->table), 
    213                         bubble_widget->button_hbox); 
     210  if (bubble_widget->button_hbox != NULL) 
     211    { 
     212      gtk_widget_ref (bubble_widget->button_hbox); 
     213      if (gtk_widget_get_parent (bubble_widget->button_hbox) != NULL) 
     214        gtk_container_remove (GTK_CONTAINER (bubble_widget->table), 
     215                              gtk_widget_get_parent (bubble_widget->button_hbox)); 
     216    } 
    214217 
    215218  if (alignment == TRIANGLE_LEFT) 
    216219    { 
     
    265268                          0, 0); 
    266269 
    267270        gtk_container_add(GTK_CONTAINER(alignment), bubble_widget->button_hbox); 
     271        gtk_widget_unref (bubble_widget->button_hbox); 
    268272      } 
    269273 
    270274    gtk_widget_show_all (bubble_widget->table); 
     
    11891193egg_notification_bubble_widget_clear_buttons (EggNotificationBubbleWidget *bubble_widget) 
    11901194{ 
    11911195  if (bubble_widget->button_hbox != NULL) 
    1192     gtk_widget_destroy (bubble_widget->button_hbox); 
     1196    { 
     1197      if (gtk_widget_get_parent (bubble_widget->button_hbox) != NULL) 
     1198        gtk_widget_destroy (gtk_widget_get_parent (bubble_widget->button_hbox)); 
     1199      else 
     1200        gtk_widget_destroy (bubble_widget->button_hbox); 
     1201    } 
    11931202 
    11941203  bubble_widget->button_hbox = NULL; 
    11951204} 
  • ./src/themes/bubble/theme.c

    old new  
    7878    egg_notification_bubble_widget_set_pos(EGG_NOTIFICATION_BUBBLE_WIDGET(nw), 
    7979                                           x, y); 
    8080} 
     81 
     82void 
     83clear_notification_actions(GtkWindow *nw) 
     84{ 
     85    egg_notification_bubble_widget_clear_buttons( 
     86        EGG_NOTIFICATION_BUBBLE_WIDGET(nw)); 
     87}