summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2024-01-28 02:52:52 +0100
committerraveit65 <[email protected]>2024-02-04 18:37:58 +0100
commita28797be4ad70d1546a7071af60ddf1a726a5c46 (patch)
treeedf2ece79bd3d5d1ab670e1dcc42faf5b1434671
parentc7b20bf68329757738c70032f0269758294d5f59 (diff)
downloadmate-panel-a28797be4ad70d1546a7071af60ddf1a726a5c46.tar.bz2
mate-panel-a28797be4ad70d1546a7071af60ddf1a726a5c46.tar.xz
Revert "Constify some pointer references in locals"
This reverts commit b91376262abb56d95f9ec86993edaa8e9fb2cc1a.
-rw-r--r--mate-panel/panel-widget.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/mate-panel/panel-widget.c b/mate-panel/panel-widget.c
index b97741b3..9a9ce829 100644
--- a/mate-panel/panel-widget.c
+++ b/mate-panel/panel-widget.c
@@ -493,7 +493,7 @@ run_up_forbidden(PanelWidget *panel,
g_return_if_fail(PANEL_IS_WIDGET(panel));
for(list = panel->applet_list;list!=NULL;list = g_list_next(list)) {
- const AppletData *ad = list->data;
+ AppletData *ad = list->data;
PanelWidget *p =
g_object_get_data (G_OBJECT(ad->applet),
MATE_PANEL_APPLET_ASSOC_PANEL_KEY);
@@ -568,7 +568,7 @@ panel_widget_cadd (GtkContainer *container,
static void
panel_widget_cremove (GtkContainer *container, GtkWidget *widget)
{
- const AppletData *ad;
+ AppletData *ad;
PanelWidget *p;
PanelWidget *panel;
@@ -614,7 +614,7 @@ get_applet_list_pos (PanelWidget *panel,
g_return_val_if_fail (PANEL_IS_WIDGET (panel), NULL);
for (l = panel->applet_list; l; l = l->next) {
- const AppletData *ad = l->data;
+ AppletData *ad = l->data;
if (ad->pos <= pos) {
if (ad->pos + ad->cells > pos)
@@ -636,17 +636,17 @@ PanelObjectEdgeRelativity
panel_widget_determine_applet_edge_relativity (PanelWidget *panel_widget,
GtkWidget *widget)
{
- const AppletData *applet_in_question;
- gboolean applet_is_centered = FALSE;
+ AppletData *applet_in_question;
+ gboolean applet_is_centered = FALSE;
g_return_val_if_fail (PANEL_IS_WIDGET (panel_widget), PANEL_EDGE_START);
g_return_val_if_fail (GTK_IS_WIDGET (widget), PANEL_EDGE_START);
applet_in_question = g_object_get_data (G_OBJECT (widget), MATE_PANEL_APPLET_DATA);
if (applet_in_question) {
- const GList *applet_list, *l;
- const AppletData *applet;
- int start_pos, end_pos;
+ GList *applet_list, *l;
+ AppletData *applet;
+ int start_pos, end_pos;
applet_list = g_list_find (panel_widget->applet_list, applet_in_question);
start_pos = applet_in_question->constrained;
@@ -757,7 +757,7 @@ panel_widget_jump_applet_right (PanelWidget *panel,
int pos)
{
AppletData *ad;
- const AppletData *nad = NULL;
+ AppletData *nad = NULL;
ad = list->data;
if (next)
@@ -837,7 +837,7 @@ panel_widget_jump_applet_left (PanelWidget *panel,
int pos)
{
AppletData *ad;
- const AppletData *pad = NULL;
+ AppletData *pad = NULL;
ad = list->data;
if (prev)
@@ -914,7 +914,7 @@ panel_widget_try_push_right (PanelWidget *panel,
int push)
{
AppletData *ad;
- const AppletData *nad = NULL;
+ AppletData *nad = NULL;
g_assert (list != NULL);
@@ -940,7 +940,7 @@ panel_widget_get_right_jump_pos (PanelWidget *panel,
GList *next,
int pos)
{
- const AppletData *nad = NULL;
+ AppletData *nad = NULL;
if (next)
nad = next->data;
@@ -962,7 +962,7 @@ panel_widget_get_right_switch_pos (PanelWidget *panel,
GList *list)
{
AppletData *ad;
- const AppletData *nad = NULL;
+ AppletData *nad = NULL;
g_assert (list != NULL);
@@ -988,7 +988,7 @@ panel_widget_try_push_left (PanelWidget *panel,
int push)
{
AppletData *ad;
- const AppletData *pad = NULL;
+ AppletData *pad = NULL;
g_assert (list != NULL);
@@ -1014,7 +1014,7 @@ panel_widget_get_left_jump_pos (PanelWidget *panel,
GList *prev,
int pos)
{
- const AppletData *pad = NULL;
+ AppletData *pad = NULL;
if (prev)
pad = prev->data;
@@ -1036,7 +1036,7 @@ panel_widget_get_left_switch_pos (PanelWidget *panel,
GList *list)
{
AppletData *ad;
- const AppletData *pad = NULL;
+ AppletData *pad = NULL;
g_assert (list != NULL);
@@ -1077,7 +1077,7 @@ panel_widget_switch_move (PanelWidget *panel,
finalpos = ad->constrained + moveby;
if (ad->constrained < finalpos) {
- const AppletData *pad;
+ AppletData *pad;
if (list->prev) {
pad = list->prev->data;
@@ -1103,7 +1103,7 @@ panel_widget_switch_move (PanelWidget *panel,
} else {
if (list->next) {
- const AppletData *nad = list->next->data;
+ AppletData *nad = list->next->data;
if (nad->expand_major)
gtk_widget_queue_resize (GTK_WIDGET (panel));
}
@@ -1126,7 +1126,7 @@ panel_widget_push_applet_right (PanelWidget *panel,
int push)
{
AppletData *ad;
- const AppletData *nad = NULL;
+ AppletData *nad = NULL;
g_assert (list != NULL);
@@ -1167,7 +1167,7 @@ panel_widget_push_applet_left (PanelWidget *panel,
int push)
{
AppletData *ad;
- const AppletData *pad = NULL;
+ AppletData *pad = NULL;
g_assert (list != NULL);
@@ -1227,7 +1227,7 @@ panel_widget_push_move (PanelWidget *panel,
break;
if (list->prev) {
- const AppletData *pad = list->prev->data;
+ AppletData *pad = list->prev->data;
if (pad->expand_major)
gtk_widget_queue_resize (GTK_WIDGET (panel));
}
@@ -1334,7 +1334,7 @@ panel_widget_get_preferred_size(GtkWidget *widget,
for (list = ad_with_hints;
list != NULL;
list = g_list_next (list)) {
- const AppletData *ad = list->data;
+ AppletData *ad = list->data;
panel->applets_hints[i].hints = ad->size_hints;
panel->applets_hints[i].len = ad->size_hints_len;
@@ -1396,7 +1396,7 @@ queue_resize_on_all_applets(PanelWidget *panel)
GList *li;
for(li = panel->applet_list; li != NULL;
li = g_list_next(li)) {
- const AppletData *ad = li->data;
+ AppletData *ad = li->data;
gtk_widget_queue_resize (ad->applet);
}
}
@@ -1525,7 +1525,7 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
id = mate_panel_applet_get_id_by_widget (ad->applet);
if (id)
{
- const AppletInfo *info = mate_panel_applet_get_by_id (id);
+ AppletInfo *info = mate_panel_applet_get_by_id (id);
position = g_settings_get_int (info->settings,
PANEL_OBJECT_POSITION_KEY);
edge_relativity = g_settings_get_enum (info->settings,
@@ -1680,7 +1680,7 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
id = mate_panel_applet_get_id_by_widget (ad->applet);
if (id)
{
- const AppletInfo *info = mate_panel_applet_get_by_id (id);
+ AppletInfo *info = mate_panel_applet_get_by_id (id);
edge_relativity = g_settings_get_enum (info->settings,
PANEL_OBJECT_RELATIVE_TO_EDGE_KEY);
right_stuck = g_settings_get_boolean (info->settings,
@@ -1690,7 +1690,7 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
prior_space = ad->constrained;
if (list->prev)
{
- const AppletData *pad = list->prev->data;
+ AppletData *pad = list->prev->data;
prior_space -= pad->constrained + pad->min_cells;
}
@@ -2123,7 +2123,7 @@ panel_widget_get_moveby (PanelWidget *panel, int pos, int offset)
static GList *
walk_up_to (int pos, GList *list)
{
- const AppletData *ad;
+ AppletData *ad;
g_return_val_if_fail (list != NULL, NULL);
@@ -2146,7 +2146,7 @@ walk_up_to (int pos, GList *list)
}
static GtkWidget *
-is_in_applet (int pos, const AppletData *ad)
+is_in_applet (int pos, AppletData *ad)
{
g_return_val_if_fail (ad != NULL, NULL);
@@ -2185,7 +2185,7 @@ panel_widget_get_free_spot (PanelWidget *panel,
if (start < 0)
start = 0;
for (e = 0, i = start; i < panel->size; i++) {
- const GtkWidget *applet;
+ GtkWidget *applet;
list = walk_up_to (i, list);
applet = is_in_applet (i, list->data);
if (applet == NULL ||
@@ -2204,7 +2204,7 @@ panel_widget_get_free_spot (PanelWidget *panel,
if (start >= panel->size)
start = panel->size - 1;
for (e = 0, i = start; i >= 0; i--) {
- const GtkWidget *applet;
+ GtkWidget *applet;
list = walk_up_to (i, list);
applet = is_in_applet (i, list->data);
if (applet == NULL ||