@ -94,7 +94,8 @@ typedef enum
APP_GIMP ,
APP_GIMP ,
APP_INKSCAPE ,
APP_INKSCAPE ,
APP_FIREFOX ,
APP_FIREFOX ,
APP_KINO
APP_KINO ,
APP_BLACKLISTED
} Application ;
} Application ;
static const char * kgtkAppName = NULL ;
static const char * kgtkAppName = NULL ;
@ -508,6 +509,15 @@ static void determineAppName()
printf ( " KGTK::Firefox \n " ) ;
printf ( " KGTK::Firefox \n " ) ;
# endif
# endif
}
}
//===========================================================================
// BLACKLISTED APPS FOLLOW
// These applications crash regularly under kgtk-qt3 for unknown reasons,
// although bad programming within the blacklisted application is a good bet!
//===========================================================================
else if ( isApp ( prg , " audacity " ) )
{
kgtkApp = APP_BLACKLISTED ;
}
else
else
{
{
kgtkApp = APP_UNKNOWN ;
kgtkApp = APP_UNKNOWN ;
@ -533,7 +543,7 @@ static gboolean kgtkInit(const char *appName)
if ( useKde )
if ( useKde )
{
{
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp ! = APP_UNKNOWN ) | | ( ! BLACKLIST_UNKNOWN_GTK_APPS ) ) {
if ( ( ( kgtkApp ! = APP_UNKNOWN ) | | ( ! BLACKLIST_UNKNOWN_GTK_APPS ) ) & & ( kgtkApp ! = APP_BLACKLISTED ) ) {
if ( ! g_threads_got_initialized )
if ( ! g_threads_got_initialized )
g_thread_init ( NULL ) ;
g_thread_init ( NULL ) ;
atexit ( & kgtkExit ) ;
atexit ( & kgtkExit ) ;
@ -542,10 +552,10 @@ static gboolean kgtkInit(const char *appName)
}
}
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::kgtkInit useKde:%d \n " , ( useKde & & ( ( kgtkApp ! = APP_UNKNOWN ) | | ( ! BLACKLIST_UNKNOWN_GTK_APPS ) ) ) ) ;
printf ( " KGTK::kgtkInit useKde:%d \n " , ( useKde & & ( ( ( kgtkApp ! = APP_UNKNOWN ) | | ( ! BLACKLIST_UNKNOWN_GTK_APPS ) ) ) & & ( kgtkApp ! = APP_BLACKLISTED ) ) ) ;
# endif
# endif
return ( useKde & & ( ( kgtkApp ! = APP_UNKNOWN ) | | ( ! BLACKLIST_UNKNOWN_GTK_APPS ) ) ) ;
return ( useKde & & ( ( ( kgtkApp ! = APP_UNKNOWN ) | | ( ! BLACKLIST_UNKNOWN_GTK_APPS ) ) & & ( kgtkApp ! = APP_BLACKLISTED ) ) ) ;
}
}
/* ......................... */
/* ......................... */
@ -1158,7 +1168,7 @@ void gtk_widget_hide(GtkWidget *widget)
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_widget_hide " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_widget_hide " ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_widget_hide Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_widget_hide Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -1268,7 +1278,7 @@ gint gtk_dialog_run(GtkDialog *dialog)
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_dialog_run " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_dialog_run " ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_dialog_run Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_dialog_run Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -1491,7 +1501,7 @@ gchar * gtk_file_chooser_get_filename(GtkFileChooser *chooser)
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_filename " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_filename " ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_file_chooser_get_filename Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_file_chooser_get_filename Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -1513,7 +1523,7 @@ gboolean gtk_file_chooser_select_filename(GtkFileChooser *chooser, const char *f
if ( ! realFunction )
if ( ! realFunction )
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_select_filename " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_select_filename " ) ;
realFunction ( chooser , filename ) ;
realFunction ( chooser , filename ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
return ;
return ;
}
}
@ -1554,7 +1564,7 @@ void gtk_file_chooser_unselect_all(GtkFileChooser *chooser)
if ( ! realFunction )
if ( ! realFunction )
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_unselect_all " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_unselect_all " ) ;
realFunction ( chooser ) ;
realFunction ( chooser ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
return ;
return ;
}
}
@ -1577,7 +1587,7 @@ gboolean gtk_file_chooser_set_filename(GtkFileChooser *chooser, const char *file
if ( ! realFunction )
if ( ! realFunction )
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_set_filename " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_set_filename " ) ;
realFunction ( chooser , filename ) ;
realFunction ( chooser , filename ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
return ;
return ;
}
}
@ -1618,7 +1628,7 @@ void gtk_file_chooser_set_current_name(GtkFileChooser *chooser, const char *file
GtkFileChooserAction act = gtk_file_chooser_get_action ( chooser ) ;
GtkFileChooserAction act = gtk_file_chooser_get_action ( chooser ) ;
if ( ( GTK_FILE_CHOOSER_ACTION_SAVE = = act | | GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER = = act ) | |
if ( ( GTK_FILE_CHOOSER_ACTION_SAVE = = act | | GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER = = act ) | |
( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS )
( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) )
)
)
{
{
static void * ( * realFunction ) ( ) = NULL ;
static void * ( * realFunction ) ( ) = NULL ;
@ -1626,7 +1636,7 @@ void gtk_file_chooser_set_current_name(GtkFileChooser *chooser, const char *file
if ( ! realFunction )
if ( ! realFunction )
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_set_current_name " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_set_current_name " ) ;
realFunction ( chooser , filename ) ;
realFunction ( chooser , filename ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
return ;
return ;
}
}
}
}
@ -1654,7 +1664,7 @@ GSList * gtk_file_chooser_get_filenames(GtkFileChooser *chooser)
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_filenames " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_filenames " ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_file_chooser_get_filenames Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_file_chooser_get_filenames Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -1691,7 +1701,7 @@ gboolean gtk_file_chooser_set_current_folder(GtkFileChooser *chooser, const gcha
if ( ! realFunction )
if ( ! realFunction )
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_set_current_folder " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_set_current_folder " ) ;
realFunction ( chooser , folder ) ;
realFunction ( chooser , folder ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
return ;
return ;
}
}
@ -1720,7 +1730,7 @@ gchar * gtk_file_chooser_get_current_folder(GtkFileChooser *chooser)
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_current_folder " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_current_folder " ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_file_chooser_get_current_folder Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_file_chooser_get_current_folder Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -1748,7 +1758,7 @@ gchar * gtk_file_chooser_get_uri(GtkFileChooser *chooser)
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_uri " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_uri " ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_file_chooser_get_uri Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_file_chooser_get_uri Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -1779,7 +1789,7 @@ gboolean gtk_file_chooser_set_uri(GtkFileChooser *chooser, const char *uri)
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_set_uri " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_set_uri " ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_file_chooser_set_uri Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_file_chooser_set_uri Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -1810,7 +1820,7 @@ GSList * gtk_file_chooser_get_uris(GtkFileChooser *chooser)
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_uris " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_uris " ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_file_chooser_get_uris Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_file_chooser_get_uris Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -1831,7 +1841,7 @@ gboolean gtk_file_chooser_set_current_folder_uri(GtkFileChooser *chooser, const
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_set_current_folder_uri " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_set_current_folder_uri " ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_file_chooser_set_current_folder_uri Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_file_chooser_set_current_folder_uri Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -1861,7 +1871,7 @@ gchar * gtk_file_chooser_get_current_folder_uri(GtkFileChooser *chooser)
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_current_folder_uri " ) ;
realFunction = ( void * ( * ) ( ) ) real_dlsym ( RTLD_NEXT , " gtk_file_chooser_get_current_folder_uri " ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_file_chooser_get_current_folder_uri Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_file_chooser_get_current_folder_uri Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -1916,7 +1926,7 @@ GtkWidget * gtk_dialog_add_button(GtkDialog *dialog, const gchar *button_text, g
dlg = realFunction ( dialog , button_text , response_id ) ;
dlg = realFunction ( dialog , button_text , response_id ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS & & realFunction ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) & & realFunction ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_dialog_add_button Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_dialog_add_button Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -1956,7 +1966,7 @@ void gtk_dialog_add_buttons(GtkDialog *dialog, const gchar *first_button_text, .
va_end ( varargs ) ;
va_end ( varargs ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_dialog_add_buttons Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_dialog_add_buttons Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif
@ -2005,7 +2015,7 @@ GtkWidget * gtk_file_chooser_dialog_new(const gchar *title, GtkWindow *parent,
va_end ( varargs ) ;
va_end ( varargs ) ;
determineAppName ( ) ;
determineAppName ( ) ;
if ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) {
if ( ( ( kgtkApp = = APP_UNKNOWN ) & & BLACKLIST_UNKNOWN_GTK_APPS ) | | ( kgtkApp = = APP_BLACKLISTED ) ) {
# ifdef KGTK_DEBUG
# ifdef KGTK_DEBUG
printf ( " KGTK::gtk_file_chooser_dialog_new Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
printf ( " KGTK::gtk_file_chooser_dialog_new Bypassing internal function \n \r " ) ; fflush ( stdout ) ;
# endif
# endif