Commit Graph

236 Commits

Author SHA1 Message Date
Matthias Clasen
2ddbca7ba5 bloatpad: Add a close button to the accel dialog 2014-07-19 19:42:56 -04:00
Matthias Clasen
db189a892b Update examples for new open-menu icon 2014-07-15 21:31:13 -04:00
Matthias Clasen
46bc284165 Use view-content-menu-symbolic in example apps 2014-07-08 08:30:56 -04:00
Rico Tzschichholz
eec6deba90 build: Fix make dist 2014-07-08 10:13:39 +02:00
Matthias Clasen
6818388b32 Bloatpad: fix up icons
The references to png files were doubly broken: first, by the icon
theme changes, and more recently, by the move of bloatpad. Fix them
up.
2014-07-07 16:27:38 -04:00
Ryan Lortie
cc1af0f71c bloatpad: use Gtk's automated menu loading
We move our menus.ui file into Gtk's namespace so that it will get
picked up.  Accordingly, we no longer have to do any of the work for
ourselves...

https://bugzilla.gnome.org/show_bug.cgi?id=722092
2014-07-07 14:46:28 -04:00
Ryan Lortie
b40672f145 bloatpad: use resources
https://bugzilla.gnome.org/show_bug.cgi?id=722092
2014-07-07 13:37:38 -04:00
Ryan Lortie
4d8b2af13a bloatpad: move into private subdir
Move bloatpad to ./examples/bp/ so that we can start treating it as more of a
"normal" app instead of just jamming everything into a single .c file.

We don't use the name "bloatpad" for the directory in order not to
create 'git pull' pain with the probably-already-existing executable of
the same name.

https://bugzilla.gnome.org/show_bug.cgi?id=722092
2014-07-07 13:37:38 -04:00
Matthias Clasen
c3a9a20839 examples: Don't use gtk_application_add_accelerator
It has been deprecated.
2014-05-22 08:51:58 -04:00
Matthias Clasen
cdfcd5fc85 Bloatpad: port to new accel api 2014-05-06 10:58:52 -04:00
Matthias Clasen
c923ea9bc4 example: Use popover for gears menu 2014-04-17 22:55:40 -04:00
Matthias Clasen
763250e04d example: Make gears button square
Another application of image-button.
2014-04-17 22:55:40 -04:00
Matthias Clasen
35f4243315 example: Make search button square
The image-button style class takes care of it.
2014-04-17 22:55:39 -04:00
Matthias Clasen
fcba75c2ba example: Modernize the prefs dialog
We should show the current best practice for this kind of
dialog, and use a headerbar with a window close button.
2014-04-17 22:55:39 -04:00
Matthias Clasen
b718b95aab example: Port to gtk_application_set_accels_for_action
Instead of hardcoding an accelerator in the ui file, use
gtk_application_set_accels_for_action.
2014-04-17 22:55:38 -04:00
Matthias Clasen
25ce82d5b3 example: Fix indentation 2014-04-17 22:55:37 -04:00
Matthias Clasen
c502ff73fe example: Fix up margins
This makes the code match what we show in the screenshots. This
broke when headerbars were changed to allow titles to extend into
the margin.
2014-04-17 22:55:37 -04:00
Matthias Clasen
f521dddaed example: Don't set a nonexisting property
The GtkHeaderBar::show-fallback-app-menu property does not exist,
and isn't needed anyway.
2014-04-17 22:55:36 -04:00
Ryan Lortie
2bcb4fc354 bloatpad: test hidden-when=''
Cook up some silly cases to test out the hidden-when='' attribute.

 - make sure hidden-when='action-missing' shows/hides items based on
   actions being created and destroyed

 - make sure hidden-when='action-disabled' shows/hides items based on
   actions being enabled and disabled

 - make sure hidden-when='action-missing' doesn't hide items when the
   action is merely disabled

https://bugzilla.gnome.org/show_bug.cgi?id=688421
2014-01-08 14:21:19 -05:00
William Hua
6b865d5312 Add icon menu to bloatpad.
https://bugzilla.gnome.org/show_bug.cgi?id=710351
2014-01-08 02:20:21 -05:00
Giovanni Campagna
f7c5dfdeef bloatpad: fix the action associated with the notification
Notifications can only be associated with application actions,
but clear is a window action. Introduce a "clear-all" action
that forwards to clear on all windows.

https://bugzilla.gnome.org/show_bug.cgi?id=721633
2014-01-06 16:36:45 +01:00
Ryan Lortie
2841c0ec54 bloatpad: test inhibit
Add an inhibit for logout when there is context in the text buffer.
2013-12-16 13:51:22 -05:00
Jasper St. Pierre
d9f92424b2 headerbar: Support all kinds of CSD decorations
Move the gtkwindow.c CSD code into GtkHeaderBar, and make it triggerable
by the show-close-button property, and remove shows-fallback-app-menu.

https://bugzilla.gnome.org/show_bug.cgi?id=720233
2013-12-12 19:30:59 -05:00
Matthias Clasen
055e4722f5 Add the new exampleapp to the docs 2013-11-16 17:04:30 -05:00
Matthias Clasen
7265d9d9ad Add another example application
This new step sets the headerbar as titlebar, and enables
fallback for the app menu.
2013-11-16 16:09:56 -05:00
Matthias Clasen
cf627b2878 Test headerbar app menu fallback
Make the sunny example useful by giving it a header bar
with app menu fallback. To test this under gnome-shell,
set APP_MENU_FALLBACK=1 in the environment.
2013-11-16 01:55:01 -05:00
Matthias Clasen
111120297c Add some (silly) GNotification example
Bloatpad can now notify you.
2013-10-21 17:23:44 -04:00
Ryan Lortie
db7115d841 bloatpad: test dynamic accels
...this stuff will be in the action description soon.
2013-10-15 09:24:12 -04:00
Xavier Claessens
8e9dd8c3aa Add example app for GtkSearchBar
https://bugzilla.gnome.org/show_bug.cgi?id=709745
2013-10-10 14:48:12 -04:00
Ryan Lortie
587012a2f9 action-namespace example: use non-deprecated function
g_simple_action_group_add_entries() is deprecated since we added the GActionMap
interface, so use its equivalent function instead.
2013-10-01 09:36:23 -04:00
Jasper St. Pierre
2d27e7e978 examples: Use git.mk 2013-08-07 06:18:07 -04:00
Matthias Clasen
c9c8272028 Make examples use search-changed signal
This updates the examples for the new GtkSearchEntry api.
2013-08-02 00:56:00 +02:00
Matthias Clasen
c9ce98714d example: Use declared callbacks where possible
Replace manual signal connections with signal handlers
declared in the ui file, where possible.
2013-07-27 21:00:33 -04:00
Matthias Clasen
cda60c3c40 Another round of template binding api changes
We rename the gtk_widget_class_bind_template_child{_internal}
macros by appending a _private to their name. Otherwise, it
would be too magic to pass the 'public' names as arguments,
but affect a member of the Private struct. At the same time,

Add two new macros with the old names,
gtk_widget_class_bind_template_child{_internal} that operate
on members of the instance struct.
2013-07-26 16:29:12 -04:00
Emmanuele Bassi
89ae3524a3 Rename the widget template API
The macros and functions are inconsistently named, and are not tied to
the "template" concept - to the point that it seems plausible to use
them without setting the template.

The new naming scheme is as follows:

  gtk_widget_class_bind_template_child_full
  gtk_widget_class_bind_template_callback_full

With the convenience macros:

  gtk_widget_class_bind_template_child
  gtk_widget_class_bind_template_child_internal
  gtk_widget_class_bind_template_callback

https://bugzilla.gnome.org/show_bug.cgi?id=700898
https://bugzilla.gnome.org/show_bug.cgi?id=700896
2013-07-26 13:52:15 -04:00
Alexander Larsson
a8e84545d1 widget: Use a real offset in gtk_widget_class_automate_child
Using an offset from the struct means you can have children in
both the public and private (via G_PRIVATE_OFFSET) parts of the
instance. It also matches the new private macros nicer.

https://bugzilla.gnome.org/show_bug.cgi?id=702563

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2013-07-26 08:41:09 -04:00
Matthias Clasen
15453349ea Getting started: Add an example for property actions
This example demonstrates property actions and object binding.
2013-07-24 07:31:05 -04:00
Matthias Clasen
9029914815 Getting started: Add icon and desktop file
Setting up the icon and desktop file is a pretty central part
of making an application work, so we should do it for our example.

The fact that the examples are uninstalled makes this a little
more complicated.
2013-07-24 07:31:05 -04:00
Matthias Clasen
4af588e477 Getting started: Fix a corner case
When using 'Words' without a loaded document, the example
would crash. Thats not nice, so avoid it.
2013-07-24 07:31:05 -04:00
Matthias Clasen
7fe3455c9a Getting started: Drop ugly signal handler cleanup
I disconnected signals in dispose() to avoid a visible-tab
change notification during destruction, but this is clunky.

Instead, make the notify::visible-tab signal handler bail out
early when called during destruction.
2013-07-24 07:31:05 -04:00
Matthias Clasen
b73027aa04 Getting started: Use <choices> in the schema
The use of a manually-specified enum is a little unusual.
This is really meant to be done by <choices>.
2013-07-24 07:31:05 -04:00
Matthias Clasen
99203f09f2 Getting started: Coding style updates
Make the new examples use GTK+ coding style.
2013-07-24 07:31:05 -04:00
Stefano Facchini
33f9a1263c Remove a generated Makefile in new example app 2013-07-21 16:52:36 +02:00
Matthias Clasen
8087bb7a22 Add a new example app
Add a new example to the getting started part of the docs. The focus
of this example is on 'new stuff': GtkApplication, templates, settings,
gmenu, gaction, GtkStack, GtkHeaderBar, GtkSearchBar, GtkRevealer,
GtkListBox, GtkMenuButton, etc.

It is being developed in several steps. Each step is put in a separate
directory below examples/: application1, ..., application8. This is a
little repetitive, but lets us use the code of all examples in the
documentation.
2013-07-20 23:04:47 -04:00
William Jon McCann
8e3f8d8720 docs: update getting started screenshots 2013-07-17 09:59:12 -04:00
William Jon McCann
75a9b91161 Don't use stock APIs in the bloatpad example 2013-06-24 14:50:01 -04:00
Cosimo Cecchi
de6eca952a bloatpad: add a test for GApplication's busy state
https://bugzilla.gnome.org/show_bug.cgi?id=672018
2013-04-04 13:17:12 -04:00
Jasper St. Pierre
cca05d1dc8 Add git.mk to more places 2013-01-24 17:47:34 -05:00
Matthias Clasen
9ebeb4e68a Bump GLib dependency to 2.35
And drop deprecated g_type_init() calls.
2012-11-04 13:01:38 -05:00
Ryan Lortie
85700627aa gtkapplication: fix some crashing "leak fixes"
https://bugzilla.gnome.org/show_bug.cgi?id=684258
2012-09-20 14:22:52 -04:00