Exemplo n.º 1
0
 protected virtual void OnNotebookSwitchPage(object o, Gtk.SwitchPageArgs args)
 {
     if (args.PageNum == 2)
     {
         fileListView.Fill(target);
     }
 }
Exemplo n.º 2
0
        private void HandleSwitchPage(object o, Gtk.SwitchPageArgs args)
        {
            var notebook   = o as Gtk.Notebook;
            var pageNum    = args.PageNum;
            var pageWidget = notebook.GetNthPage((int)pageNum);

            LastSelectedPreferencesPage = pageWidget.GetType().FullName;
        }
Exemplo n.º 3
0
            public void HandleSwitchPage(object o, Gtk.SwitchPageArgs args)
            {
                var handler = Handler;

                if (handler != null && handler.Widget.Loaded)
                {
                    handler.Callback.OnSelectedIndexChanged(handler.Widget, EventArgs.Empty);
                }
            }
Exemplo n.º 4
0
        protected virtual void OnBeforeSwitchPage(object sender, Gtk.SwitchPageArgs e)
        {
            if (f_IsBrowseModeEnabled)
            {
                return;
            }

            var chatView = CurrentChatView;

            chatView.OutputMessageTextView.UpdateMarkerline();
        }
Exemplo n.º 5
0
        protected virtual void OnBeforeSwitchPage(object sender, Gtk.SwitchPageArgs e)
        {
            if (f_IsBrowseModeEnabled || Frontend.IsDisconnecting)
            {
                return;
            }

            var chatView = CurrentChatView;

            chatView.UpdateLastSeenMessage();
        }
Exemplo n.º 6
0
            public void HandleSwitchPage(object o, Gtk.SwitchPageArgs args)
            {
                var handler = Handler;

                if (handler != null && handler.Enabled)
                {
                    handler.Callback.OnSelectedIndexChanged(handler.Widget, EventArgs.Empty);
                    oldIndex = (int)args.PageNum;
                }
                else if (oldIndex >= 0)
                {
                    handler.Control.Page = oldIndex;
                }
            }
Exemplo n.º 7
0
        void OnMainWindowNotebookSwitchPage(object sender, Gtk.SwitchPageArgs e)
        {
            if (MainWindow.Notebook.IsBrowseModeEnabled)
            {
                return;
            }

            var currentChatView = MainWindow.Notebook.CurrentChatView;

            if (currentChatView == null)
            {
                return;
            }
            DisposeIndicator(currentChatView);
        }
Exemplo n.º 8
0
        void OnMainWindowNotebookSwitchPage(object sender, Gtk.SwitchPageArgs e)
        {
            Trace.Call(sender, e);

            if (MainWindow.Notebook.IsBrowseModeEnabled)
            {
                return;
            }

            var currentChatView = MainWindow.Notebook.CurrentChatView;

            if (currentChatView == null)
            {
                return;
            }
            DisposeNotification(currentChatView);
        }
Exemplo n.º 9
0
        protected virtual void OnNotebook1SwitchPage(object o, Gtk.SwitchPageArgs args)
        {
            Gtk.TreeIter iter;
            Gtk.Widget   active_tab = notebook1.Children [notebook1.Page];

            switch (notebook1.GetTabLabelText(active_tab))
            {
            case "System Packages":
                normalPackageTreeView.Selection.GetSelected(out iter);
                detailsButton.Sensitive = normalPackageListStore.IterIsValid(iter);
                break;

            case "Project Packages":
                projectPackageTreeView.Selection.GetSelected(out iter);
                detailsButton.Sensitive = projectPackageListStore.IterIsValid(iter);
                break;
            }
        }
Exemplo n.º 10
0
        void OnMainWindowNotebookSwitchPage(object sender, Gtk.SwitchPageArgs e)
        {
            if (MainWindow.Notebook.IsBrowseModeEnabled)
            {
                return;
            }

            var currentChatView = ChatViewManager.CurrentChatView;

            if (currentChatView == null)
            {
                return;
            }
#if INDICATE_SHARP
            DisposeIndicator(currentChatView);
#elif MESSAGING_MENU_SHARP
            DisposeSource(currentChatView);
#endif
        }
Exemplo n.º 11
0
        protected virtual void OnSwitchPage(object sender, Gtk.SwitchPageArgs e)
        {
            Trace.Call(sender, e);

            if (f_IsBrowseModeEnabled)
            {
                return;
            }

            // synchronize FrontManager.CurrenPage
            ChatView chatView = GetChat((int)e.PageNum);

            if (chatView == null)
            {
                return;
            }

            ChatModel chatModel = chatView.ChatModel;

            // clear activity and highlight
            chatView.HasHighlight = false;
            chatView.HasActivity  = false;
            chatView.HasEvent     = false;
            var lastMsg = chatView.OutputMessageTextView.LastMessage;

            var method = Trace.GetMethodBase();

            f_SwitchPageQueue.Queue(delegate {
                // HACK: don't pass the real parameters are it's unsafe from
                // a non-main (GUI) thread!
                Trace.Call(method, null, null);

                try {
                    DateTime start = DateTime.UtcNow, stop;
                    var fm         = Frontend.FrontendManager;
                    if (fm == null)
                    {
                        // in case we are currently reconnecting to a remote engine
                        return;
                    }

                    // OPT-TODO: we could use here a TaskStack instead which
                    // would make sure only the newest task gets executed
                    // instead of every task in the FIFO sequence!
                    var nmanager = chatView.ProtocolManager;

                    // TODO: only set the protocol manager and update network
                    // status if the protocol manager differs from the old one

                    // REMOTING CALL 2
                    fm.CurrentChat = chatModel;
                    if (nmanager != null)
                    {
                        // REMOTING CALL 3
                        fm.CurrentProtocolManager = nmanager;
                    }

                    // even when we have no network manager, we still want to update
                    // the network status and title
                    // REMOTING CALL 4
                    fm.UpdateNetworkStatus();

                    // update last seen highlight
                    // REMOTING CALL 5
                    if (lastMsg != null && !Frontend.UseLowBandwidthMode)
                    {
                        chatModel.LastSeenHighlight = lastMsg.TimeStamp;
                    }

                    stop = DateTime.UtcNow;
#if LOG4NET
                    f_Logger.Debug("OnSwitchPage(): task took: " + (stop - start).Milliseconds + " ms");
#endif
                } catch (Exception ex) {
#if LOG4NET
                    f_Logger.Error("OnSwitchPage(): Exception", ex);
#endif
                    Frontend.ShowException(ex);
                }
            });
        }
 void HandleWidgetSwitchPage(object o, Gtk.SwitchPageArgs args)
 {
     ((INotebookEventSink)EventSink).OnCurrentTabChanged();
 }
Exemplo n.º 13
0
 void OnPageChanged(object s, Gtk.SwitchPageArgs args)
 {
     EmitNotify("CurrentPage");
 }
Exemplo n.º 14
0
 protected void HandleSwitchPage(object o, Gtk.SwitchPageArgs args)
 {
     SelectedPageIndex = args.PageNum;
 }
Exemplo n.º 15
0
 protected void OnCurrentPageChanged(object s, Gtk.SwitchPageArgs args)
 {
     UpdateButtons();
 }