aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2008-03-09 00:27:23 +0000
committerJason Woodward2008-03-09 00:27:23 +0000
commitc04f457f4efdfcb57b63e764b5af9e2efa2b61a7 (patch)
tree1bf4012cbd3308bce5cd475cf53941093a40e3fc
parent5a991ac0e65f7d95a2f3df5f64aefeb8ad973e1a (diff)
downloadgslapt-c04f457f4efdfcb57b63e764b5af9e2efa2b61a7.tar.gz
added ability to show all packages that have available upgrades as (Show Upgradeable). added ChangeLogs view from help menu.
-rw-r--r--ChangeLog6
-rw-r--r--configure.in2
-rw-r--r--gslapt.glade199
-rw-r--r--src/callbacks.c181
-rw-r--r--src/callbacks.h4
-rw-r--r--src/interface.c258
-rw-r--r--src/interface.h1
7 files changed, 532 insertions, 119 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e8f2a6..25ab453 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
+0.4.0 Mar 09, 2008
+ * added ability to show all packages that have available upgrades
+ as (Show Upgradeable). Thanks to ahuillet for the feature request.
+ * added ChangeLogs view from help menu. Thanks to ahuillet for the
+ feature request.
+
0.3.19a Feb 22, 2008
* compat with slapt-get 0.9.12d
diff --git a/configure.in b/configure.in
index 0c2e78a..012422a 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([configure.in])
-AM_INIT_AUTOMAKE(gslapt, 0.3.19a)
+AM_INIT_AUTOMAKE(gslapt, 0.4.0)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
diff --git a/gslapt.glade b/gslapt.glade
index c25f714..ff6d045 100644
--- a/gslapt.glade
+++ b/gslapt.glade
@@ -1039,7 +1039,7 @@
<accelerator key="y" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1676">
+ <widget class="GtkImage" id="image1703">
<property name="visible">True</property>
<property name="stock">gtk-refresh</property>
<property name="icon_size">1</property>
@@ -1062,7 +1062,7 @@
<accelerator key="a" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1677">
+ <widget class="GtkImage" id="image1704">
<property name="visible">True</property>
<property name="stock">gtk-go-up</property>
<property name="icon_size">1</property>
@@ -1085,7 +1085,7 @@
<accelerator key="o" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1678">
+ <widget class="GtkImage" id="image1705">
<property name="visible">True</property>
<property name="stock">gtk-remove</property>
<property name="icon_size">1</property>
@@ -1108,7 +1108,7 @@
<accelerator key="Return" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1679">
+ <widget class="GtkImage" id="image1706">
<property name="visible">True</property>
<property name="stock">gtk-apply</property>
<property name="icon_size">1</property>
@@ -1154,12 +1154,12 @@
<property name="visible">True</property>
<property name="label" translatable="yes">Unmark All</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="unmark_all_activate" last_modification_time="Fri, 05 Aug 2005 16:42:40 GMT"/>
<signal name="activate" handler="unmark_all_activate" last_modification_time="Fri, 05 Aug 2005 16:40:24 GMT"/>
+ <signal name="activate" handler="unmark_all_activate" last_modification_time="Fri, 05 Aug 2005 16:42:40 GMT"/>
<accelerator key="z" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1680">
+ <widget class="GtkImage" id="image1707">
<property name="visible">True</property>
<property name="stock">gtk-undo</property>
<property name="icon_size">1</property>
@@ -1187,7 +1187,7 @@
<accelerator key="p" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1681">
+ <widget class="GtkImage" id="image1708">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
@@ -1231,7 +1231,7 @@
<property name="tooltip" translatable="yes">View available packages from current sources</property>
<property name="label" translatable="yes">Available</property>
<property name="use_underline">True</property>
- <property name="active">False</property>
+ <property name="active">True</property>
<property name="group">view_all_packages_menu</property>
<signal name="activate" handler="view_available_packages" last_modification_time="Mon, 29 May 2006 04:08:47 GMT"/>
<accelerator key="F2" modifiers="0" signal="activate"/>
@@ -1244,7 +1244,7 @@
<property name="tooltip" translatable="yes">View installed packages</property>
<property name="label" translatable="yes">Installed</property>
<property name="use_underline">True</property>
- <property name="active">False</property>
+ <property name="active">True</property>
<property name="group">view_all_packages_menu</property>
<signal name="activate" handler="view_installed_packages" last_modification_time="Mon, 29 May 2006 04:08:47 GMT"/>
<accelerator key="F3" modifiers="0" signal="activate"/>
@@ -1257,12 +1257,25 @@
<property name="tooltip" translatable="yes">View Marked Packages</property>
<property name="label" translatable="yes">Marked</property>
<property name="use_underline">True</property>
- <property name="active">False</property>
+ <property name="active">True</property>
<property name="group">view_all_packages_menu</property>
<signal name="activate" handler="view_marked_packages" last_modification_time="Sun, 18 Jun 2006 20:20:52 GMT"/>
<accelerator key="F4" modifiers="0" signal="activate"/>
</widget>
</child>
+
+ <child>
+ <widget class="GtkRadioMenuItem" id="view_upgradeable_packages_menu">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">View Upgradeable Packages</property>
+ <property name="label" translatable="yes">Upgradeable</property>
+ <property name="use_underline">True</property>
+ <property name="active">False</property>
+ <property name="group">view_all_packages_menu</property>
+ <signal name="activate" handler="view_upgradeable_packages" last_modification_time="Sat, 08 Mar 2008 21:29:50 GMT"/>
+ <accelerator key="F5" modifiers="0" signal="activate"/>
+ </widget>
+ </child>
</widget>
</child>
</widget>
@@ -1286,7 +1299,7 @@
<accelerator key="n" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1682">
+ <widget class="GtkImage" id="image1709">
<property name="visible">True</property>
<property name="pixbuf">pkg_action_available.png</property>
<property name="xalign">0.5</property>
@@ -1307,7 +1320,7 @@
<accelerator key="i" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1683">
+ <widget class="GtkImage" id="image1710">
<property name="visible">True</property>
<property name="pixbuf">pkg_action_install.png</property>
<property name="xalign">0.5</property>
@@ -1328,7 +1341,7 @@
<accelerator key="e" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1684">
+ <widget class="GtkImage" id="image1711">
<property name="visible">True</property>
<property name="pixbuf">pkg_action_reinstall.png</property>
<property name="xalign">0.5</property>
@@ -1349,7 +1362,7 @@
<accelerator key="u" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1685">
+ <widget class="GtkImage" id="image1712">
<property name="visible">True</property>
<property name="pixbuf">pkg_action_upgrade.png</property>
<property name="xalign">0.5</property>
@@ -1370,7 +1383,7 @@
<accelerator key="d" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1686">
+ <widget class="GtkImage" id="image1713">
<property name="visible">True</property>
<property name="pixbuf">pkg_action_downgrade.png</property>
<property name="xalign">0.5</property>
@@ -1391,7 +1404,7 @@
<accelerator key="r" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1687">
+ <widget class="GtkImage" id="image1714">
<property name="visible">True</property>
<property name="pixbuf">pkg_action_remove.png</property>
<property name="xalign">0.5</property>
@@ -1424,7 +1437,7 @@
<signal name="activate" handler="open_icon_legend" last_modification_time="Wed, 01 Jun 2005 03:20:34 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1688">
+ <widget class="GtkImage" id="image1715">
<property name="visible">True</property>
<property name="stock">gtk-dialog-info</property>
<property name="icon_size">1</property>
@@ -1438,6 +1451,28 @@
</child>
<child>
+ <widget class="GtkImageMenuItem" id="changelogs_menu">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">View ChangeLogs</property>
+ <property name="label" translatable="yes">ChangeLogs</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="view_changelogs" last_modification_time="Sat, 08 Mar 2008 21:29:50 GMT"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image1716">
+ <property name="visible">True</property>
+ <property name="stock">gtk-info</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
<widget class="GtkImageMenuItem" id="about3">
<property name="visible">True</property>
<property name="label" translatable="yes">About</property>
@@ -1445,7 +1480,7 @@
<signal name="activate" handler="open_about" last_modification_time="Sat, 05 Feb 2005 20:48:31 GMT"/>
<child internal-child="image">
- <widget class="GtkImage" id="image1689">
+ <widget class="GtkImage" id="image1717">
<property name="visible">True</property>
<property name="stock">gtk-about</property>
<property name="icon_size">1</property>
@@ -5060,4 +5095,132 @@ http://software.jaos.org/#gslapt&lt;/span&gt;</property>
</child>
</widget>
+<widget class="GtkWindow" id="changelog_window">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">ChangeLogs</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <signal name="destroy_event" handler="gtk_widget_destroy" last_modification_time="Sat, 08 Mar 2008 22:04:48 GMT"/>
+
+ <child>
+ <widget class="GtkVBox" id="vbox78">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkNotebook" id="notebook1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">True</property>
+ <property name="show_border">True</property>
+ <property name="tab_pos">GTK_POS_TOP</property>
+ <property name="scrollable">False</property>
+ <property name="enable_popup">False</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow25">
+ <property name="border_width">2</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="textview1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="overwrite">False</property>
+ <property name="accepts_tab">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_NONE</property>
+ <property name="cursor_visible">True</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label296">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">label296</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">6</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHButtonBox" id="hbuttonbox3">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkButton" id="button12">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <signal name="clicked" handler="gtk_widget_destroy" object="changelog_window" last_modification_time="Sat, 08 Mar 2008 22:05:24 GMT"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">6</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>
diff --git a/src/callbacks.c b/src/callbacks.c
index 8f00aad..58564db 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -446,14 +446,14 @@ void build_package_treeviewlist (GtkWidget *treeview)
NUMBER_OF_COLUMNS,
GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN,
- G_TYPE_BOOLEAN, G_TYPE_BOOLEAN
+ G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN
));
for (i = 0; i < all->pkg_count; i++ ) {
/* we use this for sorting the status */
/* a=installed,i=install,r=remove,u=upgrade,z=available */
gchar *status = NULL;
- guint is_inst = 0;
+ gboolean is_inst = FALSE, is_an_upgrade = FALSE;
GdkPixbuf *status_icon = NULL;
gchar *short_desc = slapt_gen_short_pkg_description(all->pkgs[i]);
slapt_pkg_info_t *installed_pkg = NULL;
@@ -461,7 +461,11 @@ void build_package_treeviewlist (GtkWidget *treeview)
if ((installed_pkg = slapt_get_exact_pkg(installed,all->pkgs[i]->name,
all->pkgs[i]->version)) != NULL) {
- is_inst = 1;
+ is_inst = TRUE;
+
+ } else if ((installed_pkg = slapt_get_newest_pkg(installed,all->pkgs[i]->name)) != NULL) {
+ if (slapt_cmp_pkgs(all->pkgs[i],installed_pkg) > 0)
+ is_an_upgrade = TRUE;
}
if (trans->exclude_pkgs->pkg_count > 0 &&
@@ -494,7 +498,7 @@ void build_package_treeviewlist (GtkWidget *treeview)
status_icon = create_pixbuf("pkg_action_upgrade.png");
status = g_strdup_printf("u%s",all->pkgs[i]->name);
location = all->pkgs[i]->location;
- } else if (is_inst == 1) {
+ } else if (is_inst) {
/* if it's excluded */
if ((trans->exclude_pkgs->pkg_count > 0 &&
slapt_get_exact_pkg(trans->exclude_pkgs,all->pkgs[i]->name,
@@ -532,6 +536,7 @@ void build_package_treeviewlist (GtkWidget *treeview)
INST_COLUMN, FALSE,
VISIBLE_COLUMN,TRUE,
MARKED_COLUMN, FALSE,
+ UPGRADEABLE_COLUMN, is_an_upgrade,
-1
);
@@ -578,6 +583,7 @@ void build_package_treeviewlist (GtkWidget *treeview)
INST_COLUMN, TRUE,
VISIBLE_COLUMN,TRUE,
MARKED_COLUMN, FALSE,
+ UPGRADEABLE_COLUMN, FALSE,
-1
);
@@ -607,7 +613,8 @@ void build_searched_treeviewlist (GtkWidget *treeview, gchar *pattern)
struct slapt_pkg_list *a_matches = NULL,*i_matches = NULL;
GtkTreeModelSort *package_model;
gboolean view_list_all = FALSE, view_list_installed = FALSE,
- view_list_available = FALSE, view_list_marked = FALSE;
+ view_list_available = FALSE, view_list_marked = FALSE,
+ view_list_upgradeable = FALSE;
if (pattern == NULL || (strcmp(pattern,"") == 0)) {
reset_search_list();
@@ -618,10 +625,11 @@ void build_searched_treeviewlist (GtkWidget *treeview, gchar *pattern)
filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
base_model = GTK_TREE_MODEL(gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(filter_model)));
- view_list_all = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_all_packages_menu")));
- view_list_available = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_available_packages_menu")));
- view_list_installed = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_installed_packages_menu")));
- view_list_marked = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_marked_packages_menu")));
+ view_list_all = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_all_packages_menu")));
+ view_list_available = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_available_packages_menu")));
+ view_list_installed = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_installed_packages_menu")));
+ view_list_marked = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_marked_packages_menu")));
+ view_list_upgradeable = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_upgradeable_packages_menu")));
a_matches = slapt_search_pkg_list(all,pattern);
i_matches = slapt_search_pkg_list(installed,pattern);
@@ -629,13 +637,15 @@ void build_searched_treeviewlist (GtkWidget *treeview, gchar *pattern)
while (valid) {
gchar *name = NULL,*version = NULL,*location = NULL;
slapt_pkg_info_t *a_pkg = NULL, *i_pkg = NULL;
- gboolean marked = FALSE;
+ gboolean marked = FALSE;
+ gboolean upgradeable = FALSE;
gtk_tree_model_get(base_model,&iter,
NAME_COLUMN, &name,
VERSION_COLUMN, &version,
LOCATION_COLUMN, &location,
MARKED_COLUMN, &marked,
+ UPGRADEABLE_COLUMN, &upgradeable,
-1
);
@@ -650,6 +660,8 @@ void build_searched_treeviewlist (GtkWidget *treeview, gchar *pattern)
gtk_list_store_set(GTK_LIST_STORE(base_model),&iter,VISIBLE_COLUMN,TRUE,-1);
} else if (view_list_marked && marked && (a_pkg != NULL || i_pkg != NULL)) {
gtk_list_store_set(GTK_LIST_STORE(base_model),&iter,VISIBLE_COLUMN,TRUE,-1);
+ } else if (view_list_upgradeable && upgradeable && a_pkg != NULL) {
+ gtk_list_store_set(GTK_LIST_STORE(base_model),&iter,VISIBLE_COLUMN,TRUE,-1);
} else {
gtk_list_store_set(GTK_LIST_STORE(base_model),&iter,VISIBLE_COLUMN,FALSE,-1);
}
@@ -3087,12 +3099,14 @@ void unmark_all_activate (GtkMenuItem *menuitem, gpointer user_data)
static void reset_search_list (void)
{
gboolean view_list_all = FALSE, view_list_installed = FALSE,
- view_list_available = FALSE, view_list_marked = FALSE;
+ view_list_available = FALSE, view_list_marked = FALSE,
+ view_list_upgradeable = FALSE;
- view_list_all = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_all_packages_menu")));
- view_list_available = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_available_packages_menu")));
- view_list_installed = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_installed_packages_menu")));
- view_list_marked = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_marked_packages_menu")));
+ view_list_all = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_all_packages_menu")));
+ view_list_available = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_available_packages_menu")));
+ view_list_installed = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_installed_packages_menu")));
+ view_list_marked = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_marked_packages_menu")));
+ view_list_upgradeable = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(lookup_widget(gslapt,"view_upgradeable_packages_menu")));
if (view_list_all) {
view_all_packages(NULL,NULL);
@@ -3102,6 +3116,8 @@ static void reset_search_list (void)
view_available_packages(NULL,NULL);
} else if (view_list_marked) {
view_marked_packages(NULL,NULL);
+ } else if (view_list_upgradeable) {
+ view_upgradeable_packages(NULL,NULL);
}
}
@@ -3697,3 +3713,138 @@ void preferences_sources_add_key (GtkWidget *w, gpointer user_data)
return;
}
#endif
+
+void view_upgradeable_packages (GtkMenuItem *menuitem, gpointer user_data)
+{
+ gboolean valid;
+ GtkTreeIter iter;
+ GtkTreeModelFilter *filter_model;
+ GtkTreeModel *base_model;
+ GtkTreeModelSort *package_model;
+ GtkTreeView *treeview;
+ gchar *pattern = (gchar *)gtk_entry_get_text(GTK_ENTRY(lookup_widget(gslapt,"search_entry")));
+
+ treeview = GTK_TREE_VIEW(lookup_widget(gslapt,"pkg_listing_treeview"));
+ package_model = GTK_TREE_MODEL_SORT(gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)));
+
+ filter_model = GTK_TREE_MODEL_FILTER(gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(package_model)));
+ base_model = GTK_TREE_MODEL(gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(filter_model)));
+
+ valid = gtk_tree_model_get_iter_first(base_model,&iter);
+ while (valid) {
+ gboolean upgradeable = FALSE;
+
+ gtk_tree_model_get(base_model,&iter,
+ UPGRADEABLE_COLUMN, &upgradeable,
+ -1
+ );
+
+ if (upgradeable) {
+ gtk_list_store_set(GTK_LIST_STORE(base_model),&iter,VISIBLE_COLUMN,TRUE,-1);
+ } else {
+ gtk_list_store_set(GTK_LIST_STORE(base_model),&iter,VISIBLE_COLUMN,FALSE,-1);
+ }
+
+ valid = gtk_tree_model_iter_next(base_model,&iter);
+ }
+
+ if (pattern && strlen(pattern) > 0)
+ build_searched_treeviewlist(GTK_WIDGET(treeview), pattern);
+}
+
+void view_changelogs (GtkMenuItem *menuitem, gpointer user_data)
+{
+ int i;
+ GtkWidget *changelog_window = create_changelog_window();
+ GtkWidget *changelog_notebook = lookup_widget(changelog_window, "changelog_notebook");
+
+ for (i = 0; i < global_config->sources->count; ++i) {
+ char *changelog_filename, *changelog_data;
+ gchar *source_url, *path_and_file, *changelog_txt;
+ struct stat stat_buf;
+ size_t pls = 1;
+ FILE *changelog_f = NULL;
+ GtkWidget *textview, *scrolledwindow, *label;
+ GtkTextBuffer *changelog_buffer;
+
+ if ( global_config->sources->url[i] == NULL )
+ continue;
+
+ source_url = g_strdup ( global_config->sources->url[i] );
+
+ changelog_filename = slapt_gen_filename_from_url(source_url,SLAPT_CHANGELOG_FILE);
+ path_and_file = g_strjoin("/", global_config->working_dir, changelog_filename, NULL);
+
+ if ((changelog_f = fopen(path_and_file,"rb")) == NULL) {
+ free(changelog_filename);
+ g_free(path_and_file);
+ g_free(source_url);
+ continue;
+ }
+
+ if (stat(changelog_filename,&stat_buf) == -1) {
+ fclose(changelog_f);
+ free(changelog_filename);
+ g_free(path_and_file);
+ g_free(source_url);
+ continue;
+ }
+
+ free(changelog_filename);
+ g_free(path_and_file);
+
+ /* don't mmap empty files */
+ if ((int)stat_buf.st_size < 1) {
+ fclose(changelog_f);
+ g_free(source_url);
+ continue;
+ }
+
+ pls = (size_t)stat_buf.st_size;
+
+ changelog_data = (char *)mmap(0, pls,
+ PROT_READ|PROT_WRITE, MAP_PRIVATE, fileno(changelog_f), 0);
+
+ fclose(changelog_f);
+
+ if (changelog_data == (void *)-1) {
+ g_free(source_url);
+ continue;
+ }
+
+ changelog_data[pls - 1] = '\0';
+
+ changelog_txt = g_strdup(changelog_data);
+
+ /* munmap now that we are done */
+ if (munmap(changelog_data,pls) == -1) {
+ g_free(changelog_txt);
+ g_free(source_url);
+ continue;
+ }
+
+ scrolledwindow = gtk_scrolled_window_new ( NULL, NULL );
+ textview = gtk_text_view_new ();
+ label = gtk_label_new ( source_url );
+
+ changelog_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
+ gtk_text_buffer_set_text(changelog_buffer, changelog_txt, -1);
+
+ gtk_widget_show( scrolledwindow );
+ gtk_widget_show( textview );
+ gtk_widget_show( label );
+
+ gtk_container_add ( GTK_CONTAINER(changelog_notebook), scrolledwindow );
+ gtk_container_set_border_width ( GTK_SCROLLED_WINDOW(scrolledwindow), 2 );
+ gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
+
+ gtk_container_add ( GTK_CONTAINER(scrolledwindow), textview );
+ gtk_notebook_set_tab_label (GTK_NOTEBOOK (changelog_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (changelog_notebook), i), label);
+
+ g_free(changelog_txt);
+ g_free(source_url);
+ }
+
+ gtk_widget_show(changelog_window);
+}
+
diff --git a/src/callbacks.h b/src/callbacks.h
index ccd716e..efd5d72 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -32,6 +32,7 @@ enum {
VISIBLE_COLUMN,
INST_COLUMN,
MARKED_COLUMN,
+ UPGRADEABLE_COLUMN,
NUMBER_OF_COLUMNS
};
@@ -104,3 +105,6 @@ void mark_obsolete_packages (GtkMenuItem *menuitem, gpointer user_data);
void preferences_sources_add_key (GtkWidget *w, gpointer user_data);
#endif
+
+void view_upgradeable_packages (GtkMenuItem *menuitem, gpointer user_data);
+void view_changelogs (GtkMenuItem *menuitem, gpointer user_data);
diff --git a/src/interface.c b/src/interface.c
index cf75071..a156b34 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -554,22 +554,22 @@ create_gslapt (void)
GtkWidget *actions2;
GtkWidget *actions2_menu;
GtkWidget *update1;
- GtkWidget *image1676;
+ GtkWidget *image1703;
GtkWidget *mark_all_upgrades2;
- GtkWidget *image1677;
+ GtkWidget *image1704;
GtkWidget *mark_obsolete1;
- GtkWidget *image1678;
+ GtkWidget *image1705;
GtkWidget *execute1;
- GtkWidget *image1679;
+ GtkWidget *image1706;
GtkWidget *separator2;
GtkWidget *quit;
GtkWidget *edit1;
GtkWidget *edit1_menu;
GtkWidget *unmark_all1;
- GtkWidget *image1680;
+ GtkWidget *image1707;
GtkWidget *separator1;
GtkWidget *preferences2;
- GtkWidget *image1681;
+ GtkWidget *image1708;
GtkWidget *view1;
GtkWidget *view1_menu;
GSList *view_all_packages_menu_group = NULL;
@@ -577,26 +577,29 @@ create_gslapt (void)
GtkWidget *view_available_packages_menu;
GtkWidget *view_installed_packages_menu;
GtkWidget *view_marked_packages_menu;
+ GtkWidget *view_upgradeable_packages_menu;
GtkWidget *package1;
GtkWidget *package1_menu;
GtkWidget *unmark1;
- GtkWidget *image1682;
+ GtkWidget *image1709;
GtkWidget *install1;
- GtkWidget *image1683;
+ GtkWidget *image1710;
GtkWidget *re_install1;
- GtkWidget *image1684;
+ GtkWidget *image1711;
GtkWidget *upgrade1;
- GtkWidget *image1685;
+ GtkWidget *image1712;
GtkWidget *downgrade1;
- GtkWidget *image1686;
+ GtkWidget *image1713;
GtkWidget *remove1;
- GtkWidget *image1687;
+ GtkWidget *image1714;
GtkWidget *help3;
GtkWidget *help3_menu;
GtkWidget *icon_legend1;
- GtkWidget *image1688;
+ GtkWidget *image1715;
+ GtkWidget *changelogs_menu;
+ GtkWidget *image1716;
GtkWidget *about3;
- GtkWidget *image1689;
+ GtkWidget *image1717;
GtkWidget *action_toolbar;
GtkIconSize tmp_toolbar_icon_size;
GtkWidget *tmp_image;
@@ -711,10 +714,10 @@ create_gslapt (void)
GDK_y, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1676 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU);
- gtk_widget_set_name (image1676, "image1676");
- gtk_widget_show (image1676);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (update1), image1676);
+ image1703 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image1703, "image1703");
+ gtk_widget_show (image1703);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (update1), image1703);
mark_all_upgrades2 = gtk_image_menu_item_new_with_mnemonic (_("Mark All Upgrades"));
gtk_widget_set_name (mark_all_upgrades2, "mark_all_upgrades2");
@@ -725,10 +728,10 @@ create_gslapt (void)
GDK_a, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1677 = gtk_image_new_from_stock ("gtk-go-up", GTK_ICON_SIZE_MENU);
- gtk_widget_set_name (image1677, "image1677");
- gtk_widget_show (image1677);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mark_all_upgrades2), image1677);
+ image1704 = gtk_image_new_from_stock ("gtk-go-up", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image1704, "image1704");
+ gtk_widget_show (image1704);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mark_all_upgrades2), image1704);
mark_obsolete1 = gtk_image_menu_item_new_with_mnemonic (_("Mark Obsolete"));
gtk_widget_set_name (mark_obsolete1, "mark_obsolete1");
@@ -739,10 +742,10 @@ create_gslapt (void)
GDK_o, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1678 = gtk_image_new_from_stock ("gtk-remove", GTK_ICON_SIZE_MENU);
- gtk_widget_set_name (image1678, "image1678");
- gtk_widget_show (image1678);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mark_obsolete1), image1678);
+ image1705 = gtk_image_new_from_stock ("gtk-remove", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image1705, "image1705");
+ gtk_widget_show (image1705);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mark_obsolete1), image1705);
execute1 = gtk_image_menu_item_new_with_mnemonic (_("Execute"));
gtk_widget_set_name (execute1, "execute1");
@@ -753,10 +756,10 @@ create_gslapt (void)
GDK_Return, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1679 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_MENU);
- gtk_widget_set_name (image1679, "image1679");
- gtk_widget_show (image1679);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (execute1), image1679);
+ image1706 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image1706, "image1706");
+ gtk_widget_show (image1706);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (execute1), image1706);
separator2 = gtk_separator_menu_item_new ();
gtk_widget_set_name (separator2, "separator2");
@@ -786,10 +789,10 @@ create_gslapt (void)
GDK_z, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1680 = gtk_image_new_from_stock ("gtk-undo", GTK_ICON_SIZE_MENU);
- gtk_widget_set_name (image1680, "image1680");
- gtk_widget_show (image1680);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (unmark_all1), image1680);
+ image1707 = gtk_image_new_from_stock ("gtk-undo", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image1707, "image1707");
+ gtk_widget_show (image1707);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (unmark_all1), image1707);
separator1 = gtk_separator_menu_item_new ();
gtk_widget_set_name (separator1, "separator1");
@@ -805,10 +808,10 @@ create_gslapt (void)
GDK_p, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1681 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
- gtk_widget_set_name (image1681, "image1681");
- gtk_widget_show (image1681);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (preferences2), image1681);
+ image1708 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image1708, "image1708");
+ gtk_widget_show (image1708);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (preferences2), image1708);
view1 = gtk_menu_item_new_with_mnemonic (_("_View"));
gtk_widget_set_name (view1, "view1");
@@ -828,7 +831,6 @@ create_gslapt (void)
gtk_widget_add_accelerator (view_all_packages_menu, "activate", accel_group,
GDK_F1, (GdkModifierType) 0,
GTK_ACCEL_VISIBLE);
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (view_all_packages_menu), TRUE);
view_available_packages_menu = gtk_radio_menu_item_new_with_mnemonic (view_all_packages_menu_group, _("Available"));
view_all_packages_menu_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (view_available_packages_menu));
@@ -860,6 +862,16 @@ create_gslapt (void)
GDK_F4, (GdkModifierType) 0,
GTK_ACCEL_VISIBLE);
+ view_upgradeable_packages_menu = gtk_radio_menu_item_new_with_mnemonic (view_all_packages_menu_group, _("Upgradeable"));
+ view_all_packages_menu_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (view_upgradeable_packages_menu));
+ gtk_widget_set_name (view_upgradeable_packages_menu, "view_upgradeable_packages_menu");
+ gtk_widget_show (view_upgradeable_packages_menu);
+ gtk_container_add (GTK_CONTAINER (view1_menu), view_upgradeable_packages_menu);
+ gtk_tooltips_set_tip (tooltips, view_upgradeable_packages_menu, _("View Upgradeable Packages"), NULL);
+ gtk_widget_add_accelerator (view_upgradeable_packages_menu, "activate", accel_group,
+ GDK_F5, (GdkModifierType) 0,
+ GTK_ACCEL_VISIBLE);
+
package1 = gtk_menu_item_new_with_mnemonic (_("P_ackage"));
gtk_widget_set_name (package1, "package1");
gtk_widget_show (package1);
@@ -878,10 +890,10 @@ create_gslapt (void)
GDK_n, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1682 = create_pixmap (gslapt, "pkg_action_available.png");
- gtk_widget_set_name (image1682, "image1682");
- gtk_widget_show (image1682);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (unmark1), image1682);
+ image1709 = create_pixmap (gslapt, "pkg_action_available.png");
+ gtk_widget_set_name (image1709, "image1709");
+ gtk_widget_show (image1709);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (unmark1), image1709);
install1 = gtk_image_menu_item_new_with_mnemonic (_("Install"));
gtk_widget_set_name (install1, "install1");
@@ -892,10 +904,10 @@ create_gslapt (void)
GDK_i, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1683 = create_pixmap (gslapt, "pkg_action_install.png");
- gtk_widget_set_name (image1683, "image1683");
- gtk_widget_show (image1683);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (install1), image1683);
+ image1710 = create_pixmap (gslapt, "pkg_action_install.png");
+ gtk_widget_set_name (image1710, "image1710");
+ gtk_widget_show (image1710);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (install1), image1710);
re_install1 = gtk_image_menu_item_new_with_mnemonic (_("Re-Install"));
gtk_widget_set_name (re_install1, "re_install1");
@@ -906,10 +918,10 @@ create_gslapt (void)
GDK_e, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1684 = create_pixmap (gslapt, "pkg_action_reinstall.png");
- gtk_widget_set_name (image1684, "image1684");
- gtk_widget_show (image1684);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (re_install1), image1684);
+ image1711 = create_pixmap (gslapt, "pkg_action_reinstall.png");
+ gtk_widget_set_name (image1711, "image1711");
+ gtk_widget_show (image1711);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (re_install1), image1711);
upgrade1 = gtk_image_menu_item_new_with_mnemonic (_("Upgrade"));
gtk_widget_set_name (upgrade1, "upgrade1");
@@ -920,10 +932,10 @@ create_gslapt (void)
GDK_u, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1685 = create_pixmap (gslapt, "pkg_action_upgrade.png");
- gtk_widget_set_name (image1685, "image1685");
- gtk_widget_show (image1685);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (upgrade1), image1685);
+ image1712 = create_pixmap (gslapt, "pkg_action_upgrade.png");
+ gtk_widget_set_name (image1712, "image1712");
+ gtk_widget_show (image1712);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (upgrade1), image1712);
downgrade1 = gtk_image_menu_item_new_with_mnemonic (_("Downgrade"));
gtk_widget_set_name (downgrade1, "downgrade1");
@@ -934,10 +946,10 @@ create_gslapt (void)
GDK_d, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1686 = create_pixmap (gslapt, "pkg_action_downgrade.png");
- gtk_widget_set_name (image1686, "image1686");
- gtk_widget_show (image1686);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (downgrade1), image1686);
+ image1713 = create_pixmap (gslapt, "pkg_action_downgrade.png");
+ gtk_widget_set_name (image1713, "image1713");
+ gtk_widget_show (image1713);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (downgrade1), image1713);
remove1 = gtk_image_menu_item_new_with_mnemonic (_("Remove"));
gtk_widget_set_name (remove1, "remove1");
@@ -948,10 +960,10 @@ create_gslapt (void)
GDK_r, (GdkModifierType) GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE);
- image1687 = create_pixmap (gslapt, "pkg_action_remove.png");
- gtk_widget_set_name (image1687, "image1687");
- gtk_widget_show (image1687);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (remove1), image1687);
+ image1714 = create_pixmap (gslapt, "pkg_action_remove.png");
+ gtk_widget_set_name (image1714, "image1714");
+ gtk_widget_show (image1714);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (remove1), image1714);
help3 = gtk_menu_item_new_with_mnemonic (_("_Help"));
gtk_widget_set_name (help3, "help3");
@@ -967,20 +979,31 @@ create_gslapt (void)
gtk_widget_show (icon_legend1);
gtk_container_add (GTK_CONTAINER (help3_menu), icon_legend1);
- image1688 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU);
- gtk_widget_set_name (image1688, "image1688");
- gtk_widget_show (image1688);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (icon_legend1), image1688);
+ image1715 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image1715, "image1715");
+ gtk_widget_show (image1715);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (icon_legend1), image1715);
+
+ changelogs_menu = gtk_image_menu_item_new_with_mnemonic (_("ChangeLogs"));
+ gtk_widget_set_name (changelogs_menu, "changelogs_menu");
+ gtk_widget_show (changelogs_menu);
+ gtk_container_add (GTK_CONTAINER (help3_menu), changelogs_menu);
+ gtk_tooltips_set_tip (tooltips, changelogs_menu, _("View ChangeLogs"), NULL);
+
+ image1716 = gtk_image_new_from_stock ("gtk-info", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image1716, "image1716");
+ gtk_widget_show (image1716);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (changelogs_menu), image1716);
about3 = gtk_image_menu_item_new_with_mnemonic (_("About"));
gtk_widget_set_name (about3, "about3");
gtk_widget_show (about3);
gtk_container_add (GTK_CONTAINER (help3_menu), about3);
- image1689 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_MENU);
- gtk_widget_set_name (image1689, "image1689");
- gtk_widget_show (image1689);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (about3), image1689);
+ image1717 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_MENU);
+ gtk_widget_set_name (image1717, "image1717");
+ gtk_widget_show (image1717);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (about3), image1717);
action_toolbar = gtk_toolbar_new ();
gtk_widget_set_name (action_toolbar, "action_toolbar");
@@ -1503,9 +1526,15 @@ create_gslapt (void)
g_signal_connect ((gpointer) view_marked_packages_menu, "activate",
G_CALLBACK (view_marked_packages),
NULL);
+ g_signal_connect ((gpointer) view_upgradeable_packages_menu, "activate",
+ G_CALLBACK (view_upgradeable_packages),
+ NULL);
g_signal_connect ((gpointer) icon_legend1, "activate",
G_CALLBACK (open_icon_legend),
NULL);
+ g_signal_connect ((gpointer) changelogs_menu, "activate",
+ G_CALLBACK (view_changelogs),
+ NULL);
g_signal_connect ((gpointer) about3, "activate",
G_CALLBACK (open_about),
NULL);
@@ -1532,48 +1561,51 @@ create_gslapt (void)
GLADE_HOOKUP_OBJECT (gslapt, actions2, "actions2");
GLADE_HOOKUP_OBJECT (gslapt, actions2_menu, "actions2_menu");
GLADE_HOOKUP_OBJECT (gslapt, update1, "update1");
- GLADE_HOOKUP_OBJECT (gslapt, image1676, "image1676");
+ GLADE_HOOKUP_OBJECT (gslapt, image1703, "image1703");
GLADE_HOOKUP_OBJECT (gslapt, mark_all_upgrades2, "mark_all_upgrades2");
- GLADE_HOOKUP_OBJECT (gslapt, image1677, "image1677");
+ GLADE_HOOKUP_OBJECT (gslapt, image1704, "image1704");
GLADE_HOOKUP_OBJECT (gslapt, mark_obsolete1, "mark_obsolete1");
- GLADE_HOOKUP_OBJECT (gslapt, image1678, "image1678");
+ GLADE_HOOKUP_OBJECT (gslapt, image1705, "image1705");
GLADE_HOOKUP_OBJECT (gslapt, execute1, "execute1");
- GLADE_HOOKUP_OBJECT (gslapt, image1679, "image1679");
+ GLADE_HOOKUP_OBJECT (gslapt, image1706, "image1706");
GLADE_HOOKUP_OBJECT (gslapt, separator2, "separator2");
GLADE_HOOKUP_OBJECT (gslapt, quit, "quit");
GLADE_HOOKUP_OBJECT (gslapt, edit1, "edit1");
GLADE_HOOKUP_OBJECT (gslapt, edit1_menu, "edit1_menu");
GLADE_HOOKUP_OBJECT (gslapt, unmark_all1, "unmark_all1");
- GLADE_HOOKUP_OBJECT (gslapt, image1680, "image1680");
+ GLADE_HOOKUP_OBJECT (gslapt, image1707, "image1707");
GLADE_HOOKUP_OBJECT (gslapt, separator1, "separator1");
GLADE_HOOKUP_OBJECT (gslapt, preferences2, "preferences2");
- GLADE_HOOKUP_OBJECT (gslapt, image1681, "image1681");
+ GLADE_HOOKUP_OBJECT (gslapt, image1708, "image1708");
GLADE_HOOKUP_OBJECT (gslapt, view1, "view1");
GLADE_HOOKUP_OBJECT (gslapt, view1_menu, "view1_menu");
GLADE_HOOKUP_OBJECT (gslapt, view_all_packages_menu, "view_all_packages_menu");
GLADE_HOOKUP_OBJECT (gslapt, view_available_packages_menu, "view_available_packages_menu");
GLADE_HOOKUP_OBJECT (gslapt, view_installed_packages_menu, "view_installed_packages_menu");
GLADE_HOOKUP_OBJECT (gslapt, view_marked_packages_menu, "view_marked_packages_menu");
+ GLADE_HOOKUP_OBJECT (gslapt, view_upgradeable_packages_menu, "view_upgradeable_packages_menu");
GLADE_HOOKUP_OBJECT (gslapt, package1, "package1");
GLADE_HOOKUP_OBJECT (gslapt, package1_menu, "package1_menu");
GLADE_HOOKUP_OBJECT (gslapt, unmark1, "unmark1");
- GLADE_HOOKUP_OBJECT (gslapt, image1682, "image1682");
+ GLADE_HOOKUP_OBJECT (gslapt, image1709, "image1709");
GLADE_HOOKUP_OBJECT (gslapt, install1, "install1");
- GLADE_HOOKUP_OBJECT (gslapt, image1683, "image1683");
+ GLADE_HOOKUP_OBJECT (gslapt, image1710, "image1710");
GLADE_HOOKUP_OBJECT (gslapt, re_install1, "re_install1");
- GLADE_HOOKUP_OBJECT (gslapt, image1684, "image1684");
+ GLADE_HOOKUP_OBJECT (gslapt, image1711, "image1711");
GLADE_HOOKUP_OBJECT (gslapt, upgrade1, "upgrade1");
- GLADE_HOOKUP_OBJECT (gslapt, image1685, "image1685");
+ GLADE_HOOKUP_OBJECT (gslapt, image1712, "image1712");
GLADE_HOOKUP_OBJECT (gslapt, downgrade1, "downgrade1");
- GLADE_HOOKUP_OBJECT (gslapt, image1686, "image1686");
+ GLADE_HOOKUP_OBJECT (gslapt, image1713, "image1713");
GLADE_HOOKUP_OBJECT (gslapt, remove1, "remove1");
- GLADE_HOOKUP_OBJECT (gslapt, image1687, "image1687");
+ GLADE_HOOKUP_OBJECT (gslapt, image1714, "image1714");
GLADE_HOOKUP_OBJECT (gslapt, help3, "help3");
GLADE_HOOKUP_OBJECT (gslapt, help3_menu, "help3_menu");
GLADE_HOOKUP_OBJECT (gslapt, icon_legend1, "icon_legend1");
- GLADE_HOOKUP_OBJECT (gslapt, image1688, "image1688");
+ GLADE_HOOKUP_OBJECT (gslapt, image1715, "image1715");
+ GLADE_HOOKUP_OBJECT (gslapt, changelogs_menu, "changelogs_menu");
+ GLADE_HOOKUP_OBJECT (gslapt, image1716, "image1716");
GLADE_HOOKUP_OBJECT (gslapt, about3, "about3");
- GLADE_HOOKUP_OBJECT (gslapt, image1689, "image1689");
+ GLADE_HOOKUP_OBJECT (gslapt, image1717, "image1717");
GLADE_HOOKUP_OBJECT (gslapt, action_toolbar, "action_toolbar");
GLADE_HOOKUP_OBJECT (gslapt, action_bar_update_button, "action_bar_update_button");
GLADE_HOOKUP_OBJECT (gslapt, action_bar_upgrade_button, "action_bar_upgrade_button");
@@ -2809,3 +2841,59 @@ create_source_failed_dialog (void)
return source_failed_dialog;
}
+GtkWidget*
+create_changelog_window (void)
+{
+ GtkWidget *changelog_window;
+ GtkWidget *vbox78;
+ GtkWidget *changelog_notebook;
+ GtkWidget *scrolledwindow25;
+ GtkWidget *textview1;
+ GtkWidget *label296;
+ GtkWidget *hbuttonbox3;
+ GtkWidget *button12;
+
+ changelog_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_name (changelog_window, "changelog_window");
+ gtk_window_set_title (GTK_WINDOW (changelog_window), _("ChangeLogs"));
+
+ vbox78 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox78, "vbox78");
+ gtk_widget_show (vbox78);
+ gtk_container_add (GTK_CONTAINER (changelog_window), vbox78);
+
+ changelog_notebook = gtk_notebook_new ();
+ gtk_widget_set_name (changelog_notebook, "changelog_notebook");
+ gtk_widget_show (changelog_notebook);
+ gtk_box_pack_start (GTK_BOX (vbox78), changelog_notebook, TRUE, TRUE, 6);
+
+
+ hbuttonbox3 = gtk_hbutton_box_new ();
+ gtk_widget_set_name (hbuttonbox3, "hbuttonbox3");
+ gtk_widget_show (hbuttonbox3);
+ gtk_box_pack_start (GTK_BOX (vbox78), hbuttonbox3, FALSE, TRUE, 6);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox3), GTK_BUTTONBOX_END);
+
+ button12 = gtk_button_new_from_stock ("gtk-close");
+ gtk_widget_set_name (button12, "button12");
+ gtk_widget_show (button12);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox3), button12);
+ GTK_WIDGET_SET_FLAGS (button12, GTK_CAN_DEFAULT);
+
+ g_signal_connect ((gpointer) changelog_window, "destroy_event",
+ G_CALLBACK (gtk_widget_destroy),
+ NULL);
+ g_signal_connect_swapped ((gpointer) button12, "clicked",
+ G_CALLBACK (gtk_widget_destroy),
+ GTK_OBJECT (changelog_window));
+
+ /* Store pointers to all widgets, for use by lookup_widget(). */
+ GLADE_HOOKUP_OBJECT_NO_REF (changelog_window, changelog_window, "changelog_window");
+ GLADE_HOOKUP_OBJECT (changelog_window, vbox78, "vbox78");
+ GLADE_HOOKUP_OBJECT (changelog_window, changelog_notebook, "changelog_notebook");
+ GLADE_HOOKUP_OBJECT (changelog_window, hbuttonbox3, "hbuttonbox3");
+ GLADE_HOOKUP_OBJECT (changelog_window, button12, "button12");
+
+ return changelog_window;
+}
+
diff --git a/src/interface.h b/src/interface.h
index 9163390..33a04da 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -13,3 +13,4 @@ GtkWidget* create_pkgtools_progress_window (void);
GtkWidget* create_repositories_changed (void);
GtkWidget* create_dep_error_dialog (void);
GtkWidget* create_source_failed_dialog (void);
+GtkWidget* create_changelog_window (void);