[gnome-applets/wip/muktupavels/window-picker] window-picker: move to gnome-applets module



commit b09ee022135fa3992b48e9e83cc173c2054facfa
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Mar 25 02:21:44 2020 +0200

    window-picker: move to gnome-applets module

 Makefile.am                                        |   2 -
 configure.ac                                       |   4 +-
 gnome-applets/Makefile.am                          |   2 +
 gnome-applets/ga-module.c                          |  13 ++++
 .../window-picker}/Makefile.am                     |   7 +--
 .../window-picker}/task-item.c                     |   0
 .../window-picker}/task-item.h                     |   0
 .../window-picker}/task-list.c                     |   0
 .../window-picker}/task-list.h                     |   0
 .../window-picker}/wp-about-dialog.c               |   0
 .../window-picker}/wp-about-dialog.h               |   0
 .../window-picker}/wp-about-logo.png               | Bin
 .../window-picker}/wp-applet.c                     |   0
 .../window-picker}/wp-applet.h                     |   0
 .../window-picker}/wp-menu.xml                     |   0
 .../window-picker}/wp-preferences-dialog.c         |   0
 .../window-picker}/wp-preferences-dialog.h         |   0
 .../window-picker}/wp-preferences-dialog.ui        |   0
 .../window-picker}/wp-resources.gresource.xml      |   0
 .../window-picker}/wp-task-title.c                 |   0
 .../window-picker}/wp-task-title.h                 |   0
 po/POTFILES.in                                     |  13 ++--
 window-picker/Makefile.am                          |   3 -
 window-picker/src/wp-module.c                      |  67 ---------------------
 24 files changed, 23 insertions(+), 88 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index cac5268a4..caf17f025 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,7 +27,6 @@ always_built_SUBDIRS =  \
        sticky-notes    \
        trash \
        window-buttons \
-       window-picker \
        window-title \
        $(NULL)
 
@@ -61,7 +60,6 @@ DIST_SUBDIRS = \
        trash   \
        cpufreq         \
        window-buttons  \
-       window-picker   \
        window-title    \
        inhibit         \
        brightness      \
diff --git a/configure.ac b/configure.ac
index 3cd841cf5..a72b60c41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -337,6 +337,7 @@ AC_CONFIG_FILES([
 
   gnome-applets/Makefile
   gnome-applets/timer/Makefile
+  gnome-applets/window-picker/Makefile
 
   help/Makefile
   help/accessx-status/Makefile
@@ -415,9 +416,6 @@ AC_CONFIG_FILES([
   window-buttons/Makefile
   window-buttons/themes/Makefile
 
-  window-picker/Makefile
-  window-picker/src/Makefile
-
   window-title/Makefile
 ])
 
diff --git a/gnome-applets/Makefile.am b/gnome-applets/Makefile.am
index 60c3aff42..de07c9752 100644
--- a/gnome-applets/Makefile.am
+++ b/gnome-applets/Makefile.am
@@ -2,6 +2,7 @@ NULL =
 
 SUBDIRS = \
        timer \
+       window-picker \
        $(NULL)
 
 gnome_applets_libdir = $(GNOME_PANEL_MODULES_DIR)
@@ -25,6 +26,7 @@ org_gnome_gnome_applets_la_SOURCES = \
 
 org_gnome_gnome_applets_la_LIBADD = \
        $(top_builddir)/gnome-applets/timer/libtimer-applet.la \
+       $(top_builddir)/gnome-applets/window-picker/libwindow-picker-applet.la \
        $(GNOME_PANEL_LIBS) \
        $(NULL)
 
diff --git a/gnome-applets/ga-module.c b/gnome-applets/ga-module.c
index 391c0baaf..24f3172da 100644
--- a/gnome-applets/ga-module.c
+++ b/gnome-applets/ga-module.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2020 Alberts Muktupāvels
+ * Copyright (C) 2020 Sebastian Geiger
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,6 +22,7 @@
 #include <libgnome-panel/gp-module.h>
 
 #include "timer/timer-applet.h"
+#include "window-picker/wp-applet.h"
 
 static GpAppletInfo *
 ga_get_applet_info (const char *id)
@@ -38,6 +40,13 @@ ga_get_applet_info (const char *id)
       description = _("Start a timer and receive a notification when it is finished");
       icon_name = "gnome-panel-clock";
     }
+  else if (g_strcmp0 (id, "window-picker") == 0)
+    {
+      type_func = wp_applet_get_type;
+      name = _("Window Picker");
+      description = _("Shows a list of icons for the open windows.");
+      icon_name = "preferences-system-windows";
+    }
   else
     {
       g_assert_not_reached ();
@@ -54,6 +63,9 @@ ga_get_applet_id_from_iid (const char *iid)
 {
   if (g_strcmp0 (iid, "TimerAppletFactory::TimerApplet") == 0)
     return "timer";
+  else if (g_strcmp0 (iid, "WindowPickerFactory::WindowPicker") == 0 ||
+           g_strcmp0 (iid, "org.gnome.gnome-applets.window-picker::window-picker") == 0)
+    return "window-picker";
 
   return NULL;
 }
@@ -72,6 +84,7 @@ gp_module_load (GpModule *module)
 
   gp_module_set_applet_ids (module,
                             "timer",
+                            "window-picker",
                             NULL);
 
   gp_module_set_get_applet_info (module, ga_get_applet_info);
diff --git a/window-picker/src/Makefile.am b/gnome-applets/window-picker/Makefile.am
similarity index 88%
rename from window-picker/src/Makefile.am
rename to gnome-applets/window-picker/Makefile.am
index ab60bf0c5..85453372e 100644
--- a/window-picker/src/Makefile.am
+++ b/gnome-applets/window-picker/Makefile.am
@@ -1,26 +1,22 @@
 NULL =
 
-window_picker_libdir=$(GNOME_PANEL_MODULES_DIR)
-window_picker_lib_LTLIBRARIES=libwindow-picker-applet.la
+noinst_LTLIBRARIES=libwindow-picker-applet.la
 
 libwindow_picker_applet_la_CFLAGS = \
        -D_GNU_SOURCE \
        -DG_LOG_DOMAIN=\"org.gnome.gnome-applets.window-picker\" \
        -DG_LOG_USE_STRUCTURED=1 \
-       -DLOCALEDIR=\""$(localedir)"\" \
        -DWNCK_I_KNOW_THIS_IS_UNSTABLE=1 \
        -I$(top_builddir) \
        -I$(top_srcdir) \
        $(GNOME_PANEL_CFLAGS) \
        $(LIBWNCK_CFLAGS) \
        $(X11_CFLAGS) \
-       $(GCC_FLAGS) \
        $(WARN_CFLAGS) \
        $(AM_CFLAGS) \
        $(NULL)
 
 libwindow_picker_applet_la_LDFLAGS = \
-       -module -avoid-version \
        $(WARN_LDFLAGS) \
        $(AM_LDFLAGS) \
        $(NULL)
@@ -37,7 +33,6 @@ libwindow_picker_applet_la_SOURCES = \
        wp-about-dialog.h \
        wp-applet.c \
        wp-applet.h \
-       wp-module.c \
        wp-preferences-dialog.c \
        wp-preferences-dialog.h \
        task-item.c \
diff --git a/window-picker/src/task-item.c b/gnome-applets/window-picker/task-item.c
similarity index 100%
rename from window-picker/src/task-item.c
rename to gnome-applets/window-picker/task-item.c
diff --git a/window-picker/src/task-item.h b/gnome-applets/window-picker/task-item.h
similarity index 100%
rename from window-picker/src/task-item.h
rename to gnome-applets/window-picker/task-item.h
diff --git a/window-picker/src/task-list.c b/gnome-applets/window-picker/task-list.c
similarity index 100%
rename from window-picker/src/task-list.c
rename to gnome-applets/window-picker/task-list.c
diff --git a/window-picker/src/task-list.h b/gnome-applets/window-picker/task-list.h
similarity index 100%
rename from window-picker/src/task-list.h
rename to gnome-applets/window-picker/task-list.h
diff --git a/window-picker/src/wp-about-dialog.c b/gnome-applets/window-picker/wp-about-dialog.c
similarity index 100%
rename from window-picker/src/wp-about-dialog.c
rename to gnome-applets/window-picker/wp-about-dialog.c
diff --git a/window-picker/src/wp-about-dialog.h b/gnome-applets/window-picker/wp-about-dialog.h
similarity index 100%
rename from window-picker/src/wp-about-dialog.h
rename to gnome-applets/window-picker/wp-about-dialog.h
diff --git a/window-picker/src/wp-about-logo.png b/gnome-applets/window-picker/wp-about-logo.png
similarity index 100%
rename from window-picker/src/wp-about-logo.png
rename to gnome-applets/window-picker/wp-about-logo.png
diff --git a/window-picker/src/wp-applet.c b/gnome-applets/window-picker/wp-applet.c
similarity index 100%
rename from window-picker/src/wp-applet.c
rename to gnome-applets/window-picker/wp-applet.c
diff --git a/window-picker/src/wp-applet.h b/gnome-applets/window-picker/wp-applet.h
similarity index 100%
rename from window-picker/src/wp-applet.h
rename to gnome-applets/window-picker/wp-applet.h
diff --git a/window-picker/src/wp-menu.xml b/gnome-applets/window-picker/wp-menu.xml
similarity index 100%
rename from window-picker/src/wp-menu.xml
rename to gnome-applets/window-picker/wp-menu.xml
diff --git a/window-picker/src/wp-preferences-dialog.c b/gnome-applets/window-picker/wp-preferences-dialog.c
similarity index 100%
rename from window-picker/src/wp-preferences-dialog.c
rename to gnome-applets/window-picker/wp-preferences-dialog.c
diff --git a/window-picker/src/wp-preferences-dialog.h b/gnome-applets/window-picker/wp-preferences-dialog.h
similarity index 100%
rename from window-picker/src/wp-preferences-dialog.h
rename to gnome-applets/window-picker/wp-preferences-dialog.h
diff --git a/window-picker/src/wp-preferences-dialog.ui b/gnome-applets/window-picker/wp-preferences-dialog.ui
similarity index 100%
rename from window-picker/src/wp-preferences-dialog.ui
rename to gnome-applets/window-picker/wp-preferences-dialog.ui
diff --git a/window-picker/src/wp-resources.gresource.xml 
b/gnome-applets/window-picker/wp-resources.gresource.xml
similarity index 100%
rename from window-picker/src/wp-resources.gresource.xml
rename to gnome-applets/window-picker/wp-resources.gresource.xml
diff --git a/window-picker/src/wp-task-title.c b/gnome-applets/window-picker/wp-task-title.c
similarity index 100%
rename from window-picker/src/wp-task-title.c
rename to gnome-applets/window-picker/wp-task-title.c
diff --git a/window-picker/src/wp-task-title.h b/gnome-applets/window-picker/wp-task-title.h
similarity index 100%
rename from window-picker/src/wp-task-title.h
rename to gnome-applets/window-picker/wp-task-title.h
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e5183c171..fb302d972 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -51,6 +51,12 @@ geyes/src/geyes.c
 geyes/src/themes.c
 gnome-applets/ga-module.c
 gnome-applets/timer/timer-applet.c
+gnome-applets/window-picker/task-item.c
+gnome-applets/window-picker/wp-about-dialog.c
+gnome-applets/window-picker/wp-applet.c
+[type: gettext/glade]gnome-applets/window-picker/wp-menu.xml
+[type: gettext/glade]gnome-applets/window-picker/wp-preferences-dialog.ui
+gnome-applets/window-picker/wp-task-title.c
 [type: gettext/glade]gweather/gweather-applet-menu.xml
 [type: gettext/ini]gweather/org.gnome.applets.GWeatherApplet.panel-applet.in.in
 gweather/src/gweather-applet.c
@@ -108,13 +114,6 @@ trash/src/trash-empty.c
 [type: gettext/ini]window-buttons/org.gnome.panel.WindowButtonsApplet.panel-applet.in.in
 window-buttons/windowbuttons.c
 [type: gettext/glade]window-buttons/windowbuttons.ui
-window-picker/src/task-item.c
-window-picker/src/wp-about-dialog.c
-window-picker/src/wp-applet.c
-[type: gettext/glade]window-picker/src/wp-menu.xml
-window-picker/src/wp-module.c
-[type: gettext/glade]window-picker/src/wp-preferences-dialog.ui
-window-picker/src/wp-task-title.c
 [type: gettext/ini]window-title/org.gnome.panel.WindowTitleApplet.panel-applet.in.in
 window-title/windowtitle.c
 [type: gettext/glade]window-title/windowtitle.ui


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