Merge lp:~elementary-apps/pantheon-mail/granite-about into lp:~elementary-apps/pantheon-mail/trunk
- granite-about
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Danielle Foré | ||||
Approved revision: | 1973 | ||||
Merged at revision: | 1965 | ||||
Proposed branch: | lp:~elementary-apps/pantheon-mail/granite-about | ||||
Merge into: | lp:~elementary-apps/pantheon-mail/trunk | ||||
Diff against target: |
220 lines (+54/-34) 6 files modified
data/pantheon-mail.desktop.in (+5/-1) data/ui/app_menu.interface (+0/-4) src/CMakeLists.txt (+4/-2) src/client/application/geary-application.vala (+13/-4) src/client/application/geary-args.vala (+8/-1) src/client/application/geary-controller.vala (+24/-22) |
||||
To merge this branch: | bzr merge lp:~elementary-apps/pantheon-mail/granite-about | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Seese (community) | code | Approve | |
Danielle Foré | Abstain | ||
Review via email: mp+285299@code.launchpad.net |
Commit message
Use Granite About
Description of the change
- 1971. By Danielle Foré
-
blank line
Danielle Foré (danrabbit) : | # |
Ralph Plawetzki (purejava) wrote : | # |
Compiling on Freya does show the Granite.
You are on Loki, right?
For testing reasons I could download the iso this evening and see if this makes a difference (right now I have a limited bandwidth).
Ralph Plawetzki (purejava) wrote : | # |
Did not see your talk about this issue on slack before I wrote the comment above.
Removed startup(); in line 117 of geary-applicati
Ralph Plawetzki (purejava) wrote : | # |
Please ignore the last two comments.
I did not capture all parts of the talk about this issue on slack.
- 1972. By Danielle Foré
-
fix website lable, copyright elementary in newline
- 1973. By Danielle Foré
-
merge trunk
Mike Seese (seesemichaelj) wrote : | # |
Below is concerning the startup() call at line 117 in geary-applicati
Technically, you only need to do a Gdk.init(). Gtk.init() calls Gdk.init() and Gtk.Application
We just need to enforce that gdk gets initialized.
Gtk.Application
I have verified this by putting breakpoints in geary-applicati
Anyway, going back to the question at hand: is calling "startup()" okay even though another instance exists? I'm unsure of the other functions in GearyApplicatio
Preview Diff
1 | === modified file 'data/pantheon-mail.desktop.in' | |||
2 | --- data/pantheon-mail.desktop.in 2015-11-24 22:59:32 +0000 | |||
3 | +++ data/pantheon-mail.desktop.in 2016-02-09 18:45:47 +0000 | |||
4 | @@ -12,7 +12,11 @@ | |||
5 | 12 | Categories=GNOME;GTK;Network;Email; | 12 | Categories=GNOME;GTK;Network;Email; |
6 | 13 | X-GNOME-Gettext-Domain=@GETTEXT_PACKAGE@ | 13 | X-GNOME-Gettext-Domain=@GETTEXT_PACKAGE@ |
7 | 14 | X-GNOME-UsesNotifications=true | 14 | X-GNOME-UsesNotifications=true |
9 | 15 | Actions=Compose; | 15 | Actions=AboutDialog;Compose; |
10 | 16 | |||
11 | 17 | [Desktop Action AboutDialog] | ||
12 | 18 | Name=About @APP_NAME@ | ||
13 | 19 | Exec=@EXEC_NAME@ --about | ||
14 | 16 | 20 | ||
15 | 17 | [Desktop Action Compose] | 21 | [Desktop Action Compose] |
16 | 18 | Name=Compose Message | 22 | Name=Compose Message |
17 | 19 | 23 | ||
18 | === modified file 'data/ui/app_menu.interface' | |||
19 | --- data/ui/app_menu.interface 2016-01-19 02:16:54 +0000 | |||
20 | +++ data/ui/app_menu.interface 2016-02-09 18:45:47 +0000 | |||
21 | @@ -14,10 +14,6 @@ | |||
22 | 14 | </section> | 14 | </section> |
23 | 15 | <section> | 15 | <section> |
24 | 16 | <item> | 16 | <item> |
25 | 17 | <attribute name='label' translatable='yes'>_About</attribute> | ||
26 | 18 | <attribute name='action'>app.GearyAbout</attribute> | ||
27 | 19 | </item> | ||
28 | 20 | <item> | ||
29 | 21 | <attribute name='label' translatable='yes'>_Quit</attribute> | 17 | <attribute name='label' translatable='yes'>_Quit</attribute> |
30 | 22 | <attribute name='action'>app.GearyQuit</attribute> | 18 | <attribute name='action'>app.GearyQuit</attribute> |
31 | 23 | <attribute name='accel'><Primary>Q</attribute> | 19 | <attribute name='accel'><Primary>Q</attribute> |
32 | 24 | 20 | ||
33 | === modified file 'src/CMakeLists.txt' | |||
34 | --- src/CMakeLists.txt 2016-01-26 20:57:53 +0000 | |||
35 | +++ src/CMakeLists.txt 2016-02-09 18:45:47 +0000 | |||
36 | @@ -518,6 +518,7 @@ | |||
37 | 518 | set(TARGET_GLIB 2.34) | 518 | set(TARGET_GLIB 2.34) |
38 | 519 | 519 | ||
39 | 520 | pkg_check_modules(DEPS REQUIRED | 520 | pkg_check_modules(DEPS REQUIRED |
40 | 521 | granite | ||
41 | 521 | gthread-2.0 | 522 | gthread-2.0 |
42 | 522 | glib-2.0>=${TARGET_GLIB}.0 | 523 | glib-2.0>=${TARGET_GLIB}.0 |
43 | 523 | gio-2.0>=2.28.0 | 524 | gio-2.0>=2.28.0 |
44 | @@ -535,17 +536,18 @@ | |||
45 | 535 | ) | 536 | ) |
46 | 536 | 537 | ||
47 | 537 | set(ENGINE_PACKAGES | 538 | set(ENGINE_PACKAGES |
49 | 538 | glib-2.0 gee-0.8 gio-2.0 gmime-2.6 posix sqlite3 libxml-2.0 | 539 | glib-2.0 granite gee-0.8 gio-2.0 gmime-2.6 posix sqlite3 libxml-2.0 |
50 | 539 | ) | 540 | ) |
51 | 540 | 541 | ||
52 | 541 | # webkitgtk-3.0 is listed as a custom VAPI (below) to ensure it's treated as a dependency and | 542 | # webkitgtk-3.0 is listed as a custom VAPI (below) to ensure it's treated as a dependency and |
53 | 542 | # built before compilation | 543 | # built before compilation |
54 | 543 | set(CLIENT_PACKAGES | 544 | set(CLIENT_PACKAGES |
56 | 544 | gtk+-3.0 libsecret-1 libsoup-2.4 libnotify libcanberra gcr-3 ${EXTRA_CLIENT_PACKAGES} | 545 | gtk+-3.0 granite libsecret-1 libsoup-2.4 libnotify libcanberra gcr-3 ${EXTRA_CLIENT_PACKAGES} |
57 | 545 | ) | 546 | ) |
58 | 546 | 547 | ||
59 | 547 | set(CONSOLE_PACKAGES | 548 | set(CONSOLE_PACKAGES |
60 | 548 | gtk+-3.0 | 549 | gtk+-3.0 |
61 | 550 | granite | ||
62 | 549 | ) | 551 | ) |
63 | 550 | 552 | ||
64 | 551 | set(GSETTINGS_DIR ${CMAKE_SOURCE_DIR}/data) | 553 | set(GSETTINGS_DIR ${CMAKE_SOURCE_DIR}/data) |
65 | 552 | 554 | ||
66 | === modified file 'src/client/application/geary-application.vala' | |||
67 | --- src/client/application/geary-application.vala 2016-02-06 02:37:42 +0000 | |||
68 | +++ src/client/application/geary-application.vala 2016-02-09 18:45:47 +0000 | |||
69 | @@ -15,11 +15,12 @@ | |||
70 | 15 | public const string NAME = "Mail"; | 15 | public const string NAME = "Mail"; |
71 | 16 | public const string PRGNAME = "geary"; | 16 | public const string PRGNAME = "geary"; |
72 | 17 | public const string APP_ID = "org.pantheon.mail"; | 17 | public const string APP_ID = "org.pantheon.mail"; |
76 | 18 | public const string DESCRIPTION = _("Mail Client"); | 18 | public const string COPYRIGHT = _("2011-2015 Yorba Foundation\n© 2016 elementary LLC."); |
77 | 19 | public const string COPYRIGHT = _("© 2011-2015 Yorba Foundation, © 2016 elementary LLC."); | 19 | public const string WEBSITE = "https://elementary.io"; |
75 | 20 | public const string WEBSITE = "https://www.elementary.io"; | ||
78 | 21 | public const string WEBSITE_LABEL = _("Website"); | 20 | public const string WEBSITE_LABEL = _("Website"); |
79 | 22 | public const string BUGREPORT = "https://bugs.launchpad.net/pantheon-mail/+filebug"; | 21 | public const string BUGREPORT = "https://bugs.launchpad.net/pantheon-mail/+filebug"; |
80 | 22 | public const string HELP = "https://elementary.io/help/geary"; | ||
81 | 23 | public const string TRANSLATE = "https://translations.launchpad.net/pantheon-mail"; | ||
82 | 23 | 24 | ||
83 | 24 | public const string CONTRACT_NAME = _("Send by Email"); | 25 | public const string CONTRACT_NAME = _("Send by Email"); |
84 | 25 | public const string CONTRACT_DESCRIPTION = _("Send files using Mail"); | 26 | public const string CONTRACT_DESCRIPTION = _("Send files using Mail"); |
85 | @@ -38,6 +39,12 @@ | |||
86 | 38 | "Robert Schroll <rschroll@gmail.com>", | 39 | "Robert Schroll <rschroll@gmail.com>", |
87 | 39 | null | 40 | null |
88 | 40 | }; | 41 | }; |
89 | 42 | |||
90 | 43 | public const string[] ARTISTS = { | ||
91 | 44 | "Daniel Foré <daniel@elementary.io>", | ||
92 | 45 | "Sam Hewitt <sam@elementary.io>", | ||
93 | 46 | null | ||
94 | 47 | }; | ||
95 | 41 | 48 | ||
96 | 42 | private static const string ACTION_ENTRY_COMPOSE = "compose"; | 49 | private static const string ACTION_ENTRY_COMPOSE = "compose"; |
97 | 43 | 50 | ||
98 | @@ -106,7 +113,9 @@ | |||
99 | 106 | } catch (Error e) { | 113 | } catch (Error e) { |
100 | 107 | error("Error registering GearyApplication: %s", e.message); | 114 | error("Error registering GearyApplication: %s", e.message); |
101 | 108 | } | 115 | } |
103 | 109 | 116 | ||
104 | 117 | startup(); | ||
105 | 118 | |||
106 | 110 | if (!Args.parse(args)) { | 119 | if (!Args.parse(args)) { |
107 | 111 | exit_status = 1; | 120 | exit_status = 1; |
108 | 112 | return true; | 121 | return true; |
109 | 113 | 122 | ||
110 | === modified file 'src/client/application/geary-args.vala' | |||
111 | --- src/client/application/geary-args.vala 2015-02-06 20:43:33 +0000 | |||
112 | +++ src/client/application/geary-args.vala 2016-02-09 18:45:47 +0000 | |||
113 | @@ -7,6 +7,7 @@ | |||
114 | 7 | namespace Args { | 7 | namespace Args { |
115 | 8 | 8 | ||
116 | 9 | private const OptionEntry[] options = { | 9 | private const OptionEntry[] options = { |
117 | 10 | { "about", 'a', 0, OptionArg.NONE, ref show_about, N_("Show About dialog"), null }, | ||
118 | 10 | { "hidden", 0, 0, OptionArg.NONE, ref hidden_startup, N_("Start Geary with hidden main window"), null }, | 11 | { "hidden", 0, 0, OptionArg.NONE, ref hidden_startup, N_("Start Geary with hidden main window"), null }, |
119 | 11 | { "debug", 'd', 0, OptionArg.NONE, ref log_debug, N_("Output debugging information"), null }, | 12 | { "debug", 'd', 0, OptionArg.NONE, ref log_debug, N_("Output debugging information"), null }, |
120 | 12 | { "log-conversations", 0, 0, OptionArg.NONE, ref log_conversations, N_("Log conversation monitoring"), null }, | 13 | { "log-conversations", 0, 0, OptionArg.NONE, ref log_conversations, N_("Log conversation monitoring"), null }, |
121 | @@ -28,6 +29,7 @@ | |||
122 | 28 | { null } | 29 | { null } |
123 | 29 | }; | 30 | }; |
124 | 30 | 31 | ||
125 | 32 | public bool show_about = false; | ||
126 | 31 | public bool hidden_startup = false; | 33 | public bool hidden_startup = false; |
127 | 32 | public bool log_debug = false; | 34 | public bool log_debug = false; |
128 | 33 | public bool log_network = false; | 35 | public bool log_network = false; |
129 | @@ -73,7 +75,12 @@ | |||
130 | 73 | return false; | 75 | return false; |
131 | 74 | } | 76 | } |
132 | 75 | } | 77 | } |
134 | 76 | 78 | ||
135 | 79 | if (show_about) { | ||
136 | 80 | GearyController.on_about (); | ||
137 | 81 | Process.exit (0); | ||
138 | 82 | } | ||
139 | 83 | |||
140 | 77 | if (version) { | 84 | if (version) { |
141 | 78 | stdout.printf("%s %s\n", GearyApplication.PRGNAME, GearyApplication.VERSION); | 85 | stdout.printf("%s %s\n", GearyApplication.PRGNAME, GearyApplication.VERSION); |
142 | 79 | Process.exit(0); | 86 | Process.exit(0); |
143 | 80 | 87 | ||
144 | === modified file 'src/client/application/geary-controller.vala' | |||
145 | --- src/client/application/geary-controller.vala 2016-01-29 06:23:48 +0000 | |||
146 | +++ src/client/application/geary-controller.vala 2016-02-09 18:45:47 +0000 | |||
147 | @@ -19,7 +19,6 @@ | |||
148 | 19 | // Named actions. | 19 | // Named actions. |
149 | 20 | // | 20 | // |
150 | 21 | // NOTE: Some actions with accelerators need to also be added to ui/accelerators.ui | 21 | // NOTE: Some actions with accelerators need to also be added to ui/accelerators.ui |
151 | 22 | public const string ACTION_ABOUT = "GearyAbout"; | ||
152 | 23 | public const string ACTION_QUIT = "GearyQuit"; | 22 | public const string ACTION_QUIT = "GearyQuit"; |
153 | 24 | public const string ACTION_NEW_MESSAGE = "GearyNewMessage"; | 23 | public const string ACTION_NEW_MESSAGE = "GearyNewMessage"; |
154 | 25 | public const string ACTION_REPLY_TO_MESSAGE = "GearyReplyToMessage"; | 24 | public const string ACTION_REPLY_TO_MESSAGE = "GearyReplyToMessage"; |
155 | @@ -375,10 +374,6 @@ | |||
156 | 375 | prefs.label = _("_Preferences"); | 374 | prefs.label = _("_Preferences"); |
157 | 376 | entries += prefs; | 375 | entries += prefs; |
158 | 377 | 376 | ||
159 | 378 | Gtk.ActionEntry about = { ACTION_ABOUT, Stock._ABOUT, TRANSLATABLE, null, null, on_about }; | ||
160 | 379 | about.label = _("_About"); | ||
161 | 380 | entries += about; | ||
162 | 381 | |||
163 | 382 | Gtk.ActionEntry quit = { ACTION_QUIT, Stock._QUIT, TRANSLATABLE, "<Ctrl>Q", null, on_quit }; | 377 | Gtk.ActionEntry quit = { ACTION_QUIT, Stock._QUIT, TRANSLATABLE, "<Ctrl>Q", null, on_quit }; |
164 | 383 | quit.label = _("_Quit"); | 378 | quit.label = _("_Quit"); |
165 | 384 | entries += quit; | 379 | entries += quit; |
166 | @@ -548,7 +543,6 @@ | |||
167 | 548 | const string[] exported_actions = { | 543 | const string[] exported_actions = { |
168 | 549 | ACTION_ACCOUNTS, | 544 | ACTION_ACCOUNTS, |
169 | 550 | ACTION_PREFERENCES, | 545 | ACTION_PREFERENCES, |
170 | 551 | ACTION_ABOUT, | ||
171 | 552 | ACTION_QUIT, | 546 | ACTION_QUIT, |
172 | 553 | }; | 547 | }; |
173 | 554 | 548 | ||
174 | @@ -1663,22 +1657,30 @@ | |||
175 | 1663 | GearyApplication.instance.exit(); | 1657 | GearyApplication.instance.exit(); |
176 | 1664 | } | 1658 | } |
177 | 1665 | 1659 | ||
194 | 1666 | private void on_about() { | 1660 | public static void on_about() { |
195 | 1667 | Gtk.show_about_dialog(main_window, | 1661 | var dialog = create_about_dialog (); |
196 | 1668 | "program-name", GearyApplication.NAME, | 1662 | dialog.run (); |
197 | 1669 | "comments", GearyApplication.DESCRIPTION, | 1663 | dialog.destroy (); |
198 | 1670 | "authors", GearyApplication.AUTHORS, | 1664 | } |
199 | 1671 | "copyright", GearyApplication.COPYRIGHT, | 1665 | |
200 | 1672 | "license-type", Gtk.License.LGPL_2_1, | 1666 | public static Granite.Widgets.AboutDialog create_about_dialog () { |
201 | 1673 | "logo_icon_name", "internet-mail", | 1667 | var about = new Granite.Widgets.AboutDialog (); |
202 | 1674 | "version", GearyApplication.VERSION, | 1668 | about.program_name = GearyApplication.NAME; |
203 | 1675 | "website", GearyApplication.WEBSITE, | 1669 | about.version = GearyApplication.VERSION; |
204 | 1676 | "website-label", GearyApplication.WEBSITE_LABEL, | 1670 | about.logo_icon_name = "internet-mail"; |
205 | 1677 | "title", _("About %s").printf(GearyApplication.NAME), | 1671 | about.copyright = GearyApplication.COPYRIGHT; |
206 | 1678 | /// Translators: add your name and email address to receive credit in the About dialog | 1672 | about.website = GearyApplication.WEBSITE; |
207 | 1679 | /// For example: Yamada Taro <yamada.taro@example.com> | 1673 | about.website_label = GearyApplication.WEBSITE_LABEL; |
208 | 1680 | "translator-credits", _("translator-credits") | 1674 | about.authors = GearyApplication.AUTHORS; |
209 | 1681 | ); | 1675 | about.artists = GearyApplication.ARTISTS; |
210 | 1676 | // Translators: add your name and email address to receive credit in the About dialog | ||
211 | 1677 | // For example: Yamada Taro <yamada.taro@example.com> | ||
212 | 1678 | about.translator_credits = _("translator-credits"); | ||
213 | 1679 | about.license_type = Gtk.License.LGPL_2_1; | ||
214 | 1680 | about.help = GearyApplication.HELP; | ||
215 | 1681 | about.translate = GearyApplication.TRANSLATE; | ||
216 | 1682 | about.bug = GearyApplication.BUGREPORT; | ||
217 | 1683 | return about; | ||
218 | 1682 | } | 1684 | } |
219 | 1683 | 1685 | ||
220 | 1684 | private void on_shift_key(bool pressed) { | 1686 | private void on_shift_key(bool pressed) { |
Little stuck here, it seems to work fine from the menu but not from command line arg. Would love if someone could point out what I'm doing wrong.