Пример #1
0
GbKeybindings *
gb_keybindings_new (GtkApplication *application,
                    const gchar    *mode)
{
  g_return_val_if_fail (GTK_IS_APPLICATION (application), NULL);

  return g_object_new (GB_TYPE_KEYBINDINGS,
                       "application", application,
                       "mode", mode,
                       NULL);
}
Пример #2
0
static void
gb_keybindings_set_application (GbKeybindings  *self,
                                GtkApplication *application)
{
  g_assert (GB_IS_KEYBINDINGS (self));
  g_assert (!application || GTK_IS_APPLICATION (application));

  if (application != self->application)
    {
      if (self->application)
        {
          /* remove keybindings */
          g_clear_object (&self->application);
        }

      if (application)
        {
          /* connect keybindings */
          self->application = g_object_ref (application);
        }
    }
}
Пример #3
0
static void __lambda9_ (GApplication* app) {
	GApplication* _tmp0_;
	g_return_if_fail (app != NULL);
	_tmp0_ = app;
	preferences_app_activated (GTK_IS_APPLICATION (_tmp0_) ? ((GtkApplication*) _tmp0_) : NULL);
}