You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(23) |
Nov
(20) |
Dec
(32) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(43) |
Feb
(31) |
Mar
(99) |
Apr
(57) |
May
(82) |
Jun
(73) |
Jul
(123) |
Aug
(634) |
Sep
(588) |
Oct
(264) |
Nov
(217) |
Dec
(179) |
| 2005 |
Jan
(262) |
Feb
(273) |
Mar
(164) |
Apr
(88) |
May
(23) |
Jun
(10) |
Jul
(8) |
Aug
(19) |
Sep
(112) |
Oct
(57) |
Nov
(71) |
Dec
(6) |
| 2006 |
Jan
(14) |
Feb
(48) |
Mar
(56) |
Apr
(21) |
May
(77) |
Jun
(46) |
Jul
(47) |
Aug
(27) |
Sep
(18) |
Oct
(16) |
Nov
(4) |
Dec
(18) |
| 2007 |
Jan
(2) |
Feb
(6) |
Mar
(2) |
Apr
(27) |
May
(13) |
Jun
(27) |
Jul
(20) |
Aug
(3) |
Sep
(3) |
Oct
(23) |
Nov
(21) |
Dec
(6) |
| 2008 |
Jan
(7) |
Feb
(3) |
Mar
(4) |
Apr
(8) |
May
(3) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(11) |
Feb
(1) |
Mar
(8) |
Apr
|
May
|
Jun
(4) |
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|
From: <ale...@us...> - 2003-10-26 20:48:09
|
Update of /cvsroot/morphix/datetimeconf/src
In directory sc8-pr-cvs1:/tmp/cvs-serv3350/src
Modified Files:
callbacks.c callbacks.h interface.c main.c main.h
Log Message:
fixed that timezone selected in list wasn't saved
Index: callbacks.c
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/callbacks.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** callbacks.c 26 Oct 2003 00:00:15 -0000 1.2
--- callbacks.c 26 Oct 2003 20:48:00 -0000 1.3
***************
*** 244,245 ****
--- 244,265 ----
}
+
+ gboolean
+ on_treeview1_select_cursor_row (GtkTreeView *treeview,
+ gboolean start_editing,
+ gpointer user_data)
+ {
+ return FALSE;
+ }
+
+
+ void
+ on_treeview1_row_activated (GtkTreeView *treeview,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ gpointer user_data)
+ {
+ debug("Selected row!\n");
+
+ }
+
Index: callbacks.h
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/callbacks.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** callbacks.h 26 Oct 2003 00:00:15 -0000 1.2
--- callbacks.h 26 Oct 2003 20:48:00 -0000 1.3
***************
*** 74,75 ****
--- 74,86 ----
on_checkbutton2_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
+
+ gboolean
+ on_treeview1_select_cursor_row (GtkTreeView *treeview,
+ gboolean start_editing,
+ gpointer user_data);
+
+ void
+ on_treeview1_row_activated (GtkTreeView *treeview,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ gpointer user_data);
Index: interface.c
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/interface.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** interface.c 26 Oct 2003 00:00:15 -0000 1.2
--- interface.c 26 Oct 2003 20:48:00 -0000 1.3
***************
*** 344,347 ****
--- 344,350 ----
G_CALLBACK (on_drawingarea1_expose_event),
NULL);
+ g_signal_connect ((gpointer) treeview1, "row_activated",
+ G_CALLBACK (on_treeview1_row_activated),
+ NULL);
g_signal_connect ((gpointer) checkbutton2, "toggled",
G_CALLBACK (on_checkbutton2_toggled),
Index: main.c
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/main.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** main.c 26 Oct 2003 00:00:15 -0000 1.2
--- main.c 26 Oct 2003 20:48:00 -0000 1.3
***************
*** 23,26 ****
--- 23,41 ----
extern tz_struct *selected_timezone;
+ GtkTreeSelection *select;
+
+ void tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data) {
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ gchar *tz;
+
+ if (gtk_tree_selection_get_selected(selection,&model,&iter)) {
+ gtk_tree_model_get(model,&iter, TIMEZONE_COL, &tz, -1);
+
+ selected_timezone = find_timezone_entry(tz);
+ //g_free(tz);
+ }
+ }
+
void set_time(struct tm dt) {
GtkWidget *curr_time = lookup_widget(MainWindow,"label7");
***************
*** 66,69 ****
--- 81,86 ----
set_readin_tz();
}
+ setup_timezone_list_cb();
+
debug("Set up ntp\n");
realised = TRUE;
***************
*** 154,157 ****
--- 171,184 ----
+ void setup_timezone_list_cb() {
+ GtkWidget *treeview = lookup_widget(MainWindow,"treeview1");
+
+ select = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
+ gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE);
+ g_signal_connect(G_OBJECT(select),"changed",
+ G_CALLBACK(tree_selection_changed_cb),
+ NULL);
+ }
+
void setup_timezone_list() {
GtkWidget *treeview = lookup_widget(MainWindow,"treeview1");
***************
*** 163,166 ****
--- 190,196 ----
G_TYPE_STRING);// comment
int i;
+
+
+
for (i = 0; i < timezones_count; i++) {
GtkTreeIter iter;
Index: main.h
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/main.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** main.h 25 Oct 2003 19:40:34 -0000 1.1.1.1
--- main.h 26 Oct 2003 20:48:00 -0000 1.2
***************
*** 44,47 ****
void set_current_tz(tz_struct *tz);
gboolean set_tz_from_string(gchar *string);
!
#endif
--- 44,47 ----
void set_current_tz(tz_struct *tz);
gboolean set_tz_from_string(gchar *string);
! void setup_timezone_list_cb();
#endif
|
|
From: <ale...@us...> - 2003-10-26 16:03:08
|
Update of /cvsroot/morphix/datetimeconf/src
In directory sc8-pr-cvs1:/tmp/cvs-serv20636/src
Modified Files:
libdatetime.c
Log Message:
adding some extra files for autogen.sh, more random fixes
Index: libdatetime.c
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/libdatetime.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** libdatetime.c 26 Oct 2003 00:00:15 -0000 1.2
--- libdatetime.c 26 Oct 2003 16:02:28 -0000 1.3
***************
*** 146,150 ****
}
- /* generate a modules script */
zone_array = g_strsplit(zones,"\n",0);
if (zone_array == NULL || zones == NULL) {
--- 146,149 ----
|
|
From: <ale...@us...> - 2003-10-26 16:02:32
|
Update of /cvsroot/morphix/datetimeconf/autom4te.cache
In directory sc8-pr-cvs1:/tmp/cvs-serv20636/autom4te.cache
Modified Files:
requests
Log Message:
adding some extra files for autogen.sh, more random fixes
Index: requests
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/autom4te.cache/requests,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** requests 25 Oct 2003 19:40:44 -0000 1.1.1.1
--- requests 26 Oct 2003 16:02:27 -0000 1.2
***************
*** 16,109 ****
],
{
! 'AC_PROG_CXX' => 1,
! 'AC_FUNC_CLOSEDIR_VOID' => 1,
! 'AC_REPLACE_FNMATCH' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_C_VOLATILE' => 1,
- 'AC_CHECK_MEMBERS' => 1,
- 'AC_CHECK_FUNCS' => 1,
- 'AC_PROG_INSTALL' => 1,
'AC_FUNC_MKTIME' => 1,
! 'AC_CHECK_LIB' => 1,
! 'AC_HEADER_TIME' => 1,
! 'AC_SUBST' => 1,
! 'AC_TYPE_MODE_T' => 1,
! 'AC_PROG_LN_S' => 1,
! 'AH_OUTPUT' => 1,
! 'AC_FUNC_WAIT3' => 1,
'AC_STRUCT_TM' => 1,
! 'AC_HEADER_SYS_WAIT' => 1,
! 'AM_INIT_AUTOMAKE' => 1,
! 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'AC_TYPE_OFF_T' => 1,
! 'AC_HEADER_MAJOR' => 1,
! 'AC_FUNC_STAT' => 1,
! 'AC_TYPE_SIGNAL' => 1,
'AM_GNU_GETTEXT' => 1,
'include' => 1,
! 'AC_FUNC_MBRTOWC' => 1,
! 'AC_INIT' => 1,
! 'AC_FUNC_VPRINTF' => 1,
! 'AC_FUNC_SELECT_ARGTYPES' => 1,
! 'AC_HEADER_STDC' => 1,
! 'AC_PROG_LIBTOOL' => 1,
! 'AC_FUNC_LSTAT' => 1,
'AC_FUNC_ALLOCA' => 1,
! 'AC_FUNC_GETLOADAVG' => 1,
! 'AC_STRUCT_ST_BLOCKS' => 1,
! 'AC_FUNC_GETMNTENT' => 1,
'm4_include' => 1,
! 'AC_FUNC_MEMCMP' => 1,
'AC_CONFIG_HEADERS' => 1,
! 'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_CHECK_HEADERS' => 1,
! 'AC_FUNC_UTIME_NULL' => 1,
! 'AC_PROG_CPP' => 1,
! 'AC_CONFIG_AUX_DIR' => 1,
! 'AC_FUNC_STRERROR_R' => 1,
! 'AC_PROG_AWK' => 1,
! 'AC_C_CONST' => 1,
! 'AC_CANONICAL_SYSTEM' => 1,
! 'AC_FUNC_FORK' => 1,
! 'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_PROG_YACC' => 1,
! 'AC_FUNC_CHOWN' => 1,
! 'm4_pattern_forbid' => 1,
! 'AC_FUNC_OBSTACK' => 1,
! 'AC_FUNC_MALLOC' => 1,
! 'AC_FUNC_STRCOLL' => 1,
! 'AC_FUNC_MMAP' => 1,
! 'AC_CHECK_TYPES' => 1,
'AC_CANONICAL_HOST' => 1,
! 'AC_FUNC_GETGROUPS' => 1,
! 'AC_FUNC_GETPGRP' => 1,
! 'm4_pattern_allow' => 1,
! 'AC_PROG_CC' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
! 'AC_FUNC_ERROR_AT_LINE' => 1,
! 'AM_CONDITIONAL' => 1,
! 'AC_FUNC_STRFTIME' => 1,
! 'AC_FUNC_SETPGRP' => 1,
! 'AC_TYPE_UID_T' => 1,
! 'AC_TYPE_SIZE_T' => 1,
! 'AC_FUNC_FSEEKO' => 1,
! 'AC_FUNC_STRNLEN' => 1,
! 'AC_PROG_LEX' => 1,
! 'AC_FUNC_REALLOC' => 1,
! 'AC_PROG_RANLIB' => 1,
! 'AC_TYPE_PID_T' => 1,
! 'AC_HEADER_STAT' => 1,
! 'AC_PATH_X' => 1,
! 'AM_PROG_CC_C_O' => 1,
! 'AC_C_INLINE' => 1,
! 'AC_LIBSOURCE' => 1,
! 'AC_PROG_MAKE_SET' => 1,
! 'AM_AUTOMAKE_VERSION' => 1,
! 'AC_CONFIG_FILES' => 1,
! 'AC_CONFIG_SUBDIRS' => 1,
! 'AC_FUNC_STRTOD' => 1,
! 'AC_HEADER_DIRENT' => 1,
! 'AM_MAINTAINER_MODE' => 1
}
], 'Request' )
--- 16,109 ----
],
{
! 'AC_FUNC_MALLOC' => 1,
! 'AC_FUNC_STAT' => 1,
! 'AC_FUNC_WAIT3' => 1,
! 'AC_FUNC_GETPGRP' => 1,
! 'AC_INIT' => 1,
! 'AC_HEADER_SYS_WAIT' => 1,
! 'AC_HEADER_MAJOR' => 1,
! 'AC_TYPE_SIGNAL' => 1,
! 'AC_CANONICAL_SYSTEM' => 1,
! 'AC_FUNC_FORK' => 1,
! 'AC_PATH_X' => 1,
! 'AC_PROG_CPP' => 1,
! 'AC_FUNC_STRTOD' => 1,
! 'm4_pattern_forbid' => 1,
! 'AC_PROG_MAKE_SET' => 1,
! 'AC_TYPE_MODE_T' => 1,
'AC_STRUCT_TIMEZONE' => 1,
+ 'AC_PROG_CC' => 1,
+ 'AC_FUNC_VPRINTF' => 1,
+ 'AC_C_INLINE' => 1,
+ 'AC_STRUCT_ST_BLOCKS' => 1,
+ 'AC_FUNC_STRCOLL' => 1,
+ 'AC_FUNC_MEMCMP' => 1,
+ 'AC_FUNC_SETPGRP' => 1,
+ 'AC_FUNC_SELECT_ARGTYPES' => 1,
+ 'AC_FUNC_CHOWN' => 1,
+ 'AC_TYPE_SIZE_T' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
'AC_C_VOLATILE' => 1,
'AC_FUNC_MKTIME' => 1,
! 'm4_pattern_allow' => 1,
! 'AM_MAINTAINER_MODE' => 1,
! 'AC_FUNC_STRNLEN' => 1,
'AC_STRUCT_TM' => 1,
! 'AC_PROG_CXX' => 1,
! 'AC_C_CONST' => 1,
'AC_TYPE_OFF_T' => 1,
! 'AC_PROG_INSTALL' => 1,
! 'AC_CONFIG_FILES' => 1,
! 'AC_FUNC_REALLOC' => 1,
'AM_GNU_GETTEXT' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'AC_FUNC_GETGROUPS' => 1,
+ 'AC_FUNC_CLOSEDIR_VOID' => 1,
+ 'AC_HEADER_DIRENT' => 1,
+ 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+ 'AC_PROG_LN_S' => 1,
+ 'AC_SUBST' => 1,
+ 'AC_LIBSOURCE' => 1,
+ 'AC_FUNC_UTIME_NULL' => 1,
+ 'AH_OUTPUT' => 1,
+ 'AC_FUNC_ERROR_AT_LINE' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
+ 'AC_FUNC_STRFTIME' => 1,
'include' => 1,
! 'AM_PROG_CC_C_O' => 1,
! 'AC_FUNC_OBSTACK' => 1,
! 'AM_CONDITIONAL' => 1,
'AC_FUNC_ALLOCA' => 1,
! 'AC_PROG_LIBTOOL' => 1,
! 'AC_PROG_RANLIB' => 1,
! 'AC_FUNC_MBRTOWC' => 1,
'm4_include' => 1,
! 'AC_PROG_LEX' => 1,
! 'AC_DEFINE_TRACE_LITERAL' => 1,
! 'AC_FUNC_GETLOADAVG' => 1,
! 'AC_REPLACE_FNMATCH' => 1,
! 'AC_HEADER_TIME' => 1,
'AC_CONFIG_HEADERS' => 1,
! 'AC_TYPE_UID_T' => 1,
! 'AC_CHECK_FUNCS' => 1,
'AC_CHECK_HEADERS' => 1,
! 'AC_FUNC_FSEEKO' => 1,
'AC_PROG_YACC' => 1,
! 'AC_HEADER_STDC' => 1,
! 'AC_PROG_AWK' => 1,
'AC_CANONICAL_HOST' => 1,
! 'AC_TYPE_PID_T' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
+ 'AC_FUNC_MMAP' => 1,
+ 'AC_FUNC_LSTAT' => 1,
+ 'AC_CHECK_TYPES' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
! 'AC_FUNC_GETMNTENT' => 1,
! 'AC_CHECK_LIB' => 1,
! 'AC_CHECK_MEMBERS' => 1,
! 'AM_INIT_AUTOMAKE' => 1,
! 'AC_PROG_GCC_TRADITIONAL' => 1,
! 'AC_FUNC_STRERROR_R' => 1,
! 'AC_HEADER_STAT' => 1
}
], 'Request' )
|
|
From: <ale...@us...> - 2003-10-26 16:02:31
|
Update of /cvsroot/morphix/datetimeconf In directory sc8-pr-cvs1:/tmp/cvs-serv20636 Modified Files: datetimeconf.glade Added Files: config.h.in stamp-h.in Log Message: adding some extra files for autogen.sh, more random fixes --- NEW FILE: config.h.in --- /* config.h.in. Generated from configure.in by autoheader. */ #undef ENABLE_NLS #undef HAVE_CATGETS #undef HAVE_GETTEXT #undef GETTEXT_PACKAGE #undef HAVE_LC_MESSAGES #undef HAVE_STPCPY #undef HAVE_LIBSM /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* Define if your <locale.h> file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the <locale.h> header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION --- NEW FILE: stamp-h.in --- Index: datetimeconf.glade =================================================================== RCS file: /cvsroot/morphix/datetimeconf/datetimeconf.glade,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** datetimeconf.glade 25 Oct 2003 19:40:32 -0000 1.1.1.1 --- datetimeconf.glade 26 Oct 2003 16:02:27 -0000 1.2 *************** *** 667,671 **** <widget class="GtkCheckButton" id="checkbutton2"> <property name="visible">True</property> - <property name="sensitive">False</property> <property name="can_focus">True</property> <property name="label" translatable="yes">_System clock uses UTC</property> --- 667,670 ---- *************** *** 675,678 **** --- 674,678 ---- <property name="inconsistent">False</property> <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_checkbutton2_toggled" last_modification_time="Sat, 25 Oct 2003 23:29:20 GMT"/> </widget> <packing> |
Update of /cvsroot/morphix/datetimeconf/src
In directory sc8-pr-cvs1:/tmp/cvs-serv18289
Modified Files:
callbacks.c callbacks.h interface.c libdatetime.c
libdatetime.h main.c
Log Message:
added UTC handling
Index: callbacks.c
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/callbacks.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** callbacks.c 25 Oct 2003 19:40:34 -0000 1.1.1.1
--- callbacks.c 26 Oct 2003 00:00:15 -0000 1.2
***************
*** 15,18 ****
--- 15,19 ----
gboolean time_changed;
gboolean ntp_changed;
+ gboolean utc_changed;
tz_struct *nearest_timezone;
tz_struct *selected_timezone;
***************
*** 39,42 ****
--- 40,44 ----
{
GtkWidget *ntpcheck = lookup_widget(MainWindow,"checkbutton1");
+ GtkWidget *utccheck = lookup_widget(MainWindow,"checkbutton2");
GtkWidget *combo = lookup_widget(MainWindow,"combo1");
***************
*** 44,50 ****
if (time_changed == TRUE) {
write_date_time(&dt);
! }
if (ntp_changed == TRUE) {
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ntpcheck))) {
--- 46,58 ----
if (time_changed == TRUE) {
+ debug("Time has changed, setting and syncing hardware clock\n");
write_date_time(&dt);
! sync_hardware_clock(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(utccheck)));
+ }
+ if (utc_changed == TRUE) {
+ debug("UTC has been changed, writing to bootscript defaults\n"); sync_hardware_clock(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(utccheck)));
+ set_system_utc(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(utccheck)));
+ }
if (ntp_changed == TRUE) {
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ntpcheck))) {
***************
*** 158,161 ****
--- 166,176 ----
}
+ void set_utc_changed() {
+ if (realised == TRUE) {
+ debug("UTC has been changed\n");
+ utc_changed = TRUE;
+ }
+ }
+
void
on_calendar1_day_selected (GtkCalendar *calendar,
***************
*** 219,222 ****
--- 234,245 ----
{
set_time_changed();
+ }
+
+
+ void
+ on_checkbutton2_toggled (GtkToggleButton *togglebutton,
+ gpointer user_data)
+ {
+ set_utc_changed();
}
Index: callbacks.h
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/callbacks.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** callbacks.h 25 Oct 2003 19:40:34 -0000 1.1.1.1
--- callbacks.h 26 Oct 2003 00:00:15 -0000 1.2
***************
*** 70,71 ****
--- 70,75 ----
on_spinbutton3_changed (GtkEditable *editable,
gpointer user_data);
+
+ void
+ on_checkbutton2_toggled (GtkToggleButton *togglebutton,
+ gpointer user_data);
Index: interface.c
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/interface.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** interface.c 25 Oct 2003 19:40:32 -0000 1.1.1.1
--- interface.c 26 Oct 2003 00:00:15 -0000 1.2
***************
*** 283,287 ****
gtk_widget_show (checkbutton2);
gtk_box_pack_start (GTK_BOX (vbox3), checkbutton2, FALSE, FALSE, 0);
- gtk_widget_set_sensitive (checkbutton2, FALSE);
label2 = gtk_label_new (_("Timezone"));
--- 283,286 ----
***************
*** 344,347 ****
--- 343,349 ----
g_signal_connect ((gpointer) drawingarea1, "expose_event",
G_CALLBACK (on_drawingarea1_expose_event),
+ NULL);
+ g_signal_connect ((gpointer) checkbutton2, "toggled",
+ G_CALLBACK (on_checkbutton2_toggled),
NULL);
g_signal_connect ((gpointer) helpbutton1, "clicked",
Index: libdatetime.c
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/libdatetime.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** libdatetime.c 25 Oct 2003 19:40:34 -0000 1.1.1.1
--- libdatetime.c 26 Oct 2003 00:00:15 -0000 1.2
***************
*** 143,147 ****
if (!g_file_get_contents(ZONETAB,&zones,&zones_len,NULL)) {
! /* error */
}
--- 143,147 ----
if (!g_file_get_contents(ZONETAB,&zones,&zones_len,NULL)) {
! return FALSE;
}
***************
*** 196,200 ****
}
g_strfreev(zone_array);
! // free(zones);
return TRUE;
}
--- 196,200 ----
}
g_strfreev(zone_array);
! // free(zones); /* think something of zones isn't copied, segfaults when uncommented, need to run splint on this... */
return TRUE;
}
***************
*** 237,246 ****
*/
! gboolean sync_hardware_clock() {
gchar cmdline[256];
! sprintf(cmdline,"/sbin/hwclock --systohc");
exec_command(cmdline);
}
void restart_ntp_client() {
--- 237,326 ----
*/
! gboolean sync_hardware_clock(gboolean utc) {
gchar cmdline[256];
! debug("Sycing hardware clock, utc: %d\n",utc);
! if (utc == TRUE) {
! sprintf(cmdline,"/sbin/hwclock --systohc --utc");
! }
! else {
! sprintf(cmdline,"/sbin/hwclock --systohc");
! }
exec_command(cmdline);
+
+ return TRUE;
+ }
+
+ gboolean check_system_utc() {
+ gchar **utc_array = NULL;
+ gchar *utc_string = NULL;
+ gint utc_len, i;
+ gboolean utc = FALSE;
+
+ if (!g_file_get_contents(BOOT_SCRIPT_DEFAULTS,&utc_string,&utc_len,NULL)) {
+ return FALSE;
+ }
+
+ /* generate a modules script */
+ utc_array = g_strsplit(utc_string,"\n",0);
+ if (utc_array == NULL || utc_string == NULL) {
+ debug("Error: unable to read default bootscript info\n");
+ return FALSE;
+ }
+ for (i = 0; utc_array[i] != NULL; i++) {
+ if (strcmp(utc_array[i],"UTC=no") == 0) {
+ utc = FALSE;
+ break;
+ }
+ if (strcmp(utc_array[i],"UTC=yes") == 0) {
+ utc = TRUE;
+ break;
+ }
+ }
+ g_strfreev(utc_array);
+ free(utc_string);
+
+ debug("parsed bootscript defaults, utc: %d\n",utc);
+
+ return utc;
}
+ gboolean set_system_utc(gboolean utc) {
+ gchar **utc_array = NULL;
+ gchar *utc_string = NULL;
+ gint utc_len, i;
+
+ FILE *fp = NULL;
+ if (!g_file_get_contents(BOOT_SCRIPT_DEFAULTS,&utc_string,&utc_len,NULL)) {
+ return FALSE;
+ }
+
+ /* generate a modules script */
+ utc_array = g_strsplit(utc_string,"\n",0);
+ if (utc_array == NULL || utc_string == NULL) {
+ debug("Error: unable to read default bootscript info\n");
+ return FALSE;
+ }
+ fp = fopen(BOOT_SCRIPT_DEFAULTS,"w");
+ for (i = 0; utc_array[i] != NULL; i++) {
+ if (strncmp(utc_array[i],"UTC=",4) == 0) {
+ if (utc == TRUE) {
+ debug("Setting UTC to yes\n");
+ fprintf(fp,"UTC=yes\n");
+ }
+ else {
+ debug("Setting UTC to no\n");
+ fprintf(fp,"UTC=no\n");
+ }
+ }
+ else {
+ fprintf(fp,"%s\n",utc_array[i]);
+ }
+ }
+ fclose(fp);
+ g_strfreev(utc_array);
+ free(utc_string);
+ return TRUE;
+ }
+
void restart_ntp_client() {
Index: libdatetime.h
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/libdatetime.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** libdatetime.h 25 Oct 2003 19:40:34 -0000 1.1.1.1
--- libdatetime.h 26 Oct 2003 00:00:15 -0000 1.2
***************
*** 7,10 ****
--- 7,11 ----
#define NTPCONF "/etc/ntp.conf"
#define TIMEZONE_FILE "/etc/timezone"
+ #define BOOT_SCRIPT_DEFAULTS "/etc/default/rcS"
#define DEBUG
***************
*** 38,42 ****
gboolean write_date_time(struct tm *dm);
struct tm* get_current_date_time();
! gboolean sync_hardware_clock();
void restart_ntp_client();
gboolean read_current_timezone();
--- 39,44 ----
gboolean write_date_time(struct tm *dm);
struct tm* get_current_date_time();
! gboolean sync_hardware_clock(gboolean utc);
! gboolean set_system_utc(gboolean utc);
void restart_ntp_client();
gboolean read_current_timezone();
Index: main.c
===================================================================
RCS file: /cvsroot/morphix/datetimeconf/src/main.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** main.c 25 Oct 2003 19:40:34 -0000 1.1.1.1
--- main.c 26 Oct 2003 00:00:15 -0000 1.2
***************
*** 19,22 ****
--- 19,23 ----
extern gboolean ntp_changed;
extern gboolean time_changed;
+ extern gboolean utc_changed;
extern tz_struct *nearest_timezone;
extern tz_struct *selected_timezone;
***************
*** 45,51 ****
--- 46,55 ----
time_changed = FALSE;
ntp_changed = FALSE;
+ utc_changed = FALSE;
}
void setup_dtconf() {
+ GtkWidget *utccheckbutton = lookup_widget(MainWindow,"checkbutton2");
+
if (!read_zone_info()) {
debug("Error: Can't read zone info, exitting\n");
***************
*** 53,57 ****
}
struct tm *dt = get_current_date_time();
! set_date_time(*dt);
debug("Set date/time\n");
do_ntp_server();
--- 57,62 ----
}
struct tm *dt = get_current_date_time();
! set_date_time(*dt);
! gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(utccheckbutton),check_system_utc());
debug("Set date/time\n");
do_ntp_server();
|
|
From: <eli...@us...> - 2003-10-20 18:25:06
|
Update of /cvsroot/morphix/partitionmorpher
In directory sc8-pr-cvs1:/tmp/cvs-serv20183
Modified Files:
TODO
Log Message:
Removed completed items; added notes for some basic testing done so far
Index: TODO
===================================================================
RCS file: /cvsroot/morphix/partitionmorpher/TODO,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TODO 19 Oct 2003 00:18:57 -0000 1.5
--- TODO 20 Oct 2003 17:23:08 -0000 1.6
***************
*** 9,12 ****
--- 9,32 ----
- Test Create / Deleting
+ Notes from Elijah's testing of these:
+ I only tested on one 1913 MB partition (since that's my
+ current freespace partition) as a Primary partition.
+ Succeesful: ext2, swap, and fat32 creation & all deletions.
+ Fail: ext3, reiserfs, xfs, ntfs, and fat16 creation.
+ Untested: the rest :)
+ The only surprises are:
+ (1) That Parted's error message is misleading in the
+ cases of reiserfs (note: I don't have libreiserfs
+ installed), xfs, and ntfs. It reports, "Unable to
+ satisfy all constraints on the partition", when
+ the real error is that Parted doesn't support the
+ operation.
+ (2) That FAT16 simply fails instead of offering a
+ workaround. QTParted is successful in trying to
+ create a FAT16 partition here, but it does so by
+ creating a 1 GB partition and leaving 913 MB of
+ freespace (however, it also suffers from the
+ problem of not asking me if such a poor
+ approximation is okay).
- Add commit-changes-at-end
***************
*** 40,48 ****
Do all of these apply for primary, extended, and logical partitions?
There's probably still some debugging info that doesn't need to be shown
! If stdout is redirected at the command line, the progress dialog
! doesn't work (apparently Parted required stdout to not be
! redirected). We should be able to work around this by
! redirecting stdout to stderr. Note that everything still works
! (error dialog, progress dialog, etc.) if stderr is redirected.
Errors printed by Parted when setting up Partition table aren't
shown to user, except in a terminal; either show them to the
--- 60,69 ----
Do all of these apply for primary, extended, and logical partitions?
There's probably still some debugging info that doesn't need to be shown
! stdout & stderr are no longer separate. Parted apparently
! requires stdout to not be redirected at the command line--if it
! is, it won't be able to call the timer_handler with the
! remaining time left. Therefore, I redirect stdout to stderr in
! main to avoid this issue altogether. (Note that Parted works
! fine if stderr is redirected at the command line)
Errors printed by Parted when setting up Partition table aren't
shown to user, except in a terminal; either show them to the
***************
*** 51,71 ****
don't queue commands. This should be removed until that is
added (and at that time, we need an apply button as well.
- The cursor for the main window is not the busy cursor when it is
- for sub-menus. This is probably a bug, but I'm not sure if this
- is expected behavior or not. If it is a bug, it's probably a
- simple change to callbacks.c:show_busy_cursor.
- The sub-windows don't disable the main window. This means that
- the user can highlight /dev/hda2 and click on delete, leave the
- DeletePartition window open, and then higlight some freespace
- and click on create to also have the CreatePartition window
- showing at the same time. I don't know if this should be
- allowed--but if it is, then more than one CreatePartition window
- should be allowed (currently, if a user does the same basic
- thing to try to get to CreatePartition windows, then the first
- window will merely change so that it is relevant for the second
- partition and only one window will be open). Update: This is
- BAD. I can have a Delete, Move, Convert, and Resize window all
- open on /dev/hda2. That's just asking for problems...
-
--- 72,75 ----
***************
*** 92,98 ****
(why is that reported for the swap partition (and only for it)?)
! Find out why FAT16 and NTFS file creation aren't working
!
! Reasons why FAT16 and NTFS file creation weren't working
NTFS -- apparently, "can't satisfy constraints" means "I don't
know how to make an NTFS filesystem. Pretty stupid and
--- 96,100 ----
(why is that reported for the swap partition (and only for it)?)
! Find out why FAT16 and NTFS file creation aren't working. DONE:
NTFS -- apparently, "can't satisfy constraints" means "I don't
know how to make an NTFS filesystem. Pretty stupid and
***************
*** 108,112 ****
Main screen
The graphical partition layout (i.e. the stuff just above the full
-
tables) needs word labels and actual colors or something--this
may simply be a problem of the GTK2-H2O theme I use. However,
--- 110,113 ----
***************
*** 114,122 ****
nicely with lots of info, but in clear and intuitive way)
Creating a partition
-
- Extended should not be an option if an extended partition already
- exists (I think) (done)
Most filesystem types & all flags should be hidden behind an advanced tab
- s/Partition Path/Current Partition Path/ or /Partition Path/d
The partition size widget needs a text field for manually entering
the size (sliders just don't cut it--see the
--- 115,119 ----
|
|
From: <eli...@us...> - 2003-10-20 17:35:51
|
Update of /cvsroot/morphix/partitionmorpher In directory sc8-pr-cvs1:/tmp/cvs-serv20260 Modified Files: ChangeLog Log Message: Add notes about Parted stdout workaround and updates to TODO Index: ChangeLog =================================================================== RCS file: /cvsroot/morphix/partitionmorpher/ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChangeLog 19 Oct 2003 00:18:57 -0000 1.4 --- ChangeLog 20 Oct 2003 17:23:34 -0000 1.5 *************** *** 1,2 **** --- 1,11 ---- + 2003-10-20 Elijah Newren <ne...@ma...> + * src/main.c: Workaround a Parted bug. Parted can't call the + timer_handler with the appropriate amount of time left if stdout + is redirected at the command line. So, we redirect stdout to + stderr in main.c to work around this. + + * TODO: Removed items that have been now taken care of and added + some notes about the testing I did. + 2003-10-12 Alex de Landgraaf <ale...@xs...> * src/*: Heaps of updates. No, I'm not going to list them all |
|
From: <eli...@us...> - 2003-10-20 17:32:18
|
Update of /cvsroot/morphix/partitionmorpher/src In directory sc8-pr-cvs1:/tmp/cvs-serv20074/src Modified Files: main.c Log Message: Workaround for Parted not working when stdout redirected at the command line Index: main.c =================================================================== RCS file: /cvsroot/morphix/partitionmorpher/src/main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** main.c 19 Oct 2003 00:18:57 -0000 1.4 --- main.c 20 Oct 2003 17:22:29 -0000 1.5 *************** *** 61,64 **** --- 61,71 ---- scan_devices(); + /* Parted has a bug where if stdout is redirected at the + command line to a file, then it can no longer call the + _timer_handler with the appropriate amount of time left. + Thus, we manually redirect stdout to stderr here */ + dup2(fileno(stderr), fileno(stdout)); + + MainWindow = create_MainWindow (); gtk_widget_show (MainWindow); |
|
From: <ale...@us...> - 2003-10-19 11:05:19
|
Update of /cvsroot/morphix/partitionmorpher In directory sc8-pr-cvs1:/tmp/cvs-serv6654 Modified Files: ChangeLog TODO partitionmorpher.glade translation Log Message: Merged with elijah-2-branch Index: ChangeLog =================================================================== RCS file: /cvsroot/morphix/partitionmorpher/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ChangeLog 12 Oct 2003 02:01:47 -0000 1.3 --- ChangeLog 19 Oct 2003 00:18:57 -0000 1.4 *************** *** 3,6 **** --- 3,156 ---- See 1st law of WAL + 2003-09-15 Elijah Newren <ne...@ma...> + + * partitionmorpher.glade: + * src/interface.c: Make CreateWindow, ResizeWindow, DeleteWindow, + ConvertWindow, and MoveWindow modal so that the user can't launch + multiple of these windows at a time (could cause nasty problems if + the user had a window open for resizing a partition and also + converting the same partition). This should also probably be done + for the ApplyWindow, RevertWindow, DialogWindow, and perhaps + TableWindow. + + * src/callbacks.c: Make the MainWindow also show the busy cursor + whenever sub-windows do (since one probably should not be able to + interact with the main window when the others are busy doing disk + operations...). + + 2003-09-14 Elijah Newren <ne...@ma...> + + * src/callbacks.c: + * src/main.c: Enable startup notification to work properly. + + Note that startup notification requires both a launcher and a + launchee, so in order to test this from the command line, one + needs to run the test-launcher program (which is part of the + desktop-notification tarball found on www.freedesktop.org) with + partitionmorpher as the program to launch. [Adding + partitionmorpher to the gnome-panel menu would be an alternate way + to test, but if one isn't logged in as root in a gnome session + (which is hopefully the case), then one would also have to do + whatever trickery is required to make partionmorpher be able to + run as root when launched] + + The changes made here may be unnecessary in the future; + startup-notification launchers are the ones required by the spec + to do most of the work and they are required to be pretty smart. + The only reason additional code is needed at all inside + PartitionMorpher at this time is that we start displaying the main + window a couple seconds before we are actually finished starting + up. + + 2003-09-13 Elijah Newren <ne...@ma...> + + * src/callbacks.c: + * src/pm_libparted.c: Added a busy cursor when performing + operations that take longer than a second. Currently only added + for Create & Delete windows. Make the app seem much more + responsive, though (in the Delete Window, the operation would + always take about two seconds, but the user wasn't given any + notification that the program was acting on their input) + + * TODO: Updated with some more bugs and stuff + + 2003-09-12 Elijah Newren <ne...@ma...> + + * TODO: Updated (I'm really starting to think I should break out + the known bugs into a separate file...) + + 2003-09-12 Elijah Newren <ne...@ma...> + + * src/pm_libparted.[ch]: + * src/callbacks.c: Only display debugging info if + PRINT_DEBUGGING_INFO is defined (currently located in + pm_libparted.h). The debugging info is still potentially useful, + but sometimes I don't want to see it. Also, adding this flag + means that it will be easier to clean out all these messages when + PartitionMorpher is ready to ship to everyone. I've probably + missed marking numerous debugging messages, but I'll add them as I + find them. + + 2003-09-12 Elijah Newren <ne...@ma...> + + * partitionmorpher.glade: + * translation: + * src/callbacks.[ch]: + * src/interface.c: Since extended partitions can't have a + filesystem, inactive the filesystem selector in the CreateWindow + whenever the Extended partition radiobutton is active. Also, + update the tooltips for the Extended and Logical partition types. + + * TODO: Updated, specifically with info about how + on_CreateTypeRadiobutton_clicked is called twice for every click. + (I don't understand why it does this, but it doesn't hurt + anything) + + 2003-09-12 Elijah Newren <ne...@ma...> + + * partitionmorpher.glade: + * src/interface.c: Closing certain windows with the X button + (located in the upper right corner of each window) was causing + PartitionMorpher to either segfault, hang, or not respond when + attempting to show the window again. I tested and fixed this for + these windows: + CreateWindow + ResizeWindow + HelpWindow + DeleteWindow + ConvertWindow + MoveWindow + ErrorWindow + ProgressWindow + The fix was to set the signal handler for the delete_event to + gtk_widget_hide (all but one case) or gtk_true (in the case of the + ProgressWindow, which should not be able to be hidden by the + user). Other windows (Apply/Revert/Dialog/Table) may still need + this fix. + + 2003-09-08 Elijah Newren <ne...@ma...> + + * TODO: Updated + + 2003-09-08 Elijah Newren <ne...@ma...> + + * partitionmorpher.glade: + * translation: + * src/callbacks.c: + * src/interface.[ch]: + * src/main.c + * src/pm_libparted.c: Add a progress bar to provide visual + feedback during long operations. Currently, this has only been + tested and worked in with creating partitions, but it shouldn't + require many changes for other operations. However, if we + implement NTFS creation/resize (and perhaps other operations) via + external tools, we will need to change the display from a + percentage progress bar to an indeterminate moving back and forth + bar. + + 2003-09-08 Elijah Newren <ne...@ma...> + + * src/pm_libparted.c : Small change to make MIN_FREESPACE = 1024 + k, not 1000 k. This is an issue because users are only allowed to + select partition sizes in terms of MBs (which, perhaps more + appropriately would be labelled MiBs). Thus, on one partition on + my laptop, which is 1913.99 MB (isn't it nice to have a + pathological laptop that provides nice corner cases?), I can only + choose to create a partition of size 1913 MB. The MIN_FREESPACE + corresponds to about .98 MB, and thus my partition was left with + an empty space at the end of almost 1 MB in size. This would mean + that although I thought I had used all the space on my disk, a + view of the sectors would show that I had left gaps. + + Note: This is not an issue for Parted or QTParted (both of which + use 1000 k for this parameter) because they both require/allow the + user to specify to higher precision the size of their partition. + We only allow integer sizes in the interface. + + 2003-09-08 Elijah Newren <ne...@ma...> + + * src/callbacks.c: + * src/pm_libparted.[ch]: Remove duplicate (unused) code + 2003-09-05 Elijah Newren <ne...@ma...> Index: TODO =================================================================== RCS file: /cvsroot/morphix/partitionmorpher/TODO,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TODO 12 Oct 2003 02:01:47 -0000 1.4 --- TODO 19 Oct 2003 00:18:57 -0000 1.5 *************** *** 19,23 **** Make a reasonable README, not that thing I threw together in 10 seconds. Add some stuff to NEWS ! Actually use the ChangeLog Lots of testing --- 19,72 ---- Make a reasonable README, not that thing I threw together in 10 seconds. Add some stuff to NEWS ! Should I add my notes-on-qtparted.txt to CVS? ! The Help window needs to have some real help. ! Make a list of known bugs, e.g.: ! The CreatePartition window has an invisible FsType GtkOpenMenu AND ! a visible FilesystemType GtkOptionMenu--why? Is the FsType ! supposed to be the newbie friendly version? [If so, does that ! mean that we can't dynamically change these menus and we really ! do need two?] ! Clicking on X in ProgressDialog window de-focuses window--should it? ! Apply/Revert/Dialog/Table Windows may need delete_event->gtk_widget_hide ! Every time a partition type radiobutton in the Create Partition ! window is clicked on, the on_CreateTypeRadiobutton_clicked ! callback is called twice. No harm done, but it really should ! only call it once. ! The Partition Flags may not work right: ! I don't even have any clue what an LBA parition is supposed to be ! Isn't there only supposed to be one partition marked as bootable? ! I'm not familiar with marking things as the root partition--and ! the tooltip itself says it should possibly be thrown out. ! Do all of these apply for primary, extended, and logical partitions? ! There's probably still some debugging info that doesn't need to be shown ! If stdout is redirected at the command line, the progress dialog ! doesn't work (apparently Parted required stdout to not be ! redirected). We should be able to work around this by ! redirecting stdout to stderr. Note that everything still works ! (error dialog, progress dialog, etc.) if stderr is redirected. ! Errors printed by Parted when setting up Partition table aren't ! shown to user, except in a terminal; either show them to the ! user, or remove them from the terminal as well. ! The revert button is non-functional (and always disabled) since we ! don't queue commands. This should be removed until that is ! added (and at that time, we need an apply button as well. ! The cursor for the main window is not the busy cursor when it is ! for sub-menus. This is probably a bug, but I'm not sure if this ! is expected behavior or not. If it is a bug, it's probably a ! simple change to callbacks.c:show_busy_cursor. ! The sub-windows don't disable the main window. This means that ! the user can highlight /dev/hda2 and click on delete, leave the ! DeletePartition window open, and then higlight some freespace ! and click on create to also have the CreatePartition window ! showing at the same time. I don't know if this should be ! allowed--but if it is, then more than one CreatePartition window ! should be allowed (currently, if a user does the same basic ! thing to try to get to CreatePartition windows, then the first ! window will merely change so that it is relevant for the second ! partition and only one window will be open). Update: This is ! BAD. I can have a Delete, Move, Convert, and Resize window all ! open on /dev/hda2. That's just asking for problems... ! ! Lots of testing *************** *** 29,34 **** but that could have been a simple mistake. (not 100% sure...) ! Check that changes to do_mkpart function are valid (note that either ! way, the old version was definitely wrong) (validated, was correct) Parted Problems --- 78,88 ---- but that could have been a simple mistake. (not 100% sure...) ! My changes to do_mkpart don't allow for the recovery of accidentally ! deleted partitions (see documentation in Parted for do_mkpart, and ! note that the filesystem is passed so that it can be recovered but ! not created). However: (1) It is doubtful that such a task should ! be provided by PartitionMorpher, and (2) The way it was written, ! "None" could not be selected as a partition type when creating a ! partition. Parted Problems *************** *** 39,57 **** Find out why FAT16 and NTFS file creation aren't working ! NTFS -- something about can't satisfy constraints (can we create ntfs partitions?) ! FAT16 -- solution_check_distant failure UI Issues (Problems as well as my biases) Main screen The graphical partition layout (i.e. the stuff just above the full ! tables) needs word labels and actual colors or something (done) Creating a partition ! The filesystem type & flags should be inactive/hidden if Extended is selected (done) Extended should not be an option if an extended partition already exists (I think) (done) Most filesystem types & all flags should be hidden behind an advanced tab s/Partition Path/Current Partition Path/ or /Partition Path/d ! The partition size widget needs a text field for manually entering the size ! (sliders just don't cut it--see the control center stuff for example) Partition Position seems somewhat lame. A Partition offset (i.e. amount of free space to leave before the partition) seems --- 93,126 ---- Find out why FAT16 and NTFS file creation aren't working ! ! Reasons why FAT16 and NTFS file creation weren't working ! NTFS -- apparently, "can't satisfy constraints" means "I don't ! know how to make an NTFS filesystem. Pretty stupid and ! misleading error from Parted if you ask me... ! FAT16 -- "solution_check_distant failure". Basically, a partition ! of size 1 Gb could be created, but one of size 1913 MB ! could not. QTParted solved this by simply breaking the ! freespace partition into two--formatting one of them (of ! size 1Gb) as a FAT16 partition, and leaving the other as ! freespace. Now, the question is, do I like that solution? UI Issues (Problems as well as my biases) Main screen The graphical partition layout (i.e. the stuff just above the full ! ! tables) needs word labels and actual colors or something--this ! may simply be a problem of the GTK2-H2O theme I use. However, ! I'm sure it could be improved either way (QTParted packs these ! nicely with lots of info, but in clear and intuitive way) Creating a partition ! Extended should not be an option if an extended partition already exists (I think) (done) Most filesystem types & all flags should be hidden behind an advanced tab s/Partition Path/Current Partition Path/ or /Partition Path/d ! The partition size widget needs a text field for manually entering ! the size (sliders just don't cut it--see the ! gnome-control-center stuff for keyboard repeat rate (possibly ! only on the accessibility side of things) for an example) Partition Position seems somewhat lame. A Partition offset (i.e. amount of free space to leave before the partition) seems Index: partitionmorpher.glade =================================================================== RCS file: /cvsroot/morphix/partitionmorpher/partitionmorpher.glade,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** partitionmorpher.glade 12 Oct 2003 02:01:47 -0000 1.6 --- partitionmorpher.glade 19 Oct 2003 00:18:57 -0000 1.7 *************** *** 399,407 **** <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> ! <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> <signal name="show" handler="on_CreateWindow_show" last_modification_time="Sat, 11 Oct 2003 23:02:01 GMT"/> <child internal-child="vbox"> --- 399,408 ---- <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> ! <property name="modal">True</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> <signal name="show" handler="on_CreateWindow_show" last_modification_time="Sat, 11 Oct 2003 23:02:01 GMT"/> + <signal name="delete_event" handler="gtk_widget_hide" last_modification_time="Fri, 12 Sep 2003 14:06:57 GMT"/> <child internal-child="vbox"> *************** *** 1179,1182 **** --- 1180,1184 ---- <property name="draw_indicator">True</property> <signal name="toggled" handler="on_CreatePrimaryRadiobutton_toggled" last_modification_time="Sun, 12 Oct 2003 01:16:33 GMT"/> + <signal name="clicked" handler="on_CreateTypeRadiobutton_clicked" last_modification_time="Fri, 12 Sep 2003 18:22:21 GMT"/> </widget> <packing> *************** *** 1190,1193 **** --- 1192,1196 ---- <widget class="GtkRadioButton" id="CreateExtendedRadiobutton"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">An Extended partition merely holds Logical partitions.</property> <property name="can_focus">True</property> <property name="label" translatable="yes">Extended</property> *************** *** 1199,1202 **** --- 1202,1206 ---- <property name="group">CreatePrimaryRadiobutton</property> <signal name="toggled" handler="on_CreateExtendedRadiobutton_toggled" last_modification_time="Sun, 12 Oct 2003 01:16:48 GMT"/> + <signal name="clicked" handler="on_CreateTypeRadiobutton_clicked" last_modification_time="Fri, 12 Sep 2003 18:09:20 GMT"/> </widget> <packing> *************** *** 1210,1213 **** --- 1214,1218 ---- <widget class="GtkRadioButton" id="CreateLogicalRadiobutton"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">You can have any number of Logical partions inside an Extended partition.</property> <property name="can_focus">True</property> <property name="label" translatable="yes">Logical</property> *************** *** 1219,1222 **** --- 1224,1228 ---- <property name="group">CreatePrimaryRadiobutton</property> <signal name="toggled" handler="on_CreateLogicalRadiobutton_toggled" last_modification_time="Sun, 12 Oct 2003 01:16:52 GMT"/> + <signal name="clicked" handler="on_CreateTypeRadiobutton_clicked" last_modification_time="Fri, 12 Sep 2003 18:22:43 GMT"/> </widget> <packing> *************** *** 1260,1267 **** <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> ! <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> <child internal-child="vbox"> --- 1266,1274 ---- <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> ! <property name="modal">True</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> + <signal name="delete_event" handler="gtk_widget_hide" last_modification_time="Fri, 12 Sep 2003 14:08:55 GMT"/> <child internal-child="vbox"> *************** *** 1971,1974 **** --- 1978,1982 ---- <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> + <signal name="delete_event" handler="gtk_widget_hide" last_modification_time="Fri, 12 Sep 2003 14:14:02 GMT"/> <child internal-child="vbox"> *************** *** 2047,2054 **** <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> ! <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> <child internal-child="vbox"> --- 2055,2063 ---- <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> ! <property name="modal">True</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> + <signal name="delete_event" handler="gtk_widget_hide" last_modification_time="Fri, 12 Sep 2003 14:10:48 GMT"/> <child internal-child="vbox"> *************** *** 2331,2338 **** <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> ! <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> <child internal-child="vbox"> --- 2340,2348 ---- <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> ! <property name="modal">True</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> + <signal name="delete_event" handler="gtk_widget_hide" last_modification_time="Fri, 12 Sep 2003 14:13:02 GMT"/> <child internal-child="vbox"> *************** *** 2694,2701 **** <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> ! <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> <child internal-child="vbox"> --- 2704,2712 ---- <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_CENTER</property> ! <property name="modal">True</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="has_separator">True</property> + <signal name="delete_event" handler="gtk_widget_hide" last_modification_time="Fri, 12 Sep 2003 14:11:58 GMT"/> <child internal-child="vbox"> *************** *** 3347,3350 **** --- 3358,3362 ---- <property name="destroy_with_parent">False</property> <property name="has_separator">False</property> + <signal name="delete_event" handler="gtk_widget_hide" last_modification_time="Fri, 12 Sep 2003 14:17:15 GMT"/> <child internal-child="vbox"> *************** *** 3487,3490 **** --- 3499,3584 ---- </packing> </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> + </widget> + + <widget class="GtkDialog" id="ProgressWindow"> + <property name="border_width">12</property> + <property name="visible">True</property> + <property name="title" translatable="yes">Progress</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_CENTER</property> + <property name="modal">True</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="has_separator">False</property> + <signal name="delete_event" handler="gtk_true" last_modification_time="Fri, 12 Sep 2003 14:26:04 GMT"/> + + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox13"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area13"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="vbox15"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">12</property> + + <child> + <widget class="GtkProgressBar" id="ProgressBar"> + <property name="visible">True</property> + <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property> + <property name="fraction">0</property> + <property name="pulse_step">0.1</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="ProgressLabel"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> </widget> <packing> Index: translation =================================================================== RCS file: /cvsroot/morphix/partitionmorpher/translation,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** translation 12 Oct 2003 02:01:47 -0000 1.5 --- translation 19 Oct 2003 00:18:57 -0000 1.6 *************** *** 68,72 **** --- 68,74 ---- gchar *s = N_("LBA Partition"); gchar *s = N_("Primary"); + gchar *s = N_("An Extended partition merely holds Logical partitions."); gchar *s = N_("Extended"); + gchar *s = N_("You can have any number of Logical partions inside an Extended partition."); gchar *s = N_("Logical"); gchar *s = N_("Resize Partition"); *************** *** 156,157 **** --- 158,160 ---- "Partition Morpher received the following error from Parted:"); gchar *s = N_("As a results of this error, the operation has been cancelled and no changes have been made."); + gchar *s = N_("Progress"); |
|
From: <ale...@us...> - 2003-10-19 04:45:05
|
Update of /cvsroot/morphix/partitionmorpher/src/.deps
In directory sc8-pr-cvs1:/tmp/cvs-serv6654/src/.deps
Modified Files:
pm_libparted.P
Log Message:
Merged with elijah-2-branch
Index: pm_libparted.P
===================================================================
RCS file: /cvsroot/morphix/partitionmorpher/src/.deps/pm_libparted.P,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pm_libparted.P 14 Apr 2003 23:56:41 -0000 1.2
--- pm_libparted.P 19 Oct 2003 00:18:57 -0000 1.3
***************
*** 270,275 ****
/usr/include/gtk-2.0/gtk/gtkvscale.h \
/usr/include/gtk-2.0/gtk/gtkvseparator.h /usr/include/parted/debug.h \
! ../config.h /usr/include/parted/linux.h /usr/include/locale.h \
! /usr/include/bits/locale.h /usr/include/libintl.h
pm_libparted.c :
pm_libparted.h :
--- 270,275 ----
/usr/include/gtk-2.0/gtk/gtkvscale.h \
/usr/include/gtk-2.0/gtk/gtkvseparator.h /usr/include/parted/debug.h \
! ../config.h /usr/include/parted/linux.h support.h \
! /usr/include/libintl.h /usr/include/locale.h /usr/include/bits/locale.h
pm_libparted.c :
pm_libparted.h :
***************
*** 596,600 ****
../config.h :
/usr/include/parted/linux.h :
/usr/include/locale.h :
/usr/include/bits/locale.h :
- /usr/include/libintl.h :
--- 596,601 ----
../config.h :
/usr/include/parted/linux.h :
+ support.h :
+ /usr/include/libintl.h :
/usr/include/locale.h :
/usr/include/bits/locale.h :
|
Update of /cvsroot/morphix/partitionmorpher/src
In directory sc8-pr-cvs1:/tmp/cvs-serv6654/src
Modified Files:
callbacks.c callbacks.h interface.c interface.h main.c
pm_libparted.c pm_libparted.h
Log Message:
Merged with elijah-2-branch
Index: callbacks.c
===================================================================
RCS file: /cvsroot/morphix/partitionmorpher/src/callbacks.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** callbacks.c 12 Oct 2003 18:27:28 -0000 1.9
--- callbacks.c 19 Oct 2003 00:18:57 -0000 1.10
***************
*** 45,48 ****
--- 45,49 ----
extern GtkWidget *TableWindow;
extern GtkWidget *ErrorWindow;
+ extern GtkWidget *ProgressWindow;
#define MEGABYTE_SIZE (1024*1024)
***************
*** 126,129 ****
--- 127,156 ----
}
+ void
+ show_busy_cursor( GdkWindow * window )
+ {
+ static GdkCursor * busy_cursor = NULL;
+
+ if (!busy_cursor)
+ busy_cursor = gdk_cursor_new(GDK_WATCH);
+
+ /* Make the specified window show the busy cursor */
+ gdk_window_set_cursor( window, busy_cursor );
+
+ /* Also make the MainWindow show the busy cursor */
+ gdk_window_set_cursor( MainWindow->window, busy_cursor );
+
+ while (gtk_events_pending())
+ gtk_main_iteration();
+ }
+
+ void
+ show_normal_cursor( GdkWindow * window )
+ {
+ gdk_window_set_cursor( window, NULL );
+ gdk_window_set_cursor( MainWindow->window, NULL );
+ }
+
+
/*
initialise list of filesystem types
***************
*** 311,315 ****
if (partinfo[i].flags[5] == PED_PARTITION_LVM)
COLOR_LVM(color)
-
printf("Debug: Color: %d, %d, %d\n",color.red,color.green,color.blue);
if (width >= 100) {
--- 338,341 ----
***************
*** 319,322 ****
--- 345,351 ----
gtk_button_set_label(GTK_BUTTON(part_item),"free");
}
+
+ printf("Debug: Color: %d, %d, %d\n",color.red,color.green,color.blue);
+
gtk_widget_modify_bg(part_item,GTK_STATE_NORMAL,&color);
gtk_widget_modify_bg(part_item,GTK_STATE_ACTIVE,&color);
***************
*** 329,332 ****
--- 358,362 ----
GTK_SIGNAL_FUNC(click_part_item),(gpointer) &partinfo[i]);
printf("Debug: Adding partition, number %d:%d width %d type %d name %s size %ld\n",partinfo[i].num, i, width, partinfo[i].type, partinfo[i].partname, partinfo[i].size);
+
gtk_box_pack_start(GTK_BOX(part_box),part_item,TRUE,TRUE,2);
}
***************
*** 427,430 ****
--- 457,461 ----
part_extended_nr = part_primary_count = part_extended_count = part_logical_count = part_freespace_count = 0;
+
for (i = 0; i < part_count; i++) {
initialise_partinfo(i);
***************
*** 513,516 ****
--- 544,548 ----
if (fs) {
printf("Debug: Checking if partition %s is resizable...\n", partinfo[i].partname);
+
PedConstraint *resize_con =
ped_file_system_get_resize_constraint(fs);
***************
*** 878,881 ****
--- 910,914 ----
printf("Debug: devices: %d\n",device_count);
+
for (i = 0; i < device_count;i++) {
item = gtk_menu_item_new_with_label(devices[i]->path);
***************
*** 955,958 ****
--- 988,993 ----
NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree),column);
+
+ gdk_notify_startup_complete ();
}
***************
*** 1095,1098 ****
--- 1130,1135 ----
gpointer user_data)
{
+ show_busy_cursor( ((GtkWidget*)button)->window );
+
gboolean success;
gchar fs_buffer[64];
***************
*** 1177,1194 ****
long long mb_size = (long long)gtk_range_get_value(GTK_RANGE(range));
long long sector_num = ((mb_size * 1024*1024) / 512);
- /*
- printf("sector_num as %%d : %d\n", sector_num);
- printf("sector_num as %%ld : %ld\n", sector_num);
- printf("sector_num as %%lld : %lld\n", sector_num);
- printf("sector_num as %%Ld : %Ld\n", sector_num);
! printf("sector_num as two %%d's : %d %d\n", sector_num, sector_num);
! printf("sector_num as two %%ld's : %ld %ld\n", sector_num, sector_num);
! printf("sector_num as two %%lld's : %lld %lld\n", sector_num, sector_num);
! printf("sector_num as two %%Ld's : %Ld %Ld\n", sector_num, sector_num);
! */
end_sector = sector_num + partinfo[selected_partition].start;
printf("Debug: selectedpartititon: %d\n",selected_partition);
printf("Debug: mbsize: %lld, start: %lld end: %lld\n",mb_size, partinfo[selected_partition].start,end_sector);
fs_type = ped_file_system_type_get(fs_buffer);
redirect_stderr_to_pipe(&saved_fd, &stderr_pipe);
--- 1214,1223 ----
long long mb_size = (long long)gtk_range_get_value(GTK_RANGE(range));
long long sector_num = ((mb_size * 1024*1024) / 512);
!
end_sector = sector_num + partinfo[selected_partition].start;
printf("Debug: selectedpartititon: %d\n",selected_partition);
printf("Debug: mbsize: %lld, start: %lld end: %lld\n",mb_size, partinfo[selected_partition].start,end_sector);
+
fs_type = ped_file_system_type_get(fs_buffer);
redirect_stderr_to_pipe(&saved_fd, &stderr_pipe);
***************
*** 1231,1234 ****
--- 1260,1264 ----
gtk_widget_hide(CreateWindow);
+ show_normal_cursor( ((GtkWidget*)button)->window );
refresh_devices_and_partitions();
}
***************
*** 1259,1264 ****
--- 1289,1296 ----
gpointer user_data)
{
+ show_busy_cursor( ((GtkWidget*)button)->window );
do_rm(&devices[selected_device],partinfo[selected_partition].num);
gtk_widget_hide(DeleteWindow);
+ show_normal_cursor( ((GtkWidget*)button)->window );
refresh_devices_and_partitions();
}
***************
*** 1488,1491 ****
--- 1520,1524 ----
}
+
void untoggle_create_flags() {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(CreateWindow,"CreateBootFlagCheckbutton")),FALSE);
***************
*** 1609,1612 ****
--- 1642,1678 ----
gtk_window_resize(GTK_WINDOW(CreateWindow),1,1);
}
+ }
+
+ void
+ on_CreateTypeRadiobutton_clicked (GtkButton *button,
+ gpointer user_data)
+ {
+ fprintf(stderr, "on_CreateTypeRadiobutton_clicked called.\n");
+
+ GtkWidget *radio_primary_type = lookup_widget(CreateWindow,"CreatePrimaryRadiobutton");
+ GtkWidget *radio_extended_type = lookup_widget(CreateWindow,"CreateExtendedRadiobutton");
+ GtkWidget *radio_logical_type = lookup_widget(CreateWindow,"CreateLogicalRadiobutton");
+
+ /*
+ if (part_primary_count + part_extended_count >= 4) {
+ gtk_widget_set_sensitive(radio_primary_type,FALSE);
+ gtk_widget_set_sensitive(radio_extended_type,FALSE);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio_logical_type),TRUE);
+ */
+
+ GtkWidget *optionmenu_fs = lookup_widget(CreateWindow,"optionmenu4");
+ GtkWidget *optionmenu_lbl = lookup_widget(CreateWindow,"label27");
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio_primary_type))) {
+ gtk_widget_set_sensitive(optionmenu_fs, TRUE);
+ gtk_widget_set_sensitive(optionmenu_lbl, TRUE);
+ } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio_extended_type))) {
+ gtk_widget_set_sensitive(optionmenu_fs, FALSE);
+ gtk_widget_set_sensitive(optionmenu_lbl, FALSE);
+ } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio_logical_type))) {
+ gtk_widget_set_sensitive(optionmenu_fs, TRUE);
+ gtk_widget_set_sensitive(optionmenu_lbl, TRUE);
+ }
+
}
Index: callbacks.h
===================================================================
RCS file: /cvsroot/morphix/partitionmorpher/src/callbacks.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** callbacks.h 12 Oct 2003 02:01:47 -0000 1.4
--- callbacks.h 19 Oct 2003 00:18:57 -0000 1.5
***************
*** 272,273 ****
--- 272,277 ----
on_CreateLogicalRadiobutton_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
+
+ void
+ on_CreateTypeRadiobutton_clicked (GtkButton *button,
+ gpointer user_data);
Index: interface.c
===================================================================
RCS file: /cvsroot/morphix/partitionmorpher/src/interface.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** interface.c 12 Oct 2003 02:01:47 -0000 1.6
--- interface.c 19 Oct 2003 00:18:57 -0000 1.7
***************
*** 402,405 ****
--- 402,406 ----
gtk_window_set_title (GTK_WINDOW (CreateWindow), _("Create Partition"));
gtk_window_set_position (GTK_WINDOW (CreateWindow), GTK_WIN_POS_CENTER);
+ gtk_window_set_modal (GTK_WINDOW (CreateWindow), TRUE);
dialog_vbox1 = GTK_DIALOG (CreateWindow)->vbox;
***************
*** 692,695 ****
--- 693,697 ----
gtk_widget_show (CreateExtendedRadiobutton);
gtk_box_pack_start (GTK_BOX (vbox9), CreateExtendedRadiobutton, FALSE, FALSE, 0);
+ gtk_tooltips_set_tip (tooltips, CreateExtendedRadiobutton, _("An Extended partition merely holds Logical partitions."), NULL);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (CreateExtendedRadiobutton), CreatePrimaryRadiobutton_group);
CreatePrimaryRadiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (CreateExtendedRadiobutton));
***************
*** 698,701 ****
--- 700,704 ----
gtk_widget_show (CreateLogicalRadiobutton);
gtk_box_pack_start (GTK_BOX (vbox9), CreateLogicalRadiobutton, FALSE, FALSE, 0);
+ gtk_tooltips_set_tip (tooltips, CreateLogicalRadiobutton, _("You can have any number of Logical partions inside an Extended partition."), NULL);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (CreateLogicalRadiobutton), CreatePrimaryRadiobutton_group);
CreatePrimaryRadiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (CreateLogicalRadiobutton));
***************
*** 720,723 ****
--- 723,729 ----
G_CALLBACK (on_CreateWindow_show),
NULL);
+ g_signal_connect ((gpointer) CreateWindow, "delete_event",
+ G_CALLBACK (gtk_widget_hide),
+ NULL);
g_signal_connect ((gpointer) none1, "activate",
G_CALLBACK (on_none1_activate),
***************
*** 768,777 ****
--- 774,792 ----
G_CALLBACK (on_CreatePrimaryRadiobutton_toggled),
NULL);
+ g_signal_connect ((gpointer) CreatePrimaryRadiobutton, "clicked",
+ G_CALLBACK (on_CreateTypeRadiobutton_clicked),
+ NULL);
g_signal_connect ((gpointer) CreateExtendedRadiobutton, "toggled",
G_CALLBACK (on_CreateExtendedRadiobutton_toggled),
NULL);
+ g_signal_connect ((gpointer) CreateExtendedRadiobutton, "clicked",
+ G_CALLBACK (on_CreateTypeRadiobutton_clicked),
+ NULL);
g_signal_connect ((gpointer) CreateLogicalRadiobutton, "toggled",
G_CALLBACK (on_CreateLogicalRadiobutton_toggled),
NULL);
+ g_signal_connect ((gpointer) CreateLogicalRadiobutton, "clicked",
+ G_CALLBACK (on_CreateTypeRadiobutton_clicked),
+ NULL);
g_signal_connect_data ((gpointer) cancelbutton1, "clicked",
G_CALLBACK (gtk_widget_hide),
***************
*** 877,880 ****
--- 892,896 ----
gtk_window_set_title (GTK_WINDOW (ResizeWindow), _("Resize Partition"));
gtk_window_set_position (GTK_WINDOW (ResizeWindow), GTK_WIN_POS_CENTER);
+ gtk_window_set_modal (GTK_WINDOW (ResizeWindow), TRUE);
dialog_vbox2 = GTK_DIALOG (ResizeWindow)->vbox;
***************
*** 1016,1019 ****
--- 1032,1038 ----
gtk_tooltips_set_tip (tooltips, ResizeOkButton, _("Attempt to resize the partition to the set size"), NULL);
+ g_signal_connect ((gpointer) ResizeWindow, "delete_event",
+ G_CALLBACK (gtk_widget_hide),
+ NULL);
g_signal_connect_data ((gpointer) cancelbutton2, "clicked",
G_CALLBACK (gtk_widget_hide),
***************
*** 1267,1270 ****
--- 1286,1292 ----
GTK_WIDGET_SET_FLAGS (closebutton2, GTK_CAN_DEFAULT);
+ g_signal_connect ((gpointer) HelpWindow, "delete_event",
+ G_CALLBACK (gtk_widget_hide),
+ NULL);
g_signal_connect_swapped ((gpointer) closebutton2, "clicked",
G_CALLBACK (gtk_widget_hide),
***************
*** 1309,1312 ****
--- 1331,1335 ----
gtk_window_set_title (GTK_WINDOW (DeleteWindow), _("Delete Partition?"));
gtk_window_set_position (GTK_WINDOW (DeleteWindow), GTK_WIN_POS_CENTER);
+ gtk_window_set_modal (GTK_WINDOW (DeleteWindow), TRUE);
dialog_vbox8 = GTK_DIALOG (DeleteWindow)->vbox;
***************
*** 1398,1401 ****
--- 1421,1427 ----
gtk_tooltips_set_tip (tooltips, DeleteOkButton, _("Delete the partition, removes all data stored"), NULL);
+ g_signal_connect ((gpointer) DeleteWindow, "delete_event",
+ G_CALLBACK (gtk_widget_hide),
+ NULL);
g_signal_connect_swapped ((gpointer) cancelbutton7, "clicked",
G_CALLBACK (gtk_widget_hide),
***************
*** 1458,1461 ****
--- 1484,1488 ----
gtk_window_set_title (GTK_WINDOW (ConvertWindow), _("Convert Filesystem"));
gtk_window_set_position (GTK_WINDOW (ConvertWindow), GTK_WIN_POS_CENTER);
+ gtk_window_set_modal (GTK_WINDOW (ConvertWindow), TRUE);
dialog_vbox9 = GTK_DIALOG (ConvertWindow)->vbox;
***************
*** 1576,1579 ****
--- 1603,1609 ----
GTK_WIDGET_SET_FLAGS (ConvertOkButton, GTK_CAN_DEFAULT);
+ g_signal_connect ((gpointer) ConvertWindow, "delete_event",
+ G_CALLBACK (gtk_widget_hide),
+ NULL);
g_signal_connect ((gpointer) ext4, "activate",
G_CALLBACK (on_ext4_activate),
***************
*** 1652,1655 ****
--- 1682,1686 ----
gtk_window_set_title (GTK_WINDOW (MoveWindow), _("Move Partition"));
gtk_window_set_position (GTK_WINDOW (MoveWindow), GTK_WIN_POS_CENTER);
+ gtk_window_set_modal (GTK_WINDOW (MoveWindow), TRUE);
dialog_vbox10 = GTK_DIALOG (MoveWindow)->vbox;
***************
*** 1757,1760 ****
--- 1788,1794 ----
gtk_tooltips_set_tip (tooltips, OkMoveButton, _("Attempt to move the partition to the selected place"), NULL);
+ g_signal_connect ((gpointer) MoveWindow, "delete_event",
+ G_CALLBACK (gtk_widget_hide),
+ NULL);
g_signal_connect_swapped ((gpointer) cancelbutton9, "clicked",
G_CALLBACK (gtk_widget_hide),
***************
*** 2077,2080 ****
--- 2111,2117 ----
GTK_WIDGET_SET_FLAGS (ErrorOkButton, GTK_CAN_DEFAULT);
+ g_signal_connect ((gpointer) ErrorWindow, "delete_event",
+ G_CALLBACK (gtk_widget_hide),
+ NULL);
g_signal_connect ((gpointer) ErrorOkButton, "clicked",
G_CALLBACK (on_ErrorOkButton_clicked),
***************
*** 2095,2098 ****
--- 2132,2188 ----
return ErrorWindow;
+ }
+
+ GtkWidget*
+ create_ProgressWindow (void)
+ {
+ GtkWidget *ProgressWindow;
+ GtkWidget *dialog_vbox13;
+ GtkWidget *vbox15;
+ GtkWidget *ProgressBar;
+ GtkWidget *ProgressLabel;
+ GtkWidget *dialog_action_area13;
+
+ ProgressWindow = gtk_dialog_new ();
+ gtk_container_set_border_width (GTK_CONTAINER (ProgressWindow), 12);
+ gtk_window_set_title (GTK_WINDOW (ProgressWindow), _("Progress"));
+ gtk_window_set_position (GTK_WINDOW (ProgressWindow), GTK_WIN_POS_CENTER);
+ gtk_window_set_modal (GTK_WINDOW (ProgressWindow), TRUE);
+ gtk_dialog_set_has_separator (GTK_DIALOG (ProgressWindow), FALSE);
+
+ dialog_vbox13 = GTK_DIALOG (ProgressWindow)->vbox;
+ gtk_widget_show (dialog_vbox13);
+
+ vbox15 = gtk_vbox_new (FALSE, 12);
+ gtk_widget_show (vbox15);
+ gtk_box_pack_start (GTK_BOX (dialog_vbox13), vbox15, TRUE, TRUE, 0);
+
+ ProgressBar = gtk_progress_bar_new ();
+ gtk_widget_show (ProgressBar);
+ gtk_box_pack_start (GTK_BOX (vbox15), ProgressBar, FALSE, FALSE, 0);
+
+ ProgressLabel = gtk_label_new ("");
+ gtk_widget_show (ProgressLabel);
+ gtk_box_pack_start (GTK_BOX (vbox15), ProgressLabel, FALSE, FALSE, 0);
+ gtk_label_set_justify (GTK_LABEL (ProgressLabel), GTK_JUSTIFY_LEFT);
+ gtk_misc_set_alignment (GTK_MISC (ProgressLabel), 0, 0.5);
+
+ dialog_action_area13 = GTK_DIALOG (ProgressWindow)->action_area;
+ gtk_widget_show (dialog_action_area13);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area13), GTK_BUTTONBOX_END);
+
+ g_signal_connect ((gpointer) ProgressWindow, "delete_event",
+ G_CALLBACK (gtk_true),
+ NULL);
+
+ /* Store pointers to all widgets, for use by lookup_widget(). */
+ GLADE_HOOKUP_OBJECT_NO_REF (ProgressWindow, ProgressWindow, "ProgressWindow");
+ GLADE_HOOKUP_OBJECT_NO_REF (ProgressWindow, dialog_vbox13, "dialog_vbox13");
+ GLADE_HOOKUP_OBJECT (ProgressWindow, vbox15, "vbox15");
+ GLADE_HOOKUP_OBJECT (ProgressWindow, ProgressBar, "ProgressBar");
+ GLADE_HOOKUP_OBJECT (ProgressWindow, ProgressLabel, "ProgressLabel");
+ GLADE_HOOKUP_OBJECT_NO_REF (ProgressWindow, dialog_action_area13, "dialog_action_area13");
+
+ return ProgressWindow;
}
Index: interface.h
===================================================================
RCS file: /cvsroot/morphix/partitionmorpher/src/interface.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** interface.h 6 Sep 2003 16:23:30 -0000 1.2
--- interface.h 19 Oct 2003 00:18:57 -0000 1.3
***************
*** 15,16 ****
--- 15,17 ----
GtkWidget* create_TableWindow (void);
GtkWidget* create_ErrorWindow (void);
+ GtkWidget* create_ProgressWindow (void);
Index: main.c
===================================================================
RCS file: /cvsroot/morphix/partitionmorpher/src/main.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** main.c 6 Sep 2003 16:23:30 -0000 1.3
--- main.c 19 Oct 2003 00:18:57 -0000 1.4
***************
*** 27,30 ****
--- 27,31 ----
GtkWidget *TableWindow;
GtkWidget *ErrorWindow;
+ GtkWidget *ProgressWindow;
gboolean CheckRoot() {
***************
*** 49,52 ****
--- 50,55 ----
gtk_init (&argc, &argv);
+ gtk_window_set_auto_startup_notification (FALSE);
+
add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
***************
*** 71,74 ****
--- 74,78 ----
TableWindow = create_TableWindow ();
ErrorWindow = create_ErrorWindow ();
+ ProgressWindow = create_ProgressWindow ();
/*
Index: pm_libparted.c
===================================================================
RCS file: /cvsroot/morphix/partitionmorpher/src/pm_libparted.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** pm_libparted.c 12 Oct 2003 18:27:28 -0000 1.7
--- pm_libparted.c 19 Oct 2003 00:18:57 -0000 1.8
***************
*** 7,10 ****
--- 7,14 ----
#include <parted/linux.h>
+ #include "support.h"
+
+ extern GtkWidget * ProgressWindow;
+
#if ENABLE_NLS
# include <locale.h>
***************
*** 15,19 ****
#endif /* ENABLE_NLS */
! #define MIN_FREESPACE (1000 * 2) /* 1000k */
#define MEGABYTE (1024 * 1024)
#define MEGABYTE_SECTORS (MEGABYTE / 512)
--- 19,23 ----
#endif /* ENABLE_NLS */
! #define MIN_FREESPACE (1024 * 2) /* 1 MB */
#define MEGABYTE (1024 * 1024)
#define MEGABYTE_SECTORS (MEGABYTE / 512)
***************
*** 111,114 ****
--- 115,138 ----
}
+ /* This sucks. I really dislike using extern, but... well, it was
+ already used quite a bit anyway... */
+ extern void show_busy_cursor( GdkWindow * window );
+
+ static void
+ display_progress_window()
+ {
+ GtkWidget *progress_label = lookup_widget(ProgressWindow,"ProgressLabel");
+ GtkWidget *progress_bar = lookup_widget(ProgressWindow,"ProgressBar");
+ gtk_label_set_text(GTK_LABEL(progress_label), "Estimating remaining time...");
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress_bar), 0.0);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress_bar), "0%");
+ gtk_widget_show(ProgressWindow);
+
+ show_busy_cursor( ProgressWindow->window );
+
+ while (gtk_events_pending())
+ gtk_main_iteration();
+ }
+
static void
_timer_handler (PedTimer* timer, void* context)
***************
*** 130,143 ****
if (draw_this_time) {
- // wipe_line ();
if (timer->state_name)
printf ("%s... ", timer->state_name);
! printf (_("%0.f%%\t(time left %.2d:%.2d)"),
100.0 * timer->frac,
tcontext->predicted_time_left / 60,
tcontext->predicted_time_left % 60);
-
fflush (stdout);
}
}
--- 154,200 ----
if (draw_this_time) {
+ /* The timer seems to always hit 0 a second or two
+ before quitting. So, I'm just going to increment
+ it here. On my laptop, it needs a bigger increment
+ than this, but at least it doesn't show "00:00" as
+ the time left and still sit there for a couple
+ seconds. Of course, the timer in general seems to
+ need some work. */
+ tcontext->predicted_time_left++;
+
+ #ifdef PRINT_DEBUGGING_INFO
+ // wipe_line ();
if (timer->state_name)
printf ("%s... ", timer->state_name);
! printf (_("%0.f%%\t(time left %.2d:%.2d)\n"),
100.0 * timer->frac,
tcontext->predicted_time_left / 60,
tcontext->predicted_time_left % 60);
fflush (stdout);
+ #endif
+
+ gchar message[100];
+ gchar percentage[10];
+ sprintf(message,"");
+ if (timer->state_name) {
+ sprintf (message,"%s\n", timer->state_name);
+ /* The following is an ugly hack to make the first character upperase. */
+ message[0] &= 0xDF;
+ }
+ sprintf (message, _("%sTime left %.2d:%.2d\n"),
+ message,
+ tcontext->predicted_time_left / 60,
+ tcontext->predicted_time_left % 60);
+ sprintf(percentage, "%0.f%%", 100.0 * timer->frac);
+
+ GtkWidget *progress_label = lookup_widget(ProgressWindow,"ProgressLabel");
+ GtkWidget *progress_bar = lookup_widget(ProgressWindow,"ProgressBar");
+ gtk_label_set_text(GTK_LABEL(progress_label), message);
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress_bar), timer->frac);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress_bar), percentage);
+ while (gtk_events_pending())
+ gtk_main_iteration();
+
}
}
***************
*** 167,176 ****
ped_set_architecture (&ped_linux_arch);
! timer = ped_timer_new (_timer_handler, &timer_context);
! if (!timer)
! return FALSE;
! timer_context.last_update = 0;
!
! return TRUE;
}
--- 224,228 ----
ped_set_architecture (&ped_linux_arch);
! return set_timer();
}
***************
*** 181,215 ****
}
- static void
- timer_handler (PedTimer* timer, void* context)
- {
- TimerContext* tcontext = (TimerContext*) context;
- int draw_this_time;
-
- if (opt_script_mode || !isatty(fileno(stdout)))
- return;
-
- if (tcontext->last_update != timer->now && timer->now > timer->start) {
- tcontext->predicted_time_left
- = timer->predicted_end - timer->now;
- tcontext->last_update = timer->now;
- draw_this_time = 1;
- } else {
- draw_this_time = 0;
- }
-
- if (draw_this_time) {
-
- if (timer->state_name)
- printf ("%s... ", timer->state_name);
- printf ("%0.f%%\t(time left %.2d:%.2d)",
- 100.0 * timer->frac,
- tcontext->predicted_time_left / 60,
- tcontext->predicted_time_left % 60);
-
- fflush (stdout);
- }
- }
-
/*
* FIXME! This check has been disabled, like in qtparted,
--- 233,236 ----
***************
*** 492,496 ****
--- 513,519 ----
return FALSE;
}
+ display_progress_window();
fs = ped_file_system_create(&part->geom, fs_type, timer);
+ gtk_widget_hide(ProgressWindow);
if (!fs) {
ped_disk_remove_partition (disk, part);
***************
*** 907,910 ****
--- 930,934 ----
end = ped_disk_get_last_partition_num (disk);
printf("Debug: Last num: %d\n",end);
+
do {
/* if (part == NULL) {
***************
*** 982,986 ****
--- 1006,1012 ----
dev = ped_device_get_next(device);
if (!dev) {
+ #ifdef PRINT_DEBUGGING_INFO
printf("Debug: No Next Device Found!\n");
+ #endif
return NULL;
}
***************
*** 988,999 ****
return NULL;
return dev;
- }
-
- gboolean setup_timer() {
- timer = ped_timer_new(timer_handler, &timer_context);
- if (!timer)
- return FALSE;
- timer_context.last_update = 0;
- return TRUE;
}
--- 1014,1017 ----
Index: pm_libparted.h
===================================================================
RCS file: /cvsroot/morphix/partitionmorpher/src/pm_libparted.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** pm_libparted.h 12 Oct 2003 02:01:48 -0000 1.6
--- pm_libparted.h 19 Oct 2003 00:18:57 -0000 1.7
***************
*** 5,8 ****
--- 5,10 ----
#include <gtk/gtk.h>
+ //#define PRINT_DEBUGGING_INFO
+
#define MAX_PARTITIONS 128
#define MAX_FILESYSTEMS 128
***************
*** 91,95 ****
} partinfo[MAX_PARTITIONS]; // HUGE FIXME! BAAAAD BAAAAD CODING! MALLOC DAMMIT!!! *shrug*
- gboolean set_timer();
gboolean init_arch();
--- 93,96 ----
***************
*** 248,253 ****
PedDevice *get_next_device(const PedDevice *device);
-
- gboolean setup_timer();
static void
--- 249,252 ----
|
|
From: <ale...@us...> - 2003-10-12 18:27:36
|
Update of /cvsroot/morphix/partitionmorpher/src
In directory sc8-pr-cvs1:/tmp/cvs-serv26198
Modified Files:
callbacks.c pm_libparted.c
Log Message:
small cleanups
Index: callbacks.c
===================================================================
RCS file: /cvsroot/morphix/partitionmorpher/src/callbacks.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** callbacks.c 12 Oct 2003 02:01:47 -0000 1.8
--- callbacks.c 12 Oct 2003 18:27:28 -0000 1.9
***************
*** 516,519 ****
--- 516,520 ----
ped_file_system_get_resize_constraint(fs);
if (resize_con) {
+ printf("Debug: constraint accepted: mb_min: %ld mb_max: %ld\n",(int)(resize_con->min_size * 1.0/ MEGABYTE_SIZE * MEGABYTE_SECTORS),(int)(resize_con->max_size * 1.0 / MEGABYTE_SIZE * MEGABYTE_SECTORS));
partinfo[i].min_size = (int)resize_con->min_size;
partinfo[i].mb_min_size = (int)(resize_con->min_size * 1.0/ MEGABYTE_SIZE * MEGABYTE_SECTORS);
***************
*** 522,525 ****
--- 523,529 ----
ped_constraint_destroy(resize_con);
}
+ else {
+ printf("Debug: constraint failed! Can'tresize %dth partition\n",i);
+ }
ped_file_system_close(fs);
// The following two lines shouldn't be necessary since we initialize partinfo[i].label to ""
***************
*** 530,533 ****
--- 534,540 ----
partinfo[i].label = label;
}
+ else {
+ printf("Debug: filesystem couldn't be opened\n");
+ }
}
else {
***************
*** 1203,1207 ****
unredirect_stderr(saved_fd, stderr_pipe);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_boot_flag)))
! set_part_flag_state(&devices[selected_device],partinfo[selected_partition].part,PED_PARTITION_BOOT,1);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_root_flag)))
set_part_flag_state(&devices[selected_device],partinfo[selected_partition].part,PED_PARTITION_ROOT,1);
--- 1210,1214 ----
unredirect_stderr(saved_fd, stderr_pipe);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_boot_flag)))
! set_part_flag_state(&devices[selected_device],partinfo[selected_partition].part,PED_PARTITION_BOOT,1);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_root_flag)))
set_part_flag_state(&devices[selected_device],partinfo[selected_partition].part,PED_PARTITION_ROOT,1);
Index: pm_libparted.c
===================================================================
RCS file: /cvsroot/morphix/partitionmorpher/src/pm_libparted.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** pm_libparted.c 12 Oct 2003 02:01:48 -0000 1.6
--- pm_libparted.c 12 Oct 2003 18:27:28 -0000 1.7
***************
*** 674,678 ****
fs = ped_file_system_open(&part->geom);
if (!fs) {
- ped_file_system_close (fs);
ped_constraint_destroy (constraint);
ped_disk_destroy (disk);
--- 674,677 ----
|