[or-cvs] r19642: {torwall} Add the general calls for the start of a call to gtksu (torwall/trunk/src)

ioerror at seul.org ioerror at seul.org
Sun Jun 7 00:09:15 UTC 2009


Author: ioerror
Date: 2009-06-06 20:09:15 -0400 (Sat, 06 Jun 2009)
New Revision: 19642

Modified:
   torwall/trunk/src/torwall_applet.c
Log:
Add the general calls for the start of a call to gtksu


Modified: torwall/trunk/src/torwall_applet.c
===================================================================
--- torwall/trunk/src/torwall_applet.c	2009-06-06 23:30:49 UTC (rev 19641)
+++ torwall/trunk/src/torwall_applet.c	2009-06-07 00:09:15 UTC (rev 19642)
@@ -42,19 +42,27 @@
 	       gpointer        data)
 {
   GtkWidget *image = (GtkWidget *)data;
+  int enabled_successfully;
+  int disabled_successfully;
 
   if (event->button != 1) return FALSE;
 
   if (!torWallIsActive) {
-    gtk_image_set_from_file(GTK_IMAGE(image), GNOMEICONDIR ACTIVE_IMAGE);
-    printf("torwall activated\n");
     // Add gtksu and call loadIpTables
-    torWallIsActive = 1;
+    enabled_successfully = printf("This is a placeholder.\n"); // replace with priv hook;
+    if (enabled_successfully) {
+      gtk_image_set_from_file(GTK_IMAGE(image), GNOMEICONDIR ACTIVE_IMAGE);
+      printf("torwall activated\n");
+      torWallIsActive = 1;
+    }
   } else {
-    printf("torwall is disabled\n");
-    gtk_image_set_from_file(GTK_IMAGE(image), GNOMEICONDIR INACTIVE_IMAGE);
-    // Add gtksu and call unloadIpTables
-    torWallIsActive = 0;
+    disabled_successfully = printf("This is a placeholder.\n"); // replace with priv hook;
+    if (disabled_successfully) {
+      printf("torwall is disabled\n");
+      gtk_image_set_from_file(GTK_IMAGE(image), GNOMEICONDIR INACTIVE_IMAGE);
+      // Add gtksu and call unloadIpTables
+      torWallIsActive = 0;
+    }
   }
 
   return TRUE;



More information about the tor-commits mailing list