diff --git a/panel-plugin/netload.c b/panel-plugin/netload.c index 95811df..adf9098 100644 --- a/panel-plugin/netload.c +++ b/panel-plugin/netload.c @@ -51,7 +51,9 @@ static gchar* DEFAULT_COLOR[] = { "#FF4F00", "#FFE500" }; #define UPDATE_TIMEOUT 250 -#define MAX_LENGTH 10 +#define MAX_NAME_LENGTH 10 +#define MAX_DEV_LENGTH 20 +#define MAX_VAL_LENGTH 10 #define IN 0 #define OUT 1 @@ -993,7 +995,7 @@ static void monitor_create_options(XfcePanelPlugin *plugin, t_global_monitor *gl global->monitor->opt_entry = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(global->monitor->opt_entry), - MAX_LENGTH); + MAX_NAME_LENGTH); gtk_entry_set_text(GTK_ENTRY(global->monitor->opt_entry), global->monitor->options.label_text); gtk_widget_show(global->monitor->opt_entry); @@ -1025,7 +1027,7 @@ static void monitor_create_options(XfcePanelPlugin *plugin, t_global_monitor *gl gtk_label_set_mnemonic_widget(GTK_LABEL(device_label), global->monitor->net_entry); gtk_entry_set_max_length(GTK_ENTRY(global->monitor->net_entry), - MAX_LENGTH); + MAX_DEV_LENGTH); gtk_entry_set_text(GTK_ENTRY(global->monitor->net_entry), global->monitor->options.network_device); gtk_widget_show(global->monitor->opt_entry); @@ -1092,7 +1094,7 @@ static void monitor_create_options(XfcePanelPlugin *plugin, t_global_monitor *gl global->monitor->max_entry[i] = gtk_entry_new(); gtk_label_set_mnemonic_widget(GTK_LABEL(max_label[i]), global->monitor->max_entry[i]); - gtk_entry_set_max_length(GTK_ENTRY(global->monitor->max_entry[i]), MAX_LENGTH); + gtk_entry_set_max_length(GTK_ENTRY(global->monitor->max_entry[i]), MAX_VAL_LENGTH); g_snprintf( buffer, BUFSIZ, "%.2f", global->monitor->options.max[i] / 1024.0 ); gtk_entry_set_text(GTK_ENTRY(global->monitor->max_entry[i]), buffer);