Skip to content

Commit c753de3

Browse files
committed
eh
1 parent c2932d4 commit c753de3

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

src/application.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ impl ShutterApplication {
105105
}
106106

107107
fn show_about(&self) {
108-
let window = self.active_window().unwrap();
109108
let about = adw::AboutDialog::builder()
110109
.application_name("Shutter")
111110
// TODO remove extra icons
@@ -130,6 +129,6 @@ impl ShutterApplication {
130129
))
131130
.build();
132131

133-
about.present(Some(&window));
132+
about.present(self.active_window().as_ref());
134133
}
135134
}

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ fn main() -> glib::ExitCode {
4646
// Create a new GtkApplication. The application manages our main loop,
4747
// application windows, integration with the window manager/compositor, and
4848
// desktop features such as file opening and single-instance applications.
49+
// TODO: remove the Rust suffix. This is for D-Bus to avoid conflict with the perl shutter
4950
let app = ShutterApplication::new(
50-
"org.shutter-project.Shutter",
51+
"org.shutter-project.ShutterRust",
5152
&gio::ApplicationFlags::empty(),
5253
);
5354

src/shutter.gresource.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,18 @@
33
<gresource prefix="/org/shutter-project/Shutter">
44
<file compressed="true" preprocess="xml-stripblanks">window.ui</file>
55
<file compressed="true" preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
6-
<file compressed="true" preprocess="xml-stripblanks">gtk/menus.ui</file>
6+
<file compressed="true" >gtk/menus.ui</file>
7+
<!-- for about dialog -->
8+
<file compressed="true" alias="credits/art">../data/credits/art</file>
9+
<file compressed="true" alias="credits/dev">../data/credits/dev</file>
10+
<file compressed="true" alias="credits/copyright">../data/credits/copyright</file>
11+
</gresource>
12+
13+
<!-- a temporary hack to support the non-conflicting D-Bus name because Gtk uses the same id for both -->
14+
<gresource prefix="/org/shutter-project/ShutterRust">
15+
<file compressed="true" preprocess="xml-stripblanks">window.ui</file>
16+
<file compressed="true" preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
17+
<file compressed="true" >gtk/menus.ui</file>
718
<!-- for about dialog -->
819
<file compressed="true" alias="credits/art">../data/credits/art</file>
920
<file compressed="true" alias="credits/dev">../data/credits/dev</file>

0 commit comments

Comments
 (0)