Renamed MooFileDialogType enum values

master
Yevgen Muntyan 2006-06-08 10:50:18 -05:00
parent 71d0eb3c3c
commit 2c31911f17
6 changed files with 51 additions and 45 deletions

View File

@ -27,7 +27,7 @@
</ignoreparts>
<projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
<description></description>
<description/>
<secondaryLanguages>
<language>C</language>
</secondaryLanguages>
@ -55,15 +55,15 @@
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevg77options</f77compiler>
<cflags>-O0 -g3</cflags>
<topsourcedir></topsourcedir>
<cppflags></cppflags>
<ccompilerbinary></ccompilerbinary>
<cxxcompilerbinary></cxxcompilerbinary>
<f77compilerbinary></f77compilerbinary>
<f77flags></f77flags>
<topsourcedir/>
<cppflags/>
<ccompilerbinary/>
<cxxcompilerbinary/>
<f77compilerbinary/>
<f77flags/>
<envvars/>
<ldflags></ldflags>
<cxxflags></cxxflags>
<ldflags/>
<cxxflags/>
</debug>
<gtk-print>
<configargs>--enable-debug --enable-all-gcc-warnings --without-python --prefix=/usr/local/gtk-print</configargs>
@ -222,15 +222,15 @@
</kdevautoproject>
<kdevdebugger>
<general>
<dbgshell></dbgshell>
<dbgshell/>
<programargs>--g-fatal-warnings</programargs>
<breakonloadinglibs>true</breakonloadinglibs>
<separatetty>false</separatetty>
<floatingtoolbar>true</floatingtoolbar>
<gdbpath></gdbpath>
<configGdbScript></configGdbScript>
<runShellScript></runShellScript>
<runGdbScript></runGdbScript>
<gdbpath/>
<configGdbScript/>
<runShellScript/>
<runGdbScript/>
</general>
<display>
<staticmembers>true</staticmembers>
@ -292,16 +292,16 @@
</kdevdoctreeview>
<kdevfilecreate>
<filetypes>
<type icon="source" ext="g" create="template" name="GAP source" >
<type icon="source" ext="g" name="GAP source" create="template" >
<descr>A new empty GAP source file</descr>
</type>
<type icon="source_cpp" ext="cpp" create="template" name="C++ Source" >
<type icon="source_cpp" ext="cpp" name="C++ Source" create="template" >
<descr>A new empty C++ file.</descr>
</type>
<type icon="source_h" ext="h" create="template" name="C/C++ Header" >
<type icon="source_h" ext="h" name="C/C++ Header" create="template" >
<descr>A new empty header file for C/C++.</descr>
</type>
<type icon="source_c" ext="c" create="template" name="C Source" >
<type icon="source_c" ext="c" name="C Source" create="template" >
<descr>A new empty C file.</descr>
</type>
</filetypes>
@ -328,7 +328,7 @@
</codecompletion>
<references/>
<creategettersetter>
<prefixGet></prefixGet>
<prefixGet/>
<prefixSet>set</prefixSet>
<prefixVariable>m_,_</prefixVariable>
<parameterName>theValue</parameterName>
@ -338,7 +338,7 @@
<qt>
<used>false</used>
<version>3</version>
<root></root>
<root/>
</qt>
</kdevcppsupport>
<kdevdocumentation>

View File

@ -33,6 +33,7 @@
#include "mooutils/moostock.h"
#include "mooutils/mooutils-fs.h"
#include "mooutils/mooutils-misc.h"
#include "mooutils/xdgmime/xdgmime.h"
#include <string.h>
#include <stdio.h>
@ -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
}

View File

@ -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)

View File

@ -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);

View File

@ -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;

View File

@ -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);
}