]> granicus.if.org Git - handbrake/commitdiff
LinGui: clean up my improper use of HB_VERSION and HB_BUILD.
authorjstebbins <jstebbins.hb@gmail.com>
Fri, 27 Feb 2009 01:11:58 +0000 (01:11 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Fri, 27 Feb 2009 01:11:58 +0000 (01:11 +0000)
replace with hb_get_version and hb_get_build.
this fixes a difficulty with compiling using KonaB1end's shiny new build system.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2177 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/callbacks.c
gtk/src/hb-backend.c
gtk/src/main.c

index acb434e7e215cf878184c6ad0cc09b92f8ea39a1..68bd207c93e3ab69fc474fc38380b98ad495b1f6 100644 (file)
@@ -1517,7 +1517,7 @@ queue_scan(signal_user_data_t *ud, GValue *js)
                gchar *ver_str;
 
                ver_str = g_strdup_printf("Handbrake Version: %s (%d)\n", 
-                                                                       HB_VERSION, HB_BUILD);
+                                                                       hb_get_version(NULL), hb_get_build(NULL));
                g_io_channel_write_chars (ud->job_activity_log, ver_str, 
                                                                        -1, NULL, NULL);
                g_free(ver_str);
@@ -2940,7 +2940,7 @@ process_appcast(signal_user_data_t *ud)
        if (ud->appcast == NULL || ud->appcast_len < 15 || 
                strncmp(&(ud->appcast[9]), "200 OK", 6))
        {
-               if (!stable_update_lock && HB_BUILD % 100)
+               if (!stable_update_lock && hb_get_build(NULL) % 100)
                        g_idle_add((GSourceFunc)check_stable_update, ud);
                goto done;
        }
@@ -2949,14 +2949,14 @@ process_appcast(signal_user_data_t *ud)
                ibuild = g_strtod(build, NULL);
        skip = ghb_settings_get_int(ud->settings, "update_skip_version");
        if (description == NULL || build == NULL || version == NULL 
-               || ibuild <= HB_BUILD || skip == ibuild)
+               || ibuild <= hb_get_build(NULL) || skip == ibuild)
        {
-               if (!stable_update_lock && HB_BUILD % 100)
+               if (!stable_update_lock && hb_get_build(NULL) % 100)
                        g_thread_create((GThreadFunc)check_stable_update, ud, FALSE, NULL);
                goto done;
        }
        msg = g_strdup_printf("HandBrake %s/%s is now available (you have %s/%d).",
-                       version, build, HB_VERSION, HB_BUILD);
+                       version, build, hb_get_version(NULL), hb_get_build(NULL));
        label = GHB_WIDGET(ud->builder, "update_message");
        gtk_label_set_text(GTK_LABEL(label), msg);
        html = gtk_html_new_from_string(description, -1);
@@ -3079,7 +3079,7 @@ ghb_check_update(signal_user_data_t *ud)
        GError *gerror = NULL;
 
        g_debug("ghb_check_update");
-       if (HB_BUILD % 100)
+       if (hb_get_build(NULL) % 100)
        {
        query = 
                "GET /appcast_unstable.xml HTTP/1.0\r\nHost: handbrake.fr\r\n\r\n";
index 518d1b44d5317c8f84f6d9ad6b07afa12be05de9..94dead4a578ef6c86ab2fe745c3ccfd6891df24b 100644 (file)
@@ -25,7 +25,6 @@
 #include <limits.h>
 #include <math.h>
 #include "hb.h"
-#include "hbversion.h"
 #include <gtk/gtk.h>
 #include <glib/gstdio.h>
 #include "hb-backend.h"
@@ -546,7 +545,7 @@ del_tree(const gchar *name, gboolean del_top)
 const gchar*
 ghb_version()
 {
-       return HB_VERSION;
+       return hb_get_version(NULL);
 }
 
 void
index 72deb03a7d0532248fa7ad4ac8c3aac154b899c7..4c7707ccfa8dffbaed1aec9e7401f913451ade0e 100644 (file)
@@ -36,7 +36,7 @@
 #include <gst/gst.h>
 #include <glib/gstdio.h>
 #include <gio/gio.h>
-#include "hbversion.h"
+#include "hb.h"
 #include "renderer_button.h"
 #include "hb-backend.h"
 #include "ghb-dvd.h"
@@ -533,7 +533,7 @@ main (int argc, char *argv[])
        // Redirect stderr to the activity window
        ghb_preview_init(ud);
        IoRedirect(ud);
-       ghb_log("Handbrake Version: %s (%d)", HB_VERSION, HB_BUILD);
+       ghb_log("Handbrake Version: %s (%d)", hb_get_version(NULL), hb_get_build(NULL));
        ghb_init_dep_map();
 
        // Need to connect x264_options textview buffer to the changed signal