summaryrefslogtreecommitdiff
path: root/applets/notification_area/main.c
diff options
context:
space:
mode:
authorFabien Broquard <[email protected]>2018-10-02 20:16:53 +0200
committerlukefromdc <[email protected]>2018-10-20 13:35:24 -0400
commit9bdd469392c4ae52f234b28ddd45615030167565 (patch)
tree4f7f35180dedd5c61f3bd426fbc44a5ebdaa8145 /applets/notification_area/main.c
parent3f351d5c959b81792ed5a20845bb871a66b2f87c (diff)
downloadmate-panel-9bdd469392c4ae52f234b28ddd45615030167565.tar.bz2
mate-panel-9bdd469392c4ae52f234b28ddd45615030167565.tar.xz
na-tray: wide panels, preliminary batch box to grid rename
box/Box/BOX changed to grid/Grid/GRID as a preliminary step to prepare for changing GtkBox in na-box/na-grid to a GtkGrid to make the notification area work well on vertical and wide panels note: even if everything is renamed to grid, the GtkWidget is still a GtkBox thats why GtkBox and GTK_TYPE_BOX have not been renamed.
Diffstat (limited to 'applets/notification_area/main.c')
-rw-r--r--applets/notification_area/main.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
index f656d029..df07a3e2 100644
--- a/applets/notification_area/main.c
+++ b/applets/notification_area/main.c
@@ -30,7 +30,7 @@
#include <gtk/gtk.h>
#include "main.h"
-#include "na-box.h"
+#include "na-grid.h"
#ifdef PROVIDE_WATCHER_SERVICE
# include "libstatus-notifier-watcher/gf-status-notifier-watcher.h"
@@ -40,7 +40,7 @@
struct _NaTrayAppletPrivate
{
- GtkWidget *box;
+ GtkWidget *grid;
#ifdef PROVIDE_WATCHER_SERVICE
GfStatusNotifierWatcher *sn_watcher;
@@ -225,14 +225,14 @@ na_tray_applet_style_updated (GtkWidget *widget)
if (parent_class_style_updated)
parent_class_style_updated (widget);
- if (!applet->priv->box)
+ if (!applet->priv->grid)
return;
gtk_widget_style_get (widget,
"icon-padding", &padding,
"icon-size", &icon_size,
NULL);
- g_object_set (applet->priv->box,
+ g_object_set (applet->priv->grid,
"icon-padding", padding,
"icon-size", icon_size,
NULL);
@@ -247,8 +247,8 @@ na_tray_applet_change_background(MatePanelApplet* panel_applet, MatePanelAppletB
parent_class_change_background (panel_applet, type, color, pattern);
}
- if (applet->priv->box)
- na_box_force_redraw (NA_BOX (applet->priv->box));
+ if (applet->priv->grid)
+ na_grid_force_redraw (NA_GRID (applet->priv->grid));
}
static void
@@ -260,10 +260,10 @@ na_tray_applet_change_orient (MatePanelApplet *panel_applet,
if (parent_class_change_orient)
parent_class_change_orient (panel_applet, orient);
- if (!applet->priv->box)
+ if (!applet->priv->grid)
return;
- gtk_orientable_set_orientation (GTK_ORIENTABLE (applet->priv->box),
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (applet->priv->grid),
get_gtk_orientation_from_applet_orient (orient));
}
@@ -286,10 +286,10 @@ na_tray_applet_focus (GtkWidget *widget,
{
NaTrayApplet *applet = NA_TRAY_APPLET (widget);
- /* We let the box handle the focus movement because we behave more like a
+ /* We let the grid handle the focus movement because we behave more like a
* container than a single applet. But if focus didn't move, we let the
* applet do its thing. */
- if (gtk_widget_child_focus (applet->priv->box, direction))
+ if (gtk_widget_child_focus (applet->priv->grid, direction))
return TRUE;
return GTK_WIDGET_CLASS (na_tray_applet_parent_class)->focus (widget, direction);
@@ -353,10 +353,10 @@ na_tray_applet_init (NaTrayApplet *applet)
#endif
orient = mate_panel_applet_get_orient (MATE_PANEL_APPLET (applet));
- applet->priv->box = na_box_new (get_gtk_orientation_from_applet_orient (orient));
+ applet->priv->grid = na_grid_new (get_gtk_orientation_from_applet_orient (orient));
- gtk_container_add (GTK_CONTAINER (applet), GTK_WIDGET (applet->priv->box));
- gtk_widget_show (GTK_WIDGET (applet->priv->box));
+ gtk_container_add (GTK_CONTAINER (applet), GTK_WIDGET (applet->priv->grid));
+ gtk_widget_show (GTK_WIDGET (applet->priv->grid));
atko = gtk_widget_get_accessible (GTK_WIDGET (applet));
atk_object_set_name (atko, _("Panel Notification Area"));