Current desktop detection / app access - take 2.

William Jon McCann mccannwj at pha.jhu.edu
Thu May 27 22:46:24 EEST 2004


Michael Meeks wrote:
> 	I am still thoroughly convinced that basing your argument on some
> g_assert_not_reached equivalent is rather feeble; this should/could
> read:
> 
>   switch (desktop)
>   {
>     case GTK:
>        do_gtk_thing ();
>        break;
>     case QT:
>     default:
>          do_qt_thing ();
>        break;
>   }

Hi,

Does do_gtk_thing (or if you are after desktop integration 
do_gnome_thing) involve using gnome_vfs, gtk_dialog, etc?

Does do_{qt,kde}_thing so something similar?

Does this imply that you will be linking the application to the 
libraries for every desktop under the sun?  Or will you have to do:

   switch (desktop)
   {
#ifdef HAVE_GNOME
     case GNOME:
        do_gnome_thing ();
        break;
#endif
#ifdef HAVE_KDE
     case KDE:
        do_kde_thing ();
        break;
#endif
#ifdef HAVE_CDE
     case CDE: /* who uses this any more? */
        break;
#endif
     default:
#ifdef HAVE_GLIB
        g_assert_not_reached ();
#else
        exit (1);
#endif
        break;
   }

This seems pretty difficult to maintain.  How will this discover new 
desktops?  Handle package addition / removal?

Maybe I'm misunderstanding...

Thanks,
Jon




More information about the xdg mailing list