Patch: Error messages
- From: Devin Heitmueller <dheitmueller netilla com>
- To: memprof-list gnome org
- Subject: Patch: Error messages
- Date: 22 Sep 2002 01:04:24 -0400
Attached is a patch to add error messages if the user hits any of the
buttons without a process loaded.
I'm trying to break up the patches I posted in Bugzilla into smaller,
more specific changes.
Patch file generated against the CVS head.
Please let me know if you have any questions, or see any reason why this
shouldn't be merged.
Thanks,
--
Devin Heitmueller
Senior Software Engineer
Netilla Networks Inc
Index: main.c
===================================================================
RCS file: /cvs/gnome/memprof/main.c,v
retrieving revision 1.25
diff --unified -r1.25 main.c
--- main.c 5 Sep 2002 19:16:38 -0000 1.25
+++ main.c 22 Sep 2002 04:58:10 -0000
@@ -866,6 +866,9 @@
if (pwin->process)
process_window_maybe_kill (pwin);
+ else
+ show_error (pwin->main_window, ERROR_MODAL,
+ _("No process loaded"));
}
void
@@ -875,6 +878,9 @@
if (pwin->process)
process_window_maybe_detach (pwin);
+ else
+ show_error (pwin->main_window, ERROR_MODAL,
+ _("No process loaded"));
}
void
@@ -901,6 +907,9 @@
leaks_print (pwin->process, pwin->leaks, filename);
}
}
+ else
+ show_error (pwin->main_window, ERROR_MODAL,
+ _("No leaks to save"));
}
void
@@ -921,6 +930,9 @@
profile_write (pwin->profile, filename);
}
}
+ else
+ show_error (pwin->main_window, ERROR_MODAL,
+ _("No profile to save"));
}
void
@@ -964,6 +976,9 @@
process_start_input (pwin->process);
}
+ else
+ show_error (pwin->main_window, ERROR_MODAL,
+ _("No process loaded"));
}
void
@@ -985,6 +1000,9 @@
gtk_notebook_set_page (GTK_NOTEBOOK (pwin->main_notebook), 0);
}
+ else
+ show_error (pwin->main_window, ERROR_MODAL,
+ _("No process loaded"));
}
static void
@@ -1352,6 +1370,9 @@
pwin->follow_fork = GTK_CHECK_MENU_ITEM (widget)->active;
if (pwin->process)
process_set_follow_fork (pwin->process, pwin->follow_fork);
+ else
+ show_error (pwin->main_window, ERROR_MODAL,
+ _("No process loaded"));
}
void
@@ -1361,6 +1382,9 @@
pwin->follow_exec = GTK_CHECK_MENU_ITEM (widget)->active;
if (pwin->process)
process_set_follow_exec (pwin->process, pwin->follow_exec);
+ else
+ show_error (pwin->main_window, ERROR_MODAL,
+ _("No process loaded"));
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]