gnome-messagebox.c patch
- From: jacob berkman <jacob ximian com>
- To: gnome-libs-devel gnome org
- Cc: andersca codefactory se
- Subject: gnome-messagebox.c patch
- Date: 12 Sep 2001 18:30:35 -0400
this patch fixes things which should be obvious.
how did this get into CVS in the first place?
jacob
--
"It drains me, and it shakes me, and hurts like hell everytime I play
it, looking out at thousands of people cheering and smiling, oblivious
to the tragedy of it's meaning, like when you're going to have your
dog put down and it's wagging it's tail on the way there." - Thom Yorke
Index: gnome-messagebox.c
===================================================================
RCS file: /cvs/gnome/libgnomeui/libgnomeui/gnome-messagebox.c,v
retrieving revision 1.55
diff -u -r1.55 gnome-messagebox.c
--- gnome-messagebox.c 2001/09/06 04:59:18 1.55
+++ gnome-messagebox.c 2001/09/12 22:29:15
@@ -153,6 +153,7 @@
const gchar* title_prefix = NULL;
const gchar* appname;
gint i = 0;
+ const gchar *pixname = NULL;
g_return_if_fail (messagebox != NULL);
g_return_if_fail (GNOME_IS_MESSAGE_BOX (messagebox));
@@ -167,45 +168,31 @@
if (strcmp(GNOME_MESSAGE_BOX_INFO, message_box_type) == 0)
{
title_prefix = _("Information");
- s = GNOMEUIPIXMAPDIR "/gnome-info.png";
- if (s) {
- pixmap = gtk_image_new_from_file (s);
- g_free(s);
- }
+ pixname = GNOMEUIPIXMAPDIR "/gnome-info.png";
}
else if (strcmp(GNOME_MESSAGE_BOX_WARNING, message_box_type) == 0)
{
title_prefix = _("Warning");
- s = GNOMEUIPIXMAPDIR "/gnome-warning.png";
- if (s) {
- pixmap = gtk_image_new_from_file (s);
- g_free(s);
- }
+ pixname = GNOMEUIPIXMAPDIR "/gnome-warning.png";
}
else if (strcmp(GNOME_MESSAGE_BOX_ERROR, message_box_type) == 0)
{
title_prefix = _("Error");
- s = GNOMEUIPIXMAPDIR "/gnome-error.png";
- if (s) {
- pixmap = gtk_image_new_from_file (s);
- g_free(s);
- }
+ pixname = GNOMEUIPIXMAPDIR "/gnome-error.png";
}
else if (strcmp(GNOME_MESSAGE_BOX_QUESTION, message_box_type) == 0)
{
title_prefix = _("Question");
- s = GNOMEUIPIXMAPDIR "/gnome-question.png";
- if (s) {
- pixmap = gtk_image_new_from_file (s);
- g_free(s);
- }
+ pixname = GNOMEUIPIXMAPDIR "/gnome-question.png";
}
else
{
title_prefix = _("Message");
+ pixname = GNOMEUIPIXMAPDIR "/gnome-default-dlg.png";
}
g_assert(title_prefix != NULL);
+
s = NULL;
appname = gnome_program_get_human_readable_name(gnome_program_get());
if (appname) {
@@ -222,16 +209,8 @@
gtk_box_pack_start (GTK_BOX(GNOME_DIALOG(messagebox)->vbox),
hbox, TRUE, TRUE, 10);
gtk_widget_show (hbox);
-
- if (pixmap == NULL) {
- if (pixmap) gtk_widget_destroy(pixmap);
- s = GNOMEUIPIXMAPDIR "/gnome-default-dlg.png";
- if (s) {
- pixmap = gtk_image_new_from_file (s);
- g_free(s);
- } else
- pixmap = NULL;
- }
+
+ pixmap = gtk_image_new_from_file (pixname);
if (pixmap) {
gtk_box_pack_start (GTK_BOX(hbox),
pixmap, FALSE, TRUE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]