diff --git a/veejay-1.0/veejay-client/share/gveejay.reloaded.glade b/veejay-1.0/veejay-client/share/gveejay.reloaded.glade
index 8f18ff08..0fb8f105 100644
--- a/veejay-1.0/veejay-client/share/gveejay.reloaded.glade
+++ b/veejay-1.0/veejay-client/share/gveejay.reloaded.glade
@@ -893,45 +893,6 @@
False
0
-
-
- True
- Enable/disable effectchain
- True
- GTK_RELIEF_HALF
- True
- True
- False
- True
-
-
-
-
- True
- Effect chain enabled
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
-
-
- 0
- False
- False
-
-
-
True
@@ -1485,6 +1446,45 @@
True
+
+
+
+ True
+ Enable/disable effectchain
+ True
+ GTK_RELIEF_HALF
+ True
+ True
+ False
+ True
+
+
+
+
+ True
+ Effect chain enabled
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+
+
+ 0
+ False
+ False
+
+
0
diff --git a/veejay-1.0/veejay-client/src/gveejay.c b/veejay-1.0/veejay-client/src/gveejay.c
index 6ac170fb..95e0b979 100644
--- a/veejay-1.0/veejay-client/src/gveejay.c
+++ b/veejay-1.0/veejay-client/src/gveejay.c
@@ -44,6 +44,7 @@ static int n_tracks = 3;
static int launcher = 0;
static int pw = 176;
static int ph = 144;
+static int preview = 0; // off
static struct
{
char *file;
@@ -56,12 +57,13 @@ static void usage(char *progname)
{
printf( "Usage: %s \n",progname);
printf( "where options are:\n");
- printf( "-h/--hostname\t\tVeejay host to connect to (defaults to localhost) \n");
- printf( "-p/--port\t\tVeejay port to connect to (defaults to 3490) \n");
- printf( "-n/--no-theme\t\tDont load gveejay's GTK theme\n");
- printf( "-v/--verbose\t\tBe extra verbose (usefull for debugging)\n");
- printf( "-s/--size\t\tSet bank resolution (row X columns)\n");
- printf( "-X/\t\tSet number of tracks\n");
+ printf( "-h\t\tVeejay host to connect to (defaults to localhost) \n");
+ printf( "-p\t\tVeejay port to connect to (defaults to 3490) \n");
+ printf( "-n\t\tDont load gveejay's GTK theme\n");
+ printf( "-v\t\tBe extra verbose (usefull for debugging)\n");
+ printf( "-s\t\tSet bank resolution (row X columns)\n");
+ printf( "-P\t\tStart with preview enabled (1=1/1,2=1/2,3=1/4,4=1/8)\n");
+ printf( "-X\t\tSet number of tracks\n");
printf( "\n\n");
exit(-1);
}
@@ -103,6 +105,15 @@ static int set_option( const char *name, char *value )
err++;
}
}
+ else if (strcmp(name, "P" ) == 0 || strcmp(name, "preview" ) == 0 )
+ {
+ preview = atoi(optarg);
+ if(preview <= 0 || preview > 4 )
+ {
+ fprintf(stderr, "--preview [0-4]\n");
+ err++;
+ }
+ }
else
err++;
return err;
@@ -119,7 +130,7 @@ int main(int argc, char *argv[]) {
// default host to connect to
sprintf(hostname, "127.0.0.1");
- while( ( n = getopt( argc, argv, "s:h:p:nvHf:X:")) != EOF )
+ while( ( n = getopt( argc, argv, "s:h:p:nvHf:X:P:")) != EOF )
{
sprintf(option, "%c", n );
err += set_option( option, optarg);
@@ -163,7 +174,11 @@ int main(int argc, char *argv[]) {
else
veejay_msg(VEEJAY_MSG_INFO, "GVeejayReloaded running with low priority");
-
+ if( preview )
+ {
+ veejay_msg(VEEJAY_MSG_INFO, "Starting with preview enabled");
+ gveejay_preview(preview);
+ }
while(gveejay_running())
{
diff --git a/veejay-1.0/veejay-client/src/vj-api.c b/veejay-1.0/veejay-client/src/vj-api.c
index ad2066d8..984b06d2 100644
--- a/veejay-1.0/veejay-client/src/vj-api.c
+++ b/veejay-1.0/veejay-client/src/vj-api.c
@@ -254,13 +254,7 @@ typedef struct
gint event_id;
} vims_keys_t;
-// Have room for only 2 * 120 samples
-//#define NUM_BANKS 20
-//#define NUM_PAGES 10
-//#define NUM_SAMPLES_PER_PAGE 12
-//#define NUM_SAMPLES_PER_COL 2
-//#define NUM_SAMPLES_PER_ROW 6
-
+static int user_preview = 0;
static int NUM_BANKS = 30;
static int NUM_PAGES = 16;
static int NUM_SAMPLES_PER_PAGE = 12;
@@ -6773,6 +6767,11 @@ void vj_gui_preview(void)
gtk_widget_set_size_request(info->quick_select, image_width, image_height );
}
+void gveejay_preview( int p )
+{
+ user_preview = p;
+}
+
int vj_gui_reconnect(char *hostname,char *group_name, int port_num)
{
if(!hostname && !group_name )
@@ -6951,6 +6950,11 @@ gboolean is_alive( void )
veejay_stop_connecting(gui);
multrack_audoadd( info->mt, remote, port );
info->watch.p_state = 0;
+ if( user_preview )
+ {
+ multitrack_set_quality( info->mt, user_preview );
+ set_toggle_button( "previewtoggle", 1 );
+ }
}
}
diff --git a/veejay-1.0/veejay-client/src/vj-api.h b/veejay-1.0/veejay-client/src/vj-api.h
index 8209f829..2112bf09 100644
--- a/veejay-1.0/veejay-client/src/vj-api.h
+++ b/veejay-1.0/veejay-client/src/vj-api.h
@@ -43,7 +43,7 @@ int vj_get_preview_box_w();
int vj_get_preview_box_h();
int _effect_get_minmax( int effect_id, int *min, int *max, int index );
void vj_gui_cb(int state, char *hostname, int port_num);
-
+void gveejay_preview(int p);
int is_button_toggled(const char *name);
GdkPixbuf *vj_gdk_pixbuf_scale_simple( const GdkPixbuf *src, int dw, int dh, GdkInterpType inter_type );
gchar *_utf8str( const char *c_str );