Reorganization of client code
This is an attempt to break apart the client into suitable categories. The ui directory was being overloaded with every possible UI class. This attempts to give some organization going forward as well as make it easier for new contributors to wade into the code.
This commit is contained in:
parent
28736f0876
commit
a0bafaffb2
20 changed files with 67 additions and 56 deletions
|
|
@ -198,6 +198,19 @@ client/geary-config.vala
|
|||
client/geary-controller.vala
|
||||
client/main.vala
|
||||
|
||||
client/composer/composer-window.vala
|
||||
client/composer/contact-entry-completion.vala
|
||||
client/composer/email-entry.vala
|
||||
client/composer/webview-edit-fixer.vala
|
||||
|
||||
client/dialogs/alert-dialog.vala
|
||||
client/dialogs/login-dialog.vala
|
||||
client/dialogs/password-dialog.vala
|
||||
client/dialogs/preferences-dialog.vala
|
||||
|
||||
client/models/folder-list.vala
|
||||
client/models/message-list-store.vala
|
||||
|
||||
client/notification/libindicate.vala
|
||||
client/notification/new-messages-indicator.vala
|
||||
client/notification/new-messages-monitor.vala
|
||||
|
|
@ -205,37 +218,29 @@ client/notification/notification-bubble.vala
|
|||
client/notification/null-indicator.vala
|
||||
client/notification/unity-launcher.vala
|
||||
|
||||
client/ui/composer-window.vala
|
||||
client/ui/contact-entry-completion.vala
|
||||
client/ui/geary-login.vala
|
||||
client/ui/email-entry.vala
|
||||
client/ui/icon-factory.vala
|
||||
client/ui/folder-list.vala
|
||||
client/sidebar/sidebar-branch.vala
|
||||
client/sidebar/sidebar-common.vala
|
||||
client/sidebar/sidebar-entry.vala
|
||||
client/sidebar/sidebar-tree.vala
|
||||
|
||||
client/ui/folder-menu.vala
|
||||
client/ui/icon-factory.vala
|
||||
client/ui/main-toolbar.vala
|
||||
client/ui/main-window.vala
|
||||
client/ui/message-list-cell-renderer.vala
|
||||
client/ui/message-list-store.vala
|
||||
client/ui/message-list-view.vala
|
||||
client/ui/message-viewer.vala
|
||||
client/ui/message-web-view.vala
|
||||
client/ui/password-dialog.vala
|
||||
client/ui/preferences-dialog.vala
|
||||
client/ui/webview-edit-fixer.vala
|
||||
|
||||
client/ui/sidebar/sidebar-branch.vala
|
||||
client/ui/sidebar/sidebar-common.vala
|
||||
client/ui/sidebar/sidebar-entry.vala
|
||||
client/ui/sidebar/sidebar-tree.vala
|
||||
|
||||
client/util/util-date.vala
|
||||
client/util/util-dialog.vala
|
||||
client/util/util-email.vala
|
||||
client/util/util-files.vala
|
||||
client/util/util-gravatar.vala
|
||||
client/util/util-keyring.vala
|
||||
client/util/util-menu.vala
|
||||
client/util/util-webkit.vala
|
||||
|
||||
client/views/formatted-message-data.vala
|
||||
client/views/message-list-cell-renderer.vala
|
||||
client/views/message-list-view.vala
|
||||
client/views/message-viewer.vala
|
||||
client/views/message-web-view.vala
|
||||
)
|
||||
|
||||
set(CONSOLE_SRC
|
||||
|
|
|
|||
|
|
@ -317,39 +317,3 @@ public class FormattedMessageData : Object {
|
|||
|
||||
}
|
||||
|
||||
public class MessageListCellRenderer : Gtk.CellRenderer {
|
||||
private static FormattedMessageData? example_data = null;
|
||||
|
||||
// Mail message data.
|
||||
public FormattedMessageData data { get; set; }
|
||||
|
||||
public MessageListCellRenderer() {
|
||||
}
|
||||
|
||||
public override void get_size(Gtk.Widget widget, Gdk.Rectangle? cell_area, out int x_offset,
|
||||
out int y_offset, out int width, out int height) {
|
||||
if (example_data == null)
|
||||
style_changed(widget);
|
||||
|
||||
example_data.get_size(widget, cell_area, out x_offset, out y_offset, out width, out height);
|
||||
}
|
||||
|
||||
public override void render(Cairo.Context ctx, Gtk.Widget widget, Gdk.Rectangle background_area,
|
||||
Gdk.Rectangle cell_area, Gtk.CellRendererState flags) {
|
||||
if (data == null)
|
||||
return;
|
||||
|
||||
data.render(ctx, widget, background_area, cell_area, flags);
|
||||
}
|
||||
|
||||
// Recalculates size when the style changed.
|
||||
// Note: this must be called by the parent TreeView.
|
||||
public static void style_changed(Gtk.Widget widget) {
|
||||
if (example_data == null) {
|
||||
example_data = new FormattedMessageData.create_example();
|
||||
}
|
||||
|
||||
example_data.calculate_sizes(widget);
|
||||
}
|
||||
}
|
||||
|
||||
42
src/client/views/message-list-cell-renderer.vala
Normal file
42
src/client/views/message-list-cell-renderer.vala
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/* Copyright 2011-2012 Yorba Foundation
|
||||
*
|
||||
* This software is licensed under the GNU Lesser General Public License
|
||||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
public class MessageListCellRenderer : Gtk.CellRenderer {
|
||||
private static FormattedMessageData? example_data = null;
|
||||
|
||||
// Mail message data.
|
||||
public FormattedMessageData data { get; set; }
|
||||
|
||||
public MessageListCellRenderer() {
|
||||
}
|
||||
|
||||
public override void get_size(Gtk.Widget widget, Gdk.Rectangle? cell_area, out int x_offset,
|
||||
out int y_offset, out int width, out int height) {
|
||||
if (example_data == null)
|
||||
style_changed(widget);
|
||||
|
||||
example_data.get_size(widget, cell_area, out x_offset, out y_offset, out width, out height);
|
||||
}
|
||||
|
||||
public override void render(Cairo.Context ctx, Gtk.Widget widget, Gdk.Rectangle background_area,
|
||||
Gdk.Rectangle cell_area, Gtk.CellRendererState flags) {
|
||||
if (data == null)
|
||||
return;
|
||||
|
||||
data.render(ctx, widget, background_area, cell_area, flags);
|
||||
}
|
||||
|
||||
// Recalculates size when the style changed.
|
||||
// Note: this must be called by the parent TreeView.
|
||||
public static void style_changed(Gtk.Widget widget) {
|
||||
if (example_data == null) {
|
||||
example_data = new FormattedMessageData.create_example();
|
||||
}
|
||||
|
||||
example_data.calculate_sizes(widget);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue