gtcd patch to work with gtk+ 1.1.5+



Hello, last weekend I managed to fix gtcd to work with gtk+ 1.1.5.  I
then emailed the auther with the patch to have him test it and get his
approval on it.  I have not heard a peep from him.  Therefore, I am
releasing the diff.. it's probably not THE best patch, so if anyone else
can do a better job, please do so.. but the code changes i made, based
on someone's (i forgot who..) post to this very mailing list, have been
good enough for me so far and I have had no problems for a week now.. as
always: DISCLAIMER: i am not responsible if this patch blows your
computer up or causes any other such harm.  If you do not use gtk+1.1.5,
then this patch is not for you.  apply to the tcd-2.2 source tree like
this:

cd tcd-2.2/
patch -p1 < ~/tcd-2.2_for_gtk-1.1.5.diff
./configure
make
make install

     /----------------------------------------------------------\
     | -Gnea          Email: gnea@garson.grantstomb.com         |
     |      Something Different Networks/Garson Productions     |
     |              -=http://garson.grantstomb.com=-            |
     | Enlightenment: http://www.servtech.com/~gnea/E/          |
     |   Linux rules your world.     FUNC-631 is your friend.   |
     |   Microsoft rules the mindless.                          |
     |   True users use true power.                             |
     |   True losers use mindless power.                        |
     | IRC: #Devil's_Rose - Undernet                            |
     |     #E - EFnet  #E - Valnet #Devil's_Geeks - DarkTombNet |
     \----------------------------------------------------------/
diff -u -r tcd-2.2/src/gtracked.c tcd-2.2-1.1.5/src/gtracked.c
--- tcd-2.2/src/gtracked.c	Thu Aug 13 07:55:02 1998
+++ tcd-2.2-1.1.5/src/gtracked.c	Fri Nov 27 19:28:25 1998
@@ -105,7 +105,8 @@
 	GtkWidget *track_list, *track_frame;
 	GtkWidget *track_vbox, *track_entry;
 	GtkWidget *track_ext, *entry_box;
-	
+	GtkWidget *scrolled_win, *clist;
+   
 	if( trwin )
 		return;
 
@@ -140,7 +141,8 @@
 	/* END Disc area */
 	
 	/* Track area */
-	track_vbox  = gtk_vbox_new(FALSE, 2);
+	scrolled_win = gtk_scrolled_window_new (NULL, NULL);
+        track_vbox  = gtk_vbox_new(FALSE, 2);
 	entry_box   = gtk_hbox_new(FALSE, 2);
 	track_entry = gtk_entry_new();
 	gtk_entry_set_text(GTK_ENTRY(track_entry), cd.trk[1].name);
@@ -150,7 +152,7 @@
 	gtk_clist_set_border(GTK_CLIST(track_list), GTK_SHADOW_NONE);
 	gtk_clist_set_column_width(GTK_CLIST(track_list), 0, 20);
 	gtk_clist_set_column_width(GTK_CLIST(track_list), 1, 36);
-	gtk_clist_set_policy(GTK_CLIST(track_list), GTK_POLICY_AUTOMATIC,
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(track_list), GTK_POLICY_AUTOMATIC,
 						    GTK_POLICY_AUTOMATIC);
 	gtk_clist_set_selection_mode(GTK_CLIST(track_list), 
 						    GTK_SELECTION_BROWSE);
@@ -200,7 +202,8 @@
 	gtk_signal_connect(GTK_OBJECT(track_entry), "changed",
 		GTK_SIGNAL_FUNC(activate_entry), track_list);
 	
-	gtk_container_add(GTK_CONTAINER(trwin), main_box);
-	gtk_widget_show_all(trwin);
+        gtk_container_add(GTK_CONTAINER(trwin), scrolled_win);
+        gtk_container_add(GTK_CONTAINER(scrolled_win), clist);
+        gtk_widget_show_all(trwin);
 	return;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]