[gedit] Remove GeditAppX11 class



commit fca08ebc113fe8e3d06713379935e0a781284b7d
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Mar 18 19:10:32 2020 +0100

    Remove GeditAppX11 class
    
    In the main() function, create the parent class instead: GeditApp (this
    requires a small change in GeditApp to make it a concrete class instead
    of an abstract class).
    
    GeditAppX11 did only one thing (providing the desktop-startup-id in case
    the information is needed but not already set). And by looking at the
    GTK 3 code, it's now done by GtkApplication (search "desktop-startup-id"
    in gtkapplication.c).
    
    This removes some X11-specific code from gedit, which is also a welcome
    change since X11 is deprecated and linking against the X11 library
    prevents gedit from being a native Wayland app.

 docs/reference/meson.build |   1 -
 gedit/gedit-app-x11.c      | 110 ---------------------------------------------
 gedit/gedit-app-x11.h      |  38 ----------------
 gedit/gedit-app.c          |   2 +-
 gedit/gedit.c              |   4 +-
 gedit/meson.build          |   3 --
 6 files changed, 2 insertions(+), 156 deletions(-)
---
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index abf5ed7c0..38450b8fe 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -28,7 +28,6 @@ gedit_doc_dep = declare_dependency(
 libgedit_reference_ignored_h = [
   'gedit-app-osx.h',
   'gedit-app-win32.h',
-  'gedit-app-x11.h',
   'gedit-close-confirmation-dialog.h',
   'gedit-dirs.h',
   'gedit-document-private.h',
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 82067b257..2f5c3b272 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -141,7 +141,7 @@ static const GOptionEntry options[] =
        {NULL}
 };
 
-G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GeditApp, gedit_app, GTK_TYPE_APPLICATION)
+G_DEFINE_TYPE_WITH_PRIVATE (GeditApp, gedit_app, GTK_TYPE_APPLICATION)
 
 static void
 gedit_app_dispose (GObject *object)
diff --git a/gedit/gedit.c b/gedit/gedit.c
index b3e77f677..c875362dc 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -26,8 +26,6 @@
 #  include "gedit-app-osx.h"
 #elif defined G_OS_WIN32
 #  include "gedit-app-win32.h"
-#else
-#  include "gedit-app-x11.h"
 #endif
 
 #include <locale.h>
@@ -130,7 +128,7 @@ main (int argc, char *argv[])
 
        type = GEDIT_TYPE_APP_WIN32;
 #else
-       type = GEDIT_TYPE_APP_X11;
+       type = GEDIT_TYPE_APP;
 #endif
 
        /* NOTE: we should not make any calls to the gedit api before the
diff --git a/gedit/meson.build b/gedit/meson.build
index 10d37ee2e..bff912f23 100644
--- a/gedit/meson.build
+++ b/gedit/meson.build
@@ -139,9 +139,6 @@ elif host_machine.system() == 'windows'
     'gedit-app-win32.c',
   )
 else
-  libgedit_sources += files(
-    'gedit-app-x11.c',
-  )
   libgedit_deps += [
     x11_dep,
   ]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]