diff --git a/moo.kdevelop b/moo.kdevelop index 1a6f6db4..5fc2402e 100644 --- a/moo.kdevelop +++ b/moo.kdevelop @@ -27,7 +27,7 @@ . false - + C @@ -55,15 +55,15 @@ kdevgppoptions kdevg77options -O0 -g3 - - - - - - + + + + + + - - + + --enable-debug --enable-all-gcc-warnings --without-python --prefix=/usr/local/gtk-print @@ -222,15 +222,15 @@ - + --g-fatal-warnings true false true - - - - + + + + true @@ -292,16 +292,16 @@ - + A new empty GAP source file - + A new empty C++ file. - + A new empty header file for C/C++. - + A new empty C file. @@ -328,7 +328,7 @@ - + set m_,_ theValue @@ -338,7 +338,7 @@ false 3 - + diff --git a/moo/mooapp/mooapp.c b/moo/mooapp/mooapp.c index 017e3ab7..c85f72c8 100644 --- a/moo/mooapp/mooapp.c +++ b/moo/mooapp/mooapp.c @@ -33,6 +33,7 @@ #include "mooutils/moostock.h" #include "mooutils/mooutils-fs.h" #include "mooutils/mooutils-misc.h" +#include "mooutils/xdgmime/xdgmime.h" #include #include @@ -1079,6 +1080,10 @@ moo_app_quit_real (MooApp *app) g_free (app->priv->tmpdir); app->priv->tmpdir = NULL; } + +#ifdef MOO_USE_XDGMIME + xdg_mime_shutdown (); +#endif } diff --git a/moo/mooedit/mooeditdialogs.c b/moo/mooedit/mooeditdialogs.c index 0d156c0f..e5c3c499 100644 --- a/moo/mooedit/mooeditdialogs.c +++ b/moo/mooedit/mooeditdialogs.c @@ -36,7 +36,7 @@ moo_edit_open_dialog (GtkWidget *widget, moo_prefs_new_key_string (moo_edit_setting (MOO_EDIT_PREFS_LAST_DIR), NULL); start = moo_prefs_get_filename (moo_edit_setting (MOO_EDIT_PREFS_LAST_DIR)); - dialog = moo_file_dialog_new (MOO_DIALOG_FILE_OPEN_EXISTING, widget, + dialog = moo_file_dialog_new (MOO_FILE_DIALOG_OPEN, widget, TRUE, "Open", start, NULL); if (mgr) @@ -80,7 +80,7 @@ moo_edit_save_as_dialog (MooEdit *edit, moo_prefs_new_key_string (moo_edit_setting (MOO_EDIT_PREFS_LAST_DIR), NULL); start = moo_prefs_get_filename (moo_edit_setting (MOO_EDIT_PREFS_LAST_DIR)); - dialog = moo_file_dialog_new (MOO_DIALOG_FILE_SAVE, GTK_WIDGET (edit), + dialog = moo_file_dialog_new (MOO_FILE_DIALOG_SAVE, GTK_WIDGET (edit), FALSE, title, start, display_basename); if (mgr) diff --git a/moo/mooutils/moofiledialog.c b/moo/mooutils/moofiledialog.c index 4cdb2ec5..af12fb66 100644 --- a/moo/mooutils/moofiledialog.c +++ b/moo/mooutils/moofiledialog.c @@ -197,7 +197,7 @@ static void moo_file_dialog_init (MooFileDialog *dialog) { dialog->priv = g_new0 (MooFileDialogPrivate, 1); - dialog->priv->type = MOO_DIALOG_FILE_OPEN_EXISTING; + dialog->priv->type = MOO_FILE_DIALOG_OPEN; } @@ -256,7 +256,7 @@ moo_file_dialog_class_init (MooFileDialogClass *klass) "type", "type", MOO_TYPE_FILE_DIALOG_TYPE, - MOO_DIALOG_FILE_OPEN_EXISTING, + MOO_FILE_DIALOG_OPEN, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, @@ -379,10 +379,10 @@ moo_file_dialog_create_widget (MooFileDialog *dialog) switch (dialog->priv->type) { - case MOO_DIALOG_FILE_OPEN_EXISTING: - case MOO_DIALOG_FILE_OPEN_ANY: - case MOO_DIALOG_DIR_OPEN: - if (dialog->priv->type == MOO_DIALOG_DIR_OPEN) + case MOO_FILE_DIALOG_OPEN: + case MOO_FILE_DIALOG_OPEN_ANY: + case MOO_FILE_DIALOG_OPEN_DIR: + if (dialog->priv->type == MOO_FILE_DIALOG_OPEN_DIR) chooser_action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER; else chooser_action = GTK_FILE_CHOOSER_ACTION_OPEN; @@ -394,7 +394,7 @@ moo_file_dialog_create_widget (MooFileDialog *dialog) file_chooser_set_select_multiple (widget, dialog->priv->multiple); break; - case MOO_DIALOG_FILE_SAVE: + case MOO_FILE_DIALOG_SAVE: chooser_action = GTK_FILE_CHOOSER_ACTION_SAVE; widget = file_chooser_dialog_new (dialog->priv->title, @@ -475,9 +475,9 @@ moo_file_dialog_run (MooFileDialog *dialog) switch (dialog->priv->type) { - case MOO_DIALOG_FILE_OPEN_EXISTING: - case MOO_DIALOG_FILE_OPEN_ANY: - case MOO_DIALOG_DIR_OPEN: + case MOO_FILE_DIALOG_OPEN: + case MOO_FILE_DIALOG_OPEN_ANY: + case MOO_FILE_DIALOG_OPEN_DIR: if (gtk_dialog_run (GTK_DIALOG (filechooser)) == GTK_RESPONSE_OK) { set_filename (dialog, file_chooser_get_filename (filechooser)); @@ -488,7 +488,7 @@ moo_file_dialog_run (MooFileDialog *dialog) goto out; - case MOO_DIALOG_FILE_SAVE: + case MOO_FILE_DIALOG_SAVE: while (TRUE) { if (GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (filechooser))) @@ -604,10 +604,10 @@ GType moo_file_dialog_type_get_type (void) if (!type) { static const GEnumValue values[] = { - { MOO_DIALOG_FILE_OPEN_EXISTING, (char*)"MOO_DIALOG_FILE_OPEN_EXISTING", (char*)"file-open-existing" }, - { MOO_DIALOG_FILE_OPEN_ANY, (char*)"MOO_DIALOG_FILE_OPEN_ANY", (char*)"file-open-any" }, - { MOO_DIALOG_FILE_SAVE, (char*)"MOO_DIALOG_FILE_SAVE", (char*)"file-save" }, - { MOO_DIALOG_DIR_OPEN, (char*)"MOO_DIALOG_DIR_OPEN", (char*)"dir-open" }, + { MOO_FILE_DIALOG_OPEN, (char*) "MOO_FILE_DIALOG_OPEN", (char*) "open" }, + { MOO_FILE_DIALOG_OPEN_ANY, (char*) "MOO_FILE_DIALOG_OPEN_ANY", (char*) "open-any" }, + { MOO_FILE_DIALOG_SAVE, (char*) "MOO_FILE_DIALOG_SAVE", (char*) "save" }, + { MOO_FILE_DIALOG_OPEN_DIR, (char*) "MOO_FILE_DIALOG_OPEN_DIR", (char*) "open-dir" }, { 0, NULL, NULL } }; type = g_enum_register_static ("MooFileDialogType", values); diff --git a/moo/mooutils/moofiledialog.h b/moo/mooutils/moofiledialog.h index 41c88502..a7133980 100644 --- a/moo/mooutils/moofiledialog.h +++ b/moo/mooutils/moofiledialog.h @@ -33,11 +33,12 @@ typedef struct _MooFileDialog MooFileDialog; typedef struct _MooFileDialogPrivate MooFileDialogPrivate; typedef struct _MooFileDialogClass MooFileDialogClass; +/* do not change, hardcoded in ggap package */ typedef enum { - MOO_DIALOG_FILE_OPEN_EXISTING, - MOO_DIALOG_FILE_OPEN_ANY, - MOO_DIALOG_FILE_SAVE, - MOO_DIALOG_DIR_OPEN + MOO_FILE_DIALOG_OPEN, + MOO_FILE_DIALOG_OPEN_ANY, + MOO_FILE_DIALOG_SAVE, + MOO_FILE_DIALOG_OPEN_DIR /* MOO_DIALOG_FILE_CREATE,*/ /* MOO_DIALOG_DIR_NEW,*/ } MooFileDialogType; diff --git a/moo/mooutils/mooscript/mooscript-zenity.c b/moo/mooutils/mooscript/mooscript-zenity.c index 0a5725fb..3b2b954b 100644 --- a/moo/mooutils/mooscript/mooscript-zenity.c +++ b/moo/mooutils/mooscript/mooscript-zenity.c @@ -427,7 +427,7 @@ choose_file_func (MSValue **args, MSContext *ctx) { return file_selector_func (args, n_args, ctx, - MOO_DIALOG_FILE_OPEN_EXISTING, + MOO_FILE_DIALOG_OPEN, FALSE); } @@ -444,7 +444,7 @@ choose_files_func (MSValue **args, MSContext *ctx) { return file_selector_func (args, n_args, ctx, - MOO_DIALOG_FILE_OPEN_EXISTING, + MOO_FILE_DIALOG_OPEN, TRUE); } @@ -461,7 +461,7 @@ choose_dir_func (MSValue **args, MSContext *ctx) { return file_selector_func (args, n_args, ctx, - MOO_DIALOG_DIR_OPEN, + MOO_FILE_DIALOG_OPEN_DIR, FALSE); } @@ -478,7 +478,7 @@ choose_file_save_func (MSValue **args, MSContext *ctx) { return file_selector_func (args, n_args, ctx, - MOO_DIALOG_FILE_SAVE, + MOO_FILE_DIALOG_SAVE, FALSE); }