summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml1
-rw-r--r--applets/clock/clock.c17
-rw-r--r--applets/clock/clock.ui3
-rw-r--r--mate-panel/panel-menu-button.c2
-rw-r--r--mate-panel/panel.c16
5 files changed, 29 insertions, 10 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b8c41274..ba2e0155 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -71,6 +71,7 @@ env:
clang
gcc
git
+ glib2-devel
gobject-introspection
gtk-layer-shell
itstool
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index e823d37c..fee7edf2 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -1248,6 +1248,7 @@ location_tile_need_clock_format_cb(ClockLocationTile *tile, gpointer data)
static void
create_cities_section (ClockData *cd)
{
+ GtkWidget *cities_box;
GSList *node;
GSList *cities;
GSList *l;
@@ -1261,8 +1262,16 @@ create_cities_section (ClockData *cd)
g_slist_free (cd->location_tiles);
cd->location_tiles = NULL;
- cd->cities_section = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- gtk_container_set_border_width (GTK_CONTAINER (cd->cities_section), 0);
+ cd->cities_section = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (cd->cities_section),
+ GTK_POLICY_NEVER,
+ GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (cd->cities_section),
+ GTK_SHADOW_NONE);
+ gtk_scrolled_window_set_propagate_natural_height (GTK_SCROLLED_WINDOW (cd->cities_section),
+ TRUE);
+
+ cities_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
cities = cd->locations;
if (g_slist_length (cities) == 0) {
@@ -1284,7 +1293,7 @@ create_cities_section (ClockData *cd)
g_signal_connect (city, "need-clock-format",
G_CALLBACK (location_tile_need_clock_format_cb), cd);
- gtk_box_pack_start (GTK_BOX (cd->cities_section),
+ gtk_box_pack_start (GTK_BOX (cities_box),
GTK_WIDGET (city),
FALSE, FALSE, 0);
@@ -1295,6 +1304,8 @@ create_cities_section (ClockData *cd)
g_slist_free (node);
+ gtk_container_add (GTK_CONTAINER (cd->cities_section), cities_box);
+
gtk_box_pack_end (GTK_BOX (cd->clock_vbox),
cd->cities_section, FALSE, FALSE, 0);
diff --git a/applets/clock/clock.ui b/applets/clock/clock.ui
index fb62507c..b4c4f1b8 100644
--- a/applets/clock/clock.ui
+++ b/applets/clock/clock.ui
@@ -606,8 +606,9 @@
<object class="GtkScrolledWindow" id="scrolledwindow10">
<property name="visible">True</property>
<property name="can-focus">True</property>
+ <property name="expand">True</property>
<property name="hscrollbar-policy">never</property>
- <property name="vscrollbar-policy">never</property>
+ <property name="vscrollbar-policy">automatic</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="cities_list">
diff --git a/mate-panel/panel-menu-button.c b/mate-panel/panel-menu-button.c
index 92925fd8..e65a99d6 100644
--- a/mate-panel/panel-menu-button.c
+++ b/mate-panel/panel-menu-button.c
@@ -694,6 +694,8 @@ panel_menu_button_load (const char *menu_path,
return;
}
+ gtk_widget_set_name (GTK_WIDGET (button), "mate-panel-main-menu-button");
+
button->priv->applet_id = g_strdup (info->id);
mate_panel_applet_add_callback (info, "help", "help-browser", _("_Help"), NULL);
diff --git a/mate-panel/panel.c b/mate-panel/panel.c
index e854cf73..065d2090 100644
--- a/mate-panel/panel.c
+++ b/mate-panel/panel.c
@@ -454,7 +454,8 @@ set_background_image_from_uri (PanelToplevel *toplevel,
static gboolean
set_background_color (PanelToplevel *toplevel,
- guint16 *dropped)
+ guint16 *dropped,
+ gint length)
{
GdkRGBA color;
@@ -465,10 +466,11 @@ set_background_color (PanelToplevel *toplevel,
! panel_profile_background_key_is_writable (toplevel, "type"))
return FALSE;
- color.red = dropped [0];
- color.green = dropped [1];
- color.blue = dropped [2];
- color.alpha = 1.;
+ const gdouble scale = 1.0 / 65535.0;
+ color.red = dropped[0] * scale;
+ color.green = dropped[1] * scale;
+ color.blue = dropped[2] * scale;
+ color.alpha = (length > 3) ? dropped[3] * scale : 1.0;
panel_profile_set_background_color (toplevel, &color);
panel_profile_set_background_type (toplevel, PANEL_BACK_COLOR);
@@ -1232,7 +1234,9 @@ panel_receive_dnd_data (PanelWidget *panel,
success = drop_url (panel, pos, (char *)data);
break;
case TARGET_COLOR:
- success = set_background_color (panel->toplevel, (guint16 *) data);
+ gint n_bytes = gtk_selection_data_get_length (selection_data);
+ gint length = n_bytes / sizeof (guint16);
+ success = set_background_color (panel->toplevel, (guint16 *) data, length);
break;
case TARGET_BGIMAGE:
success = set_background_image_from_uri (panel->toplevel, (char *) data);