Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=3937a2a1b634ca61204edbb472c67eb90ef938c0

commit 3937a2a1b634ca61204edbb472c67eb90ef938c0
Author: Priyank <[EMAIL PROTECTED]>
Date:   Tue Mar 4 22:59:58 2008 +0530

gfpm-1.1.0-3-i686
* Backported more fixes from gfpm git

diff --git a/source/xapps/gfpm/FrugalBuild b/source/xapps/gfpm/FrugalBuild
index 87b6eb5..537894b 100644
--- a/source/xapps/gfpm/FrugalBuild
+++ b/source/xapps/gfpm/FrugalBuild
@@ -3,7 +3,7 @@

pkgname=gfpm
pkgver=1.1.0
-pkgrel=2
+pkgrel=3
pkgdesc="Graphical Frugalware Package Manager"
url="http://ftp.frugalware.org/pub/other/gfpm";
depends=('glib2' 'gtk+2' 'libglade' 'pacman-g2>=3.6.7-2' 'inotify-tools' 
'frugalwareutils>=0.7.9')
@@ -14,8 +14,8 @@ archs=('i686' 'x86_64')
_F_gnome_iconcache="y"
Finclude gnome-scriptlet
up2date="lynx -dump $url | Flasttar"
-source=($url/$pkgname-$pkgver.tar.gz gfpm_hide_help_button.diff)
-signatures=(${source[0]}.asc '')
+source=($url/$pkgname-$pkgver.tar.gz gfpm_hide_help_button.diff 
gfpm_post110fixes.diff)
+signatures=(${source[0]}.asc '' '')

build()
{
diff --git a/source/xapps/gfpm/gfpm_post110fixes.diff 
b/source/xapps/gfpm/gfpm_post110fixes.diff
new file mode 100644
index 0000000..c507301
--- /dev/null
+++ b/source/xapps/gfpm/gfpm_post110fixes.diff
@@ -0,0 +1,128 @@
+diff -Naur gfpm-1.1.0/src/gfpm-interface.c gfpm-1.1.0.new/src/gfpm-interface.c
+--- gfpm-1.1.0/src/gfpm-interface.c    2008-03-02 01:22:31.000000000 +0530
++++ gfpm-1.1.0.new/src/gfpm-interface.c        2008-03-04 22:47:09.000000000 
+0530
+@@ -334,9 +334,19 @@
+       /* Disable Apply, Refresh and File buttons if user is not root */
+       if ( geteuid() != 0 )
+       {
++              /* disable some widgets */
+               gtk_widget_set_sensitive (glade_xml_get_widget(xml, 
"button_apply"), FALSE);
+               gtk_widget_set_sensitive (glade_xml_get_widget(xml, 
"button_refresh1"), FALSE);
+               gtk_widget_set_sensitive (glade_xml_get_widget(xml, 
"button_file1"), FALSE);
++              gtk_widget_set_sensitive (gfpm_get_widget("repos"), FALSE);
++              gtk_widget_set_sensitive (gfpm_get_widget("clr1"), FALSE);
++              gtk_widget_set_sensitive (gfpm_get_widget("opt1"), FALSE);
++      }
++      else
++      {
++              /* init repomanager only if gfpm is run as root user */
++              gfpm_repomanager_init ();
++
+       }
+
+       /* initialize modules */
+@@ -347,7 +357,6 @@
+       gfpm_optimize_db_dlg_init ();
+       gfpm_quickpane_init ();
+       gfpm_icmonitor_init ();
+-      gfpm_repomanager_init ();
+       gfpm_logviewer_init ();
+
+       gtk_widget_hide (gfpm_splash);
+@@ -1437,6 +1446,9 @@
+       if (event->button != 3)
+               return;
+
++      if (geteuid() != 0)
++              return;
++
+       model = gtk_tree_view_get_model (GTK_TREE_VIEW(gfpm_pkgs_tvw));
+       selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(gfpm_pkgs_tvw));
+       if ( FALSE == gtk_tree_selection_get_selected (selection, &model, 
&iter) )
+@@ -1487,7 +1499,7 @@
+               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);
+-
++
+               menu_item = gtk_image_menu_item_new_with_label (_("Mark for 
removal"));
+               image = gtk_image_new_from_stock ("gtk-remove", 
GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(menu_item), 
image);
+diff -Naur gfpm-1.1.0/src/gfpm-progress.c gfpm-1.1.0.new/src/gfpm-progress.c
+--- gfpm-1.1.0/src/gfpm-progress.c     2008-03-02 01:22:31.000000000 +0530
++++ gfpm-1.1.0.new/src/gfpm-progress.c 2008-03-04 22:47:11.000000000 +0530
+@@ -33,7 +33,7 @@
+ extern GtkWidget      *gfpm_mw;
+
+ GtkProgressBar                *progressbar = NULL;
+-GtkWidget                     *progresswindow = NULL;
++GtkWidget             *progresswindow = NULL;
+ static GtkWidget      *main_label = NULL;
+ static GtkWidget      *sub_label = NULL;
+ static GtkWidget      *rate_label = NULL;
+@@ -45,7 +45,7 @@
+ static GtkWidget      *autoclose_checkbtn = NULL;
+
+ GtkTextIter   t_iter;
+-GtkTextBuffer *buffer = NULL;
++GtkTextBuffer         *buffer = NULL;
+
+ float rate;
+ int   offset;
+@@ -97,7 +97,8 @@
+ static void
+ cb_gfpm_close_button_clicked (GtkWidget *button, gpointer data)
+ {
+-      gfpm_progress_show (FALSE);
++      pacman_trans_release ();
++//    gfpm_progress_show (FALSE);
+
+       return;
+ }
+@@ -167,13 +168,13 @@
+ int
+ gfpm_progress_update (netbuf *ctl, int xferred, void *arg)
+ {
+-      int                             size;
+-      int                             per;
+-      char                    text[6];
+-      char                    rate_text[10];
+-      struct timeval  t1;
+-      float                   tdiff;
+-      gchar                   *rx_str = NULL;
++      int             size;
++      int             per;
++      char            text[6];
++      char            rate_text[10];
++      struct timeval  t1;
++      float           tdiff;
++      gchar           *rx_str = NULL;
+
+       while (gtk_events_pending())
+               gtk_main_iteration ();
+@@ -213,7 +214,6 @@
+       while (gtk_events_pending())
+               gtk_main_iteration ();
+
+-
+       return 1;
+ }
+
+diff -Naur gfpm-1.1.0/src/gfpm-quickpane.c gfpm-1.1.0.new/src/gfpm-quickpane.c
+--- gfpm-1.1.0/src/gfpm-quickpane.c    2008-03-02 01:22:31.000000000 +0530
++++ gfpm-1.1.0.new/src/gfpm-quickpane.c        2008-03-04 22:47:11.000000000 
+0530
+@@ -73,6 +73,14 @@
+                                       "clicked",
+                                       
G_CALLBACK(cb_gfpm_quickpane_readme_clicked),
+                                       NULL);
++
++      /* Disable the Quick pane Install,Remove,Upgrade buttons if gfpm is not 
run as root */
++      if (geteuid() != 0)
++      {
++              gtk_widget_set_sensitive (quick_pane_install_btn, FALSE);
++              gtk_widget_set_sensitive (quick_pane_remove_btn, FALSE);
++              gtk_widget_set_sensitive (quick_pane_upgrade_btn, FALSE);
++      }
+
+       return;
+ }
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to