static void panel_menu_bar_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec) { PanelMenuBar* menubar; g_return_if_fail (PANEL_IS_MENU_BAR (object)); menubar = PANEL_MENU_BAR(object); switch (prop_id) { case PROP_ORIENTATION: panel_menu_bar_set_orientation(menubar, g_value_get_enum(value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } }
void orientation_change (AppletInfo *info, PanelWidget *panel) { PanelOrientation orientation; orientation = panel_widget_get_applet_orientation (panel); switch (info->type) { case PANEL_OBJECT_APPLET: mate_panel_applet_frame_change_orientation ( MATE_PANEL_APPLET_FRAME (info->widget), orientation); break; case PANEL_OBJECT_MENU: case PANEL_OBJECT_LAUNCHER: case PANEL_OBJECT_ACTION: button_widget_set_orientation (BUTTON_WIDGET (info->widget), orientation); break; case PANEL_OBJECT_MENU_BAR: panel_menu_bar_set_orientation (PANEL_MENU_BAR (info->widget), orientation); break; case PANEL_OBJECT_DRAWER: { Drawer *drawer = info->data; PanelWidget *panel_widget; panel_widget = panel_toplevel_get_panel_widget (drawer->toplevel); button_widget_set_orientation (BUTTON_WIDGET (info->widget), orientation); gtk_widget_queue_resize (GTK_WIDGET (drawer->toplevel)); gtk_container_foreach (GTK_CONTAINER (panel_widget), orient_change_foreach, panel_widget); } break; case PANEL_OBJECT_SEPARATOR: panel_separator_set_orientation (PANEL_SEPARATOR (info->widget), orientation); break; default: break; } }