Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gfpm.git;a=commitdiff;h=8c57908c9d2d393171922bd21d88f7dcf72a864d

commit 8c57908c9d2d393171922bd21d88f7dcf72a864d
Author: Priyank <[email protected]>
Date:   Sat Mar 14 01:09:28 2009 +0530

Added a "Mark for re-installation" feature
* Closes #3679

diff --git a/src/gfpm-interface.c b/src/gfpm-interface.c
index 016ab74..809b2c5 100644
--- a/src/gfpm-interface.c
+++ b/src/gfpm-interface.c
@@ -119,6 +119,7 @@ static void cb_gfpm_mark_for_install (GtkButton *button, 
gpointer data);
static void cb_gfpm_mark_for_reinstall (GtkButton *button, gpointer data);
static void cb_gfpm_mark_for_removal (GtkButton *button, gpointer data);
static void cb_gfpm_mark_for_upgrade (GtkButton *button, gpointer data);
+static void cb_gfpm_reinstall (GtkButton *button, gpointer data);
static gint gfpm_trans_prepare (PM_LIST *list);
static gint gfpm_trans_commit (PM_LIST **list);

@@ -1638,6 +1639,13 @@ cb_gfpm_pkgs_tvw_right_click (GtkTreeView *treeview, 
GdkEventButton *event)
menu_item = gtk_image_menu_item_new_with_label (_("Reinstall package"));
image = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(menu_item), image);
+               g_signal_connect (G_OBJECT(menu_item), "activate", 
G_CALLBACK(cb_gfpm_reinstall), (gpointer)pkgname);
+               gtk_menu_shell_append (GTK_MENU_SHELL(menu), menu_item);
+               gtk_widget_show (menu_item);
+
+               menu_item = gtk_image_menu_item_new_with_label (_("Mark for 
re-installation"));
+               image = gtk_image_new_from_stock ("gtk-refresh", 
GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(menu_item), 
image);
g_signal_connect (G_OBJECT(menu_item), "activate", 
G_CALLBACK(cb_gfpm_mark_for_reinstall), (gpointer)pkgname);
gtk_menu_shell_append (GTK_MENU_SHELL(menu), menu_item);
gtk_widget_show (menu_item);
@@ -1675,6 +1683,14 @@ cb_gfpm_mark_for_install (GtkButton *button, gpointer 
data)
static void
cb_gfpm_mark_for_reinstall (GtkButton *button, gpointer data)
{
+       gfpm_package_list_add (GFPM_INSTALL_LIST, (char*)data);
+
+       return;
+}
+
+static void
+cb_gfpm_reinstall (GtkButton *button, gpointer data)
+{
GfpmList *temp = NULL;

temp = install_list;
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to