1. 19 Apr, 2019 1 commit
  2. 09 Apr, 2018 1 commit
    • Michael Gratton's avatar
      Reduce CPU use when idle. · 71d05b6c
      Michael Gratton authored
      It looks like Gtk.Spinner triggers repaints when running, even when the
      widget is not visible. This ensures the conversation is stopped when not
      visible.
      
      Fix for Bug 783025.
      
      * src/client/conversation-viewer/conversation-viewer.vala
        (ConversationViewer): Start the conversation spinner when showing it,
        stop the conversation spinner when it is hidden.
      71d05b6c
  3. 28 Feb, 2017 1 commit
    • Michael Gratton's avatar
      Fix crash when conversation scrolled window child changes. · 07966a11
      Michael Gratton authored
      This is a workaround for GTK+ Bug 778190.
      
      * src/client/conversation-viewer/conversation-viewer.vala
        (ConversationViewer): Replace the whole conversation scrolled window
        when changing the conversation, not just the viewport.
      
      * ui/conversation-viewer.ui: Remove the ScrolledWindow for now since we
        are constructing it manually.
      07966a11
  4. 09 Dec, 2016 1 commit
  5. 06 Dec, 2016 1 commit
    • Michael Gratton's avatar
      Fix runtime errors when built/running against GTK +3.14. · 3ef1ac97
      Michael Gratton authored
      * ui/conversation-viewer.ui,
        src/client/conversation-viewer/conversation-viewer.vala: next-match and
        previous-match signals are only available in GTK+ >= 3.16.
      
      * ui/empty-placeholder.ui: Drop declared GTK+ requirement to 3.14.
      
      * ui/geary.css: The :not() pseudeo class is only available in GTK+ >= 3.20.
      3ef1ac97
  6. 24 Oct, 2016 1 commit
  7. 03 Oct, 2016 9 commits
    • Michael Gratton's avatar
    • Michael Gratton's avatar
      Clean up the conversation find implementation a bit. · d157fa04
      Michael Gratton authored
      * src/client/conversation-viewer/conversation-viewer.vala
        (ConversationViewer): Move notify::search-mode-enabled handler to UI
        file, remove old unused FSM code.
      d157fa04
    • Michael Gratton's avatar
      Reimplement in-conversation find. · dca845d8
      Michael Gratton authored
      * src/client/application/geary-controller.vala (GearyController): Remove
        ACTION_FIND_NEXT_IN_CONVERSATION and
        ACTION_FIND_PREVIOUS_IN_CONVERSATION arctions and callbacks since they
        will be taken care of by the search entry & search bar buttons, and
        remove from accelerators.ui. Add ACTION_TOGGLE_FIND action to handle
        toggling find bar in the same way as the search bar.
      
      * src/client/components/main-toolbar.vala (MainToolbar): Add new button
        and infrastrcuture for toggling the find bar.
      
      * src/client/conversation-viewer/conversation-viewer.vala
        (ConversationViewer): Convert ::conversation_page to be grid, add new
        ::conversation_scroller property for the scrollbar, update call
        sites. Add props for accessing find widgets, remove old find methods
        and add callbacks for handling find start, change, etc.
      
      * src/client/conversation-viewer/conversation-email.vala,
        src/client/conversation-viewer/conversation-message.vala: Add methods
        for accessing selected text for find.
      
      * src/client/conversation-viewer/conversation-listbox.vala
        (ConversationListBox::highlight_search_terms): Updated to return a flag
        specifiying whether any search results were found, and to
        expand/collapse messsages depending on whether they have any.
      
      * src/client/conversation-viewer/conversation-message.vala
        (ConversationMessage::highlight_search_terms): Keep track of how many
        results were found, and return that.
      
      * ui/conversation-viewer.ui: Convert conversation_page to be a grid, add
        a search bar and search widgets to it, and move conversation
        ScrolledWindow to it.
      dca845d8
    • Michael Gratton's avatar
    • Michael Gratton's avatar
      Break out ListBox used to display conversations into standalone widget. · d4676471
      Michael Gratton authored
      The conversation viewer's ListBox is sufficiently complex to warrant its
      own widget. Use empty placeholders for the list per the HIG, and
      correctly fix mamagement of empty folder vs no conversations selected
      this time.
      
      * src/client/application/geary-controller.vala (GearyController):
        Directly manage secondary parts of the conversation viewer, since the
        controller since it has a better and more timely idea of when a
        conversation change is due to folder loading status or from the user
        selecting conversations, and so the viwer doesn't need to hook back
        into the controller. Remove the now-unused conversations_selected
        signal and its callers.
      
      * src/client/conversation-viewer/conversation-listbox.vala: New widget
        for displaying the list of emails for a conversation. Moved relevant
        code from ConversationViewer here. Made adding emails async to get
        better UI responsiveness. Don't implement anything to handle
        conversation changes or emptying the list.
      
      * src/client/conversation-viewer/conversation-viewer.vala: Replace user
        messages - empty folder/search & no/multiple messages selected with new
        EmptyPlaceholder. Remove a lot of the state manage code needed when
        managing the email listbox. Add a new ConversationListBox for every new
        conversation and just throw away.
      
      * src/client/conversation-list/conversation-list-view.vala
        (ConversationListView): Clean up firing the conversations_selected
        signal - don't actually emit it when the model is clearing, and don't
        bother delaying the check either.
      
      * src/client/components/empty-placeholder.vala: New widget for displaying
        empty list and grid placeholders per the HIG.
      
      * src/client/conversation-viewer/conversation-email.vala
        (ConversationEmail): Make manually read a property, since it
        effectively is one.
      
      * src/CMakeLists.txt: Include new source files.
      
      * po/POTFILES.in: Include new source and UI files, and some missing ones.
      
      * ui/CMakeLists.txt: Include new UI files.
      
      * ui/conversation-viewer.ui: Replace user message and splash page with
        placeholders for the new empty placeholders(!).
      
      * ui/empty-placeholder.ui: UI def for new widget class.
      
      * ui/geary.css: Chase widget name/class changes, style new
        empty placeholder UI.
      d4676471
    • Michael Gratton's avatar
      1c674525
    • Michael Gratton's avatar
    • Michael Gratton's avatar
      Reenable and update code for attached, full pane message composer. · 5184a38f
      Michael Gratton authored
      Display attached+un-embedded composer as an additional ConversationViewer
      stack page, although it realy should be broken as its own top-level
      widget - there's already too much state in ConversationViewer.
      
      * src/client/conversation-viewer/conversation-viewer.vala: Remove old
        composer boxes code. Add new ViewState enum, property and methods to
        define and manipulate the current view state - either conversation or
        composer.
        (do_conversation): New method to put the viewer in conversation mode.
        (do_compose): New method to put the viewer in compose mode, hook up the
        composer widget, and handle ConversationListView selection management
        for now.
        (on_folder_selected, on_conversation_count_changed,
        on_conversations_selected): Ensure these methods do the right thing
        depending on the viewer's current view state.
        (set_paned_composer): Replaced by ::do_compose, fixed call sites.
        (show_multiple_selected): Minor code clean up - moved down to a more
        appropriate location.
      
      * src/client/composer/composer-box.vala (ComposerBox): Don't attempt to
        up-manage it's parent's state, since the parent has a much better idea
        of how best to do that. Likewise move code to manage previous
        ConversationList selection out, provide signal so the a more
        appropriate class can manage it instead.
      
      * src/client/composer/composer-container.vala: Add some method comments.
      
      * ui/conversation-viewer.ui: Add new page to the stack for the composer.
      5184a38f
    • Michael Gratton's avatar
      Convert ConversationViewer to a Stack with a ListBox, remove its WebView. · b29d83e5
      Michael Gratton authored
      * 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.
      b29d83e5