[latexila] Rename mimetypes icons with the prefix "latexila-"
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Rename mimetypes icons with the prefix "latexila-"
- Date: Sat, 27 Dec 2014 15:57:55 +0000 (UTC)
commit 90063cd6c8d0c56917ed26f04b72199d0ae5d267
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Dec 27 16:44:01 2014 +0100
Rename mimetypes icons with the prefix "latexila-"
So in the code it's clearer with the prefix that the icons come from
latexila.
data/build_tools/build_tools.xml | 6 +++---
.../mimetypes/{view_dvi.png => latexila-dvi.png} | Bin 629 -> 629 bytes
.../mimetypes/{view_pdf.png => latexila-pdf.png} | Bin 612 -> 612 bytes
.../mimetypes/{view_ps.png => latexila-ps.png} | Bin 690 -> 690 bytes
.../mimetypes/{view_dvi.png => latexila-dvi.png} | Bin 942 -> 942 bytes
.../mimetypes/{view_pdf.png => latexila-pdf.png} | Bin 924 -> 924 bytes
.../mimetypes/{view_ps.png => latexila-ps.png} | Bin 1008 -> 1008 bytes
src/build_tool_dialog.vala | 6 +++---
src/file_browser.vala | 6 +++---
src/latexila.gresource.xml | 12 ++++++------
src/liblatexila/latexila-build-tools.c | 9 +++++++++
src/stock_icons.vala | 6 +++---
12 files changed, 27 insertions(+), 18 deletions(-)
---
diff --git a/data/build_tools/build_tools.xml b/data/build_tools/build_tools.xml
index 93d9bbf..605720d 100644
--- a/data/build_tools/build_tools.xml
+++ b/data/build_tools/build_tools.xml
@@ -39,19 +39,19 @@
<!-- View DVI/PDF/PS -->
- <tool id="6" enabled="true" extensions=".tex .pdf" icon="view_pdf">
+ <tool id="6" enabled="true" extensions=".tex .pdf" icon="latexila-pdf">
<label>View PDF</label>
<description>View the PDF file</description>
<open>$shortname.pdf</open>
</tool>
- <tool id="7" enabled="true" extensions=".tex .dvi" icon="view_dvi">
+ <tool id="7" enabled="true" extensions=".tex .dvi" icon="latexila-dvi">
<label>View DVI</label>
<description>View the DVI file</description>
<open>$shortname.dvi</open>
</tool>
- <tool id="8" enabled="true" extensions=".tex .ps" icon="view_ps">
+ <tool id="8" enabled="true" extensions=".tex .ps" icon="latexila-ps">
<label>View PS</label>
<description>View the PostScript file</description>
<open>$shortname.ps</open>
diff --git a/src/build_tool_dialog.vala b/src/build_tool_dialog.vala
index ffc0c40..3954da8 100644
--- a/src/build_tool_dialog.vala
+++ b/src/build_tool_dialog.vala
@@ -164,9 +164,9 @@ public class BuildToolDialog : GLib.Object
add_icon ("compile_ps", "LaTeX → PS");
add_icon (Stock.CONVERT, _("Convert")); // FIXME don't use Stock
add_icon ("text-x-generic", _("View File"));
- add_icon ("view_dvi", _("View DVI"));
- add_icon ("view_pdf", _("View PDF"));
- add_icon ("view_ps", _("View PS"));
+ add_icon ("latexila-dvi", _("View DVI"));
+ add_icon ("latexila-pdf", _("View PDF"));
+ add_icon ("latexila-ps", _("View PS"));
}
private void add_icon (string icon_name, string label)
diff --git a/src/file_browser.vala b/src/file_browser.vala
index f92e56b..56066c2 100644
--- a/src/file_browser.vala
+++ b/src/file_browser.vala
@@ -578,14 +578,14 @@ public class FileBrowser : Grid
return Stock.EDIT; // TODO find a replacement
case ".pdf":
- return "view_pdf";
+ return "latexila-pdf";
case ".dvi":
- return "view_dvi";
+ return "latexila-dvi";
case ".ps":
case ".eps":
- return "view_ps";
+ return "latexila-ps";
case ".png":
case ".jpg":
diff --git a/src/latexila.gresource.xml b/src/latexila.gresource.xml
index 2e9cd09..c3a324b 100644
--- a/src/latexila.gresource.xml
+++ b/src/latexila.gresource.xml
@@ -34,9 +34,9 @@
</gresource>
<gresource prefix="/org/gnome/latexila/icons/16x16/mimetypes">
- <file alias="view_dvi.png" preprocess="to-pixdata">../data/icons/16x16/mimetypes/view_dvi.png</file>
- <file alias="view_pdf.png" preprocess="to-pixdata">../data/icons/16x16/mimetypes/view_pdf.png</file>
- <file alias="view_ps.png" preprocess="to-pixdata">../data/icons/16x16/mimetypes/view_ps.png</file>
+ <file alias="latexila-dvi.png"
preprocess="to-pixdata">../data/icons/16x16/mimetypes/latexila-dvi.png</file>
+ <file alias="latexila-pdf.png"
preprocess="to-pixdata">../data/icons/16x16/mimetypes/latexila-pdf.png</file>
+ <file alias="latexila-ps.png"
preprocess="to-pixdata">../data/icons/16x16/mimetypes/latexila-ps.png</file>
</gresource>
<gresource prefix="/org/gnome/latexila/icons/24x24/actions">
@@ -101,9 +101,9 @@
</gresource>
<gresource prefix="/org/gnome/latexila/icons/24x24/mimetypes">
- <file alias="view_dvi.png" preprocess="to-pixdata">../data/icons/24x24/mimetypes/view_dvi.png</file>
- <file alias="view_pdf.png" preprocess="to-pixdata">../data/icons/24x24/mimetypes/view_pdf.png</file>
- <file alias="view_ps.png" preprocess="to-pixdata">../data/icons/24x24/mimetypes/view_ps.png</file>
+ <file alias="latexila-dvi.png"
preprocess="to-pixdata">../data/icons/24x24/mimetypes/latexila-dvi.png</file>
+ <file alias="latexila-pdf.png"
preprocess="to-pixdata">../data/icons/24x24/mimetypes/latexila-pdf.png</file>
+ <file alias="latexila-ps.png"
preprocess="to-pixdata">../data/icons/24x24/mimetypes/latexila-ps.png</file>
</gresource>
<gresource prefix="/org/gnome/latexila/icons">
diff --git a/src/liblatexila/latexila-build-tools.c b/src/liblatexila/latexila-build-tools.c
index be2c591..8f9e0be 100644
--- a/src/liblatexila/latexila-build-tools.c
+++ b/src/liblatexila/latexila-build-tools.c
@@ -175,6 +175,15 @@ parser_start_element (GMarkupParseContext *context,
g_object_set (cur_tool, "icon", "system-run", NULL);
else if (g_str_equal (attribute_values[i], "gtk-file"))
g_object_set (cur_tool, "icon", "text-x-generic", NULL);
+
+ /* Migrate from old icon names specific to latexila. */
+ else if (g_str_equal (attribute_values[i], "view_dvi"))
+ g_object_set (cur_tool, "icon", "latexila-dvi", NULL);
+ else if (g_str_equal (attribute_values[i], "view_pdf"))
+ g_object_set (cur_tool, "icon", "latexila-pdf", NULL);
+ else if (g_str_equal (attribute_values[i], "view_ps"))
+ g_object_set (cur_tool, "icon", "latexila-ps", NULL);
+
else
g_object_set (cur_tool, "icon", attribute_values[i], NULL);
}
diff --git a/src/stock_icons.vala b/src/stock_icons.vala
index fb87954..535b288 100644
--- a/src/stock_icons.vala
+++ b/src/stock_icons.vala
@@ -106,10 +106,10 @@ namespace StockIcons
add_theme_icon_to_stock ("tree_todo");
add_theme_icon_to_stock ("typewriter");
add_theme_icon_to_stock ("underline");
- add_theme_icon_to_stock ("view_dvi");
+ add_theme_icon_to_stock ("latexila-dvi");
add_theme_icon_to_stock ("view_log");
- add_theme_icon_to_stock ("view_pdf");
- add_theme_icon_to_stock ("view_ps");
+ add_theme_icon_to_stock ("latexila-pdf");
+ add_theme_icon_to_stock ("latexila-ps");
}
private void add_theme_icon_to_stock (string icon_name)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]