[geany/geany] a64c46: Initialize window geometry array on error conditions

Matthew Brush git-noreply at xxxxx
Thu Jul 26 00:02:12 UTC 2012


Branch:      refs/heads/document-messages
Author:      Matthew Brush <matt at geany.org>
Committer:   Matthew Brush <matt at geany.org>
Date:        Sun, 11 Dec 2011 21:10:05
Commit:      a64c46c496b5f77a3a1b15adda3136bcbf01cd6f
             https://github.com/geany/geany/commit/a64c46c496b5f77a3a1b15adda3136bcbf01cd6f

Log Message:
-----------
Initialize window geometry array on error conditions

Instead of using the garbage values in memory for default size.
This fixes what was attempted to be fixed in the last two reverted commits.


Modified Paths:
--------------
    src/keyfile.c
    src/main.c

Modified: src/keyfile.c
4 files changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -922,6 +922,10 @@ static void load_ui_prefs(GKeyFile *config)
 	if (error)
 	{
 		ui_prefs.geometry[0] = -1;
+		ui_prefs.geometry[1] = -1;
+		ui_prefs.geometry[2] = -1;
+		ui_prefs.geometry[3] = -1;
+		ui_prefs.geometry[4] = 0;
 		g_error_free(error);
 		error = NULL;
 	}


Modified: src/main.c
3 files changed, 0 insertions(+), 3 deletions(-)
===================================================================
@@ -275,9 +275,6 @@ static void main_init(void)
 	gtk_widget_set_name(ui_lookup_widget(main_widgets.window, "menubar1"), "GeanyMenubar");
 	gtk_widget_set_name(main_widgets.toolbar, "GeanyToolbar");
 
-	/* for some reason we need to set the initial size request,
-	 * otherwise the main window gets crazy dimensions */
-	gtk_widget_set_size_request(main_widgets.window, 10, 10);
 	gtk_window_set_default_size(GTK_WINDOW(main_widgets.window),
 		GEANY_WINDOW_DEFAULT_WIDTH, GEANY_WINDOW_DEFAULT_HEIGHT);
 }


@@ Diff output truncated at 100000 characters. @@


--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).



More information about the Commits mailing list