Permalink
Browse files

Bugfixes.

Note to self: do try to compile before committing.
  • Loading branch information...
1 parent 9146446 commit f6012444cd630334bf9cad82f3be778b09e276a6 David Mohr committed Aug 1, 2010
@@ -344,7 +344,7 @@ set_default_done_callback (Gchd *gchd, gboolean success, gchar * error, gpointer
if (!success)
{
grub_choose_default_error_message (gtk_widget_get_toplevel (GTK_WIDGET (bbox)), error);
- g_error_free (error);
+ g_free (error);
}
g_signal_emit (bbox, widget_class->signals[GRUB_CHOOSE_DEFAULT_WIDGET_SIGNAL_SELECTED], 0, priv->def_entry);
@@ -37,7 +37,9 @@ void mount (void)
config_dir = g_get_user_config_dir ();
script = g_build_filename (CONFIG_DIR, "mount", NULL);
- grub_choose_default_exec (config_dir, script);
+ grub_choose_default_exec (config_dir, script, NULL);
+
+ g_free (script);
}
@@ -16,6 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include "gchd-error.h"
#include "grub-choose-default-util.h"
/**
@@ -75,7 +76,7 @@ grub_choose_default_exec(const gchar * directory, const gchar * script, GError *
gchar * dirname, * basename;
#endif
- g_assert (**error == NULL || *error == NULL);
+ g_assert (error == NULL || *error == NULL);
path = g_build_filename (directory, script, NULL);
@@ -88,7 +89,7 @@ grub_choose_default_exec(const gchar * directory, const gchar * script, GError *
if (dir == NULL)
{
- g_error_new (error, GCHD_ERROR,
+ g_set_error (error, GCHD_ERROR,
GCHD_ERROR_FILE_NOT_FOUND,
"Could not find or open %s", dirname);
return FALSE;
@@ -143,7 +144,7 @@ grub_choose_default_exec(const gchar * directory, const gchar * script, GError *
}
g_free (path);
- g_error_new (error, GCHD_ERROR,
+ g_set_error (error, GCHD_ERROR,
GCHD_ERROR_FILE_NOT_FOUND,
"Could not find a script %s in %s", script, directory);
return FALSE;
@@ -25,7 +25,7 @@ G_BEGIN_DECLS
#define CONFIG_DIR "grub-choose-default"
-gboolean grub_choose_default_exec (GrubChooseDefaultWindow *win, const gchar * directory, const gchar * script, GError **error);
+gboolean grub_choose_default_exec (const gchar * directory, const gchar * script, GError **error);
void grub_choose_default_error (GtkWidget *parent, GError *error);
void grub_choose_default_error_message (GtkWidget *parent, gchar * message);

0 comments on commit f601244

Please sign in to comment.