[Xfce4-commits] Reworked indicator entry sorting
Updating branch refs/heads/andrzejr/tmp3 to 23dfad6c95ba2502b2c5d6b0c26722c3e09ff59e (commit) from 8c1c94439f5f7ba5e91f9c63ea7307c885de092c (commit) commit 23dfad6c95ba2502b2c5d6b0c26722c3e09ff59e Author: Andrzej Date: Fri Mar 22 01:37:16 2013 + Reworked indicator entry sorting Special case for libapplication.so, where entries have non-unique location fields. Sorting them by name (at least the order is same every time the panel is started). panel-plugin/indicator-box.c | 31 +-- 1 files changed, 25 insertions(+), 6 deletions(-) diff --git a/panel-plugin/indicator-box.c b/panel-plugin/indicator-box.c index c39435e..4c9ae90 100644 --- a/panel-plugin/indicator-box.c +++ b/panel-plugin/indicator-box.c @@ -170,21 +170,38 @@ xfce_indicator_box_sort_buttons (gconstpointer a, XfceIndicatorButton *a0 = XFCE_INDICATOR_BUTTON (a); XfceIndicatorButton *b0 = XFCE_INDICATOR_BUTTON (b); guinta1, b1; + const gchar *a_io; + gint result = 0; a1 = xfce_indicator_button_get_pos (a0); b1 = xfce_indicator_button_get_pos (b0); + /* only need one */ + a_io = xfce_indicator_button_get_io_name (a0); + + // printf ("=== %s, %s; %s, %s; %d, %d", xfce_indicator_button_get_io_name (a0), xfce_indicator_button_get_io_name (b0), xfce_indicator_button_get_entry (a0)->name_hint, xfce_indicator_button_get_entry (b0)->name_hint, a1, b1); + + /* special case for Application indicators (unreliable ordering) */ + /* always compare by name and ignore location field */ + if (a_io != NULL && g_strcmp0 (a_io, "libapplication.so") == 0) +result = g_strcmp0 (xfce_indicator_button_get_entry(a0)->name_hint, +xfce_indicator_button_get_entry(b0)->name_hint); + /* group all entries with location==0 at the beginning of the list * but don't sort them (they may depend on insertion order) */ + if (result == 0 && (a1 != 0 || b1 != 0)) +result = a1-b1; + /* if there are two entries with the same non-zero location * try to resolve their order by their name_hint */ - if (a1 != 0 && a1 == b1) -return -g_strcmp0 (xfce_indicator_button_get_entry(a0)->name_hint, - xfce_indicator_button_get_entry(b0)->name_hint); - /* else, use the location field */ - return (a1-b1); + if (result == 0) +result = g_strcmp0 (xfce_indicator_button_get_entry(a0)->name_hint, + xfce_indicator_button_get_entry(b0)->name_hint); + + // printf (" -> %d\n", result); + return result; } @@ -204,7 +221,9 @@ xfce_indicator_box_add (GtkContainer *container, io_name = xfce_indicator_button_get_io_name (button); li = g_hash_table_lookup (box->children, io_name); - if (xfce_indicator_button_get_pos (button) == 0) + // printf (" +++ %s %s\n", io_name, xfce_indicator_button_get_entry (button)->name_hint); + if (g_strcmp0 (io_name, "libapplication.so") != 0 && + xfce_indicator_button_get_pos (button) == 0) li = g_list_append (li, button); else li = g_list_insert_sorted (li, button, xfce_indicator_box_sort_buttons); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Using 22px icon size by default.
Updating branch refs/heads/andrzejr/tmp3 to 8c1c94439f5f7ba5e91f9c63ea7307c885de092c (commit) from dd4f96d9db59a24ad421fc13e8c633a384ce92a4 (commit) commit 8c1c94439f5f7ba5e91f9c63ea7307c885de092c Author: Andrzej Date: Fri Mar 22 00:36:35 2013 + Using 22px icon size by default. This is the size of icons most (all?) indicators provide. panel-plugin/indicator-button.c |2 +- panel-plugin/indicator-config.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panel-plugin/indicator-button.c b/panel-plugin/indicator-button.c index 0508674..8b269a6 100644 --- a/panel-plugin/indicator-button.c +++ b/panel-plugin/indicator-button.c @@ -465,7 +465,7 @@ xfce_indicator_button_get_icon_size (XfceIndicatorButton *button) gint border_thickness; GtkStyle*style; - g_return_val_if_fail (XFCE_IS_INDICATOR_BUTTON (button), 24); + g_return_val_if_fail (XFCE_IS_INDICATOR_BUTTON (button), 22); indicator_size = xfce_indicator_button_get_size (button); diff --git a/panel-plugin/indicator-config.c b/panel-plugin/indicator-config.c index c4bcf16..d5f5cda 100644 --- a/panel-plugin/indicator-config.c +++ b/panel-plugin/indicator-config.c @@ -45,7 +45,7 @@ -#define DEFAULT_ICON_SIZE_MAX 24 +#define DEFAULT_ICON_SIZE_MAX 22 #define DEFAULT_ALIGN_LEFT FALSE #define DEFAULT_EXCLUDED_MODULES NULL #define DEFAULT_ORIENTATIONGTK_ORIENTATION_HORIZONTAL ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Added an About dialog.
Updating branch refs/heads/andrzejr/tmp3 to dd4f96d9db59a24ad421fc13e8c633a384ce92a4 (commit) from bc0abf05233f99011c77d4d6dd27943059be37bd (commit) commit dd4f96d9db59a24ad421fc13e8c633a384ce92a4 Author: Andrzej Date: Fri Mar 22 00:31:56 2013 + Added an About dialog. panel-plugin/indicator.c | 32 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/panel-plugin/indicator.c b/panel-plugin/indicator.c index d5d56f8..26d0ebb 100644 --- a/panel-plugin/indicator.c +++ b/panel-plugin/indicator.c @@ -53,6 +53,7 @@ static void indicator_construct (XfcePanelPlu static void indicator_free (XfcePanelPlugin *plugin); static gboolean load_module(const gchar *name, IndicatorPlugin *indicator); +static void indicator_show_about (XfcePanelPlugin *plugin); static void indicator_configure_plugin (XfcePanelPlugin *plugin); static gboolean indicator_size_changed (XfcePanelPlugin *plugin, gint size); @@ -99,6 +100,7 @@ indicator_class_init (IndicatorPluginClass *klass) plugin_class->construct = indicator_construct; plugin_class->free_data = indicator_free; plugin_class->size_changed = indicator_size_changed; + plugin_class->about = indicator_show_about; plugin_class->configure_plugin = indicator_configure_plugin; #ifdef HAS_PANEL_49 plugin_class->mode_changed = indicator_mode_changed; @@ -135,6 +137,35 @@ indicator_free (XfcePanelPlugin *plugin) static void +indicator_show_about (XfcePanelPlugin *plugin) +{ + GdkPixbuf *icon; + + const gchar *auth[] = { + "Mark Trompell ", "Andrzej Radecki ", + "Lionel Le Folgoc ", "Jason Conti ", + "Nick Schermer ", "Evgeni Golov ", NULL }; + + g_return_if_fail (XFCE_IS_INDICATOR_PLUGIN (plugin)); + + icon = xfce_panel_pixbuf_from_source("xfce4-indicator-plugin", NULL, 32); + gtk_show_about_dialog(NULL, + "logo", icon, + "license", xfce_get_license_text (XFCE_LICENSE_TEXT_GPL), + "version", PACKAGE_VERSION, + "program-name", PACKAGE_NAME, + "comments", _("An indicator of something that needs your attention on the desktop"), + "website", "http://goodies.xfce.org/projects/panel-plugins/xfce4-indicator-plugin";, + "copyright", _("Copyright (c) 2009-2013\n"), + "authors", auth, NULL); + + if(icon) + g_object_unref(G_OBJECT(icon)); +} + + + +static void indicator_configure_plugin (XfcePanelPlugin *plugin) { IndicatorPlugin *indicator = XFCE_INDICATOR_PLUGIN (plugin); @@ -202,6 +233,7 @@ indicator_construct (XfcePanelPlugin *plugin) GtkWidget*label; xfce_panel_plugin_menu_show_configure (plugin); + xfce_panel_plugin_menu_show_about (plugin); /* setup transation domain */ xfce_textdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8"); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fixed crash on Xfce 4.8 (no xfce_dialog_show_help)
Updating branch refs/heads/andrzejr/tmp3 to bc0abf05233f99011c77d4d6dd27943059be37bd (commit) from 8eb305349bff65313d8300defa8918675cc38bf6 (commit) commit bc0abf05233f99011c77d4d6dd27943059be37bd Author: Andrzej Date: Fri Mar 22 00:30:15 2013 + Fixed crash on Xfce 4.8 (no xfce_dialog_show_help) Online help doesn't seem to work anyway (no page on docs.xfce.org for non-core plugins), so for now have reverted to goodies.xfce.org. panel-plugin/indicator-dialog.c | 75 +-- 1 files changed, 56 insertions(+), 19 deletions(-) diff --git a/panel-plugin/indicator-dialog.c b/panel-plugin/indicator-dialog.c index 7422231..39280b5 100644 --- a/panel-plugin/indicator-dialog.c +++ b/panel-plugin/indicator-dialog.c @@ -41,6 +41,13 @@ #include "indicator-dialog.h" #include "indicator-dialog_ui.h" +#define PLUGIN_WEBSITE "http://goodies.xfce.org/projects/panel-plugins/xfce4-indicator-plugin"; + +#ifdef LIBXFCE4UI_CHECK_VERSION +#if LIBXFCE4UI_CHECK_VERSION (4,9,0) +#define HAS_ONLINE_HELP +#endif +#endif /* known indicator names */ @@ -60,10 +67,12 @@ static const gchar *pretty_names[][3] = #define ICON_SIZE (22) -static void indicator_dialog_build (IndicatorDialog *dialog); -static void indicator_dialog_response(GtkWidget *window, - gint response_id, - IndicatorDialog *dialog); +static void indicator_dialog_build (IndicatorDialog *dialog); +static void indicator_dialog_close_button_clicked (IndicatorDialog *dialog, + GtkWidget *button); + +static void indicator_dialog_help_button_clicked (IndicatorDialog *dialog, + GtkWidget *button); @@ -454,8 +463,18 @@ indicator_dialog_build (IndicatorDialog *dialog) dialog->dialog = gtk_builder_get_object (builder, "dialog"); g_return_if_fail (XFCE_IS_TITLED_DIALOG (dialog->dialog)); - g_signal_connect (G_OBJECT (dialog->dialog), "response", -G_CALLBACK (indicator_dialog_response), dialog); + + object = gtk_builder_get_object (builder, "close-button"); + g_return_if_fail (GTK_IS_BUTTON (object)); + g_signal_connect_swapped (G_OBJECT (object), "clicked", +G_CALLBACK (indicator_dialog_close_button_clicked), +dialog); + + object = gtk_builder_get_object (builder, "help-button"); + g_return_if_fail (GTK_IS_BUTTON (object)); + g_signal_connect_swapped (G_OBJECT (object), "clicked", +G_CALLBACK (indicator_dialog_help_button_clicked), +dialog); object = gtk_builder_get_object (builder, "size-max"); g_return_if_fail (GTK_IS_WIDGET (object)); @@ -518,23 +537,41 @@ indicator_dialog_build (IndicatorDialog *dialog) static void -indicator_dialog_response (GtkWidget*window, - gint response_id, - IndicatorDialog *dialog) +indicator_dialog_close_button_clicked (IndicatorDialog *dialog, + GtkWidget *button) { - g_return_if_fail (GTK_IS_DIALOG (window)); g_return_if_fail (XFCE_IS_INDICATOR_DIALOG (dialog)); + g_return_if_fail (GTK_IS_BUTTON (button)); + g_return_if_fail (GTK_IS_WINDOW (dialog->dialog)); - if (response_id == GTK_RESPONSE_HELP) -{ - xfce_dialog_show_help (GTK_WINDOW (window), "xfce4-indicator", "dialog", NULL); -} - else -{ - gtk_widget_destroy (window); + gtk_widget_destroy (GTK_WIDGET (dialog->dialog)); + g_object_unref (G_OBJECT (dialog)); +} - g_object_unref (G_OBJECT (dialog)); -} + +static void +indicator_dialog_help_button_clicked (IndicatorDialog *dialog, + GtkWidget *button) +{ + //#ifndef HAS_ONLINE_HELP + gboolean result; + //#endif + + g_return_if_fail (XFCE_IS_INDICATOR_DIALOG (dialog)); + g_return_if_fail (GTK_IS_BUTTON (button)); + g_return_if_fail (GTK_IS_WINDOW (dialog->dialog)); + + /* Doesn't seem to work */ + //#ifdef HAS_ONLINE_HELP + //xfce_dialog_show_help (GTK_WINDOW (dialog->dialog), "xfce4-indicator", "dialog", NULL); + //#else + + result = g_spawn_command_line_async ("exo-open --launch WebBrowser " PLUGIN_WEBSITE, NULL); + + if (G_UNLIKELY (result == FALSE)) +g_warning (_("Unable to open the following url: %s"), PLUGIN_WEBSITE); + + //#endif } ___ Xfce4-com
[Xfce4-commits] Fix 'description' in about.css; it's used via its 'id'
Updating branch refs/heads/master to 7e6fadd3c019300bd8314ee2adc15435db2ad547 (commit) from d05d868f4e7aa426f65c77a09a1e135c0a29917a (commit) commit 7e6fadd3c019300bd8314ee2adc15435db2ad547 Author: Christian Dywan Date: Thu Mar 21 18:09:08 2013 +0100 Fix 'description' in about.css; it's used via its 'id' data/about.css |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/data/about.css b/data/about.css index ff9e0d4..138ef0a 100644 --- a/data/about.css +++ b/data/about.css @@ -66,6 +66,6 @@ button img { word-wrap: break-word; } -description { +#description { font-size: 1em; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Context menu: Resolve mnemonic conflict for Refresh and Remove (bug #9911).
Updating branch refs/heads/master to 4e911b63099a3dcf26d5fe49ba0397e90b62e1d6 (commit) from 72fdfaec8c9b4c65af6ec9123d7ef910df755f99 (commit) commit 4e911b63099a3dcf26d5fe49ba0397e90b62e1d6 Author: Harald Judt Date: Thu Mar 21 15:29:10 2013 +0100 Context menu: Resolve mnemonic conflict for Refresh and Remove (bug #9911). Stock menu items share mnemonics, so we need to build our own Refresh menu item. Use "Re_fresh" and keep "_Remove" for consistency with other plugins. Translators will have to care about "Re_fresh" now. panel-plugin/weather.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c index 1c8f438..a4429c9 100644 --- a/panel-plugin/weather.c +++ b/panel-plugin/weather.c @@ -1726,9 +1726,9 @@ xfceweather_create_control(XfcePanelPlugin *plugin) plugin_data *data = g_slice_new0(plugin_data); SoupURI *soup_proxy_uri; const gchar *proxy_uri; -GtkWidget *refresh; -data_types lbl; +GtkWidget *refresh, *refresh_icon; GdkPixbuf *icon = NULL; +data_types lbl; /* Initialize with sane default values */ data->plugin = plugin; @@ -1822,7 +1822,10 @@ xfceweather_create_control(XfcePanelPlugin *plugin) /* add refresh button to right click menu, for people who missed the middle mouse click feature */ -refresh = gtk_image_menu_item_new_from_stock("gtk-refresh", NULL); +refresh = gtk_image_menu_item_new_with_mnemonic(_("Re_fresh")); +refresh_icon = gtk_image_new_from_stock(GTK_STOCK_REFRESH, +GTK_ICON_SIZE_MENU); +gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(refresh), refresh_icon); gtk_widget_show(refresh); g_signal_connect(G_OBJECT(refresh), "activate", G_CALLBACK(mi_click), data); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] l10n: Updated Italian (it) translation to 100%
Updating branch refs/heads/master to 43e142830cb10a7cd056df72a84e567e69ce7441 (commit) from 15366b7d4909fefb796264e1c7747867897d79b5 (commit) commit 43e142830cb10a7cd056df72a84e567e69ce7441 Author: Edoardo Maria Elidoro Date: Thu Mar 21 15:24:17 2013 +0100 l10n: Updated Italian (it) translation to 100% New status: 391 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/it.po | 60 +--- 1 files changed, 33 insertions(+), 27 deletions(-) diff --git a/po/it.po b/po/it.po index 26bdde2..3c01701 100644 --- a/po/it.po +++ b/po/it.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: xfce4-panel 4.7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-06 10:51+\n" +"POT-Creation-Date: 2013-03-21 09:18+\n" "PO-Revision-Date: 2011-10-29 12:18+0100\n" "Last-Translator: Cristian Marchi \n" "Language-Team: Italian Translation Team \n" @@ -991,7 +991,7 @@ msgstr "Selezionare un'icona" #: ../plugins/applicationsmenu/applicationsmenu.c:603 #: ../plugins/applicationsmenu/applicationsmenu.c:844 -#: ../plugins/clock/clock.c:852 ../plugins/launcher/launcher.c:2308 +#: ../plugins/clock/clock.c:865 ../plugins/launcher/launcher.c:2308 #, c-format msgid "Failed to execute command \"%s\"." msgstr "Impossibile eseguire il comando \"%s\"." @@ -1038,15 +1038,15 @@ msgstr "Fa comparire il menu nell'attuale posizione del mouse" msgid "Show help options" msgstr "Visualizza le opzioni dell'aiuto" -#: ../plugins/clock/clock.c:167 +#: ../plugins/clock/clock.c:174 msgid "Week %V" msgstr "Settimana %V" -#: ../plugins/clock/clock.c:450 +#: ../plugins/clock/clock.c:457 msgid "Failed to execute clock command" msgstr "Esecuzione del comando clock non riuscita" -#: ../plugins/clock/clock.c:797 +#: ../plugins/clock/clock.c:807 msgid "Custom Format" msgstr "Formato personalizzato" @@ -1103,9 +1103,11 @@ msgstr "LCD" #: ../plugins/clock/clock-dialog.glade.h:15 msgid "" -"Name of the timezone matching the system's timezone database. Leave empty to " -"revert to the local time." -msgstr "Nome del fuso orario corrispondente al database dei fusi orari di sistema. Lasciare vuoto per tornare all'ora locale." +"Name of a timezone corresponding a file in the zoneinfo database, for " +"example \"America/New_York\". Leave empty to use the localtime." +msgstr "" +"Nome del fuso orario corrispondente al database dei fusi orari di sistema. " +"Lasciare vuoto per tornare all'ora locale." #: ../plugins/clock/clock-dialog.glade.h:16 msgid "Sho_w AM/PM" @@ -1119,13 +1121,7 @@ msgstr "Mostra i punti inatti_vi" msgid "Show gri_d" msgstr "Mostra g_riglia" -#: ../plugins/clock/clock-dialog.glade.h:19 -msgid "" -"Start a tool for setting the system time and date. If the button is grayed " -"out, check the \"Help\" page to see how to configure it correctly." -msgstr "Avvia uno strumento per l'impostazione di data e orario. Se il pulsante non è selezionabile, consultare la pagina \"aiuto\" per le informazioni su come confgurarlo correttamente." - -#: ../plugins/clock/clock-dialog.glade.h:21 +#: ../plugins/clock/clock-dialog.glade.h:20 #, no-c-format msgid "" "The format describes the date and time parts to insert into the panel. For " @@ -1138,31 +1134,27 @@ msgstr "" "Consultare la documentazione dell'utility della data per maggiori " "informazioni." -#: ../plugins/clock/clock-dialog.glade.h:22 +#: ../plugins/clock/clock-dialog.glade.h:21 msgid "Time Settings" msgstr "Impostazione orario" -#: ../plugins/clock/clock-dialog.glade.h:23 -msgid "Time:" -msgstr "Ora:" +#: ../plugins/clock/clock-dialog.glade.h:22 +msgid "Time and Date _Settings..." +msgstr "Impostazione Data e Ora" -#: ../plugins/clock/clock-dialog.glade.h:24 +#: ../plugins/clock/clock-dialog.glade.h:23 msgid "Time_zone:" msgstr "_Fuso orario:" -#: ../plugins/clock/clock-dialog.glade.h:25 +#: ../plugins/clock/clock-dialog.glade.h:24 msgid "True _binary clock" msgstr "Orologio _binario accurato" -#: ../plugins/clock/clock-dialog.glade.h:26 +#: ../plugins/clock/clock-dialog.glade.h:25 msgid "_Layout:" msgstr "_Tipo:" -#: ../plugins/clock/clock-dialog.glade.h:27 -msgid "_Set" -msgstr "I_mposta" - -#: ../plugins/clock/clock-dialog.glade.h:28 +#: ../plugins/clock/clock-dialog.glade.h:26 msgid "_Tooltip format:" msgstr "Formato del su_ggerimento:" @@ -1905,6 +1897,20 @@ msgstr "Menu delle finestre" msgid "Switch between open windows using a menu" msgstr "Scorre tra le finestre aperte utilizzando un menu" +#~ msgid "" +#~ "Start a tool for setting the system time and date. If the button is " +#~ "grayed out, check the \"Help\" page to see how to configure it correctly." +#~ msgstr "" +#~ "Avvia uno strumento per l'impostazione di data e orario. Se il pulsante " +#~ "non è selezionabile, consultare la pagina \"aiuto\" per le informazioni " +#~ "su come confgurarlo
[Xfce4-commits] Summary window: Delay clock update a bit to avoid jerkiness (bug #9933).
Updating branch refs/heads/master to 72fdfaec8c9b4c65af6ec9123d7ef910df755f99 (commit) from 0b1c2da51ce14962bca36bff174d332c29148e43 (commit) commit 72fdfaec8c9b4c65af6ec9123d7ef910df755f99 Author: Harald Judt Date: Thu Mar 21 14:17:44 2013 +0100 Summary window: Delay clock update a bit to avoid jerkiness (bug #9933). For whatever reason, on some machines the clock seems not to update in appropriate regular intervals which results in updates that seem to be 2 seconds apart. Surprisingly, adding a small delay of 10ms seems to solve this. While this is a strange solution, it is also easy and effective, so let's simply do it this way. panel-plugin/weather-summary.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c index 15cf546..641d077 100644 --- a/panel-plugin/weather-summary.c +++ b/panel-plugin/weather-summary.c @@ -1017,10 +1017,10 @@ update_summary_subtitle(plugin_data *data) now_ms = ((gint64) now.tv_sec * 1000) + ((gint64) now.tv_usec / 1000); #ifdef HAVE_UPOWER_GLIB if (data->upower_on_battery || data->upower_lid_closed) -update_interval = 6 - (now_ms % 6) + 1; +update_interval = 6 - (now_ms % 6) + 10; else #endif -update_interval = 1000 - (now_ms % 1000) + 1; +update_interval = 1000 - (now_ms % 1000) + 10; data->summary_update_timer = g_timeout_add(update_interval, (GSourceFunc) update_summary_subtitle, data); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits