aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--gslapt.glade208
-rw-r--r--pixmaps/pkg_action_available_excluded.pngbin0 -> 606 bytes
-rw-r--r--pixmaps/pkg_action_installed_excluded.pngbin0 -> 496 bytes
-rw-r--r--src/callbacks.c54
-rw-r--r--src/interface.c70
6 files changed, 326 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index e0f125d..3fbf806 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
-0.3.5 Aug 05, 2005
+0.3.5 Aug 08, 2005
+ * show via icons whether installed or available package is excluded, updated
+ icon legend
* cleaned up menus, adding options from the toolbar
* moved clean toolbar option into preferences
* translation updates
diff --git a/gslapt.glade b/gslapt.glade
index 6ccb6e8..9e6924b 100644
--- a/gslapt.glade
+++ b/gslapt.glade
@@ -3528,6 +3528,110 @@ http://software.jaos.org/#gslapt&lt;/span&gt;</property>
</child>
<child>
+ <widget class="GtkHBox" id="hbox109">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkImage" id="image1257">
+ <property name="visible">True</property>
+ <property name="pixbuf">pkg_action_available_excluded.png</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">6</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label277">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Not Installed</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="padding">6</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label280">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">,</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="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label281">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Excluded</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="padding">6</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkHBox" id="hbox99">
<property name="visible">True</property>
<property name="homogeneous">False</property>
@@ -3582,6 +3686,110 @@ http://software.jaos.org/#gslapt&lt;/span&gt;</property>
</child>
<child>
+ <widget class="GtkHBox" id="hbox108">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkImage" id="image1256">
+ <property name="visible">True</property>
+ <property name="pixbuf">pkg_action_installed_excluded.png</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">6</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label276">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Installed</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="padding">6</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label278">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">,</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="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label279">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Excluded</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="padding">6</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkHBox" id="hbox100">
<property name="visible">True</property>
<property name="homogeneous">False</property>
diff --git a/pixmaps/pkg_action_available_excluded.png b/pixmaps/pkg_action_available_excluded.png
new file mode 100644
index 0000000..7f3fbe4
--- /dev/null
+++ b/pixmaps/pkg_action_available_excluded.png
Binary files differ
diff --git a/pixmaps/pkg_action_installed_excluded.png b/pixmaps/pkg_action_installed_excluded.png
new file mode 100644
index 0000000..9083501
--- /dev/null
+++ b/pixmaps/pkg_action_installed_excluded.png
Binary files differ
diff --git a/src/callbacks.c b/src/callbacks.c
index 833b030..ee31b80 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -462,29 +462,56 @@ void build_package_treeviewlist (GtkWidget *treeview)
if (trans->exclude_pkgs->pkg_count > 0 &&
slapt_get_exact_pkg(trans->exclude_pkgs,all->pkgs[i]->name,all->pkgs[i]->version) != NULL) {
- status_icon = create_pixbuf("pkg_action_available.png");
+ /* if it's excluded */
+ if ((trans->exclude_pkgs->pkg_count > 0 &&
+ slapt_get_exact_pkg(trans->exclude_pkgs,all->pkgs[i]->name,
+ all->pkgs[i]->version) != NULL) ||
+ slapt_is_excluded(global_config,all->pkgs[i]) == 1) {
+ status_icon = create_pixbuf("pkg_action_available_excluded.png");
+ } else {
+ status_icon = create_pixbuf("pkg_action_available.png");
+ }
status = g_strdup_printf("z%s",all->pkgs[i]->name);
location = all->pkgs[i]->location;
} else if (trans->remove_pkgs->pkg_count > 0 &&
- slapt_get_exact_pkg(trans->remove_pkgs,all->pkgs[i]->name,all->pkgs[i]->version) != NULL) {
+ slapt_get_exact_pkg(trans->remove_pkgs,all->pkgs[i]->name,
+ all->pkgs[i]->version) != NULL) {
status_icon = create_pixbuf("pkg_action_remove.png");
status = g_strdup_printf("r%s",all->pkgs[i]->name);
location = all->pkgs[i]->location;
} else if (trans->install_pkgs->pkg_count > 0 &&
- slapt_get_exact_pkg(trans->install_pkgs,all->pkgs[i]->name,all->pkgs[i]->version) != NULL) {
+ slapt_get_exact_pkg(trans->install_pkgs,all->pkgs[i]->name,
+ all->pkgs[i]->version) != NULL) {
status_icon = create_pixbuf("pkg_action_install.png");
status = g_strdup_printf("i%s",all->pkgs[i]->name);
location = all->pkgs[i]->location;
- } else if (trans->upgrade_pkgs->pkg_count > 0 && lsearch_upgrade_transaction(trans,all->pkgs[i]) == 1) {
+ } else if (trans->upgrade_pkgs->pkg_count > 0 &&
+ lsearch_upgrade_transaction(trans,all->pkgs[i]) == 1) {
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) {
- status_icon = create_pixbuf("pkg_action_installed.png");
+ /* if it's excluded */
+ if ((trans->exclude_pkgs->pkg_count > 0 &&
+ slapt_get_exact_pkg(trans->exclude_pkgs,all->pkgs[i]->name,
+ all->pkgs[i]->version) != NULL) ||
+ slapt_is_excluded(global_config,all->pkgs[i]) == 1) {
+ status_icon = create_pixbuf("pkg_action_installed_excluded.png");
+ } else {
+ status_icon = create_pixbuf("pkg_action_installed.png");
+ }
status = g_strdup_printf("a%s",all->pkgs[i]->name);
location = installed_pkg->location;
} else {
- status_icon = create_pixbuf("pkg_action_available.png");
+ /* if it's excluded */
+ if ((trans->exclude_pkgs->pkg_count > 0 &&
+ slapt_get_exact_pkg(trans->exclude_pkgs,all->pkgs[i]->name,
+ all->pkgs[i]->version) != NULL) ||
+ slapt_is_excluded(global_config,all->pkgs[i]) == 1) {
+ status_icon = create_pixbuf("pkg_action_available_excluded.png");
+ } else {
+ status_icon = create_pixbuf("pkg_action_available.png");
+ }
status = g_strdup_printf("z%s",all->pkgs[i]->name);
location = all->pkgs[i]->location;
}
@@ -506,7 +533,7 @@ void build_package_treeviewlist (GtkWidget *treeview)
}
for (i = 0; i < installed->pkg_count; ++i) {
- if ( slapt_get_exact_pkg(all,installed->pkgs[i]->name,installed->pkgs[i]->version) == NULL ) {
+ if (slapt_get_exact_pkg(all,installed->pkgs[i]->name,installed->pkgs[i]->version) == NULL) {
/* we use this for sorting the status */
/* a=installed,i=install,r=remove,u=upgrade,z=available */
gchar *status = NULL;
@@ -514,11 +541,20 @@ void build_package_treeviewlist (GtkWidget *treeview)
gchar *short_desc = slapt_gen_short_pkg_description(installed->pkgs[i]);
if (trans->remove_pkgs->pkg_count > 0 &&
- slapt_get_exact_pkg(trans->remove_pkgs,installed->pkgs[i]->name,installed->pkgs[i]->version) != NULL) {
+ slapt_get_exact_pkg(trans->remove_pkgs,installed->pkgs[i]->name,
+ installed->pkgs[i]->version) != NULL) {
status_icon = create_pixbuf("pkg_action_remove.png");
status = g_strdup_printf("r%s",installed->pkgs[i]->name);
} else {
- status_icon = create_pixbuf("pkg_action_installed.png");
+ /* if it's excluded */
+ if ((trans->exclude_pkgs->pkg_count > 0 &&
+ slapt_get_exact_pkg(trans->exclude_pkgs,installed->pkgs[i]->name,
+ installed->pkgs[i]->version) != NULL) ||
+ slapt_is_excluded(global_config,installed->pkgs[i]) == 1) {
+ status_icon = create_pixbuf("pkg_action_installed_excluded.png");
+ } else {
+ status_icon = create_pixbuf("pkg_action_installed.png");
+ }
status = g_strdup_printf("a%s",installed->pkgs[i]->name);
}
diff --git a/src/interface.c b/src/interface.c
index da1c49e..8ff2e44 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -1946,9 +1946,19 @@ create_icon_legend (void)
GtkWidget *hbox98;
GtkWidget *image865;
GtkWidget *label253;
+ GtkWidget *hbox109;
+ GtkWidget *image1257;
+ GtkWidget *label277;
+ GtkWidget *label280;
+ GtkWidget *label281;
GtkWidget *hbox99;
GtkWidget *image866;
GtkWidget *label254;
+ GtkWidget *hbox108;
+ GtkWidget *image1256;
+ GtkWidget *label276;
+ GtkWidget *label278;
+ GtkWidget *label279;
GtkWidget *hbox100;
GtkWidget *image867;
GtkWidget *label255;
@@ -2018,6 +2028,31 @@ create_icon_legend (void)
gtk_widget_show (label253);
gtk_box_pack_start (GTK_BOX (hbox98), label253, FALSE, TRUE, 6);
+ hbox109 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox109, "hbox109");
+ gtk_widget_show (hbox109);
+ gtk_box_pack_start (GTK_BOX (vbox65), hbox109, TRUE, TRUE, 0);
+
+ image1257 = create_pixmap (icon_legend, "pkg_action_available_excluded.png");
+ gtk_widget_set_name (image1257, "image1257");
+ gtk_widget_show (image1257);
+ gtk_box_pack_start (GTK_BOX (hbox109), image1257, FALSE, TRUE, 6);
+
+ label277 = gtk_label_new (_("Not Installed"));
+ gtk_widget_set_name (label277, "label277");
+ gtk_widget_show (label277);
+ gtk_box_pack_start (GTK_BOX (hbox109), label277, FALSE, TRUE, 6);
+
+ label280 = gtk_label_new (_(","));
+ gtk_widget_set_name (label280, "label280");
+ gtk_widget_show (label280);
+ gtk_box_pack_start (GTK_BOX (hbox109), label280, FALSE, FALSE, 0);
+
+ label281 = gtk_label_new (_("Excluded"));
+ gtk_widget_set_name (label281, "label281");
+ gtk_widget_show (label281);
+ gtk_box_pack_start (GTK_BOX (hbox109), label281, FALSE, FALSE, 6);
+
hbox99 = gtk_hbox_new (FALSE, 0);
gtk_widget_set_name (hbox99, "hbox99");
gtk_widget_show (hbox99);
@@ -2033,6 +2068,31 @@ create_icon_legend (void)
gtk_widget_show (label254);
gtk_box_pack_start (GTK_BOX (hbox99), label254, FALSE, TRUE, 6);
+ hbox108 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox108, "hbox108");
+ gtk_widget_show (hbox108);
+ gtk_box_pack_start (GTK_BOX (vbox65), hbox108, TRUE, TRUE, 0);
+
+ image1256 = create_pixmap (icon_legend, "pkg_action_installed_excluded.png");
+ gtk_widget_set_name (image1256, "image1256");
+ gtk_widget_show (image1256);
+ gtk_box_pack_start (GTK_BOX (hbox108), image1256, FALSE, TRUE, 6);
+
+ label276 = gtk_label_new (_("Installed"));
+ gtk_widget_set_name (label276, "label276");
+ gtk_widget_show (label276);
+ gtk_box_pack_start (GTK_BOX (hbox108), label276, FALSE, TRUE, 6);
+
+ label278 = gtk_label_new (_(","));
+ gtk_widget_set_name (label278, "label278");
+ gtk_widget_show (label278);
+ gtk_box_pack_start (GTK_BOX (hbox108), label278, FALSE, TRUE, 0);
+
+ label279 = gtk_label_new (_("Excluded"));
+ gtk_widget_set_name (label279, "label279");
+ gtk_widget_show (label279);
+ gtk_box_pack_start (GTK_BOX (hbox108), label279, FALSE, TRUE, 6);
+
hbox100 = gtk_hbox_new (FALSE, 0);
gtk_widget_set_name (hbox100, "hbox100");
gtk_widget_show (hbox100);
@@ -2132,9 +2192,19 @@ create_icon_legend (void)
GLADE_HOOKUP_OBJECT (icon_legend, hbox98, "hbox98");
GLADE_HOOKUP_OBJECT (icon_legend, image865, "image865");
GLADE_HOOKUP_OBJECT (icon_legend, label253, "label253");
+ GLADE_HOOKUP_OBJECT (icon_legend, hbox109, "hbox109");
+ GLADE_HOOKUP_OBJECT (icon_legend, image1257, "image1257");
+ GLADE_HOOKUP_OBJECT (icon_legend, label277, "label277");
+ GLADE_HOOKUP_OBJECT (icon_legend, label280, "label280");
+ GLADE_HOOKUP_OBJECT (icon_legend, label281, "label281");
GLADE_HOOKUP_OBJECT (icon_legend, hbox99, "hbox99");
GLADE_HOOKUP_OBJECT (icon_legend, image866, "image866");
GLADE_HOOKUP_OBJECT (icon_legend, label254, "label254");
+ GLADE_HOOKUP_OBJECT (icon_legend, hbox108, "hbox108");
+ GLADE_HOOKUP_OBJECT (icon_legend, image1256, "image1256");
+ GLADE_HOOKUP_OBJECT (icon_legend, label276, "label276");
+ GLADE_HOOKUP_OBJECT (icon_legend, label278, "label278");
+ GLADE_HOOKUP_OBJECT (icon_legend, label279, "label279");
GLADE_HOOKUP_OBJECT (icon_legend, hbox100, "hbox100");
GLADE_HOOKUP_OBJECT (icon_legend, image867, "image867");
GLADE_HOOKUP_OBJECT (icon_legend, label255, "label255");