aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/ChangeLog8
-rw-r--r--widgets/misc/e-task-widget.c9
-rw-r--r--widgets/misc/e-task-widget.h2
3 files changed, 14 insertions, 5 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 9372303125..c05701c48a 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,11 @@
+2008-01-04 Milan Crha <mcrha@redhat.com>
+
+ * Part of bug #504480
+ * e-task-widget.c: (e_task_widget_construct):
+ Possible leak fix.
+ * e-task-widget.c: (e_task_widget_update_image):
+ Function prototype changed and using parameter stock now.
+
2008-01-04 Matthew Barnes <mbarnes@redhat.com>
** Fix for bug #504480
diff --git a/widgets/misc/e-task-widget.c b/widgets/misc/e-task-widget.c
index bb9a6026d9..f440548796 100644
--- a/widgets/misc/e-task-widget.c
+++ b/widgets/misc/e-task-widget.c
@@ -164,8 +164,6 @@ e_task_widget_construct (ETaskWidget *task_widget,
GdkBitmap *mask;*/
GtkWidget *box;
GtkWidget *frame;
- GtkWidget *image = e_icon_factory_get_image ("gtk-stop", E_ICON_SIZE_MENU);
- GtkWidget *tool;
g_return_if_fail (task_widget != NULL);
g_return_if_fail (E_IS_TASK_WIDGET (task_widget));
@@ -205,6 +203,9 @@ e_task_widget_construct (ETaskWidget *task_widget,
gtk_widget_show (priv->label);
gtk_box_pack_start (GTK_BOX (box), priv->label, TRUE, TRUE, 0);
if (cancel_func) {
+ GtkWidget *image = e_icon_factory_get_image ("gtk-stop", E_ICON_SIZE_MENU);
+ GtkWidget *tool;
+
tool = (GtkWidget *) gtk_tool_button_new (image, NULL);
gtk_box_pack_end (GTK_BOX (box), tool, FALSE, TRUE, 0);
gtk_widget_show_all (tool);
@@ -261,11 +262,11 @@ e_task_widget_new (GdkPixbuf *icon_pixbuf,
GtkWidget *
e_task_widget_update_image (ETaskWidget *task_widget,
- char *stock, char *text)
+ const char *stock, const char *text)
{
GtkWidget *img, *tool;
- img = e_icon_factory_get_image ("stock_dialog-warning", E_ICON_SIZE_MENU);
+ img = e_icon_factory_get_image (stock, E_ICON_SIZE_MENU);
tool = (GtkWidget *) gtk_tool_button_new (img, NULL);
gtk_box_pack_start (GTK_BOX(task_widget->priv->box), tool, FALSE, TRUE, 0);
gtk_widget_destroy (task_widget->priv->image);
diff --git a/widgets/misc/e-task-widget.h b/widgets/misc/e-task-widget.h
index fb47b95095..eb7efa017e 100644
--- a/widgets/misc/e-task-widget.h
+++ b/widgets/misc/e-task-widget.h
@@ -76,7 +76,7 @@ void e_task_widget_update (ETaskWidget *task_widget,
double completion);
GtkWidget *
e_task_widget_update_image (ETaskWidget *task_widget,
- char *stock, char *text);
+ const char *stock, const char *text);
void e_task_wiget_alert (ETaskWidget *task_widget);
void e_task_wiget_unalert (ETaskWidget *task_widget);