[epiphany] (8 commits) Created branch gnome-keyring

2009-07-29 Thread Priit Laes
The branch 'gnome-keyring' was created.

Summary of new commits:

  23228a2... Move Epiphany to solely use GnomeKeyring for password manag
  b16eeff... Set password column initially as hidden.
  9b9dd3d... Use correct column from store for deletion.
  d686fe2... Make pdm_dialog_fill_passwords_list asynchronous.
  b038a8f... Make password loading/showing asynchronous.
  1b6928f... Make clear all functionality asynchronous.
  9657890... Password removal is now async :)
  93fab0d... Password adding is fully async now.
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


[epiphany/gnome-keyring: 2/8] Set password column initially as hidden.

2009-07-29 Thread Priit Laes
commit b16eeff1c829155a091910bc4f6a3de49bd99dc0
Author: Priit Laes 
Date:   Fri Jul 24 19:07:37 2009 +0300

Set password column initially as hidden.

Signed-off-by: Priit Laes 

 src/pdm-dialog.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index 6a31a16..318fbf7 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -1251,7 +1251,7 @@ pdm_dialog_passwords_construct (PdmActionInfo *info)
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
gtk_tree_view_column_set_sort_column_id (column, COL_PASSWORDS_USER);
 
-   /* FIXME: Mask passwords initially with '*' */
+/* Initially shown as hidden colum */
 gtk_tree_view_insert_column_with_data_func (treeview,
 COL_PASSWORDS_PASS,
 _("User Password"),
@@ -1260,6 +1260,7 @@ pdm_dialog_passwords_construct (PdmActionInfo *info)
 info,
 NULL);
column = gtk_tree_view_get_column (treeview, COL_PASSWORDS_PASS);
+gtk_tree_view_column_set_visible (column, FALSE);
gtk_tree_view_column_set_resizable (column, TRUE);
gtk_tree_view_column_set_reorderable (column, TRUE);
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


[epiphany/gnome-keyring: 1/8] Move Epiphany to solely use GnomeKeyring for password management.

2009-07-29 Thread Priit Laes
commit 23228a282e2321b284007fe1281598a12e1bfbb0
Author: Priit Laes 
Date:   Tue Jul 21 11:47:53 2009 +0300

Move Epiphany to solely use GnomeKeyring for password management.

Based on patch by Holger Freyther.

Signed-off-by: Priit Laes 

 configure.ac  |2 +
 embed/Makefile.am |2 -
 embed/downloader-view.c   |8 +-
 embed/ephy-embed-single.c |   38 
 embed/ephy-password-manager.c |  218 -
 embed/ephy-password-manager.h |  101 --
 src/Makefile.am   |2 +
 src/ephy-password-info.c  |   67 +++
 src/ephy-password-info.h  |   49 +
 src/pdm-dialog.c  |  428 ++---
 10 files changed, 355 insertions(+), 560 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 717d9a7..0d9bb6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,6 +102,7 @@ LIBNOTIFY_REQUIRED=0.4
 DBUS_GLIB_REQUIRED=0.35
 WEBKIT_GTK_REQUIRED=1.1.11
 LIBSOUP_GNOME_REQUIRED=2.26.0
+GNOME_KEYRING_REQUIRED=2.26.0
 
 PKG_CHECK_EXISTS([libnotify >= 
$LIBNOTIFY_REQUIRED],[have_libnotify=yes],[have_libnotify=no])
 
@@ -137,6 +138,7 @@ PKG_CHECK_MODULES([DEPENDENCIES], [
  $LIBNOTIFY_PACKAGE
  webkit-1.0 >= $WEBKIT_GTK_REQUIRED
  libsoup-gnome-2.4 >= $LIBSOUP_GNOME_REQUIRED
+ gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED
  ])
 
 # 
diff --git a/embed/Makefile.am b/embed/Makefile.am
index b1f2330..f4a4998 100644
--- a/embed/Makefile.am
+++ b/embed/Makefile.am
@@ -26,7 +26,6 @@ INST_H_FILES = \
ephy-embed-shell.h  \
ephy-embed-utils.h  \
ephy-history.h  \
-   ephy-password-manager.h \
ephy-permission-manager.h   \
ephy-web-view.h
 
@@ -51,7 +50,6 @@ libephyembed_la_SOURCES = \
ephy-encodings.c\
ephy-favicon-cache.c\
ephy-history.c  \
-   ephy-password-manager.c \
ephy-permission-manager.c   \
ephy-embed-prefs.c  \
ephy-web-view.c \
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index 36b25fb..8eae89f 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -661,10 +661,6 @@ downloader_view_add_download (DownloaderView *dv,
 #endif
GValue visible = {0, };
 
-#ifdef HAVE_LIBNOTIFY
-   char *downloading;
-#endif
-
/* dv may be unrefed inside update_download_row if the file
 * downloaded completely while the user was choosing where to
 * put it, so we need to protect it
@@ -710,6 +706,7 @@ downloader_view_add_download (DownloaderView *dv,
{
 
 #ifdef HAVE_LIBNOTIFY
+char *downloading;
char *name = ephy_download_get_name (download);
downloading = g_strdup_printf(_("The file “%s” has been 
added to the downloads queue."), 
name);
@@ -892,7 +889,7 @@ downloader_view_build_ui (DownloaderView *dv)
gtk_tree_view_column_set_cell_data_func(column, renderer, 
progress_cell_data_func, NULL, NULL);
gtk_tree_view_column_set_sort_column_id (column, COL_PERCENT);
 
-   /* Remainng time column */
+   /* Remaining time column */
renderer = gtk_cell_renderer_text_new ();
g_object_set (renderer, "xalign", 0.5, NULL);
gtk_tree_view_insert_column_with_attributes 
(GTK_TREE_VIEW(priv->treeview),
@@ -1007,7 +1004,6 @@ downloader_view_remove_download (DownloaderView *dv, 
WebKitDownload *download)
update_status_icon (dv);
 
/* Close the dialog if there are no more downloads */
-
if (!g_hash_table_size (dv->priv->downloads_hash))
{
g_object_unref (dv);
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c
index b41850a..f3f9996 100644
--- a/embed/ephy-embed-single.c
+++ b/embed/ephy-embed-single.c
@@ -26,7 +26,6 @@
 #include "ephy-file-helpers.h"
 #include "ephy-marshal.h"
 #include "ephy-signal-accumulator.h"
-#include "ephy-password-manager.h"
 #include "ephy-permission-manager.h"
 
 #ifdef ENABLE_CERTIFICATE_MANAGER
@@ -50,7 +49,6 @@ enum {
 static void ephy_embed_single_init (EphyEmbedSingle *single);
 static void ephy_embed_single_class_init (EphyEmbedSingleClass *klass);
 static void ephy_permission_manager_iface_init (EphyPermissionManagerIface 
*iface);
-static void ephy_password_manager_iface_init (EphyPasswordManagerIface *iface);
 #ifdef ENABLE_CERTIFICATE_MANAGER
 static void ephy_certificate_manager_iface_init (EphyCertificateManagerIface 
*iface);
 #endif
@@ -96,16 +94,12 @@ ephy_embed_single_set_property (GObject *object,
 
 #ifdef ENABLE_CERTIFICATE_MANAGER
 G_DEFINE_TYPE_WITH_CODE (EphyEmbedSingle, ephy_embed_single,

[epiphany/gnome-keyring: 3/8] Use correct column from store for deletion.

2009-07-29 Thread Priit Laes
commit 9b9dd3dbe98c51c7ef64e3ab6986187f767068d7
Author: Priit Laes 
Date:   Fri Jul 24 19:12:54 2009 +0300

Use correct column from store for deletion.

Signed-off-by: Priit Laes 

 src/pdm-dialog.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index 318fbf7..697773c 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -265,7 +265,7 @@ clear_all_dialog_response_cb (GtkDialog *dialog,
gboolean result;
 
gtk_tree_model_get_value (model, &iter,
-   COL_PASSWORDS_PASS, &val);
+   COL_PASSWORDS_DATA, &val);
result = pdm_dialog_password_remove(pinfo,
g_value_get_boxed (&val));
g_value_unset (&val);
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


[epiphany/gnome-keyring: 4/8] Make pdm_dialog_fill_passwords_list asynchronous.

2009-07-29 Thread Priit Laes
commit d686fe2b5eae079aef90850266fe870e21e3c606
Author: Priit Laes 
Date:   Fri Jul 24 20:09:32 2009 +0300

Make pdm_dialog_fill_passwords_list asynchronous.

Signed-off-by: Priit Laes 

 src/pdm-dialog.c |   36 +---
 1 files changed, 21 insertions(+), 15 deletions(-)
---
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index 697773c..c4c28b1 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -1270,26 +1270,32 @@ pdm_dialog_passwords_construct (PdmActionInfo *info)
 }
 
 static void
-pdm_dialog_fill_passwords_list (PdmActionInfo *info)
+pdm_dialog_fill_passwords_list_async_cb (GnomeKeyringResult result,
+ GList *list,
+ gpointer data)
 {
-   GList *list, *l;
-GnomeKeyringResult result;
+  GList *l;
+  PdmActionInfo *info = (PdmActionInfo *)data;
 
-result = gnome_keyring_list_item_ids_sync (GNOME_KEYRING_DEFAULT, &list);
+  if (result != GNOME_KEYRING_RESULT_OK)
+return;
 
-if (result == GNOME_KEYRING_RESULT_OK)
-   {
-for (l = list; l != NULL; l = l->next)
-info->add (info, l->data);
-g_list_free (list);
-}
+  for (l = list; l != NULL; l = l->next)
+info->add (info, l->data);
 
-   /* Let's get notified when the list changes */
-   info->filled = TRUE;
+  info->filled = TRUE;
+  gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (info->model),
+COL_PASSWORDS_HOST,
+GTK_SORT_ASCENDING);
+}
 
-   gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (info->model),
- COL_PASSWORDS_HOST,
- GTK_SORT_ASCENDING);
+static void
+pdm_dialog_fill_passwords_list (PdmActionInfo *info)
+{
+  gnome_keyring_list_item_ids (GNOME_KEYRING_DEFAULT,
+   pdm_dialog_fill_passwords_list_async_cb,
+   info,
+   NULL);
 }
 
 static void
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


[epiphany/gnome-keyring: 5/8] Make password loading/showing asynchronous.

2009-07-29 Thread Priit Laes
commit b038a8f52103010f47d4ec74236af9af83f6d5b2
Author: Priit Laes 
Date:   Mon Jul 27 22:45:03 2009 +0300

Make password loading/showing asynchronous.

Signed-off-by: Priit Laes 

 src/pdm-dialog.c |  109 +++--
 1 files changed, 72 insertions(+), 37 deletions(-)
---
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index c4c28b1..20612b7 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -1137,38 +1137,68 @@ pdm_dialog_cookie_scroll_to (PdmActionInfo *info)
 
 /* "Passwords" tab */
 static void
+passwords_data_func_get_item_cb (GnomeKeyringResult result,
+ GnomeKeyringItemInfo *info,
+ gpointer data)
+{
+GtkTreeRowReference *rowref = (GtkTreeRowReference *)data;
+
+if (result == GNOME_KEYRING_RESULT_OK) {
+GtkTreeIter iter;
+GtkTreePath *path;
+GtkTreeModel *model;
+
+if (!gtk_tree_row_reference_valid (rowref))
+return;
+
+path = gtk_tree_row_reference_get_path (rowref);
+model = gtk_tree_row_reference_get_model (rowref);
+
+if (path != NULL && gtk_tree_model_get_iter (model, &iter, path)) {
+EphyPasswordInfo *epinfo;
+GValue val = {0, };
+
+gtk_tree_model_get_value (model, &iter, COL_PASSWORDS_DATA, &val);
+epinfo = g_value_get_boxed (&val);
+epinfo->secret = gnome_keyring_memory_strdup 
(gnome_keyring_item_info_get_secret (info));
+
+gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+COL_PASSWORDS_DATA, epinfo,
+COL_PASSWORDS_PASS, epinfo->secret, -1);
+g_value_unset (&val);
+}
+}
+}
+
+static void
 passwords_data_func (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell,
 GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
 {
-   EphyPasswordInfo *info;
-   GValue val = { 0, };
-
-   if (!gtk_tree_view_column_get_visible (tree_column))
-   return;
-
-   gtk_tree_model_get_value (model, iter, COL_PASSWORDS_DATA, &val);
-   info = g_value_get_boxed (&val);
-
-   /* get the password and store it */
-   if (info->secret == NULL) {
-   GnomeKeyringResult result;
-   GnomeKeyringItemInfo *kinfo;
-   result = gnome_keyring_item_get_info_full_sync (GNOME_KEYRING_DEFAULT,
-   info->keyring_id,
-   GNOME_KEYRING_ITEM_INFO_SECRET,
-   &kinfo);
-
-   /* FIXME: get_secret makes insecure copy... */
-   if (result == GNOME_KEYRING_RESULT_OK) {
-   info->secret = gnome_keyring_memory_strdup (
-   gnome_keyring_item_info_get_secret (kinfo));
-   gnome_keyring_item_info_free (kinfo);
-   }
-
-  /* eek, this will do a strdup in GtkCellRendererText... */
-  g_object_set (cell, "text", info->secret, NULL);
-  g_value_unset(&val);
-   }
+GValue val = { 0, };
+EphyPasswordInfo *info;
+
+if (!gtk_tree_view_column_get_visible (tree_column))
+return;
+
+gtk_tree_model_get_value (model, iter, COL_PASSWORDS_DATA, &val);
+info = g_value_get_boxed (&val);
+
+if (info->secret == NULL) {
+GtkTreePath *path;
+GtkTreeRowReference *rowref;
+
+path = gtk_tree_model_get_path (model, iter);
+rowref = gtk_tree_row_reference_new (model, path);
+
+gnome_keyring_item_get_info_full (GNOME_KEYRING_DEFAULT,
+  info->keyring_id,
+  GNOME_KEYRING_ITEM_INFO_SECRET,
+  
(GnomeKeyringOperationGetItemInfoCallback) passwords_data_func_get_item_cb,
+  rowref,
+  (GDestroyNotify) 
gtk_tree_row_reference_free);
+gtk_tree_path_free (path);
+}
+g_value_unset (&val);
 }
 
 static void
@@ -1251,15 +1281,20 @@ pdm_dialog_passwords_construct (PdmActionInfo *info)
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
gtk_tree_view_column_set_sort_column_id (column, COL_PASSWORDS_USER);
 
-/* Initially shown as hidden colum */
-gtk_tree_view_insert_column_with_data_func (treeview,
-COL_PASSWORDS_PASS,
-_("User Password"),
-renderer,
-passwords_data_func,
-info,
-NULL);
+   renderer = gtk_cell_renderer_text_new ();
+   gtk_tree_view_insert_column_with_attributes (treeview,
+COL_PASSWORDS_PASS,
+_("User Password"

[epiphany/gnome-keyring: 6/8] Make clear all functionality asynchronous.

2009-07-29 Thread Priit Laes
commit 1b6928f879c7d17b0092293d047ff856ed54d4e9
Author: Priit Laes 
Date:   Tue Jul 28 13:21:46 2009 +0300

Make clear all functionality asynchronous.

Signed-off-by: Priit Laes 

 src/pdm-dialog.c |   75 ++---
 1 files changed, 54 insertions(+), 21 deletions(-)
---
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index 20612b7..575aab9 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -216,6 +216,58 @@ clear_all_cookies (SoupCookieJar *jar)
 }
 
 static void
+clear_all_passwords_async_cb (GnomeKeyringResult result,
+  gpointer data)
+{
+GtkTreeRowReference *rowref = (GtkTreeRowReference *)data;
+
+if (result == GNOME_KEYRING_RESULT_OK) {
+GtkTreeIter iter;
+GtkTreePath *path;
+GtkTreeModel *model;
+
+if (!gtk_tree_row_reference_valid (rowref))
+return;
+
+path = gtk_tree_row_reference_get_path (rowref);
+model = gtk_tree_row_reference_get_model (rowref);
+
+if (path != NULL && gtk_tree_model_get_iter (model, &iter, path)) {
+/* FIXME! Do we have to drop the data too? */
+gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+
+gtk_tree_path_free (path);
+}
+}
+}
+
+static gboolean
+clear_all_passwords (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+GtkTreeRowReference *row;
+EphyPasswordInfo *info;
+GValue val = { 0, };
+
+row = gtk_tree_row_reference_new (model, path);
+
+gtk_tree_model_get_value (model, iter,
+  COL_PASSWORDS_DATA, &val);
+info = g_value_get_boxed (&val);
+
+gnome_keyring_item_delete (GNOME_KEYRING_DEFAULT,
+   info->keyring_id,
+   (GnomeKeyringOperationDoneCallback) 
clear_all_passwords_async_cb,
+   row,
+   (GDestroyNotify) gtk_tree_row_reference_free);
+g_value_unset (&val);
+
+return FALSE;
+}
+
+static void
 clear_all_dialog_response_cb (GtkDialog *dialog,
int response,
PdmClearAllDialogButtons *checkbuttons)
@@ -254,27 +306,8 @@ clear_all_dialog_response_cb (GtkDialog *dialog,
{
PdmDialog *pdialog = EPHY_PDM_DIALOG 
(checkbuttons->dialog);
PdmActionInfo *pinfo = pdialog->priv->passwords;
-   GtkTreeModel *model = pinfo->model;
-   GtkTreeIter iter;
-   gboolean valid;
-
-   valid = gtk_tree_model_get_iter_first (model, &iter);
-
-   while (valid) {
-   GValue val = { 0, };
-   gboolean result;
-
-   gtk_tree_model_get_value (model, &iter,
-   COL_PASSWORDS_DATA, &val);
-   result = pdm_dialog_password_remove(pinfo,
-   g_value_get_boxed (&val));
-   g_value_unset (&val);
-
-   if (result)
-   valid = gtk_list_store_remove 
(GTK_LIST_STORE (model), &iter);
-   else
-   valid = gtk_tree_model_iter_next 
(model, &iter);
-   }
+
+gtk_tree_model_foreach (pinfo->model, (GtkTreeModelForeachFunc) 
clear_all_passwords, NULL);
}
if (gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON 
(checkbuttons->checkbutton_cache)))
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


[epiphany/gnome-keyring: 7/8] Password removal is now async :)

2009-07-29 Thread Priit Laes
commit 96578904dc51d640f2e898535fb61e2757889bd1
Author: Priit Laes 
Date:   Tue Jul 28 21:59:19 2009 +0300

Password removal is now async :)

Signed-off-by: Priit Laes 

 src/pdm-dialog.c |  104 --
 1 files changed, 62 insertions(+), 42 deletions(-)
---
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index 575aab9..cb88499 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -57,7 +57,7 @@ struct PdmActionInfo
void (* fill)   (PdmActionInfo *info);
void (* add)(PdmActionInfo *info,
 gpointer data);
-   gboolean (* remove) (PdmActionInfo *info,
+   void (* remove) (PdmActionInfo *info,
 gpointer data);
void (* scroll_to)  (PdmActionInfo *info);
 
@@ -141,7 +141,7 @@ EphyDialogProperty properties [] =
 static void pdm_dialog_class_init  (PdmDialogClass *klass);
 static void pdm_dialog_init(PdmDialog *dialog);
 static void pdm_dialog_finalize(GObject *object);
-static gboolean pdm_dialog_password_remove (PdmActionInfo *info, gpointer 
data);
+static void pdm_dialog_password_remove (PdmActionInfo *info, gpointer data);
 
 G_DEFINE_TYPE (PdmDialog, pdm_dialog, EPHY_TYPE_DIALOG)
 
@@ -216,8 +216,8 @@ clear_all_cookies (SoupCookieJar *jar)
 }
 
 static void
-clear_all_passwords_async_cb (GnomeKeyringResult result,
-  gpointer data)
+pdm_dialog_password_remove_cb (GnomeKeyringResult result,
+   gpointer data)
 {
 GtkTreeRowReference *rowref = (GtkTreeRowReference *)data;
 
@@ -259,11 +259,10 @@ clear_all_passwords (GtkTreeModel *model,
 
 gnome_keyring_item_delete (GNOME_KEYRING_DEFAULT,
info->keyring_id,
-   (GnomeKeyringOperationDoneCallback) 
clear_all_passwords_async_cb,
+   (GnomeKeyringOperationDoneCallback) 
pdm_dialog_password_remove_cb,
row,
(GDestroyNotify) gtk_tree_row_reference_free);
 g_value_unset (&val);
-
 return FALSE;
 }
 
@@ -542,30 +541,8 @@ pdm_cmd_delete_selection (PdmActionInfo *action)
gtk_tree_path_free (path);
 
/* Removal */
-
for (r = rlist; r != NULL; r = r->next)
-   {
-   GValue val = { 0, };
-   gboolean remove;
-
-   path = gtk_tree_row_reference_get_path
-   ((GtkTreeRowReference *)r->data);
-
-   gtk_tree_model_get_iter (model, &iter, path);
-   gtk_tree_model_get_value (model, &iter, action->data_col, &val);
-   remove = action->remove (action, g_value_get_boxed (&val));
-   g_value_unset (&val);
-
-/*
- * Remove the item:
- * cookies are deleted using callback, passwords right here
- */
-   if (remove)
-   gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
-
-   gtk_tree_row_reference_free ((GtkTreeRowReference *)r->data);
-   gtk_tree_path_free (path);
-   }
+action->remove (action, (GtkTreeRowReference *)r->data);
 
g_list_foreach (llist, (GFunc)gtk_tree_path_free, NULL);
g_list_free (llist);
@@ -1132,17 +1109,39 @@ pdm_dialog_cookie_add (PdmActionInfo *info,
g_value_unset (&value[3]);
 }
 
-static gboolean
+static void
 pdm_dialog_cookie_remove (PdmActionInfo *info,
  gpointer data)
 {
-   SoupCookie *cookie = (SoupCookie *) data;
-   SoupCookieJar *jar;
+GtkTreeRowReference *rowref = (GtkTreeRowReference *)data;
 
-   jar = get_cookie_jar();
+if (gtk_tree_row_reference_valid (rowref)) {
+GtkTreeIter iter;
+GtkTreePath *path;
+GtkTreeModel *model;
 
-   soup_cookie_jar_delete_cookie (jar, cookie);
-return FALSE;
+path = gtk_tree_row_reference_get_path (rowref);
+model = gtk_tree_row_reference_get_model (rowref);
+
+if (path != NULL && gtk_tree_model_get_iter (model, &iter, path)) {
+SoupCookie *cookie;
+SoupCookieJar *jar;
+GValue val = { 0, };
+
+gtk_tree_model_get_value (model, &iter, COL_PASSWORDS_DATA, &val);
+
+cookie = (SoupCookie *) g_value_get_boxed (&val);
+
+g_value_unset (&val);
+
+jar = get_cookie_jar();
+soup_cookie_jar_delete_cookie (jar, cookie);
+
+gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+gtk_tree_path_free (path);
+}
+gtk_tree_row_reference_free (rowref);
+}
 }
 
 static void
@@ -1449,16 +1448,37 @@ out:
return;
 }
 
-static gboolean
+static void
 pd

[epiphany/gnome-keyring: 8/8] Password adding is fully async now.

2009-07-29 Thread Priit Laes
commit 93fab0de6f83b5980d8145c60b0014e3ee59214e
Author: Priit Laes 
Date:   Wed Jul 29 11:23:41 2009 +0300

Password adding is fully async now.

Signed-off-by: Priit Laes 

 src/pdm-dialog.c |  145 +++---
 1 files changed, 83 insertions(+), 62 deletions(-)
---
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index cb88499..963b3a7 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -72,6 +72,13 @@ struct PdmActionInfo
gboolean filled;
 };
 
+typedef struct PdmCallBackData PdmCallBackData;
+struct PdmCallBackData
+{
+guint key;
+GtkListStore *store;
+};
+
 #define EPHY_PDM_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE 
((object), EPHY_TYPE_PDM_DIALOG, PdmDialogPrivate))
 
 struct PdmDialogPrivate
@@ -1371,20 +1378,77 @@ pdm_dialog_passwords_destruct (PdmActionInfo *info)
 }
 
 static void
-pdm_dialog_password_add (PdmActionInfo *info,
-gpointer data)
+pdm_dialog_password_add_item_attrs_cb (GnomeKeyringResult result,
+   GnomeKeyringAttributeList *attributes,
+   gpointer data)
 {
-GnomeKeyringResult result;
-GnomeKeyringItemInfo *kinfo;
+EphyPasswordInfo *pinfo;
+PdmCallBackData *cbdata;
 GnomeKeyringAttribute *attribute;
-GnomeKeyringAttributeList *attributes;
 gchar *user, *host, *protocol;
-EphyPasswordInfo *pinfo;
-   GtkListStore *store;
-   GtkTreeIter iter;
-guint key_id = GPOINTER_TO_UINT(data);
+GtkTreeIter iter;
 int i;
 
+if (result != GNOME_KEYRING_RESULT_OK)
+return;
+
+cbdata = (PdmCallBackData *)data;
+
+user = host = protocol = NULL;
+attribute = (GnomeKeyringAttribute *) attributes->data;
+for (i = 0; i < attributes->len; ++i) {
+if (attribute[i].type == GNOME_KEYRING_ATTRIBUTE_TYPE_STRING) {
+if (strcmp (attribute[i].name, "server") == 0)
+host = g_strdup (attribute[i].value.string);
+else if (strcmp (attribute[i].name, "user") == 0)
+user = g_strdup (attribute[i].value.string);
+else if (strcmp (attribute[i].name, "protocol") == 0)
+protocol = attribute[i].value.string;
+   }
+}
+if (!protocol || strncmp("http", protocol, 4) != 0)
+return;
+
+pinfo = ephy_password_info_new (cbdata->key);
+if (!pinfo)
+return;
+
+gtk_list_store_append (cbdata->store, &iter);
+gtk_list_store_set (cbdata->store, &iter,
+COL_PASSWORDS_HOST, host,
+COL_PASSWORDS_USER, user,
+COL_PASSWORDS_PASS, NULL,
+COL_PASSWORDS_DATA, pinfo,
+-1);
+}
+
+static void
+pdm_dialog_password_add_item_info_cb (GnomeKeyringResult result,
+  GnomeKeyringItemInfo *info,
+  gpointer data)
+{
+if (result != GNOME_KEYRING_RESULT_OK)
+return;
+
+if (gnome_keyring_item_info_get_type (info) == 
GNOME_KEYRING_ITEM_NETWORK_PASSWORD) {
+PdmCallBackData *cbdata = (PdmCallBackData *)data;
+gnome_keyring_item_get_attributes (GNOME_KEYRING_DEFAULT,
+   cbdata->key,
+   
(GnomeKeyringOperationGetAttributesCallback) 
pdm_dialog_password_add_item_attrs_cb,
+   g_memdup (cbdata, sizeof 
(PdmCallBackData)),
+   (GDestroyNotify) g_free);
+
+}
+
+}
+
+static void
+pdm_dialog_password_add (PdmActionInfo *info,
+ gpointer data)
+{
+PdmCallBackData *cbdata;
+guint key_id = GPOINTER_TO_UINT(data);
+
 /*
  * We have the item id of the password. We will have to check if this
  * password entry is of the right type and then can proceed to get the
@@ -1392,60 +1456,17 @@ pdm_dialog_password_add (PdmActionInfo *info,
  * starts with http as Web Access and we will do the same here.
  */
 
+cbdata = g_malloc (sizeof(PdmCallBackData *));
+cbdata->key = key_id;
+cbdata->store = GTK_LIST_STORE (info->model);
+
 /* Get the type of the key_id */
-result = gnome_keyring_item_get_info_full_sync (GNOME_KEYRING_DEFAULT,
-   key_id,
-   
GNOME_KEYRING_ITEM_INFO_BASICS,
-   &kinfo);
-
-   if (result != GNOME_KEYRING_RESULT_OK)
-   goto out;
-
-   if (gnome_keyring_item_info_get_type (kinfo) != 
GNOME_KEYRING_ITEM_NETWORK_PASSWORD)
-   goto out_info_free;
-
-   /* Get the attributes to check protocol

Re: [epiphany] (8 commits) Created branch gnome-keyring

2009-07-29 Thread Priit Laes
Ühel kenal päeval, K, 2009-07-29 kell 10:30, kirjutas Priit Laes:
> The branch 'gnome-keyring' was created.
> 
> Summary of new commits:
> 
>   23228a2... Move Epiphany to solely use GnomeKeyring for password manag
>   b16eeff... Set password column initially as hidden.
>   9b9dd3d... Use correct column from store for deletion.
>   d686fe2... Make pdm_dialog_fill_passwords_list asynchronous.
>   b038a8f... Make password loading/showing asynchronous.
>   1b6928f... Make clear all functionality asynchronous.
>   9657890... Password removal is now async :)
>   93fab0d... Password adding is fully async now.
> ___

Hum.. any ideas why git sent this here?
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Damned lies and external workflow

2010-02-10 Thread Priit Laes
Hi!

Would it be possible to disable uploads for language teams and instead
show a notification saying "This team is using external
application/workflow for translating GNOME. See blablabla for details.".

This is the case at least for Estonian language, where our translators
have "internal" SVN accounts for translations and reviews. Now the
problem is that there are sometimes new users popping up who translate
something and upload it to l10n.gnome.org (where it might be missed) :S

Cheers,
Priit Laes
Estonian Team Coordinator
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Gthumb has gthumb-2-10 branch under gnome-extras

2010-02-18 Thread Priit Laes
Hey!

I don't know whether this is an oversight, but when selecting
gnome-extras, gthumb's branch has been set as gthumb-2-10.

There's been a lot of work going on in master branch for a while, so I
guess it would be nice to change it back to master.

Cheers,
Priit Laes
Estonian l10n Team ;)
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


GNOME HEAD

2006-03-23 Thread Priit Laes
Hey,

As the next GNOME release is only 5 months and 3 weeks away and lots of
programs have branched to continue development in HEAD, could the status
pages' HEAD branch also display statistics for 'desktop' and
'developer-libs' groups.
This makes keeping HEAD modules at 100% during the development a bit
more easier.

PS. Are there any plans to incorporate the doc statistics with the
current i18n-stats page?

Thank you :)

Priit

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Question to Gnome Arabic translation team

2006-09-04 Thread Priit Laes
Ühel kenal päeval, E, 2006-09-04 kell 12:03, kirjutas Ilkka Tuohela:
> 
> Hi, 
> 
> I'm working in Saudi Arabia and I'd like to know if there are any
> dictionaries collected from
> gnome Arabic translations? My own team (I'm Finnish translation team
> leader) has a list
> of common translations and I guess Arabic team has one as well? 
> 
> My work is not related to gnome, I'm currently working on a RSS feed
> system for local
> universities and we'd like to have the dictionary to help translation
> of English articles
> to Arabic. 

There's an English-Arabic dictionary which is based on the wordlist of
the Arabeyes.org (The Arabic Unix project):

http://www.tps.edu.ee/nastik/ar-en/


--
Priit

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Status pages broken for deskbar-applet

2006-10-03 Thread Priit Laes
Hey all,

Both l10n-status and i18n-status have problems with deskbar-applet
stats.

Could we also see 2.18 stats too? :)

Cheers,
Priit

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: RFC: going to add 2.18 branch

2006-10-06 Thread Priit Laes
Ühel kenal päeval, K, 2006-10-04 kell 23:42, kirjutas Wouter Bolsterlee:
> 2006-10-04 klockan 21:10 skrev Abel Cheung:
> > On 10/5/06, Wouter Bolsterlee <[EMAIL PROTECTED]> wrote:
> > > > I have done the necessary changes to switch to 2.18 release and
> > > > drop 2.14 branch data form status pages. It's ready for commit.
> > > > If anyway still like 2.14 to be there, please shout aloud, otherwise
> > > > I'll go ahead and commit the change (and pray).
> > > 
> > It's hard to draw the line here.

Can't we have both 2.18 and 2.14? If the problem is the amount of
time/power what it takes to generate the statistics - generation
frequency could be decreased for 2.14 series (once a few days or even a
week).

Keeping things near 100% is easier for me rather than discovering next
to string freeze that I have lots of modules near 50%.

PS. Sorry, Wouter, my bad that you were the only one to receive this letter ;)

Cheers,
Priit

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: String change in seahorse

2006-12-21 Thread Priit Laes
Ühel kenal päeval, R, 2006-12-22 kell 04:03, kirjutas Nate Nielsen:
> A new translatable string was added in the seahorse module at:
> 
>   agent/seahorse-agent-main.c line 240
This isn't helpful at all ;)
Could you next time please add the string instead of the line number...
(or both)

--
Priit Laes

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Migration to subversion

2007-01-01 Thread Priit Laes
Ühel kenal päeval, E, 2007-01-01 kell 13:13, kirjutas Raphael Higino:
> On 1/1/07, Pema Geyleg <[EMAIL PROTECTED]> wrote:
> > We had CVS commit access for the translation work and now am not sure 
> > whether
> > we can commit our updates on svn with the same account or not.
> 
> Just to confirm, I guess our mail aliases have also changed to
> [EMAIL PROTECTED], right?
> 
Yes, at least worked for me.

--
Priit Laes
plaes.org

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Progress pages not updating, and when 100% isn't

2007-01-06 Thread Priit Laes
Ühel kenal päeval, L, 2007-01-06 kell 16:10, kirjutas Yair Hershkovitz:
> 
> Hi,
> 
> How about adding the date and time of the last update, as it was in
> the old pages.
> 
> Another problem i see, is that files which were never translated have
> broken links.

Yeah, previously when we had a 0% module we could easily download POT
file for translations.
(I will also call this one a missing killer feature) ;)

Cheers,
Priit

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Maintaining translations

2007-01-06 Thread Priit Laes
Hey guys/gals,

As we were all quite happy to finally ditch the "good old CVS" and move
on to "shiny new SVN" which supports offline diffing, atomic commits and
cheap branching/tagging, there is also one it doesn't support - the
missing feature called "checking out a single file". 

As you may think that it is not that big of a miss, then let me explain
it to you. With CVS one could easily just do this to update a
translation:
 * Check out the translations from GNOME CVS 
   cvs co -d:...gnome../cvs/gnome co project/po/et.po
   cvs co -d:...gnome../cvs/gnome co project/po/ChangeLog
 * Replace et.po with updated translation
 * Add comment to ChangeLog
 * Upload it:
   cvs commit project/po/et.po project/po/ChangeLog

All this worked fine and was relatively fast and even scriptable (yes, I
actually used a tool for that).

Now as SVN doesn't support it, we have to checkout whole po directories
and keep them around because these directories are quite big, for
example - today I checked out evolution's po files and its size is 96
megabytes. And we also have the branching stuff to take care of - mostly
only a second version (that's for my project).

I have been thinking of a some kind of web service that language
maintainers could use for submitting po-files (well, at least for
official GNOME modules) to SVN and it could basically be an upload form
where you can choose the module and branch then write the commit message
and finally hit the submit button ;)

The other variant would be implementing some extra mapping layer on top
of SVN, which would translate local gnome-2.18/module.po to external
module/path/language.po file.

So, maintainers - I want to hear your opinions and of course - please
tell me about your best practices of managing translations in GNOME
SVN ;)

Cheers,
Priit


PS. I know I may just sound as one very lazy bastard. In fast I actually
am one, but as my job as a maintainer has become a whole lot harder to
do, I may eventually quit it. :(

--
Priit Laes
http://plaes.org

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Old status pages

2007-01-23 Thread Priit Laes
Hello,

Could someone kill/redirect following subdomains on gnome.org:
http://l10n-status.gnome.org/ 
http://i18n-status.gnome.org/

Apparently the stats are based (?) on the readonly CVS and still updated
every day, giving a false impression of what's going on.

Thanks,
Priit ;)

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: [EMAIL PROTECTED] gtk+ translation

2007-03-05 Thread Priit Laes
Ühel kenal päeval, E, 2007-03-05 kell 12:49, kirjutas Ihar Hrachyshka:
> Hello!
> Our l10n team swears to commit the missing gtk+-properties translation
> until 10th of March, so, please, don't remove our translations.
> Thanks in advance!
Could you at least upload an empty po file (just add fix the header)

Keeping tree unbuildable for 5 days is not a very good solution...

Cheers,
Priit :)

___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: New strings in the panel

2008-02-10 Thread Priit Laes

Ühel kenal päeval, P, 2008-02-10 kell 20:46, kirjutas Djihed Afifi:
> %1$s: %2$s
> 
> Why the positioning?

Probably for RTL languages ;)

Cheers,
Priit ;)
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: New strings in the panel

2008-02-11 Thread Priit Laes

Ühel kenal päeval, E, 2008-02-11 kell 07:47, kirjutas Djihed Afifi:
 <في ن، 11-02-2008 عند 01:12 +0100 ، كتب Vincent Untz:
> > Le dimanche 10 février 2008, à 23:04 +, Djihed Afifi a écrit :
> > > Hi Vincent,
> > > 
> > > 
> > > If the reason this is included is RTL languages, the right fix is for
> > > RTL languages to introduce an RLM character, not to swap the variables.
> > 
> > Why would it be only for RTL languages? There might be some languages
> > that want the two strings in another order without those languages being
> > RTL.

Actually it was just a bad-sad joke.. ;)

Sorry,
Priit :)
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Wrong stats for gnome-panel?

2008-02-24 Thread Priit Laes

Ühel kenal päeval, P, 2008-02-24 kell 20:24, kirjutas Ihar Hrachyshka:
> If I go to http://l10n.gnome.org/languages/[EMAIL PROTECTED]/gnome-2-22 I can
> see that gnome-panel module is not fully translated. But if I
> intltool-update it from SVN, then [EMAIL PROTECTED] file is fully translated.
> What could cause the problem?

You probable have an older intltool than 0.37.0 which doesn't
handle .policy files.

And why do you have to run intltool-update when you can download the
latest generated files from l10n.gnome.org itself.

Priit
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: translations in cheese

2008-03-12 Thread Priit Laes
Ühel kenal päeval, K, 2008-03-12 kell 01:07, kirjutas daniel g. siegel:
> me branched cheese yesterday. some hours ago, the first new translations
> came in:
> 
> spanish and estonian. one went into branches/gnome-2-22, one into trunk/
> im quite sure, that one of those two was commited to the wrong place.
> now i am wondering: are you just translating branches and doing the
> trunk translations afterwards or what?
> 

We just changed the "Project-Id-Version" for the file. Otherwise trunk
and branch are identical and at 100% :)

Priit :)
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Patch to get rid of contractions in Nautilus strings

2008-03-29 Thread Priit Laes
Ühel kenal päeval, L, 2008-03-29 kell 19:48, kirjutas Kenneth Nielsen:
> On the other hand, fixing fuzzy strings is easy if the translator
> knows that the only thing that has changed is that a contraction has
> been removed. How about it if they also add a translator comment
> stating "Removed contraction from this string" so that if a translator
> updates it now, it can be done very fast?
This is a bad idea, because it would be just another useless comment in
the source code. 
As Gettext will mark the string as fuzzy anyway for ~90% of the changes,
for translator it would be just removing the fuzzy line or unmarking the
fuzzy checkbox if using some spiffy editor.

--
Priit ;)
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Maintanership transfer for Estonian team

2018-02-07 Thread Priit Laes
Dear Fellow l10n/i18n-izers!

I would like pass on my coordinator/maintainer responsibilities for the 
Estonian translation effort to Mart Raudsepp.

Mart has been already been involved with GNOME project for years, and he 
already has commit access.

Also, worth mentioning that Estonian team was not using Damned Lies (instead we 
used mailinglist based reviews), but it's up to Mart to figure out the new 
process ;)

Thanks,
Priit :)
___
gnome-i18n mailing list
gnome-i18n@gnome.org
https://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: Missing translations in HTML output of the release notes

2005-03-07 Thread Priit Laes
On E, 2005-03-07 at 08:55 +0100, Vincent Untz wrote:
> Hi,
> 
> When creating the HTML files from the translated XML using db2html.xsl,
> the links to previous and next sections at the bottom of the pages are
> not translated (they still are "Previous" and "Next"). Is there any way
> to have them translated or shall we change db2html.xsl?
This is caused by the docbook language selection (or these strings come
straight from the docbook stylesheets). In release-notes.xml notice the
following line:
http://www.w3.org/2001/XInclude";>

The value of the lang property should be changed to the localized
language.
> See for example:
> http://www.gnome.org/~vuntz/2.10rnotes/
> 
> Vincent

-- 
Priit Laes 
http://amd.store20.com


signature.asc
Description: See on =?ISO-8859-1?Q?s=F5numi?= digitaalselt	allkirjastatud osa
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


l10n-status website suggestions

2005-05-04 Thread Priit Laes
Hello,

I couldn't find a suitable module in bugzilla for this, so I decided to
send my suggestions to the list:

1) Front page should say, when and how often the site is updated. It's 
also outdated, mumbling something about the about and contact pages :P
2) Timezone information should be displayed in the "last updated" dates.
3) Page should have header and footer like other Gnome related sites.
4) HTML4 -> xhtml + css 

And.. I haven't find the source for this stuff... :(
-- 
Priit Laes 
http://amd.store20.com/blog/


signature.asc
Description: This is a digitally signed message part
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


l10n-status website suggestions

2005-05-04 Thread Priit Laes
Hello,

I couldn't find a suitable module in bugzilla for this, so I decided to
send my suggestions to the list:

1) Front page should say, when and how often the site is updated.
2) Timezone information should be displayed in the "last updated" dates.
3) Page should have header and footer like other Gnome related sites.
4) HTML4 -> xhtml + css 

And.. I haven't find the source for this stuff... :(
-- 
Priit Laes 
http://amd.store20.com/blog/


signature.asc
Description: This is a digitally signed message part
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n


Re: gnome-menu-editor release imminent

2005-05-06 Thread Priit Laes
Ãhel kenal pÃeval, R, 2005-05-06 kell 16:34, kirjutas Clytie Siddall:
> On 06/05/2005, at 4:27 AM, Christian Neumair wrote:
> 
> > I'd like to release the next gnome-menu-editor version (0.3) on Sunday,
> > 2005-05-08. I'd appreciate translation updates, which are necessary due
> > to my recent commits.
> 
> My next cvs problem (sorry): there was no Vietnamese translation for 
> this file, so I copied one of the existing translations, changed its 
> filename, and edited the fields. cvs did not like this.
When there is no translation for the particular program, I usually take
the pot file from the http://l10n-status.gnome.org

Also there is usually no need to merge translations by hand (and
download the sources, and generate the pot file). The files in
translation stats pages have been already merged.
-- 
Priit Laes 
http://amd.store20.com/blog/


signature.asc
Description: This is a digitally signed message part
___
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n