Hi I've made a patch for jack-rack so it can be built with -DGSEAL in
the CFLAGS:

GSEAL explained here: http://live.gnome.org/GnomeGoals/UseGseal

i made the changes to a clone of the jack-rack git source.... which
fails to build....

ok, there's one area in main.c i had to cheat to get it to build, and
that's the gnome_program_init line, specifically the LIBGNOMEUI_MODULE
#define... Which is #defined in <libgnomeui/libgnomeui.h>.... Which
includes/uses deprecated GTK symbols, namely GtkCallbackMarshal, which
is due to the CFLAGS (GTK_DISABLE_DEPRECATED etc) used, is an unknown
type. I don't know how to fix that error as I don't know gnome. If you
look at the patch you'll notice I've removed the libgnomeui includes
from other c files as they weren't used.  The error here is in
libgnomeui using gtk deprecated types.

but --disable-gnome fixes that kind of problem (git).


if the list refuses the attachment:
http://jwm-art.net/code/jack-rack-gtk_deprecated_fix.patch


cheers,
james.
diff -ur jack-rack/src/control_callbacks.c jack-rack-myfix/src/control_callbacks.c
--- jack-rack/src/control_callbacks.c	2011-07-05 11:16:42.000000000 +0100
+++ jack-rack-myfix/src/control_callbacks.c	2011-07-05 11:03:37.000000000 +0100
@@ -261,10 +261,15 @@
   GtkAdjustment * adjustment;
   guint copy;
 
+  double lower, upper;
+
   port_controls = (port_controls_t *) user_data;
   copy = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT(entry), "jack-rack-plugin-copy"));
   adjustment = gtk_range_get_adjustment (GTK_RANGE (port_controls->controls[copy].control));
 
+  lower = gtk_adjustment_get_lower(adjustment);
+  upper = gtk_adjustment_get_upper(adjustment);
+
   str = gtk_entry_get_text (entry);
   value = strtof (str, &endptr);
   
@@ -272,8 +277,8 @@
   if (value == HUGE_VALF ||
       value == -HUGE_VALF ||
       endptr == str ||
-      value < (port_controls->logarithmic ? exp (adjustment->lower) : adjustment->lower) ||
-      value > (port_controls->logarithmic ? exp (adjustment->upper) : adjustment->upper))
+      value < (port_controls->logarithmic ? exp (lower) : lower) ||
+      value > (port_controls->logarithmic ? exp (upper) : upper))
     {
       /* set the entry's text colour */
       gtk_widget_set_text_colour (GTK_WIDGET(entry), "DarkRed");
diff -ur jack-rack/src/midi_control.c jack-rack-myfix/src/midi_control.c
--- jack-rack/src/midi_control.c	2011-07-05 11:16:42.000000000 +0100
+++ jack-rack-myfix/src/midi_control.c	2011-07-05 10:47:37.000000000 +0100
@@ -94,8 +94,8 @@
       else
         adjustment = gtk_range_get_adjustment (GTK_RANGE (port_controls->controls[copy].control));
       
-      midi_ctrl->min = adjustment->lower;
-      midi_ctrl->max = adjustment->upper;
+      midi_ctrl->min = gtk_adjustment_get_lower(adjustment);
+      midi_ctrl->max = gtk_adjustment_get_upper(adjustment);
       
       if (port_controls->type == JR_CTRL_FLOAT &&
           port_controls->logarithmic)
diff -ur jack-rack/src/plugin_slot_callbacks.c jack-rack-myfix/src/plugin_slot_callbacks.c
--- jack-rack/src/plugin_slot_callbacks.c	2011-07-05 11:16:42.000000000 +0100
+++ jack-rack-myfix/src/plugin_slot_callbacks.c	2011-07-05 11:01:26.000000000 +0100
@@ -30,9 +30,6 @@
 #include <gtk/gtk.h>
 #include <ladspa.h>
 
-#ifdef HAVE_GNOME
-#include <libgnomeui/libgnomeui.h>
-#endif
 
 #include "jack_rack.h"
 #include "lock_free_fifo.h"
diff -ur jack-rack/src/ui_callbacks.c jack-rack-myfix/src/ui_callbacks.c
--- jack-rack/src/ui_callbacks.c	2011-07-05 11:16:42.000000000 +0100
+++ jack-rack-myfix/src/ui_callbacks.c	2011-07-05 11:00:27.000000000 +0100
@@ -30,9 +30,6 @@
 #include <gtk/gtk.h>
 #include <ladspa.h>
 
-#ifdef HAVE_GNOME
-#include <libgnomeui/libgnomeui.h>
-#endif
 
 #include "jack_rack.h"
 #include "lock_free_fifo.h"
@@ -72,6 +69,7 @@
   GtkWidget * spin;
   GtkWidget * warning;
   gint response;
+  GtkWidget*  content_area; /* formerly: dialog->vbox */
   
   ui = (ui_t *) user_data;
   
@@ -86,11 +84,14 @@
   gtk_widget_show (spin);
   gtk_spin_button_set_digits (GTK_SPIN_BUTTON (spin), 0);
   gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), ui->jack_rack->channels);
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), spin);
+
+
+  content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
+  gtk_container_add (GTK_CONTAINER (content_area), spin);
 
   warning = gtk_label_new (_("Warning: changing the number of\nchannels will clear the current rack"));
   gtk_widget_show (warning);
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), warning);
+  gtk_container_add (GTK_CONTAINER (content_area), warning);
   
   
   response = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -483,6 +484,7 @@
 setup_reconnect ( gpointer data )
 {
         static GtkWidget* dialog = NULL;
+        static GtkWidget*  content_area; /* formerly: dialog->vbox */
         static int active = TRUE;
         static struct reconnect_data rcdata;
 	guint tid;
@@ -495,16 +497,20 @@
         rcdata.ui = ui;
         
         if ( dialog == NULL )
+        {
               dialog = gtk_dialog_new_with_buttons (
                                 _("Connecting to JACK..."),
                                 NULL, GTK_DIALOG_MODAL,
                                 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                                 NULL );
+              content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
+
+        }
         rcnotice = gtk_label_new (_("Connecting to JACK server..."));
-        gtk_container_add (GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), rcnotice);
-        gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), 50);
-        gtk_widget_set_size_request (GTK_DIALOG(dialog)->vbox, 250, 100); 
-        gtk_widget_show_all (GTK_DIALOG(dialog)->vbox);
+        gtk_container_add (GTK_CONTAINER(content_area), rcnotice);
+        gtk_container_set_border_width (GTK_CONTAINER(content_area), 50);
+        gtk_widget_set_size_request (content_area, 250, 100); 
+        gtk_widget_show_all (content_area);
         rcdata.dialog = dialog;
         
         tid = g_timeout_add (1000, &reconnect_cb, (gpointer)&rcdata);
_______________________________________________
Linux-audio-dev mailing list
[email protected]
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Reply via email to