From dec031b3b532afc794aadca673826fb84984344c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Wed, 17 May 2006 18:29:29 +0000 Subject: [PATCH] fixed compiler warning, removed obsolete and commented code git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@340 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- src/document.c | 4 +++- src/keyfile.c | 59 +++++++------------------------------------------- 2 files changed, 11 insertions(+), 52 deletions(-) diff --git a/src/document.c b/src/document.c index 7111b90f..3f727737 100644 --- a/src/document.c +++ b/src/document.c @@ -258,6 +258,7 @@ gint document_create_new_sci(const gchar *filename) } this.tabmenu_label = gtk_label_new(title); + gtk_misc_set_alignment(GTK_MISC(this.tabmenu_label), 0.0, 0); if (app->tab_order_ltr) { gint npage; @@ -399,7 +400,8 @@ void document_new_file(filetype *ft) */ void document_open_file(gint idx, const gchar *filename, gint pos, gboolean readonly, filetype *ft) { - gint editor_mode, size; + gint editor_mode; + gsize size; gboolean reload = (idx == -1) ? FALSE : TRUE; struct stat st; gchar *enc = NULL; diff --git a/src/keyfile.c b/src/keyfile.c index 0ea5f774..c8078a45 100644 --- a/src/keyfile.c +++ b/src/keyfile.c @@ -1,7 +1,7 @@ /* * keyfile.c - this file is part of Geany, a fast and lightweight IDE * - * Copyright 2005 Enrico Troeger + * Copyright 2006 Enrico Troeger * * 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 @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * $Id$ */ @@ -128,13 +128,6 @@ void configuration_save(void) g_key_file_set_string(config, PACKAGE, "pref_template_version", app->pref_template_version); // store build settings - //g_key_file_set_string(config, "build", "build_java_cmd", app->build_java_cmd ? app->build_java_cmd : ""); - //g_key_file_set_string(config, "build", "build_javac_cmd", app->build_javac_cmd ? app->build_javac_cmd : ""); - //g_key_file_set_string(config, "build", "build_fpc_cmd", app->build_fpc_cmd ? app->build_fpc_cmd : ""); - //g_key_file_set_string(config, "build", "build_tex_dvi_cmd", app->build_tex_dvi_cmd ? app->build_tex_dvi_cmd : ""); - //g_key_file_set_string(config, "build", "build_tex_pdf_cmd", app->build_tex_pdf_cmd ? app->build_tex_pdf_cmd : ""); - //g_key_file_set_string(config, "build", "build_tex_view_dvi_cmd", app->build_tex_view_dvi_cmd ? app->build_tex_view_dvi_cmd : ""); - //g_key_file_set_string(config, "build", "build_tex_view_pdf_cmd", app->build_tex_view_pdf_cmd ? app->build_tex_view_pdf_cmd : ""); g_key_file_set_string(config, "build", "build_make_cmd", app->build_make_cmd ? app->build_make_cmd : ""); g_key_file_set_string(config, "build", "build_term_cmd", app->build_term_cmd ? app->build_term_cmd : ""); g_key_file_set_string(config, "build", "build_browser_cmd", app->build_browser_cmd ? app->build_browser_cmd : ""); @@ -252,8 +245,8 @@ gboolean configuration_load(void) app->geometry[3] = geo[3]; } hpan_position = utils_get_setting_integer(config, PACKAGE, "treeview_position", 156); - vpan_position = utils_get_setting_integer(config, PACKAGE, "msgwindow_position", (geo) ? - (GEANY_MSGWIN_HEIGHT + geo[3] - 440) : + vpan_position = utils_get_setting_integer(config, PACKAGE, "msgwindow_position", (geo) ? + (GEANY_MSGWIN_HEIGHT + geo[3] - 440) : (GEANY_MSGWIN_HEIGHT + GEANY_WINDOW_DEFAULT_HEIGHT - 440)); @@ -283,41 +276,6 @@ gboolean configuration_load(void) app->pref_editor_new_line = utils_get_setting_boolean(config, PACKAGE, "pref_editor_new_line", TRUE); app->pref_editor_trail_space = utils_get_setting_boolean(config, PACKAGE, "pref_editor_trail_space", TRUE); -/* - tmp_string = g_find_program_in_path("java"); - app->build_java_cmd = utils_get_setting_string(config, "build", "build_java_cmd", tmp_string); - g_free(tmp_string); - - tmp_string2 = g_find_program_in_path("javac"); - tmp_string = g_strconcat(tmp_string2, " -verbose", NULL); - app->build_javac_cmd = utils_get_setting_string(config, "build", "build_javac_cmd", tmp_string); - g_free(tmp_string); - g_free(tmp_string2); - - tmp_string = g_find_program_in_path("fpc"); - app->build_fpc_cmd = utils_get_setting_string(config, "build", "build_fpc_cmd", tmp_string); - g_free(tmp_string); - - tmp_string2 = g_find_program_in_path("latex"); - tmp_string = g_strconcat(tmp_string2, " -interaction=nonstopmode", NULL); - app->build_tex_dvi_cmd = utils_get_setting_string(config, "build", "build_tex_dvi_cmd", tmp_string); - g_free(tmp_string); - g_free(tmp_string2); - - tmp_string2 = g_find_program_in_path("pdflatex"); - tmp_string = g_strconcat(tmp_string2, " -interaction=nonstopmode", NULL); - app->build_tex_pdf_cmd = utils_get_setting_string(config, "build", "build_tex_pdf_cmd", tmp_string); - g_free(tmp_string); - g_free(tmp_string2); - - tmp_string = g_find_program_in_path("xdvi"); - app->build_tex_view_dvi_cmd = utils_get_setting_string(config, "build", "build_tex_view_dvi_cmd", tmp_string); - g_free(tmp_string); - - tmp_string = g_find_program_in_path("xpdf"); - app->build_tex_view_pdf_cmd = utils_get_setting_string(config, "build", "build_tex_view_pdf_cmd", tmp_string); - g_free(tmp_string); -*/ tmp_string = g_find_program_in_path("make"); app->build_make_cmd = utils_get_setting_string(config, "build", "build_make_cmd", tmp_string); g_free(tmp_string); @@ -339,7 +297,6 @@ gboolean configuration_load(void) app->recent_files[i] = NULL; } } - //geany_debug("%d", g_strv_length(app->recent_files)); for(i = 0; i < GEANY_SESSION_FILES; i++) { @@ -377,11 +334,11 @@ gboolean configuration_open_files(void) x = 0; y = 0; ft_id = GEANY_MAX_FILE_TYPES; - + // yes it is :, it should be a ;, but now it is too late to change it array = g_strsplit(session_files[i], ":", 3); len = g_strv_length(array); - + // read position if (len > 0 && array[0]) pos = atoi(array[0]); else pos = 0; @@ -393,7 +350,7 @@ gboolean configuration_open_files(void) file = array[2]; } else file = array[1]; - + // try to get the locale equivalent for the filename, fallback to filename if error locale_filename = g_locale_from_utf8(file, -1, NULL, NULL, NULL); if (locale_filename == NULL) locale_filename = g_strdup(file); @@ -413,7 +370,7 @@ gboolean configuration_open_files(void) i++; if (i >= GEANY_SESSION_FILES) break; } - else + else { i--; if (i < 0) break;