Skip to content

Commit

Permalink
More porting work along with fixes and cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
mratajsky authored and infirit committed Oct 9, 2014
1 parent 25445eb commit 0c558fa
Show file tree
Hide file tree
Showing 26 changed files with 3,684 additions and 2,883 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ MATE:
Perberos <[email protected]>
Steve Zesch <[email protected]>
Stefano Karapetsas <[email protected]>
Michal Ratajsky <[email protected]>

GNOME Maintainers:
Marc-Andre Lureau <[email protected]>
Expand Down
8 changes: 7 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
Version 1.9.0
=============

- ...
- Removed gst-mixer and gst-mixer-applet
- mate-volume-control: Port from PulseAudio to libmatemixer
- mate-volume-control: Allow selecting input and output connectors
- mate-volume-control: Speaker test widget now contains a Close button
- mate-volume-control: Device and stream lists are now sorted
- mate-volume-control-applet: Do not show icons when on a vertical panel
- mate-volume-control-applet: Allow clicking in the popup window

=============
Version 1.8.0
Expand Down
11 changes: 1 addition & 10 deletions README
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
These are the MATE media tools for MATE:

mate-volume-control - PulseAudio based volume control applets.
grecord - MATE Sound Recorder.
gstreamer-properties - GStreamer Properties Capplet.
profiles - Audio Profile library.

gst-mixer - MATE GStreamer-based audio mixer. (deprecated)
mate-volume-control - MATE volume control application and applet

Refer to the following files for license information for each sub-component
of mate-media:

gstreamer-properties - COPYING
mate-volume-control - COPYING
grecord - COPYING.grecord
gst-mixer - COPYING.gst-mixer
profiles - COPYING.profiles
documentation - COPYING-DOCS

MATE-Media is a fork of GNOME-Media.
8 changes: 3 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ AC_PROG_MAKE_SET

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h limits.h malloc.h strings.h sys/ioctl.h unistd.h])
AC_CHECK_HEADERS([sys/sockio.h sys/param.h])
AC_CHECK_HEADERS([string.h math.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
Expand Down Expand Up @@ -108,9 +107,8 @@ AC_ARG_ENABLE([pulseaudio],
enable_pulseaudio=$enableval, enable_pulseaudio=auto)

if test "x$enable_pulseaudio" != "xno"; then

PKG_CHECK_MODULES(PULSEAUDIO,
libpulse >= $PA_REQUIRED_VERSION libpulse-mainloop-glib >= $PA_REQUIRED_VERSION,
libpulse >= $PA_REQUIRED_VERSION,
have_pulseaudio=yes,
have_pulseaudio=no)

Expand All @@ -126,7 +124,7 @@ if test "x$enable_pulseaudio" != "xno"; then
libcanberra-gtk$CANBERRA_API_VERSION >= $CANBERRA_REQUIRED_VERSION
unique-$UNIQUE_API_VERSION
libxml-2.0
mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED_VERSION
dnl mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED_VERSION
libmatemixer
)

Expand Down
2 changes: 1 addition & 1 deletion mate-volume-control/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AM_CPPFLAGS = \
$(WARN_CFLAGS) \
-I$(top_srcdir)/sound-theme \
$(VOLUME_CONTROL_CFLAGS) \
$(DISABLE_DEPRECATED) \
$(xxDISABLE_DEPRECATED) \
$(PULSEAUDIO_CFLAGS) \
-DLOCALE_DIR=\""$(datadir)/locale"\" \
-DLIBEXECDIR=\"$(libexecdir)\" \
Expand Down
7 changes: 5 additions & 2 deletions mate-volume-control/src/applet-main.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2008 Red Hat, Inc.
* Copyright (C) 2014 Michal Ratajsky <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
Expand All @@ -20,8 +21,9 @@

#include "config.h"

#include <glib/gi18n.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <glib-object.h>
#include <gtk/gtk.h>

#include <libintl.h>
Expand All @@ -37,7 +39,7 @@ main (int argc, char **argv)
{
GError *error = NULL;
GvcApplet *applet;
UniqueApp *app = NULL;
UniqueApp *app;
GOptionEntry entries[] = {
{ "version", 'v', 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL },
{ NULL }
Expand All @@ -51,6 +53,7 @@ main (int argc, char **argv)
(char *) _(" — MATE Volume Control Applet"),
entries, GETTEXT_PACKAGE,
&error);

if (error != NULL) {
g_warning ("%s", error->message);
return 1;
Expand Down
52 changes: 30 additions & 22 deletions mate-volume-control/src/dialog-main.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2008 Red Hat, Inc.
* Copyright (C) 2014 Michal Ratajsky <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
Expand All @@ -20,11 +21,11 @@

#include "config.h"

#include <libintl.h>
#include <glib/gi18n.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>

#include <libintl.h>
#include <unique/uniqueapp.h>
#include <libmatemixer/matemixer.h>

Expand All @@ -42,21 +43,21 @@ static GtkWidget *warning_dialog = NULL;
static void
on_dialog_response (GtkDialog *dialog, guint response_id, gpointer data)
{
gboolean destroy = GPOINTER_TO_INT (data);
gboolean destroy = GPOINTER_TO_INT (data);

if (destroy)
gtk_widget_destroy (GTK_WIDGET (dialog));
if (destroy)
gtk_widget_destroy (GTK_WIDGET (dialog));

gtk_main_quit ();
}

static void
on_dialog_close (GtkDialog *dialog, gpointer data)
{
gboolean destroy = GPOINTER_TO_INT (data);
gboolean destroy = GPOINTER_TO_INT (data);

if (destroy)
gtk_widget_destroy (GTK_WIDGET (dialog));
if (destroy)
gtk_widget_destroy (GTK_WIDGET (dialog));

gtk_main_quit ();
}
Expand All @@ -76,12 +77,12 @@ on_app_message_received (UniqueApp *app,
static void
remove_warning_dialog (void)
{
if (popup_id != 0) {
g_source_remove (popup_id);
popup_id = 0;
}
if (popup_id != 0) {
g_source_remove (popup_id);
popup_id = 0;
}

g_clear_pointer (&warning_dialog, gtk_widget_destroy);
g_clear_pointer (&warning_dialog, gtk_widget_destroy);
}

static void
Expand All @@ -93,25 +94,30 @@ control_ready (MateMixerControl *control, UniqueApp *app)
return;

app_dialog = GTK_WIDGET (gvc_mixer_dialog_new (control));
g_signal_connect (app_dialog,

g_signal_connect (G_OBJECT (app_dialog),
"response",
G_CALLBACK (on_dialog_response),
GINT_TO_POINTER (FALSE));
g_signal_connect (app_dialog,
g_signal_connect (G_OBJECT (app_dialog),
"close",
G_CALLBACK (on_dialog_close),
GINT_TO_POINTER (FALSE));

gvc_mixer_dialog_set_page (GVC_MIXER_DIALOG (app_dialog), page);

g_signal_connect (app, "message-received",
G_CALLBACK (on_app_message_received), app_dialog);
g_signal_connect (G_OBJECT (app),
"message-received",
G_CALLBACK (on_app_message_received),
app_dialog);

gtk_widget_show (app_dialog);
}

static void
on_control_state_notify (MateMixerControl *control, UniqueApp *app)
on_control_state_notify (MateMixerControl *control,
GParamSpec *pspec,
UniqueApp *app)
{
MateMixerState state = mate_mixer_control_get_state (control);
gboolean failed = FALSE;
Expand Down Expand Up @@ -194,6 +200,7 @@ main (int argc, char **argv)
(char *) _(" — MATE Volume Control"),
entries, GETTEXT_PACKAGE,
&error);

if (error != NULL) {
g_warning ("%s", error->message);
return 1;
Expand All @@ -206,8 +213,8 @@ main (int argc, char **argv)
app = unique_app_new (GVC_DIALOG_DBUS_NAME, NULL);

if (unique_app_is_running (app)) {
unique_app_send_message (app, UNIQUE_ACTIVATE, NULL);
return 0;
unique_app_send_message (app, UNIQUE_ACTIVATE, NULL);
return 0;
}
if (!mate_mixer_init ()) {
g_warning ("libmatemixer initialization failed, exiting");
Expand All @@ -216,19 +223,20 @@ main (int argc, char **argv)

control = mate_mixer_control_new ();

mate_mixer_control_set_backend_type (control, MATE_MIXER_BACKEND_NULL);

mate_mixer_control_set_app_name (control, _("Volume Control"));
mate_mixer_control_set_app_id (control, GVC_DIALOG_DBUS_NAME);
mate_mixer_control_set_app_version (control, VERSION);
mate_mixer_control_set_app_icon (control, "multimedia-volume-control");

g_signal_connect (control,
g_signal_connect (G_OBJECT (control),
"notify::state",
G_CALLBACK (on_control_state_notify),
app);

mate_mixer_control_open (control);

/* */
if (mate_mixer_control_get_state (control) == MATE_MIXER_STATE_CONNECTING)
popup_id = g_timeout_add_seconds (DIALOG_POPUP_TIMEOUT,
dialog_popup_timeout,
Expand Down
Loading

0 comments on commit 0c558fa

Please sign in to comment.