aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-01-04 21:04:07 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-01-04 21:04:07 +0800
commit916cc41028bb21f810ef65042eef8a24c7598198 (patch)
tree77497bd6816aa60b7b1069066a34b7589b22e4ac /widgets
parentdf9b3d5711cbeff7857144aeff80ab1bce675559 (diff)
downloadgsoc2013-evolution-916cc41028bb21f810ef65042eef8a24c7598198.tar
gsoc2013-evolution-916cc41028bb21f810ef65042eef8a24c7598198.tar.gz
gsoc2013-evolution-916cc41028bb21f810ef65042eef8a24c7598198.tar.bz2
gsoc2013-evolution-916cc41028bb21f810ef65042eef8a24c7598198.tar.lz
gsoc2013-evolution-916cc41028bb21f810ef65042eef8a24c7598198.tar.xz
gsoc2013-evolution-916cc41028bb21f810ef65042eef8a24c7598198.tar.zst
gsoc2013-evolution-916cc41028bb21f810ef65042eef8a24c7598198.zip
Part of bug #504480 Possible leak fix. Function prototype changed and
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. svn path=/trunk/; revision=34759
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);