[gnome-applets/wip/muktupavels/mini-commander] mini-commander: port to libgnome-panel



commit b12e24427ebcb3028227327564a7cceb5a41df44
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue Mar 31 02:21:11 2020 +0300

    mini-commander: port to libgnome-panel

 Makefile.am                                        |   2 -
 configure.ac                                       |   4 +-
 gnome-applets/Makefile.am                          |   4 +
 gnome-applets/ga-module.c                          |  11 ++
 gnome-applets/mini-commander/Makefile.am           |  57 ++++++
 .../src => gnome-applets/mini-commander}/about.c   |   7 +-
 .../src => gnome-applets/mini-commander}/about.h   |   3 +-
 .../mini-commander}/browser-mini.xpm               |   0
 .../mini-commander/cmd-completion.c                |   9 +-
 .../mini-commander/cmd-completion.h                |   3 +-
 .../mini-commander/command-line.c                  |  47 +++--
 .../mini-commander/command-line.h                  |   3 +-
 .../src => gnome-applets/mini-commander}/exec.c    |   8 +-
 .../src => gnome-applets/mini-commander}/exec.h    |   3 +-
 .../mini-commander}/gsettings.h                    |   0
 .../src => gnome-applets/mini-commander}/help.c    |   6 +-
 .../src => gnome-applets/mini-commander}/help.h    |   3 +-
 .../mini-commander}/history-mini.xpm               |   0
 .../src => gnome-applets/mini-commander}/history.c |   9 +-
 .../src => gnome-applets/mini-commander}/history.h |   3 +-
 .../src => gnome-applets/mini-commander}/macro.c   |   6 +-
 .../src => gnome-applets/mini-commander}/macro.h   |   3 +-
 .../mini-commander/mini-commander-applet-menu.xml  |  18 ++
 .../mini-commander/mini-commander-applet-private.h |  27 ++-
 .../mini-commander/mini-commander-applet.c         | 220 ++++++++++-----------
 .../mini-commander/mini-commander-applet.h         |  31 +++
 .../mini-commander}/mini-commander.ui              |   0
 .../mini-commander}/preferences.c                  |  19 +-
 .../mini-commander}/preferences.h                  |   3 +-
 mini-commander/Makefile.am                         |   3 -
 mini-commander/docs/docbook.css                    |  20 --
 mini-commander/src/Makefile.am                     |  88 ---------
 mini-commander/src/mini-commander-applet-menu.xml  |  14 --
 mini-commander/src/mini-commander_applet.gnorba    |   5 -
 ....applets.MiniCommanderApplet.panel-applet.in.in |  15 --
 po/POTFILES.in                                     |  19 +-
 po/POTFILES.skip                                   |   1 -
 37 files changed, 301 insertions(+), 373 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 10a4585af..03d41bd75 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,6 @@ tracker_search_bar_SUBDIR = tracker-search-bar
 endif
 
 always_built_SUBDIRS =  \
-       mini-commander \
        multiload \
        sticky-notes    \
        window-buttons \
@@ -25,7 +24,6 @@ DIST_SUBDIRS = \
        gnome-applets \
        help \
        po              \
-       mini-commander  \
        multiload       \
        sticky-notes    \
        window-buttons  \
diff --git a/configure.ac b/configure.ac
index de7200d4f..7758efbeb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -351,6 +351,7 @@ AC_CONFIG_FILES([
   gnome-applets/geyes/themes/Makefile
   gnome-applets/gweather/Makefile
   gnome-applets/inhibit/Makefile
+  gnome-applets/mini-commander/Makefile
   gnome-applets/netspeed/Makefile
   gnome-applets/timer/Makefile
   gnome-applets/trash/Makefile
@@ -373,9 +374,6 @@ AC_CONFIG_FILES([
 
   po/Makefile.in
 
-  mini-commander/Makefile
-  mini-commander/src/Makefile
-
   multiload/Makefile
   multiload/src/Makefile
 
diff --git a/gnome-applets/Makefile.am b/gnome-applets/Makefile.am
index 14c20ac64..7acd9d6c4 100644
--- a/gnome-applets/Makefile.am
+++ b/gnome-applets/Makefile.am
@@ -11,6 +11,7 @@ SUBDIRS = \
        geyes \
        gweather \
        inhibit \
+       mini-commander \
        netspeed \
        timer \
        trash \
@@ -49,6 +50,7 @@ org_gnome_gnome_applets_la_LIBADD = \
        $(top_builddir)/gnome-applets/geyes/libgeyes-applet.la \
        $(top_builddir)/gnome-applets/gweather/libgweather-applet.la \
        $(top_builddir)/gnome-applets/inhibit/libinhibit-applet.la \
+       $(top_builddir)/gnome-applets/mini-commander/libmini-commander-applet.la \
        $(top_builddir)/gnome-applets/netspeed/libnet-speed-applet.la \
        $(top_builddir)/gnome-applets/timer/libtimer-applet.la \
        $(top_builddir)/gnome-applets/trash/libtrash-applet.la \
@@ -132,6 +134,8 @@ ui_files = \
        geyes/geyes-applet-menu.xml \
        gweather/gweather-applet-menu.xml \
        inhibit/inhibit-applet-menu.xml \
+       mini-commander/mini-commander.ui \
+       mini-commander/mini-commander-applet-menu.xml \
        netspeed/netspeed-menu.xml \
        timer/timer-applet-menu.xml \
        trash/trash-empty.ui \
diff --git a/gnome-applets/ga-module.c b/gnome-applets/ga-module.c
index b2971ea8e..cde1ce5cf 100644
--- a/gnome-applets/ga-module.c
+++ b/gnome-applets/ga-module.c
@@ -33,6 +33,7 @@
 #include "geyes/geyes-applet.h"
 #include "gweather/gweather-applet.h"
 #include "inhibit/inhibit-applet.h"
+#include "mini-commander/mini-commander-applet.h"
 #include "netspeed/netspeed-applet.h"
 #include "timer/timer-applet.h"
 #include "trash/trash-applet.h"
@@ -120,6 +121,13 @@ ga_get_applet_info (const char *id)
       description = _("Allows user to inhibit automatic power saving");
       icon_name = "gnome-inhibit-applet";
     }
+  else if (g_strcmp0 (id, "mini-commander") == 0)
+    {
+      type_func = mini_commander_applet_get_type;
+      name = _("Command Line");
+      description = _("Mini-Commander");
+      icon_name = "gnome-mini-commander";
+    }
   else if (g_strcmp0 (id, "netspeed") == 0)
     {
       type_func = netspeed_applet_get_type;
@@ -191,6 +199,8 @@ ga_get_applet_id_from_iid (const char *iid)
     return "gweather";
   else if (g_strcmp0 (iid, "InhibitAppletFactory::InhibitApplet") == 0)
     return "inhibit";
+  else if (g_strcmp0 (iid, "MiniCommanderAppletFactory::MiniCommanderApplet") == 0)
+    return "mini-commander";
   else if (g_strcmp0 (iid, "NetspeedAppletFactory::NetspeedApplet") == 0)
     return "netspeed";
   else if (g_strcmp0 (iid, "TimerAppletFactory::TimerApplet") == 0)
@@ -231,6 +241,7 @@ gp_module_load (GpModule *module)
                             "geyes",
                             "gweather",
                             "inhibit",
+                            "mini-commander",
                             "netspeed",
                             "timer",
                             "trash",
diff --git a/gnome-applets/mini-commander/Makefile.am b/gnome-applets/mini-commander/Makefile.am
new file mode 100644
index 000000000..f12e1ec57
--- /dev/null
+++ b/gnome-applets/mini-commander/Makefile.am
@@ -0,0 +1,57 @@
+NULL =
+
+noinst_LTLIBRARIES = libmini-commander-applet.la
+
+libmini_commander_applet_la_CPPFLAGS = \
+       -DG_LOG_DOMAIN=\"org.gnome.gnome-applets.mini-commander\" \
+       -DG_LOG_USE_STRUCTURED=1 \
+       $(NULL)
+
+libmini_commander_applet_la_CFLAGS = \
+       $(GNOME_PANEL_CFLAGS)   \
+       $(WARN_CFLAGS) \
+       $(AM_CFLAGS) \
+       $(NULL)
+
+libmini_commander_applet_la_SOURCES = \
+       about.c \
+       about.h \
+       cmd-completion.c \
+       cmd-completion.h\
+       command-line.c \
+       command-line.h \
+       exec.c \
+       exec.h \
+       mini-commander-applet-private.h \
+       mini-commander-applet.c \
+       mini-commander-applet.h \
+       help.c \
+       help.h \
+       history.c \
+       history.h \
+       macro.c \
+       macro.h \
+       preferences.c \
+       preferences.h \
+       gsettings.h
+       $(NULL)
+
+libmini_commander_applet_la_LDFLAGS = \
+       $(WARN_LDFLAGS) \
+       $(AM_LDFLAGS) \
+       $(NULL)
+
+libmini_commander_applet_la_LIBADD = \
+       $(GNOME_APPLETS_LIBS)
+       $(NULL)
+
+BITMAPS = \
+       browser-mini.xpm \
+       history-mini.xpm \
+       $(NULL)
+
+EXTRA_DIST = \
+       $(BITMAPS) \
+       $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/mini-commander/src/about.c b/gnome-applets/mini-commander/about.c
similarity index 97%
rename from mini-commander/src/about.c
rename to gnome-applets/mini-commander/about.c
index b5032fc6c..659e9da2a 100644
--- a/mini-commander/src/about.c
+++ b/gnome-applets/mini-commander/about.c
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998, 1999 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -18,13 +17,13 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
+#include "config.h"
+#include "about.h"
 
 #include <glib.h>
+#include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
 
-#include "about.h"
-
 void about_box (GSimpleAction *action,
                 GVariant      *parameter,
                 gpointer       user_data)
diff --git a/mini-commander/src/about.h b/gnome-applets/mini-commander/about.h
similarity index 93%
rename from mini-commander/src/about.h
rename to gnome-applets/mini-commander/about.h
index 42cf52595..3a3a50dbf 100644
--- a/mini-commander/src/about.h
+++ b/gnome-applets/mini-commander/about.h
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998, 1999 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -18,7 +17,7 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "mini-commander_applet.h"
+#include "mini-commander-applet-private.h"
 
 void about_box (GSimpleAction *action,
                 GVariant      *parameter,
diff --git a/mini-commander/src/browser-mini.xpm b/gnome-applets/mini-commander/browser-mini.xpm
similarity index 100%
rename from mini-commander/src/browser-mini.xpm
rename to gnome-applets/mini-commander/browser-mini.xpm
diff --git a/mini-commander/src/cmd_completion.c b/gnome-applets/mini-commander/cmd-completion.c
similarity index 98%
rename from mini-commander/src/cmd_completion.c
rename to gnome-applets/mini-commander/cmd-completion.c
index f94e4a272..20e0a828f 100644
--- a/mini-commander/src/cmd_completion.c
+++ b/gnome-applets/mini-commander/cmd-completion.c
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998, 1999 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -26,20 +25,18 @@
   should work on every system with a bash-alike shell.  
 */
 
-#include <config.h>
+#include "config.h"
+#include "cmd-completion.h"
+
 #include <string.h>
 #include <stdlib.h>
 
-#include <panel-applet.h>
-
 #include <sys/stat.h>
 #include <dirent.h>
 
-#include "cmd_completion.h"
 #include "preferences.h"
 #include "macro.h"
 
-
 static GList*    cmdc( char* );
 static void      process_dir( const gchar* );
 static void      cleanup( void );
diff --git a/mini-commander/src/cmd_completion.h b/gnome-applets/mini-commander/cmd-completion.h
similarity index 94%
rename from mini-commander/src/cmd_completion.h
rename to gnome-applets/mini-commander/cmd-completion.h
index 753118c31..91ffbc918 100644
--- a/mini-commander/src/cmd_completion.h
+++ b/gnome-applets/mini-commander/cmd-completion.h
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -24,7 +23,7 @@
 
 G_BEGIN_DECLS
 
-#include "mini-commander_applet.h"
+#include "mini-commander-applet-private.h"
 
 void mc_cmd_completion (MCData *mc, char *cmd);
 
diff --git a/mini-commander/src/command_line.c b/gnome-applets/mini-commander/command-line.c
similarity index 93%
rename from mini-commander/src/command_line.c
rename to gnome-applets/mini-commander/command-line.c
index 4464ac8d2..5792e3c47 100644
--- a/mini-commander/src/command_line.c
+++ b/gnome-applets/mini-commander/command-line.c
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998, 1999 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -18,20 +17,19 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
+#include "config.h"
+#include "command-line.h"
+
 #include <string.h>
 #include <stdlib.h>
 
 #include <gdk/gdkkeysyms.h>
+#include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
 
-#include <panel-applet.h>
-
-#include "mini-commander_applet.h"
-#include "command_line.h"
 #include "preferences.h"
 #include "exec.h"
-#include "cmd_completion.h"
+#include "cmd-completion.h"
 #include "history.h"
 
 static gint file_browser_response_signal(GtkWidget *widget, gint response, gpointer mc_data);
@@ -39,7 +37,6 @@ static gint history_popup_clicked_cb(GtkWidget *widget, gpointer data);
 static gint history_popup_clicked_inside_cb(GtkWidget *widget, gpointer data);
 static gchar* history_auto_complete(GtkWidget *widget, GdkEventKey *event);
 
-
 static int history_position = MC_HISTORY_LIST_LENGTH;
 static gchar *browsed_folder = NULL;
 
@@ -66,7 +63,7 @@ button_press_cb (GtkEntry       *entry,
 {
     const gchar *str;
 
-    panel_applet_request_focus (mc->applet, event->time);
+    gp_applet_request_focus (GP_APPLET (mc), event->time);
 
     if (mc->error) {
           mc->error = FALSE;
@@ -103,7 +100,7 @@ command_key_event (GtkEntry   *entry,
                     /*
                      * Move focus to the next widget (browser) button.
                      */
-                    gtk_widget_child_focus (GTK_WIDGET (mc->applet), GTK_DIR_TAB_FORWARD);
+                    gtk_widget_child_focus (GTK_WIDGET (mc), GTK_DIR_TAB_FORWARD);
                    propagate_event = FALSE;
                 }
             else if(event->state != GDK_SHIFT_MASK)
@@ -230,7 +227,7 @@ history_list_key_press_cb (GtkWidget   *widget,
                           GdkEventKey *event,
                           MCData      *mc)
 {
-    GtkTreeView *tree = g_object_get_data (G_OBJECT (mc->applet), "tree");
+    GtkTreeView *tree = g_object_get_data (G_OBJECT (mc), "tree");
     GtkTreeIter iter;
     GtkTreeModel *model;
     gchar *command;
@@ -270,7 +267,7 @@ history_list_button_press_cb (GtkWidget      *widget,
                              GdkEventButton *event,
                              MCData         *mc)
 {
-    GtkTreeView *tree = g_object_get_data (G_OBJECT (mc->applet), "tree");
+    GtkTreeView *tree = g_object_get_data (G_OBJECT (mc), "tree");
     GtkTreeIter iter;
     GtkTreeModel *model;
     gchar *command;
@@ -318,7 +315,7 @@ mc_show_history (GtkWidget *widget,
 
      window = gtk_window_new(GTK_WINDOW_POPUP);
      gtk_window_set_screen (GTK_WINDOW (window),
-                           gtk_widget_get_screen (GTK_WIDGET (mc->applet)));
+                           gtk_widget_get_screen (GTK_WIDGET (mc)));
      gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
      gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_COMBO);
      /* cb */
@@ -373,7 +370,7 @@ mc_show_history (GtkWidget *widget,
      }
      model = GTK_TREE_MODEL(store);
      treeview = gtk_tree_view_new_with_model (model);
-     g_object_set_data (G_OBJECT (mc->applet), "tree", treeview);
+     g_object_set_data (G_OBJECT (mc), "tree", treeview);
      cell_renderer = gtk_cell_renderer_text_new ();
      column = gtk_tree_view_column_new_with_attributes (NULL, cell_renderer,
                                                        "text", 0, NULL);
@@ -399,22 +396,22 @@ mc_show_history (GtkWidget *widget,
      gtk_widget_show (treeview);
 
      gtk_widget_get_preferred_size (window, NULL, &req);
-     gdk_window = gtk_widget_get_window (GTK_WIDGET (mc->applet));
+     gdk_window = gtk_widget_get_window (GTK_WIDGET (mc));
      gdk_window_get_origin (gdk_window, &x, &y);
      gdk_window_get_geometry (gdk_window, NULL, NULL,
                               &width, &height);
 
-     switch (panel_applet_get_orient (mc->applet)) {
-     case PANEL_APPLET_ORIENT_DOWN:
+     switch (gp_applet_get_position (GP_APPLET (mc))) {
+     case GTK_POS_TOP:
         y += height;
        break;
-     case PANEL_APPLET_ORIENT_UP:
+     case GTK_POS_BOTTOM:
         y -= req.height;
        break;
-     case PANEL_APPLET_ORIENT_LEFT:
+     case GTK_POS_RIGHT:
        x -= req.width;
        break;
-     case PANEL_APPLET_ORIENT_RIGHT:
+     case GTK_POS_LEFT:
        x += width;
        break;
      }
@@ -505,7 +502,7 @@ mc_show_file_browser (GtkWidget *widget,
     gtk_window_set_modal(GTK_WINDOW(mc->file_select),TRUE);
 
     gtk_window_set_screen (GTK_WINDOW (mc->file_select),
-                          gtk_widget_get_screen (GTK_WIDGET (mc->applet)));
+                          gtk_widget_get_screen (GTK_WIDGET (mc)));
     gtk_window_set_position (GTK_WINDOW (mc->file_select), GTK_WIN_POS_CENTER);
 
     gtk_widget_show(mc->file_select);
@@ -536,9 +533,9 @@ mc_create_command_entry (MCData *mc)
 
     mc_command_update_entry_size (mc);
 
-    set_atk_name_description (mc->entry,
-                             _("Command line"),
-                             _("Type a command here and Gnome will execute it for you"));
+    mc_set_atk_name_description (mc->entry,
+                                 _("Command line"),
+                                 _("Type a command here and Gnome will execute it for you"));
 }
 
 void
@@ -588,7 +585,7 @@ mc_command_update_entry_size (MCData *mc)
     int size_x = -1;
 
     size_x = mc->preferences.normal_size_x - 17;
-    if ((mc->orient == PANEL_APPLET_ORIENT_LEFT) || (mc->orient == PANEL_APPLET_ORIENT_RIGHT)) {
+    if (mc->orient == GTK_ORIENTATION_VERTICAL) {
       size_x = MIN(size_x, mc->preferences.panel_size_x - 17);
       gtk_widget_set_size_request (GTK_WIDGET (mc->entry), size_x, -1);
     } else {
diff --git a/mini-commander/src/command_line.h b/gnome-applets/mini-commander/command-line.h
similarity index 95%
rename from mini-commander/src/command_line.h
rename to gnome-applets/mini-commander/command-line.h
index 1a8722a93..deffcb7a3 100644
--- a/mini-commander/src/command_line.h
+++ b/gnome-applets/mini-commander/command-line.h
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998, 1999 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -25,7 +24,7 @@
 
 G_BEGIN_DECLS
 
-#include "mini-commander_applet.h"
+#include "mini-commander-applet-private.h"
 
 void       mc_create_command_entry       (MCData    *mc);
 int        mc_show_history               (GtkWidget *widget,
diff --git a/mini-commander/src/exec.c b/gnome-applets/mini-commander/exec.c
similarity index 97%
rename from mini-commander/src/exec.c
rename to gnome-applets/mini-commander/exec.c
index 8fcc9466d..4647647d0 100644
--- a/mini-commander/src/exec.c
+++ b/gnome-applets/mini-commander/exec.c
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -18,14 +17,15 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
+#include "config.h"
+#include "exec.h"
+
 #include <string.h>
 
 #include <glib.h>
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
 
-#include "exec.h"
 #include "macro.h"
 #include "preferences.h"
 #include "history.h"
@@ -66,7 +66,7 @@ mc_exec_command (MCData     *mc,
                return;
        }
 
-       display = gdk_screen_make_display_name (gtk_widget_get_screen (GTK_WIDGET (mc->applet)));
+       display = gdk_screen_make_display_name (gtk_widget_get_screen (GTK_WIDGET (mc)));
 
        if(!g_spawn_async (NULL, /* working directory */
                           argv,
diff --git a/mini-commander/src/exec.h b/gnome-applets/mini-commander/exec.h
similarity index 93%
rename from mini-commander/src/exec.h
rename to gnome-applets/mini-commander/exec.h
index 3d8763cfe..3c80bcda3 100644
--- a/mini-commander/src/exec.h
+++ b/gnome-applets/mini-commander/exec.h
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -24,7 +23,7 @@
 
 G_BEGIN_DECLS
 
-#include "mini-commander_applet.h"
+#include "mini-commander-applet-private.h"
 
 void mc_exec_command (MCData     *mc,
                      const char *cmd);
diff --git a/mini-commander/src/gsettings.h b/gnome-applets/mini-commander/gsettings.h
similarity index 100%
rename from mini-commander/src/gsettings.h
rename to gnome-applets/mini-commander/gsettings.h
diff --git a/mini-commander/src/help.c b/gnome-applets/mini-commander/help.c
similarity index 91%
rename from mini-commander/src/help.c
rename to gnome-applets/mini-commander/help.c
index 2855fa72e..0a1c8bb05 100644
--- a/mini-commander/src/help.c
+++ b/gnome-applets/mini-commander/help.c
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -18,8 +17,7 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
-
+#include "config.h"
 #include "help.h"
 
 void 
@@ -30,7 +28,7 @@ show_help (GSimpleAction *action,
        MCData *mcdata = (MCData *) user_data;
     GError *error = NULL;
    
-    gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (mcdata->applet)),
+    gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (mcdata)),
                "command-line",
                gtk_get_current_event_time (),
                &error);
diff --git a/mini-commander/src/help.h b/gnome-applets/mini-commander/help.h
similarity index 93%
rename from mini-commander/src/help.h
rename to gnome-applets/mini-commander/help.h
index 6b6d5da36..92c22562f 100644
--- a/mini-commander/src/help.h
+++ b/gnome-applets/mini-commander/help.h
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -18,7 +17,7 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "mini-commander_applet.h"
+#include "mini-commander-applet-private.h"
 
 void show_help (GSimpleAction *action,
                 GVariant      *parameter,
diff --git a/mini-commander/src/history-mini.xpm b/gnome-applets/mini-commander/history-mini.xpm
similarity index 100%
rename from mini-commander/src/history-mini.xpm
rename to gnome-applets/mini-commander/history-mini.xpm
diff --git a/mini-commander/src/history.c b/gnome-applets/mini-commander/history.c
similarity index 97%
rename from mini-commander/src/history.c
rename to gnome-applets/mini-commander/history.c
index e95f97890..72dee1740 100644
--- a/mini-commander/src/history.c
+++ b/gnome-applets/mini-commander/history.c
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -21,20 +20,18 @@
 /* Actually the command history is a simple list.  So, I guess this
    here could also be done with the list routines of glib. */
 
-#include <config.h>
+#include "config.h"
+#include "history.h"
+
 #include <string.h>
 #include <stdlib.h>
 
-#include <panel-applet.h>
-
-#include "history.h"
 #include "preferences.h"
 #include "gsettings.h"
 
 static char *history_command[MC_HISTORY_LIST_LENGTH];
 static void delete_history_entry(int element_number);
 
-
 int
 exists_history_entry(int pos)
 {
diff --git a/mini-commander/src/history.h b/gnome-applets/mini-commander/history.h
similarity index 94%
rename from mini-commander/src/history.h
rename to gnome-applets/mini-commander/history.h
index 7816f1ec8..eafd9dd3b 100644
--- a/mini-commander/src/history.h
+++ b/gnome-applets/mini-commander/history.h
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -18,7 +17,7 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "mini-commander_applet.h"
+#include "mini-commander-applet-private.h"
 
 int exists_history_entry(int pos);
 extern char *get_history_entry(int pos);
diff --git a/mini-commander/src/macro.c b/gnome-applets/mini-commander/macro.c
similarity index 98%
rename from mini-commander/src/macro.c
rename to gnome-applets/mini-commander/macro.c
index 3d1956948..dbe98c431 100644
--- a/mini-commander/src/macro.c
+++ b/gnome-applets/mini-commander/macro.c
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -18,13 +17,14 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
+#include "config.h"
+#include "macro.h"
+
 #include <sys/types.h>
 #include <string.h>
 #include <stdlib.h>
 #include <regex.h>
 
-#include "macro.h"
 #include "preferences.h"
 
 /* search for the longest matching prefix */
diff --git a/mini-commander/src/macro.h b/gnome-applets/mini-commander/macro.h
similarity index 95%
rename from mini-commander/src/macro.h
rename to gnome-applets/mini-commander/macro.h
index 687e7ba13..4c15a283a 100644
--- a/mini-commander/src/macro.h
+++ b/gnome-applets/mini-commander/macro.h
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998 Oliver Maruhn <oliver maruhn com>
  *
  * Author: Oliver Maruhn <oliver maruhn com>
@@ -25,7 +24,7 @@
 
 G_BEGIN_DECLS
 
-#include "mini-commander_applet.h"
+#include "mini-commander-applet-private.h"
 
 void      mc_macro_expand_command    (MCData *mc,
                                      char   *command);
diff --git a/gnome-applets/mini-commander/mini-commander-applet-menu.xml 
b/gnome-applets/mini-commander/mini-commander-applet-menu.xml
new file mode 100644
index 000000000..3c208d5e7
--- /dev/null
+++ b/gnome-applets/mini-commander/mini-commander-applet-menu.xml
@@ -0,0 +1,18 @@
+<interface>
+  <menu id="mini-commander-menu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Preferences</attribute>
+        <attribute name="action">mini-commander.preferences</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Help</attribute>
+        <attribute name="action">mini-commander.help</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_About</attribute>
+        <attribute name="action">mini-commander.about</attribute>
+      </item>
+    </section>
+  </menu>
+</interface>
diff --git a/mini-commander/src/mini-commander_applet.h 
b/gnome-applets/mini-commander/mini-commander-applet-private.h
similarity index 82%
rename from mini-commander/src/mini-commander_applet.h
rename to gnome-applets/mini-commander/mini-commander-applet-private.h
index fcb9b885a..7c5650ca1 100644
--- a/mini-commander/src/mini-commander_applet.h
+++ b/gnome-applets/mini-commander/mini-commander-applet-private.h
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998 Oliver Maruhn <oliver maruhn com>,
  *               2002 Sun Microsystems
  *
@@ -23,26 +22,22 @@
 #ifndef __MC_APPLET_H__
 #define __MC_APPLET_H__
 
-#include <glib.h>
-#include <glib/gi18n.h>
-
-G_BEGIN_DECLS
-
-#include <gtk/gtk.h>
-#include <panel-applet.h>
-
-typedef struct _MCData MCData;
+#include "mini-commander-applet.h"
 
+typedef struct _MiniCommanderApplet MCData;
 #include "preferences.h"
 
+G_BEGIN_DECLS
+
 /* Constants */
 #define MC_NUM_LISTENERS                12
 #define MC_HISTORY_LIST_LENGTH          50
 #define MC_MAX_COMMAND_LENGTH           505
 #define MC_MAX_NUM_MACRO_PARAMETERS     100
 
-struct _MCData {
-    PanelApplet   *applet;
+struct _MiniCommanderApplet
+{
+    GpApplet       parent;
 
     GSettings     *global_settings;
     GSettings     *settings;
@@ -59,14 +54,14 @@ struct _MCData {
     MCPrefsDialog  prefs_dialog;
 
     gboolean       error;
-    PanelAppletOrient orient;
+    GtkOrientation orient;
 };
 
 void mc_applet_draw (MCData *mc);
 
-void set_atk_name_description (GtkWidget *widget,
-                              const char *name,
-                              const char *description);
+void mc_set_atk_name_description (GtkWidget  *widget,
+                                  const char *name,
+                                  const char *description);
 
 G_END_DECLS
 
diff --git a/mini-commander/src/mini-commander_applet.c b/gnome-applets/mini-commander/mini-commander-applet.c
similarity index 66%
rename from mini-commander/src/mini-commander_applet.c
rename to gnome-applets/mini-commander/mini-commander-applet.c
index 287c640d2..5bb50ea3d 100644
--- a/mini-commander/src/mini-commander_applet.c
+++ b/gnome-applets/mini-commander/mini-commander-applet.c
@@ -1,5 +1,4 @@
- /*
- * Mini-Commander Applet
+/*
  * Copyright (C) 1998 Oliver Maruhn <oliver maruhn com>,
  *               2002 Sun Microsystems
  *
@@ -20,19 +19,19 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
+#include "config.h"
+#include "mini-commander-applet.h"
+
 #include <string.h>
 #include <stdlib.h>
 
 #include <gdk/gdkkeysyms.h>
-
-
+#include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
 
-#include <panel-applet.h>
-#include "mini-commander_applet.h"
+#include "mini-commander-applet-private.h"
 #include "preferences.h"
-#include "command_line.h"
+#include "command-line.h"
 #include "about.h"
 #include "help.h"
 #include "gsettings.h"
@@ -45,13 +44,16 @@
 
 #define COMMANDLINE_DEFAULT_ICON_SIZE 6
 
+G_DEFINE_TYPE (MiniCommanderApplet, mini_commander_applet, GP_TYPE_APPLET)
+
 static gboolean icons_initialized = FALSE;
 static GtkIconSize button_icon_size = 0;
 
 static const GActionEntry mini_commander_menu_actions [] = {
        { "preferences", mc_show_preferences, NULL, NULL, NULL },
        { "help",        show_help,           NULL, NULL, NULL },
-       { "about",       about_box,           NULL, NULL, NULL }
+       { "about",       about_box,           NULL, NULL, NULL },
+       { NULL }
 };
 
 typedef struct {
@@ -108,9 +110,9 @@ command_line_init_stock_icons (void)
 }
 
 void
-set_atk_name_description (GtkWidget  *widget,
-                         const char *name,
-                         const char *description)
+mc_set_atk_name_description (GtkWidget  *widget,
+                             const char *name,
+                             const char *description)
 {
     AtkObject *aobj;
 
@@ -131,7 +133,7 @@ button_press_hack (GtkWidget      *widget,
                   MCData         *mc)
 {
     if (event->button == 3 || event->button == 2) {
-       gtk_propagate_event (GTK_WIDGET (mc->applet), (GdkEvent *) event);
+       gtk_propagate_event (GTK_WIDGET (mc), (GdkEvent *) event);
        return TRUE;
     }
 
@@ -195,7 +197,7 @@ mc_applet_draw (MCData *mc)
         gtk_widget_destroy (mc->applet_box);
     }
 
-    if ( ((mc->orient == PANEL_APPLET_ORIENT_LEFT) || (mc->orient == PANEL_APPLET_ORIENT_RIGHT)) && 
(prefs.panel_size_x < 36) )
+    if ( (mc->orient == GTK_ORIENTATION_VERTICAL) && (prefs.panel_size_x < 36) )
       mc->applet_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
     else
       mc->applet_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -210,7 +212,7 @@ mc_applet_draw (MCData *mc)
     }
 
     /* hbox for message label and buttons */
-    if ((mc->orient == PANEL_APPLET_ORIENT_LEFT) || (mc->orient == PANEL_APPLET_ORIENT_RIGHT))
+    if (mc->orient == GTK_ORIENTATION_VERTICAL)
       if (prefs.panel_size_x < 36)
        hbox_buttons = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
       else
@@ -237,9 +239,9 @@ mc_applet_draw (MCData *mc)
     gtk_widget_set_tooltip_text (button, _("Browser"));
     gtk_box_pack_start (GTK_BOX (hbox_buttons), button, TRUE, TRUE, 0);
 
-    set_atk_name_description (button,
-                             _("Browser"),
-                             _("Click this button to start the browser"));
+    mc_set_atk_name_description (button,
+                                 _("Browser"),
+                                 _("Click this button to start the browser"));
 
     /* add history button */
     button = gtk_button_new ();
@@ -255,67 +257,34 @@ mc_applet_draw (MCData *mc)
     gtk_widget_set_tooltip_text (button, _("History"));
     gtk_box_pack_end (GTK_BOX (hbox_buttons), button, TRUE, TRUE, 0);
 
-    set_atk_name_description (button,
-                             _("History"),
-                             _("Click this button for the list of previous commands"));
+    mc_set_atk_name_description (button,
+                                 _("History"),
+                                 _("Click this button for the list of previous commands"));
 
     gtk_box_pack_start (GTK_BOX (mc->applet_box), mc->entry, TRUE, TRUE, 0);
     gtk_box_pack_start (GTK_BOX (mc->applet_box), hbox_buttons, TRUE, TRUE, 0);
 
-    gtk_container_add (GTK_CONTAINER (mc->applet), mc->applet_box);
+    gtk_container_add (GTK_CONTAINER (mc), mc->applet_box);
 
     gtk_widget_show_all (mc->applet_box);
 }
 
 static void
-mc_destroyed (GtkWidget *widget,
-             MCData    *mc)
+placement_changed_cb (GpApplet            *applet,
+                      GtkOrientation       orientation,
+                      GtkPositionType      position,
+                      MiniCommanderApplet *self)
 {
-    if (mc->global_settings) {
-        g_object_unref (mc->global_settings);
-        mc->global_settings = NULL;
-    }
-
-    if (mc->settings) {
-        g_object_unref (mc->settings);
-        mc->settings = NULL;
-    }
-
-    mc_macros_free (mc->preferences.macros);
-
-    if (mc->preferences.cmd_line_color_fg)
-       g_free (mc->preferences.cmd_line_color_fg);
-
-    if (mc->preferences.cmd_line_color_bg)
-       g_free (mc->preferences.cmd_line_color_bg);
-
-    if (mc->prefs_dialog.dialog)
-        gtk_widget_destroy (mc->prefs_dialog.dialog);
-
-    if (mc->prefs_dialog.dialog)
-        g_object_unref (mc->prefs_dialog.macros_store);
-
-    if (mc->file_select)
-        gtk_widget_destroy (mc->file_select);
-
-    g_free (mc);
+  self->orient = orientation;
+  mc_applet_draw (self);
 }
 
 static void
-mc_orient_changed (PanelApplet *applet,
-                  PanelAppletOrient orient,
-                  MCData *mc)
+mc_pixel_size_changed (GtkWidget     *widget,
+                       GtkAllocation *allocation,
+                       MCData        *mc)
 {
-  mc->orient = orient;
-  mc_applet_draw (mc);
-}
-
-static void
-mc_pixel_size_changed (PanelApplet *applet,
-                      GtkAllocation *allocation,
-                      MCData      *mc)
-{
-  if ((mc->orient == PANEL_APPLET_ORIENT_LEFT) || (mc->orient == PANEL_APPLET_ORIENT_RIGHT)) {
+  if (mc->orient == GTK_ORIENTATION_VERTICAL) {
     if (mc->preferences.panel_size_x == allocation->width)
       return;
     mc->preferences.panel_size_x = allocation->width;
@@ -328,14 +297,12 @@ mc_pixel_size_changed (PanelApplet *applet,
   mc_applet_draw (mc);
 }
 
-static gboolean
-mini_commander_applet_fill (PanelApplet *applet)
+static void
+mini_commander_applet_fill (MCData *mc)
 {
-    MCData *mc;
     GSettings *settings;
-    GSimpleActionGroup *action_group;
+    const char *menu_resource;
     GAction *action;
-    gchar *ui_path;
 
     settings = g_settings_new (GNOME_DESKTOP_LOCKDOWN_SCHEMA);
     if (g_settings_get_boolean (settings, "disable-command-line")) {
@@ -349,81 +316,106 @@ mini_commander_applet_fill (PanelApplet *applet)
 
            gtk_window_set_resizable (GTK_WINDOW (error_dialog), FALSE);
            gtk_window_set_screen (GTK_WINDOW (error_dialog),
-                                  gtk_widget_get_screen (GTK_WIDGET (applet)));
+                                  gtk_widget_get_screen (GTK_WIDGET (mc)));
            gtk_dialog_run (GTK_DIALOG (error_dialog));
            gtk_widget_destroy (error_dialog);
 
            /* Note that this is only kosher if this is an out of process thing,
               which we really are.  We really don't need/want this applet when
               command line is disabled */
-           exit (1);
+           /* exit (1); */
+           g_object_unref (settings);
+           return;
     }
     g_object_unref (settings);
 
-    mc = g_new0 (MCData, 1);
-    mc->applet = applet;
-
     mc->global_settings = g_settings_new (MINI_COMMANDER_GLOBAL_SCHEMA);
-    mc->settings = panel_applet_settings_new (applet, MINI_COMMANDER_SCHEMA);
+    mc->settings = gp_applet_settings_new (GP_APPLET (mc), MINI_COMMANDER_SCHEMA);
 
-    panel_applet_set_flags (applet, PANEL_APPLET_EXPAND_MINOR);
+    gp_applet_set_flags (GP_APPLET (mc), GP_APPLET_FLAGS_EXPAND_MINOR);
     mc_load_preferences (mc);
     command_line_init_stock_icons ();
 
-    g_signal_connect (mc->applet, "change_orient",
-                     G_CALLBACK (mc_orient_changed), mc);
-    g_signal_connect (mc->applet, "size_allocate",
+    g_signal_connect (mc, "placement-changed",
+                     G_CALLBACK (placement_changed_cb), mc);
+    g_signal_connect (mc, "size-allocate",
                      G_CALLBACK (mc_pixel_size_changed), mc);
 
-    mc->orient = panel_applet_get_orient (applet);
+    mc->orient = gp_applet_get_orientation (GP_APPLET (mc));
     mc_applet_draw(mc);
-    gtk_widget_show (GTK_WIDGET (mc->applet));
+    gtk_widget_show (GTK_WIDGET (mc));
 
-    g_signal_connect (mc->applet, "destroy", G_CALLBACK (mc_destroyed), mc);
-    g_signal_connect (mc->applet, "button_press_event",
+    g_signal_connect (mc, "button_press_event",
                      G_CALLBACK (send_button_to_entry_event), mc);
-    g_signal_connect (mc->applet, "key_press_event",
+    g_signal_connect (mc, "key_press_event",
                      G_CALLBACK (key_press_cb), mc);
 
-    action_group = g_simple_action_group_new ();
-    g_action_map_add_action_entries (G_ACTION_MAP (action_group),
-                                     mini_commander_menu_actions,
-                                     G_N_ELEMENTS (mini_commander_menu_actions),
-                                     mc);
-    ui_path = g_build_filename (MC_MENU_UI_DIR, "mini-commander-applet-menu.xml", NULL);
-    panel_applet_setup_menu_from_file (mc->applet, ui_path, action_group, GETTEXT_PACKAGE);
+    menu_resource = GRESOURCE_PREFIX "/ui/mini-commander-applet-menu.xml";
+    gp_applet_setup_menu_from_resource (GP_APPLET (mc),
+                                        menu_resource,
+                                        mini_commander_menu_actions);
 
-       gtk_widget_insert_action_group (GTK_WIDGET (applet), "mc",
-                                       G_ACTION_GROUP (action_group));
-
-    action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "preferences");
-       g_object_bind_property (applet, "locked-down",
+    action = gp_applet_menu_lookup_action (GP_APPLET (mc), "preferences");
+       g_object_bind_property (mc, "locked-down",
                                action, "enabled",
                                G_BINDING_DEFAULT|G_BINDING_INVERT_BOOLEAN|G_BINDING_SYNC_CREATE);
 
-    g_object_unref (action_group);
+    mc_set_atk_name_description (GTK_WIDGET (mc),
+                                 _("Mini-Commander applet"),
+                                 _("This applet adds a command line to the panel"));
+}
+
+static void
+mini_commander_applet_constructed (GObject *object)
+{
+  G_OBJECT_CLASS (mini_commander_applet_parent_class)->constructed (object);
+  mini_commander_applet_fill (MINI_COMMANDER_APPLET (object));
+}
+
+static void
+mini_commander_applet_dispose (GObject *object)
+{
+  MiniCommanderApplet *self;
+
+  self = MINI_COMMANDER_APPLET (object);
+
+  g_clear_object (&self->global_settings);
+  g_clear_object (&self->settings);
 
-    set_atk_name_description (GTK_WIDGET (applet),
-                             _("Mini-Commander applet"),
-                             _("This applet adds a command line to the panel"));
+  if (self->preferences.macros != NULL)
+    {
+      mc_macros_free (self->preferences.macros);
+      self->preferences.macros = NULL;
+    }
+
+  g_clear_pointer (&self->preferences.cmd_line_color_fg, g_free);
+  g_clear_pointer (&self->preferences.cmd_line_color_bg, g_free);
+
+  if (self->prefs_dialog.dialog != NULL)
+    {
+      gtk_widget_destroy (self->prefs_dialog.dialog);
+      g_object_unref (self->prefs_dialog.macros_store);
+
+      self->prefs_dialog.dialog = NULL;
+    }
+
+  g_clear_pointer (&self->file_select, gtk_widget_destroy);
 
-    return TRUE;
+  G_OBJECT_CLASS (mini_commander_applet_parent_class)->dispose (object);
 }
 
-static gboolean
-mini_commander_applet_factory (PanelApplet *applet,
-                              const gchar *iid,
-                              gpointer     data)
+static void
+mini_commander_applet_class_init (MiniCommanderAppletClass *self_class)
 {
-        gboolean retval = FALSE;
+  GObjectClass *object_class;
 
-        if (!strcmp (iid, "MiniCommanderApplet"))
-                retval = mini_commander_applet_fill(applet);
+  object_class = G_OBJECT_CLASS (self_class);
 
-        return retval;
+  object_class->constructed = mini_commander_applet_constructed;
+  object_class->dispose = mini_commander_applet_dispose;
 }
 
-PANEL_APPLET_IN_PROCESS_FACTORY ("MiniCommanderAppletFactory",
-                                 PANEL_TYPE_APPLET,
-                                 mini_commander_applet_factory,
-                                 NULL)
+static void
+mini_commander_applet_init (MiniCommanderApplet *self)
+{
+}
diff --git a/gnome-applets/mini-commander/mini-commander-applet.h 
b/gnome-applets/mini-commander/mini-commander-applet.h
new file mode 100644
index 000000000..d17ee6681
--- /dev/null
+++ b/gnome-applets/mini-commander/mini-commander-applet.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2020 Alberts Muktupāvels
+ *
+ * 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
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MINI_COMMANDER_APPLET_H
+#define MINI_COMMANDER_APPLET_H
+
+#include <libgnome-panel/gp-applet.h>
+
+G_BEGIN_DECLS
+
+#define MINI_COMMANDER_TYPE_APPLET (mini_commander_applet_get_type ())
+G_DECLARE_FINAL_TYPE (MiniCommanderApplet, mini_commander_applet,
+                      MINI_COMMANDER, APPLET, GpApplet)
+
+G_END_DECLS
+
+#endif
diff --git a/mini-commander/src/mini-commander.ui b/gnome-applets/mini-commander/mini-commander.ui
similarity index 100%
rename from mini-commander/src/mini-commander.ui
rename to gnome-applets/mini-commander/mini-commander.ui
diff --git a/mini-commander/src/preferences.c b/gnome-applets/mini-commander/preferences.c
similarity index 98%
rename from mini-commander/src/preferences.c
rename to gnome-applets/mini-commander/preferences.c
index fdb76f515..0df6f54da 100644
--- a/mini-commander/src/preferences.c
+++ b/gnome-applets/mini-commander/preferences.c
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998, 1999 Oliver Maruhn <oliver maruhn com>
  *               2002 Sun Microsystems Inc.
  *
@@ -20,18 +19,15 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
-
+#include "config.h"
 #include "preferences.h"
 
 #include <string.h>
 
+#include <glib/gi18n-lib.h>
 #include <gtk/gtk.h>
 
-#include <panel-applet.h>
-
-#include "mini-commander_applet.h"
-#include "command_line.h"
+#include "command-line.h"
 #include "history.h"
 #include "gsettings.h"
 
@@ -370,7 +366,7 @@ macro_add (GtkWidget *button,
        GtkBuilder *builder;
 
        builder = gtk_builder_new ();
-       gtk_builder_add_from_file (builder, GTK_BUILDERDIR "/mini-commander.ui", NULL);
+       gtk_builder_add_from_resource (builder, GRESOURCE_PREFIX "/ui/mini-commander.ui", NULL);
 
        mc->prefs_dialog.macro_add_dialog = GTK_WIDGET (gtk_builder_get_object (builder, 
"mc_macro_add_dialog"));
 
@@ -383,7 +379,7 @@ macro_add (GtkWidget *button,
     }
 
     gtk_window_set_screen (GTK_WINDOW (mc->prefs_dialog.macro_add_dialog),
-                          gtk_widget_get_screen (GTK_WIDGET (mc->applet)));
+                          gtk_widget_get_screen (GTK_WIDGET (mc)));
     gtk_widget_grab_focus (mc->prefs_dialog.pattern_entry);
     gtk_window_present (GTK_WINDOW (mc->prefs_dialog.macro_add_dialog));
 }
@@ -687,7 +683,7 @@ mc_show_preferences (GSimpleAction *action,
        GtkBuilder *builder;
 
        builder = gtk_builder_new ();
-       gtk_builder_add_from_file (builder, GTK_BUILDERDIR "/mini-commander.ui", NULL);
+       gtk_builder_add_from_resource (builder, GRESOURCE_PREFIX "/ui/mini-commander.ui", NULL);
 
        mc->prefs_dialog.dialog = GTK_WIDGET (gtk_builder_get_object (builder,
                        "mc_preferences_dialog"));
@@ -701,7 +697,7 @@ mc_show_preferences (GSimpleAction *action,
     }
 
     gtk_window_set_screen (GTK_WINDOW (mc->prefs_dialog.dialog),
-                          gtk_widget_get_screen (GTK_WIDGET (mc->applet)));
+                          gtk_widget_get_screen (GTK_WIDGET (mc)));
     gtk_window_present (GTK_WINDOW (mc->prefs_dialog.dialog));
 }
 
@@ -777,7 +773,6 @@ mc_load_preferences (MCData *mc)
     guint i;
 
     g_return_if_fail (mc != NULL);
-    g_return_if_fail (PANEL_IS_APPLET (mc->applet));
 
     mc->preferences.show_default_theme = g_settings_get_boolean (mc->settings, KEY_SHOW_DEFAULT_THEME);
     mc->preferences.auto_complete_history = g_settings_get_boolean (mc->settings, KEY_AUTOCOMPLETE_HISTORY);
diff --git a/mini-commander/src/preferences.h b/gnome-applets/mini-commander/preferences.h
similarity index 97%
rename from mini-commander/src/preferences.h
rename to gnome-applets/mini-commander/preferences.h
index e2f0e6f0c..74fad0520 100644
--- a/mini-commander/src/preferences.h
+++ b/gnome-applets/mini-commander/preferences.h
@@ -1,5 +1,4 @@
 /*
- * Mini-Commander Applet
  * Copyright (C) 1998, 1999 Oliver Maruhn <oliver maruhn com>
  *               2002 Sun Microsystems Inc.
  *
@@ -73,7 +72,7 @@ typedef struct {
     GtkWidget    *command_entry;
 } MCPrefsDialog;
 
-#include "mini-commander_applet.h"
+#include "mini-commander-applet-private.h"
 
 void       mc_load_preferences (MCData            *mc);
 void       mc_show_preferences (GSimpleAction *action,
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8b3057ab7..5413c8482 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -48,6 +48,13 @@ gnome-applets/gweather/gweather-dialog.c
 gnome-applets/gweather/gweather-pref.c
 [type: gettext/glade]gnome-applets/inhibit/inhibit-applet-menu.xml
 gnome-applets/inhibit/inhibit-applet.c
+gnome-applets/mini-commander/about.c
+gnome-applets/mini-commander/command-line.c
+gnome-applets/mini-commander/help.c
+gnome-applets/mini-commander/mini-commander-applet.c
+[type: gettext/glade]gnome-applets/mini-commander/mini-commander-applet-menu.xml
+[type: gettext/glade]gnome-applets/mini-commander/mini-commander.ui
+gnome-applets/mini-commander/preferences.c
 [type: gettext/glade]gnome-applets/netspeed/netspeed-menu.xml
 gnome-applets/netspeed/netspeed-applet.c
 gnome-applets/netspeed/preferences.c
@@ -66,18 +73,6 @@ gnome-applets/window-picker/wp-task-title.c
 [type: gettext/glade]gnome-applets/window-title/window-title.ui
 [type: gettext/glade]gnome-applets/window-title/window-title-menu.xml
 gnome-applets/window-title/window-title.c
-mini-commander/src/about.c
-mini-commander/src/cmd_completion.c
-mini-commander/src/command_line.c
-mini-commander/src/exec.c
-mini-commander/src/help.c
-mini-commander/src/history.c
-mini-commander/src/macro.c
-mini-commander/src/mini-commander_applet.c
-[type: gettext/glade]mini-commander/src/mini-commander-applet-menu.xml
-[type: gettext/glade]mini-commander/src/mini-commander.ui
-[type: gettext/ini]mini-commander/src/org.gnome.applets.MiniCommanderApplet.panel-applet.in.in
-mini-commander/src/preferences.c
 [type: gettext/glade]multiload/multiload-applet-menu.xml
 [type: gettext/ini]multiload/org.gnome.applets.MultiLoadApplet.panel-applet.in.in
 multiload/src/linux-proc.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 937aae214..5b6829c80 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -17,7 +17,6 @@ data/schemas/org.gnome.gnome-applets.timer.gschema.xml.in
 data/schemas/org.gnome.gnome-applets.window-buttons.gschema.xml.in
 data/schemas/org.gnome.gnome-applets.window-picker-applet.gschema.xml.in
 data/schemas/org.gnome.gnome-applets.window-title.gschema.xml.in
-mini-commander/src/org.gnome.applets.MiniCommanderApplet.panel-applet.in
 multiload/org.gnome.applets.MultiLoadApplet.panel-applet.in
 sticky-notes/data/org.gnome.applets.StickyNotesApplet.panel-applet.in
 tracker-search-bar/data/org.gnome.panel.SearchBar.panel-applet.in



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