Add patch to make moblin backend compile
This commit is contained in:
parent
358b73ee6e
commit
5c075ce739
@ -24,6 +24,9 @@ BuildRequires: intltool desktop-file-utils gettext gtk-doc
|
||||
|
||||
BuildRequires: gobject-introspection-devel
|
||||
|
||||
# Upstream patch
|
||||
Patch0: moblin-gtk3.patch
|
||||
|
||||
Obsoletes: bluez-pin
|
||||
Provides: dbus-bluez-pin-helper
|
||||
Conflicts: bluez-gnome <= 1.8
|
||||
@ -79,6 +82,7 @@ This package contains the Moblin user interface for gnome-bluetooth.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .moblin-gtk3
|
||||
|
||||
%build
|
||||
%configure --disable-desktop-update --disable-icon-update --enable-nautilus-sendto=yes --disable-schemas-compile
|
||||
|
152
moblin-gtk3.patch
Normal file
152
moblin-gtk3.patch
Normal file
@ -0,0 +1,152 @@
|
||||
diff --git a/moblin/main.c b/moblin/main.c
|
||||
index 64edd30..bfce497 100644
|
||||
--- a/moblin/main.c
|
||||
+++ b/moblin/main.c
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <glib/gi18n.h>
|
||||
-#include <mx/mx-gtk.h>
|
||||
+#include <mx-gtk/mx-gtk.h>
|
||||
#include <moblin-panel/mpl-panel-common.h>
|
||||
#include <moblin-panel/mpl-panel-gtk.h>
|
||||
#include <bluetooth-enums.h>
|
||||
@@ -114,7 +114,7 @@ main (int argc, char *argv[])
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "delete-event", (GCallback) gtk_main_quit,
|
||||
NULL);
|
||||
- gtk_widget_set_size_request (window, 1000, -1);
|
||||
+ gtk_window_set_default_size (GTK_WINDOW (window), 1000, -1);
|
||||
content = moblin_panel_new ();
|
||||
gtk_widget_show (content);
|
||||
|
||||
@@ -160,7 +160,7 @@ main (int argc, char *argv[])
|
||||
gtk_widget_show (content);
|
||||
gtk_box_pack_start (GTK_BOX (box), content, TRUE, TRUE, 0);
|
||||
|
||||
- gtk_widget_size_request (window, &req);
|
||||
+ gtk_widget_get_preferred_size (window, NULL, &req);
|
||||
mpl_panel_client_set_height_request (panel, req.height);
|
||||
}
|
||||
|
||||
diff --git a/moblin/moblin-copy-n-paste/mux-banner.c b/moblin/moblin-copy-n-paste/mux-banner.c
|
||||
index ae815bb..9fce5dc 100644
|
||||
--- a/moblin/moblin-copy-n-paste/mux-banner.c
|
||||
+++ b/moblin/moblin-copy-n-paste/mux-banner.c
|
||||
@@ -38,28 +38,21 @@ mux_banner_realize (GtkWidget *widget)
|
||||
GTK_WIDGET_CLASS (mux_banner_parent_class)->realize (widget);
|
||||
|
||||
gdk_color_parse ("#d7d9d6", &banner->priv->colour);
|
||||
- gdk_colormap_alloc_color (gtk_widget_get_colormap (widget),
|
||||
- &banner->priv->colour,
|
||||
- FALSE, TRUE);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
-mux_banner_expose (GtkWidget *widget, GdkEventExpose *event)
|
||||
+mux_banner_draw (GtkWidget *widget, cairo_t *cr)
|
||||
{
|
||||
MuxBanner *banner = MUX_BANNER (widget);
|
||||
- GdkWindow *window;
|
||||
- GdkGC *gc;
|
||||
+ GtkAllocation allocation;
|
||||
|
||||
- window = gtk_widget_get_window (widget);
|
||||
- gc = gdk_gc_new (window);
|
||||
- gdk_gc_set_foreground (gc, &banner->priv->colour);
|
||||
+ gtk_widget_get_allocation (widget, &allocation);
|
||||
|
||||
- gdk_draw_rectangle (window, gc, TRUE,
|
||||
- event->area.x, event->area.y,
|
||||
- event->area.width, event->area.height);
|
||||
+ gdk_cairo_set_source_color (cr, &banner->priv->colour);
|
||||
+ cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
|
||||
+ cairo_paint (cr);
|
||||
|
||||
-
|
||||
- return GTK_WIDGET_CLASS (mux_banner_parent_class)->expose_event (widget, event);
|
||||
+ return GTK_WIDGET_CLASS (mux_banner_parent_class)->draw (widget, cr);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -68,7 +61,7 @@ mux_banner_class_init (MuxBannerClass *klass)
|
||||
GtkWidgetClass *w_class = (GtkWidgetClass *)klass;
|
||||
|
||||
w_class->realize = mux_banner_realize;
|
||||
- w_class->expose_event = mux_banner_expose;
|
||||
+ w_class->draw = mux_banner_draw;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (MuxBannerPrivate));
|
||||
}
|
||||
diff --git a/moblin/moblin-copy-n-paste/mux-cell-renderer-text.c b/moblin/moblin-copy-n-paste/mux-cell-renderer-text.c
|
||||
index 80f0ea6..ce83ed8 100644
|
||||
--- a/moblin/moblin-copy-n-paste/mux-cell-renderer-text.c
|
||||
+++ b/moblin/moblin-copy-n-paste/mux-cell-renderer-text.c
|
||||
@@ -12,7 +12,7 @@ enum {
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static gboolean
|
||||
-contains (GdkRectangle *rect, gint x, gint y)
|
||||
+contains (const GdkRectangle *rect, gint x, gint y)
|
||||
{
|
||||
return (rect->x + rect->width) > x && rect->x <= x &&
|
||||
(rect->y + rect->height) > y && rect->y <= y;
|
||||
@@ -23,8 +23,8 @@ mux_cell_renderer_text_activate (GtkCellRenderer *cell,
|
||||
GdkEvent *event,
|
||||
GtkWidget *widget,
|
||||
const gchar *path,
|
||||
- GdkRectangle *bg_area,
|
||||
- GdkRectangle *cell_area,
|
||||
+ const GdkRectangle *bg_area,
|
||||
+ const GdkRectangle *cell_area,
|
||||
GtkCellRendererState flags)
|
||||
{
|
||||
gdouble x, y;
|
||||
@@ -43,19 +43,17 @@ mux_cell_renderer_text_activate (GtkCellRenderer *cell,
|
||||
|
||||
static void
|
||||
mux_cell_renderer_text_render (GtkCellRenderer *cell,
|
||||
- GdkDrawable *window,
|
||||
+ cairo_t *cr,
|
||||
GtkWidget *widget,
|
||||
- GdkRectangle *bg_area,
|
||||
- GdkRectangle *cell_area,
|
||||
- GdkRectangle *expose_area,
|
||||
+ const GdkRectangle *bg_area,
|
||||
+ const GdkRectangle *cell_area,
|
||||
GtkCellRendererState flags)
|
||||
{
|
||||
GTK_CELL_RENDERER_CLASS (mux_cell_renderer_text_parent_class)->render (cell,
|
||||
- window,
|
||||
+ cr,
|
||||
widget,
|
||||
bg_area,
|
||||
cell_area,
|
||||
- expose_area,
|
||||
GTK_CELL_RENDERER_SELECTED);
|
||||
}
|
||||
|
||||
diff --git a/moblin/moblin-panel.c b/moblin/moblin-panel.c
|
||||
index 94d03fd..3c6f962 100644
|
||||
--- a/moblin/moblin-panel.c
|
||||
+++ b/moblin/moblin-panel.c
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <glib/gi18n.h>
|
||||
#include <math.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
-#include <mx/mx-gtk.h>
|
||||
+#include <mx-gtk/mx-gtk.h>
|
||||
|
||||
#include "bluetooth-client.h"
|
||||
#include "bluetooth-client-private.h"
|
||||
@@ -399,8 +399,8 @@ entry_custom_event (GtkWidget *entry, GdkEventKey *event)
|
||||
if (event->length == 0)
|
||||
return FALSE;
|
||||
|
||||
- if ((event->keyval >= GDK_0 && event->keyval <= GDK_9) ||
|
||||
- (event->keyval >= GDK_KP_0 && event->keyval <= GDK_KP_9))
|
||||
+ if ((event->keyval >= GDK_KEY_0 && event->keyval <= GDK_KEY_9) ||
|
||||
+ (event->keyval >= GDK_KEY_KP_0 && event->keyval <= GDK_KEY_KP_9))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
Loading…
Reference in New Issue
Block a user