After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 618889 - [PATCH] reset sys.argv after calling Gtk.init_check in the overrides
[PATCH] reset sys.argv after calling Gtk.init_check in the overrides
Status: RESOLVED FIXED
Product: pygi
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: 0.6
Assigned To: pygi-maint
pygi-maint
Depends on:
Blocks:
 
 
Reported: 2010-05-17 16:01 UTC by johnp
Modified: 2010-05-19 20:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] reset sys.argv to the return value of Gtk.init_check (401 bytes, patch)
2010-05-17 16:02 UTC, johnp
accepted-commit_now Details | Review

Description johnp 2010-05-17 16:01:31 UTC
If we don't reset sys.argv to the argv returned by Gtk.init_check, applications which check the command like error out when they encounter a switch which is meant to be consumed by the gtk init function.
Comment 1 johnp 2010-05-17 16:02:15 UTC
Created attachment 161235 [details] [review]
[PATCH] reset sys.argv to the return value of Gtk.init_check


* applications which check command line arguments will error out if it encounters a
  GTK command line switch such as --g-fatal-warnings.
* The Gtk.init* API reads these switches and returns a new argv with the GTK switches
  stripped out
* In C argv is modified in place but in Python we must set sys.argv to the new modified
  argument list
---
 gi/overrides/Gtk.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Comment 2 Tomeu Vizoso 2010-05-17 16:08:17 UTC
Review of attachment 161235 [details] [review]:

r+ if that's what the static bindings where doing.
Comment 3 johnp 2010-05-19 20:13:07 UTC
pushed