Giter Club home page Giter Club logo

l3afpad's People

Contributors

caleb- avatar chamfay avatar city-busz avatar hoijui avatar kretcheu avatar manolox avatar mlopezcoria avatar rffontenelle avatar stevenhoneyman avatar tetralet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

l3afpad's Issues

Abandoned repo?

The last activity from @stevenhoneyman on this repo, regarding PRs, Issues and commits, is from December 2017 (EDIT: The whole account of @stevenhoneyman has not seen any activity since Dec. 2017).
... are you still here?
Would you be fine with someone else taking over?
I don't really want to, but maybe someone else wants?
It seems to be used by some, and some of us are also active here...
if some of those could get push access to this repo, or one of us declares his repo as the new main repo, and gives access to some of the others, the project could be a bit more lively again.

Content erased when editing and saving file on special unit such as mtp:// (Android device) and smb:// (Samba remote share)

Easy steps to reproduce:

  1. copy a non empty text file to a remote smb:// Samba share or mtp:// Android device;
  2. open text file with L3afpad and check that it is not empty. Make a simple modification to the text file.
  3. close L3afpad and save the file with the modification.
  4. open the modified file again with L3afpad: the content is completely erased!

The same bug seems to affect GTK2+ version of Leafpad as well: http://unix.stackexchange.com/questions/202848/samba-erases-content-of-files-when-saving and https://bugs.archlinux.org/task/44681

Please note that smb shares are not the only units affected. MTP and other special mounts are affected, too.

Line Numbers Disappearing

Line numbers occasionally disappear when you click on or make changes to a line. Seems to be an issue with l3afpad only (i.e. not with leafpad).

Auto-Save

where (code)

https://github.com/hoijui/l3afpad/tree/autosave
(will probably never be merged into master, to keep master clean and lean)

what

l3afpad with auto-save functionality.

how

If activated (Options -> Auto Save), saves the current buffers content to a separate, temporary file.
This happens 10 seconds after the last change, or immediately after 150 changes.

Unnamed buffers are stored to "~/.cache/l3afpad/buffers/.txt"

Named buffers are stored to either
"~/.cache/l3afpad/buffers/"
or
"/.
",
depending on the Options -> Auto Save Same Dir config value.

The temporary file is deleted once the user saves to a proper, primary file.

why

I usually have many l3afpad buffers open, because it is so light-weight, and i do lots of note-taking here and there. the nature of my machine is such though, that it often crashes or hangs, or fails to wakeup from suspend, and then i usually lost all my notes (except the manually saved ones).

Therefore, i hacked together this crude auto-save functionality.
It is not yet well tested, and is surely very rough around the edges, but it basically works.
Please feel free to test and comment.
I do not expect this to ever get into the master branch, but maybe someone else has use for it too.

with autogen.sh have to find each development dependancy .

I have been trying to build l3afpad but get running into one dependancy issue onto another -

~/games/l3afpad$ ./autogen.sh 
+ aclocal
configure.ac:47: warning: macro 'AM_GLIB_DEFINE_LOCALEDIR' not found in library
+ autoheader --force
+ AUTOMAKE=automake intltoolize -c --automake --force
./autogen.sh: 29: ./autogen.sh: intltoolize: not found
+ automake --add-missing --copy --include-deps
configure.ac:2: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:2: https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.ac:5: installing './compile'
configure.ac:2: installing './install-sh'
configure.ac:2: installing './missing'
Makefile.am: installing './INSTALL'
src/Makefile.am: installing './depcomp'
+ autoconf
configure.ac:6: error: possibly undefined macro: AC_PROG_INTLTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:47: error: possibly undefined macro: AM_GLIB_DEFINE_LOCALEDIR
+ rm -rf autom4te.cache

I found that it needs libglib2.0-dev and other libraries which I am installing one by one. Moving it to cmake might make the process a bit easier or if not, at least share the build dependancy so we know what is needed.

The other part is, there is no ./autoclean while cmake has cmake clean which makes purifying the git clone far easier.

A slight different query, are you going to make a new release soonish as there have been some commits after the last release ?

have a copyright file mentioning all the original authors

If I understand correctly, and please correct me if I'm wrong -

l3afpad is nothing but a re-implementation of leafpad with gtk3+ functionality.

If that's the case, then it would make sense to names of all the authors before l3afpad as well.

See https://salsa.debian.org/webext-team/tree-style-tab/blob/master/debian/copyright as an example of inspiration

I will attach leafpad's latest copyright with you so you could also use that and add your names to it.
leafpad-copyright.txt and preserve it in authors.txt

You can always say that was leafpad and contributions you made to l3afpad with copyright files . Would make it easier if and when packaging happens.

file.c:223]: (error) Resource leak: fp

Source code is

if (fwrite(cstr, 1, wbytes, fp) != wbytes) {
    run_dialog_message(gtk_widget_get_toplevel(view),
        GTK_MESSAGE_ERROR, _("Can't write file"));
    return -1;
}

Suggest add missing call to fclose.

Negotiate a merger with leafpad?

This repository can be considered a continuation of the original leafpad, development of which stopped 13 (?) years ago. Except... there's an active repo for leafpad here on GitHub.

I wonder if Tarot Osuji would be willing to consider a joining of the two projects/repos, so that "old GTK+ leafpad" would live on in one branch, and "newer leafpad", the l3afpad of right now, would live in the master and other branches.

Line Number Column Width

Is there a particular reason why the line number column is so wide? A narrow column would look a little nicer and not waste as much space. Changing gint width, col = 4; to gint width, col = 2; in linenum.c accomplishes this.

Feature request: Add "Leafpad" as GenericName in .desktop

Description

By adding "Leafpad" as a generic name we can make it an easier to find replacement for Leafpad in app launchers.

I can open a PR if I get a couple of 👍 .

Note: This is unwanted in case the project is merged with Leafpad (#35)

Screenshot with rofi

image

Patch

--- /usr/share/applications/l3afpad.desktop	2022-04-25 00:22:01.000000000 -0300
+++ /home/diovani/.local/share/applications/l3afpad.desktop	2022-10-13 14:14:59.648439051 -0300
@@ -79,6 +79,7 @@
 Comment[vi]=Một trình soạn thảo văn bản đơn giản
 Comment[zh_CN]=简易文字编辑器
 Comment[zh_TW]=簡易文字編輯器
+GenericName=Leafpad
 Exec=l3afpad %f
 Icon=l3afpad
 Terminal=false

modernize your automake in the ~/.autogen.sh

see from my autogen.sh

+ automake --add-missing --copy --include-deps
configure.ac:2: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:2: https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation

Can you fix it ?

Bug: Font size becomes smaller by the factor of about 0.7 without any reason

Each l3afpad start as well as each font selection dialog closure cause the current font size being scaled down by approximately the factor of 0.7 . The stopping point is font size of 1.x, which can't become smaller.

I have absolutely no idea where does this come from, but because it's a persistent issue over the last few months surviving huge GTK and other GUI and related libraries significant updates, I'm submitting it as a serious issue.

./configure: line 4585: syntax error: unexpected word (expecting ")")

Running ./autogen.sh prints:

+ aclocal
+ autoheader --force
+ AUTOMAKE=automake intltoolize -c --automake --force
./autogen.sh: line 29: intltoolize: not found
+ automake --add-missing --copy --include-deps
configure.ac:2: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:2: https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.ac:5: installing './compile'
configure.ac:2: installing './install-sh'
configure.ac:2: installing './missing'
Makefile.am: installing './INSTALL'
src/Makefile.am: installing './depcomp'
+ autoconf
configure.ac:2: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:1262: AM_INIT_AUTOMAKE is expanded from...
configure.ac:2: the top level
configure.ac:3: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
configure.ac:3: You should use the 'AC_CONFIG_HEADERS' macro instead.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:1614: AM_CONFIG_HEADER is expanded from...
configure.ac:3: the top level
configure.ac:16: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:16: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:16: the top level
configure.ac:22: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:22: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:22: the top level
configure.ac:28: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:28: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:28: the top level
configure.ac:34: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:34: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:34: the top level
configure.ac:40: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:40: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
configure.ac:40: the top level
configure.ac:47: warning: The macro `GLIB_GNU_GETTEXT' is obsolete.
configure.ac:47: You should run autoupdate.
aclocal.m4:388: GLIB_GNU_GETTEXT is expanded from...
aclocal.m4:465: GLIB_DEFINE_LOCALEDIR is expanded from...
aclocal.m4:488: AM_GLIB_DEFINE_LOCALEDIR is expanded from...
configure.ac:47: the top level
configure.ac:47: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:47: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
aclocal.m4:73: GLIB_LC_MESSAGES is expanded from...
aclocal.m4:388: GLIB_GNU_GETTEXT is expanded from...
aclocal.m4:465: GLIB_DEFINE_LOCALEDIR is expanded from...
aclocal.m4:488: AM_GLIB_DEFINE_LOCALEDIR is expanded from...
configure.ac:47: the top level
configure.ac:47: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:47: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/headers.m4:89: _AC_CHECK_HEADER_COMPILE is expanded from...
./lib/autoconf/headers.m4:56: AC_CHECK_HEADER is expanded from...
aclocal.m4:172: GLIB_WITH_NLS is expanded from...
aclocal.m4:388: GLIB_GNU_GETTEXT is expanded from...
aclocal.m4:465: GLIB_DEFINE_LOCALEDIR is expanded from...
aclocal.m4:488: AM_GLIB_DEFINE_LOCALEDIR is expanded from...
configure.ac:47: the top level
configure.ac:47: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:47: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/headers.m4:89: _AC_CHECK_HEADER_COMPILE is expanded from...
./lib/autoconf/headers.m4:56: AC_CHECK_HEADER is expanded from...
aclocal.m4:172: GLIB_WITH_NLS is expanded from...
aclocal.m4:388: GLIB_GNU_GETTEXT is expanded from...
aclocal.m4:465: GLIB_DEFINE_LOCALEDIR is expanded from...
aclocal.m4:488: AM_GLIB_DEFINE_LOCALEDIR is expanded from...
configure.ac:47: the top level
configure.ac:47: warning: The macro `AC_OUTPUT_COMMANDS' is obsolete.
configure.ac:47: You should run autoupdate.
./lib/autoconf/status.m4:1025: AC_OUTPUT_COMMANDS is expanded from...
aclocal.m4:172: GLIB_WITH_NLS is expanded from...
aclocal.m4:388: GLIB_GNU_GETTEXT is expanded from...
aclocal.m4:465: GLIB_DEFINE_LOCALEDIR is expanded from...
aclocal.m4:488: AM_GLIB_DEFINE_LOCALEDIR is expanded from...
configure.ac:47: the top level
configure.ac:49: warning: AC_OUTPUT should be used without arguments.
configure.ac:49: You should run autoupdate.
configure.ac:6: error: possibly undefined macro: AC_PROG_INTLTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
+ rm -rf autom4te.cache

Running ./configure outputs:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
./configure: line 4585: syntax error: unexpected word (expecting ")")

I see that configure is an autogenerated file. Is this an issue with one of the dependencies being used here (maybe Autoconf?)?

Internal padding for text

Hi there,

Thanks for your contribution to l3afpad!

I was precisely looking for a very simple and lightweight text editor
that does nothing more than allow me to modify text.

I have a small feature suggestion and would love to hear your opinion on
this.

From my point of view, a slight internal text padding would make
reading the lines more convenient. Attached you see how the current
state is being displayed without padding.

Could you think of adding an internal padding to the options menu,
allowing the user to toggle between padding being enabled/disabled?

Thanks!
leafpad-padding

COPYING contains wrong license

Since the fork COPYING has been changed from GPL2 to LGPL2.1.

The source files still contain the GPL2 headers.

COPYING should probably contain GPL2 license text (I'm assuming copyright holders haven't relicensed and that this was just a mistake).

Line numbers are invisible

Line numbers are invisible with the default Adwaita theme, but visible with the HighContrast theme. See the screenshot:
invisible-line-numbers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.