Exemplo n.º 1
0
static Bubblemon *
create_gui (XfcePanelPlugin *plugin)
{
  GtkWidget *frame, *ebox;
  GtkOrientation orientation;
  Bubblemon *base = g_new0(Bubblemon, 1);

  orientation = xfce_panel_plugin_get_orientation(plugin);
  base->plugin=plugin;

  base->bubblemon=bubblemon_init();
  bubblemon_plugin_fill(base, plugin);

  ebox = gtk_event_box_new();
  gtk_container_add( GTK_CONTAINER( plugin ), ebox );

  base->box = xfce_hvbox_new(orientation, FALSE, 0);
  gtk_container_add(GTK_CONTAINER(ebox), base->box);

  base->frame_widget = frame = gtk_frame_new( NULL );
  gtk_box_pack_end( GTK_BOX(base->box), frame, TRUE, TRUE, 0);

  gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( base->draw_area ) );

  update_orientation(plugin, orientation, base);
  gtk_widget_show_all(ebox);

  return base;
}
Exemplo n.º 2
0
static void
applet_change_orient (PanelApplet       *applet,
                      PanelAppletOrient  orient,
                      ButtonData        *button_data)
{
        update_orientation (button_data, orient);
}
Exemplo n.º 3
0
int 
carmen_planner_util_add_path_point(carmen_ackerman_traj_point_t point,
		carmen_planner_path_p path)
{
	check_path_capacity(path);

	path->points[path->length] = point;

	path->length++;

	update_orientation(path->length-2, path);

	return path->length-1;
}
Exemplo n.º 4
0
static gboolean
bigboard_button_applet_fill (PanelApplet *applet)
{
        ButtonData *button_data;

#ifdef GUI_LOG
        log_debug_messages = TRUE;
#endif
        
        g_log_set_default_handler(log_handler, NULL);
        g_log_set_handler(G_LOG_DOMAIN,
                          (GLogLevelFlags) (G_LOG_LEVEL_DEBUG | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION),
                          log_handler, NULL);

        panel_applet_set_flags (applet, PANEL_APPLET_EXPAND_MINOR);

        button_data = bigboard_button_add_to_widget (GTK_WIDGET (applet));

        g_debug ("Got panel applet size %d", panel_applet_get_size (applet));
        update_size (button_data,
                     panel_applet_get_size (applet));

        update_orientation (button_data,
                            panel_applet_get_orient (applet));

        /* FIXME: Update this comment. */
        /* we have to bind change_orient before we do applet_widget_add
           since we need to get an initial change_orient signal to set our
           initial oriantation, and we get that during the _add call */
        g_signal_connect (G_OBJECT (button_data->applet),
                          "change_orient",
                          G_CALLBACK (applet_change_orient),
                          button_data);

        panel_applet_set_background_widget (PANEL_APPLET (button_data->applet),
                                            GTK_WIDGET (button_data->applet));

        panel_applet_setup_menu_from_file (PANEL_APPLET (button_data->applet),
                                           NULL,
                                           "GNOME_OnlineDesktop_BigBoardButtonApplet.xml",
                                           NULL,
                                           bigboard_button_menu_verbs,
                                           button_data);

        gtk_widget_show_all (button_data->applet);

        return TRUE;
}
Exemplo n.º 5
0
void 
carmen_planner_util_set_path_point(int index, carmen_ackerman_traj_point_p path_point,
		carmen_planner_path_p path)
{  
	if (index >= path->length || index < 0)
	{
		carmen_warn("Bad path id in %s : requested %d but max id is %d.\n",
				__FUNCTION__, index, path->length-1);
		return;
	}
	path->points[index] = *path_point;

	update_orientation(index-1, path);

	return;
}