Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault when adding a model via howdy-gtk #855

Merged
merged 1 commit into from
May 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -71,13 72,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
Loading