[geary] Use GTK 3.14 rtl icon support
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Use GTK 3.14 rtl icon support
- Date: Sat, 6 Aug 2016 01:41:49 +0000 (UTC)
commit 509b6695328eb1dcbf4c89166918d3b95c21adf2
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Fri Aug 5 00:20:09 2016 -0400
Use GTK 3.14 rtl icon support
https://bugzilla.gnome.org/show_bug.cgi?id=769533
icons/CMakeLists.txt | 12 ++++++------
...l-symbolic.svg => mail-drafts-symbolic-rtl.svg} | 0
...-symbolic.svg => mail-forward-symbolic-rtl.svg} | 0
...ymbolic.svg => mail-reply-all-symbolic-rtl.svg} | 0
...olic.svg => mail-reply-sender-symbolic-rtl.svg} | 0
...rtl-symbolic.svg => mail-sent-symbolic-rtl.svg} | 0
.../{tag-rtl-symbolic.svg => tag-symbolic-rtl.svg} | 0
src/client/components/main-toolbar.vala | 18 ++++++++----------
src/client/composer/composer-widget.vala | 9 ++-------
.../folder-list/folder-list-account-branch.vala | 4 +---
.../folder-list/folder-list-folder-entry.vala | 8 +++-----
11 files changed, 20 insertions(+), 31 deletions(-)
---
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
index b69549c..0e2e9c2 100644
--- a/icons/CMakeLists.txt
+++ b/icons/CMakeLists.txt
@@ -8,20 +8,20 @@ set(ICON_FILES
edit-symbolic.svg
format-text-remove-symbolic.svg
mail-drafts-symbolic.svg
- mail-drafts-rtl-symbolic.svg
+ mail-drafts-symbolic-rtl.svg
mail-forward-symbolic.svg
- mail-forward-rtl-symbolic.svg
+ mail-forward-symbolic-rtl.svg
mail-inbox-symbolic.svg
mail-outbox-symbolic.svg
mail-reply-all-symbolic.svg
- mail-reply-all-rtl-symbolic.svg
+ mail-reply-all-symbolic-rtl.svg
mail-reply-sender-symbolic.svg
- mail-reply-sender-rtl-symbolic.svg
+ mail-reply-sender-symbolic-rtl.svg
mail-sent-symbolic.svg
- mail-sent-rtl-symbolic.svg
+ mail-sent-symbolic-rtl.svg
marker-symbolic.svg
tag-symbolic.svg
- tag-rtl-symbolic.svg
+ tag-symbolic-rtl.svg
)
install(FILES ${ICON_FILES} DESTINATION ${ICONS_DEST})
diff --git a/icons/close-symbolic.svg b/icons/close-symbolic.svg
old mode 100755
new mode 100644
diff --git a/icons/mail-archive-symbolic.svg b/icons/mail-archive-symbolic.svg
old mode 100755
new mode 100644
diff --git a/icons/mail-drafts-rtl-symbolic.svg b/icons/mail-drafts-symbolic-rtl.svg
similarity index 100%
rename from icons/mail-drafts-rtl-symbolic.svg
rename to icons/mail-drafts-symbolic-rtl.svg
diff --git a/icons/mail-forward-rtl-symbolic.svg b/icons/mail-forward-symbolic-rtl.svg
similarity index 100%
rename from icons/mail-forward-rtl-symbolic.svg
rename to icons/mail-forward-symbolic-rtl.svg
diff --git a/icons/mail-reply-all-rtl-symbolic.svg b/icons/mail-reply-all-symbolic-rtl.svg
similarity index 100%
rename from icons/mail-reply-all-rtl-symbolic.svg
rename to icons/mail-reply-all-symbolic-rtl.svg
diff --git a/icons/mail-reply-sender-rtl-symbolic.svg b/icons/mail-reply-sender-symbolic-rtl.svg
old mode 100755
new mode 100644
similarity index 100%
rename from icons/mail-reply-sender-rtl-symbolic.svg
rename to icons/mail-reply-sender-symbolic-rtl.svg
diff --git a/icons/mail-reply-sender-symbolic.svg b/icons/mail-reply-sender-symbolic.svg
old mode 100755
new mode 100644
diff --git a/icons/mail-sent-rtl-symbolic.svg b/icons/mail-sent-symbolic-rtl.svg
old mode 100755
new mode 100644
similarity index 100%
rename from icons/mail-sent-rtl-symbolic.svg
rename to icons/mail-sent-symbolic-rtl.svg
diff --git a/icons/mail-sent-symbolic.svg b/icons/mail-sent-symbolic.svg
old mode 100755
new mode 100644
diff --git a/icons/tag-rtl-symbolic.svg b/icons/tag-symbolic-rtl.svg
old mode 100755
new mode 100644
similarity index 100%
rename from icons/tag-rtl-symbolic.svg
rename to icons/tag-symbolic-rtl.svg
diff --git a/icons/tag-symbolic.svg b/icons/tag-symbolic.svg
old mode 100755
new mode 100644
diff --git a/icons/text-x-generic-symbolic.svg b/icons/text-x-generic-symbolic.svg
old mode 100755
new mode 100644
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index 0827a6e..78c0871 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -52,8 +52,6 @@ public class MainToolbar : Gtk.Box {
this.bind_property("show-close-button-right", conversation_header, "show-close-button",
BindingFlags.SYNC_CREATE);
- bool rtl = get_direction() == Gtk.TextDirection.RTL;
-
// Assemble mark menu.
GearyApplication.instance.load_ui_resource("toolbar_mark_menu.ui");
Gtk.Menu mark_menu = (Gtk.Menu)
GearyApplication.instance.ui_manager.get_widget("/ui/ToolbarMarkMenu");
@@ -91,20 +89,20 @@ public class MainToolbar : Gtk.Box {
// Reply buttons
insert.clear();
- insert.add(conversation_header.create_toolbar_button(rtl ? "mail-reply-sender-rtl-symbolic"
- : "mail-reply-sender-symbolic", GearyController.ACTION_REPLY_TO_MESSAGE));
- insert.add(conversation_header.create_toolbar_button(rtl ? "mail-reply-all-rtl-symbolic"
- : "mail-reply-all-symbolic", GearyController.ACTION_REPLY_ALL_MESSAGE));
- insert.add(conversation_header.create_toolbar_button(rtl ? "mail-forward-rtl-symbolic"
- : "mail-forward-symbolic", GearyController.ACTION_FORWARD_MESSAGE));
+ insert.add(conversation_header.create_toolbar_button("mail-reply-sender-symbolic",
+ GearyController.ACTION_REPLY_TO_MESSAGE));
+ insert.add(conversation_header.create_toolbar_button("mail-reply-all-symbolic",
+ GearyController.ACTION_REPLY_ALL_MESSAGE));
+ insert.add(conversation_header.create_toolbar_button("mail-forward-symbolic",
+ GearyController.ACTION_FORWARD_MESSAGE));
conversation_header.add_start(conversation_header.create_pill_buttons(insert));
// Mark, copy, move.
insert.clear();
insert.add(conversation_header.create_menu_button("marker-symbolic", mark_menu,
GearyController.ACTION_MARK_AS_MENU));
- insert.add(conversation_header.create_popover_button(rtl ? "tag-rtl-symbolic" : "tag-symbolic",
- copy_folder_menu, GearyController.ACTION_COPY_MENU));
+ insert.add(conversation_header.create_popover_button("tag-symbolic", copy_folder_menu,
+ GearyController.ACTION_COPY_MENU));
insert.add(conversation_header.create_popover_button("folder-symbolic", move_folder_menu,
GearyController.ACTION_MOVE_MENU));
conversation_header.add_start(conversation_header.create_pill_buttons(insert));
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 0387195..2464bbe 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -396,13 +396,8 @@ public class ComposerWidget : Gtk.EventBox {
bcc_entry.changed.connect(validate_send_button);
reply_to_entry.changed.connect(validate_send_button);
- if (get_direction () == Gtk.TextDirection.RTL) {
- actions.get_action(ACTION_INDENT).icon_name = "format-indent-more-rtl-symbolic";
- actions.get_action(ACTION_OUTDENT).icon_name = "format-indent-less-rtl-symbolic";
- } else {
- actions.get_action(ACTION_INDENT).icon_name = "format-indent-more-symbolic";
- actions.get_action(ACTION_OUTDENT).icon_name = "format-indent-less-symbolic";
- }
+ actions.get_action(ACTION_INDENT).icon_name = "format-indent-more-symbolic";
+ actions.get_action(ACTION_OUTDENT).icon_name = "format-indent-less-symbolic";
composer_toolbar = new ComposerToolbar(actions, menu);
Gtk.Alignment toolbar_area = (Gtk.Alignment) builder.get_object("toolbar area");
diff --git a/src/client/folder-list/folder-list-account-branch.vala
b/src/client/folder-list/folder-list-account-branch.vala
index 3cfbdf6..465e9a5 100644
--- a/src/client/folder-list/folder-list-account-branch.vala
+++ b/src/client/folder-list/folder-list-account-branch.vala
@@ -14,10 +14,8 @@ public class FolderList.AccountBranch : Sidebar.Branch {
base(new Sidebar.Header(account.information.nickname),
Sidebar.Branch.Options.NONE, normal_folder_comparator, special_folder_comparator);
- bool rtl = Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL;
-
this.account = account;
- user_folder_group = new SpecialGrouping(2, "", rtl ? "tag-rtl-symbolic" : "tag-symbolic");
+ user_folder_group = new SpecialGrouping(2, "", "tag-symbolic");
folder_entries = new Gee.HashMap<Geary.FolderPath, FolderEntry>();
account.information.notify["nickname"].connect(on_nicknamed_changed);
diff --git a/src/client/folder-list/folder-list-folder-entry.vala
b/src/client/folder-list/folder-list-folder-entry.vala
index eca8564..5a5396f 100644
--- a/src/client/folder-list/folder-list-folder-entry.vala
+++ b/src/client/folder-list/folder-list-folder-entry.vala
@@ -46,20 +46,18 @@ public class FolderList.FolderEntry : FolderList.AbstractFolderEntry, Sidebar.In
}
public override string? get_sidebar_icon() {
- bool rtl = Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL;
-
switch (folder.special_folder_type) {
case Geary.SpecialFolderType.NONE:
- return rtl ? "tag-rtl-symbolic" : "tag-symbolic";
+ return "tag-symbolic";
case Geary.SpecialFolderType.INBOX:
return "mail-inbox-symbolic";
case Geary.SpecialFolderType.DRAFTS:
- return rtl ? "mail-drafts-rtl-symbolic" : "mail-drafts-symbolic";
+ return "mail-drafts-symbolic";
case Geary.SpecialFolderType.SENT:
- return rtl ? "mail-sent-rtl-symbolic" : "mail-sent-symbolic";
+ return "mail-sent-symbolic";
case Geary.SpecialFolderType.FLAGGED:
return "starred-symbolic";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]