[gedit] FileChooserDialog: rename the flags
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] FileChooserDialog: rename the flags
- Date: Sat, 6 Jun 2020 20:38:34 +0000 (UTC)
commit d94e7efa720ac988ef3ea620b0d64b20459d166d
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Jun 6 21:11:09 2020 +0200
FileChooserDialog: rename the flags
GEDIT_FILE_CHOOSER_OPEN is now used also by the GeditFileChooserOpen
class.
gedit/gedit-commands-file.c | 2 +-
gedit/gedit-file-chooser-dialog-gtk.c | 6 +++---
gedit/gedit-file-chooser-dialog-osx.m | 8 ++++----
gedit/gedit-file-chooser-dialog.h | 9 +++++----
4 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index 75228fad7..98901e117 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -830,7 +830,7 @@ save_as_tab_async (GeditTab *tab,
/* Translators: "Save As" is the title of the file chooser window. */
save_dialog = gedit_file_chooser_dialog_create (C_("window title", "Save As"),
GTK_WINDOW (window),
- GEDIT_FILE_CHOOSER_SAVE,
+ GEDIT_FILE_CHOOSER_FLAG_SAVE,
_("_Save"),
_("_Cancel"));
diff --git a/gedit/gedit-file-chooser-dialog-gtk.c b/gedit/gedit-file-chooser-dialog-gtk.c
index 92eac5a0d..1e1265a94 100644
--- a/gedit/gedit-file-chooser-dialog-gtk.c
+++ b/gedit/gedit-file-chooser-dialog-gtk.c
@@ -277,7 +277,7 @@ create_option_menu (GeditFileChooserDialogGtk *dialog,
label = gtk_label_new_with_mnemonic (_("C_haracter Encoding:"));
gtk_widget_set_halign (label, GTK_ALIGN_START);
- save_mode = (flags & GEDIT_FILE_CHOOSER_SAVE) != 0;
+ save_mode = (flags & GEDIT_FILE_CHOOSER_FLAG_SAVE) != 0;
menu = gedit_encodings_combo_box_new (save_mode);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), menu);
@@ -397,7 +397,7 @@ create_extra_widget (GeditFileChooserDialogGtk *dialog,
create_option_menu (dialog, flags);
- if ((flags & GEDIT_FILE_CHOOSER_SAVE) != 0)
+ if ((flags & GEDIT_FILE_CHOOSER_FLAG_SAVE) != 0)
{
create_newline_combo (dialog);
}
@@ -559,7 +559,7 @@ gedit_file_chooser_dialog_gtk_create (const gchar *title,
GtkFileChooserAction action;
gboolean select_multiple;
- if ((flags & GEDIT_FILE_CHOOSER_SAVE) != 0)
+ if ((flags & GEDIT_FILE_CHOOSER_FLAG_SAVE) != 0)
{
action = GTK_FILE_CHOOSER_ACTION_SAVE;
select_multiple = FALSE;
diff --git a/gedit/gedit-file-chooser-dialog-osx.m b/gedit/gedit-file-chooser-dialog-osx.m
index 105961464..e757ee86d 100644
--- a/gedit/gedit-file-chooser-dialog-osx.m
+++ b/gedit/gedit-file-chooser-dialog-osx.m
@@ -402,7 +402,7 @@ fill_encodings (GeditFileChooserDialogOSX *dialog)
{
i++;
- if ((dialog->flags & GEDIT_FILE_CHOOSER_OPEN) != 0 && first == 0)
+ if ((dialog->flags & GEDIT_FILE_CHOOSER_FLAG_OPEN) != 0 && first == 0)
{
first = i;
}
@@ -554,7 +554,7 @@ create_encoding_combo (GeditFileChooserDialogOSX *dialog,
menu = [button menu];
- if ((dialog->flags & GEDIT_FILE_CHOOSER_OPEN) != 0)
+ if ((dialog->flags & GEDIT_FILE_CHOOSER_FLAG_OPEN) != 0)
{
NSString *title;
@@ -666,7 +666,7 @@ create_extra_widget (GeditFileChooserDialogOSX *dialog)
minw += create_encoding_combo (dialog, container);
- if ((dialog->flags & GEDIT_FILE_CHOOSER_SAVE) != 0)
+ if ((dialog->flags & GEDIT_FILE_CHOOSER_FLAG_SAVE) != 0)
{
minw += create_newline_combo (dialog, container);
}
@@ -870,7 +870,7 @@ gedit_file_chooser_dialog_osx_create (const gchar *title,
ret = g_object_new (GEDIT_TYPE_FILE_CHOOSER_DIALOG_OSX, NULL);
- if ((flags & GEDIT_FILE_CHOOSER_SAVE) != 0)
+ if ((flags & GEDIT_FILE_CHOOSER_FLAG_SAVE) != 0)
{
NSSavePanel *panel = [[NSSavePanel savePanel] retain];
diff --git a/gedit/gedit-file-chooser-dialog.h b/gedit/gedit-file-chooser-dialog.h
index 98df302fa..03112e8db 100644
--- a/gedit/gedit-file-chooser-dialog.h
+++ b/gedit/gedit-file-chooser-dialog.h
@@ -21,14 +21,15 @@
#ifndef GEDIT_FILE_CHOOSER_DIALOG_H
#define GEDIT_FILE_CHOOSER_DIALOG_H
-#include <gtk/gtk.h>
#include <gtksourceview/gtksource.h>
G_BEGIN_DECLS
#define GEDIT_TYPE_FILE_CHOOSER_DIALOG (gedit_file_chooser_dialog_get_type ())
-G_DECLARE_INTERFACE (GeditFileChooserDialog, gedit_file_chooser_dialog, GEDIT, FILE_CHOOSER_DIALOG, GObject)
+G_DECLARE_INTERFACE (GeditFileChooserDialog, gedit_file_chooser_dialog,
+ GEDIT, FILE_CHOOSER_DIALOG,
+ GObject)
struct _GeditFileChooserDialogInterface
{
@@ -77,8 +78,8 @@ struct _GeditFileChooserDialogInterface
typedef enum
{
- GEDIT_FILE_CHOOSER_SAVE = 1 << 0,
- GEDIT_FILE_CHOOSER_OPEN = 1 << 1
+ GEDIT_FILE_CHOOSER_FLAG_SAVE = 1 << 0,
+ GEDIT_FILE_CHOOSER_FLAG_OPEN = 1 << 1
} GeditFileChooserFlags;
GeditFileChooserDialog *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]