[gnome-panel/wip/muktupavels/launcher] panel: remove old launcher object



commit a2b2165dad6ef8d8ade36c7b4259ba9916ff1b8d
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Apr 15 21:44:08 2020 +0300

    panel: remove old launcher object
    
    Existing launcher objects will be turned into applets.

 data/Makefile.am                                |    1 -
 data/org.gnome.gnome-panel.launcher.gschema.xml |    9 -
 gnome-panel/Makefile.am                         |    4 -
 gnome-panel/applet.c                            |   12 +-
 gnome-panel/applet.h                            |    3 -
 gnome-panel/button-widget.c                     |   91 +-
 gnome-panel/button-widget.h                     |    7 -
 gnome-panel/launcher.c                          | 1134 ----------------
 gnome-panel/launcher.h                          |   56 -
 gnome-panel/libpanel-util/Makefile.am           |    2 -
 gnome-panel/libpanel-util/panel-icon-chooser.c  |  549 --------
 gnome-panel/libpanel-util/panel-icon-chooser.h  |   73 -
 gnome-panel/libpanel-util/panel-keyfile.c       |  106 --
 gnome-panel/libpanel-util/panel-keyfile.h       |   12 -
 gnome-panel/libpanel-util/panel-launch.c        |   30 +-
 gnome-panel/libpanel-util/panel-launch.h        |   11 -
 gnome-panel/libpanel-util/panel-xdg.c           |   99 --
 gnome-panel/libpanel-util/panel-xdg.h           |    3 -
 gnome-panel/panel-addto-dialog.c                |  407 +-----
 gnome-panel/panel-addto-dialog.ui               |   23 +-
 gnome-panel/panel-ditem-editor.c                | 1617 -----------------------
 gnome-panel/panel-ditem-editor.h                |  105 --
 gnome-panel/panel-enums.h                       |    1 -
 gnome-panel/panel-object-loader.c               |    9 +-
 gnome-panel/panel-schemas.h                     |    3 -
 gnome-panel/panel-util.c                        |  100 +-
 gnome-panel/panel-util.h                        |   15 -
 gnome-panel/panel.c                             |   31 +-
 po/POTFILES.in                                  |    4 -
 29 files changed, 28 insertions(+), 4489 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 5d8d1ae7a..67339eae9 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -16,7 +16,6 @@ gsettings_SCHEMAS = \
        org.gnome.gnome-panel.applet.clock.gschema.xml \
        org.gnome.gnome-panel.applet.initial-settings.gschema.xml \
        org.gnome.gnome-panel.gschema.xml \
-       org.gnome.gnome-panel.launcher.gschema.xml \
        org.gnome.gnome-panel.object.gschema.xml \
        org.gnome.gnome-panel.toplevel.gschema.xml \
        $(NULL)
diff --git a/gnome-panel/Makefile.am b/gnome-panel/Makefile.am
index 569567940..339781195 100644
--- a/gnome-panel/Makefile.am
+++ b/gnome-panel/Makefile.am
@@ -33,7 +33,6 @@ panel_sources =                       \
        panel-util.c            \
        panel-run-dialog.c      \
        panel-context-menu.c    \
-       launcher.c              \
        panel-applet-frame.c    \
        panel-applets-manager.c \
        panel-action-button.c   \
@@ -47,7 +46,6 @@ panel_sources =                       \
        panel-force-quit.c      \
        panel-lockdown.c        \
        panel-addto-dialog.c    \
-       panel-ditem-editor.c    \
        panel-layout.c          \
        panel-object-loader.c   \
        panel-applet-info.c
@@ -61,7 +59,6 @@ panel_headers =                       \
        panel-util.h            \
        panel-run-dialog.h      \
        panel-context-menu.h    \
-       launcher.h              \
        panel-applet-frame.h    \
        panel-applets-manager.h \
        panel-action-button.h   \
@@ -77,7 +74,6 @@ panel_headers =                       \
        panel-force-quit.h      \
        panel-lockdown.h        \
        panel-addto-dialog.h    \
-       panel-ditem-editor.h    \
        panel-icon-names.h      \
        panel-layout.h          \
        panel-object-loader.h   \
diff --git a/gnome-panel/applet.c b/gnome-panel/applet.c
index ece1599e9..7779e22c5 100644
--- a/gnome-panel/applet.c
+++ b/gnome-panel/applet.c
@@ -19,7 +19,6 @@
 #include <libpanel-util/panel-show.h>
 
 #include "button-widget.h"
-#include "launcher.h"
 #include "panel.h"
 #include "panel-bindings.h"
 #include "panel-applet-frame.h"
@@ -72,9 +71,6 @@ panel_applet_clean (AppletInfo *info)
 {
        g_return_if_fail (info != NULL);
 
-       if (info->type == PANEL_OBJECT_LAUNCHER)
-               panel_launcher_delete (info->data);
-
        if (info->widget) {
                GtkWidget *widget = info->widget;
 
@@ -136,12 +132,6 @@ applet_callback_callback (GtkWidget      *widget,
        g_return_if_fail (menu->info != NULL);
 
        switch (menu->info->type) {
-       case PANEL_OBJECT_LAUNCHER:
-               if (!strcmp (menu->name, "launch"))
-                       launcher_launch (menu->info->data, widget);
-               else if (!strcmp (menu->name, "properties"))
-                       launcher_properties (menu->info->data);
-               break;
        case PANEL_OBJECT_ACTION:
                panel_action_button_invoke_menu (
                        PANEL_ACTION_BUTTON (menu->info->widget), menu->name);
@@ -181,7 +171,7 @@ applet_menu_deactivate (GtkWidget *w,
        panel_toplevel_pop_autohide_disabler (panel_widget->toplevel);
 }
 
-AppletUserMenu *
+static AppletUserMenu *
 panel_applet_get_callback (GList      *user_menu,
                           const char *name)
 {
diff --git a/gnome-panel/applet.h b/gnome-panel/applet.h
index 3edfa56e8..91541737d 100644
--- a/gnome-panel/applet.h
+++ b/gnome-panel/applet.h
@@ -64,9 +64,6 @@ void            panel_applet_add_callback    (AppletInfo          *info,
                                              const gchar         *menuitem_text,
                                              CallbackEnabledFunc  is_enabled_func);
 
-AppletUserMenu *panel_applet_get_callback    (GList       *user_menu,
-                                             const gchar *name);
-
 void        panel_applet_save_position           (AppletInfo *applet_info,
                                                  const char *id,
                                                  gboolean    immediate);
diff --git a/gnome-panel/button-widget.c b/gnome-panel/button-widget.c
index e223805ab..e77b3f901 100644
--- a/gnome-panel/button-widget.c
+++ b/gnome-panel/button-widget.c
@@ -25,7 +25,6 @@ struct _ButtonWidgetPrivate {
        int               size;
 
        guint             activatable   : 1;
-       guint             dnd_highlight : 1;
 };
 
 static void button_widget_icon_theme_changed (ButtonWidget *button);
@@ -34,7 +33,6 @@ static void button_widget_reload_pixbuf (ButtonWidget *button);
 enum {
        PROP_0,
        PROP_ACTIVATABLE,
-       PROP_DND_HIGHLIGHT,
        PROP_ORIENTATION,
        PROP_ICON_NAME
 };
@@ -213,9 +211,6 @@ button_widget_get_property (GObject    *object,
        case PROP_ACTIVATABLE:
                g_value_set_boolean (value, button->priv->activatable);
                break;
-       case PROP_DND_HIGHLIGHT:
-               g_value_set_boolean (value, button->priv->dnd_highlight);
-               break;
        case PROP_ORIENTATION:
                g_value_set_enum (value, button->priv->orientation);
                break;
@@ -242,9 +237,6 @@ button_widget_set_property (GObject      *object,
        case PROP_ACTIVATABLE:
                button_widget_set_activatable (button, g_value_get_boolean (value));
                break;
-       case PROP_DND_HIGHLIGHT:
-               button_widget_set_dnd_highlight (button, g_value_get_boolean (value));
-               break;
        case PROP_ORIENTATION:
                button_widget_set_orientation (button, g_value_get_enum (value));
                break;
@@ -313,15 +305,6 @@ button_widget_draw (GtkWidget *widget,
 
         context = gtk_widget_get_style_context (widget);
 
-       if (button_widget->priv->dnd_highlight) {
-                cairo_save (cr);
-                cairo_set_line_width (cr, 1);
-                cairo_set_source_rgb (cr, 0., 0., 0.);
-                cairo_rectangle (cr, 0.5, 0.5, width - 1, height - 1);
-                cairo_stroke (cr);
-                cairo_restore (cr);
-       }
-
        if (gtk_widget_has_focus (widget)) {
                 gtk_style_context_save (context);
                 gtk_style_context_set_state (context, state_flags);
@@ -525,15 +508,14 @@ button_widget_init (ButtonWidget *button)
        button->priv->pixbuf_hc  = NULL;
 
        button->priv->filename   = NULL;
-       
+
        button->priv->orientation = PANEL_ORIENTATION_TOP;
        context = gtk_widget_get_style_context (GTK_WIDGET (button));
        gtk_style_context_add_class (context, GTK_STYLE_CLASS_HORIZONTAL);
 
        button->priv->size = 0;
-       
+
        button->priv->activatable   = FALSE;
-       button->priv->dnd_highlight = FALSE;
 }
 
 static void
@@ -568,15 +550,6 @@ button_widget_class_init (ButtonWidgetClass *klass)
                                              TRUE,
                                              G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 
-       g_object_class_install_property (
-                       gobject_class,
-                       PROP_DND_HIGHLIGHT,
-                       g_param_spec_boolean ("dnd-highlight",
-                                             "Drag and drop Highlight",
-                                             "Whether or not to highlight the icon during drag and drop",
-                                             FALSE,
-                                             G_PARAM_READWRITE));
-
        g_object_class_install_property (
                        gobject_class,
                        PROP_ORIENTATION,
@@ -605,21 +578,6 @@ button_widget_class_init (ButtonWidgetClass *klass)
                                              G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 }
 
-GtkWidget *
-button_widget_new (const char       *filename,
-                  PanelOrientation  orientation)
-{
-       GtkWidget *retval;
-
-       retval = g_object_new (
-                       BUTTON_TYPE_WIDGET,
-                       "orientation", orientation,
-                       "icon-name", filename,
-                       NULL);
-       
-       return retval;
-}
-
 void
 button_widget_set_activatable (ButtonWidget *button,
                               gboolean      activatable)
@@ -687,48 +645,3 @@ button_widget_set_orientation (ButtonWidget     *button,
 
        g_object_notify (G_OBJECT (button), "orientation");
 }
-
-PanelOrientation
-button_widget_get_orientation (ButtonWidget *button)
-{
-       g_return_val_if_fail (BUTTON_IS_WIDGET (button), 0);
-
-       return button->priv->orientation;
-}
-
-void
-button_widget_set_dnd_highlight (ButtonWidget *button,
-                                gboolean      dnd_highlight)
-{
-       g_return_if_fail (BUTTON_IS_WIDGET (button));
-
-       dnd_highlight = dnd_highlight != FALSE;
-
-       if (button->priv->dnd_highlight == dnd_highlight)
-               return;
-
-       button->priv->dnd_highlight = dnd_highlight;
-
-       gtk_widget_queue_draw (GTK_WIDGET (button));
-
-       g_object_notify (G_OBJECT (button), "dnd-highlight");
-}
-
-GtkIconTheme *
-button_widget_get_icon_theme (ButtonWidget *button)
-{
-       g_return_val_if_fail (BUTTON_IS_WIDGET (button), NULL);
-
-       return button->priv->icon_theme;
-}
-
-GdkPixbuf *
-button_widget_get_pixbuf (ButtonWidget *button)
-{
-       g_return_val_if_fail (BUTTON_IS_WIDGET (button), NULL);
-
-       if (!button->priv->pixbuf)
-               return NULL;
-
-       return g_object_ref (button->priv->pixbuf);
-}
diff --git a/gnome-panel/button-widget.h b/gnome-panel/button-widget.h
index dc87fd3d1..9bdc6fd9b 100644
--- a/gnome-panel/button-widget.h
+++ b/gnome-panel/button-widget.h
@@ -27,19 +27,12 @@ struct _ButtonWidgetClass {
 };
 
 GType            button_widget_get_type          (void) G_GNUC_CONST;
-GtkWidget *      button_widget_new               (const char       *pixmap,
-                                                 PanelOrientation  orientation);
 void             button_widget_set_activatable   (ButtonWidget     *button,
                                                  gboolean          activatable);
 void             button_widget_set_icon_name     (ButtonWidget     *button,
                                                  const char       *icon_name);
 void             button_widget_set_orientation   (ButtonWidget     *button,
                                                  PanelOrientation  orientation);
-PanelOrientation button_widget_get_orientation   (ButtonWidget     *button);
-void             button_widget_set_dnd_highlight (ButtonWidget     *button,
-                                                 gboolean          dnd_highlight);
-GtkIconTheme    *button_widget_get_icon_theme    (ButtonWidget     *button);
-GdkPixbuf       *button_widget_get_pixbuf        (ButtonWidget     *button);
 
 G_END_DECLS
 
diff --git a/gnome-panel/libpanel-util/Makefile.am b/gnome-panel/libpanel-util/Makefile.am
index 122f18f82..425e110ba 100644
--- a/gnome-panel/libpanel-util/Makefile.am
+++ b/gnome-panel/libpanel-util/Makefile.am
@@ -38,8 +38,6 @@ libpanel_util_la_SOURCES =            \
        panel-gsettings.h               \
        panel-gtk.c                     \
        panel-gtk.h                     \
-       panel-icon-chooser.c            \
-       panel-icon-chooser.h            \
        panel-keyfile.c                 \
        panel-keyfile.h                 \
        panel-launch.c                  \
diff --git a/gnome-panel/libpanel-util/panel-keyfile.c b/gnome-panel/libpanel-util/panel-keyfile.c
index b43792491..22934f4b1 100644
--- a/gnome-panel/libpanel-util/panel-keyfile.c
+++ b/gnome-panel/libpanel-util/panel-keyfile.c
@@ -152,57 +152,6 @@ panel_key_file_to_file (GKeyFile     *keyfile,
        return res;
 }
 
-gboolean
-panel_key_file_load_from_uri (GKeyFile       *keyfile,
-                             const gchar    *uri,
-                             GKeyFileFlags   flags,
-                             GError        **error)
-{
-       char     *scheme;
-       gboolean  is_local;
-       gboolean  result;
-
-       g_return_val_if_fail (keyfile != NULL, FALSE);
-       g_return_val_if_fail (uri != NULL, FALSE);
-       g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-
-       scheme = g_uri_parse_scheme (uri);
-       is_local = (scheme == NULL) || !g_ascii_strcasecmp (scheme, "file");
-       g_free (scheme);
-
-       if (is_local) {
-               char *path;
-
-               if (g_path_is_absolute (uri))
-                       path = g_filename_from_utf8 (uri, -1, NULL, NULL, NULL);
-               else
-                       path = g_filename_from_uri (uri, NULL, NULL);
-               result = g_key_file_load_from_file (keyfile, path,
-                                                   flags, error);
-               g_free (path);
-       } else {
-               GFile   *file;
-               char    *contents;
-               gsize    size;
-               gboolean ret;
-
-               file = g_file_new_for_uri (uri);
-               ret = g_file_load_contents (file, NULL, &contents, &size,
-                                           NULL, NULL);
-               g_object_unref (file);
-               
-               if (!ret)
-                       return FALSE;
-
-               result = g_key_file_load_from_data (keyfile, contents, size,
-                                                   flags, error);
-
-               g_free (contents);
-       }
-
-       return result;
-}
-
 gboolean
 panel_key_file_get_boolean (GKeyFile    *keyfile,
                            const gchar *key,
@@ -247,58 +196,3 @@ panel_key_file_set_locale_string (GKeyFile    *keyfile,
                g_key_file_set_string (keyfile, G_KEY_FILE_DESKTOP_GROUP,
                                       key, value);
 }
-
-void
-panel_key_file_remove_all_locale_key (GKeyFile    *keyfile,
-                                     const gchar *key)
-{
-       char **keys;
-       int    key_len;
-       int    i;
-
-       if (!key)
-               return;
-
-       keys = g_key_file_get_keys (keyfile, G_KEY_FILE_DESKTOP_GROUP, NULL, NULL);
-       if (!keys)
-               return;
-
-       key_len = strlen (key);
-
-       for (i = 0; keys[i] != NULL; i++) {
-               int len;
-
-               if (strncmp (keys[i], key, key_len))
-                       continue;
-
-               len = strlen (keys[i]);
-               if (len == key_len ||
-                   (len > key_len && keys[i][key_len] == '['))
-                       g_key_file_remove_key (keyfile, G_KEY_FILE_DESKTOP_GROUP,
-                                              keys[i], NULL);
-       }
-
-       g_strfreev (keys);
-}
-
-void
-panel_key_file_ensure_C_key (GKeyFile   *keyfile,
-                            const char *key)
-{
-       char *C_value;
-       char *buffer;
-
-       /* Make sure we set the "C" locale strings to the terms we set here.
-        * This is so that if the user logs into another locale they get their
-        * own description there rather then empty. It is not the C locale
-        * however, but the user created this entry herself so it's OK */
-       C_value = panel_key_file_get_string (keyfile, key);
-       if (C_value == NULL || C_value [0] == '\0') {
-               buffer = panel_key_file_get_locale_string (keyfile, key);
-               if (buffer) {
-                       panel_key_file_set_string (keyfile, key, buffer);
-                       g_free (buffer);
-               }
-       }
-       g_free (C_value);
-}
diff --git a/gnome-panel/libpanel-util/panel-keyfile.h b/gnome-panel/libpanel-util/panel-keyfile.h
index 7c5060f73..91f4401bc 100644
--- a/gnome-panel/libpanel-util/panel-keyfile.h
+++ b/gnome-panel/libpanel-util/panel-keyfile.h
@@ -29,15 +29,10 @@
 
 G_BEGIN_DECLS
 
-
 GKeyFile *panel_key_file_new_desktop  (void);
 gboolean  panel_key_file_to_file      (GKeyFile       *keyfile,
                                       const gchar    *file,
                                       GError        **error);
-gboolean panel_key_file_load_from_uri (GKeyFile       *keyfile,
-                                      const gchar    *uri,
-                                      GKeyFileFlags   flags,
-                                      GError        **error);
 
 gboolean panel_key_file_get_boolean   (GKeyFile       *keyfile,
                                       const gchar    *key,
@@ -55,13 +50,6 @@ void    panel_key_file_set_locale_string (GKeyFile    *keyfile,
                                          const gchar *key,
                                          const gchar *value);
 
-#define panel_key_file_remove_key(key_file, key) \
-       g_key_file_remove_key (key_file, G_KEY_FILE_DESKTOP_GROUP, key, NULL)
-void panel_key_file_remove_all_locale_key (GKeyFile    *keyfile,
-                                          const gchar *key);
-void panel_key_file_ensure_C_key      (GKeyFile   *keyfile,
-                                      const char *key);
-
 G_END_DECLS
 
 #endif /* PANEL_KEYFILE_H */
diff --git a/gnome-panel/libpanel-util/panel-launch.c b/gnome-panel/libpanel-util/panel-launch.c
index 44ebfdef1..290315ef2 100644
--- a/gnome-panel/libpanel-util/panel-launch.c
+++ b/gnome-panel/libpanel-util/panel-launch.c
@@ -99,7 +99,7 @@ gather_pid_callback (GDesktopAppInfo   *gapp,
   g_child_watch_add (pid, dummy_child_watch, NULL);
 }
 
-gboolean
+static gboolean
 panel_app_info_launch_uris (GAppInfo   *appinfo,
                            GList      *uris,
                            GdkScreen  *screen,
@@ -132,34 +132,6 @@ panel_app_info_launch_uris (GAppInfo   *appinfo,
                                           screen, local_error, error);
 }
 
-gboolean
-panel_launch_key_file (GKeyFile   *keyfile,
-                      GList      *uri_list,
-                      GdkScreen  *screen,
-                      GError    **error)
-{
-       GDesktopAppInfo *appinfo;
-       gboolean         retval;
-
-       g_return_val_if_fail (keyfile != NULL, FALSE);
-       g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
-       g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-
-       appinfo = g_desktop_app_info_new_from_keyfile (keyfile);
-
-       if (appinfo == NULL)
-               return FALSE;
-
-       retval = panel_app_info_launch_uris (G_APP_INFO (appinfo),
-                                            uri_list, screen,
-                                            gtk_get_current_event_time (),
-                                            error);
-
-       g_object_unref (appinfo);
-
-       return retval;
-}
-
 gboolean
 panel_launch_desktop_file (const char  *desktop_file,
                           GdkScreen   *screen,
diff --git a/gnome-panel/libpanel-util/panel-launch.h b/gnome-panel/libpanel-util/panel-launch.h
index b2c5a4bd3..608482bca 100644
--- a/gnome-panel/libpanel-util/panel-launch.h
+++ b/gnome-panel/libpanel-util/panel-launch.h
@@ -28,17 +28,6 @@
 
 G_BEGIN_DECLS
 
-gboolean panel_app_info_launch_uris (GAppInfo   *appinfo,
-                                    GList      *uris,
-                                    GdkScreen  *screen,
-                                    guint32     timestamp,
-                                    GError    **error);
-
-gboolean panel_launch_key_file (GKeyFile   *keyfile,
-                               GList      *uri_list,
-                               GdkScreen  *screen,
-                               GError    **error);
-
 gboolean panel_launch_desktop_file (const char  *desktop_file,
                                    GdkScreen   *screen,
                                    GError     **error);
diff --git a/gnome-panel/libpanel-util/panel-xdg.c b/gnome-panel/libpanel-util/panel-xdg.c
index 6c2f242dd..f9c9ef74c 100644
--- a/gnome-panel/libpanel-util/panel-xdg.c
+++ b/gnome-panel/libpanel-util/panel-xdg.c
@@ -27,8 +27,6 @@
 
 #include "panel-xdg.h"
 
-#define DEFAULT_THEME_NAME "hicolor"
-
 /*
  * Originally based on code from panel-util.c. This part of the code was:
  * Copyright (C) 2006 Vincent Untz <vuntz gnome org>
@@ -51,100 +49,3 @@ panel_xdg_icon_remove_extension (const char *icon)
 
        return icon_no_extension;
 }
-
-/*
- * End of code coming from panel-util.c
- */
-
-char *
-panel_xdg_icon_name_from_icon_path (const char *path,
-                                   GdkScreen  *screen)
-{
-       GtkIconTheme  *theme;
-       GtkSettings   *settings;
-       char          *theme_name;
-       char          *icon;
-       char         **paths;
-       int            n_paths;
-       int            i;
-       GFile         *file;
-
-       /* we look if the icon comes from the current icon theme */
-       if (!screen)
-               screen = gdk_screen_get_default ();
-
-       settings = gtk_settings_get_for_screen (screen);
-       g_object_get (settings,
-                     "gtk-icon-theme-name", &theme_name,
-                     NULL);
-
-       theme = gtk_icon_theme_get_for_screen (screen);
-       gtk_icon_theme_get_search_path (theme, &paths, &n_paths);
-
-       file = g_file_new_for_path (path);
-       icon = NULL;
-
-       for (i = 0; i < n_paths; i++) {
-               GFile *parent;
-               char  *basename;
-
-               parent = g_file_new_for_path (paths[i]);
-
-               if (!g_file_has_prefix (file, parent)) {
-                       g_object_unref (parent);
-                       continue;
-               }
-
-               basename = g_file_get_basename (parent);
-
-               if (g_strcmp0 (basename, "pixmaps") == 0) {
-                       char *relative_path;
-
-                       relative_path = g_file_get_relative_path (parent, file);
-
-                       /* if the icon is in a subdir of pixmaps, then it's not
-                        * a real icon name */
-                       if (!strchr (relative_path, G_DIR_SEPARATOR))
-                               icon = panel_xdg_icon_remove_extension (relative_path);
-
-                       g_free (relative_path);
-               } else {
-                       /* real icon theme; but is it the current one? */
-                       GFile    *theme_dir;
-                       gboolean  current;
-
-                       theme_dir = g_file_get_child (parent, theme_name);
-
-                       current = FALSE;
-                       if (g_file_has_prefix (file, theme_dir)) {
-                               /* it's the current one */
-                               current = TRUE;
-                       } else {
-                               /* it's the default one */
-                               g_object_unref (theme_dir);
-                               theme_dir = g_file_get_child (parent, DEFAULT_THEME_NAME);
-                               current = g_file_has_prefix (file, theme_dir);
-                       }
-
-                       g_object_unref (theme_dir);
-
-                       if (current) {
-                               char *buffer;
-
-                               buffer = g_file_get_basename (file);
-                               icon = panel_xdg_icon_remove_extension (buffer);
-                               g_free (buffer);
-                       }
-               }
-
-               g_free (basename);
-               g_object_unref (parent);
-
-               break;
-       }
-
-       g_object_unref (file);
-       g_free (theme_name);
-
-       return icon;
-}
diff --git a/gnome-panel/libpanel-util/panel-xdg.h b/gnome-panel/libpanel-util/panel-xdg.h
index 86c7b9f87..08cc082ae 100644
--- a/gnome-panel/libpanel-util/panel-xdg.h
+++ b/gnome-panel/libpanel-util/panel-xdg.h
@@ -29,9 +29,6 @@ G_BEGIN_DECLS
 
 char *panel_xdg_icon_remove_extension (const char *icon);
 
-char *panel_xdg_icon_name_from_icon_path (const char *path,
-                                         GdkScreen  *screen);
-
 G_END_DECLS
 
 #endif /* PANEL_XDG_H */
diff --git a/gnome-panel/panel-addto-dialog.c b/gnome-panel/panel-addto-dialog.c
index b9515a82e..f5cfed709 100644
--- a/gnome-panel/panel-addto-dialog.c
+++ b/gnome-panel/panel-addto-dialog.c
@@ -26,11 +26,8 @@
 #include <glib/gi18n.h>
 #include <gdk/gdkx.h>
 
-#include <gmenu-tree.h>
-
 #include <libpanel-util/panel-glib.h>
 
-#include "launcher.h"
 #include "panel.h"
 #include "panel-applets-manager.h"
 #include "panel-applet-frame.h"
@@ -50,22 +47,14 @@ struct _PanelAddtoDialog
        GtkWidget    *dialog_vbox;
        GtkWidget    *label;
        GtkWidget    *search_entry;
-       GtkWidget    *back_button;
        GtkWidget    *add_button;
        GtkWidget    *close_button;
        GtkWidget    *tree_view;
-       GtkWidget    *tree_view_selection;
 
        GtkTreeModel *applet_model;
        GtkTreeModel *filter_applet_model;
-       GtkTreeModel *application_model;
-       GtkTreeModel *filter_application_model;
-
-       GMenuTree    *menu_tree;
 
        GSList       *applet_list;
-       GSList       *application_list;
-       GSList       *settings_list;
 
        gchar        *search_text;
        gchar        *applet_search_text;
@@ -79,11 +68,7 @@ static GQuark panel_addto_dialog_quark = 0;
 
 typedef enum {
        PANEL_ADDTO_APPLET,
-       PANEL_ADDTO_ACTION,
-       PANEL_ADDTO_LAUNCHER_MENU,
-       PANEL_ADDTO_LAUNCHER,
-       PANEL_ADDTO_LAUNCHER_NEW,
-       PANEL_ADDTO_MENU
+       PANEL_ADDTO_ACTION
 } PanelAddtoItemType;
 
 typedef struct {
@@ -92,7 +77,6 @@ typedef struct {
        char                  *description;
        GIcon                 *icon;
        PanelActionButtonType  action_type;
-       char                  *launcher_path;
        char                  *iid;
 } PanelAddtoItemInfo;
 
@@ -109,8 +93,6 @@ enum {
        NUMBER_COLUMNS
 };
 
-static void panel_addto_present_applications (PanelAddtoDialog *dialog);
-static void panel_addto_present_applets      (PanelAddtoDialog *dialog);
 static gboolean panel_addto_filter_func (GtkTreeModel *model,
                                         GtkTreeIter  *iter,
                                         gpointer      data);
@@ -243,23 +225,6 @@ panel_addto_setup_drag (GtkTreeView          *tree_view,
                                NULL);
 }
 
-static void
-panel_addto_setup_launcher_drag (GtkTreeView *tree_view,
-                                const char  *path)
-{
-       static const GtkTargetEntry target[] = {
-               { (gchar *) "text/uri-list", 0, 0 }
-       };
-       char *uri;
-       char *uri_list;
-
-       uri = g_filename_to_uri (path, NULL, NULL);
-       uri_list = g_strconcat (uri, "\r\n", NULL);
-       panel_addto_setup_drag (tree_view, target, uri_list);
-       g_free (uri_list);
-       g_free (uri);
-}
-
 static void
 panel_addto_setup_applet_drag (GtkTreeView *tree_view,
                               const char  *iid)
@@ -354,33 +319,6 @@ panel_addto_append_item (PanelAddtoDialog *dialog,
        }
 }
 
-static void
-panel_addto_append_special_applets (PanelAddtoDialog *dialog,
-                                   GtkListStore *model)
-{
-       PanelAddtoItemInfo *special;
-
-       if (!panel_lockdown_get_disable_command_line_s ()) {
-               special = g_new0 (PanelAddtoItemInfo, 1);
-               special->type = PANEL_ADDTO_LAUNCHER_NEW;
-               special->name = g_strdup (_("Custom Application Launcher"));
-               special->description = g_strdup (_("Create a new launcher"));
-               special->icon = g_themed_icon_new (PANEL_ICON_LAUNCHER);
-               special->action_type = PANEL_ACTION_NONE;
-               special->iid = g_strdup ("LAUNCHER:ASK");
-               panel_addto_append_item (dialog, model, special);
-       }
-
-       special = g_new0 (PanelAddtoItemInfo, 1);
-       special->type = PANEL_ADDTO_LAUNCHER_MENU;
-       special->name = g_strdup (_("Application Launcher..."));
-       special->description = g_strdup (_("Copy a launcher from the applications menu"));
-       special->icon = g_themed_icon_new (PANEL_ICON_LAUNCHER);
-       special->action_type = PANEL_ACTION_NONE;
-       special->iid = g_strdup ("LAUNCHER:MENU");
-       panel_addto_append_item (dialog, model, special);
-}
-
 static void
 panel_addto_make_applet_model (PanelAddtoDialog *dialog)
 {
@@ -405,7 +343,6 @@ panel_addto_make_applet_model (PanelAddtoDialog *dialog)
                                    G_TYPE_STRING);
 
        if (panel_layout_is_writable ()) {
-               panel_addto_append_special_applets (dialog, model);
                if (dialog->applet_list)
                        panel_addto_append_item (dialog, model, NULL);
        }
@@ -421,257 +358,6 @@ panel_addto_make_applet_model (PanelAddtoDialog *dialog)
                                                dialog, NULL);
 }
 
-typedef enum {
-       PANEL_ADDTO_MENU_SHOW_DIRECTORIES = 1 << 0,
-       PANEL_ADDTO_MENU_SHOW_ENTRIES     = 1 << 1,
-       PANEL_ADDTO_MENU_SHOW_ALIAS       = 1 << 2
-#define PANEL_ADDTO_MENU_SHOW_ALL (PANEL_ADDTO_MENU_SHOW_DIRECTORIES | PANEL_ADDTO_MENU_SHOW_ENTRIES | 
PANEL_ADDTO_MENU_SHOW_ALIAS)
-} PanelAddtoMenuShowFlags;
-
-static void panel_addto_make_application_list (GSList                  **parent_list,
-                                              GMenuTreeDirectory       *directory,
-                                              const char               *filename,
-                                              PanelAddtoMenuShowFlags   show_flags);
-
-static void
-panel_addto_prepend_directory (GSList             **parent_list,
-                              GMenuTreeDirectory  *directory,
-                              const char          *filename)
-{
-       PanelAddtoAppList *data;
-       GIcon *icon;
-
-       data = g_new0 (PanelAddtoAppList, 1);
-
-       icon = gmenu_tree_directory_get_icon (directory);
-       if (icon)
-               g_object_ref (icon);
-
-       data->item_info.type          = PANEL_ADDTO_MENU;
-       data->item_info.name          = g_strdup (gmenu_tree_directory_get_name (directory));
-       data->item_info.description   = g_strdup (gmenu_tree_directory_get_comment (directory));
-       data->item_info.icon          = icon;
-
-       *parent_list = g_slist_prepend (*parent_list, data);
-
-       /* We always want to show everything in non-root directories */
-       panel_addto_make_application_list (&data->children, directory,
-                                          filename, PANEL_ADDTO_MENU_SHOW_ALL);
-}
-
-static void
-panel_addto_prepend_entry (GSList         **parent_list,
-                          GMenuTreeEntry  *entry,
-                          const char      *filename)
-{
-       PanelAddtoAppList *data;
-       GAppInfo *app_info;
-       GIcon *icon;
-
-       data = g_new0 (PanelAddtoAppList, 1);
-
-       app_info = G_APP_INFO (gmenu_tree_entry_get_app_info (entry));
-
-       icon = g_app_info_get_icon (app_info);
-       if (icon)
-               g_object_ref (icon);
-
-       data->item_info.type          = PANEL_ADDTO_LAUNCHER;
-       data->item_info.name          = g_strdup (g_app_info_get_display_name (app_info));
-       data->item_info.description   = g_strdup (g_app_info_get_description (app_info));
-       data->item_info.icon          = icon;
-       data->item_info.launcher_path = g_strdup (gmenu_tree_entry_get_desktop_file_path (entry));
-
-       *parent_list = g_slist_prepend (*parent_list, data);
-}
-
-static void
-panel_addto_prepend_alias (GSList         **parent_list,
-                          GMenuTreeAlias  *alias,
-                          const char      *filename)
-{
-       GMenuTreeItemType type;
-
-       type = gmenu_tree_alias_get_aliased_item_type (alias);
-
-       if (type == GMENU_TREE_ITEM_DIRECTORY) {
-               GMenuTreeDirectory *directory = gmenu_tree_alias_get_aliased_directory (alias);
-               panel_addto_prepend_directory (parent_list,
-                                              directory,
-                                              filename);
-               gmenu_tree_item_unref (directory);
-       } else if (type == GMENU_TREE_ITEM_ENTRY) {
-               GMenuTreeEntry *entry = gmenu_tree_alias_get_aliased_entry (alias);
-               panel_addto_prepend_entry (parent_list,
-                                          entry,
-                                          filename);
-               gmenu_tree_item_unref (entry);
-       }
-}
-
-static void
-panel_addto_make_application_list (GSList                  **parent_list,
-                                  GMenuTreeDirectory       *directory,
-                                  const char               *filename,
-                                  PanelAddtoMenuShowFlags   show_flags)
-{
-       GMenuTreeIter *iter;
-       GMenuTreeItemType next_type;
-
-       iter = gmenu_tree_directory_iter (directory);
-
-       while ((next_type = gmenu_tree_iter_next (iter)) != GMENU_TREE_ITEM_INVALID) {
-               if (next_type == GMENU_TREE_ITEM_DIRECTORY) {
-                       if (show_flags & PANEL_ADDTO_MENU_SHOW_DIRECTORIES) {
-                               GMenuTreeDirectory *dir = gmenu_tree_iter_get_directory (iter);
-                               panel_addto_prepend_directory (parent_list, dir, filename);
-                               gmenu_tree_item_unref (dir);
-                       }
-               } else if (next_type == GMENU_TREE_ITEM_ENTRY) {
-                       if (show_flags & PANEL_ADDTO_MENU_SHOW_ENTRIES) {
-                               GMenuTreeEntry *entry = gmenu_tree_iter_get_entry (iter);
-                               panel_addto_prepend_entry (parent_list, entry, filename);
-                               gmenu_tree_item_unref (entry);
-                       }
-               } else if (next_type == GMENU_TREE_ITEM_ALIAS) {
-                       if (show_flags & PANEL_ADDTO_MENU_SHOW_ALIAS) {
-                               GMenuTreeAlias *alias = gmenu_tree_iter_get_alias (iter);
-                               panel_addto_prepend_alias (parent_list, alias, filename);
-                               gmenu_tree_item_unref (alias);
-                       }
-               }
-       }
-       gmenu_tree_iter_unref (iter);
-
-       *parent_list = g_slist_reverse (*parent_list);
-}
-
-static void
-panel_addto_populate_application_model (GtkTreeStore *store,
-                                       GtkTreeIter  *parent,
-                                       GSList       *app_list)
-{
-       PanelAddtoAppList *data;
-       GtkTreeIter        iter;
-       char              *text;
-       GSList            *app;
-
-       for (app = app_list; app != NULL; app = app->next) {
-               PanelAddtoItemInfo *column_data;
-
-               data = app->data;
-               gtk_tree_store_append (store, &iter, parent);
-
-               text = panel_addto_make_text (data->item_info.name,
-                                             data->item_info.description);
-
-               column_data = NULL;
-               if (data->item_info.type != PANEL_ADDTO_MENU)
-                       column_data = &data->item_info;
-
-               gtk_tree_store_set (store, &iter,
-                                   COLUMN_ICON, data->item_info.icon,
-                                   COLUMN_TEXT, text,
-                                   COLUMN_DATA, column_data,
-                                   COLUMN_SEARCH, data->item_info.name,
-                                   -1);
-
-               g_free (text);
-
-               if (data->children != NULL) 
-                       panel_addto_populate_application_model (store,
-                                                               &iter,
-                                                               data->children);
-       }
-}
-
-static gchar *
-get_applications_menu (void)
-{
-       const gchar *xdg_menu_prefx = g_getenv ("XDG_MENU_PREFIX");
-       return g_strdup_printf ("%sapplications.menu",
-                               !PANEL_GLIB_STR_EMPTY (xdg_menu_prefx) ? xdg_menu_prefx : "gnome-");
-}
-
-static void
-panel_addto_make_application_model (PanelAddtoDialog *dialog)
-{
-       GtkTreeStore      *store;
-       GMenuTree          *tree;
-       GMenuTreeDirectory *root;
-       gchar              *applications_menu;
-
-       if (dialog->filter_application_model != NULL)
-               return;
-
-       store = gtk_tree_store_new (NUMBER_COLUMNS,
-                                   G_TYPE_ICON,
-                                   G_TYPE_STRING,
-                                   G_TYPE_POINTER,
-                                   G_TYPE_STRING);
-
-       applications_menu = get_applications_menu ();
-       tree = gmenu_tree_new (applications_menu, GMENU_TREE_FLAGS_SORT_DISPLAY_NAME);
-
-       if (!gmenu_tree_load_sync (tree, NULL)) {
-               g_object_unref (tree);
-               tree = NULL;
-       }
-
-       if (tree != NULL && (root = gmenu_tree_get_root_directory (tree))) {
-               panel_addto_make_application_list (&dialog->application_list,
-                                                  root, applications_menu,
-                                                  PANEL_ADDTO_MENU_SHOW_ALL);
-               panel_addto_populate_application_model (store, NULL, dialog->application_list);
-
-               gmenu_tree_item_unref (root);
-       }
-
-       g_free (applications_menu);
-
-       if (tree != NULL)
-               g_object_unref (tree);
-
-       tree = gmenu_tree_new ("gnomecc.menu", GMENU_TREE_FLAGS_SORT_DISPLAY_NAME);
-
-       if (!gmenu_tree_load_sync (tree, NULL)) {
-               g_object_unref (tree);
-               tree = NULL;
-       }
-
-       if (tree != NULL && (root = gmenu_tree_get_root_directory (tree))) {
-               GtkTreeIter iter;
-
-               gtk_tree_store_append (store, &iter, NULL);
-               gtk_tree_store_set (store, &iter,
-                                   COLUMN_ICON, NULL,
-                                   COLUMN_TEXT, NULL,
-                                   COLUMN_DATA, NULL,
-                                   COLUMN_SEARCH, NULL,
-                                   -1);
-
-               /* The gnome-control-center shell does not display toplevel
-                * entries that are not directories, so do the same. */
-               panel_addto_make_application_list (&dialog->settings_list,
-                                                  root, "gnomecc.menu",
-                                                  PANEL_ADDTO_MENU_SHOW_DIRECTORIES);
-               panel_addto_populate_application_model (store, NULL,
-                                                       dialog->settings_list);
-
-               gmenu_tree_item_unref (root);
-       }
-
-       if (tree != NULL)
-               g_object_unref (tree);
-
-       dialog->application_model = GTK_TREE_MODEL (store);
-       dialog->filter_application_model = gtk_tree_model_filter_new (GTK_TREE_MODEL 
(dialog->application_model),
-                                                                     NULL);
-       gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (dialog->filter_application_model),
-                                               panel_addto_filter_func,
-                                               dialog, NULL);
-}
-
 typedef struct
 {
        PanelAddtoDialog *dialog;
@@ -762,20 +448,6 @@ panel_addto_add_item (PanelAddtoDialog   *dialog,
                                            pack_index,
                                            item_info->action_type);
                break;
-       case PANEL_ADDTO_LAUNCHER_MENU:
-               panel_addto_present_applications (dialog);
-               break;
-       case PANEL_ADDTO_LAUNCHER:
-               panel_launcher_create (dialog->panel_widget->toplevel,
-                                      dialog->insert_pack_type,
-                                      pack_index,
-                                      item_info->launcher_path);
-               break;
-       case PANEL_ADDTO_LAUNCHER_NEW:
-               ask_about_launcher (NULL, dialog->panel_widget,
-                                   dialog->insert_pack_type);
-               break;
-       case PANEL_ADDTO_MENU:
        default:
                break;
        }
@@ -809,13 +481,6 @@ panel_addto_dialog_add_button_cb (PanelAddtoDialog *dialog,
        }
 }
 
-static void
-panel_addto_dialog_back_button_cb (PanelAddtoDialog *dialog,
-                                   GtkWidget        *widget)
-{
-       panel_addto_present_applets (dialog);
-}
-
 static void
 panel_addto_dialog_close_button_cb (PanelAddtoDialog *dialog,
                                     GtkWidget        *widget)
@@ -823,25 +488,6 @@ panel_addto_dialog_close_button_cb (PanelAddtoDialog *dialog,
        gtk_widget_destroy (GTK_WIDGET (dialog));
 }
 
-static void
-panel_addto_present_applications (PanelAddtoDialog *dialog)
-{
-       if (dialog->filter_application_model == NULL)
-               panel_addto_make_application_model (dialog);
-       gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->tree_view),
-                                dialog->filter_application_model);
-       gtk_window_set_focus (GTK_WINDOW (dialog),
-                             dialog->search_entry);
-       gtk_widget_set_sensitive (dialog->back_button, TRUE);
-
-       if (dialog->applet_search_text)
-               g_free (dialog->applet_search_text);
-
-       dialog->applet_search_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (dialog->search_entry)));
-       /* show everything */
-       gtk_entry_set_text (GTK_ENTRY (dialog->search_entry), "");
-}
-
 static void
 panel_addto_present_applets (PanelAddtoDialog *dialog)
 {
@@ -851,7 +497,6 @@ panel_addto_present_applets (PanelAddtoDialog *dialog)
                                 dialog->filter_applet_model);
        gtk_window_set_focus (GTK_WINDOW (dialog),
                              dialog->search_entry);
-       gtk_widget_set_sensitive (dialog->back_button, FALSE);
 
        if (dialog->applet_search_text) {
                gtk_entry_set_text (GTK_ENTRY (dialog->search_entry),
@@ -881,29 +526,6 @@ panel_addto_dialog_free_item_info (PanelAddtoItemInfo *item_info)
 
        g_free (item_info->iid);
        item_info->iid = NULL;
-
-       g_free (item_info->launcher_path);
-       item_info->launcher_path = NULL;
-}
-
-static void
-panel_addto_dialog_free_application_list (GSList *application_list)
-{
-       PanelAddtoAppList *data;
-       GSList            *app;
-
-       if (application_list == NULL)
-               return;
-
-       for (app = application_list; app != NULL; app = app->next) {
-               data = app->data;
-               if (data->children) {
-                       panel_addto_dialog_free_application_list (data->children);
-               }
-               panel_addto_dialog_free_item_info (&data->item_info);
-               g_free (data);
-       }
-       g_slist_free (application_list);
 }
 
 static void
@@ -1040,26 +662,12 @@ panel_addto_selection_changed (PanelAddtoDialog *dialog,
 
        gtk_widget_set_sensitive (GTK_WIDGET (dialog->add_button), TRUE);
 
-       if (data->type == PANEL_ADDTO_LAUNCHER_MENU) {
-               gtk_button_set_label (GTK_BUTTON (dialog->add_button),
-                                     _("_Forward"));
-       } else {
-               gtk_button_set_label (GTK_BUTTON (dialog->add_button),
-                                     _("_Add"));
-       }
-
        /* only allow dragging applets if we can add applets */
        if (panel_layout_is_writable ()) {
-               if (data->type == PANEL_ADDTO_LAUNCHER) {
-                       panel_addto_setup_launcher_drag (GTK_TREE_VIEW (dialog->tree_view),
-                                                        data->launcher_path);
-               } else if (data->type == PANEL_ADDTO_APPLET) {
+               if (data->type == PANEL_ADDTO_APPLET) {
                        panel_addto_setup_applet_drag (GTK_TREE_VIEW (dialog->tree_view),
                                                       data->iid);
-               } else if (data->type == PANEL_ADDTO_LAUNCHER_MENU) {
-                       gtk_tree_view_unset_rows_drag_source (GTK_TREE_VIEW (dialog->tree_view));
-               } else if (data->type == PANEL_ADDTO_MENU) {
-               } else {
+               } else if (data->type == PANEL_ADDTO_ACTION) {
                        panel_addto_setup_internal_applet_drag (GTK_TREE_VIEW (dialog->tree_view),
                                                                data->iid);
                }
@@ -1149,9 +757,6 @@ panel_addto_dialog_dispose (GObject *object)
 
        g_clear_object (&dialog->filter_applet_model);
        g_clear_object (&dialog->applet_model);
-       g_clear_object (&dialog->filter_application_model);
-       g_clear_object (&dialog->application_model);
-       g_clear_object (&dialog->menu_tree);
 
        G_OBJECT_CLASS (panel_addto_dialog_parent_class)->dispose (object);
 }
@@ -1184,9 +789,6 @@ panel_addto_dialog_finalize (GObject *object)
        }
        g_slist_free (dialog->applet_list);
 
-       panel_addto_dialog_free_application_list (dialog->application_list);
-       panel_addto_dialog_free_application_list (dialog->settings_list);
-
        G_OBJECT_CLASS (panel_addto_dialog_parent_class)->finalize (object);
 }
 
@@ -1209,13 +811,10 @@ panel_addto_dialog_class_init (PanelAddtoDialogClass *dialog_class)
        gtk_widget_class_bind_template_child (widget_class, PanelAddtoDialog, label);
        gtk_widget_class_bind_template_child (widget_class, PanelAddtoDialog, search_entry);
        gtk_widget_class_bind_template_child (widget_class, PanelAddtoDialog, add_button);
-       gtk_widget_class_bind_template_child (widget_class, PanelAddtoDialog, back_button);
        gtk_widget_class_bind_template_child (widget_class, PanelAddtoDialog, close_button);
        gtk_widget_class_bind_template_child (widget_class, PanelAddtoDialog, tree_view);
-       gtk_widget_class_bind_template_child (widget_class, PanelAddtoDialog, tree_view_selection);
 
        gtk_widget_class_bind_template_callback (widget_class, panel_addto_dialog_add_button_cb);
-       gtk_widget_class_bind_template_callback (widget_class, panel_addto_dialog_back_button_cb);
        gtk_widget_class_bind_template_callback (widget_class, panel_addto_dialog_close_button_cb);
        gtk_widget_class_bind_template_callback (widget_class, panel_addto_search_entry_changed);
        gtk_widget_class_bind_template_callback (widget_class, panel_addto_search_entry_activated);
diff --git a/gnome-panel/panel-addto-dialog.ui b/gnome-panel/panel-addto-dialog.ui
index dd5f8dad9..954dea770 100644
--- a/gnome-panel/panel-addto-dialog.ui
+++ b/gnome-panel/panel-addto-dialog.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.19.0 -->
+<!-- Generated with glade 3.22.2 -->
 <interface>
-  <requires lib="gtk+" version="3.16"/>
+  <requires lib="gtk+" version="3.20"/>
   <object class="GtkListStore" id="liststore">
     <columns>
       <!-- column-name icon -->
@@ -14,6 +14,9 @@
     <property name="can_focus">False</property>
     <property name="border_width">10</property>
     <property name="title" translatable="yes">Add to Panel</property>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
     <child>
       <object class="GtkBox" id="dialog_vbox">
         <property name="visible">True</property>
@@ -137,22 +140,6 @@
             <property name="can_focus">False</property>
             <property name="spacing">5</property>
             <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="back_button">
-                <property name="label" translatable="yes">_Back</property>
-                <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_underline">True</property>
-                <signal name="clicked" handler="panel_addto_dialog_back_button_cb" swapped="yes"/>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
             <child>
               <object class="GtkButton" id="add_button">
                 <property name="label" translatable="yes">_Add</property>
diff --git a/gnome-panel/panel-enums.h b/gnome-panel/panel-enums.h
index d1e920313..1cb4b7e6b 100644
--- a/gnome-panel/panel-enums.h
+++ b/gnome-panel/panel-enums.h
@@ -32,7 +32,6 @@ G_BEGIN_DECLS
 #define PANEL_VERTICAL_MASK   (PANEL_ORIENTATION_LEFT | PANEL_ORIENTATION_RIGHT)
 
 typedef enum {
-       PANEL_OBJECT_LAUNCHER,
        PANEL_OBJECT_APPLET,
        PANEL_OBJECT_ACTION
 } PanelObjectType;
diff --git a/gnome-panel/panel-object-loader.c b/gnome-panel/panel-object-loader.c
index 830cc3042..39198b733 100644
--- a/gnome-panel/panel-object-loader.c
+++ b/gnome-panel/panel-object-loader.c
@@ -36,7 +36,6 @@
 #include "panel-toplevel.h"
 
 /* Includes for objects we can load */
-#include "launcher.h"
 #include "panel-action-button.h"
 #include "panel-applet-frame.h"
 
@@ -200,11 +199,6 @@ panel_object_loader_idle_handler (gpointer dummy)
                                          object->id,
                                          object->settings);
                 break;
-        case PANEL_OBJECT_LAUNCHER:
-                launcher_load (panel_widget,
-                               object->id,
-                               object->settings);
-                break;
         case PANEL_OBJECT_ACTION:
                 panel_action_button_load (panel_widget,
                                           object->id,
@@ -345,8 +339,7 @@ static struct {
         const char      *id;
         gboolean         has_detail;
 } panel_object_iid_map[] = {
-        { PANEL_OBJECT_ACTION,    "ActionButton" , TRUE  },
-        { PANEL_OBJECT_LAUNCHER,  "Launcher"     , FALSE }
+        { PANEL_OBJECT_ACTION, "ActionButton", TRUE }
 };
 
 char *
diff --git a/gnome-panel/panel-schemas.h b/gnome-panel/panel-schemas.h
index ffb7af6ea..cbf28b300 100644
--- a/gnome-panel/panel-schemas.h
+++ b/gnome-panel/panel-schemas.h
@@ -59,9 +59,6 @@
 #define PANEL_OBJECT_PACK_TYPE_KEY      "pack-type"
 #define PANEL_OBJECT_PACK_INDEX_KEY     "pack-index"
 
-#define PANEL_LAUNCHER_SCHEMA      "org.gnome.gnome-panel.launcher"
-#define PANEL_LOCATION_KEY         "location"
-
 #define PANEL_MENU_BUTTON_SCHEMA          "org.gnome.gnome-panel.menu-button"
 #define PANEL_MENU_BUTTON_TOOLTIP_KEY     "tooltip"
 #define PANEL_MENU_BUTTON_CUSTOM_ICON_KEY "custom-icon"
diff --git a/gnome-panel/panel-util.c b/gnome-panel/panel-util.c
index 36c54e6c2..ebd6b6183 100644
--- a/gnome-panel/panel-util.c
+++ b/gnome-panel/panel-util.c
@@ -36,41 +36,9 @@
 
 #include "applet.h"
 #include "panel-bindings.h"
-#include "launcher.h"
 #include "panel-icon-names.h"
 #include "panel-schemas.h"
 
-char *
-panel_util_make_exec_uri_for_desktop (const char *exec)
-{
-       GString    *str;
-       const char *c;
-
-       if (!exec)
-               return g_strdup ("");
-
-       if (!strchr (exec, ' '))
-               return g_strdup (exec);
-
-       str = g_string_new_len (NULL, strlen (exec));
-
-       str = g_string_append_c (str, '"');
-       for (c = exec; *c != '\0'; c++) {
-               /* FIXME: GKeyFile will add an additional backslach so we'll
-                * end up with toto\\" instead of toto\"
-                * We could use g_key_file_set_value(), but then we don't
-                * benefit from the other escaping that glib is doing...
-                */
-               if (*c == '"')
-                       str = g_string_append (str, "\\\"");
-               else
-                       str = g_string_append_c (str, *c);
-       }
-       str = g_string_append_c (str, '"');
-
-       return g_string_free (str, FALSE);
-}
-
 void
 panel_push_window_busy (GtkWidget *window)
 {
@@ -166,22 +134,7 @@ panel_ensure_dir (const char *dirname)
        return TRUE;
 }
 
-gboolean
-panel_uri_exists (const char *uri)
-{
-       GFile *suri;
-       gboolean ret;
-
-       g_return_val_if_fail (uri != NULL, FALSE);
-
-       suri = g_file_new_for_uri (uri);
-       ret = g_file_query_exists (suri, NULL);
-       g_object_unref (suri);
-
-       return ret;
-}
-
-char *
+static char *
 panel_find_icon (GtkIconTheme  *icon_theme,
                 const char    *icon_name,
                 gint           size)
@@ -265,7 +218,7 @@ panel_load_icon (GtkIconTheme  *icon_theme,
        return retval;
 }
 
-char *
+static char *
 panel_util_get_from_personal_path (const char *file)
 {
        return g_build_filename (g_get_user_config_dir (),
@@ -278,32 +231,7 @@ panel_launcher_get_personal_path (void)
        return panel_util_get_from_personal_path ("launchers");
 }
 
-gboolean
-panel_launcher_is_in_personal_path (const char *location)
-{
-       GFile    *file;
-       GFile    *launchers_dir;
-       char     *launchers_path;
-       gboolean  retval;
-
-       if (!location)
-               return FALSE;
-
-       launchers_path = panel_launcher_get_personal_path ();
-       launchers_dir = g_file_new_for_path (launchers_path);
-       g_free (launchers_path);
-
-       file = panel_launcher_get_gfile (location);
-
-       retval = g_file_has_prefix (file, launchers_dir);
-
-       g_object_unref (file);
-       g_object_unref (launchers_dir);
-
-       return retval;
-}
-
-GFile *
+static GFile *
 panel_launcher_get_gfile (const char *location)
 {
        char  *path;
@@ -322,26 +250,6 @@ panel_launcher_get_gfile (const char *location)
        return file;
 }
 
-char *
-panel_launcher_get_uri (const char *location)
-{
-       char *path;
-       char *uri;
-
-       if (!g_ascii_strncasecmp (location, "file:", strlen ("file:")))
-               return g_strdup (location);
-
-       if (!g_path_is_absolute (location))
-               path = panel_make_full_path (NULL, location);
-       else
-               path = g_strdup (location);
-
-       uri = g_filename_to_uri (path, NULL, NULL);
-       g_free (path);
-
-       return uri;
-}
-
 char *
 panel_launcher_get_filename (const char *location)
 {
@@ -394,7 +302,7 @@ panel_make_full_path (const char *dir,
        return retval;
 }
 
-char *
+static char *
 panel_make_unique_desktop_path_from_name (const char *dir,
                                          const char *name)
 {
diff --git a/gnome-panel/panel-util.h b/gnome-panel/panel-util.h
index 30a10c0f6..910a23885 100644
--- a/gnome-panel/panel-util.h
+++ b/gnome-panel/panel-util.h
@@ -8,16 +8,9 @@ G_BEGIN_DECLS
 
 #define                sure_string(s)          ((const char *)((s)!=NULL?(s):""))
 
-char *          panel_util_make_exec_uri_for_desktop (const char *exec);
-
 void           panel_push_window_busy  (GtkWidget *window);
 void           panel_pop_window_busy   (GtkWidget *window);
 
-gboolean       panel_uri_exists        (const char *uri);
-
-char *          panel_find_icon         (GtkIconTheme  *icon_theme,
-                                        const char    *icon_name,
-                                        int            size);
 GdkPixbuf *     panel_load_icon         (GtkIconTheme  *icon_theme,
                                         const char    *icon_name,
                                         int            size,
@@ -25,17 +18,10 @@ GdkPixbuf *     panel_load_icon         (GtkIconTheme  *icon_theme,
                                         int            desired_height,
                                         char         **error_msg);
 
-char       *panel_util_get_from_personal_path  (const char *file);
-
-GFile      *panel_launcher_get_gfile           (const char *location);
-char       *panel_launcher_get_uri             (const char *location);
 char       *panel_launcher_get_filename        (const char *location);
-gboolean    panel_launcher_is_in_personal_path (const char *location);
 
 char *panel_make_full_path   (const char *dir,
                              const char *filename);
-char *panel_make_unique_desktop_path_from_name (const char *dir,
-                                               const char *name);
 char *panel_make_unique_desktop_uri (const char *dir,
                                     const char *source);
 
@@ -43,7 +29,6 @@ char *panel_util_get_icon_name_from_g_icon (GIcon *gicon);
 char *guess_icon_from_exec (GtkIconTheme *icon_theme,
                            GKeyFile     *key_file);
 
-const char *panel_util_get_vfs_method_display_name (const char *method);
 char *panel_util_get_label_for_uri (const char *text_uri);
 char *panel_util_get_icon_for_uri (const char *text_uri);
 
diff --git a/gnome-panel/panel.c b/gnome-panel/panel.c
index 451d06028..17f4b39d5 100644
--- a/gnome-panel/panel.c
+++ b/gnome-panel/panel.c
@@ -26,7 +26,6 @@
 
 #include "applet.h"
 #include "button-widget.h"
-#include "launcher.h"
 #include "panel-applets-manager.h"
 #include "panel-bindings.h"
 #include "panel-context-menu.h"
@@ -74,7 +73,6 @@ orientation_change (AppletInfo  *info,
                panel_applet_frame_change_orientation (
                                PANEL_APPLET_FRAME (info->widget), orientation);
                break;
-       case PANEL_OBJECT_LAUNCHER:
        case PANEL_OBJECT_ACTION:
                button_widget_set_orientation (BUTTON_WIDGET (info->widget), orientation);
                break;
@@ -922,13 +920,6 @@ drop_internal_applet (PanelWidget         *panel,
                } else {
                        success = FALSE;
                }
-       } else if (!strcmp(applet_type,"LAUNCHER:ASK")) {
-               if (panel_layout_is_writable ()) {
-                       ask_about_launcher (NULL, panel, pack_type);
-                       success = TRUE;
-               } else {
-                       success = FALSE;
-               }
        }
 
        return success;
@@ -1082,12 +1073,12 @@ drag_motion_cb (GtkWidget          *widget,
 }
 
 static gboolean
-drag_drop_cb (GtkWidget                *widget,
-             GdkDragContext    *context,
-             gint               x,
-             gint               y,
-             guint              time,
-             Launcher          *launcher)
+drag_drop_cb (GtkWidget      *widget,
+              GdkDragContext *context,
+              gint            x,
+              gint            y,
+              guint           time,
+              gpointer        user_data)
 {
        GdkAtom ret_atom = NULL;
 
@@ -1099,11 +1090,11 @@ drag_drop_cb (GtkWidget         *widget,
        return TRUE;
 }
 
-static void  
-drag_leave_cb (GtkWidget       *widget,
-              GdkDragContext   *context,
-              guint             time,
-              Launcher         *launcher)
+static void
+drag_leave_cb (GtkWidget      *widget,
+               GdkDragContext *context,
+               guint           time,
+               gpointer        user_data)
 {
        PanelToplevel *toplevel;
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f10b89ea7..3d23da159 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -5,7 +5,6 @@ data/org.gnome.gnome-panel.applet.fish.gschema.xml
 data/org.gnome.gnome-panel.applet.window-list.gschema.xml
 data/org.gnome.gnome-panel.applet.workspace-switcher.gschema.xml
 data/org.gnome.gnome-panel.gschema.xml
-data/org.gnome.gnome-panel.launcher.gschema.xml
 data/org.gnome.gnome-panel.object.gschema.xml
 data/org.gnome.gnome-panel.toplevel.gschema.xml
 gnome-panel/applet.c
@@ -16,9 +15,7 @@ gnome-panel/gp-arrow-button.c
 gnome-panel/gp-main.c
 gnome-panel/gp-properties-dialog.c
 gnome-panel/gp-properties-dialog.ui
-gnome-panel/launcher.c
 gnome-panel/libpanel-util/panel-error.c
-gnome-panel/libpanel-util/panel-icon-chooser.c
 gnome-panel/libpanel-util/panel-launch.c
 gnome-panel/libpanel-util/panel-show.c
 gnome-panel/panel-action-button.c
@@ -28,7 +25,6 @@ gnome-panel/panel-applet-frame.c
 gnome-panel/panel-bindings.c
 gnome-panel/panel.c
 gnome-panel/panel-context-menu.c
-gnome-panel/panel-ditem-editor.c
 gnome-panel/panel-force-quit.c
 gnome-panel/panel-layout.c
 gnome-panel/panel-run-dialog.c


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