[Xfce4-commits] www:master l10n: Updated Spanish (Castilian) (es) translation to 99%
Updating branch refs/heads/master to e88738a5e08ff141ef5a0572bf9d3ec6fe9e91bd (commit) from 0d460c0f96680c9851b3afa1a8891a7f19f21196 (commit) commit e88738a5e08ff141ef5a0572bf9d3ec6fe9e91bd Author: Daniel Durante danieldura...@ymail.com Date: Wed Jul 4 14:12:23 2012 +0200 l10n: Updated Spanish (Castilian) (es) translation to 99% New status: 669 messages complete with 4 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). lib/po/es.po |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/po/es.po b/lib/po/es.po index 02f508a..d75e11a 100644 --- a/lib/po/es.po +++ b/lib/po/es.po @@ -8,7 +8,7 @@ msgstr Project-Id-Version: www.xfce.org\n Report-Msgid-Bugs-To: https://bugzilla.xfce.org\n; POT-Creation-Date: 2011-09-26 18:33+0200\n -PO-Revision-Date: 2012-06-12 20:56+0100\n +PO-Revision-Date: 2012-07-04 14:11+0100\n Last-Translator: Daniel Durante danieldura...@ymail.com\n Language-Team: Spanish\n MIME-Version: 1.0\n @@ -2106,10 +2106,10 @@ msgstr Una buena práctica para el coordinador es comprobar las traducciones an msgid Statistics msgstr Estadisticas +# En Curso #: getinvolved/translation.php:85 -#, fuzzy msgid Transifex provides statistics per language and per project. The a href=\https://translations.xfce.org/projects/p/xfce/\;Xfce collection project/a view is the most interesting as it lets you know if the core projects are fully translated. An overview of the language stats in Xfce core master are a href=\https://translations.xfce.org/projects/p/xfce/r/master/\;here/a. It is also possible to get to such a page by going to the a href=\https://translations.xfce.org/languages/\;language page/a first and picking up your language than a collection. The collection quot;Xfcequot; has several components for the different stable versions (emxfce-4.4/em, emxfce-4.6/em, etc) and one for the development branch (emmaster/em). The other collections, for example Applications, have usually only development components as they aren't part of any official Xfce releases. -msgstr Transifex proporciona estadísticas por idioma y por proyecto. La a href=\https://translations.xfce.org/projects/p/xfce/\;colección de Xfce proyecto de/a punto de vista es el más interesante, ya que le permite saber si los proyectos básicos están completamente traducidos. Una visión general de las estadísticas de idiomas en Xfce núcleo principal está a href=\https://translations.xfce.org/projects/p/xfce/r/master/\;aquí/a . También es posible llegar a una página, vaya a la a href=\https://translations.xfce.org/languages/\;página del idioma/a primero y recoger su lengua de una colección. La colección \Xfce\ tiene varios componentes para las diferentes versiones estables em(xfce-4.4, xfce-4.6,/em etc) y otro para la rama de desarrollo em(maestro)./em Las otras colecciones, por ejemplo, aplicaciones, tienen componentes de desarrollo por lo general sólo, ya que no son parte de cualquier comunicado de Xfce oficial. +msgstr Transifex proporciona estadísticas por idioma y por proyecto. La vista dea href=\https://translations.xfce.org/projects/p/xfce/\;colección del proyecto Xfce/a resulta más interesante en la medida en que le permite saber si los proyectos principales están completamente traducidos. Puede encontrar una visión general de las estadísticas de idiomas del núcleo principal de Xfce a href=\https://translations.xfce.org/projects/p/xfce/r/master/\;aquí/a . También es posible acceder a una página, mediante la a href=\https://translations.xfce.org/languages/\;página del idioma/a primero y posterior acceso al contenido. La colección \Xfce\ tiene varios componentes para las diferentes versiones estables em(xfce-4.4, xfce-4.6,/em etc) y otro para la rama de desarrollo (emmaestro/em) Las otras colecciones, las aplicaciones por ejemplo, tienen por lo general sólo componentes, ya que no son parte de lanzamientos oficiales de Xfcel. #: getinvolved/translation.php:88 msgid Downloading Translations @@ -2695,9 +2695,8 @@ msgid We also improved our settings dialogs. The display configuration dialog n msgstr También hemos mejorado nuestra configuración de los cuadros de diálogo. El diálogo de configuración de la pantalla ahora es compatible con RandR 1.2, detecta automáticamente las pantallas y permite a nuestros usuarios a escoger su favorita resolución, frecuencia de actualización, la rotación. Pantallas se pueden configurar para funcionar en el modo de clonación o colocar uno junto al otro. Selección de teclado se ha convertido en más fácil y más fácil de usar. Además, el editor de configuración manual ha sido actualizado para que sea más funcional. #: news-array.php:21 -#, fuzzy msgid Aside from the features implemented in Xfce, the 4.8 development cycle brought us a bunch of other goodies. For the first time we had a serious release strategy formed after the \Xfce Release and
[Xfce4-commits] xfce4-cpugraph-plugin:master Only set the barcolor if a color was actually specified (bug #9081)
Updating branch refs/heads/master to 8149080cd9798f17821b75a6cd532b3ae2a82bf9 (commit) from 1b4295c483adf48e2e1479cf836552223c7f5220 (commit) commit 8149080cd9798f17821b75a6cd532b3ae2a82bf9 Author: Landry Breuil lan...@xfce.org Date: Wed Jul 4 16:15:20 2012 +0200 Only set the barcolor if a color was actually specified (bug #9081) - instead of trying to detect the theme color, default to not set the bar color. - only save the bar color if it was actually set - make the ui default to gold yellow (this doesnt mean it's applied, the user needs to validate it) panel-plugin/cpu.c| 12 +++- panel-plugin/cpu.h|1 + panel-plugin/properties.c |1 + panel-plugin/settings.c | 17 - 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/panel-plugin/cpu.c b/panel-plugin/cpu.c index c454124..927bb1e 100644 --- a/panel-plugin/cpu.c +++ b/panel-plugin/cpu.c @@ -120,6 +120,7 @@ static CPUGraph * create_gui( XfcePanelPlugin * plugin ) g_signal_connect_after( base-draw_area, expose-event, G_CALLBACK( draw_area_cb ), base ); base-has_bars = FALSE; + base-has_barcolor = FALSE; base-bars = NULL; #ifdef HAS_PANEL_49 @@ -173,10 +174,11 @@ static void create_bars( CPUGraph *base ) { base-bars[i] = GTK_WIDGET(gtk_progress_bar_new()); /* Set bar colors */ - gtk_widget_modify_bg(base-bars[i], GTK_STATE_PRELIGHT, base-colors[4]); - gtk_widget_modify_bg(base-bars[i], GTK_STATE_SELECTED, base-colors[4]); - gtk_widget_modify_base(base-bars[i], GTK_STATE_SELECTED, base-colors[4]); - + if (base-has_barcolor) { + gtk_widget_modify_bg(base-bars[i], GTK_STATE_PRELIGHT, base-colors[4]); + gtk_widget_modify_bg(base-bars[i], GTK_STATE_SELECTED, base-colors[4]); + gtk_widget_modify_base(base-bars[i], GTK_STATE_SELECTED, base-colors[4]); + } gtk_box_pack_end( GTK_BOX(base-box), base-bars[i], FALSE, FALSE, 0 ); gtk_widget_show( base-bars[i] ); } @@ -517,7 +519,7 @@ void set_color( CPUGraph *base, guint number, GdkColor color ) gtk_widget_modify_bg( base-draw_area, GTK_STATE_INSENSITIVE, base-colors[0] ); gtk_widget_modify_bg( base-draw_area, GTK_STATE_NORMAL, base-colors[0] ); } - if( number == 4 base-has_bars ) + if( number == 4 base-has_bars base-has_barcolor ) { n = nb_bars( base ); diff --git a/panel-plugin/cpu.h b/panel-plugin/cpu.h index 527c229..fcd9d85 100644 --- a/panel-plugin/cpu.h +++ b/panel-plugin/cpu.h @@ -54,6 +54,7 @@ typedef struct gboolean has_frame; gboolean has_border; gboolean has_bars; + gboolean has_barcolor; gchar *command; gboolean in_terminal; gboolean startup_notification; diff --git a/panel-plugin/properties.c b/panel-plugin/properties.c index f83c611..53fe0ff 100644 --- a/panel-plugin/properties.c +++ b/panel-plugin/properties.c @@ -330,6 +330,7 @@ static void change_color_0( GtkColorButton * button, CPUGraph * base ) static void change_color_4( GtkColorButton * button, CPUGraph * base ) { + base-has_barcolor = TRUE; change_color( button, base, 4); } diff --git a/panel-plugin/settings.c b/panel-plugin/settings.c index bec6585..8679f2d 100644 --- a/panel-plugin/settings.c +++ b/panel-plugin/settings.c @@ -62,8 +62,6 @@ void read_settings( XfcePanelPlugin * plugin, CPUGraph * base ) GdkColor foreground3; GdkColor background; GdkColor barscolor; - GtkWidget* bar; - GtkStyle* barstyle; guint size; const gchar *associated_command; gboolean in_terminal; @@ -85,11 +83,9 @@ void read_settings( XfcePanelPlugin * plugin, CPUGraph * base ) background.green = 65535; background.blue = 65535; - /* use color from theme for default bar color */ - bar = gtk_progress_bar_new(); - barstyle = gtk_widget_get_style(bar); - barscolor = barstyle-bg[GTK_STATE_SELECTED]; - gtk_widget_destroy(bar); + barscolor.red = 65535; + barscolor.green = 47872; + barscolor.blue = 0; size = xfce_panel_plugin_get_size( plugin ); default_command( associated_command, in_terminal, startup_notification ); @@ -122,8 +118,10 @@ void read_settings( XfcePanelPlugin * plugin, CPUGraph * base ) gdk_color_parse( value, foreground3 ); if( (value = xfce_rc_read_entry( rc, Background, NULL )) ) gdk_color_parse( value, background ); - if( (value = xfce_rc_read_entry( rc, BarsColor, NULL )) ) + if( (value = xfce_rc_read_entry( rc, BarsColor, NULL )) ) {
[Xfce4-commits] xfce4-cpugraph-plugin:master Merge branch 'master' of git://git.xfce.org/panel-plugins/xfce4-cpugraph-plugin
Updating branch refs/heads/master to 4997ef8e1759c8a13179b9602fec39f9eb08544b (commit) from 8149080cd9798f17821b75a6cd532b3ae2a82bf9 (commit) commit 4997ef8e1759c8a13179b9602fec39f9eb08544b Merge: 8149080 97b7109 Author: Landry Breuil lan...@xfce.org Date: Wed Jul 4 16:19:18 2012 +0200 Merge branch 'master' of git://git.xfce.org/panel-plugins/xfce4-cpugraph-plugin commit 97b7109a4647b0db954076f6ec65e123e536f18c Author: Yarema aka Knedlyk yupad...@gmail.com Date: Tue Jul 3 13:46:38 2012 +0200 l10n: Updated Ukrainian (uk) translation to 100% New status: 37 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/uk.po | 76 - 1 files changed, 40 insertions(+), 36 deletions(-) diff --git a/po/uk.po b/po/uk.po index 0d744a5..ffc3fa8 100644 --- a/po/uk.po +++ b/po/uk.po @@ -7,7 +7,7 @@ msgid msgstr Project-Id-Version: xfce4-cpugraph-plugin\n Report-Msgid-Bugs-To: \n -POT-Creation-Date: 2012-04-23 20:45+\n +POT-Creation-Date: 2012-07-03 07:33+\n PO-Revision-Date: 2008-07-28 18:20+0300\n Last-Translator: Dmitry Nikitin luckas...@mail.ru\n Language-Team: Ukrainian xfce4-...@xfce.org\n @@ -18,147 +18,151 @@ msgstr Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 n%10=4 (n%10010 || n%100=20) ? 1 : 2);\n X-Generator: KBabel 1.11.4\n -#: ../panel-plugin/cpu.c:150 ../panel-plugin/cpugraph.desktop.in.h:2 +#: ../panel-plugin/cpu.c:152 ../panel-plugin/cpugraph.desktop.in.h:2 msgid Graphical representation of the CPU load msgstr Графічне представлення завантаження процесора -#: ../panel-plugin/cpu.c:152 +#: ../panel-plugin/cpu.c:154 msgid Copyright (c) 2003-2012\n msgstr Всі права застережено (c) 2003-2012\n -#: ../panel-plugin/cpu.c:359 +#: ../panel-plugin/cpu.c:366 #, c-format msgid Usage: %u%% msgstr Використання: %u%% -#: ../panel-plugin/properties.c:78 +#: ../panel-plugin/properties.c:80 msgid CPU Graph Properties msgstr Налаштування CPU Graph -#: ../panel-plugin/properties.c:96 +#: ../panel-plugin/properties.c:98 msgid Use non-linear time-scale msgstr Використовувати нелінійну шкалу часу -#: ../panel-plugin/properties.c:97 +#: ../panel-plugin/properties.c:99 msgid Show frame msgstr Показувати рамку -#: ../panel-plugin/properties.c:98 +#: ../panel-plugin/properties.c:100 msgid Show border msgstr Показувати рамку -#: ../panel-plugin/properties.c:99 +#: ../panel-plugin/properties.c:101 msgid Show current usage bar msgid_plural Show current usage bars msgstr[0] Показати панель поточного використання msgstr[1] Показати панелі поточного використання msgstr[2] Показати панелі поточного використання -#: ../panel-plugin/properties.c:101 +#: ../panel-plugin/properties.c:103 msgid Run in terminal msgstr Запустити в терміналі -#: ../panel-plugin/properties.c:102 +#: ../panel-plugin/properties.c:104 msgid Use startup notification msgstr Використовувати повідомлення при старті -#: ../panel-plugin/properties.c:105 +#: ../panel-plugin/properties.c:107 msgid Color 1: msgstr Колір 1: -#: ../panel-plugin/properties.c:106 +#: ../panel-plugin/properties.c:108 msgid Color 2: msgstr Колір 2: -#: ../panel-plugin/properties.c:107 +#: ../panel-plugin/properties.c:109 msgid Color 3: msgstr Колір 3: -#: ../panel-plugin/properties.c:108 +#: ../panel-plugin/properties.c:110 msgid Background: msgstr Тло: -#: ../panel-plugin/properties.c:115 +#: ../panel-plugin/properties.c:114 +msgid Bars color: +msgstr Колір стовпчиків: + +#: ../panel-plugin/properties.c:119 msgid Appearance msgstr Вигляд -#: ../panel-plugin/properties.c:117 +#: ../panel-plugin/properties.c:121 msgid Advanced msgstr Додатково -#: ../panel-plugin/properties.c:193 +#: ../panel-plugin/properties.c:197 msgid Fastest (~250ms) msgstr Якнайшвидше (~250мс) -#: ../panel-plugin/properties.c:194 +#: ../panel-plugin/properties.c:198 msgid Fast (~500ms) msgstr Швидко (~500мс) -#: ../panel-plugin/properties.c:195 +#: ../panel-plugin/properties.c:199 msgid Normal (~750ms) msgstr Нормально (~750мс) -#: ../panel-plugin/properties.c:196 +#: ../panel-plugin/properties.c:200 msgid Slow (~1s) msgstr Поволі (~1с) -#: ../panel-plugin/properties.c:200 +#: ../panel-plugin/properties.c:204 msgid Update Interval: msgstr Інтервал поновлення: -#: ../panel-plugin/properties.c:208 +#: ../panel-plugin/properties.c:212 msgid All msgstr Все -#: ../panel-plugin/properties.c:213 +#: ../panel-plugin/properties.c:217 msgid Tracked Core: msgstr Спостереження за ядром: -#: ../panel-plugin/properties.c:224 +#: ../panel-plugin/properties.c:228 msgid Width: msgstr Ширина: -#: ../panel-plugin/properties.c:226 +#: ../panel-plugin/properties.c:230 msgid Height: msgstr Висота: -#: ../panel-plugin/properties.c:240 +#: ../panel-plugin/properties.c:244 msgid Associated command: msgstr Асоційовано з командою: -#:
[Xfce4-commits] xfce4-cpugraph-plugin:master updates for 1.0.5
Updating branch refs/heads/master to ce6263c5febad0c4bc14b286241add2d7fce1be2 (commit) from 4997ef8e1759c8a13179b9602fec39f9eb08544b (commit) commit ce6263c5febad0c4bc14b286241add2d7fce1be2 Author: Landry Breuil lan...@xfce.org Date: Wed Jul 4 16:28:56 2012 +0200 updates for 1.0.5 NEWS|5 + configure.ac.in |2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index d52a449..9fc7ecc 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +1.0.5 (4/7/2012) += +- Only set bar color if a color was actually specified (bug #9081) +- Only set bar color if bars are enabled (bug #9071) + 1.0.4 (2/7/2012) = - Fix FTBFS with panel 4.8 diff --git a/configure.ac.in b/configure.ac.in index 6f4d79f..f538b63 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -5,7 +5,7 @@ dnl dnl 2004 Alexander Nordfelth alex.nordfe...@telia.com dnl -m4_define([cpugraph_version],[1.0.4]) +m4_define([cpugraph_version],[1.0.5]) AC_INIT([xfce4-cpugraph-plugin], [cpugraph_version], [goodies-...@xfce.org]) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-cpugraph-plugin|1.0.5 Creating annotated tag 1.0.5
Updating annotated tag refs/tags/1.0.5 as new annotated tag to a9b0a0c217a7c2e934020c682b6c101f20bd89ee (tag) succeeds 1.0.4-7-g4997ef8 tagged by Landry Breuil lan...@xfce.org on 2012-07-04 16:29 +0200 Landry Breuil (1): updates for 1.0.5 ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-weather-plugin:master Locale support, part 1: Duplicate strings.
Updating branch refs/heads/master to bbedf98a21a4540a1a0bb7d5b1e5862cf7dd2878 (commit) from e278dfc3006b3f4bbba8c4d2c04a3269b358040d (commit) commit bbedf98a21a4540a1a0bb7d5b1e5862cf7dd2878 Author: Harald Judt h.j...@gmx.at Date: Wed Jul 4 17:35:03 2012 +0200 Locale support, part 1: Duplicate strings. Values like temperature, wind speed etc. are returned as immutable strings. That's bad because those values are not printed in the format defined by the user's locale. As a first step, duplicate the strings in get_data() and free them in the calling functions. Remove usage of CHK_NULL from get_unit(), as it would create a memory leak. panel-plugin/weather-data.c| 14 panel-plugin/weather-data.h|2 +- panel-plugin/weather-summary.c | 79 panel-plugin/weather.c | 26 + 4 files changed, 74 insertions(+), 47 deletions(-) diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c index b9290cb..73a7929 100644 --- a/panel-plugin/weather-data.c +++ b/panel-plugin/weather-data.c @@ -25,7 +25,7 @@ #include weather-data.h #include weather.h -#define CHK_NULL(s) ((s) ? (s):) +#define CHK_NULL(s) ((s) ? g_strdup(s):g_strdup()) gboolean has_timeslice(xml_weather *data, time_t start, time_t end) { @@ -38,13 +38,13 @@ gboolean has_timeslice(xml_weather *data, time_t start, time_t end) return FALSE; } -const gchar * +gchar * get_data (xml_time *timeslice, datas type) { const xml_location *loc = NULL; if (timeslice == NULL) - return ; + return g_strdup(); loc = timeslice-location; @@ -60,9 +60,9 @@ get_data (xml_time *timeslice, datas type) case PRESSURE: return CHK_NULL(loc-pressure_value); case WIND_SPEED: - return CHK_NULL( loc-wind_speed_mps); + return CHK_NULL(loc-wind_speed_mps); case WIND_BEAUFORT: - return CHK_NULL( loc-wind_speed_beaufort); + return CHK_NULL(loc-wind_speed_beaufort); case WIND_DIRECTION: return CHK_NULL(loc-wind_dir_name); case WIND_DIRECTION_DEG: @@ -84,7 +84,7 @@ get_data (xml_time *timeslice, datas type) case SYMBOL: return CHK_NULL(loc-symbol); } - return ; + return g_strdup(); } const gchar * @@ -103,7 +103,7 @@ get_unit (xml_time *timeslice, units unit, datas type) case TEMPERATURE: return strcmp(loc-temperature_unit, celcius) ? °F:°C; case PRESSURE: - return CHK_NULL(loc-pressure_unit); + return (loc-pressure_unit) ? loc-pressure_unit : ; case WIND_SPEED: return m/s; case WIND_DIRECTION_DEG: diff --git a/panel-plugin/weather-data.h b/panel-plugin/weather-data.h index 190d726..b43a3fb 100644 --- a/panel-plugin/weather-data.h +++ b/panel-plugin/weather-data.h @@ -52,7 +52,7 @@ typedef enum { NIGHT } daytime; -const gchar * +gchar * get_data (xml_time *timeslice, datas type); const gchar * get_unit (xml_time *timeslice, units unit, datas type); diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c index d250edd..0466775 100644 --- a/panel-plugin/weather-summary.c +++ b/panel-plugin/weather-summary.c @@ -41,10 +41,14 @@ static gboolean lnk_clicked (GtkTextTag *tag, GObject *obj, #define APPEND_TEXT_ITEM_REAL(text) gtk_text_buffer_insert(GTK_TEXT_BUFFER(buffer), \ iter, text, -1);\ g_free (value); -#define APPEND_TEXT_ITEM(text, item) value = g_strdup_printf(\t%s%s%s %s\n,\ - text, text?: :, \ - get_data(timeslice, item), \ - get_unit(timeslice, data-unit, item)); \ +#define APPEND_TEXT_ITEM(text, item) rawvalue = get_data(timeslice, item); \ + unit = get_unit(timeslice, data-unit, item); \ + value = g_strdup_printf(\t%s%s%s%s%s\n, \ + text, text ? : : , \ + rawvalue, \ + strcmp(unit, °) ? : , \ + unit); \ + g_free (rawvalue);\ APPEND_TEXT_ITEM_REAL(value); #define APPEND_LINK_ITEM(prefix, text, url, lnk_tag) \ gtk_text_buffer_insert(GTK_TEXT_BUFFER(buffer), \ @@ -231,12 +235,12 @@
[Xfce4-commits] xfce4-weather-plugin:master Locale support, part 2: Format values.
Updating branch refs/heads/master to 558afb675622f3e11395fc25123e18c07fb8ecfb (commit) from bbedf98a21a4540a1a0bb7d5b1e5862cf7dd2878 (commit) commit 558afb675622f3e11395fc25123e18c07fb8ecfb Author: Harald Judt h.j...@gmx.at Date: Wed Jul 4 17:37:59 2012 +0200 Locale support, part 2: Format values. Format values according to the user's locale setting. panel-plugin/weather-data.c | 27 ++- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c index 73a7929..b67b4ca 100644 --- a/panel-plugin/weather-data.c +++ b/panel-plugin/weather-data.c @@ -26,6 +26,7 @@ #include weather.h #define CHK_NULL(s) ((s) ? g_strdup(s):g_strdup()) +#define LOCALE_DOUBLE(value, format) (g_strdup_printf(format, g_ascii_strtod(value, NULL))) gboolean has_timeslice(xml_weather *data, time_t start, time_t end) { @@ -52,35 +53,35 @@ get_data (xml_time *timeslice, datas type) case ALTITUDE: return CHK_NULL(loc-altitude); case LATITUDE: - return CHK_NULL(loc-latitude); + return LOCALE_DOUBLE(loc-latitude, %.4f); case LONGITUDE: - return CHK_NULL(loc-longitude); + return LOCALE_DOUBLE(loc-longitude, %.4f); case TEMPERATURE: - return CHK_NULL(loc-temperature_value); + return LOCALE_DOUBLE(loc-temperature_value, %.1f); case PRESSURE: - return CHK_NULL(loc-pressure_value); + return LOCALE_DOUBLE(loc-pressure_value, %.1f); case WIND_SPEED: - return CHK_NULL(loc-wind_speed_mps); + return LOCALE_DOUBLE(loc-wind_speed_mps, %.1f); case WIND_BEAUFORT: return CHK_NULL(loc-wind_speed_beaufort); case WIND_DIRECTION: return CHK_NULL(loc-wind_dir_name); case WIND_DIRECTION_DEG: - return CHK_NULL(loc-wind_dir_deg); + return LOCALE_DOUBLE(loc-wind_dir_deg, %.1f); case HUMIDITY: - return CHK_NULL(loc-humidity_value); + return LOCALE_DOUBLE(loc-humidity_value, %.1f); case CLOUDINESS_LOW: - return CHK_NULL(loc-cloudiness_percent[CLOUD_LOW]); + return LOCALE_DOUBLE(loc-cloudiness_percent[CLOUD_LOW], %.1f); case CLOUDINESS_MED: - return CHK_NULL(loc-cloudiness_percent[CLOUD_MED]); + return LOCALE_DOUBLE(loc-cloudiness_percent[CLOUD_MED], %.1f); case CLOUDINESS_HIGH: - return CHK_NULL(loc-cloudiness_percent[CLOUD_HIGH]); + return LOCALE_DOUBLE(loc-cloudiness_percent[CLOUD_HIGH], %.1f); case CLOUDINESS_OVERALL: - return CHK_NULL(loc-cloudiness_percent[CLOUD_OVERALL]); + return LOCALE_DOUBLE(loc-cloudiness_percent[CLOUD_OVERALL], %.1f); case FOG: - return CHK_NULL(loc-fog_percent); + return LOCALE_DOUBLE(loc-fog_percent, %.1f); case PRECIPITATIONS: - return CHK_NULL(loc-precipitation_value); + return LOCALE_DOUBLE(loc-precipitation_value, %.1f); case SYMBOL: return CHK_NULL(loc-symbol); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-weather-plugin:master Locale support, part 3: Format interval times in summary.
Updating branch refs/heads/master to 9467ce9f2b9adf7be98254494a414a26f4d64ca9 (commit) from 558afb675622f3e11395fc25123e18c07fb8ecfb (commit) commit 9467ce9f2b9adf7be98254494a414a26f4d64ca9 Author: Harald Judt h.j...@gmx.at Date: Wed Jul 4 17:38:36 2012 +0200 Locale support, part 3: Format interval times in summary. Format start and end time according to the user's locale setting. panel-plugin/weather-summary.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c index 0466775..be14b0f 100644 --- a/panel-plugin/weather-summary.c +++ b/panel-plugin/weather-summary.c @@ -242,6 +242,8 @@ create_summary_tab (xfceweather_data *data) GtkAdjustment *adj; GtkWidget *weather_channel_icon; xml_time *timeslice; + struct tm *start, *end; + char interval_start[80], interval_end[80]; view = gtk_text_view_new (); gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE); @@ -278,9 +280,13 @@ create_summary_tab (xfceweather_data *data) APPEND_TEXT_ITEM (_(Latitude), LATITUDE); APPEND_TEXT_ITEM (_(Longitude), LONGITUDE); - value = g_strdup_printf (_(\n\tData applies to time interval\n\tfrom %s\tto %s), - ctime(timeslice-start), - ctime(timeslice-end)); + start = localtime(timeslice-start); + strftime (interval_start, 80, %c, start); + end = localtime(timeslice-end); + strftime (interval_end, 80, %c, end); + value = g_strdup_printf (_(\n\tData applies to time interval\n\tfrom %s\n\tto %s\n), + interval_start, + interval_end); APPEND_TEXT_ITEM_REAL (value); /* Temperature */ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-weather-plugin:master Unit conversion: Prepare to use units in get_data().
Updating branch refs/heads/master to d0c0b1c93a3c20eb002b366fc331b1b574c41036 (commit) from 9467ce9f2b9adf7be98254494a414a26f4d64ca9 (commit) commit d0c0b1c93a3c20eb002b366fc331b1b574c41036 Author: Harald Judt h.j...@gmx.at Date: Wed Jul 4 17:41:56 2012 +0200 Unit conversion: Prepare to use units in get_data(). get_data() will be the place to handle conversions from metric to imperial and vice-versa. Prepare this by adding units as a parameter similar to get_unit() and changing all function calls appropriately. panel-plugin/weather-data.c|2 +- panel-plugin/weather-data.h|2 +- panel-plugin/weather-summary.c | 22 +++--- panel-plugin/weather.c | 10 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c index b67b4ca..09cae95 100644 --- a/panel-plugin/weather-data.c +++ b/panel-plugin/weather-data.c @@ -40,7 +40,7 @@ gboolean has_timeslice(xml_weather *data, time_t start, time_t end) } gchar * -get_data (xml_time *timeslice, datas type) +get_data (xml_time *timeslice, units unit, datas type) { const xml_location *loc = NULL; diff --git a/panel-plugin/weather-data.h b/panel-plugin/weather-data.h index b43a3fb..70edc3a 100644 --- a/panel-plugin/weather-data.h +++ b/panel-plugin/weather-data.h @@ -53,7 +53,7 @@ typedef enum { } daytime; gchar * -get_data (xml_time *timeslice, datas type); +get_data (xml_time *timeslice, units unit, datas type); const gchar * get_unit (xml_time *timeslice, units unit, datas type); gboolean diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c index be14b0f..8d2e4b0 100644 --- a/panel-plugin/weather-summary.c +++ b/panel-plugin/weather-summary.c @@ -41,7 +41,7 @@ static gboolean lnk_clicked (GtkTextTag *tag, GObject *obj, #define APPEND_TEXT_ITEM_REAL(text) gtk_text_buffer_insert(GTK_TEXT_BUFFER(buffer), \ iter, text, -1);\ g_free (value); -#define APPEND_TEXT_ITEM(text, item) rawvalue = get_data(timeslice, item); \ +#define APPEND_TEXT_ITEM(text, item) rawvalue = get_data(timeslice, data-unit, item); \ unit = get_unit(timeslice, data-unit, item); \ value = g_strdup_printf(\t%s%s%s%s%s\n, \ text, text ? : : , \ @@ -295,19 +295,19 @@ create_summary_tab (xfceweather_data *data) /* Wind */ APPEND_BTEXT (_(\nWind\n)); - rawvalue = get_data (timeslice, WIND_SPEED); + rawvalue = get_data (timeslice, data-unit, WIND_SPEED); wind = translate_wind_speed (timeslice, rawvalue, data-unit); g_free (rawvalue); - rawvalue = get_data (timeslice, WIND_BEAUFORT); + rawvalue = get_data (timeslice, data-unit, WIND_BEAUFORT); value = g_strdup_printf (_(\t%s: %s (%s on the Beaufort scale)\n), _(Speed), wind, rawvalue); g_free (rawvalue); g_free (wind); APPEND_TEXT_ITEM_REAL (value); - rawvalue = get_data (timeslice, WIND_DIRECTION); + rawvalue = get_data (timeslice, data-unit, WIND_DIRECTION); wind = translate_wind_direction (rawvalue); g_free (rawvalue); - rawvalue = get_data (timeslice, WIND_DIRECTION_DEG); + rawvalue = get_data (timeslice, data-unit, WIND_DIRECTION_DEG); value = g_strdup_printf (\t%s: %s (%s%s)\n, _(Direction), wind, rawvalue, get_unit (timeslice, data-unit, WIND_DIRECTION_DEG)); @@ -455,7 +455,7 @@ make_forecast (xfceweather_data *data, fcdata = make_forecast_data(data-weatherdata, i, daytime); if (fcdata != NULL) { if (fcdata-location != NULL) { -rawvalue = get_data(fcdata, SYMBOL); +rawvalue = get_data(fcdata, data-unit, SYMBOL); icon = get_icon(rawvalue, 48, (daytime == NIGHT)); g_free(rawvalue); image = gtk_image_new_from_pixbuf(icon); @@ -464,7 +464,7 @@ make_forecast (xfceweather_data *data, if (G_LIKELY (icon)) g_object_unref (G_OBJECT (icon)); -rawvalue = get_data(fcdata, SYMBOL); +rawvalue = get_data(fcdata, data-unit, SYMBOL); value = g_strdup_printf(%s, translate_desc(rawvalue, (daytime == NIGHT))); @@ -476,7 +476,7 @@ make_forecast (xfceweather_data *data, TRUE, TRUE, 0); g_free(value); -rawvalue = get_data(fcdata, TEMPERATURE); +rawvalue = get_data(fcdata, data-unit, TEMPERATURE); value =
[Xfce4-commits] xfce4-weather-plugin:master Unit conversion: Convert wind speed.
Updating branch refs/heads/master to 22d07eca6de609a5c1f062787431806456f1233f (commit) from e95ef85f242c6ce778e698b8cf60587daf1bf9ba (commit) commit 22d07eca6de609a5c1f062787431806456f1233f Author: Harald Judt h.j...@gmx.at Date: Wed Jul 4 18:14:12 2012 +0200 Unit conversion: Convert wind speed. Convert meter per second into kilometer per hour (metric system) or miles per hour (imperial system). panel-plugin/weather-data.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c index f8ebe66..a162c59 100644 --- a/panel-plugin/weather-data.c +++ b/panel-plugin/weather-data.c @@ -70,7 +70,12 @@ get_data (xml_time *timeslice, units unit, datas type) case PRESSURE: return LOCALE_DOUBLE(loc-pressure_value, %.1f); case WIND_SPEED: - return LOCALE_DOUBLE(loc-wind_speed_mps, %.1f); + val = g_ascii_strtod(loc-wind_speed_mps, NULL); + if (unit == IMPERIAL) + val *= 2.2369362920544; + else if (unit == METRIC) + val *= 3.6; + return g_strdup_printf(%.1f, val); case WIND_BEAUFORT: return CHK_NULL(loc-wind_speed_beaufort); case WIND_DIRECTION: @@ -115,7 +120,7 @@ get_unit (xml_time *timeslice, units unit, datas type) case PRESSURE: return (loc-pressure_unit) ? loc-pressure_unit : ; case WIND_SPEED: - return m/s; + return (unit == IMPERIAL) ? _(mph) : _(km/h); case WIND_DIRECTION_DEG: case LATITUDE: case LONGITUDE: ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-weather-plugin:master Unit conversion: Convert atmospheric pressure.
Updating branch refs/heads/master to 477b0fbffbe2b4a904712564e7f1de18c0543c2f (commit) from 22d07eca6de609a5c1f062787431806456f1233f (commit) commit 477b0fbffbe2b4a904712564e7f1de18c0543c2f Author: Harald Judt h.j...@gmx.at Date: Wed Jul 4 18:15:36 2012 +0200 Unit conversion: Convert atmospheric pressure. When imperial system is selected, convert atmospheric pressure from hPa into psi. panel-plugin/weather-data.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c index a162c59..162ec66 100644 --- a/panel-plugin/weather-data.c +++ b/panel-plugin/weather-data.c @@ -68,7 +68,12 @@ get_data (xml_time *timeslice, units unit, datas type) val = (val - 32.0) * 5.0 / 9.0; return g_strdup_printf (%.1f, val); case PRESSURE: - return LOCALE_DOUBLE(loc-pressure_value, %.1f); + if (unit == METRIC) + return LOCALE_DOUBLE(loc-pressure_value, %.1f); + val = g_ascii_strtod(loc-pressure_value, NULL); + if (unit == IMPERIAL) + val *= 0.01450378911491; + return g_strdup_printf(%.1f, val); case WIND_SPEED: val = g_ascii_strtod(loc-wind_speed_mps, NULL); if (unit == IMPERIAL) @@ -118,7 +123,7 @@ get_unit (xml_time *timeslice, units unit, datas type) case TEMPERATURE: return (unit == IMPERIAL) ? _(°F) : _(°C); case PRESSURE: - return (loc-pressure_unit) ? loc-pressure_unit : ; + return (unit == IMPERIAL) ? _(psi) : _(hPa); case WIND_SPEED: return (unit == IMPERIAL) ? _(mph) : _(km/h); case WIND_DIRECTION_DEG: ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-weather-plugin:master Unit conversion: Convert precipitation.
Updating branch refs/heads/master to 8f482b8ac315fb9d190a651fca8c3a79c57a1115 (commit) from 477b0fbffbe2b4a904712564e7f1de18c0543c2f (commit) commit 8f482b8ac315fb9d190a651fca8c3a79c57a1115 Author: Harald Judt h.j...@gmx.at Date: Wed Jul 4 18:20:48 2012 +0200 Unit conversion: Convert precipitation. For the imperial system convert precipitation from millimeter to inches. panel-plugin/weather-data.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c index 162ec66..18448b5 100644 --- a/panel-plugin/weather-data.c +++ b/panel-plugin/weather-data.c @@ -100,7 +100,12 @@ get_data (xml_time *timeslice, units unit, datas type) case FOG: return LOCALE_DOUBLE(loc-fog_percent, %.1f); case PRECIPITATIONS: - return LOCALE_DOUBLE(loc-precipitation_value, %.1f); + if (unit == METRIC) + return LOCALE_DOUBLE(loc-precipitation_value, %.1f); + val = g_ascii_strtod(loc-precipitation_value, NULL); + if (unit == IMPERIAL) + val /= 25.4; + return g_strdup_printf(%.3f, val); case SYMBOL: return CHK_NULL(loc-symbol); } @@ -138,7 +143,7 @@ get_unit (xml_time *timeslice, units unit, datas type) case FOG: return %; case PRECIPITATIONS: - return mm; + return (unit == IMPERIAL) ? _(in) : _(mm); case SYMBOL: case WIND_BEAUFORT: case WIND_DIRECTION: ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-weather-plugin:master Unit conversion: Convert altitude.
Updating branch refs/heads/master to c91a9b1ae3df6397ff119bc10de7c967499c7521 (commit) from 8f482b8ac315fb9d190a651fca8c3a79c57a1115 (commit) commit c91a9b1ae3df6397ff119bc10de7c967499c7521 Author: Harald Judt h.j...@gmx.at Date: Wed Jul 4 18:26:02 2012 +0200 Unit conversion: Convert altitude. For the imperial system convert altitude from meter to feet. panel-plugin/weather-data.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/panel-plugin/weather-data.c b/panel-plugin/weather-data.c index 18448b5..9a9a5eb 100644 --- a/panel-plugin/weather-data.c +++ b/panel-plugin/weather-data.c @@ -52,7 +52,11 @@ get_data (xml_time *timeslice, units unit, datas type) switch(type) { case ALTITUDE: - return CHK_NULL(loc-altitude); + if (unit == METRIC) + return LOCALE_DOUBLE(loc-altitude, %.0f); + val = g_ascii_strtod(loc-altitude, NULL); + val /= 0.3048; + return g_strdup_printf(%.2f, val); case LATITUDE: return LOCALE_DOUBLE(loc-latitude, %.4f); case LONGITUDE: @@ -124,7 +128,7 @@ get_unit (xml_time *timeslice, units unit, datas type) switch(type) { case ALTITUDE: - return m; + return (unit == IMPERIAL) ? _(ft) : _(m); case TEMPERATURE: return (unit == IMPERIAL) ? _(°F) : _(°C); case PRESSURE: ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] midori:master Split connecting and adding tabs
Updating branch refs/heads/master to 120f7440f6c6294fce8adfd495b5fcb897cf559e (commit) from 74d711d2bd192872c701d5a454b5595813c4d64c (commit) commit 120f7440f6c6294fce8adfd495b5fcb897cf559e Author: Christian Dywan christ...@twotoasts.de Date: Wed Jul 4 01:18:13 2012 +0200 Split connecting and adding tabs This is necessary to correctly use Granite notebook API. Fixes: https://bugs.launchpad.net/midori/+bug/1020346 midori/midori-browser.c | 55 ++ midori/midori-browser.h |3 ++ midori/midori-view.c| 18 +-- 3 files changed, 45 insertions(+), 31 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index b7cd000..8c6087a 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -254,13 +254,12 @@ static gboolean _toggle_tabbar_smartly (MidoriBrowser* browser, gboolean ignore_fullscreen) { +gboolean has_tabs = midori_browser_get_n_pages (browser) 1; #ifdef HAVE_GRANITE -gboolean has_tabs = !(midori_browser_is_fullscreen (browser) || ignore_fullscreen); +gboolean show_tabs = !(midori_browser_is_fullscreen (browser) || ignore_fullscreen); granite_widgets_dynamic_notebook_set_show_tabs ( -GRANITE_WIDGETS_DYNAMIC_NOTEBOOK (browser-notebook), has_tabs); +GRANITE_WIDGETS_DYNAMIC_NOTEBOOK (browser-notebook), show_tabs); #else -gboolean has_tabs = -gtk_notebook_get_nth_page (GTK_NOTEBOOK (browser-notebook), 1) != NULL; gboolean show_tabs = browser-show_tabs (!midori_browser_is_fullscreen (browser) || ignore_fullscreen) @@ -1522,7 +1521,7 @@ midori_view_search_text_cb (GtkWidget* view, midori_findbar_search_text (MIDORI_FINDBAR (browser-find), view, found, typing); } -static gint +gint midori_browser_get_n_pages (MidoriBrowser* browser) { #ifdef HAVE_GRANITE @@ -1631,20 +1630,13 @@ midori_browser_notebook_size_allocate_cb (GtkWidget* widget, } static void -_midori_browser_add_tab (MidoriBrowser* browser, - GtkWidget* view) +midori_browser_connect_tab (MidoriBrowser* browser, +GtkWidget* view) { -GtkWidget* notebook = browser-notebook; -#ifndef HAVE_GRANITE -GtkWidget* tab_label; -#endif -KatzeItem* item; -guint n; - -gtk_widget_set_can_focus (view, TRUE); -item = midori_view_get_proxy_item (MIDORI_VIEW (view)); +KatzeItem* item = midori_view_get_proxy_item (MIDORI_VIEW (view)); katze_array_add_item (browser-proxy_array, item); +gtk_widget_set_can_focus (view, TRUE); g_object_connect (view, signal::notify::icon, midori_view_notify_icon_cb, browser, @@ -1684,7 +1676,23 @@ _midori_browser_add_tab (MidoriBrowser* browser, midori_view_add_speed_dial_cb, browser, signal::leave-notify-event, midori_browser_tab_leave_notify_event_cb, browser, + signal::destroy, + midori_browser_tab_destroy_cb, browser, NULL); +} + +static void +_midori_browser_add_tab (MidoriBrowser* browser, + GtkWidget* view) +{ +GtkWidget* notebook = browser-notebook; +KatzeItem* item = midori_view_get_proxy_item (MIDORI_VIEW (view)); +#ifndef HAVE_GRANITE +GtkWidget* tab_label; +#endif +guint n; + +midori_browser_connect_tab (browser, view); if (!katze_item_get_meta_boolean (item, append) katze_object_get_boolean (browser-settings, open-tabs-next-to-current)) @@ -1694,6 +1702,8 @@ _midori_browser_add_tab (MidoriBrowser* browser, } else n = -1; +katze_item_set_meta_integer (item, append, -1); + #ifdef HAVE_GRANITE granite_widgets_dynamic_notebook_insert_tab ( GRANITE_WIDGETS_DYNAMIC_NOTEBOOK (notebook), @@ -1707,15 +1717,10 @@ _midori_browser_add_tab (MidoriBrowser* browser, gtk_notebook_insert_page (GTK_NOTEBOOK (notebook), view, tab_label, n); gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (notebook), view, TRUE); gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (notebook), view, TRUE); +midori_browser_notebook_size_allocate_cb (browser-notebook, NULL, browser); #endif -katze_item_set_meta_integer (item, append, -1); - -/* We want the tab to be removed if the widget is destroyed */ -g_signal_connect (view, destroy, -G_CALLBACK (midori_browser_tab_destroy_cb), browser); _midori_browser_update_actions (browser); -midori_browser_notebook_size_allocate_cb (browser-notebook, NULL, browser); } static void @@ -5155,8 +5160,10 @@ midori_browser_notebook_tab_added_cb (GtkWidget* notebook, { GtkWidget* view = midori_view_new_with_item (NULL, browser-settings); midori_view_set_tab (MIDORI_VIEW (view), tab); -gint n =
[Xfce4-commits] midori:master Use optimized code path for current tab
Updating branch refs/heads/master to e8cbe34aeb4e26b79fd2d60547e2f0a15adb5097 (commit) from 120f7440f6c6294fce8adfd495b5fcb897cf559e (commit) commit e8cbe34aeb4e26b79fd2d60547e2f0a15adb5097 Author: Christian Dywan christ...@twotoasts.de Date: Wed Jul 4 23:55:31 2012 +0200 Use optimized code path for current tab midori/midori-browser.c | 29 - 1 files changed, 8 insertions(+), 21 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 8c6087a..a193407 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -1559,13 +1559,7 @@ midori_browser_tab_destroy_cb (GtkWidget* widget, so just create an empty one if the last one is closed. The only exception is when we are closing the window, which is indicated by the proxy array having been unset. */ -#ifdef HAVE_GRANITE -if (midori_browser_get_current_tab (browser) midori_browser_get_n_pages (browser) 0) -g_warning (FIXME granite_widgets_get_current returns NULL); -if (browser-proxy_array !midori_browser_get_n_pages (browser)) -#else if (browser-proxy_array !midori_browser_get_current_tab (browser)) -#endif midori_browser_add_uri (browser, ); return FALSE; } @@ -7822,26 +7816,19 @@ midori_browser_set_current_tab (MidoriBrowser* browser, GtkWidget* midori_browser_get_current_tab (MidoriBrowser* browser) { -gint n; +#ifdef HAVE_GRANITE +GraniteWidgetsTab* tab; +#endif g_return_val_if_fail (MIDORI_IS_BROWSER (browser), NULL); -n = midori_browser_get_current_page (browser); -if (n = 0) -return midori_browser_get_nth_tab (browser, n); #ifdef HAVE_GRANITE -else -{ -GraniteWidgetsTab* tab = granite_widgets_dynamic_notebook_get_current ( -GRANITE_WIDGETS_DYNAMIC_NOTEBOOK (browser-notebook)); -g_warning (FIXME granite_widgets_get_tab_position returns NULL); -if (tab == NULL) -g_warning (granite_widgets_dynamic_notebook_get_current returns NULL); -return tab ? granite_widgets_tab_get_page (tab) : NULL; -} +tab = granite_widgets_dynamic_notebook_get_current ( +GRANITE_WIDGETS_DYNAMIC_NOTEBOOK (browser-notebook)); +return tab ? granite_widgets_tab_get_page (tab) : NULL; #else -else -return NULL; +return midori_browser_get_nth_tab (browser, +midori_browser_get_current_page (browser)); #endif } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] midori:master Refactor handling of link hints
Updating branch refs/heads/master to e1fe41f3d7cc230f62cf255d5fa25a0ea904d2f4 (commit) from e8cbe34aeb4e26b79fd2d60547e2f0a15adb5097 (commit) commit e1fe41f3d7cc230f62cf255d5fa25a0ea904d2f4 Author: Joe Nahmias j...@nahmias.net Date: Sun Feb 5 16:09:02 2012 -0500 Refactor handling of link hints midori/midori-view.c | 234 -- 1 files changed, 131 insertions(+), 103 deletions(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index 485217f..283626c 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -1930,13 +1930,141 @@ midori_view_inspector_window_key_press_event_cb (GtkWidget* window, return FALSE; } +static void +handle_link_hints (WebKitWebView* web_view, + GdkEventKey* event, + MidoriView*view) +{ +gint digit = g_ascii_digit_value (event-keyval); +gchar* result = NULL; +WebKitWebFrame* web_frame = webkit_web_view_get_main_frame (web_view); +JSContextRef js_context = webkit_web_frame_get_global_context (web_frame); + +if (view-find_links 0) +{ +/* Links are currently off, turn them on */ +result = sokoke_js_script_eval (js_context, + var style_func = (function (selector, rule) { + var style = document.createElement ('style'); + style.setAttribute ('type', 'text/css'); + var heads = document.getElementsByTagName ('head'); + heads[0].appendChild (style); + document.styleSheets[0].insertRule (selector + ' ' + rule); + } ); + style_func ('.midoriHKD87346', '{ + font-size:small !important; font-weight:bold !important; + z-index:500; border-radius:0.3em; line-height:1 !important; + background: white !important; color: black !important; + border:1px solid gray; padding:0 0.1em !important; + position:absolute; display:inline !important; }'); + style_func ('.midori_access_key_fc04de', '{ + font-size:small !important; font-weight:bold !important; + z-index:500; border-radius:0.3em; line-height:1 !important; + background: black !important; color: white !important; + border:1px solid gray; padding:0 0.1em 0.2em 0.1em !important; + position:absolute; display:inline !important; }'); + var label_count = 0; + for (i in document.links) { + if (document.links[i].href document.links[i].insertBefore) { + var child = document.createElement ('span'); + if (document.links[i].accessKey isNaN (document.links[i].accessKey)) { + child.setAttribute ('class', 'midori_access_key_fc04de'); + child.appendChild (document.createTextNode (document.links[i].accessKey)); + } else { + child.setAttribute ('class', 'midoriHKD87346'); + child.appendChild (document.createTextNode (label_count)); + label_count++; + } + document.links[i].insertBefore (child); } }, +NULL); +view-find_links = 0; /* Links are now on */ +g_free (result); +return; +} + +if (event-keyval == '.') +{ +/* Pressed '.' with links on, so turn them off */ +result = sokoke_js_script_eval (js_context, +var links = document.getElementsByClassName ('midoriHKD87346'); +for (var i = links.length - 1; i = 0; i--) { + var parent = links[i].parentNode; + parent.removeChild(links[i]); }, +NULL); +g_free (result); +result = sokoke_js_script_eval (js_context, +var links = document.getElementsByClassName ('midori_access_key_fc04de'); +if (links != undefined links.length 0) { + for (var i = links.length - 1; i = 0; i--) { + var parent = links[i].parentNode; + parent.removeChild(links[i]); } }, +NULL); +g_free (result); +view-find_links = -1; +return; +} + +/* Links are already on at this point, so process the input character */ + +if (digit != -1 event-keyval != GDK_KEY_Return event-keyval != GDK_KEY_Escape) +{ +/* Got a digit, add it to the link count/ number */ +if (view-find_links 0) +view-find_links *= 10; +view-find_links += digit; +return; +} + +if (event-keyval == GDK_KEY_Escape) +{ +// Clear the link count/number +view-find_links = 0; +return; +} + +if (event-keyval == GDK_KEY_Return) +{ +/* Return pressed, grab URI if we have a link with the entered number */ +gchar* script = g_strdup_printf ( +var links = document.getElementsByClassName
[Xfce4-commits] midori:master Handle link hints that use an accessKey
Updating branch refs/heads/master to 21b643c8255bbdab29631d39f3f2bffb9f347166 (commit) from e1fe41f3d7cc230f62cf255d5fa25a0ea904d2f4 (commit) commit 21b643c8255bbdab29631d39f3f2bffb9f347166 Author: Joe Nahmias j...@nahmias.net Date: Sun Feb 5 16:45:32 2012 -0500 Handle link hints that use an accessKey Fixes: https://bugs.launchpad.net/midori/+bug/927277 midori/midori-view.c | 29 - 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index 283626c..4f67687 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -1936,6 +1936,7 @@ handle_link_hints (WebKitWebView* web_view, MidoriView*view) { gint digit = g_ascii_digit_value (event-keyval); +gunichar uc = gdk_keyval_to_unicode (event-keyval); gchar* result = NULL; WebKitWebFrame* web_frame = webkit_web_view_get_main_frame (web_view); JSContextRef js_context = webkit_web_frame_get_global_context (web_frame); @@ -2022,7 +2023,33 @@ handle_link_hints (WebKitWebView* web_view, return; } -if (event-keyval == GDK_KEY_Return) +if (g_unichar_isalpha (uc)) +{ +/* letter pressed if we have a corresponding accessKey and grab URI */ +gchar* script = NULL; +gchar* utf8 = NULL; +gulong sz = g_unichar_to_utf8 (uc, NULL); + +utf8 = g_malloc0 (sz); +g_unichar_to_utf8 (uc, utf8); +script = g_strdup_printf ( +var l = 'undefined'; +for (i in document.links) { + if ( document.links[i].href +document.links[i].accessKey == \%s\ ) + { + l = document.links[i].href; + break; + } +} +if (l != 'undefined') { l; } +,utf8,utf8 +); +g_free (utf8); +result = sokoke_js_script_eval (js_context, script, NULL); +g_free (script); +} +else if (event-keyval == GDK_KEY_Return) { /* Return pressed, grab URI if we have a link with the entered number */ gchar* script = g_strdup_printf ( ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-battery-plugin:master l10n: New Serbian translation, author salepetronije
Updating branch refs/heads/master to f3fc6757d7a73637061a60e6c59d77521ff14b1c (commit) from 0b412e66ed487f0d7d171ccff56455335d6c557e (commit) commit f3fc6757d7a73637061a60e6c59d77521ff14b1c Author: Мирослав Николић miroslavniko...@rocketmail.com Date: Thu Jul 5 07:53:51 2012 +0200 l10n: New Serbian translation, author salepetronije New status: 43 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/sr.po | 207 ++ 1 files changed, 207 insertions(+), 0 deletions(-) diff --git a/po/sr.po b/po/sr.po new file mode 100644 index 000..e06d3ff --- /dev/null +++ b/po/sr.po @@ -0,0 +1,207 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# salepetronije salepetron...@gmail.com, 2012. +# Мирослав Николић miroslavniko...@rocketmail.com, 2012. +msgid +msgstr +Project-Id-Version: master\n +Report-Msgid-Bugs-To: \n +POT-Creation-Date: 2012-06-19 11:36+\n +PO-Revision-Date: 2012-07-05 07:48+0200\n +Last-Translator: Мирослав Николић miroslavniko...@rocketmail.com\n +Language-Team: Serbian g...@prevod.org\n +Language: sr\n +MIME-Version: 1.0\n +Content-Type: text/plain; charset=UTF-8\n +Content-Transfer-Encoding: 8bit\n +Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 n% +10=4 (n%10010 || n%100=20) ? 1 : 2);\n +X-Generator: Virtaal 0.7.1\n + +#: ../panel-plugin/battery.c:536 +msgid (No battery, AC on-line) +msgstr (Нема батерије, напајање са мреже) + +#: ../panel-plugin/battery.c:538 +msgid (Charging from AC) +msgstr (Пуним са мреже) + +#: ../panel-plugin/battery.c:538 +msgid (AC on-line) +msgstr (Мрежно напајање је прикључено) + +#: ../panel-plugin/battery.c:548 +#, c-format +msgid %d%% (%02d:%02d) remaining +msgstr %d%% (%02d:%02d) преостало + +#: ../panel-plugin/battery.c:550 +#, c-format +msgid %02d:%02d remaining +msgstr %02d:%02d преостало + +#: ../panel-plugin/battery.c:552 +#, c-format +msgid %d%% remaining +msgstr %d%% преостало + +#: ../panel-plugin/battery.c:554 +#, c-format +msgid AC off-line +msgstr Мрежно напајање је искључено + +#: ../panel-plugin/battery.c:624 +msgid +WARNING: Your battery has reached critical status. You should plug in or +shutdown your computer now to avoid possible data loss. +msgstr +УПОЗОРЕЊЕ: Ваша батерија је у критичном стању. Треба да прикључите мрежно +напајање или да угасите рачунар сада да бисте избегли могућност губљења +података. + +#: ../panel-plugin/battery.c:642 +msgid +WARNING: Your battery is running low. You should consider plugging in or +shutting down your computer soon to avoid possible data loss. +msgstr +УПОЗОРЕЊЕ: Ваша батерија се празни. Треба да размотрите прикључивање мрежног +напајања или гашење вашег рачунара да бисте избегли могуће губљење +података. + +#: ../panel-plugin/battery.c:678 +msgid Battery +msgstr Батерија + +#: ../panel-plugin/battery.c:1207 +msgid Select file +msgstr Изабери датотеку + +#: ../panel-plugin/battery.c:1248 +msgid Select command +msgstr Изабери наредбу + +#: ../panel-plugin/battery.c:1263 +msgid Select color +msgstr Изабери боју + +#: ../panel-plugin/battery.c:1305 +#, c-format +msgid Unable to open the following url: %s +msgstr Не могу да отворим следећу адресу: %s + +#: ../panel-plugin/battery.c:1330 ../panel-plugin/battery.desktop.in.h:1 +msgid Battery Monitor +msgstr Надзор батерије + +#: ../panel-plugin/battery.c:1337 +msgid Properties +msgstr Својства + +#: ../panel-plugin/battery.c:1363 +msgid On AC: +msgstr Мрежно напајање: + +#: ../panel-plugin/battery.c:1380 +msgid Battery high: +msgstr Батерија је пуна: + +#: ../panel-plugin/battery.c:1397 +msgid Battery low: +msgstr Батерија је празна: + +#: ../panel-plugin/battery.c:1414 +msgid Battery critical: +msgstr Батерија је критична: + +#: ../panel-plugin/battery.c:1428 +msgid Bar _colors +msgstr Боја _траке + +#: ../panel-plugin/battery.c:1442 +msgid Low percentage: +msgstr Низак напон: + +#: ../panel-plugin/battery.c:1455 +msgid Low battery action: +msgstr Радња при ниском напону: + +#: ../panel-plugin/battery.c:1461 ../panel-plugin/battery.c:1513 +msgid Do nothing +msgstr Не ради ништа + +#: ../panel-plugin/battery.c:1463 ../panel-plugin/battery.c:1515 +msgid Display a warning message +msgstr Прикажи поруку упозорења + +#: ../panel-plugin/battery.c:1465 ../panel-plugin/battery.c:1517 +msgid Run command +msgstr Покрени наредбу + +#: ../panel-plugin/battery.c:1467 ../panel-plugin/battery.c:1519 +msgid Run command in terminal +msgstr Покрени наредбу у терминалу + +#: ../panel-plugin/battery.c:1480 ../panel-plugin/battery.c:1531 +msgid Command: +msgstr Наредба: + +#: ../panel-plugin/battery.c:1494 +msgid Critical percentage: +msgstr Критичан проценат: + +#: ../panel-plugin/battery.c:1507 +msgid Critical battery action: +msgstr Радња критичног нивоа батерије: + +#: