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

gio: Add subclassing support to AppLaunchContext & FileMonitor #1012

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bilelmoussaoui
Copy link
Member

No description provided.

@bilelmoussaoui
Copy link
Member Author

bilelmoussaoui commented Feb 17, 2023

Don't merge yet, I will be adding other stuff to this PR like GIcon/GLoadableIcon.

self.parent_to_tokens()
}

fn from_tokens(tokens: &[String], version: i32) -> Result<Icon, Error> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and above is a StrV if you want to avoid all the copying

use crate::{subclass::prelude::*, File, FileMonitor, FileMonitorEvent};
use glib::{prelude::*, translate::*};

pub trait FileMonitorImpl: ObjectImpl {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually useful?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today it is not for sure. My intention is to cover up whatever APIs we can manually to have a better understanding of what is needed for an automatically generated of the subclassing code in the future

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, is this actually intended to be subclasses? The API exposed here looks quite incomplete for implementing a new file monitor

let instance = &*(ptr as *mut T::Instance);
let imp = instance.imp();

imp.launch_failed(&GString::from_glib_borrow(startup_id))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should maybe be a &GStr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants