[gedit] main: fix program name in `gedit --help` output



commit f5fe710d30572a0a2c44e77f600ed15c2e87b137
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon Nov 25 09:40:37 2019 +0100

    main: fix program name in `gedit --help` output
    
    The output was:
    ```
    $ gedit --help
    Usage:
      org.gnome.gedit [OPTION…] [FILE…] [+LINE[:COLUMN]]
    [...]
    ```
    
    There was a comment that links to a blog post. After reading the blog
    post, I don't think gedit needs it, because everything has the
    'org.gnome.gedit' ID/basename: the *.desktop file, the icon, the
    GApplication ID.
    
    If calling g_set_prgname() is really needed, then it needs to be done at
    a different place, to not break `gedit --help` for normal usage, and not
    break all the calls to g_get_prgname().

 gedit/gedit.c | 3 ---
 1 file changed, 3 deletions(-)
---
diff --git a/gedit/gedit.c b/gedit/gedit.c
index 6850422e0..b3e77f677 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -140,9 +140,6 @@ main (int argc, char *argv[])
        setup_i18n ();
        tepl_init ();
 
-       /* https://honk.sigxcpu.org/con/GTK__and_the_application_id.html */
-       g_set_prgname ("org.gnome.gedit");
-
        app = g_object_new (type,
                            "application-id", "org.gnome.gedit",
                            "flags", G_APPLICATION_HANDLES_COMMAND_LINE | G_APPLICATION_HANDLES_OPEN,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]