[Goodies-commits] r6545 - in thunar-actions-plugin/trunk: . thunar-actions-plugin

Kees Scherpenhuijzen noik at xfce.org
Sun Jan 25 20:05:52 CET 2009


Author: noik
Date: 2009-01-25 19:05:51 +0000 (Sun, 25 Jan 2009)
New Revision: 6545

Removed:
   thunar-actions-plugin/trunk/thunar-actions-plugin/ta-menu-actions.c
   thunar-actions-plugin/trunk/thunar-actions-plugin/ta-menu-actions.h
Modified:
   thunar-actions-plugin/trunk/INSTALL
   thunar-actions-plugin/trunk/TODO
   thunar-actions-plugin/trunk/thunar-actions-plugin/ta-menu-model.c
   thunar-actions-plugin/trunk/thunar-actions-plugin/ta-provider.c
   thunar-actions-plugin/trunk/thunar-actions-plugin/ta-provider.h
   thunar-actions-plugin/trunk/thunar-actions-plugin/thunar-actions-plugin.c
Log:
Changed the tree to revise it and start over..


Modified: thunar-actions-plugin/trunk/INSTALL
===================================================================
--- thunar-actions-plugin/trunk/INSTALL	2009-01-25 18:43:35 UTC (rev 6544)
+++ thunar-actions-plugin/trunk/INSTALL	2009-01-25 19:05:51 UTC (rev 6545)
@@ -2,7 +2,7 @@
 *************************
 
 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006 Free Software Foundation, Inc.
+2006, 2007 Free Software Foundation, Inc.
 
 This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
@@ -67,6 +67,9 @@
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
 Compilers and Options
 =====================
 

Modified: thunar-actions-plugin/trunk/TODO
===================================================================
--- thunar-actions-plugin/trunk/TODO	2009-01-25 18:43:35 UTC (rev 6544)
+++ thunar-actions-plugin/trunk/TODO	2009-01-25 19:05:51 UTC (rev 6545)
@@ -1,24 +1,31 @@
 TODO for thunar-actions-plugin
 ******************************
 
-	* combine three files(ta-provider.*, ta-menu-model.* and ta-menu-actions.*)
+According to a MoSCoW analysis:
+==
+MUST do:
 
-	* create a good way of parsing the .desktop files
+	* Create a good way of parsing the .desktop files
+
+	* Recreate codebase for generating the GTKitems in menu
 	
-	* create a way that the .desktop files are matched according to mime-type
+	* Fix the startup of the action
+		
+COULD do:
 
-	* create a way to use .directory files
+	* Create a way to use .directory files - to make categories
 
-	* fix the startup of the command.
-	
-		* edit creation of the action menu
+SHOULD do:
 
-	* create a menu item
-		
-		* create a config menu
+	* Create a way that the .desktop files are matched according to mime-type
 
+WOULD do:
 
+	* Language
+	
+	* Create a config menu
 
+
 ******************************
 
 Start Testing!

Modified: thunar-actions-plugin/trunk/thunar-actions-plugin/ta-menu-model.c
===================================================================
--- thunar-actions-plugin/trunk/thunar-actions-plugin/ta-menu-model.c	2009-01-25 18:43:35 UTC (rev 6544)
+++ thunar-actions-plugin/trunk/thunar-actions-plugin/ta-menu-model.c	2009-01-25 19:05:51 UTC (rev 6545)
@@ -151,15 +151,7 @@
                          GList          *files, 
                          GList 			*model)
 {
-	Menu_Item* item;
-	
-	item->name = "blaat";
-	//(((XfceRc*)(menu_model->entry))->data)
-	
-	model = g_list_append(model, item);
-	
-	//model = menu;	
-	model = NULL;
+	model->data = "blaat";
 }
 
 Menu_Model* menu_model_new ()

Modified: thunar-actions-plugin/trunk/thunar-actions-plugin/ta-provider.c
===================================================================
--- thunar-actions-plugin/trunk/thunar-actions-plugin/ta-provider.c	2009-01-25 18:43:35 UTC (rev 6544)
+++ thunar-actions-plugin/trunk/thunar-actions-plugin/ta-provider.c	2009-01-25 19:05:51 UTC (rev 6545)
@@ -1,12 +1,8 @@
 /*
  *      ta-provider.c
  *
- *      Copyright 2008 	Kees Scherpenhuijzen <noik00 at gmail.com>
- * 						Jelle de Jong <jelledejong at powercraft.nl>
+ *      Copyright 2009 	Kees Scherpenhuijzen <noik00 at gmail.com>
  *
- * 		based on tex-open-terminal.c
- * 		Copyright (c) 2005 Benedikt Meurer <benny at xfce.org>
- *
  *      This program is free software; you can redistribute it and/or modify
  *      it under the terms of the GNU General Public License as published by
  *      the Free Software Foundation; either version 2 of the License, or
@@ -36,7 +32,7 @@
 
 #include <thunar-actions-plugin/ta-provider.h>
 #include <thunar-actions-plugin/ta-menu-model.h>
-#include <thunar-actions-plugin/ta-menu-actions.h>
+//#include <thunar-actions-plugin/ta-menu-actions.h>
 
 static void   ta_provider_class_init        		(TaProviderClass *klass);
 static void   ta_provider_menu_init 				(ThunarxMenuProviderIface *iface);
@@ -46,7 +42,6 @@
                                                  	GtkWidget                        *window);
 static GList *ta_provider_get_file_actions   		(ThunarxMenuProvider *provider, GtkWidget *window, GList *files);
 static GList *ta_provider_get_folder_actions 		(ThunarxMenuProvider *provider, GtkWidget *window, ThunarxFileInfo *folder);
-static void   ta_provider_activated          		(Menu_Item *item, GtkWidget *window);
 
 struct _TaProviderClass
 {
@@ -67,7 +62,7 @@
 static void
 ta_provider_class_init (TaProviderClass *klass)
 {
-  /* nothing to do here */
+
 }
 
 static void
@@ -76,6 +71,7 @@
 	self->model = menu_model_new();
 }
 
+//triggers a function when right-clicking on a file
 static void
 ta_provider_menu_init (ThunarxMenuProviderIface *iface)
 {
@@ -83,12 +79,14 @@
   	iface->get_folder_actions = ta_provider_get_folder_actions;
 }
 
+//triggers a function when clicking on the menu
 static void
 ta_provider_preferences_provider_init (ThunarxPreferencesProviderIface *iface)
 {
 	iface->get_actions = ta_provider_get_actions;
 }
 
+// what will start when clicking on the ta provider menu button
 static void
 manage_actions (GtkWindow *window)
 {
@@ -108,7 +106,7 @@
   	GtkAction *action;
   	GClosure  *closure;
 
-  	action = gtk_action_new ("Thunar-Actions-Plugin::manage-actions", "Configure ac_tions...",
+  	action = gtk_action_new ("TaProvider::manage-actions", "Configure ac_tions...",
                            "Setup actions that will appear in the file managers context menus", NULL);
   	closure = g_cclosure_new_object_swap (G_CALLBACK (manage_actions), G_OBJECT (window));
   	g_signal_connect_closure (G_OBJECT (action), "activate", closure, TRUE);
@@ -136,24 +134,17 @@
 	/* check if we have a valid path here */
 	if (G_LIKELY (path != NULL))
 	{	
-		g_message("test");
-		/* A new model is parsed */
-		//menu_model_get_matching(ta_provider->model, files, &model);
+		//Parse a model
+		menu_model_get_matching(ta_provider->model, files, &model);
+		
 		if ( model != NULL)
 		{
-			/* The made model is parsed in a menu */
-			for ( ; model != NULL; model = model->next)			
-			{
-				/* Make a new menu item, and send a Glist with a layout */
-				//actions = menu_action_new("naam", "label", model);		
-				actions = g_list_prepend( actions, action);
-			}
-			g_message("test");
+			g_message("Hier een menu voor path:%s",path);
 		}
 		else
 		{
 			GClosure  *closure;
-			action = gtk_action_new ("thunar-actions-plugin::config actions", "Configure actions", "configure actions", NULL);
+			action = gtk_action_new ("TaProvider::configactions", "Configure actions", "configure actions", NULL);
 			closure = g_cclosure_new_object_swap (G_CALLBACK (manage_actions), G_OBJECT (window));
   			g_signal_connect_closure (G_OBJECT (action), "activate", closure, TRUE);
 			actions = g_list_prepend( actions, action);
@@ -176,38 +167,3 @@
 	/* do the same thing when it's a file */
 	return ta_provider_get_file_actions(provider, window, &files);
 }
-
-static void
-ta_provider_activated (Menu_Item *item, GtkWidget *window)
-{
-	const gchar *path;
-  	GtkWidget   *dialog;
-  	GError      *error = NULL;
-  	gchar       *command;
-
-  	/* determine the folder path */
-  	path = g_object_get_data (G_OBJECT (item), "open-ff-hier");
-  	if (G_UNLIKELY (path == NULL))
-    	return;
-  
-  	/* build up the command line for the terminal */
-  	command = g_strdup_printf ("firefox \"%s\"", path);
-
-  	/* try to run the terminal command */
-  	if (!gdk_spawn_command_line_on_screen (gtk_widget_get_screen (window), command, &error))
-    {
-    	/* display an error dialog */
-      	dialog = gtk_message_dialog_new (GTK_WINDOW (window),
-                                       	GTK_DIALOG_DESTROY_WITH_PARENT,
-                                       	GTK_MESSAGE_ERROR,
-                                       	GTK_BUTTONS_CLOSE,
-                                       	"Fout in het uitvoeren van de actie");
-      	gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s.", error->message);
-      	gtk_dialog_run (GTK_DIALOG (dialog));
-      	gtk_widget_destroy (dialog);
-      	g_error_free (error);
-    }
-
-  	/* cleanup */
-  	g_free (command);
-}

Modified: thunar-actions-plugin/trunk/thunar-actions-plugin/ta-provider.h
===================================================================
--- thunar-actions-plugin/trunk/thunar-actions-plugin/ta-provider.h	2009-01-25 18:43:35 UTC (rev 6544)
+++ thunar-actions-plugin/trunk/thunar-actions-plugin/ta-provider.h	2009-01-25 19:05:51 UTC (rev 6545)
@@ -1,12 +1,8 @@
 /*
  *      ta-provider.h
  *
- *      Copyright 2008 	Kees Scherpenhuijzen <noik00 at gmail.com>
- * 						Jelle de Jong <jelledejong at powercraft.nl>
+ *      Copyright 2009 	Kees Scherpenhuijzen <noik00 at gmail.com>
  *
- *		based on tex-open-terminal.h
- *		Copyright (c) 2005 Benedikt Meurer <benny at xfce.org>
- *
  *      This program is free software; you can redistribute it and/or modify
  *      it under the terms of the GNU General Public License as published by
  *      the Free Software Foundation; either version 2 of the License, or

Modified: thunar-actions-plugin/trunk/thunar-actions-plugin/thunar-actions-plugin.c
===================================================================
--- thunar-actions-plugin/trunk/thunar-actions-plugin/thunar-actions-plugin.c	2009-01-25 18:43:35 UTC (rev 6544)
+++ thunar-actions-plugin/trunk/thunar-actions-plugin/thunar-actions-plugin.c	2009-01-25 19:05:51 UTC (rev 6545)
@@ -1,12 +1,8 @@
 /*
  *      thunar-actions-plugin.c
  *
- *      Copyright 2008 	Kees Scherpenhuijzen <noik00 at gmail.com>
- * 						Jelle de Jong <jelledejong at powercraft.nl>
+ *      Copyright 2009 	Kees Scherpenhuijzen <noik00 at gmail.com>
  *
- *		based on tex-open-terminal-plugin.c
- *		Copyright (c) 2005 Benedikt Meurer <benny at xfce.org>
- *
  *      This program is free software; you can redistribute it and/or modify
  *      it under the terms of the GNU General Public License as published by
  *      the Free Software Foundation; either version 2 of the License, or




More information about the Goodies-commits mailing list