Fixes and support for 2.4 File Chooser - Alex
authorterminatorX <>
Tue, 23 Mar 2004 21:34:53 +0000 (21:34 +0000)
committerterminatorX <>
Tue, 23 Mar 2004 21:34:53 +0000 (21:34 +0000)
ChangeLog
configure.in
src/tX_extdial.cc
src/tX_global.c
src/tX_ladspa.cc
src/tX_mastergui.cc
src/tX_vttgui.cc
src/tX_vttgui.h
src/tX_widget.c

index b4b742007aedbabe87874b4a26756c3136ff4595..53ffdcc2ae9ca7ec166046c393534304ea07147b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -34,6 +34,10 @@ changed.
 - I've drawn some new icons with the wonderful inkscape. They're now being 
   built into terminatorX as gdk-pixbuf c-source code, so they actually do alpha
   blending.
+- Wrote support for gtk+'s new FileChooser widget - will be enabled 
+  automatically when configure finds a gtk+ >= 2.4.0
+- Fixed the buffer overflows detected by c0wboy <c0wboy@tiscali.it> in his 
+  outsiders-terminatorX-001.txt advisory. 
 - merged parts of a patch from Adam King <aking@lgh.com.au>
   - Simple min/maximization for the control panels
   - Bugfix for sequencer menu crash
index 726774cdbf3037a92f0246f8f83f0979e5cda2ca..03b6da601f48f6bfcc0de58b5e255b3381fb47b0 100644 (file)
@@ -122,6 +122,10 @@ AM_PATH_GTK_2_0(, [
   gtk2="yes"
   GTK2_VERSION="`$PKG_CONFIG --modversion gtk+-2.0`"], [ gtk2="yes" ]) 
   OPTION_GTK_VERSION="Version 2 - ($GTK2_VERSION)"
+  vers=`echo $GTK2_VERSION | awk 'BEGIN {FS=".";} { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
+  if test "$vers" -ge 2004000; then
+     AC_DEFINE_UNQUOTED([USE_FILECHOOSER], 1, [Use the new FileChooser.])
+  fi
 
 if test "$gtk2" = "no"; then
        AC_MSG_ERROR([** couldn't find gtk+ > Version 2. Please upgrade (http://www.gtk.org). **])
index aa29c6ac74a07777376735050c8b3737ce2059d8..7cd3f5e14b346410115c7072fc8c42675de480c8 100644 (file)
@@ -57,7 +57,7 @@ tX_extdial :: tX_extdial(const char *l, GtkAdjustment *a, tX_seqpar * sp, bool t
        ignore_adj=0;
        
        eventbox=gtk_event_box_new();           
-       mainbox=gtk_vbox_new(FALSE, text_below ? 5 : 0);
+       mainbox=gtk_vbox_new(FALSE,  text_below ? 5 : 0);
        gtk_container_add(GTK_CONTAINER(eventbox), mainbox);
        
        subbox=gtk_hbox_new(TRUE, 0);
index 489ad6ef7a6a9c52b80ebc43e91709d619d3197d..18280324ea7c6607bf78b16fbb8a7f7bd7172816 100644 (file)
@@ -50,14 +50,14 @@ extern void tX_midiin_store_connections(FILE *rc, char *indent);
 extern void tX_midiin_restore_connections(xmlNodePtr node);
 #endif
 
-void get_rc_name(char *buffer)
+void get_rc_name(char *buffer, int length)
 {
-       strcpy(buffer,"");
+       strncpy(buffer,"", length);
        if (globals.alternate_rc) {
-               strcpy(buffer, globals.alternate_rc);
+               strncpy(buffer, globals.alternate_rc, length);
        } else {
                if (getenv("HOME")) {
-                       strcpy(buffer, getenv("HOME"));
+                       strncpy(buffer, getenv("HOME"), length-16);
                        if (buffer[strlen(buffer)-1]!='/')
                        strcat(buffer, "/");
                }
@@ -168,7 +168,7 @@ int load_globals_xml() {
        double dvalue;
        char tmp_xml_buffer[4096];
        
-       get_rc_name(rc_name);
+       get_rc_name(rc_name, sizeof(rc_name));
        
        doc = xmlParseFile(rc_name);
        
@@ -292,7 +292,7 @@ void store_globals() {
        char tmp_xml_buffer[4096];
        _store_compress_xml=0;
        
-       get_rc_name(rc_name);
+       get_rc_name(rc_name, sizeof(rc_name));
 
        rc=fopen(rc_name, "w");
        
index 1db0655f0fde55ff8e743f6ccbf0b090963467aa..f5a21a15eb4042f7ecede0e878ef73aba8ca35b8 100644 (file)
@@ -48,7 +48,7 @@ void LADSPA_Plugin :: init ()
                tX_warning("LADSPA_PATH not set. Trying /usr/lib/ladspa:/usr/local/lib/ladspa");
                strcpy(ladspa_path, "/usr/lib/ladspa:/usr/local/lib/ladspa");
        }
-       else strcpy(ladspa_path, ladspa_path_ptr);
+       else strncpy(ladspa_path, ladspa_path_ptr, sizeof(ladspa_path));
        
        /* Scanning every dir in path */
        start = ladspa_path;
index db4aa01476c39372daa142a2e7c0847c358d0db0..9516c9c1d289e560adbf78501f2b7ce830157d87 100644 (file)
@@ -110,10 +110,13 @@ extern void add_vtt(GtkWidget *ctrl, GtkWidget *audio, char *fn);
 extern void destroy_gui(vtt_class *vtt);
 extern void gui_show_frame(vtt_class *vtt, int show);
 
+#ifndef USE_FILECHOOSER
 GdkWindow *save_dialog_win=NULL;
 GdkWindow *load_dialog_win=NULL;
+
 GtkWidget *save_dialog=NULL;
 GtkWidget *load_dialog=NULL;
+#endif
 
 GdkWindow *rec_dialog_win=NULL;
 GtkWidget *rec_dialog=NULL;
@@ -284,7 +287,7 @@ GtkSignalFunc new_tables() {
 }
 
 /* Loading saved setups */
-
+#ifndef USE_FILECHOOSER
 GtkSignalFunc cancel_load_tables(GtkWidget *wid)
 {
        gtk_widget_destroy(load_dialog);
@@ -292,10 +295,10 @@ GtkSignalFunc cancel_load_tables(GtkWidget *wid)
        load_dialog_win=NULL;
        return(0);
 }
+#endif
 
 void load_tt_part(char * buffer)
 {
-       char idbuff[256];
        char wbuf[PATH_MAX];
        xmlDocPtr doc;
 #ifdef ENABLE_TX_LEGACY
@@ -303,7 +306,7 @@ void load_tt_part(char * buffer)
 #endif 
        turn_audio_off();
        
-       strcpy(globals.tables_filename, buffer);
+       strncpy(globals.tables_filename, buffer, sizeof(globals.tables_filename));
        
        doc = xmlParseFile(buffer);
        if (doc) {
@@ -316,6 +319,8 @@ void load_tt_part(char * buffer)
                in=fopen(buffer, "r");  
        
                if (in) {
+                       char idbuff[256];
+                       
                        fread(idbuff, strlen(TX_SET_ID_10), 1, in);
                        if (strncmp(idbuff, TX_SET_ID_10, strlen(TX_SET_ID_10))==0) {
                                if (vtt_class::load_all_10(in, buffer)) tx_note("Error while reading set.", true);
@@ -334,20 +339,18 @@ void load_tt_part(char * buffer)
                        }
                        fclose(in);     
                } else {
-                       strcpy(idbuff, "Failed to access file: \"");    // I'm stealing the unrelated string for a temp :)
-                       strcat(idbuff, globals.tables_filename);
-                       strcat(idbuff, "\"");
-                       tx_note(idbuff, true);
+                       char message[PATH_MAX+256];
+                       sprintf(message, "Failed to acesss file: \"%s\"", globals.tables_filename);
+                       tx_note(message, true);
                        
                        return;
                }
        }
 #else
        else {
-               strcpy(idbuff, "Failed to access file: \"");    // I'm stealing the unrelated sting for a temp :)
-               strcat(idbuff, globals.tables_filename);
-               strcat(idbuff, "\"");
-               tx_note(idbuff, true);
+               char message[PATH_MAX+256];
+               sprintf(message, "Failed to acesss file: \"%s\"", globals.tables_filename);
+               tx_note(message, true);
                
                return;
        }
@@ -368,6 +371,7 @@ void load_tt_part(char * buffer)
        gtk_window_set_title(GTK_WINDOW(main_window), wbuf);            
 }
 
+#ifndef USE_FILECHOOSER
 void do_load_tables(GtkWidget *wid)
 {
        char buffer[PATH_MAX];
@@ -383,14 +387,47 @@ void do_load_tables(GtkWidget *wid)
        load_tt_part(buffer);
        tX_cursor::reset_cursor();
 }
+#endif
 
 GtkSignalFunc load_tables()
 {
+#ifdef USE_FILECHOOSER 
+       GtkWidget * dialog = gtk_file_chooser_dialog_new ("Open Set File",
+               GTK_WINDOW(main_window), GTK_FILE_CHOOSER_ACTION_OPEN,
+               GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,  
+           GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
+                                     
+
+       GtkFileFilter *filter=gtk_file_filter_new();
+       gtk_file_filter_add_pattern (filter, "*.tX");
+       gtk_file_filter_add_pattern (filter, "*.tx");
+       gtk_file_filter_set_name(filter, "terminatorX Set Files");
+       gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); 
+
+       filter=gtk_file_filter_new();
+       gtk_file_filter_add_pattern (filter, "*");
+       gtk_file_filter_set_name(filter, "All Files");
+       gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); 
+       
+       if (strlen(globals.tables_filename)) {
+               gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), globals.tables_filename);
+       }       
+       
+       if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
+       char * filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+               gtk_widget_hide(dialog);
+               tX_cursor::set_cursor(tX_cursor::WAIT_CURSOR);
+               load_tt_part(filename);
+               tX_cursor::reset_cursor();              
+       }       
+       
+       gtk_widget_destroy(dialog);
+#else
        if (load_dialog_win) {
                gdk_window_raise(load_dialog_win);
                return 0;
        }
-       
+
        load_dialog=gtk_file_selection_new("Load Set"); 
        
        gtk_file_selection_show_fileop_buttons(GTK_FILE_SELECTION(load_dialog));
@@ -408,9 +445,13 @@ GtkSignalFunc load_tables()
        g_signal_connect (G_OBJECT(GTK_FILE_SELECTION(load_dialog)->cancel_button), "clicked", G_CALLBACK (cancel_load_tables), NULL);  
        g_signal_connect (G_OBJECT(load_dialog), "delete-event", G_CALLBACK(cancel_load_tables), NULL); 
        
+#endif
+
        return NULL;
 }
 
+
+
 GtkSignalFunc drop_set(GtkWidget *widget, GdkDragContext *context,
                gint x, gint y, GtkSelectionData *selection_data,
                guint info, guint time, vtt_class *vtt)
@@ -435,6 +476,7 @@ GtkSignalFunc drop_set(GtkWidget *widget, GdkDragContext *context,
 
 /* save tables */
 
+#ifndef USE_FILECHOOSER
 GtkSignalFunc cancel_save_tables(GtkWidget *wid)
 {
        gtk_widget_destroy(save_dialog);
@@ -443,13 +485,8 @@ GtkSignalFunc cancel_save_tables(GtkWidget *wid)
        return(0);
 }
 
-gboolean do_save_tables(GtkWidget *wid)
-{
-       FILE *out;
-       gzFile zout;
+gboolean do_save_from_selection(GtkWidget *wid) {
        char buffer[PATH_MAX];
-       char wbuf[PATH_MAX];
-       char *ext;
        
        if (wid) {
                strcpy(buffer, gtk_file_selection_get_filename(GTK_FILE_SELECTION(save_dialog)));
@@ -458,13 +495,25 @@ gboolean do_save_tables(GtkWidget *wid)
                        tx_note("Invalid filename for set file.", true);                        
                        return FALSE;
                }
-               strcpy(globals.tables_filename, buffer);
                gtk_widget_destroy(save_dialog);
                save_dialog=NULL;
                save_dialog_win=NULL;
        } else {
                strcpy(buffer, tx_mg_current_setname);
-       }
+       }       
+       
+       do_save_tables(buffer);
+       
+       return TRUE;
+}
+#endif
+
+void do_save_tables(char *buffer)
+{
+       FILE *out;
+       gzFile zout;
+       char wbuf[PATH_MAX];
+       char *ext;
        
        ext=strrchr(buffer, '.');
        
@@ -476,6 +525,7 @@ gboolean do_save_tables(GtkWidget *wid)
 
        tx_mg_have_setname=true;
        strcpy(tx_mg_current_setname, buffer);
+       strcpy(globals.tables_filename, buffer);
        
        if (globals.compress_set_files) {
                _store_compress_xml=1;
@@ -496,12 +546,30 @@ gboolean do_save_tables(GtkWidget *wid)
        } else {
                tx_note("Failed to open file for write access.", true);
        }
-       
-       return FALSE;
 }
 
 GtkSignalFunc save_tables_as()
 {
+#ifdef USE_FILECHOOSER
+       GtkWidget * dialog = gtk_file_chooser_dialog_new ("Save Set",
+               GTK_WINDOW(main_window), GTK_FILE_CHOOSER_ACTION_SAVE, 
+               GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, 
+               GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,NULL);
+       
+       if (tx_mg_have_setname) {
+               gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER (dialog), tx_mg_current_setname);
+       }
+                                     
+       if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
+       char buffer[PATH_MAX];
+               char *filename=gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+               strcpy(buffer, filename);
+               g_free(filename);
+               do_save_tables(buffer);
+       }       
+       
+       gtk_widget_destroy(dialog);     
+#else
        if (save_dialog_win) {
                gtk_widget_destroy(save_dialog);
                save_dialog=NULL;
@@ -518,10 +586,10 @@ GtkSignalFunc save_tables_as()
        
        save_dialog_win=save_dialog->window;
        
-       g_signal_connect (G_OBJECT(GTK_FILE_SELECTION(save_dialog)->ok_button), "clicked", G_CALLBACK(do_save_tables), NULL);
+       g_signal_connect (G_OBJECT(GTK_FILE_SELECTION(save_dialog)->ok_button), "clicked", G_CALLBACK(do_save_from_selection), NULL);
        g_signal_connect (G_OBJECT(GTK_FILE_SELECTION(save_dialog)->cancel_button), "clicked", G_CALLBACK (cancel_save_tables), NULL);  
        g_signal_connect (G_OBJECT(save_dialog), "delete-event", G_CALLBACK(cancel_save_tables), NULL); 
-
+#endif
        return NULL;
 }
 
@@ -530,7 +598,7 @@ GtkSignalFunc save_tables()
        if (!tx_mg_have_setname) {
                save_tables_as();
        } else {
-               do_save_tables(NULL);
+               do_save_tables(tx_mg_current_setname);
        }
        
        return NULL;
@@ -1384,7 +1452,7 @@ void create_mastergui(int x, int y)
        pitch_adj=dumadj;
        connect_adj(dumadj, master_pitch_changed, NULL);
        
-       tX_extdial *pdial=new tX_extdial("Pitch", pitch_adj, &sp_master_pitch);
+       tX_extdial *pdial=new tX_extdial("Pitch", pitch_adj, &sp_master_pitch, true);
        gtk_box_pack_start(GTK_BOX(right_hbox), pdial->get_widget(), WID_FIX);
        gui_set_tooltip(pdial->get_entry(), "Use this dial to adjust the master pitch (affecting *all* turntables).");
        
@@ -1393,7 +1461,7 @@ void create_mastergui(int x, int y)
        gtk_widget_show(dummy);
        
        /* Volume */
-       master_vol_box=gtk_hbox_new(FALSE, 2);
+       master_vol_box=gtk_hbox_new(FALSE, 5);
        gtk_box_pack_start(GTK_BOX(right_hbox), master_vol_box, WID_DYN);
        gtk_widget_show(master_vol_box);        
        
@@ -1503,10 +1571,9 @@ void tx_note(const char *message, bool isError, GtkWindow *window)
        
        if (!window) window==GTK_WINDOW(main_window);
        
-       strcat(buffer, message);
        GtkWidget *dialog=gtk_message_dialog_new(window,
                GTK_DIALOG_DESTROY_WITH_PARENT,
-               isError ? GTK_MESSAGE_ERROR : GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, message);
+               isError ? GTK_MESSAGE_ERROR : GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, "%s", message);
        gtk_dialog_run(GTK_DIALOG(dialog));
        gtk_widget_destroy(dialog);     
 }
@@ -1518,7 +1585,7 @@ void tx_l_note(const char *message)
        strcat(buffer, message);
        
        GtkWidget *dialog=gtk_message_dialog_new(GTK_WINDOW(main_window),
-               GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, message);
+               GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, "%s", message);
        gtk_dialog_run(GTK_DIALOG(dialog));
        gtk_widget_destroy(dialog);     
 }
index f07b6c1514dc6aebb2b2f353cf3e86a92c317502..335115f3cc0fb26c4d1dd3b3dace0e3a1ba595f9 100644 (file)
@@ -59,6 +59,7 @@
 
 #include "tX_flash.h"
 #include <stdio.h>
+#include <ctype.h>
 
 #define WID_DYN TRUE, TRUE, 0
 #define WID_FIX FALSE, FALSE, 0
@@ -108,6 +109,21 @@ void pitch_changed(GtkWidget *wid, vtt_class *vtt)
        vtt->sp_pitch.receive_gui_value(GTK_ADJUSTMENT(wid)->value);
 }
 
+#ifdef USE_FILECHOOSER
+GtkSignalFunc chooser_prelis(GtkWidget *w)
+{
+       GtkFileChooser *fc=GTK_FILE_CHOOSER(gtk_widget_get_toplevel(w));
+       char *filename=gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(fc));
+       
+       if (filename) {
+               prelis_start(filename);
+               g_free(filename);
+       } else {
+               prelis_stop();
+       }
+       return NULL;
+}
+#else
 GtkSignalFunc trigger_prelis(GtkWidget *w)
 {
        GtkFileSelection *fs;
@@ -115,7 +131,7 @@ GtkSignalFunc trigger_prelis(GtkWidget *w)
        fs=GTK_FILE_SELECTION(gtk_widget_get_toplevel(w));
        
        prelis_start((char *) gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)));
-       return(0);
+       return NULL;
 }
 
 void cancel_load_file(GtkWidget *wid, vtt_class *vtt)
@@ -130,6 +146,7 @@ int quit_load_file(GtkWidget *wid, vtt_class *vtt)
 {
        return 1;
 }
+#endif
 
 char global_filename_buffer[PATH_MAX];
 
@@ -208,6 +225,7 @@ void load_part(char *newfile, vtt_class *vtt)
        }       
 }
 
+#ifndef USE_FILECHOOSER
 void do_load_file(GtkWidget *wid, vtt_class *vtt)
 {
        char newfile[PATH_MAX];
@@ -216,17 +234,14 @@ void do_load_file(GtkWidget *wid, vtt_class *vtt)
 
        strcpy(newfile, gtk_file_selection_get_filename(GTK_FILE_SELECTION(vtt->gui.fs)));
        gtk_widget_destroy(GTK_WIDGET(vtt->gui.fs));
+       vtt->gui.file_dialog=NULL;
        
        tX_cursor::set_cursor(tX_cursor::WAIT_CURSOR);
-       
        load_part(newfile, vtt);
-       
        strcpy(globals.current_path, newfile);
-
-       vtt->gui.file_dialog=NULL;
-       
        tX_cursor::reset_cursor();
 }
+#endif
 
 void drop_file(GtkWidget *widget, GdkDragContext *context,
                gint x, gint y, GtkSelectionData *selection_data,
@@ -259,9 +274,56 @@ void drop_file(GtkWidget *widget, GdkDragContext *context,
        if (host) g_free(host);
 }
 
-
 GtkSignalFunc load_file(GtkWidget *wid, vtt_class *vtt)
 {      
+#ifdef USE_FILECHOOSER
+       char *extensions[]={ "mp3", "wav", "ogg", "iff", "aiff", "voc", "au", NULL };
+       
+       GtkWidget * dialog = gtk_file_chooser_dialog_new ("Open Set File",
+               GTK_WINDOW(main_window), GTK_FILE_CHOOSER_ACTION_OPEN, 
+               GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, 
+               GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
+
+               
+       GtkFileFilter *filter=gtk_file_filter_new();
+       for (int i=0; extensions[i]!=NULL; i++) {
+               char buffer[32]="*.";
+               
+               gtk_file_filter_add_pattern(filter, strcat(buffer, extensions[i]));
+               for (int c=0; c<strlen(buffer); c++) {
+                       buffer[c]=toupper(buffer[c]);
+               }
+               gtk_file_filter_add_pattern(filter, buffer);
+       }
+       
+       gtk_file_filter_set_name(filter, "Audio Files");
+       gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); 
+
+       filter=gtk_file_filter_new();
+       gtk_file_filter_add_pattern (filter, "*");
+       gtk_file_filter_set_name(filter, "All Files");
+       gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter); 
+       
+       if (vtt->audiofile) {
+               gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), vtt->filename); 
+       } else if (strlen(globals.current_path)>0 ) {
+               gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), globals.current_path);
+       }
+       
+       g_signal_connect (G_OBJECT(dialog), "selection-changed", G_CALLBACK(chooser_prelis), vtt);      
+       
+       if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
+       char * filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+               gtk_widget_hide(dialog);
+               tX_cursor::set_cursor(tX_cursor::WAIT_CURSOR);
+               load_part(filename, vtt);
+               strcpy(globals.current_path, filename);
+               tX_cursor::reset_cursor();              
+       }       
+       
+       prelis_stop();
+       gtk_widget_destroy(dialog);     
+#else
        char buffer[512];
        
        if (vtt->gui.file_dialog) {
@@ -285,6 +347,7 @@ GtkSignalFunc load_file(GtkWidget *wid, vtt_class *vtt)
        g_signal_connect (G_OBJECT(GTK_FILE_SELECTION(vtt->gui.fs)->cancel_button), "clicked", G_CALLBACK (cancel_load_file), vtt);     
        g_signal_connect (G_OBJECT(vtt->gui.fs), "delete-event", G_CALLBACK(quit_load_file), vtt);      
        g_signal_connect (G_OBJECT(GTK_FILE_SELECTION(vtt->gui.fs)->file_list), "cursor_changed", G_CALLBACK(trigger_prelis), vtt->gui.fs);             
+#endif 
        return NULL;
 }
 
@@ -1095,8 +1158,9 @@ void build_vtt_gui(vtt_class *vtt)
        gtk_box_pack_start(GTK_BOX(tempbox2), g->flash, WID_FIX);
        gtk_widget_show(g->flash);              
 
+#ifndef USE_FILECHOOSER
        g->file_dialog=NULL;
-
+#endif
        gui_connect_signals(vtt);
        
        g->audio_minimized_panel_bar_button=NULL;
index e53cb0dd0a0d81ce13e25c81b8559a6257f9d3a5..0dccd05679f04469517c472ced21c4acb523098f 100644 (file)
@@ -99,8 +99,10 @@ typedef struct vtt_gui
        GtkAdjustment *ec_pan;
        GtkAdjustment *ec_volume;
 
+#ifndef USE_FILECHOOSER        
        GdkWindow *file_dialog;
        GtkWidget *fs;
+#endif 
        
        int32_t current_gui;
 
index 56d7787754780e3f58da98307ec7598a064a991e..96eedff03db81af30ff0280b11578c64b0be74cd 100644 (file)
@@ -38,7 +38,7 @@
 #endif
 
 #define TX_DEFAULT_SIZE_X 100
-#define TX_DEFAULT_SIZE_Y 30
+#define TX_DEFAULT_SIZE_Y 11
 
 /* forward declaration */
 static void gtk_tx_class_init(GtkTxClass *);