[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: [Kstars-devel] KDE/kdeedu/kstars/kstars
From:       "Jason Harris" <kstars () 30doradus ! org>
Date:       2008-06-09 5:28:48
Message-ID: 401f1570806082228x2558a212l8b45ff4dcad9e36e () mail ! gmail ! com
[Download RAW message or body]

BTW, you will need to delete the kstarsui.rc file in your
$KDEHOME/share/apps/kstars directory (if it exists) to see the menu
changes.

On Sun, Jun 8, 2008 at 10:17 PM, Jason Harris <kstars@30doradus.org> wrote:
> SVN commit 818659 by harris:
>
> Fixing crash when closing the toolbar config dialog.  I had been
> invoking KEditToolbar directly, but the API docs clued me in to the fact
> that this is not necessary.  As long as I have an action named
> "options_configure_toolbars" in my XMLGUI file, then I don't need to do
> anything else.  Apparently doing it manually is a bit worse than
> unnecessary, because the mysterious crash I had doing it manually is
> gone now.
>
> Actually, there's one more detail I needed to make the auto-code work.
> By looking at the code of other apps, I learned that I
> need to have setXMLFile("kstarsui.rc") and setupGUI().
>
> It sure would be nice if we had some up to date documentation on how
> this XMLGUI stuff is supposed to work...
>
> CCMAIL: kstars-devel@kde.org
>
>
>
>  M  +0 -5      kstars.h
>  M  +0 -12     kstarsactions.cpp
>  M  +3 -3      kstarsinit.cpp
>  M  +3 -6      kstarsui.rc
>
>
> --- trunk/KDE/kdeedu/kstars/kstars/kstars.h #818658:818659
> @@ -409,11 +409,6 @@
>     void slotApplyConfigChanges();
>
>     /**
> -       *action slot: Configure toolbars
> -       */
> -    void slotConfigureToolbars();
> -
> -    /**
>        *action slot: Generate toolbars with new user-specified configuration
>        */
>     void slotApplyToolbarConfig();
> --- trunk/KDE/kdeedu/kstars/kstars/kstarsactions.cpp #818658:818659
> @@ -344,18 +344,6 @@
>     }
>  }
>
> -void KStars::slotConfigureToolbars() {
> -    saveMainWindowSettings( KGlobal::config()->group( "MainWindow" ) );
> -    KEditToolBar ket(actionCollection());
> -    connect( &ket, SIGNAL(newToolBarConfig()), this, SLOT(slotApplyToolbarConfig()) );
> -
> -    //ket.exec();
> -    //DEBUG
> -    if ( ket.exec() == QDialog::Accepted ) {
> -        kDebug() << "KEditToolbar dialog returned Accepted";
> -    }
> -}
> -
>  void KStars::slotApplyToolbarConfig() {
>     //DEBUG
>     kDebug() << "Recreating GUI...";
> --- trunk/KDE/kdeedu/kstars/kstars/kstarsinit.cpp #818658:818659
> @@ -268,9 +268,6 @@
>     ta->setText( i18n( "Show View Toolbar" ) );
>     QObject::connect(ta, SIGNAL( toggled(bool) ), this, SLOT(slotShowGUIItem(bool)));
>
> -    actionCollection()->addAction( KStandardAction::ConfigureToolbars, "configure_toolbars",
> -                                   this, SLOT( slotConfigureToolbars() ) );
> -
>     //Statusbar view options
>     ta = actionCollection()->add<KToggleAction>( "show_statusBar");
>     ta->setText( i18n( "Show Statusbar" ) );
> @@ -484,6 +481,9 @@
>     ta->setToolTip( i18n("Toggle opaque ground") );
>     connect( ta, SIGNAL( triggered() ), this, SLOT( slotViewToolBar() ) );
>
> +    setXMLFile( "kstarsui.rc" );
> +    setupGUI();
> +
>     if (Options::fitsSaveDirectory().isEmpty())
>         Options::setFitsSaveDirectory(QDir:: homePath());
>  }
> --- trunk/KDE/kdeedu/kstars/kstars/kstarsui.rc #818658:818659
> @@ -89,12 +89,7 @@
>                        <Action name="show_focus_box" />
>                        <Action name="show_location_box" />
>                </Menu>
> -               <Menu name="toolbars"><text>&amp;Toolbars</text>
> -                       <Action name="show_mainToolBar" />
> -                       <Action name="show_viewToolBar" />
> -                       <Separator />
> -                       <Action name="configure_toolbars" />
> -               </Menu>
> +                <Merge name="StandardToolBarMenuHandler" />
>                <Menu name="statusbar"><text>&amp;Statusbar</text>
>                        <Action name="show_statusBar" />
>                        <Separator />
> @@ -106,6 +101,8 @@
>                <Separator />
>                <Action name="geolocation" />
>                <Separator />
> +               <Action name="options_configure_keybinding"/>
> +               <Action name="options_configure_toolbars"/>
>                <Action name="configure" />
>                <Action name="startwizard" />
>        </Menu>
> _______________________________________________
> Kstars-devel mailing list
> Kstars-devel@kde.org
> https://mail.kde.org/mailman/listinfo/kstars-devel
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic