[Goodies-commits] r3784 - in thunar-svn-plugin/trunk: po tsp-svn-helper
Peter de Ridder
peter at xfce.org
Sun Jan 6 17:59:08 CET 2008
Author: peter
Date: 2008-01-06 16:59:08 +0000 (Sun, 06 Jan 2008)
New Revision: 3784
Modified:
thunar-svn-plugin/trunk/po/cs.po
thunar-svn-plugin/trunk/po/fr.po
thunar-svn-plugin/trunk/po/hu.po
thunar-svn-plugin/trunk/po/lv.po
thunar-svn-plugin/trunk/po/nl.po
thunar-svn-plugin/trunk/po/pt_BR.po
thunar-svn-plugin/trunk/po/thunar-svn-plugin.pot
thunar-svn-plugin/trunk/po/ur.po
thunar-svn-plugin/trunk/tsp-svn-helper/tsh-log-dialog.c
thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.c
thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.h
thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties.c
thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.c
Log:
Properties dialog update (properties can be edited now)
Updated translations
Modified: thunar-svn-plugin/trunk/po/cs.po
===================================================================
--- thunar-svn-plugin/trunk/po/cs.po 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/po/cs.po 2008-01-06 16:59:08 UTC (rev 3784)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: xfce 4-i18-goodies\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-06 01:40+0100\n"
+"POT-Creation-Date: 2008-01-06 18:03+0100\n"
"PO-Revision-Date: 2007-12-15 22:05+0100\n"
"Last-Translator: Michal Várady <miko.vaji at gmail.com>\n"
"Language-Team: Czech\n"
@@ -366,7 +366,9 @@
msgid "Properties Related Opions:"
msgstr ""
-#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:174
+#. gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), box, FALSE, TRUE, 0);
+#. gtk_widget_show (box);
+#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:217
#, fuzzy
msgid "Properties"
msgstr "Upravit vlastnosti"
@@ -623,18 +625,19 @@
msgid "Notification"
msgstr "Oznámení"
-#: tsp-svn-helper/tsh-properties-dialog.c:107
+#: tsp-svn-helper/tsh-properties-dialog.c:124
#, fuzzy
msgid "Name"
msgstr "Nahlásit"
-#: tsp-svn-helper/tsh-properties-dialog.c:113
+#: tsp-svn-helper/tsh-properties-dialog.c:130
msgid "Value"
msgstr ""
-#: tsp-svn-helper/tsh-properties-dialog.c:164
-msgid "Set Property Recursive"
-msgstr ""
+#: tsp-svn-helper/tsh-properties-dialog.c:181
+#, fuzzy
+msgid "Modify Property Recursive"
+msgstr "Upravit vlastnosti"
#: tsp-svn-helper/tsh-status-dialog.c:156
msgid "Show Recusive"
Modified: thunar-svn-plugin/trunk/po/fr.po
===================================================================
--- thunar-svn-plugin/trunk/po/fr.po 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/po/fr.po 2008-01-06 16:59:08 UTC (rev 3784)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: xfce-i 18n\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-06 01:40+0100\n"
+"POT-Creation-Date: 2008-01-06 18:03+0100\n"
"PO-Revision-Date: 2007-10-24 13:04+0100\n"
"Last-Translator: Mike Massonnet <mmassonnet at gmail.com>\n"
"Language-Team: French\n"
@@ -369,7 +369,9 @@
msgid "Properties Related Opions:"
msgstr ""
-#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:174
+#. gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), box, FALSE, TRUE, 0);
+#. gtk_widget_show (box);
+#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:217
#, fuzzy
msgid "Properties"
msgstr "Éditer les propriétés"
@@ -629,18 +631,19 @@
msgid "Notification"
msgstr "Notification"
-#: tsp-svn-helper/tsh-properties-dialog.c:107
+#: tsp-svn-helper/tsh-properties-dialog.c:124
#, fuzzy
msgid "Name"
msgstr "Différences détaillées"
-#: tsp-svn-helper/tsh-properties-dialog.c:113
+#: tsp-svn-helper/tsh-properties-dialog.c:130
msgid "Value"
msgstr ""
-#: tsp-svn-helper/tsh-properties-dialog.c:164
-msgid "Set Property Recursive"
-msgstr ""
+#: tsp-svn-helper/tsh-properties-dialog.c:181
+#, fuzzy
+msgid "Modify Property Recursive"
+msgstr "Éditer les propriétés"
#: tsp-svn-helper/tsh-status-dialog.c:156
msgid "Show Recusive"
Modified: thunar-svn-plugin/trunk/po/hu.po
===================================================================
--- thunar-svn-plugin/trunk/po/hu.po 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/po/hu.po 2008-01-06 16:59:08 UTC (rev 3784)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: Thunar SVN plugin\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-06 01:40+0100\n"
+"POT-Creation-Date: 2008-01-06 18:03+0100\n"
"PO-Revision-Date: 2007-06-04 08:37+0100\n"
"Last-Translator: SZERVÁC Attila <sas at 321.hu>\n"
"Language-Team: Hungarian\n"
@@ -366,7 +366,9 @@
msgid "Properties Related Opions:"
msgstr ""
-#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:174
+#. gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), box, FALSE, TRUE, 0);
+#. gtk_widget_show (box);
+#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:217
#, fuzzy
msgid "Properties"
msgstr "Tulajdonságok szerkesztése"
@@ -624,17 +626,18 @@
msgid "Notification"
msgstr ""
-#: tsp-svn-helper/tsh-properties-dialog.c:107
+#: tsp-svn-helper/tsh-properties-dialog.c:124
msgid "Name"
msgstr ""
-#: tsp-svn-helper/tsh-properties-dialog.c:113
+#: tsp-svn-helper/tsh-properties-dialog.c:130
msgid "Value"
msgstr ""
-#: tsp-svn-helper/tsh-properties-dialog.c:164
-msgid "Set Property Recursive"
-msgstr ""
+#: tsp-svn-helper/tsh-properties-dialog.c:181
+#, fuzzy
+msgid "Modify Property Recursive"
+msgstr "Tulajdonságok szerkesztése"
#: tsp-svn-helper/tsh-status-dialog.c:156
msgid "Show Recusive"
Modified: thunar-svn-plugin/trunk/po/lv.po
===================================================================
--- thunar-svn-plugin/trunk/po/lv.po 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/po/lv.po 2008-01-06 16:59:08 UTC (rev 3784)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: thunar-svn-plugin\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-06 01:40+0100\n"
+"POT-Creation-Date: 2008-01-06 18:03+0100\n"
"PO-Revision-Date: 2007-11-15 21:18+0300\n"
"Last-Translator: Rihards Priedītis <rprieditis at inbox.lv>\n"
"Language-Team: Latvian <rprieditis at inbox.lv>\n"
@@ -367,7 +367,9 @@
msgid "Properties Related Opions:"
msgstr ""
-#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:174
+#. gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), box, FALSE, TRUE, 0);
+#. gtk_widget_show (box);
+#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:217
#, fuzzy
msgid "Properties"
msgstr "Rediģēt Rekvizītus"
@@ -627,18 +629,19 @@
msgid "Notification"
msgstr "Paziņošana"
-#: tsp-svn-helper/tsh-properties-dialog.c:107
+#: tsp-svn-helper/tsh-properties-dialog.c:124
#, fuzzy
msgid "Name"
msgstr "Vainot"
-#: tsp-svn-helper/tsh-properties-dialog.c:113
+#: tsp-svn-helper/tsh-properties-dialog.c:130
msgid "Value"
msgstr ""
-#: tsp-svn-helper/tsh-properties-dialog.c:164
-msgid "Set Property Recursive"
-msgstr ""
+#: tsp-svn-helper/tsh-properties-dialog.c:181
+#, fuzzy
+msgid "Modify Property Recursive"
+msgstr "Rediģēt Rekvizītus"
#: tsp-svn-helper/tsh-status-dialog.c:156
msgid "Show Recusive"
Modified: thunar-svn-plugin/trunk/po/nl.po
===================================================================
--- thunar-svn-plugin/trunk/po/nl.po 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/po/nl.po 2008-01-06 16:59:08 UTC (rev 3784)
@@ -7,8 +7,8 @@
msgstr ""
"Project-Id-Version: thunar-svn-plugin\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-06 01:40+0100\n"
-"PO-Revision-Date: 2008-01-05 02:31+0100\n"
+"POT-Creation-Date: 2008-01-06 18:03+0100\n"
+"PO-Revision-Date: 2008-01-06 18:03+0100\n"
"Last-Translator: Peter de Ridder <peter at xfce.org>\n"
"Language-Team: Dutch <xfce-i18n at xfce.org>\n"
"MIME-Version: 1.0\n"
@@ -347,7 +347,9 @@
msgid "Properties Related Opions:"
msgstr "Attributen gerelateerde opties:"
-#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:174
+#. gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), box, FALSE, TRUE, 0);
+#. gtk_widget_show (box);
+#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:217
msgid "Properties"
msgstr "Attributen"
@@ -588,16 +590,16 @@
msgid "Notification"
msgstr "Notificatie"
-#: tsp-svn-helper/tsh-properties-dialog.c:107
+#: tsp-svn-helper/tsh-properties-dialog.c:124
msgid "Name"
msgstr "Naam"
-#: tsp-svn-helper/tsh-properties-dialog.c:113
+#: tsp-svn-helper/tsh-properties-dialog.c:130
msgid "Value"
msgstr "Waarde"
-#: tsp-svn-helper/tsh-properties-dialog.c:164
-msgid "Set Property Recursive"
+#: tsp-svn-helper/tsh-properties-dialog.c:181
+msgid "Modify Property Recursive"
msgstr "Stel attributen op onderliggende mappen in"
#: tsp-svn-helper/tsh-status-dialog.c:156
Modified: thunar-svn-plugin/trunk/po/pt_BR.po
===================================================================
--- thunar-svn-plugin/trunk/po/pt_BR.po 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/po/pt_BR.po 2008-01-06 16:59:08 UTC (rev 3784)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: thunar-svn-plugin\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-06 01:40+0100\n"
+"POT-Creation-Date: 2008-01-06 18:03+0100\n"
"PO-Revision-Date: 2007-11-09 15:08-0300\n"
"Last-Translator: Fábio Nogueira <deb-user-ba at ubuntu.com>\n"
"Language-Team: Brazilian Portuguese <ldp-br at bazar2.conectiva.com.br>\n"
@@ -368,7 +368,9 @@
msgid "Properties Related Opions:"
msgstr ""
-#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:174
+#. gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), box, FALSE, TRUE, 0);
+#. gtk_widget_show (box);
+#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:217
#, fuzzy
msgid "Properties"
msgstr "Editar Propriedades"
@@ -628,18 +630,19 @@
msgid "Notification"
msgstr "Notificação"
-#: tsp-svn-helper/tsh-properties-dialog.c:107
+#: tsp-svn-helper/tsh-properties-dialog.c:124
#, fuzzy
msgid "Name"
msgstr "Falha"
-#: tsp-svn-helper/tsh-properties-dialog.c:113
+#: tsp-svn-helper/tsh-properties-dialog.c:130
msgid "Value"
msgstr ""
-#: tsp-svn-helper/tsh-properties-dialog.c:164
-msgid "Set Property Recursive"
-msgstr ""
+#: tsp-svn-helper/tsh-properties-dialog.c:181
+#, fuzzy
+msgid "Modify Property Recursive"
+msgstr "Editar Propriedades"
#: tsp-svn-helper/tsh-status-dialog.c:156
msgid "Show Recusive"
Modified: thunar-svn-plugin/trunk/po/thunar-svn-plugin.pot
===================================================================
--- thunar-svn-plugin/trunk/po/thunar-svn-plugin.pot 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/po/thunar-svn-plugin.pot 2008-01-06 16:59:08 UTC (rev 3784)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-06 01:40+0100\n"
+"POT-Creation-Date: 2008-01-06 18:03+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -348,7 +348,9 @@
msgid "Properties Related Opions:"
msgstr ""
-#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:174
+#. gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), box, FALSE, TRUE, 0);
+#. gtk_widget_show (box);
+#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:217
msgid "Properties"
msgstr ""
@@ -589,16 +591,16 @@
msgid "Notification"
msgstr ""
-#: tsp-svn-helper/tsh-properties-dialog.c:107
+#: tsp-svn-helper/tsh-properties-dialog.c:124
msgid "Name"
msgstr ""
-#: tsp-svn-helper/tsh-properties-dialog.c:113
+#: tsp-svn-helper/tsh-properties-dialog.c:130
msgid "Value"
msgstr ""
-#: tsp-svn-helper/tsh-properties-dialog.c:164
-msgid "Set Property Recursive"
+#: tsp-svn-helper/tsh-properties-dialog.c:181
+msgid "Modify Property Recursive"
msgstr ""
#: tsp-svn-helper/tsh-status-dialog.c:156
Modified: thunar-svn-plugin/trunk/po/ur.po
===================================================================
--- thunar-svn-plugin/trunk/po/ur.po 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/po/ur.po 2008-01-06 16:59:08 UTC (rev 3784)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: thunar-svn-plugin\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-06 01:40+0100\n"
+"POT-Creation-Date: 2008-01-06 18:03+0100\n"
"PO-Revision-Date: 2007-10-26 15:12+0500\n"
"Last-Translator: Muhammad Ali Makki <makk.ma at gmail.com>\n"
"Language-Team: Urdu <makki.ma at gmail.com>\n"
@@ -370,7 +370,9 @@
msgid "Properties Related Opions:"
msgstr ""
-#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:174
+#. gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), box, FALSE, TRUE, 0);
+#. gtk_widget_show (box);
+#: tsp-svn-helper/main.c:251 tsp-svn-helper/tsh-properties-dialog.c:217
#, fuzzy
msgid "Properties"
msgstr "خصوصیات مدون کریں"
@@ -630,18 +632,19 @@
msgid "Notification"
msgstr "اطلاعیہ"
-#: tsp-svn-helper/tsh-properties-dialog.c:107
+#: tsp-svn-helper/tsh-properties-dialog.c:124
#, fuzzy
msgid "Name"
msgstr "Blame"
-#: tsp-svn-helper/tsh-properties-dialog.c:113
+#: tsp-svn-helper/tsh-properties-dialog.c:130
msgid "Value"
msgstr ""
-#: tsp-svn-helper/tsh-properties-dialog.c:164
-msgid "Set Property Recursive"
-msgstr ""
+#: tsp-svn-helper/tsh-properties-dialog.c:181
+#, fuzzy
+msgid "Modify Property Recursive"
+msgstr "خصوصیات مدون کریں"
#: tsp-svn-helper/tsh-status-dialog.c:156
msgid "Show Recusive"
Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-log-dialog.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-log-dialog.c 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-log-dialog.c 2008-01-06 16:59:08 UTC (rev 3784)
@@ -340,6 +340,8 @@
gtk_widget_hide (dialog->refresh);
gtk_widget_show (dialog->cancel);
+ g_signal_emit (dialog, signals[SIGNAL_REFRESH], 0);
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->tree_view));
gtk_list_store_clear (GTK_LIST_STORE (model));
@@ -347,7 +349,5 @@
model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->file_view));
gtk_list_store_clear (GTK_LIST_STORE (model));
-
- g_signal_emit (dialog, signals[SIGNAL_REFRESH], 0);
}
Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.c 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.c 2008-01-06 16:59:08 UTC (rev 3784)
@@ -33,6 +33,7 @@
static void cancel_clicked (GtkButton*, gpointer);
static void set_clicked (GtkButton*, gpointer);
static void delete_clicked (GtkButton*, gpointer);
+static void tsh_make_homogeneous (GtkWidget *, ...) G_GNUC_NULL_TERMINATED;
struct _TshPropertiesDialog
{
@@ -57,6 +58,8 @@
enum {
SIGNAL_CANCEL = 0,
+ SIGNAL_SET,
+ SIGNAL_DELETE,
SIGNAL_COUNT
};
@@ -71,6 +74,20 @@
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+
+ signals[SIGNAL_SET] = g_signal_new("set-clicked",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ signals[SIGNAL_DELETE] = g_signal_new("delete-clicked",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
}
enum {
@@ -161,7 +178,7 @@
gtk_widget_show (text_view);
gtk_widget_show (scroll_window);
- dialog->recursive = recursive = gtk_check_button_new_with_label (_("Set Property Recursive"));
+ dialog->recursive = recursive = gtk_check_button_new_with_label (_("Modify Property Recursive"));
gtk_box_pack_start (GTK_BOX(box), recursive, FALSE, TRUE, 0);
gtk_widget_show (recursive);
@@ -171,20 +188,34 @@
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vpane, TRUE, TRUE, 0);
gtk_widget_show (vpane);
- gtk_window_set_title (GTK_WINDOW (dialog), _("Properties"));
-
//gtk_button_box_set_layout(GTK_BUTTON_BOX (GTK_DIALOG (dialog)->action_area), GTK_BUTTONBOX_EDGE);
+ gtk_container_remove (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), GTK_DIALOG (dialog)->action_area);
+ GTK_DIALOG (dialog)->action_area = box = gtk_hbox_new (FALSE, 0);
+
+ gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->vbox), box,
+ FALSE, TRUE, 0);
+ gtk_widget_show (box);
+
+ gtk_box_reorder_child (GTK_BOX (GTK_DIALOG (dialog)->vbox), box, 0);
+
+ //box = gtk_hbox_new (FALSE, 12);
+
dialog->set = button = gtk_button_new_from_stock(GTK_STOCK_ADD);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), button, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (set_clicked), dialog);
- gtk_widget_hide (button);
+ gtk_widget_show (button);
dialog->delete = button = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), button, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (delete_clicked), dialog);
- gtk_widget_hide (button);
+ gtk_widget_show (button);
+ //gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), box, FALSE, TRUE, 0);
+ //gtk_widget_show (box);
+
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Properties"));
+
dialog->close = button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
gtk_widget_hide (button);
@@ -193,6 +224,8 @@
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (cancel_clicked), dialog);
gtk_widget_show (button);
+ tsh_make_homogeneous (dialog->set, dialog->delete, dialog->close, dialog->cancel, NULL);
+
gtk_window_set_default_size (GTK_WINDOW (dialog), 500, 400);
}
@@ -219,6 +252,38 @@
return GTK_WIDGET(dialog);
}
+static void
+tsh_make_homogeneous (GtkWidget *first, ...)
+{
+ GtkWidget *iter;
+ GtkRequisition request;
+ gint max_width = 0;
+ gint max_height = 0;
+ va_list ap;
+
+ va_start (ap, first);
+ iter = first;
+ while (iter)
+ {
+ gtk_widget_size_request(iter, &request);
+ if (request.width > max_width)
+ max_width = request.width;
+ if (request.height > max_height)
+ max_height = request.height;
+ iter = va_arg (ap, GtkWidget *);
+ }
+ va_end (ap);
+
+ va_start (ap, first);
+ iter = first;
+ while (iter)
+ {
+ gtk_widget_set_size_request (iter, max_width, max_height);
+ iter = va_arg (ap, GtkWidget *);
+ }
+ va_end (ap);
+}
+
void
tsh_properties_dialog_add (TshPropertiesDialog *dialog, const char *name, const char *value)
{
@@ -280,6 +345,55 @@
gtk_widget_show (dialog->close);
}
+gchar *
+tsh_properties_dialog_get_key (TshPropertiesDialog *dialog)
+{
+ g_return_val_if_fail (TSH_IS_PROPERTIES_DIALOG (dialog), NULL);
+
+ return gtk_combo_box_get_active_text (GTK_COMBO_BOX (dialog->combo_box));
+}
+
+gchar *
+tsh_properties_dialog_get_selected_key (TshPropertiesDialog *dialog)
+{
+ GtkTreeIter iter;
+ GtkTreeSelection *selection;
+ GtkTreeModel *model;
+ gchar *name = NULL;
+
+ g_return_val_if_fail (TSH_IS_PROPERTIES_DIALOG (dialog), NULL);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->tree_view));
+
+ if (gtk_tree_selection_get_selected (selection, &model, &iter))
+ {
+ gtk_tree_model_get (model, &iter, COLUMN_NAME, &name, -1);
+ }
+
+ return name;
+}
+
+gchar *
+tsh_properties_dialog_get_value (TshPropertiesDialog *dialog)
+{
+ GtkTextIter start, end;
+
+ g_return_val_if_fail (TSH_IS_PROPERTIES_DIALOG (dialog), NULL);
+
+ GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->text_view));
+ gtk_text_buffer_get_start_iter (buffer, &start);
+ gtk_text_buffer_get_end_iter (buffer, &end);
+ return gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
+}
+
+gboolean
+tsh_properties_dialog_get_recursive (TshPropertiesDialog *dialog)
+{
+ g_return_val_if_fail (TSH_IS_PROPERTIES_DIALOG (dialog), FALSE);
+
+ return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->recursive));
+}
+
static void
selection_changed (GtkTreeView *tree_view, gpointer user_data)
{
@@ -349,10 +463,30 @@
static void
set_clicked (GtkButton *button, gpointer user_data)
{
+ GtkTreeModel *model;
+ TshPropertiesDialog *dialog = TSH_PROPERTIES_DIALOG (user_data);
+
+ gtk_widget_hide (dialog->close);
+ gtk_widget_show (dialog->cancel);
+
+ g_signal_emit (dialog, signals[SIGNAL_SET], 0);
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->tree_view));
+ gtk_list_store_clear (GTK_LIST_STORE (model));
}
static void
delete_clicked (GtkButton *button, gpointer user_data)
{
+ GtkTreeModel *model;
+ TshPropertiesDialog *dialog = TSH_PROPERTIES_DIALOG (user_data);
+
+ gtk_widget_hide (dialog->close);
+ gtk_widget_show (dialog->cancel);
+
+ g_signal_emit (dialog, signals[SIGNAL_DELETE], 0);
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->tree_view));
+ gtk_list_store_clear (GTK_LIST_STORE (model));
}
Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.h
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.h 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.h 2008-01-06 16:59:08 UTC (rev 3784)
@@ -53,6 +53,12 @@
const char *value);
void tsh_properties_dialog_done (TshPropertiesDialog *dialog);
+
+gchar *tsh_properties_dialog_get_key (TshPropertiesDialog *dialog);
+gchar *tsh_properties_dialog_get_selected_key (TshPropertiesDialog *dialog);
+gchar *tsh_properties_dialog_get_value (TshPropertiesDialog *dialog);
+gboolean tsh_properties_dialog_get_recursive (TshPropertiesDialog *dialog);
+
G_END_DECLS;
#endif /* !__TSH_PROPERTIES_DIALOG_H__ */
Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties.c 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties.c 2008-01-06 16:59:08 UTC (rev 3784)
@@ -40,6 +40,9 @@
apr_pool_t *pool;
TshPropertiesDialog *dialog;
gchar *path;
+ gchar *set_key;
+ gchar *set_value;
+ gboolean recursive;
};
static gpointer properties_thread (gpointer user_data)
@@ -51,10 +54,34 @@
apr_pool_t *pool = args->pool;
TshPropertiesDialog *dialog = args->dialog;
gchar *path = args->path;
+ gchar *set_key = args->set_key;
+ gchar *set_value = args->set_value;
+ gboolean recursive = args->recursive;
+ svn_string_t *value;
apr_array_header_t *prop_items;
- g_free (args);
+ args->set_key = NULL;
+ args->set_value = NULL;
+ if (set_key)
+ {
+ value = set_value?svn_string_create(set_value, pool):NULL;
+
+ if ((err = svn_client_propset2(set_key, value, path, recursive, FALSE, ctx, pool)))
+ {
+ //gdk_threads_enter();
+ //tsh_properties_dialog_done (dialog);
+ //gdk_threads_leave();
+
+ svn_handle_error2(err, stderr, FALSE, G_LOG_DOMAIN ": ");
+ svn_error_clear(err);
+ //return GINT_TO_POINTER (FALSE);
+ }
+ }
+
+ g_free (set_key);
+ g_free (set_value);
+
revision.kind = svn_opt_revision_unspecified;
if ((err = svn_client_proplist2(&prop_items, path, &revision, &revision, FALSE, ctx, pool)))
{
@@ -95,6 +122,32 @@
return GINT_TO_POINTER (TRUE);
}
+static void create_properties_thread (TshPropertiesDialog *dialog, struct thread_args *args)
+{
+ GThread *thread = g_thread_create (properties_thread, args, TRUE, NULL);
+ if (thread)
+ tsh_replace_thread (thread);
+ else
+ tsh_properties_dialog_done (dialog);
+}
+
+static void set_property (TshPropertiesDialog *dialog, struct thread_args *args)
+{
+ args->set_key = tsh_properties_dialog_get_key (dialog);
+ args->set_value = tsh_properties_dialog_get_value (dialog);
+ args->recursive = tsh_properties_dialog_get_recursive (dialog);
+
+ create_properties_thread (dialog, args);
+}
+
+static void delete_property (TshPropertiesDialog *dialog, struct thread_args *args)
+{
+ args->set_key = tsh_properties_dialog_get_selected_key (dialog);
+ args->set_value = NULL;
+
+ create_properties_thread (dialog, args);
+}
+
GThread *tsh_properties (gchar **files, svn_client_ctx_t *ctx, apr_pool_t *pool)
{
struct thread_args *args;
@@ -115,7 +168,13 @@
args->pool = pool;
args->dialog = TSH_PROPERTIES_DIALOG (dialog);
args->path = path;
+ args->set_key = NULL;
+ args->set_value = NULL;
+ args->recursive = FALSE;
+ g_signal_connect(dialog, "set-clicked", G_CALLBACK(set_property), args);
+ g_signal_connect(dialog, "delete-clicked", G_CALLBACK(delete_property), args);
+
return g_thread_create (properties_thread, args, TRUE, NULL);
}
Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.c 2008-01-06 09:58:37 UTC (rev 3783)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.c 2008-01-06 16:59:08 UTC (rev 3784)
@@ -321,10 +321,9 @@
gtk_widget_hide (dialog->refresh);
gtk_widget_show (dialog->cancel);
+ g_signal_emit (dialog, signals[SIGNAL_REFRESH], 0);
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->tree_view));
-
gtk_list_store_clear (GTK_LIST_STORE (model));
-
- g_signal_emit (dialog, signals[SIGNAL_REFRESH], 0);
}
More information about the Goodies-commits
mailing list