You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(20) |
Jun
(46) |
Jul
(58) |
Aug
(103) |
Sep
(153) |
Oct
(192) |
Nov
(228) |
Dec
(213) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(61) |
Feb
(114) |
Mar
(103) |
Apr
(51) |
May
(84) |
Jun
(38) |
Jul
(125) |
Aug
(324) |
Sep
(120) |
Oct
(98) |
Nov
(145) |
Dec
(108) |
2004 |
Jan
(75) |
Feb
(72) |
Mar
(203) |
Apr
(33) |
May
(59) |
Jun
(39) |
Jul
(41) |
Aug
(108) |
Sep
(39) |
Oct
(74) |
Nov
(98) |
Dec
(21) |
2005 |
Jan
(113) |
Feb
(93) |
Mar
(113) |
Apr
(8) |
May
(11) |
Jun
(98) |
Jul
(91) |
Aug
(39) |
Sep
(149) |
Oct
(199) |
Nov
(29) |
Dec
(4) |
2006 |
Jan
(20) |
Feb
(6) |
Mar
(19) |
Apr
(21) |
May
(119) |
Jun
(105) |
Jul
(63) |
Aug
(10) |
Sep
(18) |
Oct
(26) |
Nov
(44) |
Dec
(113) |
2007 |
Jan
(14) |
Feb
(14) |
Mar
(11) |
Apr
(8) |
May
(7) |
Jun
(49) |
Jul
(188) |
Aug
(32) |
Sep
(12) |
Oct
(32) |
Nov
(79) |
Dec
(27) |
2008 |
Jan
(54) |
Feb
(32) |
Mar
(104) |
Apr
(247) |
May
(51) |
Jun
(25) |
Jul
(6) |
Aug
(13) |
Sep
(60) |
Oct
(63) |
Nov
(49) |
Dec
(10) |
2009 |
Jan
(132) |
Feb
(14) |
Mar
(16) |
Apr
(3) |
May
(23) |
Jun
(10) |
Jul
(14) |
Aug
(12) |
Sep
(24) |
Oct
(6) |
Nov
|
Dec
(6) |
2010 |
Jan
(12) |
Feb
(13) |
Mar
(2) |
Apr
(13) |
May
(7) |
Jun
(3) |
Jul
(6) |
Aug
|
Sep
(156) |
Oct
(57) |
Nov
(9) |
Dec
(2) |
2011 |
Jan
(109) |
Feb
(431) |
Mar
(17) |
Apr
|
May
(8) |
Jun
(25) |
Jul
(12) |
Aug
(9) |
Sep
(80) |
Oct
(244) |
Nov
(341) |
Dec
(559) |
2012 |
Jan
(137) |
Feb
(185) |
Mar
(6) |
Apr
(30) |
May
(26) |
Jun
(3) |
Jul
(25) |
Aug
(5) |
Sep
(4) |
Oct
(2) |
Nov
(16) |
Dec
(190) |
2013 |
Jan
(204) |
Feb
(70) |
Mar
(137) |
Apr
(180) |
May
(149) |
Jun
(39) |
Jul
(22) |
Aug
(8) |
Sep
(78) |
Oct
(488) |
Nov
(134) |
Dec
(138) |
2014 |
Jan
(18) |
Feb
(148) |
Mar
(238) |
Apr
(177) |
May
(45) |
Jun
(36) |
Jul
(176) |
Aug
(33) |
Sep
(114) |
Oct
(265) |
Nov
(263) |
Dec
(184) |
2015 |
Jan
(163) |
Feb
(44) |
Mar
(196) |
Apr
(184) |
May
(308) |
Jun
(132) |
Jul
(81) |
Aug
(76) |
Sep
(440) |
Oct
(125) |
Nov
(75) |
Dec
(111) |
2016 |
Jan
(210) |
Feb
(88) |
Mar
(86) |
Apr
(137) |
May
(145) |
Jun
(257) |
Jul
(35) |
Aug
(312) |
Sep
(69) |
Oct
(43) |
Nov
(91) |
Dec
(103) |
2017 |
Jan
(72) |
Feb
(50) |
Mar
(80) |
Apr
(238) |
May
(122) |
Jun
(47) |
Jul
(197) |
Aug
(92) |
Sep
(21) |
Oct
(45) |
Nov
(52) |
Dec
(26) |
2018 |
Jan
(3) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Eddie M. <mor...@gm...> - 2022-12-06 10:58:35
|
Hello |
From: Travis CI <bu...@tr...> - 2018-04-28 03:56:18
|
Build Update for ruby-gnome2/pkg-config ------------------------------------- Build: #104 Status: Passed Duration: 2 mins and 47 secs Commit: 27d07b1 (1.3.1) Author: Kouhei Sutou Message: Add 1.3.1 entry View the changeset: https://github.com/ruby-gnome2/pkg-config/compare/1.3.1 View the full build log and details: https://travis-ci.org/ruby-gnome2/pkg-config/builds/372305111?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications This email was sent to rub...@li... (mailto:rub...@li...) unsubscribe from this list (http://clicks.travis-ci.com/track/unsub.php?u=14313403&id=56220c8f4db146b281be4e122ba19390.nVbKllm8Y042aOZq1I0SPOvxTAE%3D&r=https%3A%2F%2Fmandrillapp.com%2Funsub%3Fmd_email%3Druby-gnome2-cvs%2540lists.sourceforge.net) |
From: Travis CI <bu...@tr...> - 2018-04-10 07:15:50
|
Build Update for ruby-gnome2/pkg-config ------------------------------------- Build: #100 Status: Passed Duration: 1 minute and 1 second Commit: 087cba4 (1.3.0) Author: Kouhei Sutou Message: Add 1.3.0 entry View the changeset: https://github.com/ruby-gnome2/pkg-config/compare/1.3.0 View the full build log and details: https://travis-ci.org/ruby-gnome2/pkg-config/builds/364464446?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications This email was sent to rub...@li... (mailto:rub...@li...) unsubscribe from this list (http://clicks.travis-ci.com/track/unsub.php?u=14313403&id=fa555b831e7f4303af66b0f83c4f020b.nVbKllm8Y042aOZq1I0SPOvxTAE%3D&r=https%3A%2F%2Fmandrillapp.com%2Funsub%3Fmd_email%3Druby-gnome2-cvs%2540lists.sourceforge.net) |
From: Travis CI <bu...@tr...> - 2018-01-27 05:23:28
|
Build Update for ruby-gnome2/ruby-gnome2 ------------------------------------- Build: #4677 Status: Errored Duration: 36 minutes and 46 seconds Commit: 7a120f6 (master) Author: Kouhei Sutou Message: gtk3: remove needless code View the changeset: https://github.com/ruby-gnome2/ruby-gnome2/compare/005088e7a3e1...7a120f69d6df View the full build log and details: https://travis-ci.org/ruby-gnome2/ruby-gnome2/builds/334015972?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Travis CI <bu...@tr...> - 2018-01-27 04:59:55
|
Build Update for ruby-gnome2/ruby-gnome2 ------------------------------------- Build: #4676 Status: Errored Duration: 35 minutes and 24 seconds Commit: 005088e (master) Author: Kouhei Sutou Message: gdk3: fix a typo View the changeset: https://github.com/ruby-gnome2/ruby-gnome2/compare/d5c7a01e6787...005088e7a3e1 View the full build log and details: https://travis-ci.org/ruby-gnome2/ruby-gnome2/builds/334013793?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Travis CI <bu...@tr...> - 2018-01-13 03:55:22
|
Build Update for ruby-gnome2/pkg-config ------------------------------------- Build: #96 Status: Passed Duration: 3 minutes and 19 seconds Commit: ce99abf (1.2.9) Author: Kouhei Sutou Message: Add 1.2.9 entry View the changeset: https://github.com/ruby-gnome2/pkg-config/compare/1.2.9 View the full build log and details: https://travis-ci.org/ruby-gnome2/pkg-config/builds/328368312?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: cedlemo <nu...@co...> - 2017-12-12 14:58:22
|
cedlemo 2017-12-12 23:38:01 +0900 (Tue, 12 Dec 2017) New Revision: 6449c3e2791a081c1eb300d04d22ed3909a30f49 https://github.com/ruby-gnome2/ruby-gnome2/commit/6449c3e2791a081c1eb300d04d22ed3909a30f49 Merged dc1d186: Merge pull request #1120 from cedlemo/gtk3_sample_gtk_demo_shortcuts_rb Message: Add Gtk shortcuts demo Added files: gtk3/sample/gtk-demo/shortcuts.rb Added: gtk3/sample/gtk-demo/shortcuts.rb (+110 -0) 100644 =================================================================== --- /dev/null +++ gtk3/sample/gtk-demo/shortcuts.rb 2017-12-12 23:38:01 +0900 (bdd416c71) @@ -0,0 +1,110 @@ +# Copyright (c) 2017 Ruby-GNOME2 Project Team +# This program is licenced under the same licence as Ruby-GNOME2. +# +=begin += Shortcuts Window + + GtkShortcutsWindow is a window that provides a help overlay + for shortcuts and gestures in an application. +=end +class ShortcutsDemo + def initialize(main_window) + @icons_added = false + unless @icons_added + theme = Gtk::IconTheme.default + theme.add_resource_path("/icons") + @icons_added = true + end + + ui = "/shortcuts/shortcuts.ui" + @builder = Gtk::Builder.new(:resource => ui) + builder_add_callback_symbols + @builder.connect_signals {} + + @window = @builder["window1"] + @window.screen = main_window.screen + end + + def run + if !@window.visible? + @window.show_all + else + @window.destroy + end + @window + end + + private + + def builder_add_callback_symbols + @builder.connect_signals do |name| + case name + when "builder_shortcuts" + builder_shortcuts + when "gedit_shortcuts" + gedit_shortcuts + when "clocks_shortcuts" + clocks_shortcuts + when "clocks_shortcuts_stopwatch" + clocks_shortcuts_stopwatch + when "boxes_shortcuts" + boxes_shortcuts + when "boxes_shortcuts_wizard" + boxes_shortcuts_wizard + when "boxes_shortcuts_display" + boxes_shortcuts_display + end + end + end + + def show_shortcuts(id, view) + path = "/shortcuts/#{id}.ui" + builder = Gtk::Builder.new(:resource => path) + overlay = builder[id] + overlay.set_transient_for(@window) + overlay.view_name = view if view + overlay.show + end + + def builder_shortcuts + proc do + show_shortcuts("shortcuts-builder", nil) + end + end + + def gedit_shortcuts + proc do + show_shortcuts("shortcuts-gedit", nil) + end + end + + def clocks_shortcuts + proc do + show_shortcuts("shortcuts-clocks", nil) + end + end + + def clocks_shortcuts_stopwatch + proc do + show_shortcuts("shortcuts-clocks", "stopwatch") + end + end + + def boxes_shortcuts + proc do + show_shortcuts("shortcuts-boxes", nil) + end + end + + def boxes_shortcuts_wizard + proc do + show_shortcuts("shortcuts-boxes", "wizard") + end + end + + def boxes_shortcuts_display + proc do + show_shortcuts("shortcuts-boxes", "display") + end + end +end |
From: Kouhei S. <nu...@co...> - 2017-12-12 14:58:20
|
Kouhei Sutou 2017-12-12 23:58:02 +0900 (Tue, 12 Dec 2017) New Revision: dc1d186e220f8ac5368b6f02e4bf5475fe665a91 https://github.com/ruby-gnome2/ruby-gnome2/commit/dc1d186e220f8ac5368b6f02e4bf5475fe665a91 Message: Merge pull request #1120 from cedlemo/gtk3_sample_gtk_demo_shortcuts_rb Gtk3 sample gtk demo shortcuts rb Patch by cedlemo. Thanks!!! |
From: cedlemo <nu...@co...> - 2017-12-12 14:58:20
|
cedlemo 2017-12-12 23:41:27 +0900 (Tue, 12 Dec 2017) New Revision: f9ce162280a27513065d157ed6c1bbd74c04a2d6 https://github.com/ruby-gnome2/ruby-gnome2/commit/f9ce162280a27513065d157ed6c1bbd74c04a2d6 Merged dc1d186: Merge pull request #1120 from cedlemo/gtk3_sample_gtk_demo_shortcuts_rb Message: Update the gtk-demo TODO file Modified files: gtk3/sample/gtk-demo/TODO Modified: gtk3/sample/gtk-demo/TODO (+1 -1) =================================================================== --- gtk3/sample/gtk-demo/TODO 2017-12-12 23:38:09 +0900 (f06bbd1d5) +++ gtk3/sample/gtk-demo/TODO 2017-12-12 23:41:27 +0900 (ec5c281ed) @@ -61,6 +61,7 @@ fishbowl.c ok ok flowbox.c ok ok tree_store.c ok ok toolpalette.c ok ok +shortcuts.c ok ok Remains : @@ -68,7 +69,6 @@ application.c no no changedisplay.c ok no foreigndrawing no no gestures.c no no -shortcuts.c no no # Ruby version Check all the ruby demos that doesn't correspond to a C version. |
From: cedlemo <nu...@co...> - 2017-12-12 14:58:20
|
cedlemo 2017-12-12 23:38:09 +0900 (Tue, 12 Dec 2017) New Revision: 436e15f07d90a1ab6a6fc712d53f42073022a8d7 https://github.com/ruby-gnome2/ruby-gnome2/commit/436e15f07d90a1ab6a6fc712d53f42073022a8d7 Merged dc1d186: Merge pull request #1120 from cedlemo/gtk3_sample_gtk_demo_shortcuts_rb Message: Adapt the ui file to ruby In C , the property object="window1" is used to define the argument for the handler of the signal. In this ruby demo, the window1 element is stored in the window instance variable. Modified files: gtk3/sample/gtk-demo/shortcuts.ui Modified: gtk3/sample/gtk-demo/shortcuts.ui (+7 -7) =================================================================== --- gtk3/sample/gtk-demo/shortcuts.ui 2017-12-12 23:38:01 +0900 (cb64e1e65) +++ gtk3/sample/gtk-demo/shortcuts.ui 2017-12-12 23:38:09 +0900 (5d638ab29) @@ -14,49 +14,49 @@ <object class="GtkButton"> <property name="visible">1</property> <property name="label">Builder</property> - <signal name="clicked" handler="builder_shortcuts" swapped="1" object="window1"/> + <signal name="clicked" handler="builder_shortcuts" swapped="1"/> </object> </child> <child> <object class="GtkButton"> <property name="visible">1</property> <property name="label">GEdit</property> - <signal name="clicked" handler="gedit_shortcuts" swapped="1" object="window1"/> + <signal name="clicked" handler="gedit_shortcuts" swapped="1"/> </object> </child> <child> <object class="GtkButton"> <property name="visible">1</property> <property name="label">Clocks - All</property> - <signal name="clicked" handler="clocks_shortcuts" swapped="1" object="window1"/> + <signal name="clicked" handler="clocks_shortcuts" swapped="1"/> </object> </child> <child> <object class="GtkButton"> <property name="visible">1</property> <property name="label">Clocks - Stopwatch</property> - <signal name="clicked" handler="clocks_shortcuts_stopwatch" swapped="1" object="window1"/> + <signal name="clicked" handler="clocks_shortcuts_stopwatch" swapped="1"/> </object> </child> <child> <object class="GtkButton"> <property name="visible">1</property> <property name="label">Boxes</property> - <signal name="clicked" handler="boxes_shortcuts" swapped="1" object="window1"/> + <signal name="clicked" handler="boxes_shortcuts" swapped="1"/> </object> </child> <child> <object class="GtkButton"> <property name="visible">1</property> <property name="label">Boxes - Wizard</property> - <signal name="clicked" handler="boxes_shortcuts_wizard" swapped="1" object="window1"/> + <signal name="clicked" handler="boxes_shortcuts_wizard" swapped="1"/> </object> </child> <child> <object class="GtkButton"> <property name="visible">1</property> <property name="label">Boxes - Display</property> - <signal name="clicked" handler="boxes_shortcuts_display" swapped="1" object="window1"/> + <signal name="clicked" handler="boxes_shortcuts_display" swapped="1"/> </object> </child> </object> |
From: Kouhei S. <nu...@co...> - 2017-12-12 13:37:41
|
Kouhei Sutou 2017-12-12 22:37:03 +0900 (Tue, 12 Dec 2017) New Revision: fe996336adbfa1a5fa73772fce7d787a1b631dd8 https://github.com/ruby-gnome2/ruby-gnome2/commit/fe996336adbfa1a5fa73772fce7d787a1b631dd8 Message: gtk3: support Container#add_child(child) again Modified files: gtk3/lib/gtk3/container.rb gtk3/sample/gtk-demo/combobox.rb Modified: gtk3/lib/gtk3/container.rb (+4 -4) =================================================================== --- gtk3/lib/gtk3/container.rb 2017-12-12 22:30:32 +0900 (e8c933a6f) +++ gtk3/lib/gtk3/container.rb 2017-12-12 22:37:03 +0900 (63a6653b6) @@ -31,11 +31,11 @@ module Gtk end alias_method :<<, :add - def add_child(*args, &block) - if defined?(super) - super + def add_child(*args) + if args.size == 1 + add(*args) else - add(*args, &block) + super end end Modified: gtk3/sample/gtk-demo/combobox.rb (+1 -1) =================================================================== --- gtk3/sample/gtk-demo/combobox.rb 2017-12-12 22:30:32 +0900 (94e6b70fb) +++ gtk3/sample/gtk-demo/combobox.rb 2017-12-12 22:37:03 +0900 (bc30aaefe) @@ -100,7 +100,7 @@ class ComboboxDemo entry.mask = "^([0-9]*|One|Two|2\302\275|Three)$" combo.remove_child(combo.child) - combo.add(entry) + combo.add_child(entry) # A combobox with string IDs frame = Gtk::Frame.new("String IDs") |
From: Kouhei S. <nu...@co...> - 2017-12-12 13:33:27
|
Kouhei Sutou 2017-12-12 22:30:32 +0900 (Tue, 12 Dec 2017) New Revision: c5246cd0f766fb5b274e0bcf2250a42443df23c2 https://github.com/ruby-gnome2/ruby-gnome2/commit/c5246cd0f766fb5b274e0bcf2250a42443df23c2 Message: gtk3 demo: follow method change Reported by Titouan Teyssier. Thanks!!! Modified files: gtk3/sample/gtk-demo/combobox.rb Modified: gtk3/sample/gtk-demo/combobox.rb (+1 -1) =================================================================== --- gtk3/sample/gtk-demo/combobox.rb 2017-12-10 15:19:23 +0900 (bc30aaefe) +++ gtk3/sample/gtk-demo/combobox.rb 2017-12-12 22:30:32 +0900 (94e6b70fb) @@ -100,7 +100,7 @@ class ComboboxDemo entry.mask = "^([0-9]*|One|Two|2\302\275|Three)$" combo.remove_child(combo.child) - combo.add_child(entry) + combo.add(entry) # A combobox with string IDs frame = Gtk::Frame.new("String IDs") |
From: Kouhei S. <nu...@co...> - 2017-12-10 06:20:34
|
Kouhei Sutou 2017-12-10 15:19:23 +0900 (Sun, 10 Dec 2017) New Revision: 34af7b6b0314a1582cafd8a2f8b8240fad065438 https://github.com/ruby-gnome2/ruby-gnome2/commit/34af7b6b0314a1582cafd8a2f8b8240fad065438 Message: gnumeric: use GObjectIntrospection to detect .typelib existent GitHub: fix #1118 Reported by cedlemo. Thanks!!! Modified files: gnumeric/dependency-check/Rakefile Modified: gnumeric/dependency-check/Rakefile (+10 -2) =================================================================== --- gnumeric/dependency-check/Rakefile 2017-12-07 09:57:25 +0900 (9f32db772) +++ gnumeric/dependency-check/Rakefile 2017-12-10 15:19:23 +0900 (07ec80d9a) @@ -29,8 +29,16 @@ end namespace :dependency do desc "Check dependency" task :check do - unless NativePackageInstaller.install(:debian => "gir1.2-gnumeric") - exit(false) + require "gobject-introspection" + repository = GObjectIntrospection::Repository.default + begin + repository.require("Gnm") + rescue GObjectIntrospection::RepositoryError::TypelibNotFound + unless NativePackageInstaller.install(:arch_linux => "gnumeric", + :debian => "gir1.2-gnumeric", + :redhat => "pkgconfig(libspreadsheet-1.12)") + exit(false) + end end end end |
From: Mamoru T. <nu...@co...> - 2017-12-07 00:57:48
|
Mamoru TASAKA 2017-12-05 23:54:14 +0900 (Tue, 05 Dec 2017) New Revision: e15751814c459b8a07f6f06fd55358f5b957ca42 https://github.com/ruby-gnome2/ruby-gnome2/commit/e15751814c459b8a07f6f06fd55358f5b957ca42 Merged 36d452c: Merge pull request #1117 from mtasaka/pkgconfig-fedora-style Message: Use pkgconfig(foo) virtual provides for Red Hat based dependency Modified files: atk/dependency-check/Rakefile clutter-gstreamer/dependency-check/Rakefile clutter-gtk/dependency-check/Rakefile clutter/dependency-check/Rakefile gdk3/dependency-check/Rakefile gdk_pixbuf2/dependency-check/Rakefile goffice/dependency-check/Rakefile gsf/dependency-check/Rakefile gtksourceview3/dependency-check/Rakefile poppler/dependency-check/Rakefile rsvg2/dependency-check/Rakefile vte3/dependency-check/Rakefile webkit-gtk/dependency-check/Rakefile webkit2-gtk/dependency-check/Rakefile Modified: atk/dependency-check/Rakefile (+1 -1) =================================================================== --- atk/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (7692303cc) +++ atk/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (99ac8ff02) @@ -32,7 +32,7 @@ namespace :dependency do unless PKGConfig.check_version?("atk") unless NativePackageInstaller.install(:altlinux => "libatk-devel", :debian => "libatk1.0-dev", - :redhat => "atk-devel", + :redhat => "pkgconfig(atk)", :arch => "atk", :homebrew => "atk", :macports => "atk", Modified: clutter-gstreamer/dependency-check/Rakefile (+1 -0) =================================================================== --- clutter-gstreamer/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (db367a7f1) +++ clutter-gstreamer/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (b03362fb2) @@ -31,6 +31,7 @@ namespace :dependency do task :check do unless PKGConfig.check_version?("clutter-gst-3.0") unless NativePackageInstaller.install(:debian => "libclutter-gst-3.0-dev", + :redhat => "pkgconfig(clutter-gst-3.0)", :homebrew => "clutter-gst", :msys2 => "clutter-gst") exit(false) Modified: clutter-gtk/dependency-check/Rakefile (+1 -0) =================================================================== --- clutter-gtk/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (7a8f0482d) +++ clutter-gtk/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (d232e8169) @@ -31,6 +31,7 @@ namespace :dependency do task :check do unless PKGConfig.check_version?("clutter-gtk-1.0") unless NativePackageInstaller.install(:debian => "libclutter-gtk-1.0-dev", + :redhat => "pkgconfig(clutter-gtk-1.0)", :homebrew => "clutter-gtk", :msys2 => "clutter-gtk") exit(false) Modified: clutter/dependency-check/Rakefile (+1 -0) =================================================================== --- clutter/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (671ce0c36) +++ clutter/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (cd6c21fde) @@ -31,6 +31,7 @@ namespace :dependency do task :check do unless PKGConfig.check_version?("clutter-1.0") unless NativePackageInstaller.install(:debian => "libclutter-1.0-dev", + :redhat => "pkgconfig(clutter-1.0)", :homebrew => "clutter", :msys2 => "clutter") exit(false) Modified: gdk3/dependency-check/Rakefile (+1 -1) =================================================================== --- gdk3/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (24145228b) +++ gdk3/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (16b6527f7) @@ -32,7 +32,7 @@ namespace :dependency do unless PKGConfig.check_version?("gdk-3.0") unless NativePackageInstaller.install(:altlinux => "libgtk+3-devel", :debian => "libgtk-3-dev", - :redhat => "gtk3-devel", + :redhat => "pkgconfig(gdk-3.0)", :homebrew => "gtk+3", :macports => "gtk3", :msys2 => "gtk3") Modified: gdk_pixbuf2/dependency-check/Rakefile (+1 -2) =================================================================== --- gdk_pixbuf2/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (1efc53ecb) +++ gdk_pixbuf2/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (315d8cb2e) @@ -32,8 +32,7 @@ namespace :dependency do unless PKGConfig.check_version?("gdk-pixbuf-2.0") unless NativePackageInstaller.install(:altlinux => "gdk-pixbuf-devel", :debian => "libgdk-pixbuf2.0-dev", - :redhat => "gtk2-devel", - :fedora => "gdk-pixbuf2-devel", + :redhat => "pkgconfig(gdk-pixbuf-2.0)", :arch => "gdk-pixbuf2", :homebrew => "gdk-pixbuf", :macports => "gdk-pixbuf2", Modified: goffice/dependency-check/Rakefile (+2 -1) =================================================================== --- goffice/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (3a755eb54) +++ goffice/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (24771eff3) @@ -48,13 +48,14 @@ namespace :dependency do unless PKGConfig.check_version?("libgoffice-0.10") goffice010_spec = { :debian => "libgoffice-0.10-dev", + :redhat => "pkgconfig(libgoffice-0.10)", :homebrew => "goffice", } unless NativePackageInstaller.install(goffice010_spec) unless PKGConfig.check_version?("libgoffice-0.8") goffice08_spec = { :debian => "libgoffice-0.8-dev", - :redhat => "goffice08-devel", + :redhat => "pkgconfig(libgoffice-0.8)", :homebrew => "goffice", } unless NativePackageInstaller.install(goffice08_spec) Modified: gsf/dependency-check/Rakefile (+1 -0) =================================================================== --- gsf/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (f491b936f) +++ gsf/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (c1be70542) @@ -31,6 +31,7 @@ namespace :dependency do task :check do unless PKGConfig.check_version?("libgsf-1") unless NativePackageInstaller.install(:debian => "libgsf-1-dev", + :redhat => "pkgconfig(libgsf-1)", :homebrew => "libgsf", :msys2 => "libgsf") exit(false) Modified: gtksourceview3/dependency-check/Rakefile (+1 -1) =================================================================== --- gtksourceview3/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (03f3221ca) +++ gtksourceview3/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (47f5e74bc) @@ -32,7 +32,7 @@ namespace :dependency do unless PKGConfig.check_version?("gtksourceview-3.0") unless NativePackageInstaller.install(:altlinux => "libgtksourceview3-devel", :debian => "libgtksourceview-3.0-dev", - :redhat => "gtksourceview3-devel", + :redhat => "pkgconfig(gtksourceview-3.0)", :homebrew => "gtksourceview3", :macports => "gtksourceview3", :msys2 => "gtksourceview3") Modified: poppler/dependency-check/Rakefile (+1 -1) =================================================================== --- poppler/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (4f72fb3c0) +++ poppler/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (8647ac24e) @@ -32,7 +32,7 @@ namespace :dependency do unless PKGConfig.check_version?("poppler", 0, 12, 0) unless NativePackageInstaller.install(:alt_linux => "libpoppler-glib-devel", :debian => "libpoppler-glib-dev", - :redhat => "poppler-glib-devel", + :redhat => "pkgconfig(poppler-glib)", :arch_linux => "poppler", :homebrew => "poppler", :macports => "poppler", Modified: rsvg2/dependency-check/Rakefile (+1 -1) =================================================================== --- rsvg2/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (444db9e66) +++ rsvg2/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (fc7822a90) @@ -32,7 +32,7 @@ namespace :dependency do unless PKGConfig.check_version?("librsvg-2.0") unless NativePackageInstaller.install(:altlinux => "librsvg-devel", :debian => "librsvg2-dev", - :redhat => "librsvg2-devel", + :redhat => "pkgconfig(librsvg-2.0)", :arch => "librsvg", :homebrew => "librsvg", :macports => "librsvg", Modified: vte3/dependency-check/Rakefile (+1 -1) =================================================================== --- vte3/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (56ea6f7c4) +++ vte3/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (cdd67eb04) @@ -33,7 +33,7 @@ namespace :dependency do unless PKGConfig.check_version?("vte-2.91") unless NativePackageInstaller.install(:altlinux => "libvte3-devel", :debian => "libvte-2.91-dev", - :redhat => "vte3-devel", + :redhat => "pkgconfig(vte-2.91)", :homebrew => "vte3") exit(false) end Modified: webkit-gtk/dependency-check/Rakefile (+1 -0) =================================================================== --- webkit-gtk/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (3d53b5cc2) +++ webkit-gtk/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (a9187f867) @@ -31,6 +31,7 @@ namespace :dependency do task :check do unless PKGConfig.check_version?("webkitgtk-3.0") unless NativePackageInstaller.install(:debian => "libwebkitgtk-3.0-dev", + :redhat => "pkgconfig(webkitgtk-3.0)", :msys2 => "webkitgtk3") exit(false) end Modified: webkit2-gtk/dependency-check/Rakefile (+1 -0) =================================================================== --- webkit2-gtk/dependency-check/Rakefile 2017-12-04 10:35:44 +0900 (db28d0f2f) +++ webkit2-gtk/dependency-check/Rakefile 2017-12-05 23:54:14 +0900 (5169a9205) @@ -31,6 +31,7 @@ namespace :dependency do task :check do unless PKGConfig.check_version?("webkit2gtk-4.0") unless NativePackageInstaller.install(:debian => "libwebkit2gtk-4.0-dev", + :redhat => "pkgconfig(webkit2gtk-4.0)", :homebrew => "webkitgtk") exit(false) end |
From: Kouhei S. <nu...@co...> - 2017-12-07 00:57:47
|
Kouhei Sutou 2017-12-07 09:57:25 +0900 (Thu, 07 Dec 2017) New Revision: 36d452c55f5cd9678a4869ec5c1e0194716d15e9 https://github.com/ruby-gnome2/ruby-gnome2/commit/36d452c55f5cd9678a4869ec5c1e0194716d15e9 Message: Merge pull request #1117 from mtasaka/pkgconfig-fedora-style Use pkgconfig(foo) virtual provides for Red Hat based dependency Patch by Mamoru TASAKA. Thanks!!! |
From: cedlemo <nu...@co...> - 2017-12-06 13:57:31
|
cedlemo 2017-12-06 22:56:59 +0900 (Wed, 06 Dec 2017) New Revision: faec3e7956a461163e50f1be322ab565a8eaa63d https://github.com/ruby-gnome2/ggit/commit/faec3e7956a461163e50f1be322ab565a8eaa63d Message: Improve README Modified files: README.md Modified: README.md (+33 -2) =================================================================== --- README.md 2017-12-06 22:35:23 +0900 (b498eaf) +++ README.md 2017-12-06 22:56:59 +0900 (1ce0475) @@ -3,7 +3,8 @@ Ruby loader for [libgit2-glib](https://git.gnome.org/browse/libgit2-glib) based on the ruby gobject-introspection gem from the [ruby-GNOME2](https://github.com/ruby-gnome2/ruby-gnome2) project. -Documentation for libgit2-glib can be found [here](https://developer.gnome.org/libgit2-glib/). +Documentation for libgit2-glib can be found [here](https://developer.gnome.org/libgit2-glib/) and +documentation for libgit2 can be found [here](https://libgit2.github.com/libgit2/#HEAD). ## Requirements @@ -11,9 +12,39 @@ Documentation for libgit2-glib can be found [here](https://developer.gnome.org/l * [GObject Introspection](http://live.gnome.org/GObjectIntrospection) * [libgit2-glib](https://git.gnome.org/browse/libgit2-glib) +## Examples +From https://libgit2.github.com/docs/guides/101-samples/ + +### Using the library + +```ruby +require "ggit" +``` + +### Repositories + +#### Init + +```ruby +# initialize with working directory (create and fill .git/) +dir = Gio::File.open(:path => "#{@path}/non_bare_repo/test") +Ggit::Repository.init_repository(dir, false) +# bare +dir = Gio::File.open(:path => "#{@path}/bare_repo/test/.git") +repo = Ggit::Repository.init_repository(dir, true) +``` + +### Clone + +```ruby +url = "https://github.com/ruby-gnome2/ggit.git" +destination = Gio::File.open(:path => "#{@path}/ggit-clone") +Ggit::Repository.clone(url, destination) +``` + ## License -Copyright (c) 2016 Ruby-GNOME2 Project Team +Copyright (c) 2016-2017 Ruby-GNOME2 Project Team This program is free software. You can distribute/modify this program under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. |
From: cedlemo <nu...@co...> - 2017-12-06 13:57:30
|
cedlemo 2017-12-06 22:34:56 +0900 (Wed, 06 Dec 2017) New Revision: ac93f6227c2daebd85c42b8803cd3f22d93bf491 https://github.com/ruby-gnome2/ggit/commit/ac93f6227c2daebd85c42b8803cd3f22d93bf491 Message: Add test for Ggit::Config.set_string Modified files: test/test-config.rb Modified: test/test-config.rb (+11 -0) =================================================================== --- test/test-config.rb 2017-12-06 18:44:50 +0900 (97c15ba) +++ test/test-config.rb 2017-12-06 22:34:56 +0900 (c114f22) @@ -39,6 +39,17 @@ class TestConfig < Test::Unit::TestCase assert_equal("jean-claude", user) end + def test_config_add_new_value + conf = Ggit::Config.new + conf.add_file(@file, :local, true) + conf.set_string("core.editor", "vim") + conf = Ggit::Config.new + conf.add_file(@file, :local, true) + snapshot = conf.snapshot + editor = snapshot.get_string("core.editor") + assert_equal("vim", editor) + end + def cleanup FileUtils.rm_rf("#{@path}/config") end |
From: cedlemo <nu...@co...> - 2017-12-06 13:57:30
|
cedlemo 2017-12-06 22:35:23 +0900 (Wed, 06 Dec 2017) New Revision: 55b224fcd9a93d46aa72a66d3c7861585c48f97e https://github.com/ruby-gnome2/ggit/commit/55b224fcd9a93d46aa72a66d3c7861585c48f97e Message: Remove puts instruction Modified files: test/test-config.rb Modified: test/test-config.rb (+0 -1) =================================================================== --- test/test-config.rb 2017-12-06 22:34:56 +0900 (c114f22) +++ test/test-config.rb 2017-12-06 22:35:23 +0900 (d8625f9) @@ -21,7 +21,6 @@ class TestConfig < Test::Unit::TestCase FileUtils.cp("#{@path}/gitconfig", "#{@path}/config/") @config_file_path = "#{@path}/config/gitconfig" @file = Gio::File.open(:path => @config_file_path) - puts @file.path end def test_new_config_from_file |
From: cedlemo <nu...@co...> - 2017-12-06 09:45:12
|
cedlemo 2017-12-06 18:44:30 +0900 (Wed, 06 Dec 2017) New Revision: 75b9f6a9be386693cf536d7d412aef04837ca012 https://github.com/ruby-gnome2/ggit/commit/75b9f6a9be386693cf536d7d412aef04837ca012 Message: We can only get information of a config througth a snapshot Modified files: test/test-config.rb Modified: test/test-config.rb (+7 -5) =================================================================== --- test/test-config.rb 2017-12-06 18:30:36 +0900 (17d8754) +++ test/test-config.rb 2017-12-06 18:44:30 +0900 (97c15ba) @@ -26,15 +26,17 @@ class TestConfig < Test::Unit::TestCase def test_new_config_from_file conf = Ggit::Config.new(:file => @file) - user = conf.get_string("user.name") - assert_equal("name", user) + snapshot = conf.snapshot + user = snapshot.get_string("user.name") + assert_equal("jean-claude", user) end - def test_new_config + def test_new_config_add_file conf = Ggit::Config.new conf.add_file(@file, :local, true) - user = conf.get_string("user.name") - assert_equal("name", user) + snapshot = conf.snapshot + user = snapshot.get_string("user.name") + assert_equal("jean-claude", user) end def cleanup |
From: cedlemo <nu...@co...> - 2017-12-06 09:45:10
|
cedlemo 2017-12-06 18:44:50 +0900 (Wed, 06 Dec 2017) New Revision: b1dd6317f151f943740cc5d04140294917fa1219 https://github.com/ruby-gnome2/ggit/commit/b1dd6317f151f943740cc5d04140294917fa1219 Message: Change user name in config for test Modified files: test/gitconfig Modified: test/gitconfig (+1 -1) =================================================================== --- test/gitconfig 2017-12-06 18:44:30 +0900 (2917661) +++ test/gitconfig 2017-12-06 18:44:50 +0900 (443464d) @@ -1,5 +1,5 @@ [user] - name = jeanclaude + name = jean-claude email = jea...@gm... [core] excludesfile = gitignore |
From: cedlemo <nu...@co...> - 2017-12-06 09:30:59
|
cedlemo 2017-12-06 18:30:36 +0900 (Wed, 06 Dec 2017) New Revision: 67e9b4088fa356d5038f7ebf504b2e7a59bc76d5 https://github.com/ruby-gnome2/ggit/commit/67e9b4088fa356d5038f7ebf504b2e7a59bc76d5 Message: Update with new Gio api: File.path to File.open(:path => path) Modified files: test/test-config.rb test/test-repository.rb Modified: test/test-config.rb (+1 -1) =================================================================== --- test/test-config.rb 2017-05-13 23:01:22 +0900 (3a590ef) +++ test/test-config.rb 2017-12-06 18:30:36 +0900 (17d8754) @@ -20,7 +20,7 @@ class TestConfig < Test::Unit::TestCase FileUtils.mkdir_p("#{@path}/config") FileUtils.cp("#{@path}/gitconfig", "#{@path}/config/") @config_file_path = "#{@path}/config/gitconfig" - @file = Gio::File.path(@config_file_path) + @file = Gio::File.open(:path => @config_file_path) puts @file.path end Modified: test/test-repository.rb (+5 -5) =================================================================== --- test/test-repository.rb 2017-05-13 23:01:22 +0900 (7ca2ce3) +++ test/test-repository.rb 2017-12-06 18:30:36 +0900 (7be37ca) @@ -22,20 +22,20 @@ class TestRepository < Test::Unit::TestCase end def test_repository_init_non_bare_repository - dir = Gio::File.path("#{@path}/non_bare_repo/test") + dir = Gio::File.open(:path => "#{@path}/non_bare_repo/test") Ggit::Repository.init_repository(dir, false) assert(File.exist?(@path + "/non_bare_repo/test/.git/config")) end def test_repository_init_bare_repository - dir = Gio::File.path("#{@path}/bare_repo/test/.git") + dir = Gio::File.open(:path => "#{@path}/bare_repo/test/.git") repo = Ggit::Repository.init_repository(dir, true) assert(File.exist?(@path + "/bare_repo/test/.git/config")) assert(repo.empty?) end def test_repository_clone - destination = Gio::File.path("#{@path}/ggit-clone") + destination = Gio::File.open(:path => "#{@path}/ggit-clone") repo = Ggit::Repository.clone(@url, destination) assert(File.exist?(@path + "/ggit-clone/.git/config")) assert_false(repo.empty?) @@ -44,7 +44,7 @@ class TestRepository < Test::Unit::TestCase def test_repository_bare_clone options = Ggit::CloneOptions.new(:bare => true) - destination = Gio::File.path("#{@path}/ggit-clone-bare") + destination = Gio::File.open(:path => "#{@path}/ggit-clone-bare") repo = Ggit::Repository.clone(@url, destination, options) assert(File.exist?(@path + "/ggit-clone-bare/config")) assert_false(repo.empty?) @@ -53,7 +53,7 @@ class TestRepository < Test::Unit::TestCase def test_repository_checkout_clone options = Ggit::CloneOptions.new(:checkout_branch => "master") - destination = Gio::File.path("#{@path}/ggit-clone-checkout") + destination = Gio::File.open(:path => "#{@path}/ggit-clone-checkout") repo = Ggit::Repository.clone(@url, destination, options) assert(File.exist?(@path + "/ggit-clone-checkout/.git/config")) assert_false(repo.empty?) |
From: Travis CI <bu...@tr...> - 2017-12-04 15:11:13
|
Build Update for ruby-gnome2/native-package-installer ------------------------------------- Build: #61 Status: Passed Duration: 1 minute and 16 seconds Commit: f1ba74a (1.0.6) Author: Kouhei Sutou Message: Add 1.0.6 entry View the changeset: https://github.com/ruby-gnome2/native-package-installer/compare/1.0.6 View the full build log and details: https://travis-ci.org/ruby-gnome2/native-package-installer/builds/311356030?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Kouhei S. <nu...@co...> - 2017-12-04 15:08:57
|
Kouhei Sutou 2017-12-05 00:08:26 +0900 (Tue, 05 Dec 2017) New Revision: f1ba74af5f9dfc437f3ca38ff45f20ede8c562ad https://github.com/ruby-gnome2/native-package-installer/commit/f1ba74af5f9dfc437f3ca38ff45f20ede8c562ad Message: Add 1.0.6 entry Modified files: doc/text/news.md Modified: doc/text/news.md (+18 -0) =================================================================== --- doc/text/news.md 2017-12-05 00:05:35 +0900 (85a300f) +++ doc/text/news.md 2017-12-05 00:08:26 +0900 (13ff3f1) @@ -1,5 +1,23 @@ # News +## 1.0.6 - 2017-12-05 + +### Improvements + + * Added meta character support in package name. + [GitHub#8][Reported by Mamoru TASAKA] + +### Fixes + + * Removed needless ArchLinux fallback from PLD Linux. + [GitHub#7][Reported by Elan Ruusamäe] + +### Thanks + + * Elan Ruusamäe + + * Mamoru TASAKA + ## 1.0.5 - 2017-11-11 ### Improvements |
From: Kouhei S. <nu...@co...> - 2017-12-04 15:06:37
|
Kouhei Sutou 2017-12-05 00:05:35 +0900 (Tue, 05 Dec 2017) New Revision: 8c8f648243e3a30776521e6f549a3a9fc6cf673c https://github.com/ruby-gnome2/native-package-installer/commit/8c8f648243e3a30776521e6f549a3a9fc6cf673c Message: Support meta characters in package name such as "(" GitHub: fix #8 Reported by Mamoru TASAKA. Thanks!!! Modified files: lib/native-package-installer.rb Modified: lib/native-package-installer.rb (+3 -1) =================================================================== --- lib/native-package-installer.rb 2017-11-12 00:08:12 +0900 (7ef8e85) +++ lib/native-package-installer.rb 2017-12-05 00:05:35 +0900 (62a774d) @@ -37,7 +37,9 @@ class NativePackageInstaller return false if package.nil? package_name, *options = package - package_command_line = [package_name, *options].join(" ") + package_command_line = [package_name, *options].collect do |component| + Shellwords.escape(component) + end.join(" ") install_command = "#{@platform.install_command} #{package_command_line}" if have_priviledge? |
From: cedlemo <nu...@co...> - 2017-12-04 01:36:07
|
cedlemo 2017-12-01 19:27:10 +0900 (Fri, 01 Dec 2017) New Revision: 1de880f3ea0bdc0b48473eb6f25e7bfca321ca06 https://github.com/ruby-gnome2/ruby-gnome2/commit/1de880f3ea0bdc0b48473eb6f25e7bfca321ca06 Merged 4c92e1e: Merge pull request #1116 from cedlemo/gtk3_sample_gtk_demo_toolpalette_rb Message: First version of toolpalette demo (non working) Added files: gtk3/sample/gtk-demo/toolpalette.rb Added: gtk3/sample/gtk-demo/toolpalette.rb (+445 -0) 100644 =================================================================== --- /dev/null +++ gtk3/sample/gtk-demo/toolpalette.rb 2017-12-01 19:27:10 +0900 (a1464e0f4) @@ -0,0 +1,445 @@ +# Copyright (c) 2017 Ruby-GNOME2 Project Team +# This program is licenced under the same licence as Ruby-GNOME2. +# +=begin += Tool Palette + + A tool palette widget shows groups of toolbar items as a grid of icons + or a list of names. +=end +class ToolpaletteDemo + def initialize(main_window) + @window = Gtk::Window.new(:toplevel) + @window.screen = main_window.screen + @window.title = "Tool Palette" + @window.set_default_size(200, 600) + @canvas_items = [] + # Add widgets to control the ToolPalette appearance + box = Gtk::Box.new(:vertical, 6) + box.margin= 6 + @window.add(box) + + # Orientation combo box: + orientation_model = Gtk::ListStore.new(String, Integer) + iter = orientation_model.append + iter[0] = "Horizontal" + iter[1] = Gtk::Orientation::HORIZONTAL + iter = orientation_model.append + iter[0] = "Vertical" + iter[1] = Gtk::Orientation::VERTICAL + + combo_orientation = Gtk::ComboBox.new(:model => orientation_model) + cell_renderer = Gtk::CellRendererText.new + combo_orientation.pack_start(cell_renderer, true) + combo_orientation.set_attributes(cell_renderer, "text" => 0) + combo_orientation.active_iter = iter + box.pack_start(combo_orientation, :expand => false, :fill => false, :padding => 0) + + # Style combo box: + style_model = Gtk::ListStore.new(String, Integer) + iter = style_model.append + iter[0] = "Text" + iter[1] = Gtk::ToolbarStyle::TEXT.to_i + iter = style_model.append + iter[0] = "Both" + iter[1] = Gtk::ToolbarStyle::BOTH.to_i + iter = style_model.append + iter[0] = "Both: Horizontal" + iter[1] = Gtk::ToolbarStyle::BOTH_HORIZ.to_i + iter = style_model.append + iter[0] = "Icons" + iter[1] = Gtk::ToolbarStyle::ICONS.to_i + iter = style_model.append + iter[0] = "Default" + iter[1] = -1 # A custom meaning for this demo. + combo_style = Gtk::ComboBox.new(:model => style_model) + cell_renderer = Gtk::CellRendererText.new + combo_style.pack_start(cell_renderer, true) + combo_style.set_attributes(cell_renderer, "text" => 0) + combo_style.active_iter = iter + box.pack_start(combo_style, :expand => false, :fill => false, :padding => 0) + + # Add hbox. + hbox = Gtk::Box.new(:horizontal, 5) + box.pack_start(hbox, :expand => true, :fill => true, :padding => 0) + + # Add and fill the ToolPalette + @palette = Gtk::ToolPalette.new + load_icon_items + load_toggle_items + load_special_items + + palette_scroller = Gtk::ScrolledWindow.new + palette_scroller.set_policy(:never, :automatic) + palette_scroller.margin = 6 + palette_scroller.hexpand = true + palette_scroller.add(@palette) + hbox.add(palette_scroller) + box.show_all + + # Connect signals: + combo_orientation.signal_connect "changed" do |widget| + on_combo_orientation_changed(widget) + end + + combo_style.signal_connect "changed" do |widget| + on_combo_style_changed(widget) + end + + # Kepp the widgets in sync + on_combo_orientation_changed(combo_orientation) + + # Notebook + notebook = Gtk::Notebook.new + notebook.margin = 6 + hbox.pack_end(notebook, :expand => false, :fill => false, :padding => false) + + # DnD for tool items + @palette.signal_connect "drag-data-received" do |widget, context, x, y, selection, info, time| + drag_palette = context.source_widget + drag_item = nil + drop_group = nil + while (drag_palette && drag_palette.class = Gtk::ToolPalette) do + drag_palette = drag_palette.parent + end + + if drag_palette + drag_item = drag_palette.drag_item + drop_group = widget.get_drop_group(x, y) + end + + if drag_item.class == Gtk::ToolItemGroup + palette_drop_group(drag_palette, drag_item, drop_group) + elsif drag_item.class == Gtk::ToolItem && drop_group + allocation = drop_group.allocation + palette_drop_item(drag_item, drop_group, x - allocation.x, y - allocation.y) + end + end + + @palette.add_drag_dest(@palette, Gtk::DestDefaults::ALL, + [Gtk::ToolPaletteDragTargets::ITEMS, + Gtk::ToolPaletteDragTargets::GROUPS], + Gdk::DragAction::COPY) + # Passive DnD dest + contents = Gtk::DrawingArea.new + contents.signal_connect "draw" do |widget, cr| + canvas_draw(widget, cr) + end + contents.signal_connect "drag-data-received" do |widget, context, x, y, selection, info, time| + # find the tool button which is the source of this DnD operation + palette = context.drag_get_source_widget + while (palette && palette.class = Gtk::ToolPalette) do + palette = palette.parent + end + tool_item = nil + tool_item = palette.get_drag_item(selection) if palette + + # append a new canvas item when a tool button was found + if tool_item.class == Gtk::ToolItem + canvas_item = CanvasItem.new + @canvas_items << canvas_item + widget.queue_draw + end + end + @palette.add_drag_dest(@palette, Gtk::DestDefaults::ALL, + [Gtk::ToolPaletteDragTargets::ITEMS], + Gdk::DragAction::COPY) + contents_scroller = Gtk::ScrolledWindow.new + contents_scroller.set_policy(:automatic, :always) + contents_scroller.add(contents) + notebook.append_page(contents_scroller, Gtk::Label.new("Passive DnD Mode")) + contents_scroller.margin = 6 + + # Interactive DnD dest + contents = Gtk::DrawingArea.new + contents.signal_connect "draw" do |widget, cr| + canvas_draw(widget, cr) + end + + contents.signal_connect "drag-motion" do |widget, context, x, y, time| + if @drop_item + # already have a drop indicator - just update position + @drop_item.x = x + @drop_item.y = y + widget.queue_draw + Gdk.drag_status(context, Gdk::DragAction::COPY, time) + else + # request DnD data for creating a drop indicator + target = widget.drag_dest_find_target(context, nil) + return false unless target + @drag_data_requested_for_drop = false + widget.drag_get_data(context, target, time) + end + true + end + + contents.signal_connect "drag-data-received" do |widget, context, x, y, selection, info, time| + # find the tool button which is the source of this DnD operation + palette = context.drag_get_source_widget + while (palette && palette.class = Gtk::ToolPalette) do + palette = palette.parent + end + tool_item = nil + tool_item = palette.get_drag_item(selection) if palette + return unless tool_item.class == Gtk::ToolItem + + item = CanvasItem.new(widget, tool_item, x, y) + + # Either create a new item or just create a preview item, depending on + # why the drag data was requested. + if @drag_data_requested_for_drop + @canvas_items << item + context.drag_finish(true, false, time) + @drop_item = nil + else + @drop_item = item + Gdk.drag_status(context, Gdk::DragAction::COPY, time) + end + widget.queue_draw + end + + contents.signal_connect "drag-leave" do |widget| + @drop_item = nil if @drop_item + widget.queue_draw + end + + contents.signal_connect "drag-drop" do |widget, context, x, y, time| + target = widget.drag_dest_find_target(context, nil) + if target + @drag_data_requested_for_drop = true + widget.drag_get_data(context, target, time) + end + false + end + + @palette.add_drag_dest(contents, Gtk::DestDefaults::HIGHLIGHT, + [Gtk::ToolPaletteDragTargets::ITEMS], + Gdk::DragAction::COPY) + contents_scroller = Gtk::ScrolledWindow.new + contents_scroller.set_policy(:automatic, :always) + contents_scroller.add(contents) + notebook.append_page(contents_scroller, Gtk::Label.new("Interactive DnD Mode")) + end + + def run + if !@window.visible? + @window.show_all + else + @window.destroy + end + @window + end + + private + + def canvas_draw(widget, cr) + cr.set_source_rgb(1, 1, 1) + cr.paint + + @canvas_items.each do |canvas_item| + canvas_item.draw(cr, false) + end + + @drop_item.draw(cr, true) if @drop_item + end + + def palette_drop_group(drag_palette, drag_group, drop_group) + drop_position = -1 + + drop_position = drag_palette.get_group_position(drop_group) if drop_group + drag_palette.set_group_position(drag_group, drop_position) + end + + def palette_drop_item(drag_item, drop_group, x, y) + drag_group = drag_item.parent + drop_item = drop_group.get_drop_item(x, y) + drop_position = -1 + + drop_position = drop_gropu.get_item_position(drop_item) if drop_item + + if drag_group != drop_group + homogeneous = drag_group.child_get_property(drag_item, "homogeneous") + expand = drag_group.child_get_property(drag_item, "expand") + fill = drag_group.child_get_property(drag_item, "fill") + new_row = drag_group.child_get_property(drag_item, "new-row") + drop_group.insert(drag_item, drop_position) + drop_group.child_set(drag_item, "homogeneous" => homogeneous, + "expand" => expand, + "fill" => fill, + "new-row" => new_row) + else + drop_group.set_item_position(drag_item, drop_position) + end + end + + def on_combo_orientation_changed(combo_box) + sw = @palette.parent + iter = combo_box.active_iter + return unless iter + + @palette.orientation = iter[1] + + if @palette.orientation == Gtk::Orientation::HORIZONTAL + sw.set_policy(:automatic, :never) + else + sw.set_policy(:never, :automatic) + end + end + + def on_combo_style_changed(combo_box) + sw = @palette.parent + iter = combo_box.active_iter + return unless iter + + if iter[1] == -1 + @palette.unset_style + else + @palette.style = iter[1] + end + end + + def load_icon_items + max_icons = 10 + icons_count = 0 + icon_theme = Gtk::IconTheme.get_for_screen(@palette.screen) + contexts = icon_theme.contexts + contexts.each do |context| + group = Gtk::ToolItemGroup.new(context) + @palette.add(group) + + next if context == "Animations" + puts "Got context '#{context}" + + icon_names = icon_theme.icons(context) + icon_names.sort + + icon_names.each do |icon_name| + next if icon_name == "emblem-desktop" + next if icon_name =~ /^.*-symbolic$/ + puts "Got icon name '#{icon_name}'" + + item = Gtk::ToolButton.new + item.icon_name = icon_name + item.tooltip_text = icon_name + group.insert(item, -1) + + # Prevent us having an insane number of icons + icons_count += 1 + break if icons_count >= max_icons + end + end + end + + def load_toggle_items + group = Gtk::ToolItemGroup.new("Radio Item") + @palette.add(group) + + toggle_group = nil + + (1..10).each do |i| + label = "##{i.to_s}" + item = Gtk::RadioToolButton.new(toggle_group) + item.label = label + group .insert(item, -1) + toggle_group = item.group + end + end + + def create_entry_item(text) + entry = Gtk::Entry.new + entry.text = text + entry.width_chars = 5 + + item = Gtk::ToolItem.new + item.add(entry) + item + end + + def load_special_items + group = Gtk::ToolItemGroup.new("Advanced Features group") + label_button = Gtk::Button.new(:label => "Advanced Features") + label_button.show + group.label_widget = label_button + @palette.add(group) + + item = create_entry_item("homogeneous=FALSE") + group.insert(item, -1) + group.child_set_property(item, "homogeneous", false) + + item = create_entry_item("homogeneous=FALSE, expand=TRUE") + group.insert(item, -1) + group.child_set_property(item, "homogeneous", false) + group.child_set_property(item, "expand", true) + + item = create_entry_item("homogeneous=FALSE, expand=TRUE, fill=FALSE") + group.insert(item, -1) + group.child_set_property(item, "homogeneous", false) + group.child_set_property(item, "expand", true) + group.child_set_property(item, "fill", false) + + item = create_entry_item("homogeneous=FALSE, expand=TRUE, new-row=TRUE") + group.insert(item, -1) + group.child_set_property(item, "homogeneous", false) + group.child_set_property(item, "expand", true) + group.child_set_property(item, "new-row", true) + + item = Gtk::ToolButton.new + item.icon_name = "go-up" + item.tooltip_text = "Show on vertical palettes only" + group.insert(item, -1) + item.visible_horizontal = false + + item = Gtk::ToolButton.new + item.icon_name = "go-next" + item.tooltip_text = "Show on horizontal palettes only" + group.insert(item, -1) + item.visible_vertical = false + + item = Gtk::ToolButton.new + item.icon_name = "edit-delete" + item.tooltip_text = "Do not show at all" + group.insert(item, -1) + item.no_show_all = true + + item = Gtk::ToolButton.new + item.icon_name = "view-fullscreen" + item.tooltip_text = "Expanded this item" + group.insert(item, -1) + group.child_set_property(item, "homogeneous", false) + group.child_set_property(item, "expand", true) + + item = Gtk::ToolButton.new + item.icon_name = "help-browser" + item.tooltip_text = "A regular item" + group.insert(item, -1) + end +end + +class CanvasItem + attr_reader :pixbuf, :x, :y + + def initialize(widget, button, x, y) + icon_name = button.icon_name + icon_theme = Gtk::IconTheme.get_for_screen(widget.screen) + Gtk::IconSize.lookup(:dialog) + @pixbuf = Gtk::IconTheme.load_icon(icon_theme, + icon_name, + width, + Gtk::IconLookup::GENERIC_FALLBACK) + return nil unless @pixbuf + @x = x + @y = y + end + + def draw(cr, preview) + cx = @pixbuf.width + cy = @pixbuf.height + cr.set_source_pixbuf(@pixbuf, @x - cx * 0.5, @y - cy * 0.5) + + if preview + cr.paint_with_alpha(0.6) + else + cr.paint + end + end +end |