Port xed to dbus and GtkApplication

This further improves on the port to GtkSource API's and cleans up a ton of
legacy code in xed based on upstream changes in Gedit.
This commit is contained in:
JosephMcc
2017-02-04 22:17:58 -08:00
parent f05ddd7b63
commit 2aa009cb76
45 changed files with 1434 additions and 6558 deletions

View File

@@ -761,13 +761,11 @@ on_rename_cb (XedFileBrowserStore *store,
GFile *newfile,
XedWindow *window)
{
XedApp *app;
GList *documents;
GList *item;
/* Find all documents and set its uri to newuri where it matches olduri */
app = xed_app_get_default ();
documents = xed_app_get_documents (app);
documents = xed_app_get_documents (XED_APP (g_application_get_default ()));
for (item = documents; item; item = item->next)
{

View File

@@ -34,7 +34,7 @@
#include <xed/xed-window-activatable.h>
#include <xed/xed-debug.h>
#include <xed/xed-utils.h>
#include <xed/xed-help.h>
#include <xed/xed-app.h>
#define XED_SORT_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), XED_TYPE_SORT_PLUGIN, XedSortPluginPrivate))
@@ -110,7 +110,7 @@ sort_dialog_response_handler (GtkDialog *dlg,
break;
case GTK_RESPONSE_HELP:
xed_help_display (GTK_WINDOW (dlg), NULL, "xed-sort-plugin");
xed_app_show_help (XED_APP (g_application_get_default ()), GTK_WINDOW (dlg), NULL, "xed-sort-plugin");
break;
case GTK_RESPONSE_CANCEL:

View File

@@ -34,7 +34,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <xed/xed-utils.h>
#include <xed/xed-help.h>
#include <xed/xed-app.h>
#include "xed-spell-language-dialog.h"
#include "xed-spell-checker-language.h"
@@ -70,7 +70,7 @@ dialog_response_handler (GtkDialog *dlg,
{
if (res_id == GTK_RESPONSE_HELP)
{
xed_help_display (GTK_WINDOW (dlg), NULL, "xed-spell-checker-plugin");
xed_app_show_help (XED_APP (g_application_get_default ()), GTK_WINDOW (dlg), NULL, "xed-spell-checker-plugin");
g_signal_stop_emission_by_name (dlg, "response");
}

View File

@@ -32,7 +32,7 @@
#include <time.h>
#include "xed-time-plugin.h"
#include <xed/xed-help.h>
#include <xed/xed-app.h>
#include <glib/gi18n-lib.h>
#include <glib.h>
@@ -916,7 +916,7 @@ choose_format_dialog_response_cb (GtkWidget *widget,
case GTK_RESPONSE_HELP:
{
xed_debug_message (DEBUG_PLUGINS, "GTK_RESPONSE_HELP");
xed_help_display (GTK_WINDOW (widget), NULL, "xed-insert-date-time-plugin");
xed_app_show_help (XED_APP (g_application_get_default ()), GTK_WINDOW (widget), NULL, "xed-insert-date-time-plugin");
break;
}
case GTK_RESPONSE_OK: