gtk2 port of zinf

Robert Hart <[email protected]>
Newsgroups gmane.comp.audio.zinf.devel
Organization University of Nottingham
Message-ID <1059481763.956.17.camel@euclid>
Hi guys, 

It seems like things are beginning to pick up around here again. Maybe
the article on gnomedesktop.org sparked some interest.

Well after reading the comments, I was inspired to try "porting" zinf to
gtk-2. I figured it couldn't be *that* difficult.

Well, I have a patch (against recent CVS) that lets me build zinf with
gtk2 and it even runs. 

Here's a screenshot: http://www.nottingham.ac.uk/~enxrah/zinf-gtk2.png

The patch is pretty horrid (particularly what I did to configure.ac) and
there are some regressions, but I don't think it's *that* much worse
than zinf is normally. ;-)

Any interest? Should I make a CVS branch? Has this been tried before?

Rob

-- 
+-------------------------------------+
| "It's only a trap if you don't take |
| a ladder with you to get out of it" |
| 		-S Ring, Bath Uni     |
|                                     |
| [email protected]                   |
| http://www.nott.ac.uk/~enxrah       |
+-------------------------------------+
gtk.diff (text/x-patch, 19.1 KB)
Index: configure.ac
===================================================================
RCS file: /cvsroot/zinf/zinf/configure.ac,v
retrieving revision 1.17
diff -u -r1.17 configure.ac
--- configure.ac	23 Jul 2003 23:01:03 -0000	1.17
+++ configure.ac	29 Jul 2003 12:13:10 -0000
@@ -443,12 +443,26 @@
 
 
 dnl GTK UI
-PKG_CHECK_MODULES(GTK, gtk+ >= 1.2.5 gthread, have_gtk=true, have_gtk=false)
+dnl PKG_CHECK_MODULES(GTK, gtk+ >= 1.2.5 gthread, have_gtk=true, have_gtk=false)
+dnl AC_SUBST(GTK_CFLAGS)
+dnl AC_SUBST(GTK_LIBS)
+
+dnl if test "$have_gtk" = "true"; then
+dnl  AC_DEFINE(HAVE_GTK, 1, [Defined if GTK+ 1.2 is available])
+dnl  UI_PLUGINS="$UI_PLUGINS zinf musicbrowser download"
+dnl else
+dnl  AC_MSG_WARN([GTK+ was not found on this system.  This means you won't be
+dnl able to use any of the graphical user interfaces.  That's a bad thing,"
+dnl so go get the latest version of GTK+ from http://www.gtk.org])
+dnl fi
+
+dnl GTK-2.0 
+AM_PATH_GTK_2_0(2.0.0, have_gtk=true, have_gtk=false, gthread)
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
 
 if test "$have_gtk" = "true"; then
-  AC_DEFINE(HAVE_GTK, 1, [Defined if GTK+ 1.2 is available])
+  AC_DEFINE(HAVE_GTK, 1, [Defined if GTK+ 2 is available])
   UI_PLUGINS="$UI_PLUGINS zinf musicbrowser download"
 else
   AC_MSG_WARN([GTK+ was not found on this system.  This means you won't be
@@ -457,8 +471,8 @@
 fi
 
 dnl optional freetype support..
-have_freetype=true
-AC_CHECK_HEADERS(freetype.h, TTF_CFLAGS="", have_freetype=false)
+dnl have_freetype=true
+dnl AC_CHECK_HEADERS(freetype.h, TTF_CFLAGS="", have_freetype=false)
 if test "$have_freetype" = "false"; then
   AC_CHECK_HEADERS(freetype/freetype.h, 
 		   [TTF_CFLAGS="-Ifreetype"; have_freetype=true])
@@ -488,11 +502,11 @@
 AC_SUBST(TTF_CFLAGS)
 
 
-AM_PATH_GDK_PIXBUF(0.8.0, have_gdk_pixbuf=true, have_gdk_pixbuf=false)
+dnl AM_PATH_GDK_PIXBUF(0.8.0, have_gdk_pixbuf=true, have_gdk_pixbuf=false)
 
-if test "$have_gdk_pixbuf" = true; then
+dnl if test "$have_gdk_pixbuf" = true; then
    AC_DEFINE(USING_GDKPIXBUF, 1, [GDK Pixbuf support])
-fi
+dnl fi
 
 dnl corba UI
 AC_ARG_ENABLE(corba, AC_HELP_STRING([--enable-corba], 
Index: ui/musicbrowser/unix/src/browserlist.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/musicbrowser/unix/src/browserlist.cpp,v
retrieving revision 1.10
diff -u -r1.10 browserlist.cpp
--- ui/musicbrowser/unix/src/browserlist.cpp	27 May 2003 10:35:52 -0000	1.10
+++ ui/musicbrowser/unix/src/browserlist.cpp	29 Jul 2003 12:13:14 -0000
@@ -727,8 +727,8 @@
             ((int)list == GPOINTER_TO_INT(targets->data)) ||
             ((int)plain == GPOINTER_TO_INT(targets->data)) ||
             ((int)html == GPOINTER_TO_INT(targets->data))) {
-            gtk_drag_get_data(widget, context, GPOINTER_TO_INT(targets->data), 
-                              time);
+	  //            gtk_drag_get_data(widget, context, GPOINTER_TO_INT(targets->data), 
+          //                    time);
             return TRUE;
         }
         targets = targets->next;
@@ -746,7 +746,7 @@
                                     ((row) + 1) + (clist)->voffset)
 #define ROW_FROM_YPIXEL(clist, y)  (((y) - (clist)->voffset) / \
                                     ((clist)->row_height + 1))
-#define GTK_CLIST_CLASS_FW(_widget_) GTK_CLIST_CLASS (((GtkObject*) (_widget_))->klass)
+#define GTK_CLIST_CLASS_FW(_widget_) GTK_CLIST_CLASS (((GtkObject*) (_widget_)))
 
 
 static gint COLUMN_FROM_XPIXEL (GtkCList * clist, gint x)
@@ -775,7 +775,7 @@
     dest_info->insert_pos = GTK_CLIST_DRAG_NONE;
 
     y -= (GTK_CONTAINER (clist)->border_width +
-          widget->style->klass->ythickness + clist->column_title_area.height);
+          widget->style->ythickness + clist->column_title_area.height);
 
     dest_info->cell.row = ROW_FROM_YPIXEL (clist, y);
     if (dest_info->cell.row >= clist->rows) {
@@ -790,7 +790,7 @@
     }
 
     x -= GTK_CONTAINER (widget)->border_width +
-         widget->style->klass->xthickness;
+         widget->style->xthickness;
     dest_info->cell.column = COLUMN_FROM_XPIXEL (clist, x);
 
     if (dest_info->cell.row >= 0) {
Index: ui/musicbrowser/unix/src/browsermenu.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/musicbrowser/unix/src/browsermenu.cpp,v
retrieving revision 1.8
diff -u -r1.8 browsermenu.cpp
--- ui/musicbrowser/unix/src/browsermenu.cpp	13 Feb 2003 12:17:57 -0000	1.8
+++ ui/musicbrowser/unix/src/browsermenu.cpp	29 Jul 2003 12:13:18 -0000
@@ -606,7 +606,7 @@
     gtk_item_factory_create_items(menuFactory, nmenu_items, menu_items, 
                                   (void *)this);
 
-    gtk_accel_group_attach(accel_group, GTK_OBJECT(musicBrowser));
+    //gtk_accel_group_attach(accel_group, GTK_OBJECT(musicBrowser));
     gtk_box_pack_start(GTK_BOX(topbox), gtk_item_factory_get_widget(
                        menuFactory, "<blah>"), FALSE, TRUE, 0);
     gtk_widget_show(gtk_item_factory_get_widget(menuFactory, "<blah>"));
@@ -632,10 +632,11 @@
 
 void GTKMusicBrowser::CreateToolbar(GtkWidget *vbox)
 {
-    toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL,
-                                         GTK_TOOLBAR_BOTH);
-    gtk_toolbar_set_button_relief(GTK_TOOLBAR(toolbar), GTK_RELIEF_NONE);
-    gtk_toolbar_set_space_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_SPACE_LINE);
+//     toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL,
+//                                          GTK_TOOLBAR_BOTH);
+    toolbar=gtk_toolbar_new();
+    //    gtk_toolbar_set_button_relief(GTK_TOOLBAR(toolbar), GTK_RELIEF_NONE);
+    //    gtk_toolbar_set_space_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_SPACE_LINE);
 
     gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), _("New Playlist"),
                             _("Start Editing a new Playlist"),
Index: ui/musicbrowser/unix/src/fileselector.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/musicbrowser/unix/src/fileselector.cpp,v
retrieving revision 1.7
diff -u -r1.7 fileselector.cpp
--- ui/musicbrowser/unix/src/fileselector.cpp	19 Feb 2003 07:39:22 -0000	1.7
+++ ui/musicbrowser/unix/src/fileselector.cpp	29 Jul 2003 12:13:18 -0000
@@ -123,7 +123,7 @@
     gint sub_rnum = 0;
     char *temp, *path_temp;
 
-    char *rawtext = gtk_entry_get_text(GTK_ENTRY(gfile->selection_entry));
+    char *rawtext = (char*)gtk_entry_get_text(GTK_ENTRY(gfile->selection_entry));
     if (!strncasecmp("http://", rawtext, 7) ||
         !strncasecmp("rtp://", rawtext, 6)) {
         returnpath = strdup_new(rawtext);
@@ -135,7 +135,7 @@
 
     returnpath = gtk_file_selection_get_filename(gfile);
     path_temp = strdup(returnpath.c_str());
-    raw_path = 	gtk_entry_get_text(GTK_ENTRY(gfile->selection_entry));
+    raw_path = 	(char*)gtk_entry_get_text(GTK_ENTRY(gfile->selection_entry));
     if(path_temp[strlen(path_temp)-1]=='/')
 	row=NULL;
     char *tempdir = strrchr(path_temp, '/');
Index: ui/musicbrowser/unix/src/gtkmessagedialog.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/musicbrowser/unix/src/gtkmessagedialog.cpp,v
retrieving revision 1.5
diff -u -r1.5 gtkmessagedialog.cpp
--- ui/musicbrowser/unix/src/gtkmessagedialog.cpp	1 Feb 2003 05:08:01 -0000	1.5
+++ ui/musicbrowser/unix/src/gtkmessagedialog.cpp	29 Jul 2003 12:13:18 -0000
@@ -115,7 +115,7 @@
 
 static void entry_change(GtkWidget *w, GTKMessageDialog *p)
 {
-    p->SetText(gtk_entry_get_text(GTK_ENTRY(w)));
+    p->SetText((char*)gtk_entry_get_text(GTK_ENTRY(w)));
 }
 
 static void check_box_toggle(GtkWidget *w, GTKMessageDialog *p)
@@ -139,7 +139,7 @@
                                uline_label), GDK_MOD1_MASK, (GtkAccelFlags)0);
     if (useEscape)
         gtk_widget_add_accelerator(button, "clicked", accel_group, GDK_Escape,
-                                   0, (GtkAccelFlags)0);
+                                   (GdkModifierType)0, (GtkAccelFlags)0);
 
     gtk_widget_show(label);
     gtk_container_add(GTK_CONTAINER(button), label);
Index: ui/musicbrowser/unix/src/gtkmusicbrowser.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/musicbrowser/unix/src/gtkmusicbrowser.cpp,v
retrieving revision 1.19
diff -u -r1.19 gtkmusicbrowser.cpp
--- ui/musicbrowser/unix/src/gtkmusicbrowser.cpp	8 Jul 2003 23:45:02 -0000	1.19
+++ ui/musicbrowser/unix/src/gtkmusicbrowser.cpp	29 Jul 2003 12:13:18 -0000
@@ -426,7 +426,7 @@
         m_state = kStateExpanded;
         if (lastPanedPosition != -1) {
             gtk_paned_set_position(GTK_PANED(masterBox), lastPanedPosition);
-            gtk_paned_set_handle_size(GTK_PANED(masterBox), lastPanedHandle);
+	    //            gtk_paned_set_handle_size(GTK_PANED(masterBox), lastPanedHandle);
         }
         gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(musicBrowserWindow),
                                        GTK_POLICY_AUTOMATIC, 
@@ -440,9 +440,9 @@
     else {
         m_state = kStateCollapsed;
         lastPanedPosition = ((GtkPaned *)masterBox)->child1_size;
-        lastPanedHandle = ((GtkPaned *)masterBox)->handle_size;
+	//        lastPanedHandle = ((GtkPaned *)masterBox)->handle_size;
         gtk_paned_set_position(GTK_PANED(masterBox), 0);
-        gtk_paned_set_handle_size(GTK_PANED(masterBox), 0);
+	//        gtk_paned_set_handle_size(GTK_PANED(masterBox), 0);
         gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(musicBrowserWindow),
                                        GTK_POLICY_NEVER, GTK_POLICY_NEVER);
         title += string(" - Playlist Editor: ");
@@ -625,12 +625,7 @@
     normStyle = gtk_style_copy(gtk_widget_get_style(musicBrowser));
     boldStyle = gtk_style_copy(normStyle);
 
-    GdkFont *font =
-            gdk_font_load("-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*");     if (!font)
-        font = gdk_font_load("fixed");
-    gdk_font_unref(boldStyle->font);
-    boldStyle->font = font;
-    gdk_font_ref(boldStyle->font);
+    pango_font_description_set_weight(boldStyle->font_desc, PANGO_WEIGHT_BOLD);
 
     GdkColor red;
     GdkColor green;
Index: ui/musicbrowser/unix/src/infoeditor.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/musicbrowser/unix/src/infoeditor.cpp,v
retrieving revision 1.5
diff -u -r1.5 infoeditor.cpp
--- ui/musicbrowser/unix/src/infoeditor.cpp	1 Feb 2003 05:08:01 -0000	1.5
+++ ui/musicbrowser/unix/src/infoeditor.cpp	29 Jul 2003 12:13:25 -0000
@@ -78,7 +78,7 @@
     vector<PlaylistItem *>::iterator i = m_itemlist->begin();
     for (; i != m_itemlist->end(); i++) {
         MetaData oldmeta, newmeta;
-        gchar *text;
+        const gchar *text;
 
         oldmeta = newmeta = (*i)->GetMetaData();
 
Index: ui/musicbrowser/unix/src/introwizard.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/musicbrowser/unix/src/introwizard.cpp,v
retrieving revision 1.6
diff -u -r1.6 introwizard.cpp
--- ui/musicbrowser/unix/src/introwizard.cpp	19 Feb 2003 07:39:22 -0000	1.6
+++ ui/musicbrowser/unix/src/introwizard.cpp	29 Jul 2003 12:13:25 -0000
@@ -142,7 +142,7 @@
 
 static void search_entry_change(GtkWidget *w, IntroWizardUI *p)
 {
-    char *text = gtk_entry_get_text(GTK_ENTRY(w));
+    char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
     p->SetSearchPath(text);
 }
 
Index: ui/musicbrowser/unix/src/missingfileui.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/musicbrowser/unix/src/missingfileui.cpp,v
retrieving revision 1.6
diff -u -r1.6 missingfileui.cpp
--- ui/musicbrowser/unix/src/missingfileui.cpp	9 Feb 2003 07:43:34 -0000	1.6
+++ ui/musicbrowser/unix/src/missingfileui.cpp	29 Jul 2003 12:13:25 -0000
@@ -81,7 +81,7 @@
 
 static void entry_change(GtkWidget *w, MissingFileUI *p)
 {
-    char *text = gtk_entry_get_text(GTK_ENTRY(w));
+    char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
     p->ChangeTextEntry(text);
 }
 
Index: ui/musicbrowser/unix/src/musicsearch.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/musicbrowser/unix/src/musicsearch.cpp,v
retrieving revision 1.5
diff -u -r1.5 musicsearch.cpp
--- ui/musicbrowser/unix/src/musicsearch.cpp	1 Feb 2003 05:08:01 -0000	1.5
+++ ui/musicbrowser/unix/src/musicsearch.cpp	29 Jul 2003 12:13:25 -0000
@@ -110,7 +110,7 @@
 
 static void search_entry_change(GtkWidget *w, musicsearchUI *p)
 {
-    char *text = gtk_entry_get_text(GTK_ENTRY(w));
+    char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
     p->SetSearchPath(text);
 }
 
Index: ui/zinf/unix/src/GTKBitmap.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/zinf/unix/src/GTKBitmap.cpp,v
retrieving revision 1.5
diff -u -r1.5 GTKBitmap.cpp
--- ui/zinf/unix/src/GTKBitmap.cpp	23 Jul 2003 23:01:04 -0000	1.5
+++ ui/zinf/unix/src/GTKBitmap.cpp	29 Jul 2003 12:13:25 -0000
@@ -142,9 +142,9 @@
 
 #ifdef USING_GDKPIXBUF
     GdkPixbuf *pixbuf;
-
+    GError **error;
     gdk_threads_enter();
-    pixbuf = gdk_pixbuf_new_from_file(filename.c_str());
+    pixbuf = gdk_pixbuf_new_from_file(filename.c_str(), error);
     if (pixbuf) {
         GdkPixbuf *newbuf;
         newbuf = gdk_pixbuf_add_alpha(pixbuf, m_bHasTransColor, 
Index: ui/zinf/unix/src/GTKFileSelector.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/zinf/unix/src/GTKFileSelector.cpp,v
retrieving revision 1.7
diff -u -r1.7 GTKFileSelector.cpp
--- ui/zinf/unix/src/GTKFileSelector.cpp	19 Feb 2003 07:39:23 -0000	1.7
+++ ui/zinf/unix/src/GTKFileSelector.cpp	29 Jul 2003 12:13:25 -0000
@@ -128,7 +128,7 @@
     else
         tempdir[0] = '\0';
 
-    raw_path = gtk_entry_get_text(GTK_ENTRY(gfile->selection_entry));
+    raw_path = (char*)gtk_entry_get_text(GTK_ENTRY(gfile->selection_entry));
     strncpy(old_path,path_temp,PATH_MAX);
     if(row){
 	while (row) {
Index: ui/zinf/unix/src/GTKPreferenceWindow.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/zinf/unix/src/GTKPreferenceWindow.cpp,v
retrieving revision 1.20
diff -u -r1.20 GTKPreferenceWindow.cpp
--- ui/zinf/unix/src/GTKPreferenceWindow.cpp	27 May 2003 10:35:53 -0000	1.20
+++ ui/zinf/unix/src/GTKPreferenceWindow.cpp	29 Jul 2003 12:13:26 -0000
@@ -247,12 +247,12 @@
     GdkColor temp = paneStyle->bg[GTK_STATE_NORMAL];
     paneStyle->bg[GTK_STATE_NORMAL] = paneStyle->fg[GTK_STATE_NORMAL];
     paneStyle->fg[GTK_STATE_NORMAL] = temp;
-    GdkFont *font = 
-            gdk_font_load("-adobe-helvetica-bold-r-normal--*-180-*-*-*-*-*-*");
-    if (font) {
-        gdk_font_unref(paneStyle->font);
-        paneStyle->font = font;
-    }
+//     GdkFont *font = 
+//             gdk_font_load("-adobe-helvetica-bold-r-normal--*-180-*-*-*-*-*-*");
+//     if (font) {
+//         gdk_font_unref(paneStyle->font);
+//         paneStyle->font = font;
+//     }
 
     GtkWidget *stupid_gtk = gtk_event_box_new();
     gtk_container_set_border_width(GTK_CONTAINER(stupid_gtk), 0);
@@ -879,7 +879,7 @@
 
 static void save_stream_change(GtkWidget *w, GTKPreferenceWindow *p)
 {
-    char *text = gtk_entry_get_text(GTK_ENTRY(w));
+    char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
     p->SaveLocalSet(text, false);
 }
 
@@ -906,8 +906,8 @@
 
 void GTKPreferenceWindow::ProxyAddySet()
 {
-    char *name = gtk_entry_get_text(GTK_ENTRY(proxyAddyBox));
-    char *port = gtk_entry_get_text(GTK_ENTRY(proxyPortBox));
+    char *name = (char*)gtk_entry_get_text(GTK_ENTRY(proxyAddyBox));
+    char *port = (char*)gtk_entry_get_text(GTK_ENTRY(proxyPortBox));
 
     proposedValues.proxyServer = name;
     if (*port) {
@@ -923,10 +923,10 @@
 
 void GTKPreferenceWindow::AltIPSet()
 {
-    char *one = gtk_entry_get_text(GTK_ENTRY(ipOneBox));
-    char *two = gtk_entry_get_text(GTK_ENTRY(ipTwoBox));
-    char *three = gtk_entry_get_text(GTK_ENTRY(ipThreeBox));
-    char *four = gtk_entry_get_text(GTK_ENTRY(ipFourBox));
+    char *one = (char*)gtk_entry_get_text(GTK_ENTRY(ipOneBox));
+    char *two = (char*)gtk_entry_get_text(GTK_ENTRY(ipTwoBox));
+    char *three = (char*)gtk_entry_get_text(GTK_ENTRY(ipThreeBox));
+    char *four = (char*)gtk_entry_get_text(GTK_ENTRY(ipFourBox));
     if (*one)
         proposedValues.alternateIP = one;
     else
@@ -1223,8 +1223,8 @@
 
 void GTKPreferenceWindow::AlsaSet(void)
 {
-    char *one = gtk_entry_get_text(GTK_ENTRY(alsaOneBox));
-    char *two = gtk_entry_get_text(GTK_ENTRY(alsaTwoBox));
+    char *one = (char*)gtk_entry_get_text(GTK_ENTRY(alsaOneBox));
+    char *two = (char*)gtk_entry_get_text(GTK_ENTRY(alsaTwoBox));
 
     proposedValues.alsaOutput = string(one) + string(":") + string(two);
     gtk_widget_set_sensitive(applyButton, TRUE);
@@ -1452,7 +1452,7 @@
 
 static void input_buffer_change(GtkWidget *w, GTKPreferenceWindow *p)
 {
-    char *text = gtk_entry_get_text(GTK_ENTRY(w));
+    char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
     int newdata = atoi(text);
     int last = p->SetInputBufferSize(newdata);
     if (last > 0)
@@ -1472,7 +1472,7 @@
 
 static void output_buffer_change(GtkWidget *w, GTKPreferenceWindow *p)
 {
-    char *text = gtk_entry_get_text(GTK_ENTRY(w));
+    char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
     int newdata = atoi(text);
     p->SetOutputBufferSize(newdata);
 }
@@ -1485,7 +1485,7 @@
 
 static void prestream_buffer_change(GtkWidget *w, GTKPreferenceWindow *p)
 {
-    char *text = gtk_entry_get_text(GTK_ENTRY(w));
+    char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
     int newdata = atoi(text);
     p->SetPreBufferLength(newdata);
 }
@@ -1899,7 +1899,7 @@
 
 static void save_music_change(GtkWidget *w, GTKPreferenceWindow *p)
 {
-    char *text = gtk_entry_get_text(GTK_ENTRY(w));
+    char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
     p->SaveMusicSet(text, false);
 }
 
@@ -1932,7 +1932,7 @@
 
 static void browser_change(GtkWidget *w, GTKPreferenceWindow *p)
 {
-  const char *text = gtk_entry_get_text(GTK_ENTRY(w));
+  const char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
   p->SetBrowser(text);
 }
 
@@ -1949,7 +1949,7 @@
 
 static void watch_dir_change(GtkWidget *w, GTKPreferenceWindow *p)
 {
-    char *text = gtk_entry_get_text(GTK_ENTRY(w));
+    char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
     p->WatchDirSet(text, false);
 }
 
@@ -2187,7 +2187,7 @@
 
 static void cd_path_change(GtkWidget *w, GTKPreferenceWindow *p)
 {
-    char *text = gtk_entry_get_text(GTK_ENTRY(w));
+    char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
     p->CDPathSet(text, false);
 }
 
@@ -2201,7 +2201,7 @@
 
 static void mb_server_change(GtkWidget *w, GTKPreferenceWindow *p)
 {
-    char *text = gtk_entry_get_text(GTK_ENTRY(w));
+    char *text = (char*)gtk_entry_get_text(GTK_ENTRY(w));
     p->MBServerSet(text, false);
 }
 
Index: ui/zinf/unix/src/GTKUtility.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/zinf/unix/src/GTKUtility.cpp,v
retrieving revision 1.6
diff -u -r1.6 GTKUtility.cpp
--- ui/zinf/unix/src/GTKUtility.cpp	13 Feb 2003 12:21:37 -0000	1.6
+++ ui/zinf/unix/src/GTKUtility.cpp	29 Jul 2003 12:13:26 -0000
@@ -176,6 +176,7 @@
     if (!context->gtkInitialized) {
         context->gtkInitialized = true;
 	g_thread_init(NULL);
+	gdk_threads_init();
         gtk_set_locale();
 	gtk_init(NULL, NULL);
 	gdk_rgb_init();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.