[gnome-panel/wip/segeiger/separator] applets/separator/separator-applet.c: rewrite of gnome-panel/panel-separator.c



commit 969c95b84a02f176a5cbdd0c1ac6695bc3c8ceb1
Author: Sebastian Geiger <sbastig gmx net>
Date:   Sun Aug 23 00:07:54 2015 +0200

    applets/separator/separator-applet.c: rewrite of gnome-panel/panel-separator.c

 applets/Makefile.am                                |    3 +-
 applets/separator/Makefile.am                      |   43 +++
 .../separator}/gnome-panel-separator.png           |  Bin 176 -> 176 bytes
 .../separator}/gnome-panel-separator.svg           |    0
 .../org.gnome.panel.Separator.panel-applet.in.in   |   16 +
 applets/separator/separator-applet.c               |  267 ++++++++++++++++++
 configure.ac                                       |    5 +
 data/32x32/Makefile.am                             |    2 -
 gnome-panel/Makefile.am                            |    2 -
 gnome-panel/applet.c                               |    3 -
 gnome-panel/panel-addto-dialog.c                   |   17 --
 gnome-panel/panel-icon-names.h                     |    1 -
 gnome-panel/panel-object-loader.c                  |    7 -
 gnome-panel/panel-separator.c                      |  296 --------------------
 gnome-panel/panel-separator.h                      |   64 -----
 gnome-panel/panel.c                                |   15 -
 16 files changed, 333 insertions(+), 408 deletions(-)
---
diff --git a/applets/Makefile.am b/applets/Makefile.am
index e1e952d..691161c 100644
--- a/applets/Makefile.am
+++ b/applets/Makefile.am
@@ -2,6 +2,7 @@ SUBDIRS =                       \
        clock                   \
        fish                    \
        notification_area       \
-       wncklet
+       wncklet         \
+       separator
 
 -include $(top_srcdir)/git.mk
diff --git a/applets/separator/Makefile.am b/applets/separator/Makefile.am
new file mode 100644
index 0000000..771cca8
--- /dev/null
+++ b/applets/separator/Makefile.am
@@ -0,0 +1,43 @@
+AM_CPPFLAGS =                                                  \
+       $(LIBPANEL_APPLET_CFLAGS)                               \
+       $(SEPARATOR_CFLAGS)     \
+       -I$(top_builddir)                                       \
+       -I$(top_builddir)/applets/separator                     \
+       -I$(top_srcdir)/libpanel-applet                         \
+       -I$(top_builddir)/libpanel-applet                       \
+       -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
+
+AM_CFLAGS = $(WARN_CFLAGS)
+
+SEPARATOR_SOURCES = \
+    separator-applet.c
+
+SEPARATOR_LDADD =                                              \
+       ../../libpanel-applet/libpanel-applet.la        \
+       $(SEPARATOR_LIBS)       \
+       $(LIBPANEL_APPLET_LIBS)
+
+APPLET_LOCATION   = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)/libseparator-applet.so
+
+separator_appletlibdir = $(pkglibdir)/$(LIBPANEL_APPLET_API_VERSION)
+separator_appletlib_LTLIBRARIES = libseparator-applet.la
+libseparator_applet_la_SOURCES = $(SEPARATOR_SOURCES)
+libseparator_applet_la_LIBADD = $(SEPARATOR_LDADD)
+libseparator_applet_la_LDFLAGS = -module -avoid-version
+libseparator_applet_la_CFLAGS = $(AM_CFLAGS)
+
+appletdir       = $(appletsdir)
+applet_in_files = org.gnome.panel.Separator.panel-applet.in
+applet_DATA     = $(applet_in_files:.panel-applet.in=.panel-applet)
+
+$(applet_in_files): $(applet_in_files).in Makefile
+       $(AM_V_GEN)sed \
+               -e "s|\ LOCATION\@|$(APPLET_LOCATION)|" \
+               -e "s|\ VERSION\@|$(PACKAGE_VERSION)|" \
+               $< > $@
+
+ PANEL_INTLTOOL_PANEL_APPLET_RULE@
+
+CLEANFILES = $(applet_DATA) $(applet_DATA).in
+
+-include $(top_srcdir)/git.mk
diff --git a/data/32x32/gnome-panel-separator.svg b/applets/separator/gnome-panel-separator.svg
similarity index 100%
rename from data/32x32/gnome-panel-separator.svg
rename to applets/separator/gnome-panel-separator.svg
diff --git a/applets/separator/org.gnome.panel.Separator.panel-applet.in.in 
b/applets/separator/org.gnome.panel.Separator.panel-applet.in.in
new file mode 100644
index 0000000..3dd5404
--- /dev/null
+++ b/applets/separator/org.gnome.panel.Separator.panel-applet.in.in
@@ -0,0 +1,16 @@
+[Applet Factory]
+Id=SeparatorFactory
+InProcess=true
+Location= LOCATION@
+_Name=Panel Separator Factory
+_Description=Factory for the separator applet
+
+[SeparatorApplet]
+_Name=Separator
+_Description=A separator applet
+Icon=gnome-panel-separator
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=gnome-panel
+X-GNOME-Bugzilla-Component=separator
+X-GNOME-Bugzilla-Version= VERSION@
+X-GNOME-Bugzilla-OtherBinaries=separator-applet.la
diff --git a/applets/separator/separator-applet.c b/applets/separator/separator-applet.c
new file mode 100644
index 0000000..1eff8ed
--- /dev/null
+++ b/applets/separator/separator-applet.c
@@ -0,0 +1,267 @@
+/*
+ * panel-separator.c: "Separator" applet for the panel
+ *
+ * Copyright (C) 2005 Carlos Garcia Campos <carlosgc gnome org>
+ *
+ * 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/>.
+ *
+ * Authors:
+ *      Carlos Garcia Campos <carlosgc gnome org>
+ *      Sebastian Geiger <sbastig gmx net>
+ */
+
+#include <gtk/gtk.h>
+#include <panel-applet.h>
+
+G_BEGIN_DECLS
+
+GType separator_applet_get_type (void);
+
+#define SEPARATOR_TYPE_APPLET         separator_applet_get_type()
+#define SEPARATOR_APPLET(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), SEPARATOR_TYPE_APPLET, 
SeparatorApplet))
+#define SEPARATOR_IS_APPLET(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), SEPARATOR_TYPE_APPLET))
+#define SEPARATOR_APPLET_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), SEPARATOR_TYPE_APPLET, 
PanelSeparatorClass))
+#define SEPARATOR_IS_APPLET_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), SEPARATOR_TYPE_APPLET))
+#define SEPARATOR_APPLET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), SEPARATOR_TYPE_APPLET, 
PanelSeparatorClass))
+
+typedef struct _SeparatorApplet SeparatorApplet;
+typedef struct { PanelAppletClass parent_class; } SeparatorAppletClass;
+
+struct _SeparatorApplet {
+  PanelApplet     parent;
+  GtkOrientation  orientation;
+  GtkWidget      *separator;
+};
+
+G_DEFINE_TYPE (SeparatorApplet, separator_applet, PANEL_TYPE_APPLET)
+
+static void
+separator_applet_get_preferred_width (GtkWidget *widget,
+                                     gint      *minimal_width,
+                                     gint      *natural_width)
+{
+  SeparatorApplet *separator;
+  int            size;
+
+  separator = SEPARATOR_APPLET (widget);
+
+  if (separator->orientation == GTK_ORIENTATION_VERTICAL)
+  {
+    size = gtk_widget_get_allocated_height (widget);
+    *minimal_width = *natural_width = size;
+  } else {
+    /* set width based on css styling & width of GtkSeparator */
+    GtkStyleContext *context;
+    GtkStateFlags   state;
+    GtkWidget       *child;
+    GtkBorder       padding;
+    GtkBorder       border;
+    gint            width;
+
+    context = gtk_widget_get_style_context (widget);
+    state   = gtk_widget_get_state_flags (widget);
+
+    child = gtk_bin_get_child (GTK_BIN (widget));
+
+    if (child && gtk_widget_get_visible (child))
+      gtk_widget_get_preferred_width (child,
+                                      minimal_width,
+                                      natural_width);
+    else
+      *minimal_width = *natural_width = 0;
+
+    gtk_style_context_get_border (context, state, &border);
+    gtk_style_context_get_padding (context, state, &padding);
+
+    width = border.left + border.right + padding.left + padding.right;
+    *minimal_width += width;
+    *natural_width += width;
+  }
+}
+
+static void
+separator_applet_get_preferred_height (GtkWidget *widget,
+                                      gint      *minimal_height,
+                                      gint      *natural_height)
+{
+  SeparatorApplet *separator;
+  int size;
+
+  separator = SEPARATOR_APPLET (widget);
+
+  if (separator->orientation == GTK_ORIENTATION_VERTICAL)
+  {
+    /* set height based on css styling & height of GtkSeparator */
+    GtkStyleContext *context;
+    GtkStateFlags   state;
+    GtkWidget       *child;
+    GtkBorder       padding;
+    GtkBorder       border;
+    gint            height;
+
+    context = gtk_widget_get_style_context (widget);
+    state   = gtk_widget_get_state_flags (widget);
+
+    child = gtk_bin_get_child (GTK_BIN (widget));
+
+    if (child && gtk_widget_get_visible (child))
+      gtk_widget_get_preferred_height (child,
+                                       minimal_height,
+                                       natural_height);
+    else
+      *minimal_height = *natural_height = 0;
+
+    gtk_style_context_get_border (context, state, &border);
+    gtk_style_context_get_padding (context, state, &padding);
+
+    height = border.top + border.bottom + padding.top + padding.bottom;
+    *minimal_height += height;
+    *natural_height += height;
+  } else
+    size = gtk_widget_get_allocated_height (widget);
+    *minimal_height = *natural_height = size;
+}
+
+static void
+separator_applet_size_allocate (GtkWidget     *widget,
+                               GtkAllocation *allocation)
+{
+  GtkStyleContext *context;
+  GtkStateFlags   state;
+  GtkBorder       padding;
+  GtkBorder       border;
+  GtkAllocation   new_allocation;
+  GtkWidget       *child;
+
+  GTK_WIDGET_CLASS (separator_applet_parent_class)->size_allocate (widget,
+                                                                  allocation);
+
+  /* We cannot return early here if allocation == old_allocation because
+   * the event_box base class just sized the child and we need to
+   * recalculate and resize the child (the actual GtkSeparator).
+   *
+   * Preferably, the event_box base class would offer a method of moving
+   * the private event window, in which case, calling its size_allocate
+   * would not be necessary. But, alas, no. */
+
+  context = gtk_widget_get_style_context (widget);
+  state   = gtk_widget_get_state_flags (widget);
+
+  gtk_style_context_get_border (context, state, &border);
+  gtk_style_context_get_padding (context, state, &padding);
+
+  new_allocation.x      = border.left + padding.left;
+  new_allocation.y      = border.top + padding.top;
+  new_allocation.width  = allocation->width -
+                          (border.left + border.right + padding.left +
+                           padding.right);
+  new_allocation.height = allocation->height -
+                          (border.top + border.bottom + padding.top +
+                           padding.bottom);
+  new_allocation.width  = MAX (1, new_allocation.width);
+  new_allocation.height = MAX (1, new_allocation.height);
+
+  child = gtk_bin_get_child (GTK_BIN (widget));
+  if (child && gtk_widget_get_visible (child))
+    gtk_widget_size_allocate (child, &new_allocation);
+}
+
+static void
+separator_applet_change_orientation (PanelApplet   *applet,
+                                    PanelAppletOrient  orientation)
+{
+  GtkOrientation  orient           = GTK_ORIENTATION_HORIZONTAL;
+  GtkOrientation  orient_separator = GTK_ORIENTATION_VERTICAL;
+  GtkStyleContext *context;
+
+  g_return_if_fail (SEPARATOR_IS_APPLET (applet));
+  SeparatorApplet *separator = SEPARATOR_APPLET (applet);
+
+  switch (orientation)
+  {
+    case PANEL_APPLET_ORIENT_UP:
+    case PANEL_APPLET_ORIENT_DOWN:
+      orient           = GTK_ORIENTATION_HORIZONTAL;
+      orient_separator = GTK_ORIENTATION_VERTICAL;
+      break;
+    case PANEL_APPLET_ORIENT_LEFT:
+    case PANEL_APPLET_ORIENT_RIGHT:
+      orient           = GTK_ORIENTATION_VERTICAL;
+      orient_separator = GTK_ORIENTATION_HORIZONTAL;
+      break;
+  }
+
+  if (orient == separator->orientation)
+    return;
+
+  separator->orientation = orient;
+  gtk_orientable_set_orientation (GTK_ORIENTABLE (separator->separator),
+                                  orient_separator);
+
+  gtk_widget_queue_resize (GTK_WIDGET (applet));
+}
+
+static void
+separator_applet_class_init (SeparatorAppletClass *applet_class)
+{
+  PanelAppletClass *panel_applet_class = PANEL_APPLET_CLASS (applet_class);
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (applet_class);
+
+  widget_class->get_preferred_width  = separator_applet_get_preferred_width;
+  widget_class->get_preferred_height = separator_applet_get_preferred_height;
+  widget_class->size_allocate        = separator_applet_size_allocate;
+  panel_applet_class->change_orient = separator_applet_change_orientation;
+}
+
+static void
+separator_applet_init (SeparatorApplet *separator)
+{
+  GtkStyleContext *context;
+
+  separator->orientation = GTK_ORIENTATION_HORIZONTAL;
+  separator->separator   = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
+
+  gtk_container_add (GTK_CONTAINER (separator),
+                     separator->separator);
+  gtk_widget_show_all (GTK_WIDGET (separator));
+
+  context = gtk_widget_get_style_context (GTK_WIDGET (separator));
+  gtk_style_context_add_class (context, GTK_STYLE_CLASS_HORIZONTAL);
+}
+
+static void
+separator_applet_load (PanelApplet *panel)
+{
+  panel_applet_set_flags (panel, PANEL_APPLET_EXPAND_MINOR);
+}
+
+static gboolean
+separator_applet_factory (PanelApplet *applet,
+                         const gchar *iid,
+                         gpointer     user_data)
+{
+  if (g_strcmp0 (iid, "SeparatorApplet") != 0) {
+    fflush (stdout);
+    return FALSE;
+  }
+
+  separator_applet_load (applet);
+
+  return TRUE;
+}
+
+PANEL_APPLET_IN_PROCESS_FACTORY ("SeparatorFactory",
+                                 SEPARATOR_TYPE_APPLET,
+                                 separator_applet_factory,
+                                 NULL);
\ No newline at end of file
diff --git a/configure.ac b/configure.ac
index 4dca8b9..b2455c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,6 +111,10 @@ PKG_CHECK_MODULES(WNCKLET, gtk+-3.0 >= $GTK_REQUIRED libwnck-3.0 >= $LIBWNCK_REQ
 AC_SUBST(WNCKLET_CFLAGS)
 AC_SUBST(WNCKLET_LIBS)
 
+PKG_CHECK_MODULES(SEPARATOR, gtk+-3.0 >= $GTK_REQUIRED)
+AC_SUBST(SEPARATOR_CFLAGS)
+AC_SUBST(SEPARATOR_LIBS)
+
 AC_CHECK_HEADERS(langinfo.h)
 AC_CHECK_FUNCS(nl_langinfo)
 
@@ -238,6 +242,7 @@ applets/clock/pixmaps/Makefile
 applets/fish/Makefile
 applets/notification_area/Makefile
 applets/wncklet/Makefile
+applets/separator/Makefile
 doc/Makefile
 doc/reference/Makefile
 doc/reference/panel-applet/Makefile
diff --git a/data/32x32/Makefile.am b/data/32x32/Makefile.am
index a9f1fdb..4815018 100644
--- a/data/32x32/Makefile.am
+++ b/data/32x32/Makefile.am
@@ -8,7 +8,6 @@ icons_DATA =                                    \
        gnome-panel-force-quit.png              \
        gnome-panel-launcher.png                \
        gnome-panel-notification-area.png       \
-       gnome-panel-separator.png               \
        gnome-panel.png                         \
        gnome-panel-window-list.png             \
        gnome-panel-window-menu.png             \
@@ -20,7 +19,6 @@ icons_SOURCE =                                        \
        gnome-panel-force-quit.svg              \
        gnome-panel-launcher.svg                \
        gnome-panel-notification-area.svg       \
-       gnome-panel-separator.svg               \
        gnome-panel.svg                         \
        gnome-panel-window-list.svg             \
        gnome-panel-window-menu.svg             \
diff --git a/gnome-panel/Makefile.am b/gnome-panel/Makefile.am
index 5b23f09..23d094f 100644
--- a/gnome-panel/Makefile.am
+++ b/gnome-panel/Makefile.am
@@ -45,7 +45,6 @@ panel_sources =                       \
        panel-menu-bar-object.c \
        panel-menu-button.c     \
        panel-menu-items.c      \
-       panel-separator.c       \
        panel-recent.c          \
        panel-action-protocol.c \
        panel-toplevel.c        \
@@ -93,7 +92,6 @@ panel_headers =                       \
        panel-menu-bar-object.h \
        panel-menu-button.h     \
        panel-menu-items.h      \
-       panel-separator.h       \
        panel-recent.h          \
        panel-action-protocol.h \
        panel-toplevel.h        \
diff --git a/gnome-panel/applet.c b/gnome-panel/applet.c
index 440ccf5..4efb777 100644
--- a/gnome-panel/applet.c
+++ b/gnome-panel/applet.c
@@ -24,7 +24,6 @@
 #include "panel-applet-frame.h"
 #include "panel-action-button.h"
 #include "panel-menu-bar.h"
-#include "panel-separator.h"
 #include "panel-toplevel.h"
 #include "panel-util.h"
 #include "panel-menu-button.h"
@@ -67,7 +66,6 @@ panel_applet_set_dnd_enabled (AppletInfo *info,
                                                     dnd_enabled);
                break;
        case PANEL_OBJECT_MENU_BAR:
-       case PANEL_OBJECT_SEPARATOR:
        case PANEL_OBJECT_USER_MENU:
                break;
        default:
@@ -193,7 +191,6 @@ applet_callback_callback (GtkWidget      *widget,
                 * Applet's menu's are handled differently
                 */
                break;
-       case PANEL_OBJECT_SEPARATOR:
        case PANEL_OBJECT_USER_MENU:
                break;
        default:
diff --git a/gnome-panel/panel-addto-dialog.c b/gnome-panel/panel-addto-dialog.c
index 765a2ba..7eb1d7e 100644
--- a/gnome-panel/panel-addto-dialog.c
+++ b/gnome-panel/panel-addto-dialog.c
@@ -36,7 +36,6 @@
 #include "panel-applet-frame.h"
 #include "panel-action-button.h"
 #include "panel-menu-bar.h"
-#include "panel-separator.h"
 #include "panel-toplevel.h"
 #include "panel-menu-button.h"
 #include "panel-globals.h"
@@ -90,7 +89,6 @@ typedef enum {
        PANEL_ADDTO_LAUNCHER_NEW,
        PANEL_ADDTO_MENU,
        PANEL_ADDTO_MENUBAR,
-       PANEL_ADDTO_SEPARATOR,
        PANEL_ADDTO_USER_MENU
 } PanelAddtoItemType;
 
@@ -159,16 +157,6 @@ prepend_internal_applets (GSList *list)
        list = g_slist_prepend (list, internal);
 
        internal = g_new0 (PanelAddtoItemInfo, 1);
-       internal->type = PANEL_ADDTO_SEPARATOR;
-       internal->name = _("Separator");
-       internal->description = _("A separator to organize the panel items");
-       internal->icon = g_themed_icon_new (PANEL_ICON_SEPARATOR);
-       internal->action_type = PANEL_ACTION_NONE;
-       internal->iid = "SEPARATOR:NEW";
-       internal->static_strings = TRUE;
-       list = g_slist_prepend (list, internal);
-
-       internal = g_new0 (PanelAddtoItemInfo, 1);
        internal->type = PANEL_ADDTO_USER_MENU;
        internal->name = _("User menu");
        internal->description = _("Menu to change your settings and log out");
@@ -791,11 +779,6 @@ panel_addto_add_item (PanelAddtoDialog   *dialog,
                                       dialog->insert_pack_type,
                                       pack_index);
                break;
-       case PANEL_ADDTO_SEPARATOR:
-               panel_separator_create (dialog->panel_widget->toplevel,
-                                       dialog->insert_pack_type,
-                                       pack_index);
-               break;
        case PANEL_ADDTO_USER_MENU:
                panel_user_menu_create (dialog->panel_widget->toplevel,
                                        dialog->insert_pack_type,
diff --git a/gnome-panel/panel-icon-names.h b/gnome-panel/panel-icon-names.h
index ea8f4fc..40d9ea6 100644
--- a/gnome-panel/panel-icon-names.h
+++ b/gnome-panel/panel-icon-names.h
@@ -29,7 +29,6 @@
 #define PANEL_ICON_REMOTE              "applications-internet"
 #define PANEL_ICON_REMOVABLE_MEDIA     "drive-removable-media"
 #define PANEL_ICON_RUN                 "system-run"
-#define PANEL_ICON_SEPARATOR           "gnome-panel-separator"
 #define PANEL_ICON_SAVED_SEARCH                "folder-saved-search"
 #define PANEL_ICON_SEARCHTOOL          "system-search"
 #define PANEL_ICON_SHUTDOWN            "system-shutdown"
diff --git a/gnome-panel/panel-object-loader.c b/gnome-panel/panel-object-loader.c
index c085806..eda33ca 100644
--- a/gnome-panel/panel-object-loader.c
+++ b/gnome-panel/panel-object-loader.c
@@ -41,7 +41,6 @@
 #include "panel-applet-frame.h"
 #include "panel-menu-bar.h"
 #include "panel-menu-button.h"
-#include "panel-separator.h"
 #include "panel-user-menu.h"
 
 #include "panel-object-loader.h"
@@ -225,11 +224,6 @@ panel_object_loader_idle_handler (gpointer dummy)
                                      object->id,
                                      object->settings);
                 break;
-        case PANEL_OBJECT_SEPARATOR:
-                panel_separator_load (panel_widget,
-                                      object->id,
-                                      object->settings);
-                break;
         case PANEL_OBJECT_USER_MENU:
                 panel_user_menu_load (panel_widget,
                                       object->id,
@@ -373,7 +367,6 @@ static struct {
         { PANEL_OBJECT_MENU_BAR,  "MenuBar"      , FALSE },
         { PANEL_OBJECT_MENU,      "MenuButton"   , FALSE },
         { PANEL_OBJECT_LAUNCHER,  "Launcher"     , FALSE },
-        { PANEL_OBJECT_SEPARATOR, "Separator"    , FALSE },
         { PANEL_OBJECT_USER_MENU, "UserMenu"     , FALSE }
 };
 
diff --git a/gnome-panel/panel.c b/gnome-panel/panel.c
index 26b5322..b306e23 100644
--- a/gnome-panel/panel.c
+++ b/gnome-panel/panel.c
@@ -33,7 +33,6 @@
 #include "panel-applet-frame.h"
 #include "panel-action-button.h"
 #include "panel-menu-bar.h"
-#include "panel-separator.h"
 #include "panel-multiscreen.h"
 #include "panel-toplevel.h"
 #include "panel-menu-button.h"
@@ -81,10 +80,6 @@ orientation_change (AppletInfo  *info,
        case PANEL_OBJECT_USER_MENU:
                panel_menu_bar_object_set_orientation (PANEL_MENU_BAR_OBJECT (info->widget), orientation);
                break;
-       case PANEL_OBJECT_SEPARATOR:
-               panel_separator_set_orientation (PANEL_SEPARATOR (info->widget),
-                                                orientation);
-               break;
        default:
                break;
        }
@@ -124,7 +119,6 @@ back_change (AppletInfo  *info,
                break;
        case PANEL_OBJECT_MENU_BAR:
        case PANEL_OBJECT_USER_MENU:
-       case PANEL_OBJECT_SEPARATOR:
                break;
        default:
                break;
@@ -925,15 +919,6 @@ drop_internal_applet (PanelWidget         *panel,
                        success = FALSE;
                }
 
-       } else if (!strcmp(applet_type,"SEPARATOR:NEW")) {
-               if (panel_layout_is_writable ()) {
-                       panel_separator_create (panel->toplevel,
-                                               pack_type, pack_index);
-                       success = TRUE;
-               } else {
-                       success = FALSE;
-               }
-
        } else if (!strcmp (applet_type, "USERMENU:NEW")) {
                if (panel_layout_is_writable ()) {
                        panel_user_menu_create (panel->toplevel,


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