diff --git a/src/geany.h b/src/geany.h index 2223e6c4..6ce5d97a 100644 --- a/src/geany.h +++ b/src/geany.h @@ -54,6 +54,8 @@ #endif +// for detailed description look in the documentation, things are not +// listed in the documentation should not be changed ;-) #define GEANY_HOME_DIR g_get_home_dir() #define GEANY_FIFO_NAME "geany_fifo.0" #define GEANY_CODENAME "Nivers" @@ -64,9 +66,12 @@ #define GEANY_CHECK_FILE_DELAY 30 #define GEANY_WORDCHARS "_#&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" #define GEANY_MAX_AUTOCOMPLETE_WORDS 30 -#define GEANY_MSGWIN_HEIGHT 240 #define GEANY_STRING_UNTITLED _("untitled") - +#define GEANY_MSGWIN_HEIGHT 208 +#define GEANY_WINDOW_MINIMAL_WIDTH 620 +#define GEANY_WINDOW_MINIMAL_HEIGHT 440 +#define GEANY_WINDOW_DEFAULT_WIDTH 900 +#define GEANY_WINDOW_DEFAULT_HEIGHT 600 #ifndef DOCDIR # define DOCDIR PACKAGE_DATA_DIR"/doc/"PACKAGE"/html/" diff --git a/src/interface.c b/src/interface.c index 5fa004f5..106c3abb 100644 --- a/src/interface.c +++ b/src/interface.c @@ -201,7 +201,6 @@ create_window1 (void) accel_group = gtk_accel_group_new (); window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_widget_set_size_request (window1, 900, 600); gtk_window_set_title (GTK_WINDOW (window1), _("Geany")); vbox1 = gtk_vbox_new (FALSE, 0); diff --git a/src/keyfile.c b/src/keyfile.c index f2445b88..8a536b94 100644 --- a/src/keyfile.c +++ b/src/keyfile.c @@ -248,9 +248,10 @@ gboolean configuration_load(void) app->geometry[2] = geo[2]; app->geometry[3] = geo[3]; } - hpan_position = utils_get_setting_integer(config, PACKAGE, "treeview_position", -1); - vpan_position = utils_get_setting_integer(config, PACKAGE, "msgwindow_position", - (geo) ? (geo[3] - GEANY_MSGWIN_HEIGHT) : -1); + 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) : + (GEANY_MSGWIN_HEIGHT + GEANY_WINDOW_DEFAULT_HEIGHT - 440)); app->pref_editor_tab_width = utils_get_setting_integer(config, PACKAGE, "pref_editor_tab_width", 4); @@ -465,7 +466,7 @@ void configuration_read_filetype_extensions(void) } } // add comment, if it doesn't exist - comment = g_key_file_get_comment(config, "Extensions", NULL, NULL); + comment = g_key_file_get_comment(config, NULL, NULL, NULL); if (!comment || strlen(comment) == 0) { g_key_file_set_comment(config, "Extensions", NULL, "Filetype extension configuration file for Geany\nInsert as many items as you want, seperate them with a \";\".\nIf you want to get the default for a key, just delete it and\nthen it will be appended next time you start Geany.", NULL); diff --git a/src/main.c b/src/main.c index 33bb6fbd..2f508e2e 100644 --- a/src/main.c +++ b/src/main.c @@ -56,6 +56,7 @@ static gboolean ignore_fifo = FALSE; #endif static gboolean debug_mode = FALSE; static gboolean ignore_global_tags = FALSE; +static gboolean no_msgwin = FALSE; static gboolean no_vte = FALSE; static gboolean show_version = FALSE; static gchar *alternate_config = NULL; @@ -70,6 +71,7 @@ static GOptionEntry entries[] = { "no-pipe", 'p', 0, G_OPTION_ARG_NONE, &ignore_fifo, "don't open files in a running instance, force opening a new instance", NULL }, #endif { "config", 'c', 0, G_OPTION_ARG_FILENAME, &alternate_config, "use an alternate configuration directory", NULL }, + { "no-msgwin", 'm', 0, G_OPTION_ARG_NONE, &no_msgwin, "don't show message window at startup", NULL }, { "no-terminal", 't', 0, G_OPTION_ARG_NONE, &no_vte, "don't load terminal support", NULL }, #ifdef HAVE_VTE { "vte-lib", 'l', 0, G_OPTION_ARG_FILENAME, &lib_vte, "filename of libvte.so", NULL }, @@ -109,7 +111,7 @@ static void apply_settings(void) gtk_widget_hide(app->toolbar); app->toolbar_visible = FALSE; } - if (! app->msgwindow_visible) + if (! app->msgwindow_visible || no_msgwin) { // I know this is a bit confusing, but it works app->msgwindow_visible = TRUE; @@ -473,6 +475,8 @@ gint main(gint argc, gchar **argv) gtk_init(&argc, &argv); main_init(); + gtk_widget_set_size_request(app->window, GEANY_WINDOW_MINIMAL_WIDTH, GEANY_WINDOW_MINIMAL_HEIGHT); + gtk_window_set_default_size(GTK_WINDOW(app->window), GEANY_WINDOW_DEFAULT_WIDTH, GEANY_WINDOW_DEFAULT_HEIGHT); configuration_load(); templates_init(); encodings_init();