
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
X2 is an simple text/programming editor developed in house by Rock Computing from a dissatisfaction with existing text editors.
Features:
*) Small
*) Very light memory usage
*) Syntax highlighting
*) Embedded terminal
*) Find/replace/jump to line
*) Customizable file templates.
It is based on gtksouceview and vte so do make sure you have those installed.
You can checkout the git development release here: https://gitorious.org/x2
All Debs have been removed since X2 can now be downloaded from the official debian package archives: http://packages.debian.org/sid/x2
Its licensed under the BSD 3 clause licence, all patches and donations welcome!
If you discover a bug please do let me know either here, or on our bug tracker: http://rockcomputing.dyndns-web.com//flyspray/index.php?project=2&do=index
8 years ago
29/01/12 - 2
Actually uploaded a compilable bundle this time.
29/01/12
1) Enable real time preferences
2) Re-enabled the save as keybinding that had been strangely disabled
3) Fix file templates to be fully integrated
4) Split sources into easier to manage files
06/12/11
1.0.9.0: I have fixed all outstanding bugs I can find at the moment.
22/11/11
1.0.8.6: Another minor version bump to fix the quitting when there are unsaved files thing.
Sorry it took so long, had a few other things on.
21/10/11
1.0.8.5 Minor bugfix release.
20/10/11
Version 1.0.8.4 released and offers more improvements to the file templating again.
Templates can now be created from existing files, ctrl+shift+w to save a file as a template, note this only works if the open file has a file extension.
Some keybindings have been changed, save as has now been remapped to ctrl+shift+s (similar to other gtk apps) and preferences have been remapped to ctrl+, (similar to OSX).
Please do be aware of these changes as I realised that printer support may be required in the future and the ctrl+p keybinding may be needed. But since I do not own a printer I will need some help with this.
18/10/11
Version 1.0.8.3 hopefully fixes the runtime segmentation fault on Fedora systems.
18/10/11
Version 1.0.8.2 released changing the previous behaviour of the graphical templates to be more consistent with the open function.
18/10/11
Version 1.0.8.1 released hopefully fixing two long standing bugs.
18/10/11
Version 1.0.8 released, this builds upon the templating idea and expands it to have a graphical component. CTRL+SHIFT+N to activate (assuming you have installed templates).
10/10/11
Version 1.0.7 released. This includes an expansion to our previous release where if a file that is specified as an argument does not exist then it is created for the user.
Now, if the user also specifies a file type (c, py, etc) so long as the user has a matching template file in ~/.config/X2/templates the template will be loaded reducing the amount of work the user has to do to get started.
These files are totally customisable and can be added or removed to as the user wishes.
To get started create the file ~/.config/X2/templates/template.c with the contents:
#include
int main( int argc, char *argv )
{
printf( "Hello world!\n" );
return( 0 );
}
Then just run X2 from the command line with .c and the template will load the contents into your new file.
To remove this just remove the template.c file.
09/10/11
Fedora 32 rpm uploaded.
08/10/11
Five bugs were closed for this release, some of which were code re-factoring elements which really reduced the amount of code inside X2.
The following bugs have been closed:
#3 Create icon for X2
#8 Files can't be passed in via open with dialog
#14 Write a man page
#15 X2 doesn't see relative paths.
#16 Create files passed onto the command line if they don't already exist.
If you use Arch Linux or a source based distro you can download and run now, otherwise please do wait for the packages to be built. 32 bit rpms and debs will be on their way soon.
Oh and one more thing... This one is for you Steve. Respect and peace out.
06/10/11
Andrea Veri has very kindly packaged X2 for Debian: http://packages.debian.org/sid/x2
04/10/11
Added 64 bit fedora package
Added 64 bit deb package
03/10/11
Added tool tips
02/10/11
Added Ubuntu package!
Added Fedora package!
01/10/11
Fixed the desktop file in the main build scripts so that any packager should not have to write it their selves.
Added load from command line.
30/9/11
Created the .desktop file and taken advantage of the gtk stock text editor icon.
29/9/11
Completed the build system.
8 years ago
29/01/12 - 2
Actually uploaded a compilable bundle this time.
29/01/12
1) Enable real time preferences
2) Re-enabled the save as keybinding that had been strangely disabled
3) Fix file templates to be fully integrated
4) Split sources into easier to manage files
06/12/11
1.0.9.0: I have fixed all outstanding bugs I can find at the moment.
22/11/11
1.0.8.6: Another minor version bump to fix the quitting when there are unsaved files thing.
Sorry it took so long, had a few other things on.
21/10/11
1.0.8.5 Minor bugfix release.
20/10/11
Version 1.0.8.4 released and offers more improvements to the file templating again.
Templates can now be created from existing files, ctrl+shift+w to save a file as a template, note this only works if the open file has a file extension.
Some keybindings have been changed, save as has now been remapped to ctrl+shift+s (similar to other gtk apps) and preferences have been remapped to ctrl+, (similar to OSX).
Please do be aware of these changes as I realised that printer support may be required in the future and the ctrl+p keybinding may be needed. But since I do not own a printer I will need some help with this.
18/10/11
Version 1.0.8.3 hopefully fixes the runtime segmentation fault on Fedora systems.
18/10/11
Version 1.0.8.2 released changing the previous behaviour of the graphical templates to be more consistent with the open function.
18/10/11
Version 1.0.8.1 released hopefully fixing two long standing bugs.
18/10/11
Version 1.0.8 released, this builds upon the templating idea and expands it to have a graphical component. CTRL+SHIFT+N to activate (assuming you have installed templates).
10/10/11
Version 1.0.7 released. This includes an expansion to our previous release where if a file that is specified as an argument does not exist then it is created for the user.
Now, if the user also specifies a file type (c, py, etc) so long as the user has a matching template file in ~/.config/X2/templates the template will be loaded reducing the amount of work the user has to do to get started.
These files are totally customisable and can be added or removed to as the user wishes.
To get started create the file ~/.config/X2/templates/template.c with the contents:
#include
int main( int argc, char *argv )
{
printf( "Hello world!\n" );
return( 0 );
}
Then just run X2 from the command line with .c and the template will load the contents into your new file.
To remove this just remove the template.c file.
09/10/11
Fedora 32 rpm uploaded.
08/10/11
Five bugs were closed for this release, some of which were code re-factoring elements which really reduced the amount of code inside X2.
The following bugs have been closed:
#3 Create icon for X2
#8 Files can't be passed in via open with dialog
#14 Write a man page
#15 X2 doesn't see relative paths.
#16 Create files passed onto the command line if they don't already exist.
If you use Arch Linux or a source based distro you can download and run now, otherwise please do wait for the packages to be built. 32 bit rpms and debs will be on their way soon.
Oh and one more thing... This one is for you Steve. Respect and peace out.
06/10/11
Andrea Veri has very kindly packaged X2 for Debian: http://packages.debian.org/sid/x2
04/10/11
Added 64 bit fedora package
Added 64 bit deb package
03/10/11
Added tool tips
02/10/11
Added Ubuntu package!
Added Fedora package!
01/10/11
Fixed the desktop file in the main build scripts so that any packager should not have to write it their selves.
Added load from command line.
30/9/11
Created the .desktop file and taken advantage of the gtk stock text editor icon.
29/9/11
Completed the build system.
LazyKent
8 years ago
http://rockcomputing.co.uk/ doesn't work.
Report
njal
8 years ago
Report
njal
9 years ago
Report
drasey
9 years ago
I can compile the release version w/o issues (1.0.9)
No errors during ./configure
make all
make -C src all
make[1]: Entering directory `/home/drasey/download/x2/svn/x2/src'
gcc -Wall -g -O0 -o x2 main.c `pkg-config --libs --cflags vte gtksourceview-2.0`
In file included from main.c:19:0:
callbacks.c: In function 'New':
callbacks.c:135:9: warning: 'vte_terminal_fork_command' is deprecated (declared at /usr/include/vte-0.0/vte/vtedeprecated.h:82) [-Wdeprecated-declarations]
In file included from main.c:19:0:
callbacks.c: In function 'destroy':
callbacks.c:534:2: warning: passing argument 1 of 'gtk_button_box_set_layout' from incompatible pointer type [enabled by default]
/usr/include/gtk-2.0/gtk/gtkbbox.h:71:19: note: expected 'struct GtkButtonBox *' but argument is of type 'struct GtkWidget *'
callbacks.c: In function 'drag_data_received_handler':
callbacks.c:578:16: warning: pointer targets in initialization differ in signedness [-Wpointer-sign]
main.c: At top level:
main.c:20:23: fatal error: templates.c: No such file or directory
compilation terminated.
make[1]: *** [x2] Error 1
make[1]: Leaving directory `/home/drasey/download/x2/svn/x2/src'
make: *** [all] Error 2
Report
njal
9 years ago
Report
drasey
9 years ago
The compile error is now gone, but for some reason, I'm getting a 64bit binary being built (I'm on a 32bit system)
drasey@xxx:~/download/x2: file src/x2
src/x2: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.27, BuildID[sha1]=0x2e6e02e55c34cbc9f7ba208c1781f3f9bdb4cd2d, not stripped
Report
njal
9 years ago
Report
drasey
9 years ago
Report
njal
9 years ago
Report
drasey
9 years ago
Report
drasey
9 years ago
Report
drasey
9 years ago
Report
njal
9 years ago
Report
njal
9 years ago
Report
GDigger24
9 years ago
starting with version 1.0.8 x2 does not compile on my system anymore. This is the error message:
make -C src all
make[1]: Entering directory `/usr/src/packages/SOURCES/x2-1.0.8/src'
gcc -Wall -g -O0 -o x2 main.c `pkg-config --libs --cflags vte gtksourceview-2.0`
In file included from main.c:18:0:
callbacks.c: In function ‘New’:
callbacks.c:37:2: warning: implicit declaration of function ‘gtk_combo_box_text_new’
callbacks.c:37:19: warning: assignment makes pointer from integer without a cast
callbacks.c:133:9: warning: ‘vte_terminal_fork_command’ is deprecated (declared at /usr/include/vte-0.0/vte/vtedeprecated.h:82)
In file included from main.c:18:0:
callbacks.c: In function ‘Template’:
callbacks.c:375:15: warning: initialization discards qualifiers from pointer target type
In file included from main.c:18:0:
callbacks.c: In function ‘drag_data_received_handler’:
callbacks.c:898:16: warning: pointer targets in initialization differ in signedness
callbacks.c: In function ‘Populate_CMB’:
callbacks.c:1012:2: warning: passing argument 1 of ‘gtk_combo_box_get_model’ from incompatible pointer type
/usr/include/gtk-2.0/gtk/gtkcombobox.h:109:15: note: expected ‘struct GtkComboBox *’ but argument is of type ‘struct GtkWidget *’
callbacks.c:1017:16: warning: initialization discards qualifiers from pointer target type
callbacks.c:1020:4: warning: implicit declaration of function ‘gtk_combo_box_text_append_text’
callbacks.c:1020:4: warning: implicit declaration of function ‘GTK_COMBO_BOX_TEXT’
/tmp/ccD4IPu6.o: In function `New':
/usr/src/packages/SOURCES/x2-1.0.8/src/callbacks.c:37: undefined reference to `gtk_combo_box_text_new'
/tmp/ccD4IPu6.o: In function `Populate_CMB':
/usr/src/packages/SOURCES/x2-1.0.8/src/callbacks.c:1020: undefined reference to `GTK_COMBO_BOX_TEXT'
/usr/src/packages/SOURCES/x2-1.0.8/src/callbacks.c:1020: undefined reference to `gtk_combo_box_text_append_text'
collect2: ld returned 1 exit status
make[1]: *** [x2] Error 1
make[1]: Leaving directory `/usr/src/packages/SOURCES/x2-1.0.8/src'
make: *** [all] Error 2
Report
GDigger24
9 years ago
I have found this on the gtk developers page:
Warning
gtk_combo_box_get_active_text has been deprecated since version 2.24 and should not be used in newly-written code. If you used this with a GtkComboBox constructed with gtk_combo_box_new_text() then you should now use GtkComboBoxText and gtk_combo_box_text_get_active_text() instead. Or if you used this with a GtkComboBoxEntry then you should now use GtkComboBox with "has-entry" as TRUE and use gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combobox))).
Report
njal
9 years ago
If you could let me know what distribution you use and architecture I can give it a go, but as it stands I have it working on Arch, Mint and Fedora not yet on opensuse for some reason but I need to know what distro you are using to try and figure out where the problem may lay.
Report
GDigger24
9 years ago
I have found this on the gtk developers page:
Warning
gtk_combo_box_get_active_text has been deprecated since version 2.24 and should not be used in newly-written code. If you used this with a GtkComboBox constructed with gtk_combo_box_new_text() then you should now use GtkComboBoxText and gtk_combo_box_text_get_active_text() instead. Or if you used this with a GtkComboBoxEntry then you should now use GtkComboBox with "has-entry" as TRUE and use gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combobox))).
Report
GDigger24
9 years ago
I have found this on the gtk developers page:
Warning
gtk_combo_box_get_active_text has been deprecated since version 2.24 and should not be used in newly-written code. If you used this with a GtkComboBox constructed with gtk_combo_box_new_text() then you should now use GtkComboBoxText and gtk_combo_box_text_get_active_text() instead. Or if you used this with a GtkComboBoxEntry then you should now use GtkComboBox with "has-entry" as TRUE and use gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combobox))).
Report
njal
9 years ago
http://www.youtube.com/watch?v=FUE1eiVj3MA
Report
gracca
9 years ago
Quote:
$ ./src/x2
(x2:11378): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_close: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_read_line: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_read_line: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_read_line: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_read_line: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_read_line: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_read_line: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_read_line: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_read_line: assertion `channel != NULL' failed
(x2:11378): GLib-CRITICAL **: g_io_channel_close: assertion `channel != NULL' failed
Segmentation fault (core dumped)
Report
njal
9 years ago
Oh wait, my build fails now :S
That's weird, time to really start digging down.
Report
gracca
9 years ago
$ mkdir -p ~/.config/X2
and now open x2, and it won't segfault as before (in FC 15) :D
If you correct this bug, I can submit it to Fedora because I have the spec file ready.
Report
njal
9 years ago
If it does I will take my fedora rpms offline in favour of yours.
Report
gracca
9 years ago
Report