~ubuntu-branches/ubuntu/natty/vino/natty

« back to all changes in this revision

Viewing changes to server/vino-prompt.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-07-28 11:22:09 UTC
  • mfrom: (1.1.36 upstream)
  • Revision ID: james.westby@ubuntu.com-20090728112209-suoi0rmpr0ogmcfv
Tags: 2.27.5-0ubuntu1
* New upstream release: (LP: #405585)
  - Added an (GConf) option to disable XDamage extension. See #533613.
  - Added Telepathy tubes support, allowing you to share the desktop with an
    IM buddy. (Arnaud Maillet)
  - Dropped libgnome dependency. Using EggSmClient.
  - Migrate from libglade to GtkBuilder. (Javier Jardón)
  - Many small bug fixes.
* debian/control.in:
  - Remove dependency on libglade
  - Remove Debian VCS links as they confuse debcheckout
  - Added build-depends on telepathy-glib
* debian/watch:
  - Watch for unstable versions
* debian/patches/10_fix_link_order.patch:
* debian/patches/99_autoreconf.patch:
  - Fix link order of server libraries (committed upstream, patch can be
    removed next release)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "vino-prompt.h"
26
26
 
27
27
#include <gtk/gtk.h>
28
 
#include <glade/glade.h>
29
28
#include "vino-util.h"
30
29
#include "vino-enums.h"
31
30
#include "vino-marshal.h"
264
263
 
265
264
static void
266
265
vino_prompt_setup_icons (VinoPrompt *prompt,
267
 
                         GladeXML   *xml)
 
266
                         GtkBuilder *builder)
268
267
{
269
268
#define ICON_SIZE_STANDARD 48
270
269
 
271
 
  prompt->priv->sharing_icon = glade_xml_get_widget (xml, "sharing_icon");
 
270
  prompt->priv->sharing_icon = GTK_WIDGET (gtk_builder_get_object (builder,
 
271
                                                                   "sharing_icon"));
272
272
  g_assert (prompt->priv->sharing_icon != NULL);
273
273
 
274
274
  gtk_window_set_icon_name (GTK_WINDOW (prompt->priv->dialog),
282
282
static gboolean
283
283
vino_prompt_setup_dialog (VinoPrompt *prompt)
284
284
{
285
 
#define VINO_GLADE_FILE "vino-prompt.glade"
 
285
#define VINO_UI_FILE "vino-prompt.ui"
286
286
 
287
 
  GladeXML   *xml;
288
 
  const char *glade_file;
 
287
  GtkBuilder *builder;
 
288
  const char *ui_file;
289
289
  GtkWidget  *help_button;
290
 
      
291
 
  if (g_file_test (VINO_GLADE_FILE, G_FILE_TEST_EXISTS))
292
 
    glade_file = VINO_GLADE_FILE;
 
290
  GError     *error = NULL;
 
291
 
 
292
  if (g_file_test (VINO_UI_FILE, G_FILE_TEST_EXISTS))
 
293
    ui_file = VINO_UI_FILE;
293
294
  else
294
 
    glade_file = VINO_GLADEDIR "/" VINO_GLADE_FILE;
295
 
 
296
 
  xml = glade_xml_new (glade_file, "vino_dialog", NULL);
297
 
  if (!xml)
298
 
    {
299
 
      g_warning ("Unable to locate glade file '%s'", glade_file);
300
 
      return FALSE;
301
 
    }
302
 
 
303
 
  prompt->priv->dialog = glade_xml_get_widget (xml, "vino_dialog");
 
295
    ui_file = VINO_UIDIR "/" VINO_UI_FILE;
 
296
 
 
297
  builder = gtk_builder_new ();
 
298
  if (!gtk_builder_add_from_file (builder, ui_file, &error))
 
299
  {
 
300
    g_warning ("Unable to locate ui file '%s'", ui_file);
 
301
    g_error_free (error);
 
302
    return FALSE;
 
303
  }
 
304
 
 
305
  prompt->priv->dialog = GTK_WIDGET (gtk_builder_get_object (builder, "vino_dialog"));
304
306
  g_assert (prompt->priv->dialog != NULL);
305
307
 
306
308
  g_signal_connect_swapped (prompt->priv->dialog, "response",
307
309
                            G_CALLBACK (vino_prompt_handle_dialog_response), prompt);
308
310
 
309
 
  vino_prompt_setup_icons (prompt, xml);
 
311
  vino_prompt_setup_icons (prompt, builder);
310
312
 
311
 
  prompt->priv->host_label = glade_xml_get_widget (xml, "host_label");
 
313
  prompt->priv->host_label = GTK_WIDGET (gtk_builder_get_object (builder, "host_label"));
312
314
  g_assert (prompt->priv->host_label != NULL);
313
315
 
314
 
  help_button = glade_xml_get_widget (xml, "help_button");
 
316
  help_button = GTK_WIDGET (gtk_builder_get_object (builder, "help_button"));
315
317
  g_assert (help_button != NULL);
316
318
  gtk_widget_hide (help_button);
317
319
 
318
 
  g_object_unref (xml);
 
320
  g_object_unref (builder);
319
321
 
320
322
  return TRUE;
321
323
 
322
 
#undef VINO_GLADE_FILE
 
324
#undef VINO_UI_FILE
323
325
}
324
326
 
325
327
static gboolean