Skip to content

Conversation

@Mike-Solar
Copy link

#15920

Maybe I need to use GApplication instead of gtk_main. As a new contributor, please review my code at a early time.

@Mike-Solar
Copy link
Author

The master branch failed with the error:

     1.9982 [dt_init] ERROR: can't init develop system, aborting.

so I can't test the code. Shall I open a issue?

@RayJW
Copy link

RayJW commented Oct 23, 2025

Perhaps you'd want to work with @dterrahe on his branch and check out #19448 to ensure that no duplicated work is being done in the long run :)

@TurboGit
Copy link
Member

We don't have issue with dt_init on master at the moment. Don't understand your comment.

Also please do not merge branches into your topic branch. If needed rebase.

@dterrahe
Copy link
Member

The master branch failed with the error

Do you mean the master branch or "the master branch with your code"?

Could you explain what the status of this PR is? There seems to be some obviously non-working code in there (gtk_window_present(GTK_WINDOW(darktable.gui));) and stuff has been duplicated without being cleaned up in the original location. So have you tested it and do you believe this is correct or are you asking help to get it working? Does this fit in a greater plan? Can you spend a few words explaining your approach?

Unfortunately a lot of the activity of porting code requires knowledge of gtk3 and gtk4 and an understanding of the darktable codebase. Simple partial conversions, though on the surface useful and needed, like avoiding direct access to GdkEvent fields, may later on need to be touched again, because we don't even have access to the actual events anymore (or shouldn't try to persist in an approach that upstream gtk finds suboptimal).

@Mike-Solar
Copy link
Author

Mike-Solar commented Oct 23, 2025

The master branch failed with the error

Do you mean the master branch or "the master branch with your code"?

Could you explain what the status of this PR is? There seems to be some obviously non-working code in there (gtk_window_present(GTK_WINDOW(darktable.gui));) and stuff has been duplicated without being cleaned up in the original location. So have you tested it and do you believe this is correct or are you asking help to get it working? Does this fit in a greater plan? Can you spend a few words explaining your approach?

Unfortunately a lot of the activity of porting code requires knowledge of gtk3 and gtk4 and an understanding of the darktable codebase. Simple partial conversions, though on the surface useful and needed, like avoiding direct access to GdkEvent fields, may later on need to be touched again, because we don't even have access to the actual events anymore (or shouldn't try to persist in an approach that upstream gtk finds suboptimal).

Sorry for confusion. Here are some explain:

  1. Both master branch and master branch with my code shows the error and crashed. That happens at about 1800 lines at darktable.c:
 // check whether we were able to load darkroom view. if we failed,
  // we'll crash everywhere later on.
  if(!darktable.develop)
  {
    dt_print(DT_DEBUG_ALWAYS, "[dt_init] ERROR: can't init develop system, aborting.");
    darktable_splash_screen_destroy();
    return 1;
  }
  1. The PR haven't been completed yet. All I have done was use GApplication to replace gtk_main in the main program. I followed DeepSeek's advice and submitted it early because I want my code be reviewed at a early stage. At the same time, I also want to avoid redundant work. If that's not usual, I do apologize. I've mentioned it as WIP.

As a new contributor, I am not particularly familiar with how the community operates. I apologize for any mistakes I may make.

@Mike-Solar
Copy link
Author

We don't have issue with dt_init on master at the moment. Don't understand your comment.

Also please do not merge branches into your topic branch. If needed rebase.

Sorry for confusion. Since the issue haven't appear at your device, maybe my environment have some problem? Both master branch and master branch with my change have the same issue.

@Mike-Solar
Copy link
Author

The master branch failed with the error

Do you mean the master branch or "the master branch with your code"?

Could you explain what the status of this PR is? There seems to be some obviously non-working code in there (gtk_window_present(GTK_WINDOW(darktable.gui));) and stuff has been duplicated without being cleaned up in the original location. So have you tested it and do you believe this is correct or are you asking help to get it working? Does this fit in a greater plan? Can you spend a few words explaining your approach?

Unfortunately a lot of the activity of porting code requires knowledge of gtk3 and gtk4 and an understanding of the darktable codebase. Simple partial conversions, though on the surface useful and needed, like avoiding direct access to GdkEvent fields, may later on need to be touched again, because we don't even have access to the actual events anymore (or shouldn't try to persist in an approach that upstream gtk finds suboptimal).

Alright, maybe I was a bit impatient. Tomorrow I will close this PR, then carefully review the codebase before submitting the code. I apologize for my misconduct.

@Mike-Solar Mike-Solar closed this Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants