[gnome-panel] libpanel-applet-private: remove applet-broken signal
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] libpanel-applet-private: remove applet-broken signal
- Date: Wed, 21 Sep 2016 15:05:57 +0000 (UTC)
commit cd9124d2cbcd97cd2ea83fc4bf9192ec9b5fbef1
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Sep 21 17:54:54 2016 +0300
libpanel-applet-private: remove applet-broken signal
.../panel-applet-container.c | 12 --
.../panel-applet-frame-dbus.c | 10 --
gnome-panel/panel-applet-frame.c | 118 --------------------
gnome-panel/panel-applet-frame.h | 2 -
gnome-panel/panel-test-applets.c | 11 --
5 files changed, 0 insertions(+), 153 deletions(-)
---
diff --git a/gnome-panel/libpanel-applet-private/panel-applet-container.c
b/gnome-panel/libpanel-applet-private/panel-applet-container.c
index 6e94577..a2586f3 100644
--- a/gnome-panel/libpanel-applet-private/panel-applet-container.c
+++ b/gnome-panel/libpanel-applet-private/panel-applet-container.c
@@ -15,7 +15,6 @@
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
*/
#include "config.h"
@@ -39,7 +38,6 @@ struct _PanelAppletContainerPrivate {
};
enum {
- APPLET_BROKEN,
APPLET_MOVE,
APPLET_REMOVE,
CHILD_PROPERTY_CHANGED,
@@ -159,16 +157,6 @@ panel_applet_container_class_init (PanelAppletContainerClass *klass)
gobject_class->dispose = panel_applet_container_dispose;
- signals[APPLET_BROKEN] =
- g_signal_new ("applet-broken",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (PanelAppletContainerClass, applet_broken),
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
signals[APPLET_MOVE] =
g_signal_new ("applet-move",
G_TYPE_FROM_CLASS (klass),
diff --git a/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c
b/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c
index 0ada1a8..eda9042 100644
--- a/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c
+++ b/gnome-panel/libpanel-applet-private/panel-applet-frame-dbus.c
@@ -249,13 +249,6 @@ panel_applet_frame_dbus_size_hints_changed (PanelAppletContainer *container,
}
static void
-panel_applet_frame_dbus_applet_broken (PanelAppletContainer *container,
- PanelAppletFrame *frame)
-{
- _panel_applet_frame_applet_broken (frame);
-}
-
-static void
panel_applet_frame_dbus_applet_remove (PanelAppletContainer *container,
PanelAppletFrame *frame)
{
@@ -301,9 +294,6 @@ panel_applet_frame_dbus_init (PanelAppletFrameDBus *frame)
g_signal_connect (container, "child-property-changed::size-hints",
G_CALLBACK (panel_applet_frame_dbus_size_hints_changed),
frame);
- g_signal_connect (container, "applet-broken",
- G_CALLBACK (panel_applet_frame_dbus_applet_broken),
- frame);
g_signal_connect (container, "applet-remove",
G_CALLBACK (panel_applet_frame_dbus_applet_remove),
frame);
diff --git a/gnome-panel/panel-applet-frame.c b/gnome-panel/panel-applet-frame.c
index 89547c5..732e0c0 100644
--- a/gnome-panel/panel-applet-frame.c
+++ b/gnome-panel/panel-applet-frame.c
@@ -590,124 +590,6 @@ _panel_applet_frame_update_size_hints (PanelAppletFrame *frame,
n_elements);
}
-static void
-panel_applet_frame_reload_response (GtkWidget *dialog,
- int response,
- PanelAppletFrame *frame)
-{
- AppletInfo *info;
-
- g_return_if_fail (PANEL_IS_APPLET_FRAME (frame));
-
- if (!frame->priv->iid || !frame->priv->panel) {
- g_object_unref (frame);
- gtk_widget_destroy (dialog);
- return;
- }
-
- info = frame->priv->applet_info;
-
- if (response == PANEL_RESPONSE_RELOAD) {
- PanelWidget *panel;
- char *iid;
- char *id = NULL;
- GSettings *settings = NULL;
-
- panel = frame->priv->panel;
- iid = g_strdup (frame->priv->iid);
-
- if (info) {
- id = g_strdup (info->id);
- settings = panel_applet_get_settings (info);
- g_object_ref (settings);
- panel_applet_clean (info);
- }
-
- panel_applet_frame_load_helper (iid, panel, id, settings);
-
- g_free (iid);
- g_free (id);
- if (settings)
- g_object_unref (settings);
-
- } else if (response == PANEL_RESPONSE_DELETE) {
- /* if we can't write to applets list we can't really delete
- it, so we'll just ignore this. FIXME: handle this
- more correctly I suppose. */
- if (panel_layout_is_writable () && info)
- panel_layout_delete_object (panel_applet_get_id (info));
- }
-
- g_object_unref (frame);
- gtk_widget_destroy (dialog);
-}
-
-void
-_panel_applet_frame_applet_broken (PanelAppletFrame *frame)
-{
- GtkWidget *dialog;
- GdkScreen *screen;
- const char *applet_name = NULL;
- char *dialog_txt;
-
- screen = gtk_widget_get_screen (GTK_WIDGET (frame));
-
- if (xstuff_is_display_dead ())
- return;
-
- if (frame->priv->iid) {
- PanelAppletInfo *info;
-
- info = (PanelAppletInfo *)panel_applets_manager_get_applet_info (frame->priv->iid);
- applet_name = panel_applet_info_get_name (info);
- }
-
- if (applet_name)
- dialog_txt = g_strdup_printf (_("\"%s\" has quit unexpectedly"), applet_name);
- else
- dialog_txt = g_strdup (_("Panel object has quit unexpectedly"));
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
- dialog_txt, applet_name ? applet_name : NULL);
-
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("If you reload a panel object, it will automatically "
- "be added back to the panel."));
-
- gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
-
- if (panel_layout_is_writable ()) {
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- _("D_elete"), PANEL_RESPONSE_DELETE,
- _("_Don't Reload"), PANEL_RESPONSE_DONT_RELOAD,
- _("_Reload"), PANEL_RESPONSE_RELOAD,
- NULL);
- } else {
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- _("_Don't Reload"), PANEL_RESPONSE_DONT_RELOAD,
- _("_Reload"), PANEL_RESPONSE_RELOAD,
- NULL);
- }
-
- gtk_dialog_set_default_response (GTK_DIALOG (dialog),
- PANEL_RESPONSE_RELOAD);
-
- gtk_window_set_screen (GTK_WINDOW (dialog), screen);
-
- g_signal_connect (dialog, "response",
- G_CALLBACK (panel_applet_frame_reload_response),
- g_object_ref (frame));
-
- panel_widget_register_open_dialog (frame->priv->panel, dialog);
- gtk_window_set_urgency_hint (GTK_WINDOW (dialog), TRUE);
- /* FIXME: http://bugzilla.gnome.org/show_bug.cgi?id=165132 */
- gtk_window_set_title (GTK_WINDOW (dialog), _("Error"));
-
- gtk_widget_show (dialog);
- g_free (dialog_txt);
-}
-
void
_panel_applet_frame_applet_remove (PanelAppletFrame *frame)
{
diff --git a/gnome-panel/panel-applet-frame.h b/gnome-panel/panel-applet-frame.h
index fa4f760..a8798e3 100644
--- a/gnome-panel/panel-applet-frame.h
+++ b/gnome-panel/panel-applet-frame.h
@@ -112,8 +112,6 @@ void _panel_applet_frame_update_size_hints (PanelAppletFrame *frame,
gint *size_hints,
guint n_elements);
-void _panel_applet_frame_applet_broken (PanelAppletFrame *frame);
-
void _panel_applet_frame_applet_remove (PanelAppletFrame *frame);
void _panel_applet_frame_applet_move (PanelAppletFrame *frame);
diff --git a/gnome-panel/panel-test-applets.c b/gnome-panel/panel-test-applets.c
index 142a503..df93ed0 100644
--- a/gnome-panel/panel-test-applets.c
+++ b/gnome-panel/panel-test-applets.c
@@ -84,13 +84,6 @@ get_combo_applet_id (GtkWidget *combo_box)
}
static void
-applet_broken_cb (GtkWidget *container,
- GtkWidget *window)
-{
- gtk_widget_destroy (window);
-}
-
-static void
applet_activated_cb (GObject *source_object,
GAsyncResult *res,
GtkWidget *applet_window)
@@ -141,10 +134,6 @@ load_applet_into_window (const char *title,
gtk_box_set_center_widget (GTK_BOX (box), container);
gtk_widget_show (container);
- g_signal_connect (container, "applet-broken",
- G_CALLBACK (applet_broken_cb),
- applet_window);
-
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
g_variant_builder_add (&builder, "{sv}",
"orient", g_variant_new_uint32 (orientation));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]