diff -rub --exclude=gtop.pot gtop-1.0.12~/details.c gtop-1.0.12/details.c --- gtop-1.0.12~/details.c Mon Feb 14 02:30:41 2000 +++ gtop-1.0.12/details.c Fri Mar 2 19:33:51 2001 @@ -28,7 +28,7 @@ static void set_mem_map (GTopProcMapRow **rows, GtkWidget *mcl); -static int delete_event_handler (GtkWidget *, gpointer, GTopProcViewData *); +static void destroy_handler (GtkWidget *, GTopProcViewData *); static void auto_update_cb (GtkWidget *, GTopProcViewData *); static void close_cb (GtkWidget *, GTopProcViewData *); static void update_cb (GtkWidget *, GTopProcViewData *); @@ -117,8 +117,8 @@ FALSE, TRUE, GNOME_PAD_SMALL); gtk_signal_connect - (GTK_OBJECT (d->details.dwin), "delete_event", - GTK_SIGNAL_FUNC (delete_event_handler), (gpointer) d); + (GTK_OBJECT (d->details.dwin), "destroy", + GTK_SIGNAL_FUNC (destroy_handler), (gpointer) d); gnome_dialog_button_connect (GNOME_DIALOG (d->details.dwin), 1, @@ -150,17 +150,11 @@ display_details (d, pid); } -static int -delete_event_handler (GtkWidget *widget, - gpointer func_data, - GTopProcViewData *d) +static void +destroy_handler (GtkWidget *widget, GTopProcViewData *d) { - gtk_widget_destroy (d->details.dwin); - d->details.dwin = d->details.icl = NULL; d->details.mcl = d->details.gswin = NULL; - - return TRUE; } static void @@ -202,7 +196,7 @@ gnome_config_set_int ("gtop/details/h", h); gnome_config_sync (); - delete_event_handler (widget, NULL, d); + gtk_widget_destroy(d->details.dwin); } static void @@ -333,6 +327,7 @@ dt->icl = gtk_clist_new (3); + gtk_widget_ensure_style(dt->icl); style = gtk_style_copy (gtk_widget_get_style (dt->icl)); style->font = gtop_properties.procview.font; gtk_widget_set_style (dt->icl, style); @@ -343,6 +338,7 @@ gtk_misc_set_alignment (GTK_MISC (l), 1.0, 0.5); + gtk_widget_ensure_style(l); style = gtk_style_copy (gtk_widget_get_style (l)); style->font = gtop_properties.procview.font; gtk_widget_set_style (l, style); @@ -598,6 +594,7 @@ mcl = gtk_clist_new (MAP_COLS); + gtk_widget_ensure_style(mcl); style = gtk_style_copy (gtk_widget_get_style (mcl)); style->font = gtop_properties.procview.font; gtk_widget_set_style (mcl, style); @@ -611,6 +608,7 @@ else gtk_misc_set_alignment (GTK_MISC (l), 1.0, 0.5); + gtk_widget_ensure_style(l); style = gtk_style_copy (gtk_widget_get_style (l)); style->font = gtop_properties.procview.font; gtk_widget_set_style (l, style); @@ -704,6 +702,7 @@ dt->mcl = gtk_clist_new (MAP_COLS); + gtk_widget_ensure_style(dt->mcl); style = gtk_style_copy (gtk_widget_get_style (dt->mcl)); style->font = gtop_properties.procview.font; gtk_widget_set_style (dt->mcl, style); @@ -717,6 +716,7 @@ else gtk_misc_set_alignment (GTK_MISC (l), 1.0, 0.5); + gtk_widget_ensure_style (l); style = gtk_style_copy (gtk_widget_get_style (l)); style->font = gtop_properties.procview.font; gtk_widget_set_style (l, style); diff -rub --exclude=gtop.pot gtop-1.0.12~/process-details.c gtop-1.0.12/process-details.c --- gtop-1.0.12~/process-details.c Mon Feb 14 02:30:41 2000 +++ gtop-1.0.12/process-details.c Fri Mar 2 19:34:18 2001 @@ -19,9 +19,8 @@ #include #include -static int -delete_event_handler (GtkWidget *widget, gpointer func_data, - GTopProcessDetails *d); +static void +destroy_handler (GtkWidget *widget, GTopProcessDetails *d); static void update_cb (GtkWidget *widget, GTopProcessDetails *d); @@ -162,8 +161,8 @@ update_cb (NULL, d); gtk_signal_connect - (GTK_OBJECT (d->dialog), "delete_event", - GTK_SIGNAL_FUNC (delete_event_handler), (gpointer) d); + (GTK_OBJECT (d->dialog), "destroy", + GTK_SIGNAL_FUNC (destroy_handler), (gpointer) d); gnome_dialog_button_connect (GNOME_DIALOG (d->dialog), 0, @@ -178,20 +177,16 @@ g_free (title); } -static int -delete_event_handler (GtkWidget *widget, gpointer func_data, - GTopProcessDetails *d) +static void +destroy_handler (GtkWidget *widget, GTopProcessDetails *d) { if (d->timeout_id) { gtk_timeout_remove (d->timeout_id); d->timeout_id = 0; } - gtk_widget_destroy (d->dialog); d->dialog = NULL; g_free (d); - - return TRUE; } static void @@ -219,7 +214,7 @@ gnome_config_set_int ("gtop/process_details/h", h); gnome_config_sync (); - delete_event_handler (widget, NULL, d); + gtk_widget_destroy(d->dialog); } static gint @@ -299,6 +294,7 @@ gtk_clist_freeze (list); gtk_clist_clear (list); + gtk_widget_ensure_style(GTK_WIDGET(list)); font = gtk_widget_get_style (GTK_WIDGET(list))->font; cw = gdk_char_width (font, 'M'); @@ -360,8 +356,9 @@ l = gtk_label_new (_("Process State:")); gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); gtk_misc_set_padding (GTK_MISC (l), GNOME_PAD_SMALL, 0); + gtk_widget_ensure_style(l); - style = gtk_widget_get_style (l); + style = gtk_style_copy(gtk_widget_get_style (l)); style->font = gtop_properties.procview.font; gtk_widget_set_style (l, style); @@ -424,8 +421,9 @@ l = gtk_label_new (_("Command Line:")); gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); gtk_misc_set_padding (GTK_MISC (l), GNOME_PAD_SMALL, 0); + gtk_widget_ensure_style(l); - style = gtk_widget_get_style (l); + style = gtk_style_copy(gtk_widget_get_style (l)); style->font = gtop_properties.procview.font; gtk_widget_set_style (l, style); @@ -528,8 +526,9 @@ l = gtk_label_new (_("Process Credentials:")); gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); gtk_misc_set_padding (GTK_MISC (l), GNOME_PAD_SMALL, 0); + gtk_widget_ensure_style(l); - style = gtk_widget_get_style (l); + style = gtk_style_copy(gtk_widget_get_style (l)); style->font = gtop_properties.procview.font; gtk_widget_set_style (l, style);