Skip to content

Shoes 3.3.7

Cecil edited this page Jun 3, 2018 · 1 revision

Shoes 3.3.7 adds deeper integration to the platforms, not always cross platform.

Features:

  • Menus
  • Multiple Monitor Support
  • Gtk Theme support for Linux and Windows
  • New Start up and Application logic
  • Fix shoes bugs with Gtk 3.20+
  • Possible Dbus event handling (Linux only)

Once this is done, then it might be easy to use Gtk3 on OSX but that is not a goal at this point. What is a major goal is to greatly improve how Shoes uses Gtk3 and the features in Gtk3.

We're going to use GtkApplication which can create a Multi-Document-Interface (MDI) applications. In truth, Shoes on OSX already is MDI. In MDI a single running app handles all documents of a certain type and a launch request passes an internal message to the app to open a new window with the new doc in it. This is a major change for how Shoes Linux/Windows works. Of course we also want Shoes on Linux/Windows to work like it always did.

Settings

Some information is needed very early in the startup, before Shoes and Gtk3/cocoa is fully initialized. We read an optional shoes.yaml file at Shoes startup and set some C level globals. Note, if you are building Apps and want to hide the "Shoes-ness", you're going to like that file and these new features. What's in shoes.yaml?

  • App_Name:
  • Theme:
  • Have_Memus: <t/f>
  • MDI: <t/f>
  • Rdomain:
  • Dbus:

App_Name changes from "Shoes" to your string just anywhere the name is displayed to the user. It nullifies some confusing name changing methods you had to call in your scripts - cough, app.set_window_title, cough

The theme name should match a theme you have created, modified and installed in your copy of Shoes. Or it might be a theme installed in the system, different from the normal theme you use. It too soon to say how well this will work - Downloaded themes can throw out a lot of warnings and error message to the console.

MDI just tells Shoes and the GtkApplication code to do the mdi thing - One copy of Shoes and send dbus messages to trigger Gtks signals like "open". In non MDI mode (the old way) Shoes registers a dbus address for com.rbshoes.shoes-.

Dbus is the Linux Dbus name for this Shoes process. It's built from the Rdomain value in shoes.yaml Other applications or the desktop can manipulate that process via DBus - assuming the Shoes app knows about the signals sent - that would be code you write in Shoes and obviously only useful for Linux.

Use_Menus sets the default for where shoes apps (windows) launch with space for a menubar and a default set of menus. Ignored on OSX because there is no other choice.

Menus

Menus are covered in another wiki article.

Themes

Gtk3 themes are going to take time to figure out. Conceptually easy. Details are not nearly so simple. Does not apply to OSX.

Monitors

There will be simple support for multiple monitor systems. In Shoes, monitor numbers start with 0. There is always a default monitor (0 for a single monitor systems). There is a default monitor (almost always 0 -it's an OS thing). You can get the number of monitors and the default monitor (number) and the monitor the Shoes.app is currently on.

If the given monitor number doesn't exist, 0 will be used.

st = Shoes.settings
st.monitor_count -> returns the number of monitors
st.monitor_default -> returns the default number
st.monitor_geometry[<int>] - returns array [x, y, width, heigth] for given monitor <int>

app.monitor -> returns the monitor number the Shoes.app is on. 
app.monitor = <number> - moves the app (window) to monitor <num>
Shoes.app { :monitor => <num>} do ... end
window monitor: <num> do ... end (same as Shoes.app)

Dialogs may not adhere to being moved or being set to a monitor.

Clone this wiki locally
You can’t perform that action at this time.