diff options
| author | Victor Kareh <[email protected]> | 2026-07-10 10:55:54 -0400 |
|---|---|---|
| committer | Victor Kareh <[email protected]> | 2026-07-10 10:57:10 -0400 |
| commit | 57f656c11e29f80cdf440559defbb822aa85fb48 (patch) | |
| tree | fcdd88b353b270dd60737a0a187e395e6600f64f | |
| parent | 6659033a76f81c090a7f5ff5c3587e3af6fc7f53 (diff) | |
| download | mate-panel-zone-positioning.tar.bz2 mate-panel-zone-positioning.tar.xz | |
panel: Remove functions that are no longer used with the pack modelzone-positioning
These functions were part of the old pixel position model and nothing
calls them now that we use pack model for positioning.
| -rw-r--r-- | mate-panel/panel-widget.c | 72 | ||||
| -rw-r--r-- | mate-panel/panel-widget.h | 3 | ||||
| -rw-r--r-- | mate-panel/panel.c | 20 | ||||
| -rw-r--r-- | mate-panel/panel.h | 2 |
4 files changed, 1 insertions, 96 deletions
diff --git a/mate-panel/panel-widget.c b/mate-panel/panel-widget.c index 57972e7c..6b52b99a 100644 --- a/mate-panel/panel-widget.c +++ b/mate-panel/panel-widget.c @@ -612,38 +612,6 @@ get_applet_list_pos (PanelWidget *panel, return NULL; } -/*tells us if an applet is "stuck" on the right side*/ -int -panel_widget_is_applet_stuck (PanelWidget *panel_widget, - GtkWidget *widget) -{ - AppletData *applet; - - g_return_val_if_fail (PANEL_IS_WIDGET (panel_widget), FALSE); - g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); - - applet = g_object_get_data (G_OBJECT (widget), MATE_PANEL_APPLET_DATA); - if (applet) { - GList *applet_list, *l; - int end_pos = -1; - - applet_list = g_list_find (panel_widget->applet_list, applet); - - for (l = applet_list; l; l = l->next) { - applet = l->data; - - if (end_pos != -1 && applet->pos != end_pos) - break; - - end_pos = applet->pos + applet->cells; - if (end_pos >= panel_widget->size) - return TRUE; - } - } - - return FALSE; -} - static int get_size_from_hints (AppletData *ad, int cells) { @@ -1075,46 +1043,6 @@ panel_widget_push_move (PanelWidget *panel, } } -/*this is a special function and may fail if called improperly, it works -only under special circumstance when we know there is nothing from -old_size to panel->size*/ -static void -panel_widget_right_stick(PanelWidget *panel,int old_size) -{ - int i,pos; - GList *list,*prev; - AppletData *ad; - - g_return_if_fail(PANEL_IS_WIDGET(panel)); - g_return_if_fail(old_size>=0); - - if(old_size>=panel->size || - panel->packed) - return; - - list = get_applet_list_pos(panel,old_size-1); - - if(!list) - return; - - pos = panel->size-1; - - ad = list->data; - do { - i = ad->pos; - ad->pos = ad->constrained = pos--; - ad->cells = 1; - prev = list; - list = g_list_previous(list); - if(!list) - break; - ad = list->data; - } while(ad->pos + ad->cells == i); - - for (list = prev; list; list = list->next) - emit_applet_moved (panel, list->data); -} - /* data should be freed with g_list_free() */ static GList * get_applet_list_pack (PanelWidget *panel, diff --git a/mate-panel/panel-widget.h b/mate-panel/panel-widget.h index 29e6dc14..1e27daee 100644 --- a/mate-panel/panel-widget.h +++ b/mate-panel/panel-widget.h @@ -194,9 +194,6 @@ void panel_widget_draw_all (PanelWidget *panel, void panel_widget_draw_icon (PanelWidget *panel, ButtonWidget *applet); -/*tells us if an applet is "stuck" on the right side*/ -int panel_widget_is_applet_stuck (PanelWidget *panel, - GtkWidget *applet); /*get pos of the cursor location in panel coordinates*/ int panel_widget_get_cursorloc (PanelWidget *panel); diff --git a/mate-panel/panel.c b/mate-panel/panel.c index 065d2090..b720aeb6 100644 --- a/mate-panel/panel.c +++ b/mate-panel/panel.c @@ -1401,26 +1401,6 @@ panel_screen_from_panel_widget (PanelWidget *panel) return gtk_window_get_screen (GTK_WINDOW (panel->toplevel)); } -gboolean -panel_is_applet_right_stick (GtkWidget *applet) -{ - GtkWidget *parent; - PanelWidget *panel_widget; - - g_return_val_if_fail (GTK_IS_WIDGET (applet), FALSE); - - parent = gtk_widget_get_parent (applet); - - g_return_val_if_fail (PANEL_IS_WIDGET (parent), FALSE); - - panel_widget = PANEL_WIDGET (parent); - - if (!panel_toplevel_get_expand (panel_widget->toplevel)) - return FALSE; - - return panel_widget_is_applet_stuck (panel_widget, applet); -} - static void panel_delete_without_query (PanelToplevel *toplevel) { diff --git a/mate-panel/panel.h b/mate-panel/panel.h index bf1517ec..aafddb4a 100644 --- a/mate-panel/panel.h +++ b/mate-panel/panel.h @@ -26,7 +26,7 @@ PanelData *panel_setup (PanelToplevel *toplevel); GdkScreen *panel_screen_from_panel_widget (PanelWidget *panel); -gboolean panel_is_applet_right_stick (GtkWidget *applet); + gboolean panel_check_dnd_target_data (GtkWidget *widget, GdkDragContext *context, |
