Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a slider to AppIndicator (Ubuntu 11.04)

Tags:

I'm trying to add a slider to an AppIndicator similar to what the Sound Menu has.

I've looked through the code of the Sound Menu and found that I should be using libido-0.1.

Here's what I have so far:

indicator_menu = gtk_menu_new(); ido_slider_widget = ido_scale_menu_item_new_with_range("BRIGHTNESS", IDO_RANGE_STYLE_DEFAULT,  0, 0, 100, 1); ido_scale_menu_item_set_primary_label(IDO_SCALE_MENU_ITEM(ido_slider_widget), "BRIGHTNESS"); ido_scale_menu_item_set_style(IDO_SCALE_MENU_ITEM(ido_slider_widget), IDO_SCALE_MENU_ITEM_STYLE_LABEL); ido_scale_menu_item_set_primary_label(IDO_SCALE_MENU_ITEM(ido_slider_widget), " - "); ido_scale_menu_item_set_secondary_label(IDO_SCALE_MENU_ITEM(ido_slider_widget), " + ");  GtkMenuItem *menu_slider_item = GTK_MENU_ITEM(ido_slider_widget);  gtk_menu_append(indicator_menu, GTK_WIDGET(menu_slider_item)); gtk_menu_append(indicator_menu, gtk_menu_item_new_with_label("dfdsfds"));  gtk_widget_show_all(indicator_menu); gtk_widget_show_all(ido_slider_widget);  app_indicator_set_menu(indicator, GTK_MENU(indicator_menu)); 

All I see is a '-' symbol in the menu, how do I fix this?

like image 888
Romeo Calota Avatar asked Jul 31 '11 19:07

Romeo Calota


1 Answers

It has been a time I last worked with AppIndicator, but as far as I remember, you cannot add that kind of controls. You are limited to add standard menu entries.

like image 150
Arturo Torres Sánchez Avatar answered Oct 14 '22 21:10

Arturo Torres Sánchez