gtk_paradise 0.5.442 → 0.5.447

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gtk_paradise might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aeaeb18515c9ea4f117a56d15c99b591ed6f196c70493bf4a1c82e2760582fd9
4
- data.tar.gz: c2a992f4d6cf14a3d701d3efc3e69ed841510a9f9a1bfc84fb03e5ab53c759cf
3
+ metadata.gz: c032ef161e3dc0d38cb158c529e235d26d9bb67a658e84bbee2a2161b9be44ce
4
+ data.tar.gz: be260171fee84b9bd11328f5106d23ba474e3c6946965e731a04a408687eb79c
5
5
  SHA512:
6
- metadata.gz: 9648b1b182dd002820aa5df4cdc0f417b44eef9c2da77c91e11af9d341e607e79b7ec67ceca828afd3941687d81b8e9ce5a9ec253a74bf8e6d1afa6b67619ed3
7
- data.tar.gz: dc16ca13b9fa3292b6ea794ffa76858f041ad7263cd1fee693c944428b80cbaae0837b5f87fbc4005b366c6b9c0926e88acc7ae8987f7d36499848a33ffad91d
6
+ metadata.gz: 53dec8f0f87c53d47dba2533a49f4994bf45902af3d7dc81e910a959aa4cab7946e3ef3717ef105709f571b333bc8e9c56127ded8df24345820602d1a2acde5a
7
+ data.tar.gz: f9dc938dc6d6e2e8f05bf80df9e6cdfe7fd780b04ac4d60f36096f143262828e63bf707d8ecffc6b76ee8beb54fec241c68eb019c339035e292d8d6bad3e0d18
data/README.md CHANGED
@@ -2187,32 +2187,6 @@ the future this may become more dynamic or selectable, but for now, if
2187
2187
  you need different colours, simply keep on clicking that button on the
2188
2188
  button of the widget.
2189
2189
 
2190
- ## Gtk::Grid
2191
-
2192
- **class Gtk::Grid** can be used to position widgets in a grid-like
2193
- layout.
2194
-
2195
- Usage example:
2196
-
2197
- grid = Gtk::Grid.new
2198
-
2199
- b1 = Gtk::Button.new(label: 'Button')
2200
- grid.attach(b1, 0, 0, 1, 1)
2201
-
2202
- b2 = Gtk::CheckButton.new()
2203
- grid.attach(b2, 1, 0, 1, 1)
2204
-
2205
- b3 = Gtk::RadioButton.new(label: 'abc')
2206
- grid.attach(b3, 2, 0, 1, 1)
2207
-
2208
- The values that can be supplied to **.attach()** are as follows:
2209
-
2210
- child # the widget to add
2211
- left # the column number to attach the left side of child to
2212
- top # the row number to attach the top side of child to
2213
- width # the number of columns that child will span
2214
- height # the number of rows that child will span
2215
-
2216
2190
  ## Gtk::Editor
2217
2191
 
2218
2192
  I am working on a gtk-editor for ruby-gtk3 as well.
@@ -2393,12 +2367,36 @@ You could also use this via a reinstate-back delay, like:
2393
2367
  Note that this has not very well been tested so far. I just wanted
2394
2368
  to see if it is possible in ruby-gtk3 and CSS, and it indeed is! \o/
2395
2369
 
2396
- ## Gtk::Grid and gtk_grid
2370
+ ## Gtk::Grid and gtk_grid()
2397
2371
 
2398
- The gtk_paradise project makes use of gtk_grid() to create a grid
2372
+ **class Gtk::Grid** can be used to position widgets in a grid-like
2399
2373
  layout.
2400
2374
 
2401
- Example:
2375
+ Specific usage example in plain **ruby-gtk3**:
2376
+
2377
+ grid = Gtk::Grid.new
2378
+
2379
+ b1 = Gtk::Button.new(label: 'Button')
2380
+ grid.attach(b1, 0, 0, 1, 1)
2381
+
2382
+ b2 = Gtk::CheckButton.new()
2383
+ grid.attach(b2, 1, 0, 1, 1)
2384
+
2385
+ b3 = Gtk::RadioButton.new(label: 'abc')
2386
+ grid.attach(b3, 2, 0, 1, 1)
2387
+
2388
+ The values that can be supplied to **.attach()** are as follows:
2389
+
2390
+ child # the widget to add
2391
+ left # the column number to attach the left side of child to
2392
+ top # the row number to attach the top side of child to
2393
+ width # the number of columns that child will span
2394
+ height # the number of rows that child will span
2395
+
2396
+ The gtk_paradise project makes use of **gtk_grid()** in order to
2397
+ create a grid layout, if you make use of **Gtk::BaseModule**.
2398
+
2399
+ Example for this:
2402
2400
 
2403
2401
  @grid = gtk_grid
2404
2402
  @grid.set_column_spacing(6)
data/doc/README.gen CHANGED
@@ -2185,32 +2185,6 @@ the future this may become more dynamic or selectable, but for now, if
2185
2185
  you need different colours, simply keep on clicking that button on the
2186
2186
  button of the widget.
2187
2187
 
2188
- ## Gtk::Grid
2189
-
2190
- **class Gtk::Grid** can be used to position widgets in a grid-like
2191
- layout.
2192
-
2193
- Usage example:
2194
-
2195
- grid = Gtk::Grid.new
2196
-
2197
- b1 = Gtk::Button.new(label: 'Button')
2198
- grid.attach(b1, 0, 0, 1, 1)
2199
-
2200
- b2 = Gtk::CheckButton.new()
2201
- grid.attach(b2, 1, 0, 1, 1)
2202
-
2203
- b3 = Gtk::RadioButton.new(label: 'abc')
2204
- grid.attach(b3, 2, 0, 1, 1)
2205
-
2206
- The values that can be supplied to **.attach()** are as follows:
2207
-
2208
- child # the widget to add
2209
- left # the column number to attach the left side of child to
2210
- top # the row number to attach the top side of child to
2211
- width # the number of columns that child will span
2212
- height # the number of rows that child will span
2213
-
2214
2188
  ## Gtk::Editor
2215
2189
 
2216
2190
  I am working on a gtk-editor for ruby-gtk3 as well.
@@ -2391,12 +2365,36 @@ You could also use this via a reinstate-back delay, like:
2391
2365
  Note that this has not very well been tested so far. I just wanted
2392
2366
  to see if it is possible in ruby-gtk3 and CSS, and it indeed is! \o/
2393
2367
 
2394
- ## Gtk::Grid and gtk_grid
2368
+ ## Gtk::Grid and gtk_grid()
2395
2369
 
2396
- The gtk_paradise project makes use of gtk_grid() to create a grid
2370
+ **class Gtk::Grid** can be used to position widgets in a grid-like
2397
2371
  layout.
2398
2372
 
2399
- Example:
2373
+ Specific usage example in plain **ruby-gtk3**:
2374
+
2375
+ grid = Gtk::Grid.new
2376
+
2377
+ b1 = Gtk::Button.new(label: 'Button')
2378
+ grid.attach(b1, 0, 0, 1, 1)
2379
+
2380
+ b2 = Gtk::CheckButton.new()
2381
+ grid.attach(b2, 1, 0, 1, 1)
2382
+
2383
+ b3 = Gtk::RadioButton.new(label: 'abc')
2384
+ grid.attach(b3, 2, 0, 1, 1)
2385
+
2386
+ The values that can be supplied to **.attach()** are as follows:
2387
+
2388
+ child # the widget to add
2389
+ left # the column number to attach the left side of child to
2390
+ top # the row number to attach the top side of child to
2391
+ width # the number of columns that child will span
2392
+ height # the number of rows that child will span
2393
+
2394
+ The gtk_paradise project makes use of **gtk_grid()** in order to
2395
+ create a grid layout, if you make use of **Gtk::BaseModule**.
2396
+
2397
+ Example for this:
2400
2398
 
2401
2399
  @grid = gtk_grid
2402
2400
  @grid.set_column_spacing(6)
@@ -515,11 +515,11 @@ button1:hover {
515
515
  .plum { color: plum }
516
516
  .powderblue { color: powderblue }
517
517
  .purple { color: purple }
518
- .red { color: red }
519
- .rosybrown { color: rosybrown }
520
- .royalblue { color: royalblue }
518
+ .red { color: red }
519
+ .rosybrown { color: rosybrown }
520
+ .royalblue { color: royalblue }
521
521
  .saddlebrown { color: saddlebrown }
522
- .salmon { color: salmon }
522
+ .salmon { color: salmon }
523
523
  .sandybrown { color: sandybrown }
524
524
  .seagreen { color: seagreen }
525
525
  .seashell { color: seashell }
@@ -15,6 +15,13 @@ class Grid
15
15
  # ========================================================================= #
16
16
  @grid_top_position = 0
17
17
 
18
+ # ========================================================================= #
19
+ # === Gtk::Grid.reset_the_grid_top_position
20
+ # ========================================================================= #
21
+ def self.reset_the_grid_top_position
22
+ @grid_top_position = 0
23
+ end
24
+
18
25
  # ========================================================================= #
19
26
  # === Gtk::Grid.grid_top_position?
20
27
  # ========================================================================= #
@@ -29,6 +36,13 @@ class Grid
29
36
  @grid_top_position += by
30
37
  end
31
38
 
39
+ # ========================================================================= #
40
+ # === new_row
41
+ # ========================================================================= #
42
+ def new_row
43
+ ::Gtk::Grid.increment_the_grid_top_position
44
+ end
45
+
32
46
  # ========================================================================= #
33
47
  # === set_left
34
48
  #
@@ -37,9 +51,9 @@ class Grid
37
51
  def set_left(
38
52
  i,
39
53
  left_position = 0,
40
- top_position = ::Gtk::Grid.grid_top_position?,
41
- width = 1,
42
- height = 1
54
+ top_position = ::Gtk::Grid.grid_top_position?,
55
+ width = 1,
56
+ height = 1
43
57
  )
44
58
  attach(i, left_position, top_position, width, height) # .attach(child_widget, left_pos, top_pos, width, height)
45
59
  end; alias left set_left # === left
@@ -60,6 +74,20 @@ class Grid
60
74
  ::Gtk::Grid.increment_the_grid_top_position # Add +1 to the grid-counter too.
61
75
  end; alias right set_right # === right
62
76
 
77
+ # ========================================================================= #
78
+ # === no_column_spacing
79
+ # ========================================================================= #
80
+ def no_column_spacing
81
+ set_column_spacing(0)
82
+ end
83
+
84
+ # ========================================================================= #
85
+ # === no_row_spacing
86
+ # ========================================================================= #
87
+ def no_row_spacing
88
+ set_row_spacing(0)
89
+ end
90
+
63
91
  end
64
92
 
65
93
  # =========================================================================== #
@@ -16,6 +16,7 @@ class TreeViewColumn
16
16
  def sort_based_on(id = 0)
17
17
  set_sort_column_id(id)
18
18
  end; alias sortable_based_on sort_based_on # === sortable_based_on
19
+ alias sort_via sort_based_on # === sort_via
19
20
 
20
21
  # ========================================================================= #
21
22
  # === cell_renderers?
@@ -13,6 +13,36 @@ class Widget
13
13
  require 'gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb'
14
14
  require 'gtk_paradise/fonts/fonts.rb'
15
15
 
16
+ # ========================================================================= #
17
+ # === add_css_class
18
+ #
19
+ # This method can be used to quickly add a css class.
20
+ #
21
+ # Example how to use it via the gtk_paradise gem:
22
+ #
23
+ # label = gtk_label('This is a test')
24
+ # label.add_css_class('BG_black')
25
+ # label.add_css_class('yellow')
26
+ #
27
+ # ========================================================================= #
28
+ def add_css_class(i)
29
+ style_context.add_class(i) if respond_to? :style_context
30
+ end; alias css_class add_css_class # === css_class
31
+ alias css add_css_class # === css
32
+ alias set_class add_css_class # === set_class
33
+ alias add_class add_css_class # === add_class
34
+
35
+ # ========================================================================= #
36
+ # === remove_css_class
37
+ #
38
+ # This method can be used to remove a particular CSS class from a
39
+ # widget.
40
+ # ========================================================================= #
41
+ def remove_css_class(this_css_class)
42
+ context = style_context
43
+ context.remove_class(this_css_class)
44
+ end
45
+
16
46
  # ========================================================================= #
17
47
  # === focus_in_event
18
48
  # ========================================================================= #
@@ -292,35 +322,6 @@ class Widget
292
322
  select_region(0, 0)
293
323
  end
294
324
 
295
- # ========================================================================= #
296
- # === add_css_class
297
- #
298
- # This method can be used to quickly add a css class.
299
- #
300
- # Example how to use it via the gtk_paradise gem:
301
- #
302
- # label = gtk_label('This is a test')
303
- # label.add_css_class('BG_black')
304
- # label.add_css_class('yellow')
305
- #
306
- # ========================================================================= #
307
- def add_css_class(i)
308
- style_context.add_class(i) if respond_to? :style_context
309
- end; alias css_class add_css_class # === css_class
310
- alias css add_css_class # === css
311
- alias set_class add_css_class # === set_class
312
-
313
- # ========================================================================= #
314
- # === remove_css_class
315
- #
316
- # This method can be used to remove a particular CSS class from a
317
- # widget.
318
- # ========================================================================= #
319
- def remove_css_class(this_css_class)
320
- context = style_context
321
- context.remove_class(this_css_class)
322
- end
323
-
324
325
  # ========================================================================= #
325
326
  # === enable_markup
326
327
  # ========================================================================= #
@@ -1117,12 +1117,13 @@ module RunnerModule
1117
1117
  def determine_the_title_from_the_child_widget(
1118
1118
  child_widget = @child_widget
1119
1119
  )
1120
- if child_widget.respond_to? :title?
1120
+ if child_widget and child_widget.respond_to?(:title?)
1121
1121
  set_title(
1122
1122
  child_widget.title?
1123
1123
  )
1124
1124
  else
1125
- e 'The child-widget does not respond to the method called .title?'
1125
+ e 'The child-widget (class '+child_widget.name.to_s+
1126
+ ') does not respond to the method called .title?' unless child_widget.nil?
1126
1127
  end
1127
1128
  end; alias automatic_title determine_the_title_from_the_child_widget # === automatic_title
1128
1129
  alias determine_the_title determine_the_title_from_the_child_widget # === determine_the_title
@@ -9,14 +9,14 @@ module Gtk
9
9
  # ========================================================================= #
10
10
  # === VERSION_OF_THE_GTK_PARADISE_PROJECT
11
11
  # ========================================================================= #
12
- VERSION_OF_THE_GTK_PARADISE_PROJECT = '0.5.442'
12
+ VERSION_OF_THE_GTK_PARADISE_PROJECT = '0.5.447'
13
13
 
14
14
  # ========================================================================= #
15
15
  # === LAST_UPDATE
16
16
  #
17
17
  # Keep track as to when this project was last updated.
18
18
  # ========================================================================= #
19
- LAST_UPDATE = '05.03.2021'
19
+ LAST_UPDATE = '06.03.2021'
20
20
 
21
21
  end
22
22
 
@@ -28,12 +28,13 @@ module PsauxViewerModule
28
28
  # === TITLE
29
29
  # ========================================================================= #
30
30
  TITLE =
31
- "Process Viewer - updating every #{REFRESH_EVERY_N_SECONDS} seconds"
31
+ "Process Viewer - updating every "\
32
+ "#{REFRESH_EVERY_N_SECONDS} seconds"
32
33
 
33
34
  # ========================================================================= #
34
35
  # === WIDTH
35
36
  # ========================================================================= #
36
- WIDTH = 1440
37
+ WIDTH = 1600
37
38
 
38
39
  # ========================================================================= #
39
40
  # === HEIGHT
@@ -128,22 +129,6 @@ module PsauxViewerModule
128
129
  }
129
130
  end
130
131
 
131
- # ========================================================================= #
132
- # === create_the_update_button
133
- #
134
- # This is the button that can be used by the user to update the
135
- # process-listing.
136
- # ========================================================================= #
137
- def create_the_update_button
138
- @button_update_the_content = gtk_button('_Update')
139
- @button_update_the_content.fancy_tooltips = 'Click this button '\
140
- 'to <b>update</b> the liststore shown above.'
141
- @button_update_the_content.set_background_colour :mintcream
142
- @button_update_the_content.on_clicked {
143
- update_the_liststore
144
- }
145
- end
146
-
147
132
  # ========================================================================= #
148
133
  # === run
149
134
  # ========================================================================= #
@@ -169,6 +154,9 @@ module PsauxViewerModule
169
154
  treeview.quick_append('Start', renderer, text: 8)
170
155
  treeview.quick_append('Time', renderer, text: 9)
171
156
  treeview.quick_append('Command', renderer, text: 10)
157
+ columns = treeview.columns?
158
+ columns[1].sort_via(1)
159
+ columns[2].sort_via(2)
172
160
  # ======================================================================= #
173
161
  # Create a separate thread that loops timely to make the
174
162
  # process update transparent.
@@ -203,11 +191,27 @@ module PsauxViewerModule
203
191
  _ = ::Gtk::PsauxViewer.new
204
192
  r = ::Gtk.run
205
193
  r << _
206
- r.set_size_request(
207
- _.width?,
208
- _.height?
209
- )
194
+ r.automatic_title
195
+ r.automatic_size
210
196
  r.top_left_then_run
211
197
  end
212
198
 
199
+ # ========================================================================= #
200
+ # === create_the_update_button
201
+ #
202
+ # This is the button that can be used by the user to update the
203
+ # process-listing.
204
+ # ========================================================================= #
205
+ def create_the_update_button
206
+ @button_update_the_content = gtk_button('_Update')
207
+ @button_update_the_content.bblack1
208
+ @button_update_the_content.make_bold
209
+ @button_update_the_content.hint = 'Click this button '\
210
+ 'to <b>update</b> the liststore shown above.'
211
+ @button_update_the_content.set_background_colour :mintcream
212
+ @button_update_the_content.on_clicked {
213
+ update_the_liststore
214
+ }
215
+ end
216
+
213
217
  end; end
@@ -1188,7 +1188,7 @@ multimedia:
1188
1188
  y_pos: 4
1189
1189
 
1190
1190
  # =========================================================================== #
1191
- # === Ruby GTK Apps
1191
+ # === Ruby GTK Apps (ruby tag, gtk tag)
1192
1192
  #
1193
1193
  # 15) Ruby GTK Apps.
1194
1194
  # 15 tag
@@ -1223,21 +1223,37 @@ ruby_gtk_apps:
1223
1223
  cmd: $RUBY_SRC/ascii_paradise/lib/ascii_paradise/gui/gtk3/animated_frame/widget.rb
1224
1224
  img_dir: $IMG/PC/OS/LINUX/GUI/KDE/
1225
1225
  icon: KONSOLE.png
1226
- x_pos: 3
1227
- y_pos: 0
1226
+ x_pos: 0
1227
+ y_pos: 1
1228
1228
 
1229
1229
  gtk_play_from_radio_station:
1230
1230
  name: Play from a radio station
1231
1231
  cmd: $RUBY_SRC/multimedia_paradise/lib/multimedia_paradise/gui/gtk3/play_from_radio_station/play_from_radio_station.rb
1232
1232
  img_dir: $IMG/PC/OS/LINUX/GUI/KDE/
1233
1233
  icon: KONSOLE.png
1234
- x_pos: 4
1235
- y_pos: 0
1234
+ x_pos: 1
1235
+ y_pos: 1
1236
1236
 
1237
1237
  gtk_shell:
1238
1238
  name: The gtk-shell (in ruby)
1239
1239
  cmd: roebe --gtk-shell
1240
1240
  img_dir: $IMG/PC/OS/LINUX/GUI/KDE/
1241
1241
  icon: KONSOLE.png
1242
- x_pos: 0
1242
+ x_pos: 2
1243
1243
  y_pos: 1
1244
+
1245
+ gtk_confree_GUI:
1246
+ name: A wrapper over cfdg
1247
+ cmd: image_paradise --cfdg-GUI
1248
+ img_dir: $IMG/PC/OS/LINUX/GUI/KDE/
1249
+ icon: KONSOLE.png
1250
+ x_pos: 0
1251
+ y_pos: 2
1252
+
1253
+ gtk_image_manipulation:
1254
+ name: Image-manipulation via a ruby-gtk3 widget
1255
+ cmd: image_paradise --gtk-image-manipulation
1256
+ img_dir: $IMG/PC/OS/LINUX/GUI/KDE/
1257
+ icon: KONSOLE.png
1258
+ x_pos: 1
1259
+ y_pos: 2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk_paradise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.442
4
+ version: 0.5.447
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert A. Heiler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-05 00:00:00.000000000 Z
11
+ date: 2021-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colours