geary/ui/CMakeLists.txt
Michael James Gratton b29d83e546 Convert ConversationViewer to a Stack with a ListBox, remove its WebView.
* src/client/conversation-viewer/conversation-viewer.vala: Convert to a
  GtkStack. Use a GTK template for constructing the UI. Remove WebView
  and any DOM-related code. Replace the enum DisplayMode and hence the
  HTML spinner and HTML user message with widgets in the stack. Remove
  all menus since they're all message specific and will need to be
  re-implemented for ConversationViewer. Comment out composer related
  code for the moment.

* src/client/application/geary-controller.vala
  (GearyController::conversations_selected): Make both conversations and
  current_folder arguments non-nullable, since it doesn't make any sense
  for there not to be any and simplifies handler impls.
  (GearyController::on_conversations_selected): Don't fire when there
  isn't a current folder.

* src/client/components/main-window.vala (MainWindow::set_styling): Add
  CSS theme code for the the conversation message list.
  (MainWindow::create_layout): Remove GtkFrame, just add the
  ConversationViewer instance directly.

* ui/conversation-viewer.ui: New GtkBuilder template for
  ConversationViewer, implemented as a GtkStack containing widgets for
  displaying the loading spinner, conversation as a GtkListBox, and label
  for user messages.

* ui/CMakeLists.txt, po/POTFILES.in: Added new UI files.
2016-10-04 10:58:17 +11:00

65 lines
1.9 KiB
CMake

set(RESOURCE_LIST
STRIPBLANKS "accelerators.ui"
STRIPBLANKS "account_cannot_remove.glade"
STRIPBLANKS "account_list.glade"
STRIPBLANKS "account_spinner.glade"
STRIPBLANKS "certificate_warning_dialog.glade"
STRIPBLANKS "composer-headerbar.ui"
STRIPBLANKS "composer-menus.ui"
STRIPBLANKS "composer-widget.ui"
STRIPBLANKS "conversation-message.ui"
STRIPBLANKS "conversation-message-menu.ui"
STRIPBLANKS "conversation-viewer.ui"
STRIPBLANKS "edit_alternate_emails.glade"
STRIPBLANKS "find_bar.glade"
STRIPBLANKS "folder-popover.ui"
STRIPBLANKS "gtk/help-overlay.ui"
STRIPBLANKS "gtk/menus.ui"
STRIPBLANKS "login.glade"
STRIPBLANKS "password-dialog.glade"
STRIPBLANKS "preferences.glade"
STRIPBLANKS "remove_confirm.glade"
STRIPBLANKS "toolbar_empty_menu.ui"
STRIPBLANKS "toolbar_mark_menu.ui"
STRIPBLANKS "upgrade_dialog.glade"
"geary.css"
)
compile_gresources(
RESOURCES_C
RESOURCES_XML
TYPE EMBED_C
SOURCE_DIR "${CMAKE_SOURCE_DIR}/ui"
PREFIX "/org/gnome/Geary"
RESOURCES ${RESOURCE_LIST}
)
compile_gresources(
RESOURCES_H
RESOURCES_XML
TYPE EMBED_H
SOURCE_DIR "${CMAKE_SOURCE_DIR}/ui"
PREFIX "/org/gnome/Geary"
RESOURCES ${RESOURCE_LIST}
)
add_custom_target(resource_h ALL DEPENDS ${RESOURCES_H})
add_custom_target(resource_c ALL DEPENDS ${RESOURCES_C})
# Work around valac wanting the resource files to be in the same
# directory as the XML file.
add_custom_target(resource_copy ALL
mkdir -p ${CMAKE_BINARY_DIR}/ui
COMMAND
cp ${RESOURCES_XML} ${CMAKE_BINARY_DIR}/ui
COMMAND
cp ${CMAKE_SOURCE_DIR}/ui/*.glade ${CMAKE_SOURCE_DIR}/ui/*.ui ${CMAKE_BINARY_DIR}/ui
COMMAND
cp ${CMAKE_SOURCE_DIR}/ui/*.css ${CMAKE_BINARY_DIR}/ui
)
add_dependencies(resource_copy resource_c)
# Export the file names so they can be used in the source build
set(RESOURCES_C ${RESOURCES_C} PARENT_SCOPE)
set(RESOURCES_XML "${CMAKE_BINARY_DIR}/ui/.gresource.xml" PARENT_SCOPE)