Clean up remaining deprecated preprocessor commands
This commit is contained in:
parent
36b625be6a
commit
7e6a888e1d
|
@ -60,8 +60,6 @@
|
||||||
#define XED_PAGE_SETUP_FILE "xed-page-setup"
|
#define XED_PAGE_SETUP_FILE "xed-page-setup"
|
||||||
#define XED_PRINT_SETTINGS_FILE "xed-print-settings"
|
#define XED_PRINT_SETTINGS_FILE "xed-print-settings"
|
||||||
|
|
||||||
#define XED_APP_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_APP, XedAppPrivate))
|
|
||||||
|
|
||||||
/* Properties */
|
/* Properties */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -92,7 +90,7 @@ struct _XedAppPrivate
|
||||||
GApplicationCommandLine *command_line;
|
GApplicationCommandLine *command_line;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (XedApp, xed_app, GTK_TYPE_APPLICATION)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedApp, xed_app, GTK_TYPE_APPLICATION)
|
||||||
|
|
||||||
static const GOptionEntry options[] =
|
static const GOptionEntry options[] =
|
||||||
{
|
{
|
||||||
|
@ -893,8 +891,6 @@ xed_app_class_init (XedAppClass *klass)
|
||||||
app_class->handle_local_options = xed_app_handle_local_options;
|
app_class->handle_local_options = xed_app_handle_local_options;
|
||||||
app_class->open = xed_app_open;
|
app_class->open = xed_app_open;
|
||||||
app_class->shutdown = xed_app_shutdown;
|
app_class->shutdown = xed_app_shutdown;
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof (XedAppPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -987,7 +983,7 @@ setup_actions (XedApp *app)
|
||||||
static void
|
static void
|
||||||
xed_app_init (XedApp *app)
|
xed_app_init (XedApp *app)
|
||||||
{
|
{
|
||||||
app->priv = XED_APP_GET_PRIVATE (app);
|
app->priv = xed_app_get_instance_private (app);
|
||||||
|
|
||||||
g_set_application_name ("xed");
|
g_set_application_name ("xed");
|
||||||
gtk_window_set_default_icon_name ("accessories-text-editor");
|
gtk_window_set_default_icon_name ("accessories-text-editor");
|
||||||
|
|
|
@ -70,15 +70,11 @@ struct _XedCloseConfirmationDialogPrivate
|
||||||
GtkTreeModel *list_store;
|
GtkTreeModel *list_store;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define XED_CLOSE_CONFIRMATION_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
|
|
||||||
XED_TYPE_CLOSE_CONFIRMATION_DIALOG, \
|
|
||||||
XedCloseConfirmationDialogPrivate))
|
|
||||||
|
|
||||||
#define GET_MODE(priv) (((priv->unsaved_documents != NULL) && \
|
#define GET_MODE(priv) (((priv->unsaved_documents != NULL) && \
|
||||||
(priv->unsaved_documents->next == NULL)) ? \
|
(priv->unsaved_documents->next == NULL)) ? \
|
||||||
SINGLE_DOC_MODE : MULTIPLE_DOCS_MODE)
|
SINGLE_DOC_MODE : MULTIPLE_DOCS_MODE)
|
||||||
|
|
||||||
G_DEFINE_TYPE(XedCloseConfirmationDialog, xed_close_confirmation_dialog, GTK_TYPE_DIALOG)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedCloseConfirmationDialog, xed_close_confirmation_dialog, GTK_TYPE_DIALOG)
|
||||||
|
|
||||||
static void set_unsaved_document (XedCloseConfirmationDialog *dlg,
|
static void set_unsaved_document (XedCloseConfirmationDialog *dlg,
|
||||||
const GList *list);
|
const GList *list);
|
||||||
|
@ -175,7 +171,7 @@ xed_close_confirmation_dialog_init (XedCloseConfirmationDialog *dlg)
|
||||||
{
|
{
|
||||||
AtkObject *atk_obj;
|
AtkObject *atk_obj;
|
||||||
|
|
||||||
dlg->priv = XED_CLOSE_CONFIRMATION_DIALOG_GET_PRIVATE (dlg);
|
dlg->priv = xed_close_confirmation_dialog_get_instance_private (dlg);
|
||||||
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (dlg), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (dlg), 5);
|
||||||
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))), 14);
|
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))), 14);
|
||||||
|
@ -276,8 +272,6 @@ xed_close_confirmation_dialog_class_init (XedCloseConfirmationDialogClass *klass
|
||||||
gobject_class->get_property = xed_close_confirmation_dialog_get_property;
|
gobject_class->get_property = xed_close_confirmation_dialog_get_property;
|
||||||
gobject_class->finalize = xed_close_confirmation_dialog_finalize;
|
gobject_class->finalize = xed_close_confirmation_dialog_finalize;
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (XedCloseConfirmationDialogPrivate));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_UNSAVED_DOCUMENTS,
|
PROP_UNSAVED_DOCUMENTS,
|
||||||
g_param_spec_pointer ("unsaved_documents",
|
g_param_spec_pointer ("unsaved_documents",
|
||||||
|
|
|
@ -35,11 +35,6 @@
|
||||||
#include "xed-utils.h"
|
#include "xed-utils.h"
|
||||||
#include "xed-notebook.h"
|
#include "xed-notebook.h"
|
||||||
|
|
||||||
|
|
||||||
#define XED_DOCUMENTS_PANEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
|
|
||||||
XED_TYPE_DOCUMENTS_PANEL, \
|
|
||||||
XedDocumentsPanelPrivate))
|
|
||||||
|
|
||||||
struct _XedDocumentsPanelPrivate
|
struct _XedDocumentsPanelPrivate
|
||||||
{
|
{
|
||||||
XedWindow *window;
|
XedWindow *window;
|
||||||
|
@ -51,7 +46,7 @@ struct _XedDocumentsPanelPrivate
|
||||||
guint is_reodering : 1;
|
guint is_reodering : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (XedDocumentsPanel, xed_documents_panel, GTK_TYPE_BOX)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedDocumentsPanel, xed_documents_panel, GTK_TYPE_BOX)
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -401,7 +396,7 @@ xed_documents_panel_get_property (GObject *object,
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_WINDOW:
|
case PROP_WINDOW:
|
||||||
g_value_set_object (value, XED_DOCUMENTS_PANEL_GET_PRIVATE (panel)->window);
|
g_value_set_object (value, panel->priv->window);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
@ -452,8 +447,6 @@ xed_documents_panel_class_init (XedDocumentsPanelClass *klass)
|
||||||
G_PARAM_READWRITE |
|
G_PARAM_READWRITE |
|
||||||
G_PARAM_CONSTRUCT_ONLY |
|
G_PARAM_CONSTRUCT_ONLY |
|
||||||
G_PARAM_STATIC_STRINGS));
|
G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof (XedDocumentsPanelPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkTreePath *
|
static GtkTreePath *
|
||||||
|
@ -673,7 +666,7 @@ xed_documents_panel_init (XedDocumentsPanel *panel)
|
||||||
GtkCellRenderer *cell;
|
GtkCellRenderer *cell;
|
||||||
GtkTreeSelection *selection;
|
GtkTreeSelection *selection;
|
||||||
|
|
||||||
panel->priv = XED_DOCUMENTS_PANEL_GET_PRIVATE (panel);
|
panel->priv = xed_documents_panel_get_instance_private (panel);
|
||||||
|
|
||||||
panel->priv->adding_tab = FALSE;
|
panel->priv->adding_tab = FALSE;
|
||||||
panel->priv->is_reodering = FALSE;
|
panel->priv->is_reodering = FALSE;
|
||||||
|
|
|
@ -37,10 +37,6 @@
|
||||||
#include "xed-settings.h"
|
#include "xed-settings.h"
|
||||||
#include "xed-utils.h"
|
#include "xed-utils.h"
|
||||||
|
|
||||||
#define XED_ENCODINGS_COMBO_BOX_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
|
|
||||||
XED_TYPE_ENCODINGS_COMBO_BOX, \
|
|
||||||
XedEncodingsComboBoxPrivate))
|
|
||||||
|
|
||||||
struct _XedEncodingsComboBoxPrivate
|
struct _XedEncodingsComboBoxPrivate
|
||||||
{
|
{
|
||||||
GSettings *enc_settings;
|
GSettings *enc_settings;
|
||||||
|
@ -69,7 +65,7 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE(XedEncodingsComboBox, xed_encodings_combo_box, GTK_TYPE_COMBO_BOX)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedEncodingsComboBox, xed_encodings_combo_box, GTK_TYPE_COMBO_BOX)
|
||||||
|
|
||||||
static void update_menu (XedEncodingsComboBox *combo_box);
|
static void update_menu (XedEncodingsComboBox *combo_box);
|
||||||
|
|
||||||
|
@ -147,8 +143,6 @@ xed_encodings_combo_box_class_init (XedEncodingsComboBoxClass *klass)
|
||||||
G_PARAM_READWRITE |
|
G_PARAM_READWRITE |
|
||||||
G_PARAM_CONSTRUCT |
|
G_PARAM_CONSTRUCT |
|
||||||
G_PARAM_STATIC_STRINGS));
|
G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof (XedEncodingsComboBoxPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -358,7 +352,7 @@ xed_encodings_combo_box_init (XedEncodingsComboBox *menu)
|
||||||
{
|
{
|
||||||
GtkCellRenderer *text_renderer;
|
GtkCellRenderer *text_renderer;
|
||||||
|
|
||||||
menu->priv = XED_ENCODINGS_COMBO_BOX_GET_PRIVATE (menu);
|
menu->priv = xed_encodings_combo_box_get_instance_private (menu);
|
||||||
|
|
||||||
menu->priv->enc_settings = g_settings_new ("org.x.editor.preferences.encodings");
|
menu->priv->enc_settings = g_settings_new ("org.x.editor.preferences.encodings");
|
||||||
menu->priv->store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN);
|
menu->priv->store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN);
|
||||||
|
|
|
@ -39,10 +39,6 @@
|
||||||
#include "xed-dirs.h"
|
#include "xed-dirs.h"
|
||||||
#include "xed-settings.h"
|
#include "xed-settings.h"
|
||||||
|
|
||||||
#define XED_ENCODINGS_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
|
|
||||||
XED_TYPE_ENCODINGS_DIALOG, \
|
|
||||||
XedEncodingsDialogPrivate))
|
|
||||||
|
|
||||||
struct _XedEncodingsDialogPrivate
|
struct _XedEncodingsDialogPrivate
|
||||||
{
|
{
|
||||||
GSettings *enc_settings;
|
GSettings *enc_settings;
|
||||||
|
@ -58,7 +54,7 @@ struct _XedEncodingsDialogPrivate
|
||||||
GSList *show_in_menu_list;
|
GSList *show_in_menu_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(XedEncodingsDialog, xed_encodings_dialog, GTK_TYPE_DIALOG)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedEncodingsDialog, xed_encodings_dialog, GTK_TYPE_DIALOG)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xed_encodings_dialog_finalize (GObject *object)
|
xed_encodings_dialog_finalize (GObject *object)
|
||||||
|
@ -87,8 +83,6 @@ xed_encodings_dialog_class_init (XedEncodingsDialogClass *klass)
|
||||||
|
|
||||||
object_class->finalize = xed_encodings_dialog_finalize;
|
object_class->finalize = xed_encodings_dialog_finalize;
|
||||||
object_class->dispose = xed_encodings_dialog_dispose;
|
object_class->dispose = xed_encodings_dialog_dispose;
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof (XedEncodingsDialogPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -329,7 +323,7 @@ xed_encodings_dialog_init (XedEncodingsDialog *dlg)
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
dlg->priv = XED_ENCODINGS_DIALOG_GET_PRIVATE (dlg);
|
dlg->priv = xed_encodings_dialog_get_instance_private (dlg);
|
||||||
dlg->priv->enc_settings = g_settings_new ("org.x.editor.preferences.encodings");
|
dlg->priv->enc_settings = g_settings_new ("org.x.editor.preferences.encodings");
|
||||||
|
|
||||||
gtk_dialog_add_buttons (GTK_DIALOG (dlg),
|
gtk_dialog_add_buttons (GTK_DIALOG (dlg),
|
||||||
|
|
|
@ -41,8 +41,6 @@
|
||||||
#include "xed-enum-types.h"
|
#include "xed-enum-types.h"
|
||||||
#include "xed-settings.h"
|
#include "xed-settings.h"
|
||||||
|
|
||||||
#define XED_FILE_CHOOSER_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_FILE_CHOOSER_DIALOG, XedFileChooserDialogPrivate))
|
|
||||||
|
|
||||||
#define ALL_FILES _("All Files")
|
#define ALL_FILES _("All Files")
|
||||||
#define ALL_TEXT_FILES _("All Text Files")
|
#define ALL_TEXT_FILES _("All Text Files")
|
||||||
|
|
||||||
|
@ -58,7 +56,7 @@ struct _XedFileChooserDialogPrivate
|
||||||
GtkListStore *newline_store;
|
GtkListStore *newline_store;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(XedFileChooserDialog, xed_file_chooser_dialog, GTK_TYPE_FILE_CHOOSER_DIALOG)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedFileChooserDialog, xed_file_chooser_dialog, GTK_TYPE_FILE_CHOOSER_DIALOG)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xed_file_chooser_dialog_dispose (GObject *object)
|
xed_file_chooser_dialog_dispose (GObject *object)
|
||||||
|
@ -76,8 +74,6 @@ xed_file_chooser_dialog_class_init (XedFileChooserDialogClass *klass)
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->dispose = xed_file_chooser_dialog_dispose;
|
object_class->dispose = xed_file_chooser_dialog_dispose;
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof(XedFileChooserDialogPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -324,7 +320,7 @@ all_text_files_filter (const GtkFileFilterInfo *filter_info,
|
||||||
static void
|
static void
|
||||||
xed_file_chooser_dialog_init (XedFileChooserDialog *dialog)
|
xed_file_chooser_dialog_init (XedFileChooserDialog *dialog)
|
||||||
{
|
{
|
||||||
dialog->priv = XED_FILE_CHOOSER_DIALOG_GET_PRIVATE (dialog);
|
dialog->priv = xed_file_chooser_dialog_get_instance_private (dialog);
|
||||||
|
|
||||||
dialog->priv->filter_settings = g_settings_new ("org.x.editor.state.file-filter");
|
dialog->priv->filter_settings = g_settings_new ("org.x.editor.state.file-filter");
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,10 +47,6 @@ enum
|
||||||
|
|
||||||
#define XED_HISTORY_ENTRY_HISTORY_LENGTH_DEFAULT 10
|
#define XED_HISTORY_ENTRY_HISTORY_LENGTH_DEFAULT 10
|
||||||
|
|
||||||
#define XED_HISTORY_ENTRY_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
|
|
||||||
XED_TYPE_HISTORY_ENTRY, \
|
|
||||||
XedHistoryEntryPrivate))
|
|
||||||
|
|
||||||
struct _XedHistoryEntryPrivate
|
struct _XedHistoryEntryPrivate
|
||||||
{
|
{
|
||||||
gchar *history_id;
|
gchar *history_id;
|
||||||
|
@ -59,7 +55,7 @@ struct _XedHistoryEntryPrivate
|
||||||
GSettings *settings;
|
GSettings *settings;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(XedHistoryEntry, xed_history_entry, GTK_TYPE_COMBO_BOX_TEXT)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedHistoryEntry, xed_history_entry, GTK_TYPE_COMBO_BOX_TEXT)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xed_history_entry_set_property (GObject *object,
|
xed_history_entry_set_property (GObject *object,
|
||||||
|
@ -167,8 +163,6 @@ xed_history_entry_class_init (XedHistoryEntryClass *klass)
|
||||||
G_PARAM_STATIC_STRINGS));
|
G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
/* TODO: Add enable-completion property */
|
/* TODO: Add enable-completion property */
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof(XedHistoryEntryPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkListStore *
|
static GtkListStore *
|
||||||
|
@ -384,7 +378,7 @@ xed_history_entry_init (XedHistoryEntry *entry)
|
||||||
{
|
{
|
||||||
XedHistoryEntryPrivate *priv;
|
XedHistoryEntryPrivate *priv;
|
||||||
|
|
||||||
priv = XED_HISTORY_ENTRY_GET_PRIVATE (entry);
|
priv = xed_history_entry_get_instance_private (entry);
|
||||||
entry->priv = priv;
|
entry->priv = priv;
|
||||||
|
|
||||||
priv->history_id = NULL;
|
priv->history_id = NULL;
|
||||||
|
|
|
@ -90,8 +90,6 @@
|
||||||
* </example>
|
* </example>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define XED_MESSAGE_BUS_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), XED_TYPE_MESSAGE_BUS, XedMessageBusPrivate))
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
gchar *object_path;
|
gchar *object_path;
|
||||||
|
@ -143,7 +141,7 @@ static guint message_bus_signals[LAST_SIGNAL] = { 0 };
|
||||||
static void xed_message_bus_dispatch_real (XedMessageBus *bus,
|
static void xed_message_bus_dispatch_real (XedMessageBus *bus,
|
||||||
XedMessage *message);
|
XedMessage *message);
|
||||||
|
|
||||||
G_DEFINE_TYPE (XedMessageBus, xed_message_bus, G_TYPE_OBJECT)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedMessageBus, xed_message_bus, G_TYPE_OBJECT)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
listener_free (Listener *listener)
|
listener_free (Listener *listener)
|
||||||
|
@ -264,8 +262,6 @@ xed_message_bus_class_init (XedMessageBusClass *klass)
|
||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
1,
|
1,
|
||||||
XED_TYPE_MESSAGE_TYPE);
|
XED_TYPE_MESSAGE_TYPE);
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof(XedMessageBusPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Message *
|
static Message *
|
||||||
|
@ -506,7 +502,7 @@ process_by_match (XedMessageBus *bus,
|
||||||
static void
|
static void
|
||||||
xed_message_bus_init (XedMessageBus *self)
|
xed_message_bus_init (XedMessageBus *self)
|
||||||
{
|
{
|
||||||
self->priv = XED_MESSAGE_BUS_GET_PRIVATE (self);
|
self->priv = xed_message_bus_get_instance_private (self);
|
||||||
|
|
||||||
self->priv->messages = g_hash_table_new_full (g_str_hash,
|
self->priv->messages = g_hash_table_new_full (g_str_hash,
|
||||||
g_str_equal,
|
g_str_equal,
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
* who is the sender and who is the receiver. There is no explicit distinction
|
* who is the sender and who is the receiver. There is no explicit distinction
|
||||||
* between methods and signals.
|
* between methods and signals.
|
||||||
*/
|
*/
|
||||||
#define XED_MESSAGE_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), XED_TYPE_MESSAGE, XedMessagePrivate))
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PROP_0,
|
PROP_0,
|
||||||
|
@ -36,7 +35,7 @@ struct _XedMessagePrivate
|
||||||
GHashTable *values;
|
GHashTable *values;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (XedMessage, xed_message, G_TYPE_OBJECT)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedMessage, xed_message, G_TYPE_OBJECT)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xed_message_finalize (GObject *object)
|
xed_message_finalize (GObject *object)
|
||||||
|
@ -163,8 +162,6 @@ xed_message_class_init (XedMessageClass *klass)
|
||||||
G_PARAM_READWRITE |
|
G_PARAM_READWRITE |
|
||||||
G_PARAM_CONSTRUCT_ONLY |
|
G_PARAM_CONSTRUCT_ONLY |
|
||||||
G_PARAM_STATIC_STRINGS));
|
G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof(XedMessagePrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -177,7 +174,7 @@ destroy_value (GValue *value)
|
||||||
static void
|
static void
|
||||||
xed_message_init (XedMessage *self)
|
xed_message_init (XedMessage *self)
|
||||||
{
|
{
|
||||||
self->priv = XED_MESSAGE_GET_PRIVATE (self);
|
self->priv = xed_message_get_instance_private (self);
|
||||||
|
|
||||||
self->priv->values = g_hash_table_new_full (g_str_hash,
|
self->priv->values = g_hash_table_new_full (g_str_hash,
|
||||||
g_str_equal,
|
g_str_equal,
|
||||||
|
|
|
@ -49,8 +49,6 @@
|
||||||
#define AFTER_ALL_TABS -1
|
#define AFTER_ALL_TABS -1
|
||||||
#define NOT_IN_APP_WINDOWS -2
|
#define NOT_IN_APP_WINDOWS -2
|
||||||
|
|
||||||
#define XED_NOTEBOOK_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_NOTEBOOK, XedNotebookPrivate))
|
|
||||||
|
|
||||||
struct _XedNotebookPrivate
|
struct _XedNotebookPrivate
|
||||||
{
|
{
|
||||||
GSettings *ui_settings;
|
GSettings *ui_settings;
|
||||||
|
@ -65,7 +63,7 @@ struct _XedNotebookPrivate
|
||||||
guint destroy_has_run : 1;
|
guint destroy_has_run : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(XedNotebook, xed_notebook, GTK_TYPE_NOTEBOOK)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedNotebook, xed_notebook, GTK_TYPE_NOTEBOOK)
|
||||||
|
|
||||||
static void xed_notebook_finalize (GObject *object);
|
static void xed_notebook_finalize (GObject *object);
|
||||||
|
|
||||||
|
@ -178,8 +176,6 @@ xed_notebook_class_init (XedNotebookClass *klass)
|
||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
1,
|
1,
|
||||||
XED_TYPE_TAB);
|
XED_TYPE_TAB);
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof(XedNotebookPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static XedNotebook *
|
static XedNotebook *
|
||||||
|
@ -709,7 +705,7 @@ xed_notebook_switch_page_cb (GtkNotebook *notebook,
|
||||||
static void
|
static void
|
||||||
xed_notebook_init (XedNotebook *notebook)
|
xed_notebook_init (XedNotebook *notebook)
|
||||||
{
|
{
|
||||||
notebook->priv = XED_NOTEBOOK_GET_PRIVATE (notebook);
|
notebook->priv = xed_notebook_get_instance_private (notebook);
|
||||||
|
|
||||||
notebook->priv->close_buttons_sensitive = TRUE;
|
notebook->priv->close_buttons_sensitive = TRUE;
|
||||||
notebook->priv->tab_drag_and_drop_enabled = TRUE;
|
notebook->priv->tab_drag_and_drop_enabled = TRUE;
|
||||||
|
|
|
@ -41,8 +41,6 @@
|
||||||
|
|
||||||
#define PANEL_ITEM_KEY "XedPanelItemKey"
|
#define PANEL_ITEM_KEY "XedPanelItemKey"
|
||||||
|
|
||||||
#define XED_PANEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_PANEL, XedPanelPrivate))
|
|
||||||
|
|
||||||
struct _XedPanelPrivate
|
struct _XedPanelPrivate
|
||||||
{
|
{
|
||||||
GtkOrientation orientation;
|
GtkOrientation orientation;
|
||||||
|
@ -83,7 +81,7 @@ static GObject *xed_panel_constructor (GType type,
|
||||||
GObjectConstructParam *construct_properties);
|
GObjectConstructParam *construct_properties);
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (XedPanel, xed_panel, GTK_TYPE_BIN)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedPanel, xed_panel, GTK_TYPE_BIN)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xed_panel_finalize (GObject *obj)
|
xed_panel_finalize (GObject *obj)
|
||||||
|
@ -239,8 +237,6 @@ xed_panel_class_init (XedPanelClass *klass)
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (XedPanelPrivate));
|
|
||||||
|
|
||||||
object_class->constructor = xed_panel_constructor;
|
object_class->constructor = xed_panel_constructor;
|
||||||
object_class->finalize = xed_panel_finalize;
|
object_class->finalize = xed_panel_finalize;
|
||||||
object_class->get_property = xed_panel_get_property;
|
object_class->get_property = xed_panel_get_property;
|
||||||
|
@ -319,7 +315,7 @@ xed_panel_class_init (XedPanelClass *klass)
|
||||||
static void
|
static void
|
||||||
xed_panel_init (XedPanel *panel)
|
xed_panel_init (XedPanel *panel)
|
||||||
{
|
{
|
||||||
panel->priv = XED_PANEL_GET_PRIVATE (panel);
|
panel->priv = xed_panel_get_instance_private (panel);
|
||||||
|
|
||||||
panel->priv->main_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
panel->priv->main_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
gtk_widget_show (panel->priv->main_box);
|
gtk_widget_show (panel->priv->main_box);
|
||||||
|
|
|
@ -40,13 +40,13 @@
|
||||||
#include "xed-settings.h"
|
#include "xed-settings.h"
|
||||||
#include "xed-utils.h"
|
#include "xed-utils.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (XedPluginsEngine, xed_plugins_engine, PEAS_TYPE_ENGINE)
|
|
||||||
|
|
||||||
struct _XedPluginsEnginePrivate
|
struct _XedPluginsEnginePrivate
|
||||||
{
|
{
|
||||||
GSettings *plugin_settings;
|
GSettings *plugin_settings;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
G_DEFINE_TYPE_WITH_PRIVATE (XedPluginsEngine, xed_plugins_engine, PEAS_TYPE_ENGINE)
|
||||||
|
|
||||||
XedPluginsEngine *default_engine = NULL;
|
XedPluginsEngine *default_engine = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -58,7 +58,7 @@ xed_plugins_engine_init (XedPluginsEngine *engine)
|
||||||
|
|
||||||
xed_debug (DEBUG_PLUGINS);
|
xed_debug (DEBUG_PLUGINS);
|
||||||
|
|
||||||
engine->priv = G_TYPE_INSTANCE_GET_PRIVATE (engine, XED_TYPE_PLUGINS_ENGINE, XedPluginsEnginePrivate);
|
engine->priv = xed_plugins_engine_get_instance_private (engine);
|
||||||
|
|
||||||
engine->priv->plugin_settings = g_settings_new ("org.x.editor.plugins");
|
engine->priv->plugin_settings = g_settings_new ("org.x.editor.plugins");
|
||||||
|
|
||||||
|
@ -142,8 +142,6 @@ xed_plugins_engine_class_init (XedPluginsEngineClass *klass)
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->dispose = xed_plugins_engine_dispose;
|
object_class->dispose = xed_plugins_engine_dispose;
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (XedPluginsEnginePrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
XedPluginsEngine *
|
XedPluginsEngine *
|
||||||
|
|
|
@ -41,11 +41,6 @@
|
||||||
#include "xed-dirs.h"
|
#include "xed-dirs.h"
|
||||||
#include "xed-settings.h"
|
#include "xed-settings.h"
|
||||||
|
|
||||||
|
|
||||||
#define XED_PRINT_JOB_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
|
|
||||||
XED_TYPE_PRINT_JOB, \
|
|
||||||
XedPrintJobPrivate))
|
|
||||||
|
|
||||||
struct _XedPrintJobPrivate
|
struct _XedPrintJobPrivate
|
||||||
{
|
{
|
||||||
GSettings *print_settings;
|
GSettings *print_settings;
|
||||||
|
@ -103,7 +98,7 @@ enum
|
||||||
|
|
||||||
static guint print_job_signals[LAST_SIGNAL] = { 0 };
|
static guint print_job_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
G_DEFINE_TYPE (XedPrintJob, xed_print_job, G_TYPE_OBJECT)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedPrintJob, xed_print_job, G_TYPE_OBJECT)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_view (XedPrintJob *job,
|
set_view (XedPrintJob *job,
|
||||||
|
@ -236,8 +231,6 @@ xed_print_job_class_init (XedPrintJobClass *klass)
|
||||||
2,
|
2,
|
||||||
G_TYPE_UINT,
|
G_TYPE_UINT,
|
||||||
G_TYPE_POINTER);
|
G_TYPE_POINTER);
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof (XedPrintJobPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -731,7 +724,7 @@ xed_print_job_print (XedPrintJob *job,
|
||||||
static void
|
static void
|
||||||
xed_print_job_init (XedPrintJob *job)
|
xed_print_job_init (XedPrintJob *job)
|
||||||
{
|
{
|
||||||
job->priv = XED_PRINT_JOB_GET_PRIVATE (job);
|
job->priv = xed_print_job_get_instance_private (job);
|
||||||
|
|
||||||
job->priv->print_settings = g_settings_new ("org.x.editor.preferences.print");
|
job->priv->print_settings = g_settings_new ("org.x.editor.preferences.print");
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ struct _XedPrintPreviewPrivate
|
||||||
guint cur_page;
|
guint cur_page;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (XedPrintPreview, xed_print_preview, GTK_TYPE_BOX)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedPrintPreview, xed_print_preview, GTK_TYPE_BOX)
|
||||||
|
|
||||||
static void goto_page (XedPrintPreview *preview,
|
static void goto_page (XedPrintPreview *preview,
|
||||||
gint page);
|
gint page);
|
||||||
|
@ -150,8 +150,6 @@ xed_print_preview_class_init (XedPrintPreviewClass *klass)
|
||||||
object_class->finalize = xed_print_preview_finalize;
|
object_class->finalize = xed_print_preview_finalize;
|
||||||
|
|
||||||
widget_class->grab_focus = xed_print_preview_grab_focus;
|
widget_class->grab_focus = xed_print_preview_grab_focus;
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof(XedPrintPreviewPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1003,7 +1001,7 @@ xed_print_preview_init (XedPrintPreview *preview)
|
||||||
{
|
{
|
||||||
XedPrintPreviewPrivate *priv;
|
XedPrintPreviewPrivate *priv;
|
||||||
|
|
||||||
priv = G_TYPE_INSTANCE_GET_PRIVATE (preview, XED_TYPE_PRINT_PREVIEW, XedPrintPreviewPrivate);
|
priv = xed_print_preview_get_instance_private (preview);
|
||||||
|
|
||||||
preview->priv = priv;
|
preview->priv = priv;
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,6 @@ enum
|
||||||
PROP_HAS_CANCEL_BUTTON
|
PROP_HAS_CANCEL_BUTTON
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#define XED_PROGRESS_INFO_BAR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_PROGRESS_INFO_BAR, XedProgressInfoBarPrivate))
|
|
||||||
|
|
||||||
struct _XedProgressInfoBarPrivate
|
struct _XedProgressInfoBarPrivate
|
||||||
{
|
{
|
||||||
GtkWidget *image;
|
GtkWidget *image;
|
||||||
|
@ -53,7 +50,7 @@ struct _XedProgressInfoBarPrivate
|
||||||
GtkWidget *progress;
|
GtkWidget *progress;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(XedProgressInfoBar, xed_progress_info_bar, GTK_TYPE_INFO_BAR)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedProgressInfoBar, xed_progress_info_bar, GTK_TYPE_INFO_BAR)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xed_progress_info_bar_set_has_cancel_button (XedProgressInfoBar *bar,
|
xed_progress_info_bar_set_has_cancel_button (XedProgressInfoBar *bar,
|
||||||
|
@ -119,8 +116,6 @@ xed_progress_info_bar_class_init (XedProgressInfoBarClass *klass)
|
||||||
G_PARAM_WRITABLE |
|
G_PARAM_WRITABLE |
|
||||||
G_PARAM_CONSTRUCT_ONLY |
|
G_PARAM_CONSTRUCT_ONLY |
|
||||||
G_PARAM_STATIC_STRINGS));
|
G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_type_class_add_private (gobject_class, sizeof (XedProgressInfoBarPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -130,7 +125,7 @@ xed_progress_info_bar_init (XedProgressInfoBar *bar)
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *content;
|
GtkWidget *content;
|
||||||
|
|
||||||
bar->priv = XED_PROGRESS_INFO_BAR_GET_PRIVATE (bar);
|
bar->priv = xed_progress_info_bar_get_instance_private (bar);
|
||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
#include "xed-commands.h"
|
#include "xed-commands.h"
|
||||||
#include "xed-window-private.h"
|
#include "xed-window-private.h"
|
||||||
|
|
||||||
#define XED_SEARCHBAR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_SEARCHBAR, XedSearchbarPrivate))
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SHOW_REPLACE,
|
SHOW_REPLACE,
|
||||||
|
@ -49,7 +47,7 @@ struct _XedSearchbarPrivate
|
||||||
guint update_occurrence_count_id;
|
guint update_occurrence_count_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(XedSearchbar, xed_searchbar, GTK_TYPE_BOX)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedSearchbar, xed_searchbar, GTK_TYPE_BOX)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xed_searchbar_dispose (GObject *object)
|
xed_searchbar_dispose (GObject *object)
|
||||||
|
@ -73,8 +71,6 @@ xed_searchbar_class_init (XedSearchbarClass *klass)
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->dispose = xed_searchbar_dispose;
|
object_class->dispose = xed_searchbar_dispose;
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof(XedSearchbarPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define XED_SEARCHBAR_KEY "xed-searchbar-key"
|
#define XED_SEARCHBAR_KEY "xed-searchbar-key"
|
||||||
|
@ -669,7 +665,7 @@ xed_searchbar_init (XedSearchbar *searchbar)
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
gchar *root_objects[] = { "searchbar_content", NULL };
|
gchar *root_objects[] = { "searchbar_content", NULL };
|
||||||
|
|
||||||
searchbar->priv = XED_SEARCHBAR_GET_PRIVATE (searchbar);
|
searchbar->priv = xed_searchbar_get_instance_private (searchbar);
|
||||||
|
|
||||||
builder = gtk_builder_new ();
|
builder = gtk_builder_new ();
|
||||||
gtk_builder_add_objects_from_resource (builder, "/org/x/editor/ui/xed-searchbar.ui", root_objects, NULL);
|
gtk_builder_add_objects_from_resource (builder, "/org/x/editor/ui/xed-searchbar.ui", root_objects, NULL);
|
||||||
|
|
|
@ -38,8 +38,6 @@
|
||||||
|
|
||||||
#define XED_SETTINGS_SYSTEM_FONT "monospace-font-name"
|
#define XED_SETTINGS_SYSTEM_FONT "monospace-font-name"
|
||||||
|
|
||||||
#define XED_SETTINGS_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), XED_TYPE_SETTINGS, XedSettingsPrivate))
|
|
||||||
|
|
||||||
struct _XedSettingsPrivate
|
struct _XedSettingsPrivate
|
||||||
{
|
{
|
||||||
GSettings *interface;
|
GSettings *interface;
|
||||||
|
@ -49,7 +47,7 @@ struct _XedSettingsPrivate
|
||||||
gchar *old_scheme;
|
gchar *old_scheme;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (XedSettings, xed_settings, G_TYPE_OBJECT)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedSettings, xed_settings, G_TYPE_OBJECT)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xed_settings_finalize (GObject *object)
|
xed_settings_finalize (GObject *object)
|
||||||
|
@ -336,7 +334,7 @@ on_max_recents_changed (GSettings *settings,
|
||||||
static void
|
static void
|
||||||
xed_settings_init (XedSettings *xs)
|
xed_settings_init (XedSettings *xs)
|
||||||
{
|
{
|
||||||
xs->priv = XED_SETTINGS_GET_PRIVATE (xs);
|
xs->priv = xed_settings_get_instance_private (xs);
|
||||||
|
|
||||||
xs->priv->old_scheme = NULL;
|
xs->priv->old_scheme = NULL;
|
||||||
xs->priv->editor = g_settings_new ("org.x.editor.preferences.editor");
|
xs->priv->editor = g_settings_new ("org.x.editor.preferences.editor");
|
||||||
|
@ -378,8 +376,6 @@ xed_settings_class_init (XedSettingsClass *klass)
|
||||||
|
|
||||||
object_class->finalize = xed_settings_finalize;
|
object_class->finalize = xed_settings_finalize;
|
||||||
object_class->dispose = xed_settings_dispose;
|
object_class->dispose = xed_settings_dispose;
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof (XedSettingsPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GObject *
|
GObject *
|
||||||
|
|
|
@ -35,10 +35,6 @@
|
||||||
|
|
||||||
#include "xed-statusbar.h"
|
#include "xed-statusbar.h"
|
||||||
|
|
||||||
#define XED_STATUSBAR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object),\
|
|
||||||
XED_TYPE_STATUSBAR,\
|
|
||||||
XedStatusbarPrivate))
|
|
||||||
|
|
||||||
struct _XedStatusbarPrivate
|
struct _XedStatusbarPrivate
|
||||||
{
|
{
|
||||||
GtkWidget *overwrite_mode_label;
|
GtkWidget *overwrite_mode_label;
|
||||||
|
@ -58,7 +54,7 @@ struct _XedStatusbarPrivate
|
||||||
guint flash_message_id;
|
guint flash_message_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(XedStatusbar, xed_statusbar, GTK_TYPE_STATUSBAR)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedStatusbar, xed_statusbar, GTK_TYPE_STATUSBAR)
|
||||||
|
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
|
@ -93,8 +89,6 @@ xed_statusbar_class_init (XedStatusbarClass *klass)
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->dispose = xed_statusbar_dispose;
|
object_class->dispose = xed_statusbar_dispose;
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof (XedStatusbarPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CURSOR_POSITION_LABEL_WIDTH_CHARS 18
|
#define CURSOR_POSITION_LABEL_WIDTH_CHARS 18
|
||||||
|
@ -105,7 +99,7 @@ xed_statusbar_init (XedStatusbar *statusbar)
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *error_image;
|
GtkWidget *error_image;
|
||||||
|
|
||||||
statusbar->priv = XED_STATUSBAR_GET_PRIVATE (statusbar);
|
statusbar->priv = xed_statusbar_get_instance_private (statusbar);
|
||||||
|
|
||||||
gtk_widget_set_margin_top (GTK_WIDGET (statusbar), 0);
|
gtk_widget_set_margin_top (GTK_WIDGET (statusbar), 0);
|
||||||
gtk_widget_set_margin_bottom (GTK_WIDGET (statusbar), 0);
|
gtk_widget_set_margin_bottom (GTK_WIDGET (statusbar), 0);
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
#include "xed-tab-label.h"
|
#include "xed-tab-label.h"
|
||||||
#include "xed-close-button.h"
|
#include "xed-close-button.h"
|
||||||
|
|
||||||
#define XED_TAB_LABEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), XED_TYPE_TAB_LABEL, XedTabLabelPrivate))
|
|
||||||
|
|
||||||
/* Signals */
|
/* Signals */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -57,7 +55,7 @@ struct _XedTabLabelPrivate
|
||||||
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0 };
|
static guint signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
G_DEFINE_TYPE (XedTabLabel, xed_tab_label, GTK_TYPE_BOX)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedTabLabel, xed_tab_label, GTK_TYPE_BOX)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xed_tab_label_finalize (GObject *object)
|
xed_tab_label_finalize (GObject *object)
|
||||||
|
@ -244,8 +242,6 @@ xed_tab_label_class_init (XedTabLabelClass *klass)
|
||||||
XED_TYPE_TAB,
|
XED_TYPE_TAB,
|
||||||
G_PARAM_READWRITE |
|
G_PARAM_READWRITE |
|
||||||
G_PARAM_CONSTRUCT_ONLY));
|
G_PARAM_CONSTRUCT_ONLY));
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof(XedTabLabelPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -258,7 +254,7 @@ xed_tab_label_init (XedTabLabel *tab_label)
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
GtkWidget *dummy_label;
|
GtkWidget *dummy_label;
|
||||||
|
|
||||||
tab_label->priv = XED_TAB_LABEL_GET_PRIVATE (tab_label);
|
tab_label->priv = xed_tab_label_get_instance_private (tab_label);
|
||||||
|
|
||||||
tab_label->priv->close_button_sensitive = TRUE;
|
tab_label->priv->close_button_sensitive = TRUE;
|
||||||
|
|
||||||
|
|
|
@ -46,8 +46,6 @@
|
||||||
#include "xed-settings.h"
|
#include "xed-settings.h"
|
||||||
#include "xed-view-frame.h"
|
#include "xed-view-frame.h"
|
||||||
|
|
||||||
#define XED_TAB_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_TAB, XedTabPrivate))
|
|
||||||
|
|
||||||
#define XED_TAB_KEY "XED_TAB_KEY"
|
#define XED_TAB_KEY "XED_TAB_KEY"
|
||||||
|
|
||||||
struct _XedTabPrivate
|
struct _XedTabPrivate
|
||||||
|
@ -114,7 +112,7 @@ struct _SaverData
|
||||||
guint force_no_backup : 1;
|
guint force_no_backup : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(XedTab, xed_tab, GTK_TYPE_BOX)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedTab, xed_tab, GTK_TYPE_BOX)
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -361,8 +359,6 @@ xed_tab_class_init (XedTabClass *klass)
|
||||||
TRUE,
|
TRUE,
|
||||||
G_PARAM_READABLE |
|
G_PARAM_READABLE |
|
||||||
G_PARAM_STATIC_STRINGS));
|
G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof (XedTabPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1169,7 +1165,7 @@ xed_tab_init (XedTab *tab)
|
||||||
XedView *view;
|
XedView *view;
|
||||||
GtkSourceFile *file;
|
GtkSourceFile *file;
|
||||||
|
|
||||||
tab->priv = XED_TAB_GET_PRIVATE (tab);
|
tab->priv = xed_tab_get_instance_private (tab);
|
||||||
|
|
||||||
tab->priv->editor = g_settings_new ("org.x.editor.preferences.editor");
|
tab->priv->editor = g_settings_new ("org.x.editor.preferences.editor");
|
||||||
tab->priv->state = XED_TAB_STATE_NORMAL;
|
tab->priv->state = XED_TAB_STATE_NORMAL;
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
|
|
||||||
#define XED_VIEW_SCROLL_MARGIN 0.02
|
#define XED_VIEW_SCROLL_MARGIN 0.02
|
||||||
|
|
||||||
#define XED_VIEW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_VIEW, XedViewPrivate))
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
TARGET_URI_LIST = 100
|
TARGET_URI_LIST = 100
|
||||||
|
@ -34,7 +32,7 @@ struct _XedViewPrivate
|
||||||
guint view_realized : 1;
|
guint view_realized : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (XedView, xed_view, GTK_SOURCE_TYPE_VIEW)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedView, xed_view, GTK_SOURCE_TYPE_VIEW)
|
||||||
|
|
||||||
/* Signals */
|
/* Signals */
|
||||||
enum
|
enum
|
||||||
|
@ -111,7 +109,7 @@ xed_view_init (XedView *view)
|
||||||
|
|
||||||
xed_debug (DEBUG_VIEW);
|
xed_debug (DEBUG_VIEW);
|
||||||
|
|
||||||
view->priv = XED_VIEW_GET_PRIVATE (view);
|
view->priv = xed_view_get_instance_private (view);
|
||||||
|
|
||||||
view->priv->editor_settings = g_settings_new ("org.x.editor.preferences.editor");
|
view->priv->editor_settings = g_settings_new ("org.x.editor.preferences.editor");
|
||||||
|
|
||||||
|
@ -600,8 +598,6 @@ xed_view_class_init (XedViewClass *klass)
|
||||||
g_cclosure_marshal_VOID__BOXED,
|
g_cclosure_marshal_VOID__BOXED,
|
||||||
G_TYPE_NONE, 1, G_TYPE_STRV);
|
G_TYPE_NONE, 1, G_TYPE_STRV);
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (XedViewPrivate));
|
|
||||||
|
|
||||||
binding_set = gtk_binding_set_by_class (klass);
|
binding_set = gtk_binding_set_by_class (klass);
|
||||||
|
|
||||||
gtk_binding_entry_add_signal (binding_set,
|
gtk_binding_entry_add_signal (binding_set,
|
||||||
|
|
|
@ -36,8 +36,6 @@
|
||||||
#define XED_WINDOW_DEFAULT_WIDTH 650
|
#define XED_WINDOW_DEFAULT_WIDTH 650
|
||||||
#define XED_WINDOW_DEFAULT_HEIGHT 500
|
#define XED_WINDOW_DEFAULT_HEIGHT 500
|
||||||
|
|
||||||
#define XED_WINDOW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_WINDOW, XedWindowPrivate))
|
|
||||||
|
|
||||||
/* Signals */
|
/* Signals */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -62,7 +60,7 @@ enum
|
||||||
TARGET_URI_LIST = 100
|
TARGET_URI_LIST = 100
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE(XedWindow, xed_window, GTK_TYPE_APPLICATION_WINDOW)
|
G_DEFINE_TYPE_WITH_PRIVATE (XedWindow, xed_window, GTK_TYPE_APPLICATION_WINDOW)
|
||||||
|
|
||||||
static void recent_manager_changed (GtkRecentManager *manager, XedWindow *window);
|
static void recent_manager_changed (GtkRecentManager *manager, XedWindow *window);
|
||||||
|
|
||||||
|
@ -353,8 +351,6 @@ xed_window_class_init (XedWindowClass *klass)
|
||||||
XED_TYPE_WINDOW_STATE,
|
XED_TYPE_WINDOW_STATE,
|
||||||
XED_WINDOW_STATE_NORMAL,
|
XED_WINDOW_STATE_NORMAL,
|
||||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_type_class_add_private (object_class, sizeof(XedWindowPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -3221,7 +3217,7 @@ xed_window_init (XedWindow *window)
|
||||||
|
|
||||||
xed_debug (DEBUG_WINDOW);
|
xed_debug (DEBUG_WINDOW);
|
||||||
|
|
||||||
window->priv = XED_WINDOW_GET_PRIVATE (window);
|
window->priv = xed_window_get_instance_private (window);
|
||||||
window->priv->active_tab = NULL;
|
window->priv->active_tab = NULL;
|
||||||
window->priv->num_tabs = 0;
|
window->priv->num_tabs = 0;
|
||||||
window->priv->removing_tabs = FALSE;
|
window->priv->removing_tabs = FALSE;
|
||||||
|
|
Loading…
Reference in New Issue