diff options
author | Milan Crha <mcrha@redhat.com> | 2008-01-04 21:04:07 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-01-04 21:04:07 +0800 |
commit | 916cc41028bb21f810ef65042eef8a24c7598198 (patch) | |
tree | 77497bd6816aa60b7b1069066a34b7589b22e4ac /widgets/misc/e-task-widget.c | |
parent | df9b3d5711cbeff7857144aeff80ab1bce675559 (diff) | |
download | gsoc2013-evolution-916cc41028bb21f810ef65042eef8a24c7598198.tar.gz 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/misc/e-task-widget.c')
-rw-r--r-- | widgets/misc/e-task-widget.c | 9 |
1 files changed, 5 insertions, 4 deletions
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); |