SF.net SVN: geany:[4013] trunk/src/keybindings.c

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Jul 23 14:39:03 UTC 2009


Revision: 4013
          http://geany.svn.sourceforge.net/geany/?rev=4013&view=rev
Author:   ntrel
Date:     2009-07-23 14:39:03 +0000 (Thu, 23 Jul 2009)

Log Message:
-----------
Fix GLib warning when using build keybindings and there's no current document.

Modified Paths:
--------------
    trunk/src/keybindings.c

Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c	2009-07-23 11:00:32 UTC (rev 4012)
+++ trunk/src/keybindings.c	2009-07-23 14:39:03 UTC (rev 4013)
@@ -1354,17 +1354,15 @@
 static void cb_func_build_action(guint key_id)
 {
 	GtkWidget *item;
-	GeanyFiletype *ft;
 	BuildMenuItems *menu_items;
 
 	GeanyDocument *doc = document_get_current();
 	if (doc == NULL)
 		return;
 
-	ft = doc->file_type;
-	if (! ft)
+	if (!GTK_WIDGET_IS_SENSITIVE(ui_lookup_widget(main_widgets.window, "menu_build1")))
 		return;
-	menu_items = build_get_menu_items(ft->id);
+	menu_items = build_get_menu_items(doc->file_type->id);
 
 	switch (key_id)
 	{


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list