gnome-applets r11168 - in trunk/trashapplet: . src



Author: ryanl
Date: Sun Dec 21 23:01:55 2008
New Revision: 11168
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=11168&view=rev

Log:
2008-12-21  Ryan Lortie  <desrt desrt ca>

        * src/trashapplet.c: use standard indentation style through-out



Modified:
   trunk/trashapplet/ChangeLog
   trunk/trashapplet/src/trashapplet.c

Modified: trunk/trashapplet/src/trashapplet.c
==============================================================================
--- trunk/trashapplet/src/trashapplet.c	(original)
+++ trunk/trashapplet/src/trashapplet.c	Sun Dec 21 23:01:55 2008
@@ -15,7 +15,7 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
@@ -57,17 +57,17 @@
                            TRASH_TYPE_APPLET, TrashApplet))
 
 static void trash_applet_do_empty    (BonoboUIComponent *component,
-				      TrashApplet       *applet,
-				      const gchar       *cname);
+                                      TrashApplet       *applet,
+                                      const gchar       *cname);
 static void trash_applet_show_about  (BonoboUIComponent *component,
-				      TrashApplet       *applet,
-				      const gchar       *cname);
+                                      TrashApplet       *applet,
+                                      const gchar       *cname);
 static void trash_applet_open_folder (BonoboUIComponent *component,
-				      TrashApplet       *applet,
-				      const gchar       *cname);
+                                      TrashApplet       *applet,
+                                      const gchar       *cname);
 static void trash_applet_show_help   (BonoboUIComponent *component,
-				      TrashApplet       *applet,
-				      const gchar       *cname);
+                                      TrashApplet       *applet,
+                                      const gchar       *cname);
 
 static const BonoboUIVerb trash_applet_menu_verbs [] = {
   BONOBO_UI_UNSAFE_VERB ("EmptyTrash", trash_applet_do_empty),
@@ -165,7 +165,7 @@
 
 static void
 trash_applet_size_allocate (GtkWidget    *widget,
-			    GdkRectangle *allocation)
+                            GdkRectangle *allocation)
 {
   TrashApplet *applet = TRASH_APPLET (widget);
 
@@ -249,7 +249,7 @@
 #define PANEL_ENABLE_ANIMATIONS "/apps/panel/global/enable_animations"
 static gboolean
 trash_applet_button_release (GtkWidget      *widget,
-			     GdkEventButton *event)
+                             GdkEventButton *event)
 {
   TrashApplet *applet = TRASH_APPLET (widget);
   static GConfClient *client;
@@ -257,47 +257,56 @@
   if (client == NULL)
     client = gconf_client_get_default ();
 
-	if (event->button == 1) {
-		if (gconf_client_get_bool (client, PANEL_ENABLE_ANIMATIONS, NULL))
-			xstuff_zoom_animate (widget, NULL);
-		trash_applet_open_folder (NULL, applet, NULL);
-		return TRUE;
-	}
-	if (GTK_WIDGET_CLASS (trash_applet_parent_class)->button_release_event)
-		return (* GTK_WIDGET_CLASS (trash_applet_parent_class)->button_release_event) (widget, event);
-	else
-		return FALSE;
+  if (event->button == 1)
+    {
+      if (gconf_client_get_bool (client, PANEL_ENABLE_ANIMATIONS, NULL))
+        xstuff_zoom_animate (widget, NULL);
+
+      trash_applet_open_folder (NULL, applet, NULL);
+
+      return TRUE;
+    }
+
+  if (GTK_WIDGET_CLASS (trash_applet_parent_class)->button_release_event)
+    return GTK_WIDGET_CLASS (trash_applet_parent_class)
+        ->button_release_event (widget, event);
+  else
+    return FALSE;
 }
 static gboolean
 trash_applet_key_press (GtkWidget   *widget,
-			GdkEventKey *event)
+                        GdkEventKey *event)
 {
-	TrashApplet *applet = TRASH_APPLET (widget);
+  TrashApplet *applet = TRASH_APPLET (widget);
+
+  switch (event->keyval)
+    {
+     case GDK_KP_Enter:
+     case GDK_ISO_Enter:
+     case GDK_3270_Enter:
+     case GDK_Return:
+     case GDK_space:
+     case GDK_KP_Space:
+      trash_applet_open_folder (NULL, applet, NULL);
+      return TRUE;
+
+     default:
+      break;
+    }
 
-	switch (event->keyval) {
-	case GDK_KP_Enter:
-	case GDK_ISO_Enter:
-	case GDK_3270_Enter:
-	case GDK_Return:
-	case GDK_space:
-	case GDK_KP_Space:
-		trash_applet_open_folder(NULL, applet, NULL);
-		return TRUE;
-	default:
-		break;
-	}
-	if (GTK_WIDGET_CLASS (trash_applet_parent_class)->key_press_event)
-		return (* GTK_WIDGET_CLASS (trash_applet_parent_class)->key_press_event) (widget, event);
-	else
-		return FALSE;
+  if (GTK_WIDGET_CLASS (trash_applet_parent_class)->key_press_event)
+    return GTK_WIDGET_CLASS (trash_applet_parent_class)
+      ->key_press_event (widget, event);
+  else
+    return FALSE;
 }
 
 static gboolean
 trash_applet_drag_motion (GtkWidget      *widget,
-			  GdkDragContext *context,
-			  gint            x,
-			  gint            y,
-			  guint           time)
+                          GdkDragContext *context,
+                          gint            x,
+                          gint            y,
+                          guint           time)
 {
   GList *target;
 
@@ -322,264 +331,275 @@
 static void
 error_dialog (TrashApplet *applet, const gchar *error, ...)
 {
-	va_list args;
-	gchar *error_string;
-	GtkWidget *dialog;
-
-	g_return_if_fail (error != NULL);
-
-	va_start (args, error);
-	error_string = g_strdup_vprintf (error, args);
-	va_end (args);
-
-	dialog = gtk_message_dialog_new (NULL,
-			GTK_DIALOG_MODAL,
-			GTK_MESSAGE_ERROR,
-			GTK_BUTTONS_OK,
-			"%s",
-			error_string);
-
-	g_signal_connect (G_OBJECT (dialog), "response",
-			G_CALLBACK (gtk_widget_destroy),
-			NULL);
-
-	gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
-	gtk_window_set_screen (GTK_WINDOW(dialog),
-			       gtk_widget_get_screen (GTK_WIDGET (applet)));
-	gtk_widget_show (dialog);
+  va_list args;
+  gchar *error_string;
+  GtkWidget *dialog;
+
+  g_return_if_fail (error != NULL);
+
+  va_start (args, error);
+  error_string = g_strdup_vprintf (error, args);
+  va_end (args);
+
+  dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
+                                   GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+                                   "%s", error_string);
+
+  g_signal_connect (G_OBJECT (dialog), "response",
+                    G_CALLBACK (gtk_widget_destroy),
+                    NULL);
+
+  gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+  gtk_window_set_screen (GTK_WINDOW(dialog),
+                         gtk_widget_get_screen (GTK_WIDGET (applet)));
+  gtk_widget_show (dialog);
 
-	g_free (error_string);
+  g_free (error_string);
 }
 
 static void
 trash_applet_do_empty (BonoboUIComponent *component,
-		       TrashApplet       *applet,
-		       const gchar       *cname)
+                       TrashApplet       *applet,
+                       const gchar       *cname)
 {
   trash_empty (GTK_WIDGET (applet));
 }
 
 static void
 trash_applet_open_folder (BonoboUIComponent *component,
-			  TrashApplet       *applet,
-			  const gchar       *cname)
+                          TrashApplet       *applet,
+                          const gchar       *cname)
 {
-	GdkScreen *screen;
+  GdkScreen *screen;
+
+  /* Open the "trash:" URI with gnome-open */
+  gchar *argv[] = { "gnome-open", "trash:", NULL };
+  GError *err = NULL;
+  gboolean res;
+
+  screen = gtk_widget_get_screen (GTK_WIDGET (applet));
+  res = gdk_spawn_on_screen (screen, NULL,
+                             argv, NULL,
+                             G_SPAWN_SEARCH_PATH,
+                             NULL, NULL,
+                             NULL,
+                             &err);
 
-	/* Open the "trash:" URI with gnome-open */
-	gchar *argv[] = { "gnome-open", "trash:", NULL };
-	GError *err = NULL;
-	gboolean res;	
-
-	screen = gtk_widget_get_screen (GTK_WIDGET (applet));
-	res = gdk_spawn_on_screen (screen, NULL,
-			           argv, NULL,
-			           G_SPAWN_SEARCH_PATH,
-			           NULL, NULL,
-			           NULL,
-			           &err);
-	
-	if (! res) {
-		error_dialog (applet, _("Error while spawning nautilus:\n%s"),
-			      err->message);
-		g_error_free (err);
-	}
+  if (!res)
+    {
+      error_dialog (applet, _("Error while spawning nautilus:\n%s"),
+                    err->message);
+      g_error_free (err);
+    }
 }
 
 static void
 trash_applet_show_help (BonoboUIComponent *component,
-			TrashApplet       *applet,
-			const gchar       *cname)
+                        TrashApplet       *applet,
+                        const gchar       *cname)
 {
-        GError *err = NULL;
+  GError *err = NULL;
 
-	/* FIXME - Actually, we need a user guide */
-        gnome_help_display_desktop_on_screen
-		(NULL, "trashapplet", "trashapplet", NULL,
-		 gtk_widget_get_screen (GTK_WIDGET (applet)),
-		 &err);
-
-        if (err) {
-        	error_dialog (applet, _("There was an error displaying help: %s"), err->message);
-        	g_error_free (err);
-        }
+  /* FIXME - Actually, we need a user guide */
+  gnome_help_display_desktop_on_screen (NULL,
+                                        "trashapplet", "trashapplet", NULL,
+                                        gtk_widget_get_screen (GTK_WIDGET (applet)),
+                                        &err);
+
+  if (err)
+    {
+      error_dialog (applet,
+                    _("There was an error displaying help: %s"),
+                    err->message);
+      g_error_free (err);
+    }
 }
 
 
 static void
 trash_applet_show_about (BonoboUIComponent *component,
-			 TrashApplet       *applet,
-			 const gchar       *cname)
+                         TrashApplet       *applet,
+                         const gchar       *cname)
 {
-	static const char *authors[] = {
-		"Michiel Sikkes <michiel eyesopened nl>",
-		"Emmanuele Bassi <ebassi gmail com>",
-		"Sebastian Bacher <seb128 canonical com>",
-		"James Henstridge <james henstridge canonical com>",
-                "Ryan Lortie <desrt desrt ca>",
-		NULL
-	};
-	static const char *documenters[] = {
-		"Michiel Sikkes <michiel eyesopened nl>",
-		NULL
-	};
-
-	gtk_show_about_dialog
-		(NULL,
-		 "version", VERSION,
-		 "copyright", "Copyright \xC2\xA9 2004 Michiel Sikkes,"
-                              "\xC2\xA9 2008 Ryan Lortie",
-		 "comments", _("A GNOME trash bin that lives in your panel. "
-			       "You can use it to view the trash or drag "
-			       "and drop items into the trash."),
-		 "authors", authors,
-		 "documenters", documenters,
-		 "translator-credits", _("translator-credits"),
-		 "logo_icon_name", "user-trash-full",
-		 NULL);
+  static const char *authors[] = {
+    "Michiel Sikkes <michiel eyesopened nl>",
+    "Emmanuele Bassi <ebassi gmail com>",
+    "Sebastian Bacher <seb128 canonical com>",
+    "James Henstridge <james henstridge canonical com>",
+    "Ryan Lortie <desrt desrt ca>",
+    NULL
+  };
+  static const char *documenters[] = {
+    "Michiel Sikkes <michiel eyesopened nl>",
+    NULL
+  };
+
+  gtk_show_about_dialog (NULL,
+                         "version", VERSION,
+                         "copyright", "Copyright \xC2\xA9 2004 Michiel Sikkes,"
+                                      "\xC2\xA9 2008 Ryan Lortie",
+                         "comments", _("A GNOME trash bin that lives in your panel. "
+                                       "You can use it to view the trash or drag "
+                                       "and drop items into the trash."),
+                         "authors", authors,
+                         "documenters", documenters,
+                         "translator-credits", _("translator-credits"),
+                         "logo_icon_name", "user-trash-full",
+                         NULL);
 }
 
 static gboolean
 confirm_delete_immediately (GtkWidget *parent_view,
-			    gint num_files,
-			    gboolean all)
+                            gint num_files,
+                            gboolean all)
 {
-	GdkScreen *screen;
-	GtkWidget *dialog, *hbox, *vbox, *image, *label;
-	gchar *str, *prompt, *detail;
-	int response;
-
-	screen = gtk_widget_get_screen (parent_view);
-	
-	dialog = gtk_dialog_new ();
-	gtk_window_set_screen (GTK_WINDOW (dialog), screen);
-	atk_object_set_role (gtk_widget_get_accessible (dialog), ATK_ROLE_ALERT);
-	gtk_window_set_title (GTK_WINDOW (dialog), _("Delete Immediately?"));
-	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
-	gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-	gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
-
-	gtk_widget_realize (dialog);
-	gdk_window_set_transient_for (GTK_WIDGET (dialog)->window,
-				      gdk_screen_get_root_window (screen));
-	gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
-
-	gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
-
-	hbox = gtk_hbox_new (FALSE, 12);
-	gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
-	gtk_widget_show (hbox);
-	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
-			    FALSE, FALSE, 0);
-
-	image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION,
-					  GTK_ICON_SIZE_DIALOG);
-	gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
-	gtk_widget_show (image);
-	gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
-
-        vbox = gtk_vbox_new (FALSE, 12);
-        gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
-        gtk_widget_show (vbox);
-
-	if (all) {
-		prompt = _("Cannot move items to trash, do you want to delete them immediately?");
-		detail = g_strdup_printf ("None of the %d selected items can be moved to the Trash", num_files);
-	} else {
-		prompt = _("Cannot move some items to trash, do you want to delete these immediately?");
-		detail = g_strdup_printf ("%d of the selected items cannot be moved to the Trash", num_files);
-	}
-
-	str = g_strconcat ("<span weight=\"bold\" size=\"larger\">",
-			   prompt, "</span>", NULL);
-	label = gtk_label_new (str);
-	gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-	gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
-	gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-	gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
-	gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
-	gtk_widget_show (label);
-	g_free (str);
-
-	label = gtk_label_new (detail);
-	gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
-	gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-	gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
-	gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
-	gtk_widget_show (label);
-	g_free (detail);
-
-	gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL,
-			       GTK_RESPONSE_CANCEL);
-	gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_DELETE,
-			       GTK_RESPONSE_YES);
-	gtk_dialog_set_default_response (GTK_DIALOG (dialog),
-					 GTK_RESPONSE_YES);
+  GdkScreen *screen;
+  GtkWidget *dialog, *hbox, *vbox, *image, *label;
+  gchar *str, *prompt, *detail;
+  int response;
+
+  screen = gtk_widget_get_screen (parent_view);
+
+  dialog = gtk_dialog_new ();
+  gtk_window_set_screen (GTK_WINDOW (dialog), screen);
+  atk_object_set_role (gtk_widget_get_accessible (dialog), ATK_ROLE_ALERT);
+  gtk_window_set_title (GTK_WINDOW (dialog), _("Delete Immediately?"));
+  gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
+  gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+
+  gtk_widget_realize (dialog);
+  gdk_window_set_transient_for (GTK_WIDGET (dialog)->window,
+                                gdk_screen_get_root_window (screen));
+  gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+
+  gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+
+  hbox = gtk_hbox_new (FALSE, 12);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
+  gtk_widget_show (hbox);
+  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
+                      FALSE, FALSE, 0);
+
+  image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION,
+                                    GTK_ICON_SIZE_DIALOG);
+  gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
+  gtk_widget_show (image);
+  gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
+
+  vbox = gtk_vbox_new (FALSE, 12);
+  gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
+  gtk_widget_show (vbox);
 
-	response = gtk_dialog_run (GTK_DIALOG (dialog));
+  if (all)
+    {
+      prompt = _("Cannot move items to trash, do you want to delete them immediately?");
+      detail = g_strdup_printf ("None of the %d selected items can be moved to the Trash", num_files);
+    }
+  else
+    {
+      prompt = _("Cannot move some items to trash, do you want to delete these immediately?");
+      detail = g_strdup_printf ("%d of the selected items cannot be moved to the Trash", num_files);
+    }
+
+  str = g_strconcat ("<span weight=\"bold\" size=\"larger\">",
+                     prompt, "</span>", NULL);
+  label = gtk_label_new (str);
+  gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+  gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
+  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+  gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+  gtk_widget_show (label);
+  g_free (str);
+
+  label = gtk_label_new (detail);
+  gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
+  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+  gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+  gtk_widget_show (label);
+  g_free (detail);
+
+  gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL,
+                         GTK_RESPONSE_CANCEL);
+  gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_DELETE,
+                         GTK_RESPONSE_YES);
+  gtk_dialog_set_default_response (GTK_DIALOG (dialog),
+                                   GTK_RESPONSE_YES);
+
+  response = gtk_dialog_run (GTK_DIALOG (dialog));
 
-	gtk_object_destroy (GTK_OBJECT (dialog));
+  gtk_object_destroy (GTK_OBJECT (dialog));
 
-	return response == GTK_RESPONSE_YES;
+  return response == GTK_RESPONSE_YES;
 }
 
 static void
 trash_applet_drag_data_received (GtkWidget        *widget,
-				 GdkDragContext   *context,
-				 gint              x,
-				 gint              y,
-				 GtkSelectionData *selectiondata,
-				 guint             info,
-				 guint             time_)
-{
-	gchar **list;
-	gint i;
-	GList *trashed = NULL;
-	GList *untrashable = NULL;
-	GList *l;
-	GError *error = NULL;
-
-	list = g_uri_list_extract_uris ((gchar *)selectiondata->data);
-
-	for (i = 0; list[i]; i++) {
-		GFile *file;
-
-		file = g_file_new_for_uri (list[i]);
-		if (!g_file_trash (file, NULL, NULL)) {
-			untrashable = g_list_prepend (untrashable, file);
-		}
-		else {
-			trashed = g_list_prepend (trashed, file);
-		}
-	}
-	
-	if (untrashable) {
-		if (confirm_delete_immediately (widget, 
-						g_list_length (untrashable),
-						trashed == NULL)) {
-			for (l = untrashable; l; l = l->next) {
-				if (!g_file_delete (l->data, NULL, &error)) {
+                                 GdkDragContext   *context,
+                                 gint              x,
+                                 gint              y,
+                                 GtkSelectionData *selectiondata,
+                                 guint             info,
+                                 guint             time_)
+{
+  gchar **list;
+  gint i;
+  GList *trashed = NULL;
+  GList *untrashable = NULL;
+  GList *l;
+  GError *error = NULL;
+
+  list = g_uri_list_extract_uris ((gchar *)selectiondata->data);
+
+  for (i = 0; list[i]; i++)
+    {
+      GFile *file;
+
+      file = g_file_new_for_uri (list[i]);
+
+      if (!g_file_trash (file, NULL, NULL))
+        {
+          untrashable = g_list_prepend (untrashable, file);
+        }
+      else
+        {
+          trashed = g_list_prepend (trashed, file);
+        }
+    }
+
+  if (untrashable)
+    {
+      if (confirm_delete_immediately (widget,
+                                      g_list_length (untrashable),
+                                      trashed == NULL))
+        {
+          for (l = untrashable; l; l = l->next)
+            {
+              if (!g_file_delete (l->data, NULL, &error))
+                {
 /*
- * FIXME: uncomment me after branched (we're string frozen)
-					error_dialog (applet,
-						      _("Unable to delete '%s': %s"),
-							g_file_get_uri (l->data),
-							error->message);
+* FIXME: uncomment me after branched (we're string frozen)
+                  error_dialog (applet,
+                                _("Unable to delete '%s': %s"),
+                                g_file_get_uri (l->data),
+                                error->message);
 */
-					g_clear_error (&error);
-				}	
-			}
-		}
-	}
-
-	g_list_foreach (untrashable, (GFunc)g_object_unref, NULL);
-	g_list_free (untrashable);
-	g_list_foreach (trashed, (GFunc)g_object_unref, NULL);
-	g_list_free (trashed);
+                                g_clear_error (&error);
+                }
+            }
+        }
+    }
+
+  g_list_foreach (untrashable, (GFunc)g_object_unref, NULL);
+  g_list_free (untrashable);
+  g_list_foreach (trashed, (GFunc)g_object_unref, NULL);
+  g_list_free (trashed);
 
-	g_strfreev (list);	
+  g_strfreev (list);
 
-	gtk_drag_finish (context, TRUE, FALSE, time_);
+  gtk_drag_finish (context, TRUE, FALSE, time_);
 }
 
 static void
@@ -599,50 +619,51 @@
 static gboolean
 trash_applet_factory (PanelApplet *applet,
                       const gchar *iid,
-		      gpointer     data)
+                      gpointer     data)
 {
-	gboolean retval = FALSE;
+  gboolean retval = FALSE;
 
-  	if (!strcmp (iid, "OAFIID:GNOME_Panel_TrashApplet")) {
-		/* Set up the menu */
-		panel_applet_setup_menu_from_file (applet,
-						   DATADIR,
-						   "GNOME_Panel_TrashApplet.xml",
-						   NULL,
-						   trash_applet_menu_verbs,
-						   applet);
+  if (!strcmp (iid, "OAFIID:GNOME_Panel_TrashApplet"))
+    {
+      /* Set up the menu */
+      panel_applet_setup_menu_from_file (applet,
+                                         DATADIR,
+                                         "GNOME_Panel_TrashApplet.xml",
+                                         NULL,
+                                         trash_applet_menu_verbs,
+                                         applet);
 
-		gtk_widget_show (GTK_WIDGET (applet));
+      gtk_widget_show (GTK_WIDGET (applet));
 
-		retval = TRUE;
-	}
+      retval = TRUE;
+  }
 
-  	return retval;
+  return retval;
 }
 
 int
 main (int argc, char *argv [])
 {
-	g_thread_init (NULL);
+  g_thread_init (NULL);
 
-	/* gettext stuff */
-        bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
-        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-        textdomain (GETTEXT_PACKAGE);
-
-	gnome_authentication_manager_init();
-
-        gnome_program_init ("trashapplet", VERSION,
-                            LIBGNOMEUI_MODULE,
-                            argc, argv,
-                            GNOME_CLIENT_PARAM_SM_CONNECT, FALSE,
-                            GNOME_PROGRAM_STANDARD_PROPERTIES,
-                            NULL);
-
-	gtk_window_set_default_icon_name ("user-trash");
-	g_set_application_name (_("Trash Applet"));
-
-        return panel_applet_factory_main
-		("OAFIID:GNOME_Panel_TrashApplet_Factory", TRASH_TYPE_APPLET,
-		 trash_applet_factory, NULL);
+  /* gettext stuff */
+  bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+  textdomain (GETTEXT_PACKAGE);
+
+  gnome_authentication_manager_init();
+
+  gnome_program_init ("trashapplet", VERSION,
+                      LIBGNOMEUI_MODULE,
+                      argc, argv,
+                      GNOME_CLIENT_PARAM_SM_CONNECT, FALSE,
+                      GNOME_PROGRAM_STANDARD_PROPERTIES,
+                      NULL);
+
+  gtk_window_set_default_icon_name ("user-trash");
+  g_set_application_name (_("Trash Applet"));
+
+  return panel_applet_factory_main
+          ("OAFIID:GNOME_Panel_TrashApplet_Factory", TRASH_TYPE_APPLET,
+           trash_applet_factory, NULL);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]