[Goodies-commits] r4932 - thunar-svn-plugin/trunk/tsp-svn-helper

Peter de Ridder peter at xfce.org
Thu Jun 12 23:09:01 CEST 2008


Author: peter
Date: 2008-06-12 21:09:00 +0000 (Thu, 12 Jun 2008)
New Revision: 4932

Modified:
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.h
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-resolved.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-revert.c
Log:
added file selection dialog from resolved

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.c	2008-06-12 14:53:15 UTC (rev 4931)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.c	2008-06-12 21:09:00 UTC (rev 4932)
@@ -249,8 +249,16 @@
 static void tsh_file_selection_status_func2(void *baton, const char *path, svn_wc_status2_t *status)
 {
 	TshFileSelectionDialog *dialog = TSH_FILE_SELECTION_DIALOG (baton);
+  gboolean add = FALSE;
 
   if (dialog->flags & (status->entry?(TSH_FILE_SELECTION_FLAG_MODIFIED|TSH_FILE_SELECTION_FLAG_UNCHANGED|TSH_FILE_SELECTION_FLAG_IGNORED):TSH_FILE_SELECTION_FLAG_UNVERSIONED))
+    add = TRUE;
+
+  if (dialog->flags & TSH_FILE_SELECTION_FLAG_CONFLICTED)
+    if(status->text_status == svn_wc_status_conflicted || status->prop_status == svn_wc_status_conflicted)
+      add = TRUE;
+
+  if (add)
   {
     GtkTreeModel *model;
     GtkTreeIter iter;

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.h
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.h	2008-06-12 14:53:15 UTC (rev 4931)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.h	2008-06-12 21:09:00 UTC (rev 4932)
@@ -29,7 +29,8 @@
   TSH_FILE_SELECTION_FLAG_MODIFIED    = 1<<1,
   TSH_FILE_SELECTION_FLAG_UNVERSIONED = 1<<2,
   TSH_FILE_SELECTION_FLAG_UNCHANGED   = 1<<3,
-  TSH_FILE_SELECTION_FLAG_IGNORED     = 1<<4
+  TSH_FILE_SELECTION_FLAG_IGNORED     = 1<<4,
+  TSH_FILE_SELECTION_FLAG_CONFLICTED  = 1<<5
 } TshFileSelectionFlags;
 
 typedef struct _TshFileSelectionDialogClass TshFileSelectionDialogClass;

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-resolved.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-resolved.c	2008-06-12 14:53:15 UTC (rev 4931)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-resolved.c	2008-06-12 21:09:00 UTC (rev 4932)
@@ -32,6 +32,7 @@
 
 #include "tsh-common.h"
 #include "tsh-dialog-common.h"
+#include "tsh-file-selection-dialog.h"
 #include "tsh-notify-dialog.h"
 
 #include "tsh-resolved.h"
@@ -65,7 +66,7 @@
 	{
 		for (i = 0; i < size; i++)
 		{
-      if ((err = svn_client_resolved(files[i], TRUE, ctx, subpool)))
+      if ((err = svn_client_resolved(files[i], FALSE, ctx, subpool)))
       {
         error_str = tsh_strerror(err);
         gdk_threads_enter();
@@ -81,7 +82,7 @@
 	}
 	else
 	{
-    if ((err = svn_client_resolved("", TRUE, ctx, subpool)))
+    if ((err = svn_client_resolved("", FALSE, ctx, subpool)))
     {
       error_str = tsh_strerror(err);
       gdk_threads_enter();
@@ -109,6 +110,19 @@
 	GtkWidget *dialog;
 	struct thread_args *args;
 
+  dialog = tsh_file_selection_dialog_new (_("Resolved"), NULL, 0, files, TSH_FILE_SELECTION_FLAG_RECURSIVE|TSH_FILE_SELECTION_FLAG_CONFLICTED, ctx, pool);
+	if(gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_OK)
+  {
+    gtk_widget_destroy (dialog);
+    return NULL;
+  }
+  g_strfreev (files);
+  files = tsh_file_selection_dialog_get_files (TSH_FILE_SELECTION_DIALOG (dialog));
+  gtk_widget_destroy (dialog);
+
+  if(!files)
+    return NULL;
+
 	dialog = tsh_notify_dialog_new (_("Resolved"), NULL, 0);
   g_signal_connect(dialog, "cancel-clicked", tsh_cancel, NULL);
 	tsh_dialog_start (GTK_DIALOG (dialog), TRUE);

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-revert.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-revert.c	2008-06-12 14:53:15 UTC (rev 4931)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-revert.c	2008-06-12 21:09:00 UTC (rev 4932)
@@ -78,7 +78,7 @@
 		APR_ARRAY_PUSH (paths, const char *) = ""; // current directory
 	}
 
-	if ((err = svn_client_revert(paths, TRUE, ctx, subpool)))
+	if ((err = svn_client_revert(paths, FALSE, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 




More information about the Goodies-commits mailing list