diff options
author | Fabien Broquard <[email protected]> | 2018-10-02 20:16:53 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-01-28 17:14:33 +0100 |
commit | 5027993097729e980239ac1ed65e86bd31d2901d (patch) | |
tree | 006d91d367248f948ffb45447a367c428345e101 /applets/notification_area/main.c | |
parent | d491abcac81b278c73cb8dce9b260b59ce4b176e (diff) | |
download | mate-panel-5027993097729e980239ac1ed65e86bd31d2901d.tar.bz2 mate-panel-5027993097729e980239ac1ed65e86bd31d2901d.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.c | 26 |
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")); |