Skip to content

Commit

Permalink
Merge pull request #855 from Gliese852/gtk-add-model-segfault
Browse files Browse the repository at this point in the history
Fix segfault when adding a model via howdy-gtk
  • Loading branch information
boltgolt authored May 4, 2024
2 parents 344eb34 + 05b8cb5 commit aa75c76
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions howdy-gtk/src/tab_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from i18n import _
from gi.repository import Gtk as gtk
from gi.repository import GObject as gobject


def on_user_change(self, select):
Expand Down Expand Up @@ -73,13 +74,13 @@ def on_model_add(self, button):
dialog = gtk.MessageDialog(parent=self, flags=gtk.DialogFlags.MODAL, buttons=gtk.ButtonsType.NONE)
dialog.set_title(_("Creating Model"))
dialog.props.text = _("Please look directly into the camera")
dialog.get_child().connect("map", lambda w: execute_add(self, dialog, entered_name, self.active_user))
dialog.show_all()

# Wait a bit to allow the user to read the dialog
gobject.timeout_add(600, lambda: execute_add(self, dialog, entered_name))

def execute_add(box, dialog, entered_name, user):

time.sleep(1)
def execute_add(box, dialog, entered_name):

status, output = subprocess.getstatusoutput(["howdy add '" + entered_name + "' -y -U " + box.active_user])

Expand Down

0 comments on commit aa75c76

Please sign in to comment.