[Xfce4-commits] Don't block sites with pinned certificates

2012-07-16 Thread Christian Dywan
Updating branch refs/heads/master
 to 05d58f82875b259b654ca12ddb1cc4d715f13cae (commit)
   from c096b46ff3eb522a756acede590e7573de7b89a4 (commit)

commit 05d58f82875b259b654ca12ddb1cc4d715f13cae
Author: Christian Dywan 
Date:   Tue Jul 17 01:34:17 2012 +0200

Don't block sites with pinned certificates

 midori/midori-view.c |   40 ++--
 1 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 234c907..4cbad7b 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -999,6 +999,9 @@ midori_view_display_error (MidoriView* view,
WebKitWebFrame* web_frame);
 
 #if HAVE_GCR
+#define GCR_API_SUBJECT_TO_CHANGE
+#include 
+
 const gchar*
 midori_location_action_tls_flags_to_string (GTlsCertificateFlags flags);
 
@@ -1061,17 +1064,34 @@ webkit_web_view_load_committed_cb (WebKitWebView*  
web_view,
 #if HAVE_GCR
 else if (!view->special && message != NULL)
 {
-GTlsCertificateFlags tls_flags;
+GTlsCertificate* tls_cert;
+GcrCertificate* gcr_cert;
+GByteArray* der_cert;
+SoupURI* soup_uri;
+
 message = midori_map_get_message (message);
-g_object_get (message, "tls-errors", &tls_flags, NULL);
-view->security = MIDORI_SECURITY_UNKNOWN;
-midori_view_stop_loading (view);
-midori_view_display_error (
-view, view->uri, view->title ? view->title : view->uri,
-_("Security unknown"),
-midori_location_action_tls_flags_to_string (tls_flags),
-_("Load Page"),
-NULL);
+g_object_get (message, "tls-certificate", &tls_cert, NULL);
+g_object_get (tls_cert, "certificate", &der_cert, NULL);
+gcr_cert = gcr_simple_certificate_new (der_cert->data, 
der_cert->len);
+g_byte_array_unref (der_cert);
+soup_uri = soup_message_get_uri (message);
+if (gcr_trust_is_certificate_pinned (gcr_cert, 
GCR_PURPOSE_SERVER_AUTH, soup_uri->host, NULL, NULL))
+view->security = MIDORI_SECURITY_TRUSTED;
+else
+{
+GTlsCertificateFlags tls_flags;
+view->security = MIDORI_SECURITY_UNKNOWN;
+g_object_get (message, "tls-errors", &tls_flags, NULL);
+midori_view_stop_loading (view);
+midori_view_display_error (
+view, view->uri, view->title ? view->title : view->uri,
+_("Security unknown"),
+midori_location_action_tls_flags_to_string (tls_flags),
+_("Load page"),
+NULL);
+}
+g_object_unref (tls_cert);
+g_object_unref (gcr_cert);
 }
 #endif
 else
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] TLS error in-page and Trust/ Revoke in details dialog

2012-07-16 Thread Christian Dywan
Updating branch refs/heads/master
 to c096b46ff3eb522a756acede590e7573de7b89a4 (commit)
   from 301bb89dd304d74daf7344df581e992304510802 (commit)

commit c096b46ff3eb522a756acede590e7573de7b89a4
Author: Christian Dywan 
Date:   Tue Jul 17 01:09:15 2012 +0200

TLS error in-page and Trust/ Revoke in details dialog

 midori/midori-locationaction.c |   88 ++--
 midori/midori-view.c   |   17 +++-
 2 files changed, 81 insertions(+), 24 deletions(-)

diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index 154b989..0bfea5b 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -1143,7 +1143,7 @@ midori_map_add_message (SoupMessage* message)
 g_hash_table_insert (message_map, g_strdup (uri->host), g_object_ref 
(message));
 }
 
-static SoupMessage*
+SoupMessage*
 midori_map_get_message (SoupMessage* message)
 {
 SoupURI* uri = soup_message_get_uri (message);
@@ -1154,9 +1154,60 @@ midori_map_get_message (SoupMessage* message)
 return full;
 }
 
+#if HAVE_GCR
+typedef enum {
+MIDORI_CERT_TRUST,
+MIDORI_CERT_REVOKE,
+} MidoriCertTrust;
+
+static void
+midori_location_action_cert_response_cb (GtkWidget*  dialog,
+ gintresponse,
+ GcrCertificate* gcr_cert)
+{
+gchar* peer = g_object_get_data (G_OBJECT (gcr_cert), "peer");
+GError* error = NULL;
+if (response == MIDORI_CERT_TRUST)
+gcr_trust_add_pinned_certificate (gcr_cert, GCR_PURPOSE_SERVER_AUTH, 
peer, NULL, &error);
+else if (response == MIDORI_CERT_REVOKE)
+gcr_trust_remove_pinned_certificate (gcr_cert, 
GCR_PURPOSE_SERVER_AUTH, peer, NULL, &error);
+if (error != NULL)
+{
+g_warning ("Error %s trust: %s", response == MIDORI_CERT_TRUST ?
+   "granting" : "revoking", error->message);
+g_error_free (error);
+}
+gtk_widget_destroy (dialog);
+}
+#endif
+
+const gchar*
+midori_location_action_tls_flags_to_string (GTlsCertificateFlags tls_flags)
+{
+const gchar* tls_error;
+if (tls_flags & G_TLS_CERTIFICATE_UNKNOWN_CA)
+tls_error = _("The signing certificate authority is not known.");
+else if (tls_flags & G_TLS_CERTIFICATE_BAD_IDENTITY)
+tls_error = _("The certificate does not match the expected identity of 
the site that it was retrieved from.");
+else if(tls_flags & G_TLS_CERTIFICATE_NOT_ACTIVATED)
+tls_error = _("The certificate's activation time is still in the 
future.");
+else if (tls_flags & G_TLS_CERTIFICATE_EXPIRED)
+tls_error = _("The certificate has expired");
+else if (tls_flags & G_TLS_CERTIFICATE_REVOKED)
+tls_error = _("The certificate has been revoked according to the 
GTlsConnection's certificate revocation list.");
+else if (tls_flags & G_TLS_CERTIFICATE_INSECURE)
+tls_error = _("The certificate's algorithm is considered insecure.");
+else if (tls_flags & G_TLS_CERTIFICATE_GENERIC_ERROR)
+tls_error = _("Some other error occurred validating the certificate.");
+else
+tls_error = "Unknown GTLSCertificateFlags value";
+return tls_error;
+}
+
 void
 midori_location_action_show_page_info (GtkWidget* widget,
-   GtkBox*box)
+   GtkBox*box,
+   GtkWidget* dialog)
 {
 MidoriBrowser* browser = midori_browser_get_for_widget (widget);
 MidoriView* view = MIDORI_VIEW (midori_browser_get_current_tab (browser));
@@ -1178,38 +1229,31 @@ midori_location_action_show_page_info (GtkWidget* 
widget,
 GByteArray* der_cert;
 GcrCertificate* gcr_cert;
 GtkWidget* details;
+SoupURI* uri = soup_message_get_uri (message);
 
 g_object_get (tls_cert, "certificate", &der_cert, NULL);
 gcr_cert = gcr_simple_certificate_new (
 der_cert->data, der_cert->len);
 g_byte_array_unref (der_cert);
-g_object_unref (tls_cert);
 details = (GtkWidget*)gcr_certificate_details_widget_new (gcr_cert);
 gtk_widget_show (details);
 gtk_container_add (GTK_CONTAINER (box), details);
+if (gcr_trust_is_certificate_pinned (gcr_cert, GCR_PURPOSE_SERVER_AUTH, 
uri->host, NULL, NULL))
+gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+("_Don't trust this website"), MIDORI_CERT_REVOKE, NULL);
+else if (tls_flags > 0)
+gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+("_Trust this website"), MIDORI_CERT_TRUST, NULL);
+g_object_set_data_full (G_OBJECT (gcr_cert), "peer", g_strdup (uri->host), 
(GDestroyNotify)g_free);
+g_object_set_data_full (G_OBJECT (dialog), "gcr-cert", gcr_cert, 
(GDestroyNotify)g_object_unref);
+g_signal_connect (dialog, "response",
+G_CALLBACK (midori_location_action_cert_response_cb), gcr_cert);
 #else
-const gchar* tls_error;
+con

[Xfce4-commits] Update AUTHORS, NEWS, README, TODO.

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to 5a00a49cd9756c820b3b37e0f9ec9fa9722e74d8 (commit)
   from 4948a9c09027e17a2ada8861f98491b96f4ee77f (commit)

commit 5a00a49cd9756c820b3b37e0f9ec9fa9722e74d8
Author: Harald Judt 
Date:   Tue Jul 17 00:02:32 2012 +0200

Update AUTHORS, NEWS, README, TODO.

 AUTHORS |1 +
 NEWS|   30 ++
 README  |   10 --
 TODO|   22 --
 4 files changed, 59 insertions(+), 4 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 0f87cfa..1b49c2d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,3 +3,4 @@ Jasper Huijsmans 
 Masse Nicolas 
 Nick Schermer 
 Colin Leroy 
+Harald Judt 
diff --git a/NEWS b/NEWS
index 7c7d452..dcdf911 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,33 @@
+0.8.0
+=
+- Migrate to libxfce4ui (bug #7956).
+- Better handling of vertical and deskbar modes (bug #8560).
+- Fix adjusting label text size to panel size.
+- Fix scrollbox scroll direction in vertical mode.
+- Major rewrite: Migrate to yr.no API instead of weather.com (bug #8105)
+  The plugin now uses data from the Norwegian Meteorological Institute,
+  which is a bit different now and forced a redesign of the summary
+  window and more logic for computing the values.
+  This rewrite means the hassle with the expiring license keys is finally
+  gone, and the plugin shouldn't stop working suddenly, as API changes
+  are announced quite some time before they become active.
+  Forecasts for up to 10 days are provided, depending on the location.
+  The location is defined by latitude and longitude, the actual name
+  is only used for presentation.
+- Fix wrong location search results (bug #8832).
+- Enlarge the search dialog. It's now capable of showing 10 or more
+  results instead of only 2 or 3.
+- Nice error message in summary window when no location was set or
+  when there's no data available.
+- Make left click toggle the forecast window (bug #8805)
+- Optimized update intervals (downloading data and presentation).
+  This should also fix update issues after suspend/resume.
+- Add move label up/down buttons to config dialog.
+- Add shortcuts to the widgets in the config dialog.
+- Add shortcuts for accessing the notebook pages in the forecast window.
+- Fix compilation warnings, possible null pointer errors, memory leaks,
+  hardcoded values, make more strings translatable.
+
 0.7.4
 =
 - Add location detection based on archive.xfce.org/geolocation.
diff --git a/README b/README
index 511737d..6f72e65 100644
--- a/README
+++ b/README
@@ -1,2 +1,8 @@
-XML information: 
-http://www.weather.com/documentation/xml/weather.dtd
\ No newline at end of file
+DOCUMENTATION
+==
+http://api.yr.no/weatherapi/documentation
+http://api.met.no/weatherapi/locationforecastlts/1.1/documentation
+
+Especially for information about the different types of data, please
+read the FAQ:
+http://api.yr.no/faq.html
diff --git a/TODO b/TODO
index 5570a59..b175955 100644
--- a/TODO
+++ b/TODO
@@ -1,2 +1,20 @@
-* Use the Xfce hvbox
-* Fix plugin when resuming from suspend (partly fixed)
+* Get sunrise/sunset times via webservice
+  - get rid of the hardcoded values
+* Fetch logo from website (code is still there)
+* More information in tooltip
+  - currently only location and description are shown
+  - could optionally replace scrollbox
+* Better tooltips in config dialog
+* Better organisation of options in config dialog
+  - it's already too large for netbooks
+* Apply options immediately, like in most xfce apps
+* Don't complain about proxy settings on closing the config
+  dialog when none are entered
+* Further reduce calls to download data
+  - maybe use data in XML to schedule downloads?
+* More details in forecast window
+  - maybe tooltips for each entry?
+  - somehow indicate amount of precipitation
+* Use the Xfce hvbox (maybe, need to check)
+* Use multiple lines in scrollbox
+* Use met.no RSS feed to warn in time about API changes
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Really fix all duplicate mnemonics in config dialog (bug #9121).

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to b6aa9ed936341c93887c44a348d9300524ed0117 (commit)
   from 672760ab85be351490ec786cadbd71cf438543d1 (commit)

commit b6aa9ed936341c93887c44a348d9300524ed0117
Author: Harald Judt 
Date:   Mon Jul 16 22:15:14 2012 +0200

Really fix all duplicate mnemonics in config dialog (bug #9121).

 panel-plugin/weather-config.c |   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index db55b86..e2109df 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -515,10 +515,12 @@ create_config_dialog (xfceweather_data *data,
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
   /* proxy */
-  label = gtk_label_new (_("Proxy server:"));
+  label = gtk_label_new_with_mnemonic (_("_Proxy server:"));
   dialog->txt_proxy_host = gtk_entry_new ();
+  gtk_label_set_mnemonic_widget(GTK_LABEL (label),
+GTK_WIDGET (dialog->txt_proxy_host));
   dialog->chk_proxy_use =
-gtk_check_button_new_with_mnemonic (_("_Use proxy server"));
+gtk_check_button_new_with_mnemonic (_("Use proxy _server"));
   dialog->chk_proxy_fromenv =
 gtk_check_button_new_with_mnemonic (_("Auto-detect from _environment"));
   dialog->txt_proxy_port = gtk_spin_button_new_with_range (0, 65536, 1);
@@ -611,7 +613,7 @@ create_config_dialog (xfceweather_data *data,
   renderer, "text", 0, NULL);
   gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->lst_xmloption), column);
 
-  button_add = gtk_button_new_with_mnemonic (_("A_dd"));
+  button_add = gtk_button_new_with_mnemonic (_("_Add"));
   image = gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON);
   gtk_button_set_image (GTK_BUTTON (button_add), image);
   gtk_size_group_add_widget (sg_buttons, button_add);
@@ -637,7 +639,7 @@ create_config_dialog (xfceweather_data *data,
   gtk_button_set_image (GTK_BUTTON (button_up), image);
   gtk_size_group_add_widget (sg_buttons, button_up);
 
-  button_down = gtk_button_new_with_mnemonic (_("Move D_own"));
+  button_down = gtk_button_new_with_mnemonic (_("Move _Down"));
   image = gtk_image_new_from_stock (GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_BUTTON);
   gtk_button_set_image (GTK_BUTTON (button_down), image);
   gtk_size_group_add_widget (sg_buttons, button_down);
@@ -675,7 +677,7 @@ create_config_dialog (xfceweather_data *data,
 G_CALLBACK (cb_downoption), dialog);
 
   dialog->chk_animate_transition =
-gtk_check_button_new_with_mnemonic (_("_Animate transitions between 
labels"));
+gtk_check_button_new_with_mnemonic (_("Animate _transitions between 
labels"));
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
 (dialog->chk_animate_transition), dialog->wd->animation_transitions);
   gtk_box_pack_start (GTK_BOX (vbox), dialog->chk_animate_transition, FALSE, 
FALSE, 0);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Properly capitalize button titles.

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to 2b795df772b2d5f9503d93fe46b6aeb8fd62e171 (commit)
   from 8fdc2754188718ac6a483f9251b4e46a6feb4dff (commit)

commit 2b795df772b2d5f9503d93fe46b6aeb8fd62e171
Author: Harald Judt 
Date:   Mon Jul 16 21:54:08 2012 +0200

Properly capitalize button titles.

 panel-plugin/weather-config.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 74cdada..db55b86 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -632,12 +632,12 @@ create_config_dialog (xfceweather_data *data,
   gtk_button_set_image (GTK_BUTTON (button_del), image);
   gtk_size_group_add_widget (sg_buttons, button_del);
 
-  button_up = gtk_button_new_with_mnemonic (_("Move _up"));
+  button_up = gtk_button_new_with_mnemonic (_("Move _Up"));
   image = gtk_image_new_from_stock (GTK_STOCK_GO_UP, GTK_ICON_SIZE_BUTTON);
   gtk_button_set_image (GTK_BUTTON (button_up), image);
   gtk_size_group_add_widget (sg_buttons, button_up);
 
-  button_down = gtk_button_new_with_mnemonic (_("Move d_own"));
+  button_down = gtk_button_new_with_mnemonic (_("Move D_own"));
   image = gtk_image_new_from_stock (GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_BUTTON);
   gtk_button_set_image (GTK_BUTTON (button_down), image);
   gtk_size_group_add_widget (sg_buttons, button_down);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Add move label up/down buttons to config dialog.

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to 8fdc2754188718ac6a483f9251b4e46a6feb4dff (commit)
   from 8df2d08b6818c3dd1cc8b8db57ebe3091c3d62e2 (commit)

commit 8fdc2754188718ac6a483f9251b4e46a6feb4dff
Author: Harald Judt 
Date:   Mon Jul 16 21:48:18 2012 +0200

Add move label up/down buttons to config dialog.

To prevent problems with duplicate mnemonics, do not generate
the buttons from stock.

 panel-plugin/weather-config.c |   84 +---
 1 files changed, 77 insertions(+), 7 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index d90853a..74cdada 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -89,8 +89,8 @@ cb_deloption (GtkWidget *widget,
   gpointer   data)
 {
   xfceweather_dialog *dialog = (xfceweather_dialog *) data;
+  GtkTreeSelection   *selection;
   GtkTreeIter iter;
-  GtkTreeSelection*selection;
 
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW 
(dialog->lst_xmloption));
 
@@ -103,6 +103,56 @@ cb_deloption (GtkWidget *widget,
 
 
 static gboolean
+cb_upoption (GtkWidget *widget,
+  gpointer   data)
+{
+  xfceweather_dialog *dialog = (xfceweather_dialog *) data;
+  GtkTreeSelection   *selection;
+  GtkTreeIter iter, prev;
+  GtkTreePath*path;
+
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW 
(dialog->lst_xmloption));
+
+  if (gtk_tree_selection_get_selected (selection, NULL, &iter))
+{
+  path = gtk_tree_model_get_path (GTK_TREE_MODEL (dialog->mdl_xmloption), 
&iter);
+  if (gtk_tree_path_prev (path))
+{
+  if (gtk_tree_model_get_iter (GTK_TREE_MODEL (dialog->mdl_xmloption), 
&prev, path))
+gtk_list_store_move_before (GTK_LIST_STORE 
(dialog->mdl_xmloption), &iter, &prev);
+
+  gtk_tree_path_free(path);
+}
+}
+
+  return FALSE;
+}
+
+
+
+static gboolean
+cb_downoption (GtkWidget *widget,
+   gpointer   data)
+{
+  xfceweather_dialog *dialog = (xfceweather_dialog *) data;
+  GtkTreeIter iter, next;
+  GtkTreeSelection*selection;
+
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW 
(dialog->lst_xmloption));
+
+  if (gtk_tree_selection_get_selected (selection, NULL, &iter))
+{
+  next = iter;
+  if (gtk_tree_model_iter_next (GTK_TREE_MODEL (dialog->mdl_xmloption), 
&next))
+gtk_list_store_move_after (GTK_LIST_STORE (dialog->mdl_xmloption), 
&iter, &next);
+}
+
+  return FALSE;
+}
+
+
+
+static gboolean
 cb_toggle (GtkWidget *widget,
gpointer   data)
 {
@@ -383,7 +433,8 @@ create_config_dialog (xfceweather_data *data,
 {
   xfceweather_dialog *dialog;
   GtkWidget  *vbox2, *vbox3, *hbox, *hbox2, *label,
- *button_add, *button_del, *image, *button, *scroll;
+ *button_add, *button_del, *button_up, *button_down,
+ *image, *button, *scroll;
   GtkSizeGroup   *sg, *sg_buttons;
   GtkTreeViewColumn  *column;
   GtkCellRenderer*renderer;
@@ -560,15 +611,15 @@ create_config_dialog (xfceweather_data *data,
   renderer, "text", 0, NULL);
   gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->lst_xmloption), column);
 
-  button_add = gtk_button_new_from_stock (GTK_STOCK_ADD);
+  button_add = gtk_button_new_with_mnemonic (_("A_dd"));
+  image = gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON);
+  gtk_button_set_image (GTK_BUTTON (button_add), image);
   gtk_size_group_add_widget (sg_buttons, button_add);
   hbox = gtk_hbox_new (FALSE, BORDER);
   gtk_box_pack_start (GTK_BOX (hbox), dialog->opt_xmloption, TRUE, TRUE, 0);
   gtk_box_pack_start (GTK_BOX (hbox), button_add, FALSE, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
-  button_del = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
-  gtk_size_group_add_widget (sg_buttons, button_del);
   hbox = gtk_hbox_new (FALSE, BORDER);
   scroll = gtk_scrolled_window_new (NULL, NULL);
   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
@@ -576,8 +627,25 @@ create_config_dialog (xfceweather_data *data,
   gtk_container_add (GTK_CONTAINER (scroll), dialog->lst_xmloption);
   gtk_box_pack_start (GTK_BOX (hbox), scroll, TRUE, TRUE, 0);
 
+  button_del = gtk_button_new_with_mnemonic (_("_Remove"));
+  image = gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_BUTTON);
+  gtk_button_set_image (GTK_BUTTON (button_del), image);
+  gtk_size_group_add_widget (sg_buttons, button_del);
+
+  button_up = gtk_button_new_with_mnemonic (_("Move _up"));
+  image = gtk_image_new_from_stock (GTK_STOCK_GO_UP, GTK_ICON_SIZE_BUTTON);
+  gtk_button_set_image (GTK_BUTTON (button_up), image);
+  gtk_size_group_add_widget (sg_buttons, button_up);
+
+  button_down = gtk_button_new_with_mnemonic (_("Move d_own"));
+  image = gtk_image_new_from_stock (GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_BUTTON);

[Xfce4-commits] Render certificate, optionally with GCR

2012-07-16 Thread Christian Dywan
Updating branch refs/heads/master
 to 301bb89dd304d74daf7344df581e992304510802 (commit)
   from 19f291d2be6f18dda3b50fca2e98bf3deec75025 (commit)

commit 301bb89dd304d74daf7344df581e992304510802
Author: Christian Dywan 
Date:   Mon Jul 16 21:21:31 2012 +0200

Render certificate, optionally with GCR

 midori/main.c  |   19 
 midori/midori-locationaction.c |   94 
 midori/wscript_build   |2 +-
 wscript|3 +
 4 files changed, 117 insertions(+), 1 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 11ffbb1..6a3e59a 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -880,6 +880,21 @@ soup_session_settings_notify_first_party_cb 
(MidoriWebSettings* settings,
 }
 #endif
 
+#if defined (HAVE_LIBSOUP_2_34_0)
+/* Implemented in MidoriLocationAction */
+void
+midori_map_add_message (SoupMessage* message);
+
+static void
+midori_soup_session_request_started_cb (SoupSession* session,
+SoupMessage* message,
+SoupSocket*  socket,
+gpointer user_data)
+{
+midori_map_add_message (message);
+}
+#endif
+
 static void
 midori_soup_session_settings_accept_language_cb (SoupSession*   session,
  SoupMessage*   msg,
@@ -1021,6 +1036,10 @@ midori_load_soup_session (gpointer settings)
 g_free (cache);
 #endif
 
+#if defined (HAVE_LIBSOUP_2_34_0)
+g_signal_connect (session, "request-started",
+G_CALLBACK (midori_soup_session_request_started_cb), session);
+#endif
 g_signal_connect (session, "request-queued",
 G_CALLBACK (midori_soup_session_settings_accept_language_cb), 
settings);
 
diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index a76b1d8..154b989 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -1126,6 +1126,97 @@ midori_location_action_focus_out_event_cb (GtkWidget*   
widget,
 return FALSE;
 }
 
+#if HAVE_GCR
+#define GCR_API_SUBJECT_TO_CHANGE
+#include 
+#endif
+
+#if defined (HAVE_LIBSOUP_2_34_0)
+static GHashTable* message_map = NULL;
+void
+midori_map_add_message (SoupMessage* message)
+{
+SoupURI* uri = soup_message_get_uri (message);
+if (message_map == NULL)
+message_map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, 
g_object_unref);
+g_return_if_fail (uri && uri->host);
+g_hash_table_insert (message_map, g_strdup (uri->host), g_object_ref 
(message));
+}
+
+static SoupMessage*
+midori_map_get_message (SoupMessage* message)
+{
+SoupURI* uri = soup_message_get_uri (message);
+SoupMessage* full;
+g_return_val_if_fail (uri && uri->host, message);
+full = g_hash_table_lookup (message_map, uri->host);
+g_return_val_if_fail (full, message);
+return full;
+}
+
+void
+midori_location_action_show_page_info (GtkWidget* widget,
+   GtkBox*box)
+{
+MidoriBrowser* browser = midori_browser_get_for_widget (widget);
+MidoriView* view = MIDORI_VIEW (midori_browser_get_current_tab (browser));
+WebKitWebView* web_view = WEBKIT_WEB_VIEW (midori_view_get_web_view 
(view));
+WebKitWebFrame* web_frame = webkit_web_view_get_main_frame (web_view);
+WebKitWebDataSource* source = webkit_web_frame_get_data_source (web_frame);
+WebKitNetworkRequest* request = webkit_web_data_source_get_request 
(source);
+SoupMessage* message = midori_map_get_message 
(webkit_network_request_get_message (request));
+GTlsCertificate* tls_cert;
+GTlsCertificateFlags tls_flags;
+
+g_return_if_fail (message);
+g_object_get (message, "tls-certificate", &tls_cert, "tls-errors", 
&tls_flags, NULL);
+
+if (tls_cert == NULL)
+return;
+
+#if HAVE_GCR
+GByteArray* der_cert;
+GcrCertificate* gcr_cert;
+GtkWidget* details;
+
+g_object_get (tls_cert, "certificate", &der_cert, NULL);
+gcr_cert = gcr_simple_certificate_new (
+der_cert->data, der_cert->len);
+g_byte_array_unref (der_cert);
+g_object_unref (tls_cert);
+details = (GtkWidget*)gcr_certificate_details_widget_new (gcr_cert);
+gtk_widget_show (details);
+gtk_container_add (GTK_CONTAINER (box), details);
+#else
+const gchar* tls_error;
+
+if (!g_tls_certificate_get_issuer (tls_cert))
+gtk_box_pack_start (box, gtk_label_new (_("Self-signed")), FALSE, 
FALSE, 0);
+
+if (tls_flags & G_TLS_CERTIFICATE_UNKNOWN_CA)
+tls_error = _("The signing certificate authority is not known.");
+else if (tls_flags & G_TLS_CERTIFICATE_BAD_IDENTITY)
+tls_error = _("The certificate does not match the expected identity of 
the site that it was retrieved from.");
+else if(tls_flags & G_TLS_CERTIFICATE_NOT_ACTIVATED)
+tls_error = _("The certificate's activation time

[Xfce4-commits] Re-introduce window flashing, except on Win32

2012-07-16 Thread Christian Dywan
Updating branch refs/heads/master
 to 19f291d2be6f18dda3b50fca2e98bf3deec75025 (commit)
   from ed2a7fea6f8be3945e63ab466410f3645d952a4b (commit)

commit 19f291d2be6f18dda3b50fca2e98bf3deec75025
Author: Christian Dywan 
Date:   Mon Jul 16 19:04:24 2012 +0200

Re-introduce window flashing, except on Win32

 midori/midori-browser.c |   25 +
 midori/midori-preferences.c |4 
 midori/midori-websettings.c |4 +---
 3 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index a74f825..b6c7563 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -1320,6 +1320,27 @@ midori_browser_view_copy_history (GtkWidget* view_to,
 }
 }
 
+static gboolean
+midori_browser_notify_new_tab_timeout_cb (MidoriBrowser *browser)
+{
+#ifndef G_OS_WIN32
+gtk_window_set_opacity (GTK_WINDOW (browser), 1);
+#endif
+return G_SOURCE_REMOVE;
+}
+
+static void
+midori_browser_notify_new_tab (MidoriBrowser* browser)
+{
+if (katze_object_get_boolean (browser->settings, 
"flash-window-on-new-bg-tabs"))
+{
+#ifndef G_OS_WIN32
+gtk_window_set_opacity (GTK_WINDOW (browser), 0.8);
+#endif
+g_timeout_add (100, (GSourceFunc) 
midori_browser_notify_new_tab_timeout_cb, browser);
+}
+}
+
 static void
 midori_view_new_tab_cb (GtkWidget* view,
 const gchar*   uri,
@@ -1332,6 +1353,8 @@ midori_view_new_tab_cb (GtkWidget* view,
 
 if (!background)
 midori_browser_set_current_page (browser, n);
+else
+midori_browser_notify_new_tab (browser);
 }
 
 static void
@@ -1368,6 +1391,8 @@ midori_view_new_view_cb (GtkWidget* view,
 if (where != MIDORI_NEW_VIEW_BACKGROUND)
 midori_browser_set_current_page (browser, n);
 }
+else
+midori_browser_notify_new_tab (browser);
 
 if (!user_initiated)
 {
diff --git a/midori/midori-preferences.c b/midori/midori-preferences.c
index c291995..bcb5122 100644
--- a/midori/midori-preferences.c
+++ b/midori/midori-preferences.c
@@ -397,6 +397,10 @@ midori_preferences_set_settings (MidoriPreferences* 
preferences,
 button = katze_property_proxy (settings, "enable-webgl", NULL);
 SPANNED_ADD (button);
 }
+#ifndef G_OS_WIN32
+button = katze_property_proxy (settings, "flash-window-on-new-bg-tabs", 
NULL);
+INDENTED_ADD (button);
+#endif
 
 FRAME_NEW (NULL);
 button = katze_property_label (settings, "preferred-languages");
diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
index 4862434..784f63a 100644
--- a/midori/midori-websettings.c
+++ b/midori/midori-websettings.c
@@ -842,9 +842,7 @@ midori_web_settings_class_init (MidoriWebSettingsClass* 
class)
 /**
  * MidoriWebSettings::flash-window-on-new-bg-tabs
  *
- * Doesn't do anything.
- *
- * Deprecated: 0.4.7
+ * Uses opacity to attract attention. Nothing on Windows.
  */
 g_object_class_install_property (gobject_class,
  PROP_FLASH_WINDOW_ON_BG_TABS,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Replace Print with Share with Granite

2012-07-16 Thread Christian Dywan
Updating branch refs/heads/master
 to ed2a7fea6f8be3945e63ab466410f3645d952a4b (commit)
   from 20d70d2ac79c5f8dc52cb9bf44bc3d848df94db9 (commit)

commit ed2a7fea6f8be3945e63ab466410f3645d952a4b
Author: Christian Dywan 
Date:   Mon Jul 16 01:00:17 2012 +0200

Replace Print with Share with Granite

Fixes: https://bugs.launchpad.net/midori/+bug/963903

 midori/midori-browser.c |   38 --
 1 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 0d011b2..a74f825 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -2665,8 +2665,36 @@ _action_print_activate (GtkAction* action,
 if (!gtk_widget_get_visible (GTK_WIDGET (browser)))
 return;
 
-if ((view = midori_browser_get_current_tab (browser)))
-midori_view_print (MIDORI_VIEW (view));
+if (!(view = midori_browser_get_current_tab (browser)))
+return;
+
+#if HAVE_GRANITE
+/* FIXME: Blacklist/ custom contract doesn't work
+gchar* blacklisted_contracts[] = { "print", NULL }; */
+/* FIXME: granite: should return GtkWidget* like GTK+ */
+GtkWidget* dialog = (GtkWidget*)granite_widgets_pop_over_new ();
+gchar* mime_type = katze_object_get_string (view, "mime-type");
+GtkWidget* content_area = gtk_dialog_get_content_area (GTK_DIALOG 
(dialog));
+/* FIXME: granite: should return GtkWidget* like GTK+ */
+gchar* filename = midori_view_save_source (MIDORI_VIEW (view), NULL, NULL);
+GtkWidget* contractor = (GtkWidget*)granite_widgets_contractor_view_new (
+filename, mime_type, 32, TRUE);
+/* granite_widgets_contractor_view_add_item 
(GRANITE_WIDGETS_CONTRACTOR_VIEW (
+contractor), _("_Print"), _("Send document to the printer"), 
"document-print",
+32, G_MAXINT, midori_view_print, view);
+granite_widgets_contractor_view_name_blacklist 
(GRANITE_WIDGETS_CONTRACTOR_VIEW (
+contractor), blacklisted_contracts, -1); */
+g_free (filename);
+g_free (mime_type);
+gtk_container_add (GTK_CONTAINER (content_area), contractor);
+gtk_widget_show (contractor);
+gtk_widget_show (dialog);
+if (gtk_widget_get_visible (browser->navigationbar))
+granite_widgets_pop_over_move_to_widget (
+GRANITE_WIDGETS_POP_OVER (dialog), browser->navigationbar, TRUE);
+#else
+midori_view_print (MIDORI_VIEW (view));
+#endif
 }
 
 static void
@@ -5489,9 +5517,15 @@ static const GtkActionEntry entries[] =
 { "WindowClose", NULL,
 N_("C_lose Window"), "w",
 NULL, G_CALLBACK (_action_window_close_activate) },
+#if HAVE_GRANITE
+{ "Print", "document-export",
+N_("_Share"), "p",
+NULL, G_CALLBACK (_action_print_activate) },
+#else
 { "Print", GTK_STOCK_PRINT,
 NULL, "p",
 N_("Print the current page"), G_CALLBACK (_action_print_activate) },
+#endif
 { "Quit", GTK_STOCK_QUIT,
 N_("Close a_ll Windows"), "q",
 NULL, G_CALLBACK (_action_quit_activate) },
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Update german translation file.

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to 8df2d08b6818c3dd1cc8b8db57ebe3091c3d62e2 (commit)
   from dc96a2c753fd556168680f48bf284315ee70b1c0 (commit)

commit 8df2d08b6818c3dd1cc8b8db57ebe3091c3d62e2
Author: Harald Judt 
Date:   Mon Jul 16 17:35:40 2012 +0200

Update german translation file.

Add proposals and mark them as fuzzy. Fix minor mistakes and
mnemonics.

 po/de.po |   25 ++---
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/po/de.po b/po/de.po
index f83ae19..f5f4b7c 100644
--- a/po/de.po
+++ b/po/de.po
@@ -10,8 +10,8 @@ msgstr ""
 "Project-Id-Version: xfce4-weather-plugin 0.6.0\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-07-16 16:54+0200\n"
-"PO-Revision-Date: 2012-07-15 11:23+0100\n"
-"Last-Translator: Raphael Groner \n"
+"PO-Revision-Date: 2012-07-16 17:23+0100\n"
+"Last-Translator: Harald Judt \n"
 "Language-Team: German \n"
 "Language: de\n"
 "MIME-Version: 1.0\n"
@@ -158,21 +158,24 @@ msgid "Detecting..."
 msgstr "Ermitteln…"
 
 #: ../panel-plugin/weather-config.c:402
+#, fuzzy
 msgid "System of _Measurement:"
-msgstr "_Maßeinheit:"
+msgstr "Einheiten_system:"
 
 #: ../panel-plugin/weather-config.c:407
+#, fuzzy
 msgid "Imperial"
-msgstr "Imperial"
+msgstr "Angloamerikanisch"
 
 #: ../panel-plugin/weather-config.c:409
+#, fuzzy
 msgid "Metric"
-msgstr "Metrisch"
+msgstr "International"
 
 #: ../panel-plugin/weather-config.c:422
 #, fuzzy
 msgid "L_ocation:"
-msgstr "Ortsangabe:"
+msgstr "_Ortsangabe:"
 
 #: ../panel-plugin/weather-config.c:454
 msgid "Chan_ge..."
@@ -189,7 +192,7 @@ msgstr "Proxy-Server ben_utzen"
 
 #: ../panel-plugin/weather-config.c:472
 msgid "Auto-detect from _environment"
-msgstr "Automatische Erkennung aus der Umg_ebung"
+msgstr "Automatische Er_kennung aus der Umgebung"
 
 #. number of days shown in forecast
 #: ../panel-plugin/weather-config.c:537
@@ -344,8 +347,8 @@ msgid ""
 "\tPoint data applies to:\n"
 "\t%s\n"
 msgstr ""
-"\tPunktdaten anwendbar auf:\n"
-"\t %s\n"
+"\tPunktdaten gültig für:\n"
+"\t%s\n"
 
 #: ../panel-plugin/weather-summary.c:293
 #, c-format
@@ -394,9 +397,9 @@ msgstr ""
 "Wind\n"
 
 #: ../panel-plugin/weather-summary.c:313
-#, c-format
+#, fuzzy, c-format
 msgid "\t%s: %s (%s on the Beaufort scale)\n"
-msgstr "\t%s: %s (%s in der Beaufortskala)\n"
+msgstr "\t%s: %s (%s auf der Beaufortskala)\n"
 
 #: ../panel-plugin/weather-summary.c:313
 msgid "Speed"
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix compilation warning due to a #define in the wrong place.

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to f44666af1ba7ea87e7b34072b403821194bd70df (commit)
   from 46fe74aec7fe45a331424d86aee411b087094382 (commit)

commit f44666af1ba7ea87e7b34072b403821194bd70df
Author: Harald Judt 
Date:   Mon Jul 16 16:20:22 2012 +0200

Fix compilation warning due to a #define in the wrong place.

Without going into nasty details, using #define _XOPEN_SOURCE only
works if it is put before all other #includes.

 panel-plugin/weather-parsers.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c
index 6136f32..a3c9911 100644
--- a/panel-plugin/weather-parsers.c
+++ b/panel-plugin/weather-parsers.c
@@ -15,13 +15,14 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#define _XOPEN_SOURCE
+
 #ifdef HAVE_CONFIG_H
 #include 
 #endif
 
 #include "weather-parsers.h"
 #include 
-#define _XOPEN_SOURCE
 #include 
 #include 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix some more compilation warnings.

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to 46fe74aec7fe45a331424d86aee411b087094382 (commit)
   from 1cb468a8da53cb08e5c2d2f317f25aac12d48cbd (commit)

commit 46fe74aec7fe45a331424d86aee411b087094382
Author: Harald Judt 
Date:   Mon Jul 16 16:13:22 2012 +0200

Fix some more compilation warnings.

 panel-plugin/weather-data.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c
index 5268534..f26d56a 100644
--- a/panel-plugin/weather-data.c
+++ b/panel-plugin/weather-data.c
@@ -64,11 +64,11 @@ get_data (xml_time *timeslice, unit_systems unit_system, 
datas type)
case TEMPERATURE:
val = g_ascii_strtod(loc->temperature_value, NULL);
if (unit_system == IMPERIAL
-   && (strcmp(loc->temperature_unit, "celcius") == 0
-   || strcmp(loc->temperature_unit, "celsius" == 
0)))
+   && (! strcmp(loc->temperature_unit, "celcius")
+   || ! strcmp(loc->temperature_unit, "celsius")))
val = val * 9.0 / 5.0 + 32.0;
else if (unit_system == METRIC
-&& strcmp(loc->temperature_unit, "fahrenheit") 
== 0)
+&& ! strcmp(loc->temperature_unit, 
"fahrenheit"))
val = (val - 32.0) * 5.0 / 9.0;
return g_strdup_printf ("%.1f", val);
case PRESSURE:
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix compilation warning about event box.

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to 1cb468a8da53cb08e5c2d2f317f25aac12d48cbd (commit)
   from 52be43e8112891df0a88bf43b5a4ea6c0028a365 (commit)

commit 1cb468a8da53cb08e5c2d2f317f25aac12d48cbd
Author: Harald Judt 
Date:   Mon Jul 16 16:08:04 2012 +0200

Fix compilation warning about event box.

 panel-plugin/weather-summary.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
index bf437cd..88e8999 100644
--- a/panel-plugin/weather-summary.c
+++ b/panel-plugin/weather-summary.c
@@ -573,7 +573,7 @@ create_forecast_tab (xfceweather_data *data, GtkWidget 
*window)
 else
 gtk_widget_set_size_request(GTK_WIDGET(scrolled), 700, height_max);
 ebox = gtk_event_box_new();
-gtk_event_box_set_visible_window(ebox, TRUE);
+gtk_event_box_set_visible_window(GTK_EVENT_BOX(ebox), TRUE);
 gtk_container_add(GTK_CONTAINER(ebox), GTK_WIDGET(scrolled));
 return ebox;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix wrong argument in make_forecast_data().

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to 52be43e8112891df0a88bf43b5a4ea6c0028a365 (commit)
   from 91afd25d3a91e1890686b7b9bf1aa0db38625372 (commit)

commit 52be43e8112891df0a88bf43b5a4ea6c0028a365
Author: Harald Judt 
Date:   Mon Jul 16 16:05:18 2012 +0200

Fix wrong argument in make_forecast_data().

Mistake introduced while renaming struct tm and time_t variables.

 panel-plugin/weather-data.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c
index ed99b0f..5268534 100644
--- a/panel-plugin/weather-data.c
+++ b/panel-plugin/weather-data.c
@@ -470,7 +470,7 @@ make_forecast_data(xml_weather *data, int day, daytime dt)
if (interval_data != NULL)
break;
end_t = time_calc_hour(end_tm, -1);
-   end_tm = *localtime(&end_tm);
+   end_tm = *localtime(&end_t);
}
if (interval_data == NULL)
return NULL;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Add label to size group in config dialog.

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to 91afd25d3a91e1890686b7b9bf1aa0db38625372 (commit)
   from a1cd2ccae937847fce078198449e152ddf366d19 (commit)

commit 91afd25d3a91e1890686b7b9bf1aa0db38625372
Author: Harald Judt 
Date:   Mon Jul 16 16:01:55 2012 +0200

Add label to size group in config dialog.

 panel-plugin/weather-config.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 2929292..d90853a 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -417,7 +417,7 @@ create_config_dialog (xfceweather_data *data,
   gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (hbox), dialog->combo_unit_system, TRUE, TRUE, 
0);
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-
+  gtk_size_group_add_widget (sg, label);
 
   label = gtk_label_new_with_mnemonic (_("L_ocation:"));
   dialog->txt_lat = gtk_entry_new ();
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Merge branch 'short-location-name'

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to a1cd2ccae937847fce078198449e152ddf366d19 (commit)
   from 5afb761ed7e95754f9565cb36e3bd8a152e3d642 (commit)

commit a1cd2ccae937847fce078198449e152ddf366d19
Merge: 5afb761 03eeed2
Author: Harald Judt 
Date:   Mon Jul 16 15:59:04 2012 +0200

Merge branch 'short-location-name'

commit 03eeed2caf8da0b4bd66772861379cc834718365
Author: Harald Judt 
Date:   Mon Jul 16 15:50:46 2012 +0200

Make location name editable.

The user can now set the location name manually.

commit ca345ccf290e3b5019c4ce11a074b1551b1e39b6
Author: Harald Judt 
Date:   Mon Jul 16 15:20:31 2012 +0200

Do away with the short location name.

Since the forecast data is requested using latitude and longitude,
we're free to set the location name to something arbitrary. As a
first step, sanitize the location name returned by the search
dialog or by auto-detection via IP address and remove the code added
previously for keeping an extra short location name.

 panel-plugin/weather-config.c  |   75 ++--
 panel-plugin/weather-summary.c |4 +-
 panel-plugin/weather.c |   14 ---
 panel-plugin/weather.h |3 +-
 4 files changed, 52 insertions(+), 44 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 0c10a2a..2929292 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -32,6 +32,7 @@
 
 #define OPTIONS_N 13
 #define BORDER8
+#define LOC_NAME_MAX_LEN 50
 
 static const labeloption labeloptions[OPTIONS_N] = {
   {N_("Temperature (T)"), TEMPERATURE},
@@ -155,13 +156,39 @@ make_label (void)
 
 
 
+gchar *
+sanitize_location_name(const gchar *location_name)
+{
+  gchar *pos;
+  long   len;
+
+  pos = g_utf8_strchr (location_name, -1, ',');
+  if (pos != NULL)
+return g_utf8_substring (location_name, 0,
+ g_utf8_pointer_to_offset (location_name, pos));
+  else
+{
+  len = g_utf8_strlen(location_name, LOC_NAME_MAX_LEN);
+
+  if (len >= LOC_NAME_MAX_LEN)
+return g_utf8_substring (location_name, 0, len);
+
+  if (len > 0)
+return g_strdup(location_name);
+
+  return g_strdup(_("Unset"));
+}
+}
+
+
+
 void
 apply_options (xfceweather_dialog *dialog)
 {
   gint option;
   gboolean hasiter = FALSE;
   GtkTreeIter  iter;
-  gchar   *text, *pos;
+  gchar   *text;
   GValue   value = { 0, };
   GtkWidget   *widget;
 
@@ -183,9 +210,6 @@ apply_options (xfceweather_dialog *dialog)
   if (data->location_name)
 g_free (data->location_name);
 
-  if (data->location_name_short)
-g_free (data->location_name_short);
-
   data->lat =
 g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->txt_lat)));
 
@@ -193,15 +217,7 @@ apply_options (xfceweather_dialog *dialog)
 g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->txt_lon)));
 
   data->location_name =
-g_strdup (gtk_label_get_text (GTK_LABEL (dialog->txt_loc_name)));
-
-  pos = g_utf8_strchr(data->location_name, -1, ',');
-  if (pos != NULL)
-data->location_name_short =
-  g_utf8_substring (data->location_name, 0,
-g_utf8_pointer_to_offset (data->location_name, pos));
-  else
-data->location_name_short = g_strdup (data->location_name);
+g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->txt_loc_name)));
 
   /* call labels_clear() here */
   if (data->labels && data->labels->len > 0)
@@ -302,11 +318,15 @@ option_i (datas opt)
 static void auto_locate_cb(const gchar *loc_name, const gchar *lat, const 
gchar *lon, gpointer user_data)
 {
   xfceweather_dialog *dialog = (xfceweather_dialog *) user_data;
+  gchar *sane_loc_name;
 
   if (lat && lon && loc_name) {
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lat), lat);
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lon), lon);
-gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name), loc_name);
+gtk_entry_set_text (GTK_ENTRY (dialog->txt_loc_name), loc_name);
+sane_loc_name = sanitize_location_name(loc_name);
+gtk_entry_set_text (GTK_ENTRY (dialog->txt_loc_name), sane_loc_name);
+g_free(sane_loc_name);
 gtk_widget_set_sensitive(dialog->txt_loc_name, TRUE);
 #if GTK_CHECK_VERSION(2,12,0)
 gtk_widget_set_tooltip_text(dialog->txt_loc_name,loc_name);
@@ -314,7 +334,7 @@ static void auto_locate_cb(const gchar *loc_name, const 
gchar *lat, const gchar
   } else {
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lat), "");
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lon), "");
-gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name), _("Unset"));
+gtk_entry_set_text (GTK_ENTRY (dialog->txt_loc_name), _("Unset"));
 gtk_widget_set_sensitive(dialog->txt_loc_name, TRUE);
   }
 }
@@ -322,7 +342,7 @@ static void auto_locate_cb(const gchar *loc_name, const 
gchar *lat, const gchar
 static void start_auto_locate(xfceweather_dialog *dialog)
 {
   gtk_widget_set_sensitive(dialog->txt_loc_name, FALSE);

[Xfce4-commits] Make location name editable.

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to 03eeed2caf8da0b4bd66772861379cc834718365 (commit)
   from ca345ccf290e3b5019c4ce11a074b1551b1e39b6 (commit)

commit 03eeed2caf8da0b4bd66772861379cc834718365
Author: Harald Judt 
Date:   Mon Jul 16 15:50:46 2012 +0200

Make location name editable.

The user can now set the location name manually.

 panel-plugin/weather-config.c |   34 +-
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index a5c7b53..2929292 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -156,8 +156,8 @@ make_label (void)
 
 
 
-gchar*
-sanitize_location_name(gchar * location_name)
+gchar *
+sanitize_location_name(const gchar *location_name)
 {
   gchar *pos;
   long   len;
@@ -217,7 +217,7 @@ apply_options (xfceweather_dialog *dialog)
 g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->txt_lon)));
 
   data->location_name =
-g_strdup (gtk_label_get_text (GTK_LABEL (dialog->txt_loc_name)));
+g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->txt_loc_name)));
 
   /* call labels_clear() here */
   if (data->labels && data->labels->len > 0)
@@ -323,9 +323,9 @@ static void auto_locate_cb(const gchar *loc_name, const 
gchar *lat, const gchar
   if (lat && lon && loc_name) {
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lat), lat);
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lon), lon);
-gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name), loc_name);
+gtk_entry_set_text (GTK_ENTRY (dialog->txt_loc_name), loc_name);
 sane_loc_name = sanitize_location_name(loc_name);
-gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name), sane_loc_name);
+gtk_entry_set_text (GTK_ENTRY (dialog->txt_loc_name), sane_loc_name);
 g_free(sane_loc_name);
 gtk_widget_set_sensitive(dialog->txt_loc_name, TRUE);
 #if GTK_CHECK_VERSION(2,12,0)
@@ -334,7 +334,7 @@ static void auto_locate_cb(const gchar *loc_name, const 
gchar *lat, const gchar
   } else {
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lat), "");
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lon), "");
-gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name), _("Unset"));
+gtk_entry_set_text (GTK_ENTRY (dialog->txt_loc_name), _("Unset"));
 gtk_widget_set_sensitive(dialog->txt_loc_name, TRUE);
   }
 }
@@ -342,7 +342,7 @@ static void auto_locate_cb(const gchar *loc_name, const 
gchar *lat, const gchar
 static void start_auto_locate(xfceweather_dialog *dialog)
 {
   gtk_widget_set_sensitive(dialog->txt_loc_name, FALSE);
-  gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name), _("Detecting..."));
+  gtk_entry_set_text (GTK_ENTRY (dialog->txt_loc_name), _("Detecting..."));
   weather_search_by_ip(dialog->wd->proxy_host, dialog->wd->proxy_port,
auto_locate_cb, dialog);
 }
@@ -363,7 +363,7 @@ cb_findlocation (GtkButton *button,
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lat), sdialog->result_lat);
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lon), sdialog->result_lon);
 loc_name = sanitize_location_name(sdialog->result_name);
-gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name), loc_name);
+gtk_entry_set_text (GTK_ENTRY (dialog->txt_loc_name), loc_name);
 g_free(loc_name);
 gtk_widget_set_sensitive(dialog->txt_loc_name, TRUE);
 #if GTK_CHECK_VERSION(2,12,0)
@@ -419,17 +419,14 @@ create_config_dialog (xfceweather_data *data,
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
 
-  label = gtk_label_new (_("Location:"));
+  label = gtk_label_new_with_mnemonic (_("L_ocation:"));
   dialog->txt_lat = gtk_entry_new ();
   dialog->txt_lon = gtk_entry_new ();
-  dialog->txt_loc_name = gtk_label_new ("");
+  dialog->txt_loc_name = gtk_entry_new ();
 
   gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
-  gtk_misc_set_alignment (GTK_MISC (dialog->txt_loc_name), 0, 0.5);
+  gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET 
(dialog->txt_loc_name));
 
-#if GTK_CHECK_VERSION(2,12,0)
-  gtk_label_set_ellipsize (GTK_LABEL(dialog->txt_loc_name), 
PANGO_ELLIPSIZE_END);
-#endif
   if (dialog->wd->lat != NULL)
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lat),
 dialog->wd->lat);
@@ -438,12 +435,15 @@ create_config_dialog (xfceweather_data *data,
 dialog->wd->lon);
 
   if (dialog->wd->location_name != NULL)
-gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name),
+gtk_entry_set_text (GTK_ENTRY (dialog->txt_loc_name),
 dialog->wd->location_name);
+  else
+gtk_entry_set_text (GTK_ENTRY (dialog->txt_loc_name), _("Unset"));
+  gtk_entry_set_max_length (GTK_ENTRY (dialog->txt_loc_name), 
LOC_NAME_MAX_LEN);
 
 #if GTK_CHECK_VERSION(2,12,0)
-  gtk_widget_set_tooltip_text(dialog->txt_loc_name,
-   gtk_label_get_text(GTK_LABEL(dialog->txt_loc_name)));
+  gtk_widget_set_tooltip_text (dialog->txt_loc_name,
+   gt

[Xfce4-commits] Do away with the short location name.

2012-07-16 Thread Harald Judt
Updating branch refs/heads/master
 to ca345ccf290e3b5019c4ce11a074b1551b1e39b6 (commit)
   from 7051b709c85af72e2cdbb8b13a86590661c3038a (commit)

commit ca345ccf290e3b5019c4ce11a074b1551b1e39b6
Author: Harald Judt 
Date:   Mon Jul 16 15:20:31 2012 +0200

Do away with the short location name.

Since the forecast data is requested using latitude and longitude,
we're free to set the location name to something arbitrary. As a
first step, sanitize the location name returned by the search
dialog or by auto-detection via IP address and remove the code added
previously for keeping an extra short location name.

 panel-plugin/weather-config.c  |   49 +--
 panel-plugin/weather-summary.c |4 +-
 panel-plugin/weather.c |   14 ---
 panel-plugin/weather.h |3 +-
 4 files changed, 39 insertions(+), 31 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 0c10a2a..a5c7b53 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -32,6 +32,7 @@
 
 #define OPTIONS_N 13
 #define BORDER8
+#define LOC_NAME_MAX_LEN 50
 
 static const labeloption labeloptions[OPTIONS_N] = {
   {N_("Temperature (T)"), TEMPERATURE},
@@ -155,13 +156,39 @@ make_label (void)
 
 
 
+gchar*
+sanitize_location_name(gchar * location_name)
+{
+  gchar *pos;
+  long   len;
+
+  pos = g_utf8_strchr (location_name, -1, ',');
+  if (pos != NULL)
+return g_utf8_substring (location_name, 0,
+ g_utf8_pointer_to_offset (location_name, pos));
+  else
+{
+  len = g_utf8_strlen(location_name, LOC_NAME_MAX_LEN);
+
+  if (len >= LOC_NAME_MAX_LEN)
+return g_utf8_substring (location_name, 0, len);
+
+  if (len > 0)
+return g_strdup(location_name);
+
+  return g_strdup(_("Unset"));
+}
+}
+
+
+
 void
 apply_options (xfceweather_dialog *dialog)
 {
   gint option;
   gboolean hasiter = FALSE;
   GtkTreeIter  iter;
-  gchar   *text, *pos;
+  gchar   *text;
   GValue   value = { 0, };
   GtkWidget   *widget;
 
@@ -183,9 +210,6 @@ apply_options (xfceweather_dialog *dialog)
   if (data->location_name)
 g_free (data->location_name);
 
-  if (data->location_name_short)
-g_free (data->location_name_short);
-
   data->lat =
 g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->txt_lat)));
 
@@ -195,14 +219,6 @@ apply_options (xfceweather_dialog *dialog)
   data->location_name =
 g_strdup (gtk_label_get_text (GTK_LABEL (dialog->txt_loc_name)));
 
-  pos = g_utf8_strchr(data->location_name, -1, ',');
-  if (pos != NULL)
-data->location_name_short =
-  g_utf8_substring (data->location_name, 0,
-g_utf8_pointer_to_offset (data->location_name, pos));
-  else
-data->location_name_short = g_strdup (data->location_name);
-
   /* call labels_clear() here */
   if (data->labels && data->labels->len > 0)
 g_array_free (data->labels, TRUE);
@@ -302,11 +318,15 @@ option_i (datas opt)
 static void auto_locate_cb(const gchar *loc_name, const gchar *lat, const 
gchar *lon, gpointer user_data)
 {
   xfceweather_dialog *dialog = (xfceweather_dialog *) user_data;
+  gchar *sane_loc_name;
 
   if (lat && lon && loc_name) {
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lat), lat);
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lon), lon);
 gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name), loc_name);
+sane_loc_name = sanitize_location_name(loc_name);
+gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name), sane_loc_name);
+g_free(sane_loc_name);
 gtk_widget_set_sensitive(dialog->txt_loc_name, TRUE);
 #if GTK_CHECK_VERSION(2,12,0)
 gtk_widget_set_tooltip_text(dialog->txt_loc_name,loc_name);
@@ -333,6 +353,7 @@ cb_findlocation (GtkButton *button,
 {
   xfceweather_dialog *dialog = (xfceweather_dialog *) user_data;
   search_dialog *sdialog;
+  gchar *loc_name;
 
   sdialog = create_search_dialog (NULL,
   dialog->wd->proxy_host,
@@ -341,7 +362,9 @@ cb_findlocation (GtkButton *button,
   if (run_search_dialog (sdialog)) {
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lat), sdialog->result_lat);
 gtk_entry_set_text (GTK_ENTRY (dialog->txt_lon), sdialog->result_lon);
-gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name), 
sdialog->result_name);
+loc_name = sanitize_location_name(sdialog->result_name);
+gtk_label_set_text (GTK_LABEL (dialog->txt_loc_name), loc_name);
+g_free(loc_name);
 gtk_widget_set_sensitive(dialog->txt_loc_name, TRUE);
 #if GTK_CHECK_VERSION(2,12,0)
 gtk_widget_set_tooltip_text(dialog->txt_loc_name,sdialog->result_name);
diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
index 1122f46..bf437cd 100644
--- a/panel-plugin/weather-summary.c
+++ b/panel-plugin/weather-summary.c
@@ -605,8 +605,8 @@ create_summary_window (xfceweather_data *data)
  

[Xfce4-commits] l10n: Updated Japanese (ja) translation to 100%

2012-07-16 Thread Transifex
Updating branch refs/heads/master
 to ad1cf1fc37324e5c7f79331d7fec9dd39bc023f7 (commit)
   from 88588c36cd9f38e0db5f3814a58a029ee9a38f57 (commit)

commit ad1cf1fc37324e5c7f79331d7fec9dd39bc023f7
Author: Masato Hashimoto 
Date:   Mon Jul 16 11:15:58 2012 +0200

l10n: Updated Japanese (ja) translation to 100%

New status: 247 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/ja.po |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/po/ja.po b/po/ja.po
index c9d8807..47f0151 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -10,10 +10,10 @@ msgid ""
 msgstr ""
 "Project-Id-Version: mousepad 0.2.16\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-05-24 21:57+0900\n"
-"PO-Revision-Date: 2012-05-25 21:56+0900\n"
+"POT-Creation-Date: 2012-07-16 18:15+0900\n"
+"PO-Revision-Date: 2012-07-16 18:15+0900\n"
 "Last-Translator: Masato Hashimoto \n"
-"Language-Team: Japanese \n"
+"Language-Team: Japanese \n"
 "Language: ja\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -133,15 +133,15 @@ msgstr "この文書は外部から変更されています。このまま保存
 msgid "Externally Modified"
 msgstr "外部からの変更"
 
-#: ../mousepad/mousepad-dialogs.c:410
-msgid "If you don't save the document, all the external changes will be lost."
+#: ../mousepad/mousepad-dialogs.c:411
+msgid "If you save the document, all of the external changes will be lost."
 msgstr "保存すると、すべての外部からの変更箇所は失われます。"
 
-#: ../mousepad/mousepad-dialogs.c:438
+#: ../mousepad/mousepad-dialogs.c:439
 msgid "Do you want to save your changes before reloading?"
 msgstr "再読み込み前に変更を保存しますか?"
 
-#: ../mousepad/mousepad-dialogs.c:440
+#: ../mousepad/mousepad-dialogs.c:441
 msgid "If you revert the file, all unsaved changes will be lost."
 msgstr "ファイルを復帰すると、保存されていないすべての変更箇所は失われます。"
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] l10n: Updated Japanese (ja) translation to 100%

2012-07-16 Thread Transifex
Updating branch refs/heads/master
 to 0127080d603095578360ba91f50f20b47eb5835a (commit)
   from 459d7549e8188f91b53a3a33048c0051b102e355 (commit)

commit 0127080d603095578360ba91f50f20b47eb5835a
Author: Masato Hashimoto 
Date:   Mon Jul 16 11:10:47 2012 +0200

l10n: Updated Japanese (ja) translation to 100%

New status: 30 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/ja.po |   67 +++--
 1 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/po/ja.po b/po/ja.po
index 4cf8855..f2b1fd1 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -11,8 +11,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: xfce4-netload-plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-02-21 22:51+0900\n"
-"PO-Revision-Date: 2012-04-19 15:11+0900\n"
+"POT-Creation-Date: 2012-07-16 18:09+0900\n"
+"PO-Revision-Date: 2012-07-16 18:09+0900\n"
 "Last-Translator: Masato Hashimoto \n"
 "Language-Team: Japanese \n"
 "Language: ja\n"
@@ -20,47 +20,49 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../panel-plugin/netload.c:59
+#: ../panel-plugin/netload.c:61
 msgid "Xfce4-Netload-Plugin"
 msgstr "Xfce4-Netload プラグイン"
 
-#: ../panel-plugin/netload.c:62
+#: ../panel-plugin/netload.c:64
 msgid "Unknown error."
 msgstr "未知のエラーです。"
 
-#: ../panel-plugin/netload.c:63
+#: ../panel-plugin/netload.c:65
 msgid "Linux proc device '/proc/net/dev' not found."
 msgstr "Linux proc デバイスの '/proc/net/dev' が見つかりません。"
 
-#: ../panel-plugin/netload.c:64
+#: ../panel-plugin/netload.c:66
 msgid "Interface was not found."
 msgstr "インターフェイスが見つかりませんでした"
 
-#: ../panel-plugin/netload.c:162
+#: ../panel-plugin/netload.c:163
 #, c-format
 msgid "<< %s >> (Interface down)"
 msgstr "<< %s >> (インターフェイス 停止)"
 
-#: ../panel-plugin/netload.c:249
+#: ../panel-plugin/netload.c:250
 #, c-format
 msgid ""
 "<< %s >> (%s)\n"
-"Average of last %d measures:\n"
-"Incoming: %s/s\n"
-"Outgoing: %s/s\n"
-"Total: %s/s"
+"Average of last %d measures\n"
+"with an interval of %.2fs:\n"
+"Incoming: %s\n"
+"Outgoing: %s\n"
+"Total: %s"
 msgstr ""
 "<< %s >> (%s)\n"
-"直近の %d 測定分の平均:\n"
+"直近の %d 測定分の平均\n"
+"測定間隔: %.2f 秒\n"
 "受信: %s/s\n"
 "送信: %s/s\n"
 "合計: %s/s"
 
-#: ../panel-plugin/netload.c:251
+#: ../panel-plugin/netload.c:253
 msgid "no IP address"
 msgstr "IP アドレスがありません"
 
-#: ../panel-plugin/netload.c:533
+#: ../panel-plugin/netload.c:567
 #, c-format
 msgid ""
 "%s: Error in initializing:\n"
@@ -69,72 +71,71 @@ msgstr ""
 "%s: 初期化中のエラー:\n"
 "%s"
 
-#: ../panel-plugin/netload.c:872
+#: ../panel-plugin/netload.c:882
 msgid "Select color"
 msgstr "色の選択"
 
-#: ../panel-plugin/netload.c:938
+#: ../panel-plugin/netload.c:948
 msgid "Bar color (i_ncoming):"
 msgstr "バーの色 (受信)(_N):"
 
-#: ../panel-plugin/netload.c:939
+#: ../panel-plugin/netload.c:949
 msgid "Bar color (_outgoing):"
 msgstr "バーの色 (送信)(_O):"
 
-#: ../panel-plugin/netload.c:942
+#: ../panel-plugin/netload.c:952
 msgid "Maximum (inco_ming):"
 msgstr "最大 (受信)(_M):"
 
-#: ../panel-plugin/netload.c:943
+#: ../panel-plugin/netload.c:953
 msgid "Maximum (o_utgoing):"
 msgstr "最大 (送信)(_U):"
 
-#: ../panel-plugin/netload.c:948
-#: ../panel-plugin/netload.desktop.in.in.h:1
+#: ../panel-plugin/netload.c:958 ../panel-plugin/netload.desktop.in.in.h:1
 msgid "Network Monitor"
 msgstr "ネットワークモニター"
 
-#: ../panel-plugin/netload.c:977
+#: ../panel-plugin/netload.c:987
 msgid "_Text to display:"
 msgstr "表示文字列(_T):"
 
-#: ../panel-plugin/netload.c:1008
+#: ../panel-plugin/netload.c:1018
 msgid "Network _device:"
 msgstr "ネットワークデバイス(_D):"
 
-#: ../panel-plugin/netload.c:1036
+#: ../panel-plugin/netload.c:1046
 msgid "Update _interval:"
 msgstr "更新間隔(_I):"
 
-#: ../panel-plugin/netload.c:1049
+#: ../panel-plugin/netload.c:1059
 msgid "s"
 msgstr "秒"
 
-#: ../panel-plugin/netload.c:1062
+#: ../panel-plugin/netload.c:1072
 msgid "_Automatic maximum"
 msgstr "最大値を自動調整する(_A)"
 
-#: ../panel-plugin/netload.c:1096
+#: ../panel-plugin/netload.c:1106
 msgid "KiB/s"
 msgstr "KiB/s"
 
-#: ../panel-plugin/netload.c:1121
+#: ../panel-plugin/netload.c:1131
 msgid "_Present data as:"
 msgstr "データの表示形式(_P):"
 
-#: ../panel-plugin/netload.c:1130
+#: ../panel-plugin/netload.c:1140
 msgid "Bars"
 msgstr "バー"
 
-#: ../panel-plugin/netload.c:1131
+#: ../panel-plugin/netload.c:1141
 msgid "Values"
 msgstr "数値"
 
-#: ../panel-plugin/netload.c:1132
+#: ../panel-plugin/netload.c:1142
 msgid "Bars and values"
 msgstr "バーと数値"
 
-#: ../panel-plugin/netload.c:1182
+#: ../panel-plugin/netload.c:1192
 msgid "_Colorize values"
 msgstr "数値に色をつける(_C)"
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] l10n: Updated Japanese (ja) translation to 100%

2012-07-16 Thread Transifex
Updating branch refs/heads/master
 to 5afb761ed7e95754f9565cb36e3bd8a152e3d642 (commit)
   from 830b9304e6973e0fb4839b5ed6876f9830ebeb8d (commit)

commit 5afb761ed7e95754f9565cb36e3bd8a152e3d642
Author: Masato Hashimoto 
Date:   Mon Jul 16 10:59:57 2012 +0200

l10n: Updated Japanese (ja) translation to 100%

New status: 150 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/ja.po |   59 ++-
 1 files changed, 30 insertions(+), 29 deletions(-)

diff --git a/po/ja.po b/po/ja.po
index 315dfd7..5f2944e 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -3,6 +3,7 @@
 # This file is distributed under the same license as the xfce-weather-plugin 
package..
 # Yuko Iwamatsu , 2008
 # Nobuhiro Iwamatsu , 2008.
+# Masato Hashimoto , 2011,2012.
 #
 # 翻訳メモ:
 # Sunny (日中の晴れ), Clear (夜間の晴れ)
@@ -11,8 +12,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: xfce-weather-plugin 0.6.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-07-15 22:28+0900\n"
-"PO-Revision-Date: 2012-07-15 22:25+0900\n"
+"POT-Creation-Date: 2012-07-16 17:58+0900\n"
+"PO-Revision-Date: 2012-07-16 17:57+0900\n"
 "Last-Translator: Masato Hashimoto \n"
 "Language-Team: Japanese \n"
 "Language: ja\n"
@@ -77,13 +78,13 @@ msgstr "気象データを更新できません"
 msgid "Unable to open the following url: %s"
 msgstr "次の URL を開くことができません: %s"
 
-#: ../panel-plugin/weather.c:829 ../panel-plugin/weather-summary.c:593
+#: ../panel-plugin/weather.c:829 ../panel-plugin/weather-summary.c:601
 #: ../panel-plugin/weather.desktop.in.in.h:1
 msgid "Weather Update"
-msgstr "現在のお天気"
+msgstr "最新の気象情報"
 
 #. add refresh button to right click menu, for people who missed the middle 
mouse click feature
-#: ../panel-plugin/weather.c:960 ../panel-plugin/weather-summary.c:638
+#: ../panel-plugin/weather.c:960 ../panel-plugin/weather-summary.c:646
 msgid "_Forecast"
 msgstr "予報(_F)"
 
@@ -101,7 +102,7 @@ msgstr "風速 (WS)"
 
 #: ../panel-plugin/weather-config.c:40
 msgid "Wind speed - Beaufort scale (WB)"
-msgstr "風速・ビューフォート階級 (WB)"
+msgstr "風力 (WB)"
 
 #: ../panel-plugin/weather-config.c:41
 msgid "Wind direction (WD)"
@@ -303,7 +304,7 @@ msgid ""
 "Weather report for: %s.\n"
 "\n"
 msgstr ""
-"%s の天気情報です。\n"
+"%s の気象情報です。\n"
 "\n"
 
 #: ../panel-plugin/weather-summary.c:278
@@ -328,7 +329,7 @@ msgid ""
 "Time\n"
 msgstr ""
 "\n"
-"日時\n"
+"時間\n"
 
 #: ../panel-plugin/weather-summary.c:286
 #, c-format
@@ -336,7 +337,7 @@ msgid ""
 "\tPoint data applies to:\n"
 "\t%s\n"
 msgstr ""
-"\t予報日時:\n"
+"\t予報時刻:\n"
 "\t%s\n"
 
 #: ../panel-plugin/weather-summary.c:293
@@ -348,9 +349,9 @@ msgid ""
 "\tEnd:\t%s\n"
 msgstr ""
 "\n"
-"\t予報期間:\n"
-"\t開始:\t%s\n"
-"\t終了:\t%s\n"
+"\t予報時間帯:\n"
+"\t%s から\n"
+"\t%s まで\n"
 
 #: ../panel-plugin/weather-summary.c:298
 #, c-format
@@ -360,8 +361,8 @@ msgid ""
 "\twhile the remaining information originates from point data.\n"
 msgstr ""
 "\n"
-"\tパネルに表示される天気のアイコン、説明、及び降水量は、予報日時\n"
-"\tまでの情報です。\n"
+"\tパネルに表示される天気のアイコン、説明、及び降水量は予報時間帯の、\n"
+"\tその他は予報時刻の情報です。\n"
 
 #. Temperature
 #: ../panel-plugin/weather-summary.c:304
@@ -388,7 +389,7 @@ msgstr ""
 #: ../panel-plugin/weather-summary.c:313
 #, c-format
 msgid "\t%s: %s (%s on the Beaufort scale)\n"
-msgstr "\t%s: %s (ビューフォート階級 %s)\n"
+msgstr "\t%s: %s (風力 %s)\n"
 
 #: ../panel-plugin/weather-summary.c:313
 msgid "Speed"
@@ -496,20 +497,20 @@ msgstr "今日"
 msgid "Tomorrow"
 msgstr "明日"
 
-#: ../panel-plugin/weather-summary.c:601
+#: ../panel-plugin/weather-summary.c:609
 #, c-format
 msgid "Weather report for: %s"
 msgstr "天気情報: %s"
 
-#: ../panel-plugin/weather-summary.c:624
+#: ../panel-plugin/weather-summary.c:632
 msgid "Please set a location in the plugin settings."
 msgstr "プラグイン設定の場所を入力してください"
 
-#: ../panel-plugin/weather-summary.c:626
+#: ../panel-plugin/weather-summary.c:634
 msgid "Currently no data available."
 msgstr "現在利用可能なデータがありません。"
 
-#: ../panel-plugin/weather-summary.c:641
+#: ../panel-plugin/weather-summary.c:649
 msgid "_Details"
 msgstr "詳細(_D)"
 
@@ -595,11 +596,11 @@ msgstr "晴れ"
 #: ../panel-plugin/weather-translate.c:96
 #: ../panel-plugin/weather-translate.c:112
 msgid "Lightly cloudy"
-msgstr "晴れ (軽度の雲り)"
+msgstr "晴れ (薄曇り)"
 
 #: ../panel-plugin/weather-translate.c:97
 msgid "Partly cloudy"
-msgstr "晴れ (部分的に雲り)"
+msgstr "晴れ時々曇り"
 
 #: ../panel-plugin/weather-translate.c:98
 msgid "Cloudy"
@@ -608,21 +609,21 @@ msgstr "曇り"
 #: ../panel-plugin/weather-translate.c:99
 #: ../panel-plugin/weather-translate.c:113
 msgid "Sunny, rain showers"
-msgstr "晴れ時々にわか雨"
+msgstr "晴れ時々雨"
 
 # night
 #: ../panel-plugin/weather-translate.c:99
 #: ../panel-plugin/weather-translate.c:113
 msgid "Clear, rain showers"
-msgstr "晴れ時々にわか雨"
+msgstr "晴れ時々雨"
 
 #: ../panel-plugin/weather-translate.c:100
 msgid "Sunny, rain showers with thunder"
-msgstr "晴れ時々雷を伴うにわか雨"
+msgstr "晴れ時々雷雨"
 
 #: ../panel-plugin/weather-translate.c:101
 msgid "Clear, rain showers with thunder"
-msgstr "晴れ時々雷を伴うにわか雨"

[Xfce4-commits] l10n: Updated Chinese (Taiwan) (zh_TW) translation to 100%

2012-07-16 Thread Transifex
Updating branch refs/heads/master
 to cc934aff687a607a3854882937ae55c82339975e (commit)
   from d90cc0624b5044e9a62446cc1cdc3cd89e8c91dc (commit)

commit cc934aff687a607a3854882937ae55c82339975e
Author: Cheng-Chia Tseng 
Date:   Mon Jul 16 10:22:53 2012 +0200

l10n: Updated Chinese (Taiwan) (zh_TW) translation to 100%

New status: 267 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/zh_TW.po |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/po/zh_TW.po b/po/zh_TW.po
index fd18a9f..4b0ac5b 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: postler master\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2012-07-16 04:27+\n"
-"PO-Revision-Date: 2012-07-16 16:16+0800\n"
+"PO-Revision-Date: 2012-07-16 16:22+0800\n"
 "Last-Translator: Cheng-Chia Tseng \n"
 "Language-Team: chinese-l10n \n"
 "Language: \n"
@@ -1037,7 +1037,7 @@ msgstr "狀態"
 
 #: ../postler/postler-reader.vala:17
 msgid "Verbose"
-msgstr "冗長"
+msgstr "詳盡"
 
 #: ../postler/postler-reader.vala:18
 msgid "Display program version"
@@ -1051,19 +1051,19 @@ msgstr "檔名"
 #. fields at the top of a message, ie. From, To, Copy
 #: ../postler/postler-reader.vala:35
 msgid "[mailto:][ADDRESS][?subject=SUBJECT][&body=BODY]";
-msgstr "[mailto:][ADDRESS][?subject=SUBJECT][&body=BODY]";
+msgstr "[mailto:][信箱位址][?subject=主旨][&body=正文]";
 
 #: ../postler/postler-reader.vala:36
 msgid 
"[&from=FROM][&to=TO][&cc=COPY][&attach=ATTACHMENT][&in-reply-to=MESSAGE_ID]"
-msgstr 
"[&from=FROM][&to=TO][&cc=COPY][&attach=ATTACHMENT][&in-reply-to=MESSAGE_ID]"
+msgstr "[&from=寄件者][&to=收件者][&cc=副本][&attach=附件][&in-reply-to=訊息ID]"
 
 #: ../postler/postler-reader.vala:38
 msgid "[file://][FILENAME]"
-msgstr "[file://][FILENAME]"
+msgstr "[file://][檔名]"
 
 #: ../postler/postler-reader.vala:40
 msgid "mid:[MESSAGE_ID][/ATTACHMENT_ID]"
-msgstr "mid:[MESSAGE_ID][/ATTACHMENT_ID]"
+msgstr "mid:[訊息ID][/附件ID]"
 
 #. i18n: Command line arguments are invalid
 #: ../postler/postler-reader.vala:49
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] l10n: Updated Chinese (Taiwan) (zh_TW) translation to 100%

2012-07-16 Thread Transifex
Updating branch refs/heads/master
 to d90cc0624b5044e9a62446cc1cdc3cd89e8c91dc (commit)
   from 1fdc0c6814e8d98f40fadec62d4c2233f7815831 (commit)

commit d90cc0624b5044e9a62446cc1cdc3cd89e8c91dc
Author: Cheng-Chia Tseng 
Date:   Mon Jul 16 10:17:13 2012 +0200

l10n: Updated Chinese (Taiwan) (zh_TW) translation to 100%

New status: 267 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/zh_TW.po |  293 +--
 1 files changed, 146 insertions(+), 147 deletions(-)

diff --git a/po/zh_TW.po b/po/zh_TW.po
index 3f5f536..fd18a9f 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: postler master\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-07-11 06:45+\n"
-"PO-Revision-Date: 2012-07-11 17:11+0800\n"
+"POT-Creation-Date: 2012-07-16 04:27+\n"
+"PO-Revision-Date: 2012-07-16 16:16+0800\n"
 "Last-Translator: Cheng-Chia Tseng \n"
 "Language-Team: chinese-l10n \n"
 "Language: \n"
@@ -19,7 +19,7 @@ msgstr ""
 
 #: ../data/postler.desktop.in.h:1
 msgid "Lean mail interface"
-msgstr ""
+msgstr "精簡郵件介面"
 
 #: ../data/postler.desktop.in.h:2
 msgid "Mail reader"
@@ -328,21 +328,21 @@ msgstr "無法傳送通知:%s"
 #, c-format
 msgid "You have %d new message"
 msgid_plural "You have %d new messages"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "您有 %d 個新訊息"
+msgstr[1] "您有 %d 個新訊息"
 
 #: ../postler/postler-bureau.vala:224
 #, c-format
 msgid "A saved search with the name \"%s\" already exists."
-msgstr ""
+msgstr "已存在有名為「%s」的儲存搜尋。"
 
 #: ../postler/postler-bureau.vala:227
 msgid "Do you want to replace the existing saved search?"
-msgstr ""
+msgstr "您喜要替換既有的已存搜尋嗎?"
 
 #: ../postler/postler-bureau.vala:229
 msgid "_Replace"
-msgstr ""
+msgstr "替換(_R)"
 
 #: ../postler/postler-bureau.vala:360
 msgid "translator-credits"
@@ -367,11 +367,11 @@ msgstr "編寫新訊息"
 
 #: ../postler/postler-bureau.vala:374
 msgid "Reply to the sender of the message"
-msgstr ""
+msgstr "回覆訊息的寄件者"
 
 #: ../postler/postler-bureau.vala:376
 msgid "Reply to all recipients"
-msgstr ""
+msgstr "回覆所有收件者"
 
 #: ../postler/postler-bureau.vala:378
 msgid "Forward message"
@@ -379,66 +379,66 @@ msgstr "轉寄訊息"
 
 #: ../postler/postler-bureau.vala:380
 msgid "Mark message as unread"
-msgstr ""
+msgstr "標記訊息為未讀"
 
 #: ../postler/postler-bureau.vala:382
 msgid "Flag message"
-msgstr ""
+msgstr "為訊息插上旗幟"
 
 #: ../postler/postler-bureau.vala:384
 #: ../postler/postler-bureau.vala:746
 msgid "Archive message"
-msgstr ""
+msgstr "將訊息歸檔封存"
 
 #: ../postler/postler-bureau.vala:386
 #: ../postler/postler-bureau.vala:738
 msgid "Mark message as junk"
-msgstr ""
+msgstr "標記訊息為垃圾郵件"
 
 #: ../postler/postler-bureau.vala:388
 msgid "Delete message"
-msgstr ""
+msgstr "刪除訊息"
 
 #: ../postler/postler-bureau.vala:390
 msgid "Cancel operation on messages"
-msgstr ""
+msgstr "取消對訊息的操作"
 
 #: ../postler/postler-bureau.vala:391
 msgid "_Previous Unread Message"
-msgstr ""
+msgstr "上個未讀訊息(_P)"
 
 #: ../postler/postler-bureau.vala:392
 msgid "Go to the previous unread message"
-msgstr ""
+msgstr "前往上個未讀訊息"
 
 #: ../postler/postler-bureau.vala:393
 msgid "_Next Unread Message"
-msgstr ""
+msgstr "下個未讀訊息(_N)"
 
 #: ../postler/postler-bureau.vala:394
 msgid "Go to the next unread message"
-msgstr ""
+msgstr "前往下個未讀訊息"
 
 #: ../postler/postler-bureau.vala:396
 msgid "Quit the application"
-msgstr ""
+msgstr "退出應用程式"
 
 #: ../postler/postler-bureau.vala:397
 #: ../postler/postler-composer.vala:500
 msgid "_Edit"
-msgstr ""
+msgstr "編輯(_E)"
 
 #: ../postler/postler-bureau.vala:399
 msgid "Search the selected folder"
-msgstr ""
+msgstr "搜尋所選的資料夾"
 
 #: ../postler/postler-bureau.vala:400
 msgid "S_ave Search"
-msgstr ""
+msgstr "儲存搜尋(_A)"
 
 #: ../postler/postler-bureau.vala:401
 msgid "Save the current search"
-msgstr ""
+msgstr "儲存目前的搜尋動作"
 
 #: ../postler/postler-bureau.vala:402
 #: ../postler/postler-bureau.vala:403
@@ -452,16 +452,16 @@ msgstr "放大文字(_E)"
 
 #: ../postler/postler-bureau.vala:406
 msgid "Enlarge message text"
-msgstr ""
+msgstr "放大訊息文字"
 
 #: ../postler/postler-bureau.vala:407
 #: ../postler/postler-content.vala:318
 msgid "Sh_rink Text"
-msgstr ""
+msgstr "縮小文字(_R)"
 
 #: ../postler/postler-bureau.vala:408
 msgid "Shrink message text"
-msgstr ""
+msgstr "縮小訊息文字"
 
 #: ../postler/postler-bureau.vala:409
 msgid "_Reset Text size"
@@ -469,24 +469,24 @@ msgstr "重試文字大小(_R)"
 
 #: ../postler/postler-bureau.vala:410
 msgid "Reset the message text size"
-msgstr ""
+msgstr "重設訊息文字大小"
 
 #: ../postler/postler-bureau.vala:412
 msgid "View the message in fullscreen"
-msgstr ""
+msgstr "以全螢幕檢視訊息"
 
 #: ../postler/postler-bureau.vala:413
 #: ../postler/postler-content.vala:328
 msgid "View _Source"
-msgstr ""
+msgstr "檢視來源(_S)"
 
 #: ../postler/postler-bureau.vala:414
 msgid "View the source of the message"
-msgstr ""
+msgstr "檢視訊息的來源"
 
 #: ../postler/postler-bureau.vala:416
 msgid "Setup a new account