aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2008-03-09 00:33:58 +0000
committerJason Woodward2008-03-09 00:33:58 +0000
commitb4347bc0e4e4c4bff798e9d09e911a3ed54bf093 (patch)
tree0cb4eb9a2f7bb37aabe470f5783206a87e15f997
parentc04f457f4efdfcb57b63e764b5af9e2efa2b61a7 (diff)
downloadgslapt-b4347bc0e4e4c4bff798e9d09e911a3ed54bf093.tar.gz
give a message if no changelogs were found
-rw-r--r--src/callbacks.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/callbacks.c b/src/callbacks.c
index 58564db..665b799 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -3754,7 +3754,7 @@ void view_upgradeable_packages (GtkMenuItem *menuitem, gpointer user_data)
void view_changelogs (GtkMenuItem *menuitem, gpointer user_data)
{
- int i;
+ int i, changelogs = 0;
GtkWidget *changelog_window = create_changelog_window();
GtkWidget *changelog_notebook = lookup_widget(changelog_window, "changelog_notebook");
@@ -3843,8 +3843,14 @@ void view_changelogs (GtkMenuItem *menuitem, gpointer user_data)
g_free(changelog_txt);
g_free(source_url);
+ changelogs++;
}
- gtk_widget_show(changelog_window);
+ if (changelogs > 0) {
+ gtk_widget_show(changelog_window);
+ } else {
+ gtk_widget_destroy(changelog_window);
+ notify((gchar *)_("ChangeLogs"),_("No changelogs found."));
+ }
}