From a248b1597394b4ee9a5817bc95c3c116e76cdd8f Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Mon, 19 Mar 2012 16:35:30 +0100 Subject: Imported Upstream version 0.5.2 --- resources/gnome-pie-symbolic.svg | 496 +++++++++++++++++++++++++++ resources/locale/es/LC_MESSAGES/es.po | 15 +- resources/locale/es/LC_MESSAGES/gnomepie.mo | Bin 8420 -> 8741 bytes resources/themes/minimalistic_text/theme.xml | 4 +- src/CMakeLists.txt | 1 + src/actionGroups/windowListGroup.vala | 2 +- src/actions/actionRegistry.vala | 2 +- src/deamon.vala | 6 +- src/gui/indicator.vala | 17 +- src/gui/piePreview.vala | 3 - src/gui/preferencesWindow.vala | 4 +- src/gui/sliceTypeList.vala | 2 +- src/images/icon.vala | 4 +- src/images/renderedText.vala | 18 +- src/pies/load.vala | 2 - src/renderers/pieWindow.vala | 12 +- 16 files changed, 552 insertions(+), 36 deletions(-) create mode 100644 resources/gnome-pie-symbolic.svg diff --git a/resources/gnome-pie-symbolic.svg b/resources/gnome-pie-symbolic.svg new file mode 100644 index 0000000..63a662f --- /dev/null +++ b/resources/gnome-pie-symbolic.svg @@ -0,0 +1,496 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/resources/locale/es/LC_MESSAGES/es.po b/resources/locale/es/LC_MESSAGES/es.po index c52ac16..b1ba6ce 100644 --- a/resources/locale/es/LC_MESSAGES/es.po +++ b/resources/locale/es/LC_MESSAGES/es.po @@ -201,7 +201,7 @@ msgstr "Apagar" #: ../../src/actionGroups/sessionGroup.vala:63 msgid "Logout" -msgstr "" +msgstr "Cerrar Sesión" #: ../../src/actionGroups/sessionGroup.vala:66 msgid "Reboot" @@ -213,8 +213,7 @@ msgstr "Grupo: Marcadores" #: ../../src/actionGroups/bookmarkGroup.vala:38 msgid "Shows a Slice for each of your directory Bookmarks." -msgstr "" -"Muestra una Rebanada por cada uno de los directorios en los Marcadores." +msgstr "Muestra una Rebanada por cada uno de los directorios en los Marcadores." #: ../../src/actionGroups/devicesGroup.vala:35 msgid "Group: Devices" @@ -393,11 +392,12 @@ msgstr "Mostrar panel de íconos" msgid "" "If not checked, you can access this menu by launching Gnome-Pie a second " "time." -msgstr "Puedes acceder a este menú lanzando Gnome-Pie por segundavez." +msgstr "Si no esta activado, puedes acceder a este menú lanzando Gnome-Pie " +"por segunda vez." #: ../ui/settings.ui:118 msgid "Behavior" -msgstr "" +msgstr "Comportamiento" #: ../ui/settings.ui:175 msgid "Global scale" @@ -406,18 +406,19 @@ msgstr "Escala Global" #: ../ui/settings.ui:207 #, fuzzy msgid "Display Slice labels" -msgstr "Mostrar panel de íconos" +msgstr "Mostrar las etiquetas de las Rebanadas" #: ../ui/settings.ui:212 ../ui/settings.ui:213 msgid "" "Displays the name of each Slice next to it. Only available if supported by " "the theme." msgstr "" +"Mostrar el nombre de cada Rebanada. Solo si es soportado por el theme." #: ../ui/settings.ui:232 #, fuzzy msgid "Appearance" -msgstr "Apariencia y comportamiento" +msgstr "Apariencia" #: ../ui/slice_select.ui:9 msgid "Slice Options" diff --git a/resources/locale/es/LC_MESSAGES/gnomepie.mo b/resources/locale/es/LC_MESSAGES/gnomepie.mo index d3a0e7d..9b22914 100644 Binary files a/resources/locale/es/LC_MESSAGES/gnomepie.mo and b/resources/locale/es/LC_MESSAGES/gnomepie.mo differ diff --git a/resources/themes/minimalistic_text/theme.xml b/resources/themes/minimalistic_text/theme.xml index f93c5da..fca0849 100644 --- a/resources/themes/minimalistic_text/theme.xml +++ b/resources/themes/minimalistic_text/theme.xml @@ -9,13 +9,13 @@ - + - + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 91ed3ab..7138fdd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -82,6 +82,7 @@ install( install( FILES ${CMAKE_SOURCE_DIR}/resources/gnome-pie.svg + ${CMAKE_SOURCE_DIR}/resources/gnome-pie-symbolic.svg DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps ) diff --git a/src/actionGroups/windowListGroup.vala b/src/actionGroups/windowListGroup.vala index 18bf55b..774666f 100644 --- a/src/actionGroups/windowListGroup.vala +++ b/src/actionGroups/windowListGroup.vala @@ -32,7 +32,7 @@ public class WindowListGroup : ActionGroup { public static GroupRegistry.TypeDescription register() { var description = new GroupRegistry.TypeDescription(); description.name = _("Group: Window List"); - description.icon = "window-manager"; + description.icon = "gnome-window-manager"; description.description = _("Shows a Slice for each of your opened Windows. Almost like Alt-Tab."); description.id = "window_list"; return description; diff --git a/src/actions/actionRegistry.vala b/src/actions/actionRegistry.vala index 705c06c..24cc1fe 100644 --- a/src/actions/actionRegistry.vala +++ b/src/actions/actionRegistry.vala @@ -148,7 +148,7 @@ public class ActionRegistry : GLib.Object { } if (!Gtk.IconTheme.get_default().has_icon(final_icon)) - final_icon = "application-default-icon"; + final_icon = "stock_unknown"; if (name != null) final_name = name; diff --git a/src/deamon.vala b/src/deamon.vala index b622028..2424f8f 100644 --- a/src/deamon.vala +++ b/src/deamon.vala @@ -36,7 +36,7 @@ public class Deamon : GLib.Object { ///////////////////////////////////////////////////////////////////// public static int main(string[] args) { - version = "0.5.1"; + version = "0.5.2"; Logger.init(); Gdk.threads_init(); @@ -148,6 +148,8 @@ public class Deamon : GLib.Object { return Unique.Response.PASSTHROUGH; }); + Gdk.threads_enter(); + // init locale support Intl.bindtextdomain ("gnomepie", Paths.locales); Intl.textdomain ("gnomepie"); @@ -174,6 +176,8 @@ public class Deamon : GLib.Object { if (open_pie != null) PieManager.open_pie(open_pie); Gtk.main(); + + Gdk.threads_leave(); } ///////////////////////////////////////////////////////////////////// diff --git a/src/gui/indicator.vala b/src/gui/indicator.vala index dea4d3c..c8ef445 100644 --- a/src/gui/indicator.vala +++ b/src/gui/indicator.vala @@ -46,7 +46,6 @@ public class Indicator : GLib.Object { public bool active { get { - #if HAVE_APPINDICATOR return indicator.get_status() == AppIndicator.IndicatorStatus.ACTIVE; #else @@ -68,12 +67,18 @@ public class Indicator : GLib.Object { ///////////////////////////////////////////////////////////////////// public Indicator() { + string icon = ""; + + if (Gdk.X11Screen.get_window_manager_name(Gdk.Screen.get_default()) == "Mutter") + icon = "gnome-pie"; + else + icon = "gnome-pie-symbolic"; + #if HAVE_APPINDICATOR string path = ""; - string icon = "indicator-applet"; + try { path = GLib.Path.get_dirname(GLib.FileUtils.read_link("/proc/self/exe"))+"/resources"; - icon = "gnome-pie"; } catch (GLib.FileError e) { warning("Failed to get path of executable!"); } @@ -86,16 +91,16 @@ public class Indicator : GLib.Object { try { var file = GLib.File.new_for_path(GLib.Path.build_filename( GLib.Path.get_dirname(GLib.FileUtils.read_link("/proc/self/exe"))+"/resources", - "gnome-pie.svg" + icon + ".svg" )); if (!file.query_exists()) - this.indicator.set_from_icon_name("gnome-pie"); + this.indicator.set_from_icon_name(icon); else this.indicator.set_from_file(file.get_path()); } catch (GLib.FileError e) { warning("Failed to get path of executable!"); - this.indicator.set_from_icon_name("gnome-pie"); + this.indicator.set_from_icon_name(icon); } this.menu = new Gtk.Menu(); diff --git a/src/gui/piePreview.vala b/src/gui/piePreview.vala index 4963bb2..5745fcb 100644 --- a/src/gui/piePreview.vala +++ b/src/gui/piePreview.vala @@ -111,9 +111,6 @@ class PiePreview : Gtk.DrawingArea { this.new_slice_window.on_select.connect((new_action, as_new_slice, at_position) => { var pie = PieManager.all_pies[this.current_id]; - debug(new_action.actions[0].name); - debug(new_action.actions[0].real_command); - if (new_action.has_quickaction()) renderer.disable_quickactions(); diff --git a/src/gui/preferencesWindow.vala b/src/gui/preferencesWindow.vala index 933919b..3055bc5 100644 --- a/src/gui/preferencesWindow.vala +++ b/src/gui/preferencesWindow.vala @@ -174,7 +174,7 @@ public class PreferencesWindow : GLib.Object { this.id_label.label = ""; this.name_label.label = _("No Pie selected."); this.hotkey_label.set_markup(""); - this.icon.icon_name = "application-default-icon"; + this.icon.icon_name = "stock_unknown"; this.no_pie_label.show(); } else { @@ -212,7 +212,7 @@ public class PreferencesWindow : GLib.Object { ///////////////////////////////////////////////////////////////////// private void on_add_pie_button_clicked(Gtk.ToolButton button) { - var new_pie = PieManager.create_persistent_pie(_("New Pie"), "application-default-icon", null); + var new_pie = PieManager.create_persistent_pie(_("New Pie"), "stock_unknown", null); this.pie_list.reload_all(); this.pie_list.select(new_pie.id); } diff --git a/src/gui/sliceTypeList.vala b/src/gui/sliceTypeList.vala index b447dc3..a339e5e 100644 --- a/src/gui/sliceTypeList.vala +++ b/src/gui/sliceTypeList.vala @@ -140,7 +140,7 @@ class SliceTypeList : Gtk.TreeView { this.data.get(active, DataPos.ICON_NAME, out icon); this.on_select(id, icon); } else { - this.on_select("", "application-default-icon"); + this.on_select("", "stock_unknown"); } } diff --git a/src/images/icon.vala b/src/images/icon.vala index e942e7c..42be41f 100644 --- a/src/images/icon.vala +++ b/src/images/icon.vala @@ -105,7 +105,7 @@ public class Icon : Image { return icon_name; warning("Icon \"" + icon_name + "\" not found! Using default icon..."); - icon_name = "application-default-icon"; + icon_name = "stock_unknown"; } @@ -115,7 +115,7 @@ public class Icon : Image { if (result == "") { warning("Icon \"" + icon_name + "\" not found! Using default icon..."); - icon_name = "application-default-icon"; + icon_name = "stock_unknown"; file = icon_theme.lookup_icon(icon_name, size, 0); if (file != null) result = file.get_filename(); } diff --git a/src/images/renderedText.vala b/src/images/renderedText.vala index e99d26a..544af1f 100644 --- a/src/images/renderedText.vala +++ b/src/images/renderedText.vala @@ -71,21 +71,29 @@ public class RenderedText : Image { // add newlines at the end of each line, in order to allow ellipsizing string broken_string = ""; - var lines = layout.get_lines().copy(); - foreach (var line in lines) { + for (int i=0; i height) broken_string = broken_string + next_line; else broken_string = broken_string_tmp; diff --git a/src/pies/load.vala b/src/pies/load.vala index 4a9274d..cb08a8a 100644 --- a/src/pies/load.vala +++ b/src/pies/load.vala @@ -60,8 +60,6 @@ namespace Pies { } } } - Xml.Parser.cleanup(); - } else { warning("Error loading pies: pies.conf is empty! The cake is a lie..."); } diff --git a/src/renderers/pieWindow.vala b/src/renderers/pieWindow.vala index 852a739..5238dfe 100644 --- a/src/renderers/pieWindow.vala +++ b/src/renderers/pieWindow.vala @@ -55,6 +55,7 @@ public class PieWindow : Gtk.Window { ///////////////////////////////////////////////////////////////////// private bool closing = false; + private bool closed = false; ///////////////////////////////////////////////////////////////////// /// A timer used for calculating the frame time. @@ -186,7 +187,10 @@ public class PieWindow : Gtk.Window { this.queue_draw(); // the main draw loop - Timeout.add((uint)(1000.0/Config.global.refresh_rate), () => { + GLib.Timeout.add((uint)(1000.0/Config.global.refresh_rate), () => { + if (this.closed) + return false; + this.queue_draw(); return this.visible; }); @@ -266,7 +270,8 @@ public class PieWindow : Gtk.Window { FocusGrabber.ungrab(); this.renderer.activate(); - Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => { + GLib.Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => { + this.closed = true; this.on_closed(); this.destroy(); return false; @@ -286,7 +291,8 @@ public class PieWindow : Gtk.Window { FocusGrabber.ungrab(); this.renderer.cancel(); - Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => { + GLib.Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => { + this.closed = true; this.on_closed(); this.destroy(); return false; -- cgit v1.2.3