diff -Naur switchdesk-3.9.8/src/Makefile switchdesk-3.9.8-vm/src/Makefile --- switchdesk-3.9.8/src/Makefile 2002-07-24 08:36:09.000000000 -0500 +++ switchdesk-3.9.8-vm/src/Makefile 2003-12-20 10:49:04.000000000 -0600 @@ -219,7 +219,7 @@ switchdesk_kde_SOURCES = switchdesk-kde.cpp main.cpp switchdesk_gnome_SOURCES = switchdesk-gnome.c -pics_DATA = gnome.xpm kde.xpm fvwm.xpm \ +pics_DATA = gnome.xpm kde.xpm fvwm.xpm xfce4.xpm \ elogo.xpm windowmaker.xpm twm.xpm question.xpm @@ -229,7 +229,7 @@ XCLIENT_TEMPLATES = Xclients.toplevel Xclients.gnome \ Xclients.kde Xclients.enlightenment \ - Xclients.windowmaker Xclients.twm Xclients.fvwm + Xclients.windowmaker Xclients.twm Xclients.fvwm Xclients.xfce4 mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = ../config.h diff -Naur switchdesk-3.9.8/src/Makefile.am switchdesk-3.9.8-vm/src/Makefile.am --- switchdesk-3.9.8/src/Makefile.am 2002-08-05 07:27:56.000000000 -0500 +++ switchdesk-3.9.8-vm/src/Makefile.am 2003-12-20 10:49:16.000000000 -0600 @@ -25,7 +25,7 @@ switchdesk_kde_SOURCES = switchdesk-kde.cpp main.cpp switchdesk_gnome_SOURCES = switchdesk-gnome.c -pics_DATA = gnome.xpm kde.xpm fvwm.xpm \ +pics_DATA = gnome.xpm kde.xpm fvwm.xpm xfce4.xpm \ elogo.xpm windowmaker.xpm twm.xpm question.xpm METASOURCES = AUTO @@ -34,7 +34,7 @@ XCLIENT_TEMPLATES = Xclients.toplevel Xclients.gnome \ Xclients.kde Xclients.enlightenment \ - Xclients.wmaker Xclients.twm Xclients.fvwm + Xclients.wmaker Xclients.twm Xclients.fvwm Xclients.xfce4 # just install datas here. Use install-exec-local for scripts and etc. # the binary itself is already installed from automake diff -Naur switchdesk-3.9.8/src/Makefile.in switchdesk-3.9.8-vm/src/Makefile.in --- switchdesk-3.9.8/src/Makefile.in 2002-06-26 07:15:15.000000000 -0500 +++ switchdesk-3.9.8-vm/src/Makefile.in 2003-12-20 10:49:36.000000000 -0600 @@ -218,7 +218,7 @@ switchdesk_kde_SOURCES = switchdesk-kde.cpp main.cpp switchdesk_gnome_SOURCES = switchdesk-gnome.c -pics_DATA = gnome.xpm kde.xpm fvwm.xpm \ +pics_DATA = gnome.xpm kde.xpm fvwm.xpm xfce4.xpm \ elogo.xpm windowmaker.xpm twm.xpm question.xpm @@ -228,7 +228,7 @@ XCLIENT_TEMPLATES = Xclients.toplevel Xclients.gnome \ Xclients.kde Xclients.enlightenment \ - Xclients.windowmaker Xclients.twm Xclients.fvwm + Xclients.windowmaker Xclients.twm Xclients.fvwm Xclients.xfce4 mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs CONFIG_HEADER = ../config.h diff -Naur switchdesk-3.9.8/src/switchdesk-gnome.c switchdesk-3.9.8-vm/src/switchdesk-gnome.c --- switchdesk-3.9.8/src/switchdesk-gnome.c 2002-08-05 09:07:10.000000000 -0500 +++ switchdesk-3.9.8-vm/src/switchdesk-gnome.c 2003-12-20 10:50:12.000000000 -0600 @@ -86,7 +86,11 @@ exeStr = g_strdup_printf("switchdesk-helper twm %s", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(localButton)) ? "local" : ""); break; - case 6: /* Revert */ + case 6: /* xfce4 */ + exeStr = g_strdup_printf("switchdesk-helper xfce4 %s", + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(localButton)) ? "local" : ""); + break; + case 7: /* Revert */ exeStr = g_strdup_printf("switchdesk-helper revert %s", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(localButton)) ? "local" : ""); break; @@ -187,16 +191,22 @@ case 6: p = gdk_pixmap_create_from_xpm(window->window, NULL, &style->bg[GTK_STATE_NORMAL], - "question.xpm"); + "xfce4.xpm"); curSelection = 6; break; case 7: - p = gdk_pixmap_create_from_xpm(window->window, NULL, &style->bg[GTK_STATE_NORMAL], "question.xpm"); curSelection = 7; break; + case 8: + + p = gdk_pixmap_create_from_xpm(window->window, NULL, + &style->bg[GTK_STATE_NORMAL], + "question.xpm"); + curSelection = 8; + break; } gtk_pixmap_set(GTK_PIXMAP(pixmapArea), p, NULL); @@ -209,14 +219,14 @@ GtkWidget *vbox=0, *hbox1=0, *hbox2=0, *topVBox=0; GtkWidget *groupFrame=0; GtkWidget *gnomeButton=0, *kdeButton=0, *fvwmButton=0, - *eButton=0, *wMakerButton=0, *twmButton=0, *revertButton=0, *prevButton=0; + *eButton=0, *wMakerButton=0, *twmButton=0, *xfceButton=0, *revertButton=0, *prevButton=0; GtkWidget *okButton=0, *cancelButton=0; GSList *group=0; gchar *dispStr=0; GtkWidget *dispLabel=0; GdkPixmap *gdkpm=0; - int gnomearg=0, kdearg=1, fvwmarg=2, earg=3, wMakerarg=4, twmarg=5, - revertarg=6; + int gnomearg=0, kdearg=1, fvwmarg=2, earg=3, wMakerarg=4, twmarg=5, xfcearg=6, + revertarg=7; bindtextdomain(PACKAGE, "/usr/share/locale"); textdomain(PACKAGE); @@ -342,6 +352,17 @@ if (prevButton) group = gtk_radio_button_group(GTK_RADIO_BUTTON(prevButton)); + if (checkInPath("startxfce4")) { + xfceButton = gtk_radio_button_new_with_label(group, "XFce4"); + gtk_signal_connect(GTK_OBJECT(xfceButton), "clicked", + GTK_SIGNAL_FUNC(updatePic), (gpointer) &xfcearg); + gtk_box_pack_start(GTK_BOX(vbox), xfceButton, TRUE, TRUE, 0); + gtk_widget_show(xfceButton); + prevButton = xfceButton; + } + + if (prevButton) + group = gtk_radio_button_group(GTK_RADIO_BUTTON(prevButton)); if (access(g_strdup_printf("%s/.Xclients.switchdesk",getenv("HOME")), F_OK) == 0) { revertButton = gtk_radio_button_new_with_label(group, @@ -420,6 +441,9 @@ } else if (wMakerButton) { gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(wMakerButton), 1); updatePic(NULL, (gpointer) &wMakerarg); + } else if (xfceButton) { + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(xfceButton), 1); + updatePic(NULL, (gpointer) &xfcearg); } else { gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(twmButton), 1); updatePic(NULL, (gpointer) &twmarg); diff -Naur switchdesk-3.9.8/src/switchdesk-helper switchdesk-3.9.8-vm/src/switchdesk-helper --- switchdesk-3.9.8/src/switchdesk-helper 2002-07-24 08:24:48.000000000 -0500 +++ switchdesk-3.9.8-vm/src/switchdesk-helper 2003-12-20 09:48:05.000000000 -0600 @@ -83,6 +83,11 @@ DNAME="twm" NEW_XCLIENTS="$DATADIR/Xclients.fvwm" ;; + XFCE4|XFCE) + [ ! -x /usr/bin/startxfce4 ] && NotFound XFCE4 + DNAME="xfce4" + NEW_XCLIENTS="$DATADIR/Xclients.xfce4" + ;; WINDOWMAKER|WMAKER) [ ! -x /usr/bin/wmaker ] && NotFound WindowMaker DNAME="WindowMaker" diff -Naur switchdesk-3.9.8/src/switchdesk-kde.cpp switchdesk-3.9.8-vm/src/switchdesk-kde.cpp --- switchdesk-3.9.8/src/switchdesk-kde.cpp 2002-07-24 08:24:47.000000000 -0500 +++ switchdesk-3.9.8-vm/src/switchdesk-kde.cpp 2003-12-20 10:50:54.000000000 -0600 @@ -76,6 +76,7 @@ QRadioButton *eButton = 0L; QRadioButton *wMakerButton = 0L; QRadioButton *twmButton = 0L; + QRadioButton *xfceButton = 0L; setCaption("Desktop Switcher"); @@ -134,6 +135,12 @@ connect(twmButton, SIGNAL(clicked()), SLOT(updateTwmPic())); } + if (checkInPath("startxfce4")) { + xfceButton = new QRadioButton("XFce4", gbox); + subLayout2->addWidget(xfceButton); + connect(xfceButton, SIGNAL(clicked()), SLOT(updatexfcePic())); + } + QString oldFile = getenv("HOME"); oldFile += "/.Xclients.switchdesk"; if (QFile::exists(oldFile.data())) { @@ -207,6 +214,9 @@ } else if (wMakerButton) { wMakerButton->setChecked(TRUE); updateWMakerPic(); + } else if (xfceButton) { + xfceButton->setChecked(TRUE); + updatexfcePic(); } else { twmButton->setChecked(TRUE); updateTwmPic(); @@ -242,7 +252,10 @@ case 5: // twm exeStr += "twm"; break; - case 6: // Revert + case 6: // XFce4 + exeStr += "xfce4"; + break; + case 7: // Revert exeStr += "revert"; break; } @@ -287,6 +300,9 @@ p.load("/usr/share/apps/switchdesk/pics/twm.xpm"); break; case 6: + p.load("/usr/share/apps/switchdesk/pics/xfce4.xpm"); + break; + case 7: p.load("/usr/share/apps/switchdesk/pics/question.xpm"); break; } diff -Naur switchdesk-3.9.8/src/switchdesk-kde.h switchdesk-3.9.8-vm/src/switchdesk-kde.h --- switchdesk-3.9.8/src/switchdesk-kde.h 2000-06-20 23:45:31.000000000 -0500 +++ switchdesk-3.9.8-vm/src/switchdesk-kde.h 2003-12-20 10:10:37.000000000 -0600 @@ -27,7 +27,8 @@ void updateEPic() { updatePic(3); } void updateWMakerPic() { updatePic(4); } void updateTwmPic() { updatePic(5); } - void revert() { updatePic(6); } + void updatexfcePic() { updatePic(6); } + void revert() { updatePic(7); } void accept(); protected: diff -Naur switchdesk-3.9.8/src/Xclients.xfce4 switchdesk-3.9.8-vm/src/Xclients.xfce4 --- switchdesk-3.9.8/src/Xclients.xfce4 1969-12-31 18:00:00.000000000 -0600 +++ switchdesk-3.9.8-vm/src/Xclients.xfce4 2003-12-20 09:33:25.000000000 -0600 @@ -0,0 +1,8 @@ +#!/bin/sh +######################################################################## +# +# XFce4 +# +######################################################################## + +exec /usr/bin/startxfce4 diff -Naur switchdesk-3.9.8/src/xfce4.xpm switchdesk-3.9.8-vm/src/xfce4.xpm --- switchdesk-3.9.8/src/xfce4.xpm 1969-12-31 18:00:00.000000000 -0600 +++ switchdesk-3.9.8-vm/src/xfce4.xpm 2003-12-20 10:46:14.000000000 -0600 @@ -0,0 +1,177 @@ +/* XPM */ +static char * xfce4_xpm[] = { +"100 48 126 2", +" c None", +". c #00CCFF", +"+ c #004456", +"@ c #000000", +"# c #006B86", +"$ c #00566C", +"% c #00B4E2", +"& c #00080A", +"* c #00ADD9", +"= c #000608", +"- c #006984", +"; c #00CBFE", +"> c #00323F", +", c #00A0C8", +"' c #0090B4", +") c #003C4B", +"! c #00C6F8", +"~ c #001C23", +"{ c #00637B", +"] c #007C9B", +"^ c #003644", +"/ c #008FB3", +"( c #00080B", +"_ c #00B6E3", +": c #00B8E6", +"< c #000C10", +"[ c #00B9E8", +"} c #009AC1", +"| c #004253", +"1 c #00B7E5", +"2 c #0096BC", +"3 c #000F13", +"4 c #00BEEE", +"5 c #008CB0", +"6 c #00090B", +"7 c #0091B6", +"8 c #000001", +"9 c #00CBFD", +"0 c #002E3A", +"a c #00C0F1", +"b c #00141A", +"c c #00AAD5", +"d c #0093B8", +"e c #009BC2", +"f c #00C7F9", +"g c #009DC5", +"h c #00B4E1", +"i c #004658", +"j c #00647D", +"k c #005368", +"l c #002C37", +"m c #00ACD8", +"n c #00252F", +"o c #002F3B", +"p c #0085A7", +"q c #00222B", +"r c #00A8D2", +"s c #007B9A", +"t c #009CC3", +"u c #00A7D1", +"v c #0083A4", +"w c #00C2F3", +"x c #00181F", +"y c #0089AB", +"z c #004557", +"A c #00C8FA", +"B c #00C1F1", +"C c #001015", +"D c #004455", +"E c #002029", +"F c #00627B", +"G c #00AFDA", +"H c #007998", +"I c #001318", +"J c #003340", +"K c #00C6F7", +"L c #00485B", +"M c #00303D", +"N c #006A85", +"O c #005064", +"P c #003948", +"Q c #001116", +"R c #00A0C9", +"S c #006E8A", +"T c #0084A5", +"U c #006F8B", +"V c #005469", +"W c #003745", +"X c #00BCEB", +"Y c #001217", +"Z c #0081A2", +"` c #004354", +" . c #00B0DC", +".. c #000709", +"+. c #00A6D0", +"@. c #00242E", +"#. c #00AEDA", +"$. c #004556", +"%. c #00BFEF", +"&. c #00ABD6", +"*. c #009BC1", +"=. c #00C2F2", +"-. c #008EB2", +";. c #00B5E3", +">. c #009DC4", +",. c #00BAE9", +"'. c #003542", +"). c #00546A", +"!. c #000E12", +"~. c #00232C", +"{. c #00A2CB", +"]. c #000102", +"^. c #00171D", +"/. c #00CAFD", +"(. c #002934", +"_. c #005267", +":. c #00B2DE", +"<. c #00C4F6", +"[. c #00ACD7", +"}. c #007F9F", +"|. c #004152", +"1. c #000406", +"2. c #00A6CF", +"3. c #00C5F7", +"4. c #006680", +"5. c #00313E", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +" . . . . . . + @ @ . . . . . . # @ @ @ . . . . . . . . . . . . . . $ @ @ . . . . . . . @ @ @ ", +" . . . . . % & @ . . . . . * = @ @ @ . . . . . . . . . . . . . . $ @ @ . . . . . . . @ @ @ ", +" . . . . . . - @ @ . . . . . ; > @ @ @ . . . . . , ' ' ' ' ' ' ' ' ) @ @ . . . . . . . . @ @ @ ", +" . . . . . ! ~ @ { . . . . . ] @ @ @ . . . . . ^ @ @ @ @ @ @ @ @ @ @ @ . . . . . . . . . @ @ @ ", +" . . . . . / ( _ . . . . : < @ @ @ . . . . . ^ @ @ . . . . . . . . . . . . . . . . . . [ . . . . . @ @ @ ", +" . . . . . . } . . . . . | @ @ @ . . . . . ^ @ @ . . . . . . . . . . 1 @ . . . . . . . . . . 2 3 . . . 4 + . . . . . @ @ @ ", +" . . . . . . . . . . 5 @ @ @ . . . . . ^ @ @ . . . . . . . . . . . . . @ @ 6 . . . . . . . . . . . . 7 8 @ . . . 9 0 ^ . . . . . @ @ @ ", +" . . . . . . . . . a b @ @ @ . . . . . . . . . . . . . . . . . . . . . c d e [ . . . @ @ ] . . . . f g d h . . . . . i @ @ . . . . j @ ^ . . . . . @ @ @ ", +" . . . . . . . . k @ @ @ . . . . . . . . . . . . . 5 @ @ l . . . . . m n @ @ @ @ o p f @ q ; . . . r b @ @ 8 s . . . . t @ @ . . . . g 8 @ ^ . . . . . @ @ @ ", +" . . . . . . u 8 @ @ . . . . . . . . . . . . . 5 @ @ v . . . . w x @ @ @ y . . . . z @ @ @ . . . . A = @ @ . . . B C @ @ D . . . . . @ @ @ ", +" . . . . . . f E @ @ . . . . . , ' ' ' ' ' ' ' F @ @ G . . . . H @ @ @ . . . . . . . . . . . . . . . . q @ I 9 . . 9 J @ @ @ . . . . . @ @ @ ", +" . . . . . . . . e 8 @ . . . . . ^ @ @ @ @ @ @ @ @ @ @ K . . . . L @ @ @ . . . . . . . . . . . . . . . . M @ 2 . . . N @ @ @ . . . . . @ @ @ ", +" . . . . . . . . . . O @ @ . . . . . ^ @ @ . . . . . P @ @ . . . . . . . . . . . . . . . . ^ @ . . . . . . . . . . . . . . . . . . ", +" . . . . . . . . . . 4 Q @ . . . . . ^ @ @ . . . . . D @ @ . . . . . R ' ' ' ' ' ' ' ' ' ' n @ . . . . . . . . . . . . . . . . . . @ @ @ ", +" . . . . . c S . . . . . T @ @ . . . . . ^ @ @ . . . . . U @ @ . . . . . V @ @ @ @ @ @ @ @ @ @ @ @ . . . . . . . . . . . . . . . . . . @ @ @ ", +" . . . . . . > & % . . . . . W @ @ . . . . . ^ @ @ . . . . . X C @ @ . . . . . . h Y @ . . . . ' ' ' ' ' ' , . . . . . ' ' ' @ @ @ ", +" . . . . . Z @ @ ` . . . . . ...@ . . . . . ^ @ @ . . . . . +.@.@ . . . . . . . #.M @ . . . @ @ @ @ @ @ @ $.. . . . . @ @ @ @ @ @ ", +" . . . . . %.Q @ @ @ . . . . . . # @ @ . . . . . ^ @ @ . . . . . . . &.*.=.. . . . @ -.. . . . . . ;.>.,.. . . . . '.@ @ . . . . . @ @ @ ", +" . . . . . . ).@ @ @ . . . . . A q @ @ . . . . . ^ @ @ . . . . . . . . . . . . . @ @ !.. . . . . . . . . . . . . . ~.@ @ . . . . . @ @ @ ", +" . . . . . {.].@ @ . . . . . . g 8 @ . . . . . ^ @ @ . . . . . . . . . . . [ @ @ @ . . . . . . . . . . . . % ^.@ @ . . . . . @ @ @ ", +" . . . . . /.(.@ @ @ . . . . . . _.@ @ . . . . . ^ @ @ +.:.<.; <.[.}.|.1.@ @ @ 2.h 3.; ! h d 4.5.].@ @ @ . . . . . @ @ @ ", +" @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "};