From c8e5702127e507e82e6f68a4b8c546803accea9d Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 30 Jun 2005 08:19:37 +0000 Subject: import clean BK tree at cset 1.3670 --- packages/gpe-conf/gpe-conf-0.1.22/.mtn2git_empty | 0 .../gpe-conf-0.1.22/battery_with_no_lifetime.patch | 16 ++ .../gpe-conf/gpe-conf-0.1.22/fix-wificonfig.patch | 146 +++++++++++++ .../gpe-conf-0.1.22/gpe-conf-0.1.22-20041124.patch | 227 +++++++++++++++++++++ .../ignore_invalid_battery_values.patch | 16 ++ packages/gpe-conf/gpe-conf-0.1.22/serial_tts.patch | 11 + 6 files changed, 416 insertions(+) create mode 100644 packages/gpe-conf/gpe-conf-0.1.22/.mtn2git_empty (limited to 'packages/gpe-conf/gpe-conf-0.1.22') diff --git a/packages/gpe-conf/gpe-conf-0.1.22/.mtn2git_empty b/packages/gpe-conf/gpe-conf-0.1.22/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/gpe-conf/gpe-conf-0.1.22/battery_with_no_lifetime.patch b/packages/gpe-conf/gpe-conf-0.1.22/battery_with_no_lifetime.patch index e69de29bb2..099dd55b2f 100644 --- a/packages/gpe-conf/gpe-conf-0.1.22/battery_with_no_lifetime.patch +++ b/packages/gpe-conf/gpe-conf-0.1.22/battery_with_no_lifetime.patch @@ -0,0 +1,16 @@ +Index: gpe-conf-0.1.22/battery.c +=================================================================== +--- gpe-conf-0.1.22.orig/battery.c 2004-10-25 19:28:49.000000000 +0100 ++++ gpe-conf-0.1.22/battery.c 2005-02-17 13:04:41.000000000 +0000 +@@ -346,8 +346,10 @@ + + if (ac_connected) + sprintf(tmp,"%s",_("AC connected")); +- else ++ else if (remaining > 0) + sprintf(tmp,"%s: %d min.",_("Lifetime"), remaining); ++ else ++ sprintf(tmp,""); + gtk_label_set_text(GTK_LABEL(batt_int.llifetime),tmp); + } + } diff --git a/packages/gpe-conf/gpe-conf-0.1.22/fix-wificonfig.patch b/packages/gpe-conf/gpe-conf-0.1.22/fix-wificonfig.patch index e69de29bb2..9df234dc15 100644 --- a/packages/gpe-conf/gpe-conf-0.1.22/fix-wificonfig.patch +++ b/packages/gpe-conf/gpe-conf-0.1.22/fix-wificonfig.patch @@ -0,0 +1,146 @@ +Index: cfgfile.h +=================================================================== +RCS file: /cvs/gpe/base/gpe-conf/cfgfile.h,v +retrieving revision 1.10 +diff -u -r1.10 cfgfile.h +--- cfgfile.h 24 Nov 2004 15:43:10 -0000 1.10 ++++ cfgfile.h 29 Nov 2004 16:21:47 -0000 +@@ -58,15 +58,16 @@ + t_wifimode mode; + gint iswireless; + +- gint isstatic; +- gint isinet; +- gint isloop; +- gint isdhcp; +- gint isppp; ++ gboolean isstatic; ++ gboolean isinet; ++ gboolean isloop; ++ gboolean isdhcp; ++ gboolean isppp; + gint firstline; + gint lastline; + gint status; + gboolean ispresent; ++ gint uipos; + } NWInterface_t; + + gint set_file_open(gint openon); +Index: network.c +=================================================================== +RCS file: /cvs/gpe/base/gpe-conf/network.c,v +retrieving revision 1.43 +diff -u -r1.43 network.c +--- network.c 24 Nov 2004 15:43:10 -0000 1.43 ++++ network.c 29 Nov 2004 16:21:48 -0000 +@@ -65,7 +65,6 @@ + GtkWidget *create_nwdhcp_widgets (NWInterface_t iface); + GtkWidget *create_nwppp_widgets (NWInterface_t iface); + +-static guint not_added = 0; + static gchar *cfgfile; + static gboolean have_access = FALSE; + static GtkTooltips *tooltips; +@@ -300,12 +299,15 @@ + if (ctable) + { + label = gtk_label_new (iflist[i].name); +- gtk_notebook_append_page (GTK_NOTEBOOK (table), +- GTK_WIDGET (ctable), label); ++ iflist[i].uipos = gtk_notebook_append_page (GTK_NOTEBOOK (table), ++ GTK_WIDGET (ctable), ++ label); + gtk_widget_show_all (table); ++ g_object_set_data(G_OBJECT(ctable), "ifnr", (gpointer)i); + } + else +- not_added++; ++ iflist[i].uipos = -1; ++ + gtk_notebook_set_current_page (GTK_NOTEBOOK (table), -1); + } + } +@@ -335,11 +337,13 @@ + void + changed_nwtype (GtkToggleButton * togglebutton, gpointer user_data) + { +- GtkWidget *ctable, *label; ++ GtkWidget *ctable, *label, *page; + gchar wname[100]; +- gint row = +- gtk_notebook_get_current_page (GTK_NOTEBOOK (table)) + +- not_added - PAGE_OFFSET; ++ gint row; ++ ++ page = gtk_notebook_get_nth_page(GTK_NOTEBOOK (table), ++ gtk_notebook_get_current_page (GTK_NOTEBOOK (table))); ++ row = (gint)g_object_get_data(G_OBJECT(page), "ifnr"); + + if (!gtk_toggle_button_get_active (togglebutton)) + return; // just run once +@@ -385,10 +389,11 @@ + (GTK_NOTEBOOK (table))); + gtk_notebook_insert_page (GTK_NOTEBOOK (table), + GTK_WIDGET (ctable), label, +- row - not_added + PAGE_OFFSET); ++ iflist[row].uipos); + gtk_widget_show_all (table); + gtk_notebook_set_page (GTK_NOTEBOOK (table), +- row - not_added + PAGE_OFFSET); ++ iflist[row].uipos); ++ g_object_set_data(G_OBJECT(ctable), "ifnr", (gpointer)row); + } + } + +@@ -922,12 +927,14 @@ + void + changed_wifi (GtkToggleButton * togglebutton, gpointer user_data) + { +- GtkWidget *widget; ++ GtkWidget *widget, *page; + gchar wname[100]; +- gint ifnr = gtk_notebook_get_current_page (GTK_NOTEBOOK (table)) + +- not_added - PAGE_OFFSET; ++ gint ifnr; ++ ++ page = gtk_notebook_get_nth_page(GTK_NOTEBOOK (table), ++ gtk_notebook_get_current_page (GTK_NOTEBOOK (table))); ++ ifnr = (gint)g_object_get_data(G_OBJECT(page), "ifnr"); + +- // look who called us... + strcpy (wname, "wificonfig"); + strcat (wname, iflist[ifnr].name); + +@@ -941,10 +948,12 @@ + void + clicked_wificonfig (GtkButton *button, gpointer user_data) + { ++ GtkWidget *page; + gint ifnr; + +- ifnr = gtk_notebook_get_current_page (GTK_NOTEBOOK (table)) + +- not_added - PAGE_OFFSET; ++ page = gtk_notebook_get_nth_page(GTK_NOTEBOOK (table), ++ gtk_notebook_get_current_page (GTK_NOTEBOOK (table))); ++ ifnr = (gint)g_object_get_data(G_OBJECT(page), "ifnr"); + + show_wificonfig(gtk_widget_get_toplevel(GTK_WIDGET(button)), &iflist[ifnr]); + } +@@ -1662,11 +1671,13 @@ + if (!have_access) + gtk_widget_set_sensitive (ctable, FALSE); + label = gtk_label_new (iflist[row].name); +- gtk_notebook_append_page (GTK_NOTEBOOK (table), +- GTK_WIDGET (ctable), label); ++ iflist[row].uipos = gtk_notebook_append_page (GTK_NOTEBOOK (table), ++ GTK_WIDGET (ctable), ++ label); ++ g_object_set_data(G_OBJECT(ctable), "ifnr", (gpointer)row); + } + else +- not_added++; // we'll run into trouble if we have a loopback device between other in interfaces ++ iflist[row].uipos = -1; + } + return tablebox; + } diff --git a/packages/gpe-conf/gpe-conf-0.1.22/gpe-conf-0.1.22-20041124.patch b/packages/gpe-conf/gpe-conf-0.1.22/gpe-conf-0.1.22-20041124.patch index e69de29bb2..daa0be2888 100644 --- a/packages/gpe-conf/gpe-conf-0.1.22/gpe-conf-0.1.22-20041124.patch +++ b/packages/gpe-conf/gpe-conf-0.1.22/gpe-conf-0.1.22-20041124.patch @@ -0,0 +1,227 @@ +? rgpe-conf-0.1.22-20041124.patch +Index: ChangeLog +=================================================================== +RCS file: /cvs/gpe/base/gpe-conf/ChangeLog,v +retrieving revision 1.268 +retrieving revision 1.270 +diff -u -r1.268 -r1.270 +--- ChangeLog 23 Nov 2004 21:34:38 -0000 1.268 ++++ ChangeLog 24 Nov 2004 15:44:10 -0000 1.270 +@@ -1,5 +1,15 @@ + 2004-11-23 Florian Boor + ++ * cfgfile.*, network.c: Hide all network interfaces that are not available. ++ ++2004-11-19 Florian Boor ++ ++ * users/interface.*, users/callbacks.c: Prevent user from deleting last ++ user account. ++ * timeanddate.c: Make some entries activate OK button. ++ ++2004-11-23 Florian Boor ++ + * Released Version 0.1.22 + + 2004-11-17 Florian Boor +Index: cfgfile.c +=================================================================== +RCS file: /cvs/gpe/base/gpe-conf/cfgfile.c,v +retrieving revision 1.14 +retrieving revision 1.15 +diff -u -r1.14 -r1.15 +--- cfgfile.c 16 Oct 2004 16:03:42 -0000 1.14 ++++ cfgfile.c 24 Nov 2004 15:43:10 -0000 1.15 +@@ -19,9 +19,12 @@ + #include + #include + #include ++#include ++#include + + #include "cfgfile.h" + #include "network.h" ++#include "tools/interface.h" + + #define _(x) gettext(x) + +@@ -280,6 +283,22 @@ + } + } + ++static gboolean ++is_present_interface(gchar *ifname) ++{ ++ struct interface *int_list, *ife; ++ ++ int_list = if_getlist (); ++ g_strstrip(ifname); ++ ++ for (ife = int_list; ife; ife = ife->next) ++ { ++ if (g_str_has_prefix(ifname, ife->name)) ++ return TRUE; ++ } ++ return FALSE; ++} ++ + gint get_scheme_list() + { + gchar ifname[255] = {0}; +@@ -339,6 +358,7 @@ + memset(&iflist[l-1],'\0',sizeof(NWInterface_t)); + + strcpy(iflist[l-1].name,ifname); ++ iflist[l-1].ispresent = is_present_interface(ifname); + + iflist[l-1].isstatic = FALSE; + iflist[l-1].isinet = FALSE; +Index: cfgfile.h +=================================================================== +RCS file: /cvs/gpe/base/gpe-conf/cfgfile.h,v +retrieving revision 1.9 +retrieving revision 1.10 +diff -u -r1.9 -r1.10 +--- cfgfile.h 25 Aug 2004 10:17:31 -0000 1.9 ++++ cfgfile.h 24 Nov 2004 15:43:10 -0000 1.10 +@@ -66,6 +66,7 @@ + gint firstline; + gint lastline; + gint status; ++ gboolean ispresent; + } NWInterface_t; + + gint set_file_open(gint openon); +Index: network.c +=================================================================== +RCS file: /cvs/gpe/base/gpe-conf/network.c,v +retrieving revision 1.42 +retrieving revision 1.43 +diff -u -r1.42 -r1.43 +--- network.c 17 Nov 2004 18:25:59 -0000 1.42 ++++ network.c 24 Nov 2004 15:43:10 -0000 1.43 +@@ -1648,12 +1648,15 @@ + for (row = 0; row < num_int; row++) + { + ctable = NULL; +- if (iflist[row].isstatic) +- ctable = create_nwstatic_widgets (iflist[row]); +- if (iflist[row].isdhcp) +- ctable = create_nwdhcp_widgets (iflist[row]); +- if (iflist[row].isppp) +- ctable = create_nwppp_widgets (iflist[row]); ++ if (iflist[row].ispresent) ++ { ++ if (iflist[row].isstatic) ++ ctable = create_nwstatic_widgets (iflist[row]); ++ if (iflist[row].isdhcp) ++ ctable = create_nwdhcp_widgets (iflist[row]); ++ if (iflist[row].isppp) ++ ctable = create_nwppp_widgets (iflist[row]); ++ } + if (ctable) + { + if (!have_access) +Index: timeanddate.c +=================================================================== +RCS file: /cvs/gpe/base/gpe-conf/timeanddate.c,v +retrieving revision 1.39 +retrieving revision 1.40 +diff -u -r1.39 -r1.40 +--- timeanddate.c 6 Nov 2004 08:22:52 -0000 1.39 ++++ timeanddate.c 24 Nov 2004 15:43:10 -0000 1.40 +@@ -528,6 +528,7 @@ + gtk_misc_set_alignment (GTK_MISC (self.catlabel1), 0.0, 0.9); + + self.cal = gtk_date_combo_new (); ++ gtk_entry_set_activates_default(GTK_ENTRY(GTK_DATE_COMBO(self.cal)->entry), TRUE); + gtk_calendar_select_month (GTK_CALENDAR (GTK_DATE_COMBO(self.cal)->cal), ts.tm_mon, ts.tm_year); + gtk_calendar_select_day (GTK_CALENDAR (GTK_DATE_COMBO(self.cal)->cal), ts.tm_mday); + gtk_table_attach (GTK_TABLE (table), self.cal, 0, 3, 1, 2, +@@ -549,6 +550,8 @@ + gpe_time_sel_set_time(GPE_TIME_SEL(self.tsel),(guint)ts.tm_hour, (guint)ts.tm_min); + gtk_table_attach (GTK_TABLE (table), self.tsel, 0, 3, 3, 4, + GTK_FILL,0,3,0); ++ gtk_entry_set_activates_default(GTK_ENTRY(GPE_TIME_SEL(self.tsel)->hour_spin), TRUE); ++ gtk_entry_set_activates_default(GTK_ENTRY(GPE_TIME_SEL(self.tsel)->minute_spin), TRUE); + /* -------------------------------------------------------------------------- */ + + self.catlabel3 = gtk_label_new (NULL); +@@ -569,7 +572,7 @@ + gtk_combo_set_popdown_strings (GTK_COMBO (self.ntpserver), ntpsrv); + gtk_table_attach (GTK_TABLE (table), self.ntpserver, 0, 3, 5, 6, + GTK_FILL,0,3,0); +- ++ + gtk_tooltips_set_tip (tooltips, self.ntpserver, _("Select the timeserver to use to set the clock."), NULL); + + self.internet = gtk_button_new_with_label(_("Get time from network")); +Index: users/callbacks.c +=================================================================== +RCS file: /cvs/gpe/base/gpe-conf/users/callbacks.c,v +retrieving revision 1.17 +retrieving revision 1.18 +diff -u -r1.17 -r1.18 +--- users/callbacks.c 17 Nov 2004 18:26:00 -0000 1.17 ++++ users/callbacks.c 24 Nov 2004 15:43:10 -0000 1.18 +@@ -93,6 +93,22 @@ + pwlist *cur = pwroot; + pwlist **prec = &pwroot; + uint i=GPOINTER_TO_UINT(tmp->data); ++ uint usercount = 0; ++ ++ while (cur) ++ { ++ if ((cur->pw.pw_uid >= MINUSERUID) && (cur->pw.pw_uid < MAXUSERID)) ++ usercount++; ++ cur = cur->next; ++ } ++ ++ if (usercount < 2) ++ { ++ gpe_error_box(_("You need at least one user account!")); ++ return; ++ } ++ cur = pwroot; ++ + while(IsHidden(cur)) + { + prec = &cur->next; +@@ -109,6 +125,13 @@ + } + i--; + } ++ ++ if (!strcmp(cur->pw.pw_name, "lx")) ++ { ++ gpe_error_box(_("You can't remove this user!")); ++ return; ++ } ++ + if(cur->pw.pw_uid < MINUSERUID) + gpe_error_box(_("You can't remove\n system users!")); + else +@@ -122,7 +145,6 @@ + } + } + ReloadList(); +- + } + + +Index: users/interface.h +=================================================================== +RCS file: /cvs/gpe/base/gpe-conf/users/interface.h,v +retrieving revision 1.8 +retrieving revision 1.9 +diff -u -r1.8 -r1.9 +--- users/interface.h 14 Jun 2004 10:15:16 -0000 1.8 ++++ users/interface.h 24 Nov 2004 15:43:10 -0000 1.9 +@@ -6,6 +6,8 @@ + #else + #define MINUSERUID 100 + #endif ++#define MAXUSERID 65500 ++ + typedef struct pwlist_s + { + struct passwd pw; diff --git a/packages/gpe-conf/gpe-conf-0.1.22/ignore_invalid_battery_values.patch b/packages/gpe-conf/gpe-conf-0.1.22/ignore_invalid_battery_values.patch index e69de29bb2..53b257c7e5 100644 --- a/packages/gpe-conf/gpe-conf-0.1.22/ignore_invalid_battery_values.patch +++ b/packages/gpe-conf/gpe-conf-0.1.22/ignore_invalid_battery_values.patch @@ -0,0 +1,16 @@ +Index: gpe-conf-0.1.22/battery.c +=================================================================== +--- gpe-conf-0.1.22.orig/battery.c 2005-02-17 13:13:00.000000000 +0000 ++++ gpe-conf-0.1.22/battery.c 2005-02-17 13:39:43.000000000 +0000 +@@ -335,7 +335,10 @@ + break; + } + } +- ++ ++ if (percent > 100) percent=100; ++ if (percent < 0 ) percent=0; ++ + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (batt_int.bar), + (float)percent/100.0); + toolbar_set_style (batt_int.bar, barstate); diff --git a/packages/gpe-conf/gpe-conf-0.1.22/serial_tts.patch b/packages/gpe-conf/gpe-conf-0.1.22/serial_tts.patch index e69de29bb2..bebdc15102 100644 --- a/packages/gpe-conf/gpe-conf-0.1.22/serial_tts.patch +++ b/packages/gpe-conf/gpe-conf-0.1.22/serial_tts.patch @@ -0,0 +1,11 @@ +--- gpe-conf/serial.c 2004-12-30 16:11:11.000000000 -0500 ++++ gpe-conf/serial.c.new 2004-12-30 16:10:50.000000000 -0500 +@@ -44,7 +44,7 @@ + #define GPSD_CONFIG "/etc/gpsd.conf" + + #ifdef MACH_IPAQPXA +- #define FIRST_SERIAL "/dev/ttyS0" ++ #define FIRST_SERIAL "/dev/tts/0" + #else + #ifdef MACH_IPAQ + #define FIRST_SERIAL "/dev/ttyC0" -- cgit 1.2.3-korg