Skip to content

Commit

Permalink
fixing some app store issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharles525 committed Jul 16, 2023
1 parent 86b8168 commit 6b4a6f5
Show file tree
Hide file tree
Showing 476 changed files with 5,729 additions and 39 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
public class Tempo : Gtk.Application {

public Tempo () {

Object (
application_id: "com.github.dcharles525.tempo",
flags: ApplicationFlags.FLAGS_NONE
);

}

protected override void activate () {

GLib.Settings settings = new GLib.Settings (
"com.github.dcharles525.tempo"
);
Gtk.CssProvider cssProvider = new Gtk.CssProvider ();

Gtk.Settings.get_default ().set (
"gtk-application-prefer-dark-theme",
true
);

try {

cssProvider.load_from_resource ("/com/github/dcharles525/Tempo/stylesheet");
Gtk.StyleContext.add_provider_for_screen (
Gdk.Screen.get_default (),
cssProvider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
);

} catch (Error e) {

error ("Cannot load CSS stylesheet: %s", e.message);

}

Gtk.HeaderBar headerbar = new Gtk.HeaderBar () {
title = "Tempo"
};

var headerContext = headerbar.get_style_context ();
headerContext.add_class (Gtk.STYLE_CLASS_FLAT);

Gtk.ApplicationWindow mainWindow = new Gtk.ApplicationWindow (this) {
default_height = 200,
default_width = 200,
title = _("Tempo"),
resizable = false
};

TempText tempText = new TempText ();

mainWindow.set_titlebar (headerbar);
mainWindow.add (tempText.get_box ());
mainWindow.move (
settings.get_value ("x").get_int32 (),
settings.get_value ("y").get_int32 ()
);
mainWindow.show_all ();
mainWindow.set_keep_above (true);
mainWindow.configure_event.connect(() => {

int x, y;
mainWindow.get_position (out x, out y);
settings.set_value ("x", x);
settings.set_value ("y", y);
return false;

});

}

public static int main (string[] args) {

return new Tempo ().run (args);

}

}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
public class Tempo : Gtk.Application {

public Tempo () {

Object (
application_id: "com.github.dcharles525.tempo",
flags: ApplicationFlags.FLAGS_NONE
);

}

protected override void activate () {

GLib.Settings settings = new GLib.Settings (
"com.github.dcharles525.tempo"
);
Gtk.CssProvider cssProvider = new Gtk.CssProvider ();

Gtk.Settings.get_default ().set (
"gtk-application-prefer-dark-theme",
true
);

try {

cssProvider.load_from_resource ("/com/github/dcharles525/Tempo/style.css");
Gtk.StyleContext.add_provider_for_screen (
Gdk.Screen.get_default (),
cssProvider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
);

} catch (Error e) {

error ("Cannot load CSS stylesheet: %s", e.message);

}

Gtk.HeaderBar headerbar = new Gtk.HeaderBar () {
title = "Tempo"
};

var headerContext = headerbar.get_style_context ();
headerContext.add_class (Gtk.STYLE_CLASS_FLAT);

Gtk.ApplicationWindow mainWindow = new Gtk.ApplicationWindow (this) {
default_height = 200,
default_width = 200,
title = _("Tempo"),
resizable = false
};

TempText tempText = new TempText ();

mainWindow.set_titlebar (headerbar);
mainWindow.add (tempText.get_box ());
mainWindow.move (
settings.get_value ("x").get_int32 (),
settings.get_value ("y").get_int32 ()
);
mainWindow.show_all ();
mainWindow.set_keep_above (true);
mainWindow.configure_event.connect(() => {

int x, y;
mainWindow.get_position (out x, out y);
settings.set_value ("x", x);
settings.set_value ("y", y);
return false;

});

}

public static int main (string[] args) {

return new Tempo ().run (args);

}

}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 6b4a6f5

Please sign in to comment.