Commit Graph

377 Commits

Author SHA1 Message Date
Emmanuele Bassi
391d1a04ec Drop Autotools build
We are officially switching to Meson as the default build system for
GTK+.
2017-08-14 22:23:09 +01:00
Carlos Garnacho
a72404dd5a gtk: Mass delete all GtkWidget event mask API
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.

Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
2017-05-25 16:25:58 +02:00
Emmanuele Bassi
17518ef89b build: Improve consistency of the "coding" style
We're mixing a lot of styles in the Meson build files. This is an
attempt at making everything slightly more consistent in terms of
whitespace and indentation.
2017-05-03 15:10:57 +01:00
Tim-Philipp Müller
3ac88fa6b6 meson: examples: update
Mostly style changes. Don't create resource source files
with spaces in them, that's tempting our luck.
2017-05-03 15:10:53 +01:00
Timm Bäder
8ae847e4fc Build examples 2017-05-03 15:10:52 +01:00
Timm Bäder
a9fdf49ed4 examples/drawing: Don't call gtk_main_quit
This is a GtkApplication so it will do the right thing when closing the
window.
2017-05-03 14:53:34 +01:00
Timm Bäder
c92b7d4224 box: Remove fill child property
GtkWidget:halign and GtkWidget:valign are sufficient
2017-04-25 20:30:37 +02:00
Timm Bäder
5729ea7744 box: Remove expand child property
GtkWidget already has hexpand/vexpand properties.
2017-04-25 20:30:37 +02:00
Timm Bäder
ea897c6df4 Remove gtk_widget_show_all 2017-01-20 21:37:04 +01:00
Matthias Clasen
2c7e567f05 Update callers
Adapt all our tests and examples to the new initialization api.
2017-01-19 13:50:17 -05:00
Alexander Larsson
723b588b5d Make gdk.la and gsk.la a noninst helper library
This merged gtk, gdk and gsk into one library, making it possible to
have internal private APIs between gtk them, as well as producing more
efficient code.

https://bugzilla.gnome.org/show_bug.cgi?id=773100
2016-10-26 16:34:15 +02:00
Benjamin Otte
dbeeaf7de6 cssprovider: Remove GError out argument from load functions
People should use the GtkCssProvider::parsing-error signal instead.
2016-10-17 16:52:05 +02:00
Benjamin Otte
4df6ddad54 API: container: Remove gtk_container_set_border_width() 2016-10-16 18:18:58 +02:00
Timm Bäder
7377b7e5c2 plugman: Stop using gtk_override_color 2016-10-16 18:17:21 +02:00
Timm Bäder
f45dadadd0 box: Remove 'padding' child property 2016-10-16 18:17:21 +02:00
Matthias Clasen
d053d5c58f Rename Makefile references from 3.0 to 4.0
This is almost certainly incomplete.
Needs careful scrutiny
2016-10-07 10:34:50 -04:00
Piotr Drąg
4a4ef04020 bloatpad: replace single quotes with double quotes in menus.ui
Double quotes are more friendly to some l10n tools, and this sets
a good example for application authors to follow.
2016-09-24 18:17:34 +02:00
Mohammed Sadiq
22ae9d0884 examples: use G_DECLARE_FINAL_TYPE in applications
G_DECLARE_FINAL_TYPE was introduced in glib 2.44.
We shall use that now so that lots of boilerplate code can
be reduced.

https://bugzilla.gnome.org/show_bug.cgi?id=770278
2016-09-10 09:01:08 -04:00
Matthias Clasen
22b6df025e Fix example Makefiles
Put OBJS before LIBS on the commandline to make things
work better.

https://bugzilla.gnome.org/show_bug.cgi?id=768142
2016-07-03 13:54:11 -04:00
Matthias Clasen
4aa257b663 bloatpad: Make shortcuts window update
This tests the just added functionality to make shortcuts
track changes in their actions accelerators.
2016-04-17 13:42:14 -04:00
Matthias Clasen
268243834a Add a help overlay to bloatpad
This will let us explore the (non-)interaction between
help overlays and editing shortcuts.
2016-04-17 13:42:14 -04:00
Matthias Clasen
492ea59698 examples: Strip newlines from g_warning and g_error
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Matthias Clasen
213f74fe82 tutorial: Drop excessive margin from headerbar
It is no longer necessary to add extra margins around the
center child in a headerbar.
2016-02-27 23:28:17 -05:00
Emmanuele Bassi
9aae351487 examples: Clean up the standalone Makefiles
Do not hardcode GCC as the compiler; use $(shell) expansion instead of
backticks; split the built source into its own variable.
2015-05-26 18:01:39 +01:00
Bastian Ilsø
52f5a78c6d Update hello-world.c to GtkApplication, document 2015-03-09 12:17:31 +01:00
Bastian Ilsø
ec07987a90 Getting-started: port drawing.c to GtkApplication 2015-02-23 16:00:36 +01:00
Bastian Ilsø
0080224fdb Updated grid-packing to GtkApplication. 2015-02-15 22:57:57 +01:00
Matthias Clasen
4a531ec6ab Plug another memory leak in plugman 2015-02-01 11:07:12 -05:00
Felix Riemann
f780370499 plugman: Fix leaking attribute string
https://bugzilla.gnome.org/show_bug.cgi?id=743770
2015-02-01 11:06:21 -05:00
Bastian Ilsø
e9ddff907f Get started: port example-0.c to GtkApplication
https://bugzilla.gnome.org/show_bug.cgi?id=743638
2015-01-28 16:31:12 -05:00
Ryan Lortie
6b26664c41 GtkMenuTracker: add hidden-when='macos-menubar'
Provide a mechanism for hiding the "Quit", "About" and "Preferences"
menu items from the normal places in a traditional menubar layout (in
the File and Edit menus) when the menu is being rendered in the Mac OS
menubar.

These items can already be found in the application menu.

With this feature, applications can now define a single menu to use in
all 'traditional' scenarios.

Use this new attribute in Bloatpad.

https://bugzilla.gnome.org/show_bug.cgi?id=741610
2014-12-22 06:22:26 -05:00
Matthias Clasen
eed1831caf Trivial off-by-one fix
We have a tenth example.
2014-12-08 17:30:35 -05:00
Emmanuele Bassi
c55c18c23e examples: Fix clean rule in stand alone Makefiles
Remove all the built files, including the exampleapp binary.
2014-12-06 13:30:24 +00:00
Emmanuele Bassi
f718bc9bc9 examples: Add stand alone Makefile for application10
Missed out on the last application examples.
2014-12-06 13:25:01 +00:00
Matthias Clasen
5438e53f5c Use resources for icons
This fixes icons after the recent directory reshuffling, and
is just the right thing to do, since these icons are in resources
anyway.
2014-12-02 21:00:24 -05:00
Matthias Clasen
6f10ed2711 Improve action-namespace example
This needs to have some space around the button for the popover
to show up.
2014-12-02 21:00:24 -05:00
Emmanuele Bassi
92f6771564 docs: Add a README to the examples directory
https://bugzilla.gnome.org/show_bug.cgi?id=741041
2014-12-02 19:23:50 +00:00
Emmanuele Bassi
3b2cf140a2 Add standalone Makefile for the examples
We want to allow people to build the examples easily, without
necessarily requiring them to build the whole of GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=741041
2014-12-02 19:23:50 +00:00
Matthias Clasen
f85093a136 Beautify example Makefiles a bit 2014-11-29 00:26:52 -05:00
Matthias Clasen
380ca9bc56 Make include order consistent in example applications
Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=740537
2014-11-28 23:57:16 -05:00
Benjamin Otte
5018c7f7cb examples: Add deprecation guards
Apparently it's not possible in GtkTextView to say "this style should
apply to all text, including newly inserted text. Or I'm just too stupid
to use its API.

So instead, keep using override_color().
2014-10-12 05:51:11 +02:00
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
Ryan Lortie
338b5f6c2d GtkModelMenuItem: add a submenu action attribute
Add support for a stateful action associated with a submenu.  The action
state is set to TRUE when the menu is shown and FALSE when it is
unshown.

This is useful to avoid unnecessary processing for menus that have
frequently-changing content.

A possible future feature is to add support for asynchronously filling
the initial state of the menu by waiting until the action actually emits
its state-change signal to TRUE before showing the menu.

A silly example has been added to Bloatpad to demonstrate the new
feature.

https://bugzilla.gnome.org/show_bug.cgi?id=682630
2012-09-17 12:31:21 -04:00
Lars Uebernickel
9480e21506 Add example for "action-namespace" attribute 2012-09-17 12:31:21 -04:00
Matthias Clasen
ae81246512 Add an example for handling app menu fallback
The example shows how to use a menu button instead of the default
menubar when the shell doesn't show the app menu.
2012-07-22 21:01:15 -04:00
Micah Carrick
0ddb50235f Fix typo replacing action "Parse" with "Paste"
The builder XML description has an action for "win.parse" but the
application is looking for "win.paste". Rename the label to
"_Paste" and the action to "win.paste" in the window action XML.

https://bugzilla.gnome.org/show_bug.cgi?id=678829
2012-07-11 07:26:19 -04:00
Piotr Drąg
601e10b0c1 Mark strings in embedded XML code in plugman.c as translatable
Just like bloadpad's. Also add plugman.c to POTFILES.skip
to *not* actually translate it.
2012-05-18 18:25:03 +02:00
Florian Müllner
bb16e54c7c plugman: Update GtkBuilder markup
The markup for menus was changed in commit eed307713b, update
the plugman example to use the new format.
2012-05-17 18:56:01 +02:00
Ryan Lortie
8ec0cfd571 bloatpad: adjust to G(tk)Application 'quit' change
https://bugzilla.gnome.org/show_bug.cgi?id=670485
2012-02-21 01:23:01 +01:00
Matthias Clasen
c064bdb00c Mark strings as translable in bloatpad
We don't have any intention of actually translating bloatpad,
but this ends up as example in the docs.
2012-02-05 19:12:41 -05:00
Carlos Garcia Campos
80b414efc2 examples: Use symbolic names for button numbers 2012-01-27 09:47:44 +01:00
Ryan Lortie
eed307713b GtkBuilder: change format of menus
Change the format of GtkBuilder <menu> to be more in-line with the style
of the rest of GtkBuilder so that we can do translation in a consistent
way.

The format is now substantially more difficult to hand-write, but tools
should be along soon.

There is an xslt program attached to the bug to help you convert your
existing .ui files from the old format to the new one.

https://bugzilla.gnome.org/show_bug.cgi?id=668696
2012-01-25 19:42:19 -05:00
Matthias Clasen
0363a7a2e3 Bloatpad: propertly escape <> in markup 2012-01-23 22:14:28 -05:00
Matthias Clasen
c06887c9f0 Bloatpad: Set the application name
This will be picked up for the app menu label in fallback mode
in the near future.
2012-01-20 20:05:43 -05:00
Matthias Clasen
5f8c77f6d5 Don't leak plugin actions
Pointed out by Guillaume Desmottes in bug 667695.
2012-01-11 09:44:30 -05:00
Matthias Clasen
bec43213da Add a switch
Add a switch. This demonstrates:
- that switches can be placed in toolbars
- that GtkSwitch is actionable
- that actions can be shared between multiple actionables
2012-01-11 00:10:51 -05:00
Matthias Clasen
bb80081620 Bloatpad: Register with the session 2012-01-10 21:46:51 -05:00
Ryan Lortie
4dbd12b1d8 bloatpad: add left/centre/right toolbar buttons
https://bugzilla.gnome.org/show_bug.cgi?id=667394
2012-01-09 15:02:08 +01:00
Ryan Lortie
8578fefaa5 GtkApplication: add menu API
We add the app-menu and menubar public APIs to GtkApplication while
leaving the implementation in GApplication.

The actual implementation will be moved soon.
2011-12-19 12:51:12 -05:00
Matthias Clasen
aeb550ffd7 Plugman: Find the plugins menu in a better way
Now that GtkBuilder finds named submenus, there's no need for
the clumsy menumodel navigation anymore.
2011-12-19 12:51:12 -05:00
William Hua
4846f3619a Add accelerators to bloatpad. 2011-12-19 12:51:12 -05:00
Ryan Lortie
9e3c4c6b03 bloatpad: add 'New Window' menu item 2011-12-19 12:51:11 -05:00
Matthias Clasen
8a21201e2c Another plugin, for good measure 2011-12-19 12:51:11 -05:00
Matthias Clasen
c30e2b88c3 Something for the eye 2011-12-19 12:51:11 -05:00
Matthias Clasen
744f87fc12 Add an action too 2011-12-19 12:51:11 -05:00
Matthias Clasen
cc14811ec0 wip example for plugin/gmenu interaction 2011-12-19 12:51:11 -05:00
Matthias Clasen
073a924481 Bloatpad: Add an accelerator in the menu 2011-12-19 12:51:11 -05:00
Matthias Clasen
f05cfd55f0 Bloatpad: Add an accelerator 2011-12-19 12:51:11 -05:00
Ryan Lortie
43bf430f21 bloatpad: add proper sections to the menus 2011-12-19 12:51:10 -05:00
Matthias Clasen
f7ce4d7740 Whitespace fixes 2011-12-19 12:51:10 -05:00
Ryan Lortie
2ce6a27fa3 bloatpad: move action/menu setup to ::startup
No need to waste time doing this in init() if we are not going to become
the primary instance.
2011-12-19 12:51:10 -05:00
Ryan Lortie
59092e1c00 bloatpad: port to GActionMap for application
g_application_set_action_group() is now deprecated.
2011-12-19 12:51:10 -05:00
Ryan Lortie
9cc98f9d9b bloatpad: use GtkBuilder for constructing menus
This is closer to what a real application would want to do.
2011-12-19 12:51:10 -05:00
Matthias Clasen
064999cb2a Bloatpad: Add a View menu for fullscreen 2011-12-19 12:51:09 -05:00
Matthias Clasen
396876969a Bloatpad: Don't leak a menu model 2011-12-19 12:51:09 -05:00
Colin Walters
7ad83b6827 bloatpad: Be 640x480 by default
Because otherwise we're just a few pixels, and this is the least lame
solution I know of in GTK+.
2011-12-19 12:51:09 -05:00
Colin Walters
b041d33465 bloatpad: Fix Edit to be a submenu 2011-12-19 12:51:09 -05:00
Colin Walters
65a2962733 GtkApplication: Merge app menu and menubar
Change bloatpad to have both an app menu and a menubar.
2011-12-19 12:51:09 -05:00
Matthias Clasen
dd360d725c Bloatpad: Add mnemonics to the menu 2011-12-19 12:51:09 -05:00
Ryan Lortie
b42308f8e3 Adapt to changes in GLib API
g_application_get_menu() -> get_app_menu().
2011-12-19 12:51:09 -05:00
Matthias Clasen
33aaf26dd5 Drop GtkApplicationMenuButton for now
This feels premature; we do have the fallback situation covered
adaequately with the menubar, and people can do their own creative
solutions with gtk_application_window_get_menu(), so we don't have
to offer a widget for this right now.
2011-12-19 12:51:09 -05:00
Matthias Clasen
32508ee825 Drop an unused variable 2011-12-19 12:51:08 -05:00
Matthias Clasen
8ae7921708 Don't call g_object_unref on a variant
Tsk, tsk...
2011-12-19 12:51:08 -05:00
Ryan Lortie
618bca1333 bloatpad: use GtkApplicationMenuButton 2011-12-19 12:51:08 -05:00
Ryan Lortie
3076ba9c62 bloatpad: add 'win.fullscreen' action 2011-12-19 12:51:08 -05:00
Ryan Lortie
906475860f bloatpad: make "about" a window action
By making "about" a per-window action, we can pop the about dialog up on
top of the correct window instead of trying to guess from the
application list of windows.
2011-12-19 12:51:08 -05:00
Ryan Lortie
7e34342899 GtkApplicationWindow: implement GActionMap 2011-12-19 12:51:08 -05:00
Ryan Lortie
ebd7450f02 port bloatpad to the new APIs 2011-12-19 12:51:08 -05:00
Matthias Clasen
8ee68a7bf1 bloatpad: Add an example app menu
The bloatpad example shows simple GtkApplication usage,
so it makes sense to test app menu api here as well.
2011-12-19 12:45:51 -05:00
Martin Pitt
76cd14410c Fix GDK linking for Gtk typelib and example builds
Add missing GDK linking to GIR build and examples:

  GISCAN Gtk-3.0.gir
  CCLD   gtk-query-immodules-3.0
./.libs/libgtk-3.so: undefined reference to `gdk_keymap_get_modifier_mask'
./.libs/libgtk-3.so: undefined reference to `gdk_modifier_intent_get_type'
./.libs/libgtk-3.so: undefined reference to `gdk_window_begin_resize_drag_for_device'
./.libs/libgtk-3.so: undefined reference to `gdk_event_triggers_context_menu'
collect2: ld returned 1 exit status

  CCLD   grid-packing
../gtk/.libs/libgtk-3.so: undefined reference to `gdk_keymap_get_modifier_mask'
[...]

https://bugzilla.gnome.org/show_bug.cgi?id=664027
2011-11-15 06:18:18 +01:00
Benjamin Otte
8e4a45eb12 exanmples: Don't use deprecated API 2011-11-09 03:23:43 +01:00
Javier Jardón
32e00d1f43 Use AM_CPPFLAGS instead the obsolete INCLUDES 2011-07-06 15:58:32 +01:00
Matthias Clasen
2c192cf998 Cut deadwood
The old tutorial examples haven't been built in years, and are
not useful to keep around in git unless somebody does the work
to integrate them into the 'Getting started' section of the
current docs.
2011-05-26 13:15:40 -04:00
Matthias Clasen
524ce69bcb Bump the version to 3.0.0
At the same time, change the library sonames for -3.0 to just -3.
This is necessary since the 2.99 releases installed libraries like
libgtk-3.0.so.0.9903.0, and we want to prevent the library version
number from jumping back. So 3.0 will have libgtk-3.so.0.0.0.
2011-02-10 14:41:02 -05:00
Javier Jardón
03df034684 Remove latest bits of GtkItemFactory 2011-02-04 17:30:11 +00:00
Matthias Clasen
b29af18a26 Add a GtkBuilder section to the tutorial 2011-01-20 01:30:34 -05:00
Martin Pitt
d45a0114a5 Fix linking of drawing example
Commit 80e1340e introduced using a GDK method in examples/drawing.c, so
actually link that to GDK. Fixes build failure with --as-needed linker option
and gcc 4.5.
2011-01-19 15:40:46 +01:00
Matthias Clasen
80e1340e51 Add a drawing example to the tutorial 2011-01-18 23:59:17 -05:00
Matthias Clasen
ceeaf183a1 Add a packing example to the tutorial 2011-01-18 23:59:17 -05:00
Matthias Clasen
f2cde4cf3b Move the GtkApplication example to the right place 2011-01-06 01:13:50 -05:00
Matthias Clasen
a601b43b83 Cosmetic changes 2011-01-06 00:14:02 -05:00