added commandline option "--vte-lib" to specify the location of libvte.so.x

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@109 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2006-01-06 18:37:24 +00:00
parent 9edc1eecb9
commit 36055a4942
3 changed files with 22 additions and 7 deletions

View File

@ -1,7 +1,7 @@
/* /*
* callbacks.c - this file is part of Geany, a fast and lightweight IDE * callbacks.c - this file is part of Geany, a fast and lightweight IDE
* *
* Copyright 2005 Enrico Troeger <enrico.troeger@uvena.de> * Copyright 2006 Enrico Troeger <enrico.troeger@uvena.de>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -112,6 +112,9 @@ gint destroyapp(GtkWidget *widget, gpointer gdata)
templates_free_templates(); templates_free_templates();
tm_workspace_free(TM_WORK_OBJECT(app->tm_workspace)); tm_workspace_free(TM_WORK_OBJECT(app->tm_workspace));
g_free(app->configdir); g_free(app->configdir);
#ifdef HAVE_VTE
g_free(app->lib_vte);
#endif
g_free(app->search_text); g_free(app->search_text);
g_free(app->editor_font); g_free(app->editor_font);
g_free(app->tagbar_font); g_free(app->tagbar_font);

View File

@ -1,7 +1,7 @@
/* /*
* geany.h - this file is part of Geany, a fast and lightweight IDE * geany.h - this file is part of Geany, a fast and lightweight IDE
* *
* Copyright 2005 Enrico Troeger <enrico.troeger@uvena.de> * Copyright 2006 Enrico Troeger <enrico.troeger@uvena.de>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -43,6 +43,9 @@
#define SSM(s, m, w, l) scintilla_send_message(s, m, w, l) #define SSM(s, m, w, l) scintilla_send_message(s, m, w, l)
#define INLINE inline
//#define INLINE
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
# include <windows.h> # include <windows.h>
# include <commdlg.h> # include <commdlg.h>
@ -58,7 +61,6 @@
#define GEANY_HOMEPAGE "http://geany.uvena.de/" #define GEANY_HOMEPAGE "http://geany.uvena.de/"
#define GEANY_MAX_OPEN_FILES 25 #define GEANY_MAX_OPEN_FILES 25
#define GEANY_SESSION_FILES 15 #define GEANY_SESSION_FILES 15
//#define GEANY_RECENT_MRU_LENGTH 10
#define GEANY_MAX_TAGS_COUNT 1000 #define GEANY_MAX_TAGS_COUNT 1000
#define GEANY_WORDCHARS "_#&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" #define GEANY_WORDCHARS "_#&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
#define GEANY_MAX_AUTOCOMPLETE_WORDS 30 #define GEANY_MAX_AUTOCOMPLETE_WORDS 30
@ -134,6 +136,9 @@ typedef struct MyApp
gboolean pref_main_show_search; gboolean pref_main_show_search;
gint mru_length; gint mru_length;
gint long_line_column; gint long_line_column;
#ifdef HAVE_VTE
gchar *lib_vte;
#endif
gchar *long_line_color; gchar *long_line_color;
gchar *pref_template_developer; gchar *pref_template_developer;
gchar *pref_template_company; gchar *pref_template_company;

View File

@ -1,7 +1,7 @@
/* /*
* vte.c - this file is part of Geany, a fast and lightweight IDE * vte.c - this file is part of Geany, a fast and lightweight IDE
* *
* Copyright 2005 Enrico Troeger <enrico.troeger@uvena.de> * Copyright 2006 Enrico Troeger <enrico.troeger@uvena.de>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -91,9 +91,16 @@ void vte_init(void)
{ {
GtkWidget *vte, *scrollbar, *hbox, *frame; GtkWidget *vte, *scrollbar, *hbox, *frame;
module = g_module_open("libvte.so", G_MODULE_BIND_LAZY); if (app->lib_vte && strlen(app->lib_vte))
// try to fallback to libvte.so.4, if it is installed {
if (module == NULL) module = g_module_open("libvte.so.4", G_MODULE_BIND_LAZY); module = g_module_open(app->lib_vte, G_MODULE_BIND_LAZY);
}
else
{
module = g_module_open("libvte.so", G_MODULE_BIND_LAZY);
// try to fallback to libvte.so.4, if it is installed
if (module == NULL) module = g_module_open("libvte.so.4", G_MODULE_BIND_LAZY);
}
if (module == NULL || app->have_vte == FALSE) if (module == NULL || app->have_vte == FALSE)
{ {