[gedit/zbrown/deteplification-src: 46/633] main: fix program name in `gedit --help` output




commit 964e7afa93a83286a0285848143ce5ff6e406f80
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 e6add9803..878532c01 100644
--- a/gedit/gedit.c
+++ b/gedit/gedit.c
@@ -139,9 +139,6 @@ main (int argc, char *argv[])
 
        setup_i18n ();
 
-       /* 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]