void create_taskbar(GtkWidget *parent)
{
GtkWidget *table, *label;
- GtkWidget *margin_x, *margin_y, *combo_background;
table = gtk_table_new (2, 2, FALSE);
gtk_widget_show (table);
void create_clock(GtkWidget *parent)
{
GtkWidget *table;
- GtkWidget *margin_x, *margin_y, *combo_background;
GtkWidget *label;
table = gtk_table_new (1, 2, FALSE);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
- margin_x = gtk_entry_new ();
- gtk_widget_show (margin_x);
- gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 16);
- gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
+ clock_format_line1 = gtk_entry_new ();
+ gtk_widget_show (clock_format_line1);
+ gtk_entry_set_width_chars (GTK_ENTRY (clock_format_line1), 16);
+ gtk_table_attach (GTK_TABLE (table), clock_format_line1, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Second line format"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
- margin_x = gtk_entry_new ();
- gtk_widget_show (margin_x);
- gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 16);
- gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
+ clock_format_line2 = gtk_entry_new ();
+ gtk_widget_show (clock_format_line2);
+ gtk_entry_set_width_chars (GTK_ENTRY (clock_format_line2), 16);
+ gtk_table_attach (GTK_TABLE (table), clock_format_line2, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Tooltip format"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, GTK_FILL, 0, 0, 0);
- margin_x = gtk_entry_new ();
- gtk_widget_show (margin_x);
- gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 16);
- gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 2, 3, GTK_FILL, 0, 0, 0);
+ clock_format_tooltip = gtk_entry_new ();
+ gtk_widget_show (clock_format_tooltip);
+ gtk_entry_set_width_chars (GTK_ENTRY (clock_format_tooltip), 16);
+ gtk_table_attach (GTK_TABLE (table), clock_format_tooltip, 3, 4, 2, 3, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("First line timezone"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
- margin_x = gtk_entry_new ();
- gtk_widget_show (margin_x);
- gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 16);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
+ clock_tmz_line1 = gtk_entry_new ();
+ gtk_widget_show (clock_tmz_line1);
+ gtk_entry_set_width_chars (GTK_ENTRY (clock_tmz_line1), 16);
+ gtk_table_attach (GTK_TABLE (table), clock_tmz_line1, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Second line timezone"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
- margin_x = gtk_entry_new ();
- gtk_widget_show (margin_x);
- gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 16);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
+ clock_tmz_line2 = gtk_entry_new ();
+ gtk_widget_show (clock_tmz_line2);
+ gtk_entry_set_width_chars (GTK_ENTRY (clock_tmz_line2), 16);
+ gtk_table_attach (GTK_TABLE (table), clock_tmz_line2, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Tooltip timezone"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 2, 3, GTK_FILL, 0, 0, 0);
- margin_x = gtk_entry_new ();
- gtk_widget_show (margin_x);
- gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 16);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
+ clock_tmz_tooltip = gtk_entry_new ();
+ gtk_widget_show (clock_tmz_tooltip);
+ gtk_entry_set_width_chars (GTK_ENTRY (clock_tmz_tooltip), 16);
+ gtk_table_attach (GTK_TABLE (table), clock_tmz_tooltip, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
change_paragraph(parent);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
- margin_x = gtk_entry_new ();
- gtk_widget_show (margin_x);
- gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 16);
- gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
+ clock_left_command = gtk_entry_new ();
+ gtk_widget_show (clock_left_command);
+ gtk_entry_set_width_chars (GTK_ENTRY (clock_left_command), 16);
+ gtk_table_attach (GTK_TABLE (table), clock_left_command, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Right click command"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
- margin_x = gtk_entry_new ();
- gtk_widget_show (margin_x);
- gtk_entry_set_width_chars (GTK_ENTRY (margin_x), 16);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
+ clock_right_command = gtk_entry_new ();
+ gtk_widget_show (clock_right_command);
+ gtk_entry_set_width_chars (GTK_ENTRY (clock_right_command), 16);
+ gtk_table_attach (GTK_TABLE (table), clock_right_command, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
change_paragraph(parent);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
- margin_x = gtk_spin_button_new_with_range (0, 500, 1);
- gtk_widget_show (margin_x);
- gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
- gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
+ clock_padding_x = gtk_spin_button_new_with_range (0, 500, 1);
+ gtk_widget_show (clock_padding_x);
+ gtk_entry_set_max_length (GTK_ENTRY (clock_padding_x), 3);
+ gtk_table_attach (GTK_TABLE (table), clock_padding_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Vertical padding"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
- margin_y = gtk_spin_button_new_with_range (0, 500, 1);
- gtk_widget_show (margin_y);
- gtk_entry_set_max_length (GTK_ENTRY (margin_y), 3);
- gtk_table_attach (GTK_TABLE (table), margin_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
+ clock_padding_y = gtk_spin_button_new_with_range (0, 500, 1);
+ gtk_widget_show (clock_padding_y);
+ gtk_entry_set_max_length (GTK_ENTRY (clock_padding_y), 3);
+ gtk_table_attach (GTK_TABLE (table), clock_padding_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Background"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
- margin_x = gtk_font_button_new ();
- gtk_widget_show (margin_x);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 22, 0, 1, GTK_FILL, 0, 0, 0);
-// gtk_font_button_set_show_style (GTK_FONT_BUTTON (margin_x), FALSE);
+ clock_font_line1 = gtk_font_button_new ();
+ gtk_widget_show (clock_font_line1);
+ gtk_table_attach (GTK_TABLE (table), clock_font_line1, 7, 22, 0, 1, GTK_FILL, 0, 0, 0);
+// gtk_font_button_set_show_style (GTK_FONT_BUTTON (clock_font_line1), FALSE);
label = gtk_label_new (_("Font second line"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
- margin_x = gtk_font_button_new ();
- gtk_widget_show (margin_x);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 22, 1, 2, GTK_FILL, 0, 0, 0);
-// gtk_font_button_set_show_style (GTK_FONT_BUTTON (margin_x), FALSE);
+ clock_font_line2 = gtk_font_button_new ();
+ gtk_widget_show (clock_font_line2);
+ gtk_table_attach (GTK_TABLE (table), clock_font_line2, 7, 22, 1, 2, GTK_FILL, 0, 0, 0);
+// gtk_font_button_set_show_style (GTK_FONT_BUTTON (clock_font_line2), FALSE);
label = gtk_label_new (_("Font color"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 2, 3, GTK_FILL, 0, 0, 0);
- margin_x = gtk_color_button_new();
- gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(margin_x), TRUE);
- gtk_widget_show (margin_x);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
+ clock_font_color = gtk_color_button_new();
+ gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(clock_font_color), TRUE);
+ gtk_widget_show (clock_font_color);
+ gtk_table_attach (GTK_TABLE (table), clock_font_color, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
change_paragraph(parent);
}
void create_systemtray(GtkWidget *parent)
{
GtkWidget *table;
- GtkWidget *margin_x, *margin_y;
GtkWidget *label;
table = gtk_table_new (2, 2, FALSE);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
- margin_x = gtk_spin_button_new_with_range (0, 500, 1);
- gtk_widget_show (margin_x);
- gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
- gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
+ systray_padding_x = gtk_spin_button_new_with_range (0, 500, 1);
+ gtk_widget_show (systray_padding_x);
+ gtk_entry_set_max_length (GTK_ENTRY (systray_padding_x), 3);
+ gtk_table_attach (GTK_TABLE (table), systray_padding_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Vertical padding"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
- margin_y = gtk_spin_button_new_with_range (0, 500, 1);
- gtk_widget_show (margin_y);
- gtk_entry_set_max_length (GTK_ENTRY (margin_y), 3);
- gtk_table_attach (GTK_TABLE (table), margin_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
+ systray_padding_y = gtk_spin_button_new_with_range (0, 500, 1);
+ gtk_widget_show (systray_padding_y);
+ gtk_entry_set_max_length (GTK_ENTRY (systray_padding_y), 3);
+ gtk_table_attach (GTK_TABLE (table), systray_padding_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Spacing"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, GTK_FILL, 0, 0, 0);
- margin_x = gtk_spin_button_new_with_range (0, 500, 1);
- gtk_widget_show (margin_x);
- gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
- gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 2, 3, GTK_FILL, 0, 0, 0);
+ systray_spacing = gtk_spin_button_new_with_range (0, 500, 1);
+ gtk_widget_show (systray_spacing);
+ gtk_entry_set_max_length (GTK_ENTRY (systray_spacing), 3);
+ gtk_table_attach (GTK_TABLE (table), systray_spacing, 3, 4, 2, 3, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Background"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
- margin_x = gtk_spin_button_new_with_range (0, 500, 1);
- gtk_widget_show (margin_x);
- gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
+ systray_icon_size = gtk_spin_button_new_with_range (0, 500, 1);
+ gtk_widget_show (systray_icon_size);
+ gtk_entry_set_max_length (GTK_ENTRY (systray_icon_size), 3);
+ gtk_table_attach (GTK_TABLE (table), systray_icon_size, 7, 8, 0, 1, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Icon opacity"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
- margin_x = gtk_spin_button_new_with_range (0, 100, 1);
- gtk_widget_show (margin_x);
- gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
+ systray_icon_opacity = gtk_spin_button_new_with_range (0, 100, 1);
+ gtk_widget_show (systray_icon_opacity);
+ gtk_entry_set_max_length (GTK_ENTRY (systray_icon_opacity), 3);
+ gtk_table_attach (GTK_TABLE (table), systray_icon_opacity, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Icon saturation"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 2, 3, GTK_FILL, 0, 0, 0);
- margin_x = gtk_spin_button_new_with_range (-100, 100, 1);
- gtk_widget_show (margin_x);
- gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
+ systray_icon_saturation = gtk_spin_button_new_with_range (-100, 100, 1);
+ gtk_widget_show (systray_icon_saturation);
+ gtk_entry_set_max_length (GTK_ENTRY (systray_icon_saturation), 4);
+ gtk_table_attach (GTK_TABLE (table), systray_icon_saturation, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Icon brightness"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 3, 4, GTK_FILL, 0, 0, 0);
- margin_x = gtk_spin_button_new_with_range (-100, 100, 1);
- gtk_widget_show (margin_x);
- gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 3, 4, GTK_FILL, 0, 0, 0);
+ systray_icon_brightness = gtk_spin_button_new_with_range (-100, 100, 1);
+ gtk_widget_show (systray_icon_brightness);
+ gtk_entry_set_max_length (GTK_ENTRY (systray_icon_brightness), 4);
+ gtk_table_attach (GTK_TABLE (table), systray_icon_brightness, 7, 8, 3, 4, GTK_FILL, 0, 0, 0);
}
void create_battery(GtkWidget *parent)
{
GtkWidget *table, *label;
- GtkWidget *margin_x, *margin_y, *combo_background, *alert_command;
table = gtk_table_new (1, 2, FALSE);
gtk_widget_show (table);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
- margin_x = gtk_spin_button_new_with_range (0, 100, 1);
- gtk_widget_show (margin_x);
- gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
- gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
+ battery_hide_if_higher = gtk_spin_button_new_with_range (0, 101, 1);
+ gtk_widget_show (battery_hide_if_higher);
+ gtk_entry_set_max_length (GTK_ENTRY (battery_hide_if_higher), 3);
+ gtk_table_attach (GTK_TABLE (table), battery_hide_if_higher, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("%"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
- margin_x = gtk_spin_button_new_with_range (0, 100, 1);
- gtk_widget_show (margin_x);
- gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
- gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
+ battery_alert_if_lower = gtk_spin_button_new_with_range (0, 100, 1);
+ gtk_widget_show (battery_alert_if_lower);
+ gtk_entry_set_max_length (GTK_ENTRY (battery_alert_if_lower), 3);
+ gtk_table_attach (GTK_TABLE (table), battery_alert_if_lower, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("%"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 7, 8, 1, 2, GTK_FILL, 0, 0, 0);
- alert_command = gtk_entry_new ();
- gtk_widget_show (alert_command);
- gtk_entry_set_width_chars (GTK_ENTRY (alert_command), 20);
- gtk_table_attach (GTK_TABLE (table), alert_command, 8, 9, 1, 2, GTK_FILL, 0, 0, 0);
+ battery_alert_cmd = gtk_entry_new ();
+ gtk_widget_show (battery_alert_cmd);
+ gtk_entry_set_width_chars (GTK_ENTRY (battery_alert_cmd), 28);
+ gtk_table_attach (GTK_TABLE (table), battery_alert_cmd, 8, 9, 1, 2, GTK_FILL, 0, 0, 0);
change_paragraph(parent);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
- margin_x = gtk_spin_button_new_with_range (0, 500, 1);
- gtk_widget_show (margin_x);
- gtk_entry_set_max_length (GTK_ENTRY (margin_x), 3);
- gtk_table_attach (GTK_TABLE (table), margin_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
+ battery_padding_x = gtk_spin_button_new_with_range (0, 500, 1);
+ gtk_widget_show (battery_padding_x);
+ gtk_entry_set_max_length (GTK_ENTRY (battery_padding_x), 3);
+ gtk_table_attach (GTK_TABLE (table), battery_padding_x, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Vertical padding"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
- margin_y = gtk_spin_button_new_with_range (0, 500, 1);
- gtk_widget_show (margin_y);
- gtk_entry_set_max_length (GTK_ENTRY (margin_y), 3);
- gtk_table_attach (GTK_TABLE (table), margin_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
+ battery_padding_y = gtk_spin_button_new_with_range (0, 500, 1);
+ gtk_widget_show (battery_padding_y);
+ gtk_entry_set_max_length (GTK_ENTRY (battery_padding_y), 3);
+ gtk_table_attach (GTK_TABLE (table), battery_padding_y, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
label = gtk_label_new (_("Background"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_FILL, 0, 0, 0);
- margin_x = gtk_font_button_new ();
- gtk_widget_show (margin_x);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 22, 0, 1, GTK_FILL, 0, 0, 0);
-// gtk_font_button_set_show_style (GTK_FONT_BUTTON (margin_x), FALSE);
+ battery_font_line1 = gtk_font_button_new ();
+ gtk_widget_show (battery_font_line1);
+ gtk_table_attach (GTK_TABLE (table), battery_font_line1, 7, 22, 0, 1, GTK_FILL, 0, 0, 0);
+// gtk_font_button_set_show_style (GTK_FONT_BUTTON (battery_font_line1), FALSE);
label = gtk_label_new (_("Font second line"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 1, 2, GTK_FILL, 0, 0, 0);
- margin_x = gtk_font_button_new ();
- gtk_widget_show (margin_x);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 22, 1, 2, GTK_FILL, 0, 0, 0);
-// gtk_font_button_set_show_style (GTK_FONT_BUTTON (margin_x), FALSE);
+ battery_font_line2 = gtk_font_button_new ();
+ gtk_widget_show (battery_font_line2);
+ gtk_table_attach (GTK_TABLE (table), battery_font_line2, 7, 22, 1, 2, GTK_FILL, 0, 0, 0);
+// gtk_font_button_set_show_style (GTK_FONT_BUTTON (battery_font_line2), FALSE);
label = gtk_label_new (_("Font color"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 2, 3, GTK_FILL, 0, 0, 0);
- margin_x = gtk_color_button_new();
- gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(margin_x), TRUE);
- gtk_widget_show (margin_x);
- gtk_table_attach (GTK_TABLE (table), margin_x, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
+ battery_font_color = gtk_color_button_new();
+ gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(battery_font_color), TRUE);
+ gtk_widget_show (battery_font_color);
+ gtk_table_attach (GTK_TABLE (table), battery_font_color, 7, 8, 2, 3, GTK_FILL, 0, 0, 0);
change_paragraph(parent);
}
/* Battery */
else if (strcmp (key, "battery_low_status") == 0) {
-#ifdef ENABLE_BATTERY
- //battery_low_status = atoi(value);
- //if(battery_low_status < 0 || battery_low_status > 100)
- //battery_low_status = 0;
-#endif
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(battery_alert_if_lower), atof(value));
}
else if (strcmp (key, "battery_low_cmd") == 0) {
-#ifdef ENABLE_BATTERY
- //if (strlen(value) > 0)
- //battery_low_cmd = strdup (value);
-#endif
+ gtk_entry_set_text(GTK_ENTRY(battery_alert_cmd), value);
}
else if (strcmp (key, "bat1_font") == 0) {
-#ifdef ENABLE_BATTERY
- //bat1_font_desc = pango_font_description_from_string (value);
-#endif
+ gtk_font_button_set_font_name(GTK_FONT_BUTTON(battery_font_line1), value);
}
else if (strcmp (key, "bat2_font") == 0) {
-#ifdef ENABLE_BATTERY
- //bat2_font_desc = pango_font_description_from_string (value);
-#endif
+ gtk_font_button_set_font_name(GTK_FONT_BUTTON(battery_font_line2), value);
}
else if (strcmp (key, "battery_font_color") == 0) {
-#ifdef ENABLE_BATTERY
extract_values(value, &value1, &value2, &value3);
- //get_color (value1, panel_config.battery.font.color);
- //if (value2) panel_config.battery.font.alpha = (atoi (value2) / 100.0);
- //else panel_config.battery.font.alpha = 0.5;
-#endif
+ GdkColor col;
+ hex2gdk(value1, &col);
+ gtk_color_button_set_color(GTK_COLOR_BUTTON(battery_font_color), &col);
+ if (value2) {
+ int alpha = atoi(value2);
+ gtk_color_button_set_alpha(GTK_COLOR_BUTTON(battery_font_color), (alpha*65535)/100);
+ }
}
else if (strcmp (key, "battery_padding") == 0) {
-#ifdef ENABLE_BATTERY
extract_values(value, &value1, &value2, &value3);
- //panel_config.battery.area.paddingxlr = panel_config.battery.area.paddingx = atoi (value1);
- //if (value2) panel_config.battery.area.paddingy = atoi (value2);
- //if (value3) panel_config.battery.area.paddingx = atoi (value3);
-#endif
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(battery_padding_x), atof(value1));
+ if (value2) gtk_spin_button_set_value(GTK_SPIN_BUTTON(battery_padding_y), atof(value2));
}
else if (strcmp (key, "battery_background_id") == 0) {
-#ifdef ENABLE_BATTERY
//int id = atoi (value);
//id = (id < backgrounds->len && id >= 0) ? id : 0;
//panel_config.battery.area.bg = &g_array_index(backgrounds, Background, id);
-#endif
}
else if (strcmp (key, "battery_hide") == 0) {
-#ifdef ENABLE_BATTERY
- //percentage_hide = atoi (value);
- //if (percentage_hide == 0)
- // percentage_hide = 101;
-#endif
+ int percentage_hide = atoi (value);
+ if (percentage_hide == 0)
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(battery_hide_if_higher), 101.0);
+ else
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(battery_hide_if_higher), atof(value));
}
/* Clock */
else if (strcmp (key, "time1_format") == 0) {
- //if (strlen(value) > 0) {
- //time1_format = strdup (value);
- //clock_enabled = 1;
- //}
+ gtk_entry_set_text(GTK_ENTRY(clock_format_line1), value);
}
else if (strcmp (key, "time2_format") == 0) {
- //if (strlen(value) > 0)
- //time2_format = strdup (value);
+ gtk_entry_set_text(GTK_ENTRY(clock_format_line2), value);
}
else if (strcmp (key, "time1_font") == 0) {
- //time1_font_desc = pango_font_description_from_string (value);
+ gtk_font_button_set_font_name(GTK_FONT_BUTTON(clock_font_line1), value);
}
else if (strcmp(key, "time1_timezone") == 0) {
- //if (strlen(value) > 0)
- //time1_timezone = strdup(value);
+ gtk_entry_set_text(GTK_ENTRY(clock_tmz_line1), value);
}
else if (strcmp(key, "time2_timezone") == 0) {
- //if (strlen(value) > 0)
- //time2_timezone = strdup(value);
+ gtk_entry_set_text(GTK_ENTRY(clock_tmz_line2), value);
}
else if (strcmp (key, "time2_font") == 0) {
- //time2_font_desc = pango_font_description_from_string (value);
+ gtk_font_button_set_font_name(GTK_FONT_BUTTON(clock_font_line2), value);
}
else if (strcmp (key, "clock_font_color") == 0) {
extract_values(value, &value1, &value2, &value3);
- //get_color (value1, panel_config.clock.font.color);
- //if (value2) panel_config.clock.font.alpha = (atoi (value2) / 100.0);
- //else panel_config.clock.font.alpha = 0.5;
+ GdkColor col;
+ hex2gdk(value1, &col);
+ gtk_color_button_set_color(GTK_COLOR_BUTTON(clock_font_color), &col);
+ if (value2) {
+ int alpha = atoi(value2);
+ gtk_color_button_set_alpha(GTK_COLOR_BUTTON(clock_font_color), (alpha*65535)/100);
+ }
}
else if (strcmp (key, "clock_padding") == 0) {
extract_values(value, &value1, &value2, &value3);
- //panel_config.clock.area.paddingxlr = panel_config.clock.area.paddingx = atoi (value1);
- //if (value2) panel_config.clock.area.paddingy = atoi (value2);
- //if (value3) panel_config.clock.area.paddingx = atoi (value3);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(clock_padding_x), atof(value1));
+ if (value2) gtk_spin_button_set_value(GTK_SPIN_BUTTON(clock_padding_y), atof(value2));
}
else if (strcmp (key, "clock_background_id") == 0) {
//int id = atoi (value);
//panel_config.clock.area.bg = &g_array_index(backgrounds, Background, id);
}
else if (strcmp(key, "clock_tooltip") == 0) {
- //if (strlen(value) > 0)
- //time_tooltip_format = strdup (value);
+ gtk_entry_set_text(GTK_ENTRY(clock_format_tooltip), value);
}
else if (strcmp(key, "clock_tooltip_timezone") == 0) {
- //if (strlen(value) > 0)
- //time_tooltip_timezone = strdup(value);
+ gtk_entry_set_text(GTK_ENTRY(clock_tmz_tooltip), value);
}
else if (strcmp(key, "clock_lclick_command") == 0) {
- //if (strlen(value) > 0)
- //clock_lclick_command = strdup(value);
+ gtk_entry_set_text(GTK_ENTRY(clock_left_command), value);
}
else if (strcmp(key, "clock_rclick_command") == 0) {
- //if (strlen(value) > 0)
- //clock_rclick_command = strdup(value);
+ gtk_entry_set_text(GTK_ENTRY(clock_right_command), value);
}
/* Taskbar */
/* Systray */
else if (strcmp (key, "systray_padding") == 0) {
extract_values(value, &value1, &value2, &value3);
- //systray.area.paddingxlr = systray.area.paddingx = atoi (value1);
- //if (value2) systray.area.paddingy = atoi (value2);
- //if (value3) systray.area.paddingx = atoi (value3);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_padding_x), atof(value1));
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_spacing), atof(value1));
+ if (value2) gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_padding_y), atof(value2));
+ if (value3) gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_spacing), atof(value3));
}
else if (strcmp (key, "systray_background_id") == 0) {
//int id = atoi (value);
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_icon_order), 2);
}
else if (strcmp(key, "systray_icon_size") == 0) {
- //systray_max_icon_size = atoi(value);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_size), atof(value));
}
else if (strcmp(key, "systray_icon_asb") == 0) {
extract_values(value, &value1, &value2, &value3);
- //systray.alpha = atoi(value1);
- //systray.saturation = atoi(value2);
- //systray.brightness = atoi(value3);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_opacity), atof(value1));
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_saturation), atof(value2));
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_brightness), atof(value3));
}
/* Launcher */